nuxeo-development-framework 5.4.9 → 5.5.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.
Files changed (76) hide show
  1. package/bundles/nuxeo-development-framework.umd.js +655 -1651
  2. package/bundles/nuxeo-development-framework.umd.js.map +1 -1
  3. package/esm2015/lib/components/ndf-config-editor/constants/query.js +2 -2
  4. package/esm2015/lib/components/ndf-config-editor/constants/type.js +3 -3
  5. package/esm2015/lib/components/ndf-config-editor/containers/ndf-config-editor/ndf-config-editor.component.js +24 -17
  6. package/esm2015/lib/components/ndf-config-editor/metadata-token.js +3 -0
  7. package/esm2015/lib/components/ndf-config-editor/models/payload-data.js +2 -0
  8. package/esm2015/lib/components/ndf-config-editor/public/editor-navigate-button.js +8 -4
  9. package/esm2015/lib/components/ndf-config-editor/public-api.js +2 -1
  10. package/esm2015/lib/components/ndf-config-editor/services/data-access.service.js +12 -15
  11. package/esm2015/lib/components/ndf-config-editor/services/data-store.service.js +38 -10
  12. package/esm2015/lib/components/reports/charts/plugins/data-labels.js +166 -102
  13. package/esm2015/lib/components/reports/charts/utility/colors.js +13 -1
  14. package/esm2015/lib/components/reports/ndf-reports/base/base-chart.js +2 -2
  15. package/esm2015/lib/components/reports/ndf-reports/base/base-custom-report.js +16 -3
  16. package/esm2015/lib/components/reports/ndf-reports/base/base-graph.report.js +10 -22
  17. package/esm2015/lib/components/reports/ndf-reports/base/base-report.js +5 -2
  18. package/esm2015/lib/components/reports/ndf-reports/charts-components/custom-chart/custom-chart.component.js +68 -0
  19. package/esm2015/lib/components/reports/ndf-reports/charts-components/index.js +2 -1
  20. package/esm2015/lib/components/reports/ndf-reports/components/_parts/custom-chart-dialog/custom-chart-dialog.component.js +41 -0
  21. package/esm2015/lib/components/reports/ndf-reports/components/_parts/index.js +2 -1
  22. package/esm2015/lib/components/reports/ndf-reports/components/custom-report/custom-report.component.js +23 -37
  23. package/esm2015/lib/components/reports/ndf-reports/components/dynamic-timeline-report/dynamic-timeline-report.component.js +2 -6
  24. package/esm2015/lib/components/reports/ndf-reports/containers/ndf-report/ndf-report.component.js +4 -3
  25. package/esm2015/lib/components/reports/ndf-reports/containers/ndf-reports/ndf-reports.component.js +2 -2
  26. package/esm2015/lib/components/reports/ndf-reports/models/custom-definition.js +1 -1
  27. package/esm2015/lib/components/reports/ndf-reports/models/dialog-data.js +1 -1
  28. package/esm2015/lib/components/reports/ndf-reports/models/report-config.js +1 -1
  29. package/esm2015/lib/components/reports/ndf-reports/ndf-reports.module.js +5 -3
  30. package/esm2015/lib/components/reports/ndf-reports/public-api.js +2 -1
  31. package/esm2015/lib/components/reports/ndf-reports/services/chart-manager.service.js +15 -9
  32. package/esm2015/lib/components/reports/ndf-reports/services/custom-reports-registry.service.js +1 -1
  33. package/esm2015/lib/components/reports/ndf-reports/services/report-config-mapper.service.js +1 -1
  34. package/esm2015/lib/components/reports/ndf-reports/services/report-transform.service.js +2 -2
  35. package/esm2015/lib/components/reports/ndf-reports/services/reports-dialog.service.js +32 -0
  36. package/esm2015/lib/components/tables/ndf-table/services/ndf-table-configuration.service.js +18 -13
  37. package/esm2015/lib/shared/services/base/base-editor-config.service.js +70 -0
  38. package/esm2015/lib/shared/services/base/index.js +2 -1
  39. package/fesm2015/nuxeo-development-framework.js +599 -1624
  40. package/fesm2015/nuxeo-development-framework.js.map +1 -1
  41. package/lib/components/ndf-config-editor/constants/type.d.ts +2 -2
  42. package/lib/components/ndf-config-editor/containers/config-preview/config-preview.component.d.ts +2 -2
  43. package/lib/components/ndf-config-editor/containers/ndf-config-editor/ndf-config-editor.component.d.ts +8 -7
  44. package/lib/components/ndf-config-editor/metadata-token.d.ts +8 -0
  45. package/lib/components/ndf-config-editor/models/payload-data.d.ts +6 -0
  46. package/lib/components/ndf-config-editor/public/editor-navigate-button.d.ts +1 -0
  47. package/lib/components/ndf-config-editor/public-api.d.ts +1 -0
  48. package/lib/components/ndf-config-editor/services/data-access.service.d.ts +7 -4
  49. package/lib/components/ndf-config-editor/services/data-store.service.d.ts +6 -3
  50. package/lib/components/reports/charts/utility/colors.d.ts +5 -0
  51. package/lib/components/reports/ndf-reports/base/base-chart.d.ts +1 -1
  52. package/lib/components/reports/ndf-reports/base/base-custom-report.d.ts +18 -13
  53. package/lib/components/reports/ndf-reports/base/base-graph.report.d.ts +5 -13
  54. package/lib/components/reports/ndf-reports/base/base-report.d.ts +4 -1
  55. package/lib/components/reports/ndf-reports/charts-components/custom-chart/custom-chart.component.d.ts +15 -0
  56. package/lib/components/reports/ndf-reports/charts-components/index.d.ts +1 -0
  57. package/lib/components/reports/ndf-reports/components/_parts/custom-chart-dialog/custom-chart-dialog.component.d.ts +14 -0
  58. package/lib/components/reports/ndf-reports/components/_parts/index.d.ts +1 -0
  59. package/lib/components/reports/ndf-reports/components/custom-report/custom-report.component.d.ts +8 -10
  60. package/lib/components/reports/ndf-reports/containers/ndf-reports/ndf-reports.component.d.ts +1 -1
  61. package/lib/components/reports/ndf-reports/models/custom-definition.d.ts +3 -3
  62. package/lib/components/reports/ndf-reports/models/dialog-data.d.ts +8 -0
  63. package/lib/components/reports/ndf-reports/models/report-config.d.ts +2 -2
  64. package/lib/components/reports/ndf-reports/ndf-reports.module.d.ts +22 -20
  65. package/lib/components/reports/ndf-reports/public-api.d.ts +1 -0
  66. package/lib/components/reports/ndf-reports/services/chart-manager.service.d.ts +2 -2
  67. package/lib/components/reports/ndf-reports/services/custom-reports-registry.service.d.ts +3 -2
  68. package/lib/components/reports/ndf-reports/services/report-config-mapper.service.d.ts +2 -2
  69. package/lib/components/reports/ndf-reports/services/reports-dialog.service.d.ts +21 -0
  70. package/lib/components/tables/ndf-table/containers/ndf-table/ndf-table.component.d.ts +1 -1
  71. package/lib/components/tables/ndf-table/services/ndf-table-configuration.service.d.ts +3 -5
  72. package/lib/shared/services/base/base-editor-config.service.d.ts +30 -0
  73. package/lib/shared/services/base/index.d.ts +1 -0
  74. package/package.json +1 -1
  75. package/esm2015/lib/components/ndf-config-editor/services/dummy-data.js +0 -1321
  76. package/lib/components/ndf-config-editor/services/dummy-data.d.ts +0 -992
@@ -4005,6 +4005,74 @@
4005
4005
  args: [{ providedIn: 'root' }]
4006
4006
  }], ctorParameters: function () { return [{ type: i0__namespace.Injector }]; } });
4007
4007
 
4008
+ var BaseEditorConfigService = /** @class */ (function (_super) {
4009
+ __extends(BaseEditorConfigService, _super);
4010
+ function BaseEditorConfigService(injector) {
4011
+ var _this = _super.call(this, injector) || this;
4012
+ _this.injector = injector;
4013
+ _this.appConfigService = _this.injector.get(AppConfigService);
4014
+ return _this;
4015
+ }
4016
+ BaseEditorConfigService.prototype.fetchData = function (_b) {
4017
+ var _this = this;
4018
+ var key = _b.key, type = _b.type, app = _b.app, localPath = _b.localPath;
4019
+ return this.request({
4020
+ type: 'get',
4021
+ endpoint: "/search/pp/PP_NDF_UI_Configurations/execute",
4022
+ queryParams: Object.assign({ ndfuiconfig_type: type, ndfuiconfig_key: key }, (app ? { ndfuiconfig_app: app } : {})),
4023
+ headers: {
4024
+ properties: 'ndfuiconfig,note'
4025
+ }
4026
+ }).pipe(operators.map(function (response) { var _a; return (_a = response.entries) === null || _a === void 0 ? void 0 : _a[0]; }), operators.switchMap(function (entry) {
4027
+ var _a;
4028
+ var content = _this._parseData((_a = entry === null || entry === void 0 ? void 0 : entry.properties) === null || _a === void 0 ? void 0 : _a['note:note']);
4029
+ if (content) {
4030
+ return rxjs.of({
4031
+ submitted: true,
4032
+ uid: entry.uid,
4033
+ data: {
4034
+ key: key,
4035
+ type: type,
4036
+ app: entry.properties['ndfuiconfig:app'],
4037
+ config: content
4038
+ }
4039
+ });
4040
+ }
4041
+ var config = _this.appConfigService.myConfiguration || {};
4042
+ var base = localPath ? ___default["default"].get(config, localPath) : config;
4043
+ var data = _.cloneDeep(___default["default"].get(base, key));
4044
+ return rxjs.of({
4045
+ submitted: false,
4046
+ data: {
4047
+ key: key,
4048
+ type: type,
4049
+ app: app,
4050
+ config: data
4051
+ }
4052
+ });
4053
+ }));
4054
+ };
4055
+ BaseEditorConfigService.prototype._parseData = function (data) {
4056
+ if (!data) {
4057
+ return null;
4058
+ }
4059
+ try {
4060
+ return JSON.parse(data);
4061
+ }
4062
+ catch (error) {
4063
+ console.warn('Error parsing data:', error);
4064
+ return null;
4065
+ }
4066
+ };
4067
+ return BaseEditorConfigService;
4068
+ }(BaseService));
4069
+ BaseEditorConfigService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: BaseEditorConfigService, deps: [{ token: i0__namespace.Injector }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
4070
+ BaseEditorConfigService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: BaseEditorConfigService, providedIn: 'root' });
4071
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: BaseEditorConfigService, decorators: [{
4072
+ type: i0.Injectable,
4073
+ args: [{ providedIn: 'root' }]
4074
+ }], ctorParameters: function () { return [{ type: i0__namespace.Injector }]; } });
4075
+
4008
4076
  /**
4009
4077
  * Transforms URL into async safe URL to be rendered in the view
4010
4078
  *
@@ -21459,13 +21527,13 @@
21459
21527
  };
21460
21528
 
21461
21529
  var NDF_EDITOR_TYPE = {
21462
- REPORTS: 'reports',
21463
- TABLES: 'tables'
21530
+ REPORTS: 'report',
21531
+ TABLES: 'table'
21464
21532
  };
21465
21533
 
21466
21534
  var PARAMS_KEYS = {
21467
21535
  TYPE: 'type',
21468
- KEY: 'key'
21536
+ KEY: 'key',
21469
21537
  };
21470
21538
 
21471
21539
  var DynamicTableService = /** @class */ (function () {
@@ -22234,18 +22302,27 @@
22234
22302
  function NdfTableConfigurationService(injector) {
22235
22303
  var _this = _super.call(this, injector) || this;
22236
22304
  _this.injector = injector;
22237
- _this.appConfigService = _this.injector.get(AppConfigService);
22238
- _this.configurationsUrl = 'assets/configs/configuration.json';
22239
22305
  return _this;
22240
22306
  }
22241
- NdfTableConfigurationService.prototype.getTableConfiguration = function (key, path) {
22242
- return rxjs.of(this.appConfigService.myConfiguration).pipe(operators.map(function (config) {
22243
- var base = path ? ___default["default"].get(config, path) : config;
22244
- return _.cloneDeep(___default["default"].get(base, key));
22307
+ NdfTableConfigurationService.prototype.getTableConfiguration = function (key, localPath) {
22308
+ var _a;
22309
+ return this.fetchData({
22310
+ key: key,
22311
+ type: 'table',
22312
+ app: (_a = this.environment) === null || _a === void 0 ? void 0 : _a.appKey,
22313
+ localPath: localPath
22314
+ }).pipe(operators.map(function (res) {
22315
+ var _a;
22316
+ if (!res.submitted) {
22317
+ console.warn('%c \n--------------------------------------------------\n' +
22318
+ 'Unsaved table configuration detected. Open the config editor to save it' +
22319
+ '\n--------------------------------------------------\n', 'font-size: 14px;');
22320
+ }
22321
+ return (_a = res === null || res === void 0 ? void 0 : res.data) === null || _a === void 0 ? void 0 : _a.config;
22245
22322
  }));
22246
22323
  };
22247
22324
  return NdfTableConfigurationService;
22248
- }(HttpBaseService));
22325
+ }(BaseEditorConfigService));
22249
22326
  NdfTableConfigurationService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NdfTableConfigurationService, deps: [{ token: i0__namespace.Injector }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
22250
22327
  NdfTableConfigurationService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NdfTableConfigurationService, providedIn: 'root' });
22251
22328
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NdfTableConfigurationService, decorators: [{
@@ -22266,9 +22343,17 @@
22266
22343
  this.editorConfig = (_a = this.configService.myConfiguration) === null || _a === void 0 ? void 0 : _a.configEditor;
22267
22344
  this.isFeatureEnabled = environment.configEditor === 'YES';
22268
22345
  }
22346
+ Object.defineProperty(EditorButtonComponent.prototype, "isEnabled", {
22347
+ get: function () {
22348
+ var _a, _b, _c, _d;
22349
+ return ((_a = this.editorConfig) === null || _a === void 0 ? void 0 : _a.enabled) && ((_d = (_c = (_b = this.editorConfig) === null || _b === void 0 ? void 0 : _b.types) === null || _c === void 0 ? void 0 : _c[this.type]) === null || _d === void 0 ? void 0 : _d.enabled);
22350
+ },
22351
+ enumerable: false,
22352
+ configurable: true
22353
+ });
22269
22354
  EditorButtonComponent.prototype.ngOnInit = function () { };
22270
22355
  EditorButtonComponent.prototype.navigate = function () {
22271
- var _b;
22356
+ var _e;
22272
22357
  var _a;
22273
22358
  var config = (_a = this.editorConfig) === null || _a === void 0 ? void 0 : _a.types[this.type];
22274
22359
  if (!config || !this.key || !this.type) {
@@ -22280,21 +22365,21 @@
22280
22365
  }
22281
22366
  var url = "" + (this.baseAppUrl || '') + navigateUrl;
22282
22367
  this.router.navigate([url], {
22283
- queryParams: (_b = {},
22284
- _b[PARAMS_KEYS.TYPE] = this.type,
22285
- _b[PARAMS_KEYS.KEY] = this.key,
22286
- _b)
22368
+ queryParams: (_e = {},
22369
+ _e[PARAMS_KEYS.TYPE] = this.type,
22370
+ _e[PARAMS_KEYS.KEY] = this.key,
22371
+ _e)
22287
22372
  });
22288
22373
  };
22289
22374
  return EditorButtonComponent;
22290
22375
  }());
22291
22376
  EditorButtonComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: EditorButtonComponent, deps: [{ token: 'environment' }, { token: i1__namespace$5.Router }, { token: PROJECT_BASE_HREF }, { token: AppConfigService }], target: i0__namespace.ɵɵFactoryTarget.Component });
22292
- EditorButtonComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: EditorButtonComponent, selector: "app-editor-button", inputs: { type: "type", key: "key" }, ngImport: i0__namespace, template: "\n\t\t<ng-container *ngIf=\"isFeatureEnabled && editorConfig?.enabled && editorConfig?.types?.tables?.enabled\">\n\t\t\t<button\n\t\t\t\tmat-stroked-button\n\t\t\t\t[matTooltip]=\"'JSON_EDITOR.navigateToEditor' | translate\"\n\t\t\t\t(click)=\"navigate()\"\n\t\t\t\t*permission=\"{ name: item?.permission }\"\n\t\t\t>\n\t\t\t\t<mat-icon>edit</mat-icon>\n\t\t\t</button>\n\t\t</ng-container>\n\t", isInline: true, components: [{ type: i1__namespace$c.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i2__namespace$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], directives: [{ type: i4__namespace$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: PermissionsDirective, selector: "[permission]", inputs: ["permission"] }, { type: i7__namespace.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltipPosition", "matTooltipDisabled", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }], pipes: { "translate": i1__namespace.TranslatePipe } });
22377
+ EditorButtonComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: EditorButtonComponent, selector: "app-editor-button", inputs: { type: "type", key: "key" }, ngImport: i0__namespace, template: "\n\t\t<ng-container *ngIf=\"isFeatureEnabled && isEnabled\">\n\t\t\t<button\n\t\t\t\tmat-stroked-button\n\t\t\t\t[matTooltip]=\"'JSON_EDITOR.navigateToEditor' | translate\"\n\t\t\t\t(click)=\"navigate()\"\n\t\t\t\t*permission=\"{ name: item?.permission }\"\n\t\t\t>\n\t\t\t\t<mat-icon>edit</mat-icon>\n\t\t\t</button>\n\t\t</ng-container>\n\t", isInline: true, components: [{ type: i1__namespace$c.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i2__namespace$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], directives: [{ type: i4__namespace$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: PermissionsDirective, selector: "[permission]", inputs: ["permission"] }, { type: i7__namespace.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltipPosition", "matTooltipDisabled", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }], pipes: { "translate": i1__namespace.TranslatePipe } });
22293
22378
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: EditorButtonComponent, decorators: [{
22294
22379
  type: i0.Component,
22295
22380
  args: [{
22296
22381
  selector: 'app-editor-button',
22297
- template: "\n\t\t<ng-container *ngIf=\"isFeatureEnabled && editorConfig?.enabled && editorConfig?.types?.tables?.enabled\">\n\t\t\t<button\n\t\t\t\tmat-stroked-button\n\t\t\t\t[matTooltip]=\"'JSON_EDITOR.navigateToEditor' | translate\"\n\t\t\t\t(click)=\"navigate()\"\n\t\t\t\t*permission=\"{ name: item?.permission }\"\n\t\t\t>\n\t\t\t\t<mat-icon>edit</mat-icon>\n\t\t\t</button>\n\t\t</ng-container>\n\t"
22382
+ template: "\n\t\t<ng-container *ngIf=\"isFeatureEnabled && isEnabled\">\n\t\t\t<button\n\t\t\t\tmat-stroked-button\n\t\t\t\t[matTooltip]=\"'JSON_EDITOR.navigateToEditor' | translate\"\n\t\t\t\t(click)=\"navigate()\"\n\t\t\t\t*permission=\"{ name: item?.permission }\"\n\t\t\t>\n\t\t\t\t<mat-icon>edit</mat-icon>\n\t\t\t</button>\n\t\t</ng-container>\n\t"
22298
22383
  }]
22299
22384
  }], ctorParameters: function () {
22300
22385
  return [{ type: undefined, decorators: [{
@@ -43376,6 +43461,18 @@
43376
43461
  }
43377
43462
  }
43378
43463
  return variants;
43464
+ }
43465
+ function createConicGradient(chart, colors) {
43466
+ var ctx = chart.ctx, chartArea = chart.chartArea;
43467
+ if (!chartArea || !('createConicGradient' in ctx)) {
43468
+ return null;
43469
+ }
43470
+ var left = chartArea.left, width = chartArea.width, top = chartArea.top, height = chartArea.height;
43471
+ //@ts-ignore
43472
+ var gradient = ctx.createConicGradient(0, left + width / 2, top + height / 2);
43473
+ gradient.addColorStop(0, colors === null || colors === void 0 ? void 0 : colors.startColor);
43474
+ gradient.addColorStop(1, colors === null || colors === void 0 ? void 0 : colors.endColor);
43475
+ return gradient;
43379
43476
  }
43380
43477
 
43381
43478
  function flatArray(data) {
@@ -43528,6 +43625,7 @@
43528
43625
  createTint: createTint,
43529
43626
  createShade: createShade,
43530
43627
  createColorVariants: createColorVariants,
43628
+ createConicGradient: createConicGradient,
43531
43629
  flatArray: flatArray,
43532
43630
  isObject: isObject,
43533
43631
  getCssVariable: getCssVariable,
@@ -44003,147 +44101,211 @@
44003
44101
  }
44004
44102
  };
44005
44103
 
44104
+ // Configuration constants
44105
+ var LABEL_CONFIG = {
44106
+ minFontSize: 10,
44107
+ maxFontSize: 16,
44108
+ defaultFontSize: 12,
44109
+ textPadding: 8,
44110
+ minAngleForPieLabel: 0.3,
44111
+ arcRadiusMultiplier: {
44112
+ pie: 0.7,
44113
+ doughnut: 0.8
44114
+ },
44115
+ fontSizeCalculation: {
44116
+ percentageDivisor: 3,
44117
+ maxPercentageForFontSize: 20
44118
+ }
44119
+ };
44120
+ // Main plugin
44006
44121
  var chartDataLabels = {
44007
44122
  id: 'chartDataLabels',
44008
44123
  afterDatasetsDraw: function (chart, args, plugins) {
44009
44124
  var _a;
44010
44125
  var ctx = chart.ctx;
44011
44126
  ctx.save();
44012
- switch ((_a = chart.config) === null || _a === void 0 ? void 0 : _a.type) {
44013
- case 'bar':
44014
- barChartLabels(chart);
44015
- break;
44016
- case 'pie':
44017
- pieChartLabels(chart);
44018
- break;
44019
- case 'doughnut':
44020
- doughnutChartLabels(chart);
44021
- break;
44127
+ var chartType = (_a = chart.config) === null || _a === void 0 ? void 0 : _a.type;
44128
+ var renderer = getChartRenderer(chartType);
44129
+ if (renderer) {
44130
+ renderer(chart);
44022
44131
  }
44023
44132
  ctx.restore();
44024
44133
  }
44025
44134
  };
44135
+ // Chart type router
44136
+ function getChartRenderer(chartType) {
44137
+ var renderers = {
44138
+ bar: barChartLabels,
44139
+ pie: pieChartLabels,
44140
+ doughnut: doughnutChartLabels
44141
+ };
44142
+ return renderers[chartType];
44143
+ }
44144
+ // Core utility functions
44145
+ function calculatePercentage(value, total) {
44146
+ return total > 0 ? (value / total) * 100 : 0;
44147
+ }
44148
+ function calculateFontSize(percentage) {
44149
+ var _c = LABEL_CONFIG.fontSizeCalculation, percentageDivisor = _c.percentageDivisor, maxPercentageForFontSize = _c.maxPercentageForFontSize;
44150
+ var calculatedSize = Math.min(percentage / percentageDivisor, maxPercentageForFontSize);
44151
+ return Math.max(LABEL_CONFIG.minFontSize, Math.min(calculatedSize, LABEL_CONFIG.maxFontSize));
44152
+ }
44153
+ function getTextMetrics(ctx, text, fontSize) {
44154
+ ctx.font = "normal " + fontSize + "px sans-serif";
44155
+ var metrics = ctx.measureText(text);
44156
+ var height = metrics.actualBoundingBoxAscent + metrics.actualBoundingBoxDescent || LABEL_CONFIG.defaultFontSize;
44157
+ return {
44158
+ width: metrics.width,
44159
+ height: height
44160
+ };
44161
+ }
44162
+ function prepareCanvasForText(ctx, fontSize, color) {
44163
+ ctx.font = "bold " + fontSize + "px sans-serif";
44164
+ ctx.textAlign = 'center';
44165
+ ctx.textBaseline = 'middle';
44166
+ ctx.fillStyle = color;
44167
+ }
44168
+ function extractLabelData(dataset, index, totalSum, chart) {
44169
+ var value = dataset.data[index];
44170
+ var percentage = calculatePercentage(value, totalSum);
44171
+ var isVisible = chart.getDataVisibility(index);
44172
+ if (!percentage || !isVisible) {
44173
+ return null;
44174
+ }
44175
+ return {
44176
+ text: percentage.toFixed(1) + "%",
44177
+ percentage: percentage,
44178
+ backgroundColor: Array.isArray(dataset.backgroundColor) ? dataset.backgroundColor[index] : dataset.backgroundColor,
44179
+ isVisible: isVisible
44180
+ };
44181
+ }
44182
+ // Bar chart implementation
44026
44183
  function barChartLabels(chart) {
44027
44184
  var _a;
44028
- var ctx = chart.ctx, data = chart.data;
44185
+ var ctx = chart.ctx;
44029
44186
  var isHorizontalChart = ((_a = chart.options) === null || _a === void 0 ? void 0 : _a.indexAxis) === 'y';
44030
- var isHorizontalReversed = isBarChartReversed(chart).isHorizontalReversed;
44187
+ var isHorizontalReversed = getBarChartOrientation(chart).isHorizontalReversed;
44031
44188
  chart.data.datasets.forEach(function (dataset, datasetIndex) {
44032
44189
  var meta = chart.getDatasetMeta(datasetIndex);
44033
- var totalSum = dataset.data.reduce(function (sum, currentValue) { return sum + currentValue; }, 0);
44190
+ var totalSum = dataset.data.reduce(function (sum, value) { return sum + value; }, 0);
44034
44191
  meta.data.forEach(function (dataPoint, index) {
44035
44192
  if (!dataPoint)
44036
44193
  return;
44037
- var percentage = (dataset.data[index] / totalSum) * 100;
44038
- var isVisible = chart.getDataVisibility(index);
44039
- if (!percentage || !isVisible) {
44194
+ var labelData = extractLabelData(dataset, index, totalSum, chart);
44195
+ if (!labelData)
44040
44196
  return;
44041
- }
44042
- var bgColor = dataset.backgroundColor[index];
44043
- var textColor = getTextColor(bgColor);
44044
- var fontSize = Math.max(12, Math.min(percentage / 2, 14));
44045
- ctx.textAlign = 'center';
44046
- ctx.textBaseline = 'middle';
44047
- ctx.font = "normal " + fontSize + "px sans-serif";
44048
- ctx.fillStyle = textColor;
44049
- var text = percentage.toFixed() + "%";
44050
- var _c = getTextMetrics(ctx, text), width = _c.width, height = _c.height;
44051
- var textHeight = height || 12;
44052
- var textWidth = width || 30;
44053
- if (isHorizontalChart) {
44054
- if ((dataPoint === null || dataPoint === void 0 ? void 0 : dataPoint.width) > 0) {
44055
- var textPadding = 20;
44056
- var offset = textPadding + textWidth <= dataPoint.width ? textWidth : textWidth >= dataPoint.width ? 0 : 10;
44057
- var x = dataPoint.x + (isHorizontalReversed ? offset : -offset);
44058
- ctx.fillStyle = dataPoint.width <= textWidth ? getColor('--chart-value-default-color', '#000') : textColor;
44059
- if (percentage) {
44060
- ctx.fillText(text, x, dataPoint.y);
44061
- }
44062
- }
44063
- }
44064
- else {
44065
- if ((dataPoint === null || dataPoint === void 0 ? void 0 : dataPoint.height) > 0) {
44066
- var y = textHeight >= dataPoint.height ? dataPoint.y - 10 : dataPoint.y + 10;
44067
- ctx.fillStyle = textHeight >= dataPoint.height ? getColor('--chart-value-default-color', '#000') : textColor;
44068
- if (!percentage) {
44069
- return;
44070
- }
44071
- ctx.fillText(text, dataPoint.x, y);
44072
- }
44197
+ var fontSize = calculateFontSize(labelData.percentage);
44198
+ var textMetrics = getTextMetrics(ctx, labelData.text, fontSize);
44199
+ var position = calculateBarLabelPosition(dataPoint, textMetrics, isHorizontalChart, isHorizontalReversed, labelData.backgroundColor);
44200
+ if (position) {
44201
+ prepareCanvasForText(ctx, fontSize, position.color);
44202
+ ctx.fillText(labelData.text, position.x, position.y);
44073
44203
  }
44074
44204
  });
44075
44205
  });
44076
44206
  }
44077
- function doughnutChartLabels(chart) {
44078
- var ctx = chart.ctx, data = chart.data;
44079
- chart.data.datasets.forEach(function (dataset, datasetIndex) {
44080
- var meta = chart.getDatasetMeta(datasetIndex);
44081
- var totalSum = dataset.data.reduce(function (sum, currentValue) { return sum + currentValue; }, 0);
44082
- meta.data.forEach(function (arc, index) {
44083
- if (!arc)
44084
- return;
44085
- var percentage = (dataset.data[index] / totalSum) * 100;
44086
- var isVisible = chart.getDataVisibility(index);
44087
- if (!percentage || !isVisible) {
44088
- return;
44089
- }
44090
- var midAngle = (arc.startAngle + arc.endAngle) / 2;
44091
- var x = arc.x + Math.cos(midAngle) * (arc.outerRadius / 1.2);
44092
- var y = arc.y + Math.sin(midAngle) * (arc.outerRadius / 1.2);
44093
- var fontSize = Math.max(12, Math.min(percentage / 2, 14));
44094
- var bgColor = dataset.backgroundColor[index] || '#00000';
44095
- prepareText(ctx, fontSize, bgColor);
44096
- ctx.fillText(percentage.toFixed() + "%", x, y);
44097
- });
44098
- });
44207
+ function calculateBarLabelPosition(dataPoint, textMetrics, isHorizontal, isReversed, backgroundColor) {
44208
+ var textPadding = LABEL_CONFIG.textPadding;
44209
+ if (isHorizontal) {
44210
+ var fitsInside = textMetrics.width + textPadding * 2 <= dataPoint.width;
44211
+ if (fitsInside) {
44212
+ return {
44213
+ x: dataPoint.x + (isReversed ? textMetrics.width / 2 : -textMetrics.width / 2),
44214
+ y: dataPoint.y,
44215
+ color: getTextColor(backgroundColor)
44216
+ };
44217
+ }
44218
+ else {
44219
+ return {
44220
+ x: dataPoint.x + (isReversed ? -textMetrics.width / 2 - textPadding : textMetrics.width / 2 + textPadding),
44221
+ y: dataPoint.y,
44222
+ color: getColor('--chart-value-default-color', '#000')
44223
+ };
44224
+ }
44225
+ }
44226
+ else {
44227
+ var fitsInside = textMetrics.height + textPadding * 2 <= dataPoint.height;
44228
+ if (fitsInside) {
44229
+ return {
44230
+ x: dataPoint.x,
44231
+ y: dataPoint.y,
44232
+ color: getTextColor(backgroundColor)
44233
+ };
44234
+ }
44235
+ else {
44236
+ return {
44237
+ x: dataPoint.x,
44238
+ y: dataPoint.y - textMetrics.height / 2 - textPadding,
44239
+ color: getColor('--chart-value-default-color', '#000')
44240
+ };
44241
+ }
44242
+ }
44099
44243
  }
44244
+ // Pie chart implementation
44100
44245
  function pieChartLabels(chart) {
44101
- var ctx = chart.ctx, data = chart.data;
44246
+ renderArcLabels(chart, 'pie');
44247
+ }
44248
+ // Doughnut chart implementation
44249
+ function doughnutChartLabels(chart) {
44250
+ renderArcLabels(chart, 'doughnut');
44251
+ }
44252
+ function renderArcLabels(chart, chartType) {
44253
+ var ctx = chart.ctx;
44102
44254
  chart.data.datasets.forEach(function (dataset, datasetIndex) {
44103
44255
  var meta = chart.getDatasetMeta(datasetIndex);
44104
- var totalSum = dataset.data.reduce(function (sum, currentValue) { return sum + currentValue; }, 0);
44256
+ var totalSum = dataset.data.reduce(function (sum, value) { return sum + value; }, 0);
44105
44257
  meta.data.forEach(function (arc, index) {
44106
44258
  if (!arc)
44107
44259
  return;
44108
- var percentage = (dataset.data[index] / totalSum) * 100;
44109
- var isVisible = chart.getDataVisibility(index);
44110
- if (!percentage || !isVisible) {
44260
+ var labelData = extractLabelData(dataset, index, totalSum, chart);
44261
+ if (!labelData)
44111
44262
  return;
44263
+ if (shouldShowArcLabel(arc, labelData.text, chartType)) {
44264
+ var position = calculateArcLabelPosition(arc, chartType);
44265
+ var fontSize = calculateFontSize(labelData.percentage);
44266
+ var textColor = getTextColor(labelData.backgroundColor || '#000000');
44267
+ prepareCanvasForText(ctx, fontSize, textColor);
44268
+ ctx.fillText(labelData.text, position.x, position.y);
44112
44269
  }
44113
- var midAngle = (arc.startAngle + arc.endAngle) / 2;
44114
- var x = arc.x + Math.cos(midAngle) * (arc.outerRadius / 1.5);
44115
- var y = arc.y + Math.sin(midAngle) * (arc.outerRadius / 1.5);
44116
- var fontSize = Math.max(12, Math.min(percentage / 2, 14));
44117
- var bgColor = dataset.backgroundColor[index] || '#00000';
44118
- prepareText(ctx, fontSize, bgColor);
44119
- ctx.fillText(percentage.toFixed() + "%", x, y);
44120
44270
  });
44121
44271
  });
44122
44272
  }
44123
- function isBarChartReversed(chart) {
44124
- var _a, _b;
44125
- var scales = chart.options.scales;
44126
- var isVerticalReversed = ((_a = scales === null || scales === void 0 ? void 0 : scales.y) === null || _a === void 0 ? void 0 : _a.reverse) === true;
44127
- var isHorizontalReversed = ((_b = scales === null || scales === void 0 ? void 0 : scales.x) === null || _b === void 0 ? void 0 : _b.reverse) === true;
44273
+ function shouldShowArcLabel(arc, text, chartType) {
44274
+ var arcAngle = Math.abs(arc.endAngle - arc.startAngle);
44275
+ // Don't show labels for very small slices
44276
+ if (arcAngle < LABEL_CONFIG.minAngleForPieLabel) {
44277
+ return false;
44278
+ }
44279
+ // For doughnut charts, also check if there's enough radial space
44280
+ if (chartType === 'doughnut') {
44281
+ var radialSpace = arc.outerRadius - arc.innerRadius;
44282
+ return radialSpace >= LABEL_CONFIG.defaultFontSize * 1.5;
44283
+ }
44284
+ return true;
44285
+ }
44286
+ function calculateArcLabelPosition(arc, chartType) {
44287
+ var midAngle = (arc.startAngle + arc.endAngle) / 2;
44288
+ var radiusMultiplier = LABEL_CONFIG.arcRadiusMultiplier[chartType];
44289
+ var radius;
44290
+ if (chartType === 'doughnut') {
44291
+ radius = (arc.outerRadius + arc.innerRadius) / 2;
44292
+ }
44293
+ else {
44294
+ radius = arc.outerRadius * radiusMultiplier;
44295
+ }
44128
44296
  return {
44129
- isVerticalReversed: isVerticalReversed,
44130
- isHorizontalReversed: isHorizontalReversed
44297
+ x: arc.x + Math.cos(midAngle) * radius,
44298
+ y: arc.y + Math.sin(midAngle) * radius
44131
44299
  };
44132
44300
  }
44133
- function getTextMetrics(ctx, text) {
44134
- var metrics = ctx.measureText(text);
44135
- var textHeight = metrics.actualBoundingBoxAscent + metrics.actualBoundingBoxDescent;
44301
+ // Utility functions
44302
+ function getBarChartOrientation(chart) {
44303
+ var _a, _b;
44304
+ var scales = chart.options.scales;
44136
44305
  return {
44137
- height: textHeight,
44138
- width: metrics.width
44306
+ isVerticalReversed: ((_a = scales === null || scales === void 0 ? void 0 : scales.y) === null || _a === void 0 ? void 0 : _a.reverse) === true,
44307
+ isHorizontalReversed: ((_b = scales === null || scales === void 0 ? void 0 : scales.x) === null || _b === void 0 ? void 0 : _b.reverse) === true
44139
44308
  };
44140
- }
44141
- function prepareText(ctx, fontSize, bgColor) {
44142
- var textColor = getTextColor(bgColor || getColor('--chart-value-default-color', '#000'));
44143
- ctx.font = "bold " + fontSize + "px sans-serif";
44144
- ctx.textAlign = 'center';
44145
- ctx.textBaseline = 'middle';
44146
- ctx.fillStyle = textColor;
44147
44309
  }
44148
44310
 
44149
44311
  var index = /*#__PURE__*/Object.freeze({
@@ -44162,9 +44324,9 @@
44162
44324
  _this.injector = injector;
44163
44325
  _this._translateService = _this.injector.get(i1.TranslateService);
44164
44326
  _this._rebuildTriggerSub = new rxjs.BehaviorSubject(false);
44165
- _this._dataSub = new rxjs.ReplaySubject(null);
44166
44327
  _this._configSub = new rxjs.ReplaySubject(null);
44167
44328
  _this._isInitialized = false;
44329
+ _this._dataSub = new rxjs.ReplaySubject(null);
44168
44330
  _this.onReady = new i0.EventEmitter();
44169
44331
  _this._subscribeToLanguage();
44170
44332
  return _this;
@@ -44385,7 +44547,9 @@
44385
44547
  });
44386
44548
  this._charts.clear();
44387
44549
  };
44388
- ChartManagerService.prototype.printChart = function (id, label) {
44550
+ ChartManagerService.prototype.printChart = function (id, label, options, plugins) {
44551
+ if (options === void 0) { options = {}; }
44552
+ if (plugins === void 0) { plugins = []; }
44389
44553
  return __awaiter(this, void 0, void 0, function () {
44390
44554
  var _chart, _b, chart, destroyTempChart, imageLink, date;
44391
44555
  return __generator(this, function (_c) {
@@ -44395,7 +44559,7 @@
44395
44559
  if (!_chart) {
44396
44560
  return [2 /*return*/];
44397
44561
  }
44398
- return [4 /*yield*/, this._createHiddenCanvasForExport(_chart, label)];
44562
+ return [4 /*yield*/, this._createHiddenCanvasForExport(_chart, label, options, plugins)];
44399
44563
  case 1:
44400
44564
  _b = _c.sent(), chart = _b.chart, destroyTempChart = _b.destroy;
44401
44565
  if (!chart) {
@@ -44412,8 +44576,10 @@
44412
44576
  });
44413
44577
  });
44414
44578
  };
44415
- ChartManagerService.prototype._createHiddenCanvasForExport = function (chart, label) {
44579
+ ChartManagerService.prototype._createHiddenCanvasForExport = function (chart, label, options, plugins) {
44416
44580
  var _this = this;
44581
+ if (options === void 0) { options = {}; }
44582
+ if (plugins === void 0) { plugins = []; }
44417
44583
  var currentLang = this._translateService.currentLang;
44418
44584
  return new Promise(function (resolve) {
44419
44585
  var _a;
@@ -44429,9 +44595,13 @@
44429
44595
  var hiddenChart = new Chart.Chart(hiddenCanvas, {
44430
44596
  type: (_a = chart.config) === null || _a === void 0 ? void 0 : _a.type,
44431
44597
  data: chart.config.data,
44432
- options: Object.assign(Object.assign({}, chart.config.options), { animation: false, responsive: false, layout: {
44598
+ options: ___default["default"].merge({}, chart.config.options, {
44599
+ animation: false,
44600
+ responsive: false,
44601
+ layout: {
44433
44602
  padding: padding
44434
- }, plugins: Object.assign(Object.assign({}, chart.config.options.plugins), { title: {
44603
+ },
44604
+ plugins: Object.assign(Object.assign({}, chart.config.options.plugins), { title: {
44435
44605
  display: true,
44436
44606
  text: label,
44437
44607
  padding: {
@@ -44442,8 +44612,9 @@
44442
44612
  display: true,
44443
44613
  rtl: currentLang == 'ar',
44444
44614
  position: currentLang == 'ar' ? 'right' : 'left'
44445
- } }) }),
44446
- plugins: [
44615
+ } })
44616
+ }, options),
44617
+ plugins: ___default["default"].merge([], [
44447
44618
  chartDataLabels,
44448
44619
  {
44449
44620
  id: 'canvasBackgroundColor',
@@ -44468,7 +44639,7 @@
44468
44639
  });
44469
44640
  }
44470
44641
  }
44471
- ]
44642
+ ], plugins)
44472
44643
  });
44473
44644
  hiddenChart.render();
44474
44645
  });
@@ -44495,7 +44666,7 @@
44495
44666
  }
44496
44667
  ReportTransformService.prototype._extractDataFormats = function (data) {
44497
44668
  var extractedData = ___default["default"].flatMap(data, function (item) {
44498
- if (Array.isArray(item === null || item === void 0 ? void 0 : item.datasource)) {
44669
+ if ('datasource' in item && Array.isArray(item === null || item === void 0 ? void 0 : item.datasource)) {
44499
44670
  return ___default["default"].filter(item.datasource, function (source) { return source.dataFormat; });
44500
44671
  }
44501
44672
  return [];
@@ -45543,6 +45714,8 @@
45543
45714
  function BaseReport(injector) {
45544
45715
  var _this = _super.call(this) || this;
45545
45716
  _this.injector = injector;
45717
+ _this._translateService = _this.injector.get(i1.TranslateService);
45718
+ _this._cdr = _this.injector.get(i0.ChangeDetectorRef);
45546
45719
  _this._configMapperService = _this.injector.get(ReportConfigMapperService);
45547
45720
  _this._configSub = new rxjs.BehaviorSubject(null);
45548
45721
  _this.config$ = _this._configSub.asObservable();
@@ -45616,6 +45789,203 @@
45616
45789
  type: i0.Output
45617
45790
  }] } });
45618
45791
 
45792
+ var ReportsDialogService = /** @class */ (function () {
45793
+ function ReportsDialogService(injector) {
45794
+ this.injector = injector;
45795
+ this._translateService = this.injector.get(i1.TranslateService);
45796
+ this._dialog = this.injector.get(i1$4.MatDialog);
45797
+ }
45798
+ ReportsDialogService.prototype.open = function (component, options) {
45799
+ var config = options.config, data = options.data, criteria = options.criteria, direction = options.direction;
45800
+ var _a = (config === null || config === void 0 ? void 0 : config.dialog) || {}, active = _a.active, width = _a.width, height = _a.height, maxWidth = _a.maxWidth, resetOptions = __rest(_a, ["active", "width", "height", "maxWidth"]);
45801
+ this._dialog.open(component, Object.assign(Object.assign({}, resetOptions), { width: width || '100%', height: height || '100%', maxWidth: maxWidth || '100%', direction: direction, data: {
45802
+ config: config,
45803
+ data: data,
45804
+ title: config.label,
45805
+ direction: direction,
45806
+ criteria: criteria
45807
+ } }));
45808
+ };
45809
+ return ReportsDialogService;
45810
+ }());
45811
+ ReportsDialogService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ReportsDialogService, deps: [{ token: i0__namespace.Injector }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
45812
+ ReportsDialogService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ReportsDialogService, providedIn: 'root' });
45813
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ReportsDialogService, decorators: [{
45814
+ type: i0.Injectable,
45815
+ args: [{
45816
+ providedIn: 'root'
45817
+ }]
45818
+ }], ctorParameters: function () { return [{ type: i0__namespace.Injector }]; } });
45819
+
45820
+ var BaseGraphReport = /** @class */ (function (_super) {
45821
+ __extends(BaseGraphReport, _super);
45822
+ function BaseGraphReport() {
45823
+ var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
45824
+ _this._dialog = _this.injector.get(ReportsDialogService);
45825
+ return _this;
45826
+ }
45827
+ BaseGraphReport.prototype.openGraphDialog = function (component) {
45828
+ if (component === void 0) { component = GraphChartComponent; }
45829
+ this._dialog.open(component, {
45830
+ config: this.config,
45831
+ data: this.data,
45832
+ criteria: this.criteria,
45833
+ direction: this.direction
45834
+ });
45835
+ };
45836
+ return BaseGraphReport;
45837
+ }(BaseReport));
45838
+ BaseGraphReport.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: BaseGraphReport, deps: null, target: i0__namespace.ɵɵFactoryTarget.Directive });
45839
+ BaseGraphReport.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: BaseGraphReport, usesInheritance: true, ngImport: i0__namespace });
45840
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: BaseGraphReport, decorators: [{
45841
+ type: i0.Directive
45842
+ }] });
45843
+
45844
+ var BaseCustomReport = /** @class */ (function (_super) {
45845
+ __extends(BaseCustomReport, _super);
45846
+ function BaseCustomReport(injector) {
45847
+ var _this = _super.call(this) || this;
45848
+ _this.injector = injector;
45849
+ _this._chartHelperService = _this.injector.get(ChartManagerService);
45850
+ _this.direction = 'rtl';
45851
+ _this._dataSub = new rxjs.ReplaySubject(null);
45852
+ _this._criteriaSub = new rxjs.ReplaySubject(null);
45853
+ _this.criteria$ = _this._criteriaSub.asObservable();
45854
+ _this._configSub = new rxjs.BehaviorSubject(null);
45855
+ _this.config$ = _this._configSub.asObservable();
45856
+ return _this;
45857
+ }
45858
+ Object.defineProperty(BaseCustomReport.prototype, "data", {
45859
+ get: function () {
45860
+ return this._data;
45861
+ },
45862
+ set: function (data) {
45863
+ this._data = data;
45864
+ this._dataSub.next(data);
45865
+ },
45866
+ enumerable: false,
45867
+ configurable: true
45868
+ });
45869
+ Object.defineProperty(BaseCustomReport.prototype, "criteria", {
45870
+ get: function () {
45871
+ return this._criteria;
45872
+ },
45873
+ set: function (value) {
45874
+ this._criteria = ___default["default"].cloneDeep(value);
45875
+ this._criteriaSub.next(this._criteria);
45876
+ },
45877
+ enumerable: false,
45878
+ configurable: true
45879
+ });
45880
+ Object.defineProperty(BaseCustomReport.prototype, "config", {
45881
+ get: function () {
45882
+ return this._configSub.getValue();
45883
+ },
45884
+ set: function (obj) {
45885
+ if (obj) {
45886
+ this._configSub.next(obj);
45887
+ }
45888
+ },
45889
+ enumerable: false,
45890
+ configurable: true
45891
+ });
45892
+ BaseCustomReport.prototype.chartReady = function (chart) {
45893
+ var _this = this;
45894
+ this.chart = chart;
45895
+ this._chartHelperService.setChart(chart);
45896
+ this._printListener = function (event) {
45897
+ _this.chart.resize();
45898
+ };
45899
+ window.addEventListener('beforeprint', this._printListener);
45900
+ queueMicrotask(function () {
45901
+ _this.chart.resize();
45902
+ });
45903
+ };
45904
+ return BaseCustomReport;
45905
+ }(DestroySubject));
45906
+ BaseCustomReport.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: BaseCustomReport, deps: [{ token: i0__namespace.Injector }], target: i0__namespace.ɵɵFactoryTarget.Directive });
45907
+ BaseCustomReport.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: BaseCustomReport, inputs: { direction: "direction", definition: "definition", data: "data", criteria: "criteria", config: "config" }, usesInheritance: true, ngImport: i0__namespace });
45908
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: BaseCustomReport, decorators: [{
45909
+ type: i0.Directive
45910
+ }], ctorParameters: function () { return [{ type: i0__namespace.Injector }]; }, propDecorators: { direction: [{
45911
+ type: i0.Input
45912
+ }], definition: [{
45913
+ type: i0.Input
45914
+ }], data: [{
45915
+ type: i0.Input
45916
+ }], criteria: [{
45917
+ type: i0.Input
45918
+ }], config: [{
45919
+ type: i0.Input
45920
+ }] } });
45921
+
45922
+ var CustomChartComponent = /** @class */ (function (_super) {
45923
+ __extends(CustomChartComponent, _super);
45924
+ function CustomChartComponent() {
45925
+ var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
45926
+ _this._registeredComponents = _this.injector.get(CustomReportsRegistry);
45927
+ return _this;
45928
+ }
45929
+ CustomChartComponent.prototype.ngOnInit = function () {
45930
+ var _this = this;
45931
+ var _a, _b;
45932
+ var componentType = this._registeredComponents.getComponent((_a = this.config) === null || _a === void 0 ? void 0 : _a.type);
45933
+ if (!componentType) {
45934
+ console.warn("No component registered for type: " + ((_b = this.config) === null || _b === void 0 ? void 0 : _b.type));
45935
+ return;
45936
+ }
45937
+ this._componentRef = this._registeredComponents.renderComponent(componentType.type, this.container);
45938
+ rxjs.combineLatest([this._dataSub.asObservable(), this._configSub.asObservable(), this._criteriaSub.asObservable()])
45939
+ .pipe(operators.takeUntil(this.destroy$))
45940
+ .subscribe(function (res) {
45941
+ _this._prepareComponent();
45942
+ });
45943
+ };
45944
+ CustomChartComponent.prototype.ngOnChanges = function (changes) {
45945
+ var _this = this;
45946
+ if (!this._componentRef) {
45947
+ return;
45948
+ }
45949
+ Object.keys(changes).forEach(function (key) {
45950
+ _this._componentRef.instance[key] = changes[key].currentValue;
45951
+ });
45952
+ this._componentRef.changeDetectorRef.detectChanges();
45953
+ };
45954
+ CustomChartComponent.prototype.ngOnDestroy = function () {
45955
+ if (this._componentRef) {
45956
+ this._componentRef.destroy();
45957
+ }
45958
+ };
45959
+ CustomChartComponent.prototype._prepareComponent = function () {
45960
+ var instance = this._componentRef.instance;
45961
+ instance.config = this.config;
45962
+ instance.criteria = this.criteria;
45963
+ instance.data = this.data;
45964
+ instance.direction = this.direction;
45965
+ this._componentRef.changeDetectorRef.detectChanges();
45966
+ };
45967
+ CustomChartComponent.prototype.print = function () {
45968
+ var instance = this._componentRef.instance;
45969
+ if (instance) {
45970
+ instance.print();
45971
+ }
45972
+ };
45973
+ return CustomChartComponent;
45974
+ }(BaseCustomReport));
45975
+ CustomChartComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: CustomChartComponent, deps: null, target: i0__namespace.ɵɵFactoryTarget.Component });
45976
+ CustomChartComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: CustomChartComponent, selector: "app-custom-chart", viewQueries: [{ propertyName: "container", first: true, predicate: ["dynamicContainer"], descendants: true, read: i0.ViewContainerRef, static: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0__namespace, template: '<ng-container #dynamicContainer></ng-container>', isInline: true, styles: [""] });
45977
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: CustomChartComponent, decorators: [{
45978
+ type: i0.Component,
45979
+ args: [{
45980
+ selector: 'app-custom-chart',
45981
+ template: '<ng-container #dynamicContainer></ng-container>',
45982
+ styleUrls: ['./custom-chart.component.scss']
45983
+ }]
45984
+ }], propDecorators: { container: [{
45985
+ type: i0.ViewChild,
45986
+ args: ['dynamicContainer', { read: i0.ViewContainerRef, static: true }]
45987
+ }] } });
45988
+
45619
45989
  var ChartPanel = /** @class */ (function () {
45620
45990
  function ChartPanel() {
45621
45991
  }
@@ -45841,6 +46211,58 @@
45841
46211
  type: i0.Output
45842
46212
  }] } });
45843
46213
 
46214
+ var GraphReportComponent = /** @class */ (function (_super) {
46215
+ __extends(GraphReportComponent, _super);
46216
+ function GraphReportComponent() {
46217
+ var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
46218
+ _this.chartType$ = _this.config$.pipe(operators.map(function (config) {
46219
+ var _a, _b;
46220
+ if (config.chart.type !== 'bar') {
46221
+ return config.chart.type;
46222
+ }
46223
+ return ((_b = (_a = config.chart) === null || _a === void 0 ? void 0 : _a.options) === null || _b === void 0 ? void 0 : _b.indexAxis) == 'y' ? CHARTS_TYPES.horizontalBar : CHARTS_TYPES.verticalBar;
46224
+ }));
46225
+ return _this;
46226
+ }
46227
+ GraphReportComponent.prototype.changeChartType = function (type) {
46228
+ var _d;
46229
+ var _a, _b;
46230
+ var _c = this._configSub.getValue(), chart = _c.chart, config = __rest(_c, ["chart"]);
46231
+ var options = chart.options, chartConfig = __rest(chart, ["options"]);
46232
+ if (config.mode !== REPORT_MODE.graph) {
46233
+ return;
46234
+ }
46235
+ var barTypes = (_d = {},
46236
+ _d[CHARTS_TYPES.horizontalBar] = 'bar',
46237
+ _d[CHARTS_TYPES.verticalBar] = 'bar',
46238
+ _d);
46239
+ var chartType = (_a = barTypes[type]) !== null && _a !== void 0 ? _a : type;
46240
+ this._configSub.next(Object.assign(Object.assign({}, config), { chart: Object.assign(Object.assign({}, chartConfig), { type: chartType, options: (_b = chart.overrides) === null || _b === void 0 ? void 0 : _b[type] }) }));
46241
+ };
46242
+ GraphReportComponent.prototype.printChart = function () {
46243
+ if (this.graphChartComponent) {
46244
+ this.graphChartComponent.printChart();
46245
+ }
46246
+ };
46247
+ return GraphReportComponent;
46248
+ }(BaseGraphReport));
46249
+ GraphReportComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: GraphReportComponent, deps: null, target: i0__namespace.ɵɵFactoryTarget.Component });
46250
+ GraphReportComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: GraphReportComponent, selector: "app-graph-report", host: { classAttribute: "graph-report flex flex-col flex-grow" }, viewQueries: [{ propertyName: "graphChartComponent", first: true, predicate: ["graphChart"], descendants: true }], usesInheritance: true, ngImport: i0__namespace, template: "<chart-panel *ngIf=\"config$ | async as config\" class=\"ndf-report chart-report\">\r\n\t<chart-panel-header class=\"ndf-report__header mb-3\">\r\n\t\t<span>\r\n\t\t\t{{ config.label | translate }}\r\n\t\t</span>\r\n\t\t<button\r\n\t\t\t*ngIf=\"config?.dialog?.active\"\r\n\t\t\tclass=\"dialog-button print:hidden\"\r\n\t\t\t(click)=\"openGraphDialog()\"\r\n\t\t\t[matTooltip]=\"'REPORTS.fullscreen' | translate\"\r\n\t\t>\r\n\t\t\t<mat-icon>fullscreen</mat-icon>\r\n\t\t</button>\r\n\t</chart-panel-header>\r\n\r\n\t<app-graph-chart\r\n\t\t#graphChart\r\n\t\tclass=\"ndf-report__content graph-chart\"\r\n\t\t[config]=\"config\"\r\n\t\t[data]=\"data\"\r\n\t></app-graph-chart>\r\n\r\n\t<chart-panel-footer class=\"ndf-report__footer flex-wrap\">\r\n\t\t<app-report-actions\r\n\t\t\t[config]=\"config\"\r\n\t\t\t(print)=\"printChart()\"\r\n\t\t\t(navigate)=\"navigate()\"\r\n\t\t\t(open)=\"onOpen.emit(null)\"\r\n\t\t></app-report-actions>\r\n\r\n\t\t<chart-type-selector\r\n [config]=\"config?.typeConfig\"\r\n\t\t\t[direction]=\"direction\"\r\n\t\t\t[type]=\"chartType$ | async\"\r\n\t\t\t(typeChange)=\"changeChartType($event)\"\r\n\t\t></chart-type-selector>\r\n\t</chart-panel-footer>\r\n</chart-panel>\r\n", styles: [".ndf-report{display:flex;flex-direction:column;min-width:0;max-width:100%;flex-grow:1}.ndf-report__content{position:relative;padding-block:.5rem;flex-grow:1;min-width:0;max-width:100%}.chart-actions{border:var(--chart-actions-border, 1px solid var(--border-color))}.chart-actions__item{background:var(--chart-actions-background, transparent);color:var(--chart-actions-color, currentColor);box-shadow:var(--chart-actions-shadow, unset);width:var(--chart-actions-width, 35px);height:var(--chart-actions-height, 35px);border-radius:var(--chart-actions-border-radius, 4px);flex-grow:1;display:grid;place-items:center}.chart-actions__item .mat-icon{color:var(--main-color, currentColor)}.chart-actions__item:hover{--chart-actions-shadow: var(--chart-actions-hover-shadow, 0 0 0 1px var(--main-color))}.chart-actions__item.selected{--chart-actions-background: var(--chart-actions-active-background, var(--main-color));--chart-actions-color: var(--chart-actions-active-color, var(--main-hover))}.chart-actions__item.selected .mat-icon{color:currentColor!important}@media print{.chart-actions{display:none}}:host{min-width:0;max-width:100%}\n"], components: [{ type: ChartPanel, selector: "chart-panel" }, { type: ChartPanelHeaderComponent, selector: "chart-panel-header" }, { type: i2__namespace$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: GraphChartComponent, selector: "app-graph-chart" }, { type: ChartPanelFooterComponent, selector: "chart-panel-footer" }, { type: ReportActionsComponent, selector: "app-report-actions", inputs: ["config"], outputs: ["navigate", "open", "print"] }, { type: ChartTypeSelectorComponent, selector: "chart-type-selector", inputs: ["direction", "config", "type"], outputs: ["typeChange"] }], directives: [{ type: i4__namespace$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i7__namespace.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltipPosition", "matTooltipDisabled", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }], pipes: { "async": i4__namespace$1.AsyncPipe, "translate": i1__namespace.TranslatePipe } });
46251
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: GraphReportComponent, decorators: [{
46252
+ type: i0.Component,
46253
+ args: [{
46254
+ selector: 'app-graph-report',
46255
+ templateUrl: './graph-report.component.html',
46256
+ styleUrls: ['./graph-report.component.scss'],
46257
+ host: {
46258
+ class: 'graph-report flex flex-col flex-grow'
46259
+ }
46260
+ }]
46261
+ }], propDecorators: { graphChartComponent: [{
46262
+ type: i0.ViewChild,
46263
+ args: ['graphChart']
46264
+ }] } });
46265
+
45844
46266
  var TimeGroupSelectorComponent = /** @class */ (function () {
45845
46267
  function TimeGroupSelectorComponent() {
45846
46268
  this.groups = this._prepareGroups();
@@ -45995,89 +46417,38 @@
45995
46417
  args: ['graphChart']
45996
46418
  }] } });
45997
46419
 
45998
- var BaseGraphReport = /** @class */ (function (_super) {
45999
- __extends(BaseGraphReport, _super);
46000
- function BaseGraphReport() {
46001
- var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
46002
- _this._translateService = _this.injector.get(i1.TranslateService);
46003
- _this._cdr = _this.injector.get(i0.ChangeDetectorRef);
46004
- _this._dialog = _this.injector.get(i1$4.MatDialog);
46005
- return _this;
46006
- }
46007
- BaseGraphReport.prototype.openGraphDialog = function (_options) {
46008
- var _a;
46009
- var _c = _options || {
46010
- config: this.config,
46011
- data: this.data,
46012
- component: GraphDialogComponent
46013
- }, config = _c.config, data = _c.data, component = _c.component, criteria = _c.criteria;
46014
- var _b = ((_a = this.config) === null || _a === void 0 ? void 0 : _a.dialog) || {}, active = _b.active, width = _b.width, height = _b.height, maxWidth = _b.maxWidth, options = __rest(_b, ["active", "width", "height", "maxWidth"]);
46015
- this._dialog.open(component, Object.assign(Object.assign({}, options), { width: width || '100%', height: height || '100%', maxWidth: maxWidth || '100%', direction: this.direction, data: {
46016
- config: config,
46017
- data: data,
46018
- title: config.label,
46019
- direction: this.direction,
46020
- criteria: criteria
46021
- } }));
46022
- };
46023
- return BaseGraphReport;
46024
- }(BaseReport));
46025
- BaseGraphReport.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: BaseGraphReport, deps: null, target: i0__namespace.ɵɵFactoryTarget.Directive });
46026
- BaseGraphReport.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: BaseGraphReport, usesInheritance: true, ngImport: i0__namespace });
46027
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: BaseGraphReport, decorators: [{
46028
- type: i0.Directive
46029
- }] });
46030
-
46031
- var GraphReportComponent = /** @class */ (function (_super) {
46032
- __extends(GraphReportComponent, _super);
46033
- function GraphReportComponent() {
46034
- var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
46035
- _this.chartType$ = _this.config$.pipe(operators.map(function (config) {
46036
- var _a, _b;
46037
- if (config.chart.type !== 'bar') {
46038
- return config.chart.type;
46039
- }
46040
- return ((_b = (_a = config.chart) === null || _a === void 0 ? void 0 : _a.options) === null || _b === void 0 ? void 0 : _b.indexAxis) == 'y' ? CHARTS_TYPES.horizontalBar : CHARTS_TYPES.verticalBar;
46041
- }));
46042
- return _this;
46420
+ var CustomChartDialogComponent = /** @class */ (function () {
46421
+ function CustomChartDialogComponent(dialogRef, chart) {
46422
+ this.dialogRef = dialogRef;
46423
+ this.chart = chart;
46043
46424
  }
46044
- GraphReportComponent.prototype.changeChartType = function (type) {
46045
- var _d;
46046
- var _a, _b;
46047
- var _c = this._configSub.getValue(), chart = _c.chart, config = __rest(_c, ["chart"]);
46048
- var options = chart.options, chartConfig = __rest(chart, ["options"]);
46049
- if (config.mode !== REPORT_MODE.graph) {
46050
- return;
46051
- }
46052
- var barTypes = (_d = {},
46053
- _d[CHARTS_TYPES.horizontalBar] = 'bar',
46054
- _d[CHARTS_TYPES.verticalBar] = 'bar',
46055
- _d);
46056
- var chartType = (_a = barTypes[type]) !== null && _a !== void 0 ? _a : type;
46057
- this._configSub.next(Object.assign(Object.assign({}, config), { chart: Object.assign(Object.assign({}, chartConfig), { type: chartType, options: (_b = chart.overrides) === null || _b === void 0 ? void 0 : _b[type] }) }));
46425
+ CustomChartDialogComponent.prototype.close = function () {
46426
+ this.dialogRef.close();
46058
46427
  };
46059
- GraphReportComponent.prototype.printChart = function () {
46060
- if (this.graphChartComponent) {
46061
- this.graphChartComponent.printChart();
46428
+ CustomChartDialogComponent.prototype.printChart = function () {
46429
+ if (this.customChartComponent) {
46430
+ this.customChartComponent.print();
46062
46431
  }
46063
46432
  };
46064
- return GraphReportComponent;
46065
- }(BaseGraphReport));
46066
- GraphReportComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: GraphReportComponent, deps: null, target: i0__namespace.ɵɵFactoryTarget.Component });
46067
- GraphReportComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: GraphReportComponent, selector: "app-graph-report", host: { classAttribute: "graph-report flex flex-col flex-grow" }, viewQueries: [{ propertyName: "graphChartComponent", first: true, predicate: ["graphChart"], descendants: true }], usesInheritance: true, ngImport: i0__namespace, template: "<chart-panel *ngIf=\"config$ | async as config\" class=\"ndf-report chart-report\">\r\n\t<chart-panel-header class=\"ndf-report__header mb-3\">\r\n\t\t<span>\r\n\t\t\t{{ config.label | translate }}\r\n\t\t</span>\r\n\t\t<button\r\n\t\t\t*ngIf=\"config?.dialog?.active\"\r\n\t\t\tclass=\"dialog-button print:hidden\"\r\n\t\t\t(click)=\"openGraphDialog()\"\r\n\t\t\t[matTooltip]=\"'REPORTS.fullscreen' | translate\"\r\n\t\t>\r\n\t\t\t<mat-icon>fullscreen</mat-icon>\r\n\t\t</button>\r\n\t</chart-panel-header>\r\n\r\n\t<app-graph-chart\r\n\t\t#graphChart\r\n\t\tclass=\"ndf-report__content graph-chart\"\r\n\t\t[config]=\"config\"\r\n\t\t[data]=\"data\"\r\n\t></app-graph-chart>\r\n\r\n\t<chart-panel-footer class=\"ndf-report__footer flex-wrap\">\r\n\t\t<app-report-actions\r\n\t\t\t[config]=\"config\"\r\n\t\t\t(print)=\"printChart()\"\r\n\t\t\t(navigate)=\"navigate()\"\r\n\t\t\t(open)=\"onOpen.emit(null)\"\r\n\t\t></app-report-actions>\r\n\r\n\t\t<chart-type-selector\r\n [config]=\"config?.typeConfig\"\r\n\t\t\t[direction]=\"direction\"\r\n\t\t\t[type]=\"chartType$ | async\"\r\n\t\t\t(typeChange)=\"changeChartType($event)\"\r\n\t\t></chart-type-selector>\r\n\t</chart-panel-footer>\r\n</chart-panel>\r\n", styles: [".ndf-report{display:flex;flex-direction:column;min-width:0;max-width:100%;flex-grow:1}.ndf-report__content{position:relative;padding-block:.5rem;flex-grow:1;min-width:0;max-width:100%}.chart-actions{border:var(--chart-actions-border, 1px solid var(--border-color))}.chart-actions__item{background:var(--chart-actions-background, transparent);color:var(--chart-actions-color, currentColor);box-shadow:var(--chart-actions-shadow, unset);width:var(--chart-actions-width, 35px);height:var(--chart-actions-height, 35px);border-radius:var(--chart-actions-border-radius, 4px);flex-grow:1;display:grid;place-items:center}.chart-actions__item .mat-icon{color:var(--main-color, currentColor)}.chart-actions__item:hover{--chart-actions-shadow: var(--chart-actions-hover-shadow, 0 0 0 1px var(--main-color))}.chart-actions__item.selected{--chart-actions-background: var(--chart-actions-active-background, var(--main-color));--chart-actions-color: var(--chart-actions-active-color, var(--main-hover))}.chart-actions__item.selected .mat-icon{color:currentColor!important}@media print{.chart-actions{display:none}}:host{min-width:0;max-width:100%}\n"], components: [{ type: ChartPanel, selector: "chart-panel" }, { type: ChartPanelHeaderComponent, selector: "chart-panel-header" }, { type: i2__namespace$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: GraphChartComponent, selector: "app-graph-chart" }, { type: ChartPanelFooterComponent, selector: "chart-panel-footer" }, { type: ReportActionsComponent, selector: "app-report-actions", inputs: ["config"], outputs: ["navigate", "open", "print"] }, { type: ChartTypeSelectorComponent, selector: "chart-type-selector", inputs: ["direction", "config", "type"], outputs: ["typeChange"] }], directives: [{ type: i4__namespace$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i7__namespace.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltipPosition", "matTooltipDisabled", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }], pipes: { "async": i4__namespace$1.AsyncPipe, "translate": i1__namespace.TranslatePipe } });
46068
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: GraphReportComponent, decorators: [{
46433
+ return CustomChartDialogComponent;
46434
+ }());
46435
+ CustomChartDialogComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: CustomChartDialogComponent, deps: [{ token: i1__namespace$3.MatDialogRef }, { token: i1$4.MAT_DIALOG_DATA }], target: i0__namespace.ɵɵFactoryTarget.Component });
46436
+ CustomChartDialogComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: CustomChartDialogComponent, selector: "app-custom-chart-dialog", viewQueries: [{ propertyName: "customChartComponent", first: true, predicate: ["customChart"], descendants: true }], ngImport: i0__namespace, template: "<ndf-nuxeo-dialog dialogTitle=\"{{ chart?.title | translate }}\">\r\n\t<ng-template #contentTemplate>\r\n\t\t<app-custom-chart\r\n\t\t\t#customChart\r\n\t\t\tclass=\"ndf-report__content graph-chart\"\r\n\t\t\t[config]=\"config\"\r\n\t\t\t[data]=\"data\"\r\n\t\t\t[criteria]=\"criteria\"\r\n\t\t\t[direction]=\"direction\"\r\n\t\t></app-custom-chart>\r\n\t</ng-template>\r\n\t<ng-template #footerTemplate>\r\n\t\t<div class=\"flex gap-x-4\">\r\n\t\t\t<div class=\"chart-actions flex items-center rounded-lg gap-2 p-1\">\r\n\t\t\t\t<button\r\n\t\t\t\t\tclass=\"print-button chart-actions__item rounded\"\r\n\t\t\t\t\t(click)=\"printChart()\"\r\n\t\t\t\t\t[matTooltip]=\"'REPORTS.print' | translate\"\r\n\t\t\t\t\t*ngIf=\"chart.config?.print\"\r\n\t\t\t\t>\r\n\t\t\t\t\t<mat-icon>print</mat-icon>\r\n\t\t\t\t</button>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t</ng-template>\r\n</ndf-nuxeo-dialog>\r\n", styles: [""], components: [{ type: NdfNuxeoDialog, selector: "ndf-nuxeo-dialog", inputs: ["dialogTitle", "subTitle", "panelClass", "loaderMode"] }, { type: CustomChartComponent, selector: "app-custom-chart" }, { type: i2__namespace$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], directives: [{ type: i4__namespace$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i7__namespace.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltipPosition", "matTooltipDisabled", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }], pipes: { "translate": i1__namespace.TranslatePipe } });
46437
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: CustomChartDialogComponent, decorators: [{
46069
46438
  type: i0.Component,
46070
46439
  args: [{
46071
- selector: 'app-graph-report',
46072
- templateUrl: './graph-report.component.html',
46073
- styleUrls: ['./graph-report.component.scss'],
46074
- host: {
46075
- class: 'graph-report flex flex-col flex-grow'
46076
- }
46440
+ selector: 'app-custom-chart-dialog',
46441
+ templateUrl: './custom-chart-dialog.component.html',
46442
+ styleUrls: ['./custom-chart-dialog.component.scss']
46077
46443
  }]
46078
- }], propDecorators: { graphChartComponent: [{
46444
+ }], ctorParameters: function () {
46445
+ return [{ type: i1__namespace$3.MatDialogRef }, { type: undefined, decorators: [{
46446
+ type: i0.Inject,
46447
+ args: [i1$4.MAT_DIALOG_DATA]
46448
+ }] }];
46449
+ }, propDecorators: { customChartComponent: [{
46079
46450
  type: i0.ViewChild,
46080
- args: ['graphChart']
46451
+ args: ['customChart']
46081
46452
  }] } });
46082
46453
 
46083
46454
  var DynamicTimelineReportComponent = /** @class */ (function (_super) {
@@ -46113,11 +46484,7 @@
46113
46484
  this._timelineService.changeGroup(group);
46114
46485
  };
46115
46486
  DynamicTimelineReportComponent.prototype.openTimelineDialog = function () {
46116
- this.openGraphDialog({
46117
- config: this.config,
46118
- data: this.data,
46119
- component: TimelineDialogComponent
46120
- });
46487
+ this.openGraphDialog(TimelineDialogComponent);
46121
46488
  };
46122
46489
  DynamicTimelineReportComponent.prototype.openDetails = function () {
46123
46490
  this.onOpen.emit(this._timelineService.payload);
@@ -46143,110 +46510,30 @@
46143
46510
  args: ['graphChart']
46144
46511
  }] } });
46145
46512
 
46146
- var BaseCustomReport = /** @class */ (function (_super) {
46147
- __extends(BaseCustomReport, _super);
46148
- function BaseCustomReport(injector) {
46149
- var _this = _super.call(this) || this;
46150
- _this.injector = injector;
46151
- _this._chartHelperService = _this.injector.get(ChartManagerService);
46152
- _this.direction = 'rtl';
46153
- _this._criteriaSub = new rxjs.ReplaySubject(null);
46154
- _this.criteria$ = _this._criteriaSub.asObservable();
46155
- _this._configSub = new rxjs.BehaviorSubject(null);
46156
- _this.config$ = _this._configSub.asObservable();
46157
- return _this;
46158
- }
46159
- Object.defineProperty(BaseCustomReport.prototype, "criteria", {
46160
- set: function (value) {
46161
- this._criteria = ___default["default"].cloneDeep(value);
46162
- this._criteriaSub.next(this._criteria);
46163
- },
46164
- enumerable: false,
46165
- configurable: true
46166
- });
46167
- Object.defineProperty(BaseCustomReport.prototype, "config", {
46168
- get: function () {
46169
- return this._configSub.getValue();
46170
- },
46171
- set: function (obj) {
46172
- if (obj) {
46173
- this._configSub.next(obj);
46174
- }
46175
- },
46176
- enumerable: false,
46177
- configurable: true
46178
- });
46179
- BaseCustomReport.prototype.chartReady = function (chart) {
46180
- var _this = this;
46181
- this.chart = chart;
46182
- this._chartHelperService.setChart(chart);
46183
- this._printListener = function (event) {
46184
- _this.chart.resize();
46185
- };
46186
- window.addEventListener('beforeprint', this._printListener);
46187
- queueMicrotask(function () {
46188
- _this.chart.resize();
46189
- });
46190
- };
46191
- return BaseCustomReport;
46192
- }(DestroySubject));
46193
- BaseCustomReport.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: BaseCustomReport, deps: [{ token: i0__namespace.Injector }], target: i0__namespace.ɵɵFactoryTarget.Directive });
46194
- BaseCustomReport.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: BaseCustomReport, inputs: { direction: "direction", data: "data", criteria: "criteria", config: "config" }, usesInheritance: true, ngImport: i0__namespace });
46195
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: BaseCustomReport, decorators: [{
46196
- type: i0.Directive
46197
- }], ctorParameters: function () { return [{ type: i0__namespace.Injector }]; }, propDecorators: { direction: [{
46198
- type: i0.Input
46199
- }], data: [{
46200
- type: i0.Input
46201
- }], criteria: [{
46202
- type: i0.Input
46203
- }], config: [{
46204
- type: i0.Input
46205
- }] } });
46206
-
46207
46513
  var CustomReportComponent = /** @class */ (function (_super) {
46208
46514
  __extends(CustomReportComponent, _super);
46209
46515
  function CustomReportComponent() {
46210
46516
  var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
46211
- _this._registeredComponents = _this.injector.get(CustomReportsRegistry);
46517
+ _this._dialog = _this.injector.get(ReportsDialogService);
46212
46518
  return _this;
46213
46519
  }
46214
- CustomReportComponent.prototype.ngOnInit = function () {
46215
- var _a, _b;
46216
- var componentType = this._registeredComponents.getComponent((_a = this.config) === null || _a === void 0 ? void 0 : _a.type);
46217
- if (!componentType) {
46218
- console.warn("No component registered for type: " + ((_b = this.config) === null || _b === void 0 ? void 0 : _b.type));
46219
- return;
46520
+ CustomReportComponent.prototype.printChart = function () {
46521
+ if (this.customChartComponent) {
46522
+ this.customChartComponent.print();
46220
46523
  }
46221
- this._componentRef = this._registeredComponents.renderComponent(componentType.type, this.container);
46222
- this._prepareComponent();
46223
46524
  };
46224
- CustomReportComponent.prototype.ngOnChanges = function (changes) {
46225
- var _this = this;
46226
- if (!this._componentRef) {
46227
- return;
46228
- }
46229
- Object.keys(changes).forEach(function (key) {
46230
- _this._componentRef.instance[key] = changes[key].currentValue;
46525
+ CustomReportComponent.prototype.openDialog = function () {
46526
+ this._dialog.open(CustomChartDialogComponent, {
46527
+ config: this.config,
46528
+ data: this.data,
46529
+ criteria: this.criteria,
46530
+ direction: this.direction
46231
46531
  });
46232
- this._componentRef.changeDetectorRef.markForCheck();
46233
- };
46234
- CustomReportComponent.prototype.ngOnDestroy = function () {
46235
- if (this._componentRef) {
46236
- this._componentRef.destroy();
46237
- }
46238
- };
46239
- CustomReportComponent.prototype._prepareComponent = function () {
46240
- var instance = this._componentRef.instance;
46241
- instance.config = this.config;
46242
- instance.criteria = this.criteria;
46243
- instance.data = this.data;
46244
- instance.direction = this.direction;
46245
46532
  };
46246
46533
  return CustomReportComponent;
46247
46534
  }(BaseReport));
46248
46535
  CustomReportComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: CustomReportComponent, deps: null, target: i0__namespace.ɵɵFactoryTarget.Component });
46249
- CustomReportComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: CustomReportComponent, selector: "app-custom-report", host: { classAttribute: "custom-report flex flex-col flex-grow" }, viewQueries: [{ propertyName: "container", first: true, predicate: ["dynamicContainer"], descendants: true, read: i0.ViewContainerRef, static: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0__namespace, template: "<chart-panel *ngIf=\"config$ | async as config\" class=\"ndf-report chart-report\">\r\n\t<chart-panel-header class=\"ndf-report__header mb-3\">\r\n\t\t<span>\r\n\t\t\t{{ config.label | translate }}\r\n\t\t</span>\r\n\t\t<!--<button\r\n *ngIf=\"config?.dialog?.active\"\r\n class=\"dialog-button print:hidden\"\r\n (click)=\"openGraphDialog()\"\r\n [matTooltip]=\"'REPORTS.fullscreen' | translate\"\r\n >\r\n <mat-icon>fullscreen</mat-icon>\r\n </button>-->\r\n\t</chart-panel-header>\r\n\r\n\t<ng-container #dynamicContainer></ng-container>\r\n\r\n\t<chart-panel-footer class=\"ndf-report__footer flex-wrap\">\r\n\t\t<app-report-actions\r\n\t\t\t[config]=\"config\"\r\n\t\t\t(print)=\"printChart()\"\r\n\t\t\t(navigate)=\"navigate()\"\r\n\t\t\t(open)=\"onOpen.emit(null)\"\r\n\t\t></app-report-actions>\r\n\t</chart-panel-footer>\r\n</chart-panel>\r\n", styles: [""], components: [{ type: ChartPanel, selector: "chart-panel" }, { type: ChartPanelHeaderComponent, selector: "chart-panel-header" }, { type: ChartPanelFooterComponent, selector: "chart-panel-footer" }, { type: ReportActionsComponent, selector: "app-report-actions", inputs: ["config"], outputs: ["navigate", "open", "print"] }], directives: [{ type: i4__namespace$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "async": i4__namespace$1.AsyncPipe, "translate": i1__namespace.TranslatePipe } });
46536
+ CustomReportComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: CustomReportComponent, selector: "app-custom-report", host: { classAttribute: "custom-report flex flex-col flex-grow" }, viewQueries: [{ propertyName: "customChartComponent", first: true, predicate: ["customChart"], descendants: true }], usesInheritance: true, ngImport: i0__namespace, template: "<chart-panel *ngIf=\"config$ | async as config\" class=\"ndf-report chart-report\">\r\n\t<chart-panel-header class=\"ndf-report__header mb-3\">\r\n\t\t<span>\r\n\t\t\t{{ config?.label | translate }}\r\n\t\t</span>\r\n\t\t<button\r\n\t\t\t*ngIf=\"config?.dialog?.active\"\r\n\t\t\tclass=\"dialog-button print:hidden\"\r\n\t\t\t(click)=\"openDialog()\"\r\n\t\t\t[matTooltip]=\"'REPORTS.fullscreen' | translate\"\r\n\t\t>\r\n\t\t\t<mat-icon>fullscreen</mat-icon>\r\n\t\t</button>\r\n\t</chart-panel-header>\r\n\r\n\t<app-custom-chart\r\n\t\t#customChart\r\n\t\tclass=\"ndf-report__content graph-chart\"\r\n\t\t[config]=\"config\"\r\n\t\t[data]=\"data\"\r\n\t\t[criteria]=\"criteria\"\r\n\t\t[direction]=\"direction\"\r\n\t></app-custom-chart>\r\n\r\n\t<chart-panel-footer class=\"ndf-report__footer flex-wrap\">\r\n\t\t<app-report-actions\r\n\t\t\t[config]=\"config\"\r\n\t\t\t(print)=\"printChart()\"\r\n\t\t\t(navigate)=\"navigate()\"\r\n\t\t\t(open)=\"onOpen.emit(null)\"\r\n\t\t></app-report-actions>\r\n\t</chart-panel-footer>\r\n</chart-panel>\r\n", styles: [""], components: [{ type: ChartPanel, selector: "chart-panel" }, { type: ChartPanelHeaderComponent, selector: "chart-panel-header" }, { type: i2__namespace$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: CustomChartComponent, selector: "app-custom-chart" }, { type: ChartPanelFooterComponent, selector: "chart-panel-footer" }, { type: ReportActionsComponent, selector: "app-report-actions", inputs: ["config"], outputs: ["navigate", "open", "print"] }], directives: [{ type: i4__namespace$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i7__namespace.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltipPosition", "matTooltipDisabled", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }], pipes: { "async": i4__namespace$1.AsyncPipe, "translate": i1__namespace.TranslatePipe } });
46250
46537
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: CustomReportComponent, decorators: [{
46251
46538
  type: i0.Component,
46252
46539
  args: [{
@@ -46257,9 +46544,9 @@
46257
46544
  class: 'custom-report flex flex-col flex-grow'
46258
46545
  }
46259
46546
  }]
46260
- }], propDecorators: { container: [{
46547
+ }], propDecorators: { customChartComponent: [{
46261
46548
  type: i0.ViewChild,
46262
- args: ['dynamicContainer', { read: i0.ViewContainerRef, static: true }]
46549
+ args: ['customChart']
46263
46550
  }] } });
46264
46551
 
46265
46552
  function mapToNdfTableConfig(report, details) {
@@ -46319,7 +46606,7 @@
46319
46606
  return NdfReportComponent;
46320
46607
  }(DestroySubject));
46321
46608
  NdfReportComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NdfReportComponent, deps: null, target: i0__namespace.ɵɵFactoryTarget.Component });
46322
- NdfReportComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: NdfReportComponent, selector: "app-ndf-report", inputs: { config: "config", direction: "direction", data: "data", criteria: "criteria" }, outputs: { onNavigate: "onNavigate", onOpen: "onOpen" }, usesInheritance: true, ngImport: i0__namespace, template: "<ng-container *ngIf=\"config\">\r\n\t<ng-container [ngSwitch]=\"config.mode\">\r\n\t\t<app-graph-report\r\n\t\t\t*ngSwitchCase=\"reportModes.graph\"\r\n\t\t\t[definition]=\"config\"\r\n\t\t\t[data]=\"data\"\r\n [criteria]=\"criteria\"\r\n\t\t\t[direction]=\"direction\"\r\n\t\t\t(onNavigate)=\"onNavigate.emit($event)\"\r\n\t\t\t(onOpen)=\"onOpen.emit($event)\"\r\n\t\t></app-graph-report>\r\n\t\t<app-dynamic-timeline-report\r\n\t\t\t*ngSwitchCase=\"reportModes.dynamicLine\"\r\n\t\t\t[definition]=\"config\"\r\n\t\t\t[data]=\"data\"\r\n [criteria]=\"criteria\"\r\n\t\t\t[direction]=\"direction\"\r\n (onOpen)=\"onOpen.emit($event)\"\r\n\t\t></app-dynamic-timeline-report>\r\n\t\t<app-digit-report\r\n\t\t\t*ngSwitchCase=\"reportModes.digit\"\r\n\t\t\t[definition]=\"config\"\r\n\t\t\t[data]=\"data\"\r\n [criteria]=\"criteria\"\r\n\t\t\t[direction]=\"direction\"\r\n (onOpen)=\"onOpen.emit($event)\"\r\n\t\t></app-digit-report>\r\n\t</ng-container>\r\n</ng-container>\r\n", styles: [".ndf-report{display:flex;flex-direction:column;min-width:0;max-width:100%;flex-grow:1}.ndf-report__content{position:relative;padding-block:.5rem;flex-grow:1;min-width:0;max-width:100%}.chart-actions{border:var(--chart-actions-border, 1px solid var(--border-color))}.chart-actions__item{background:var(--chart-actions-background, transparent);color:var(--chart-actions-color, currentColor);box-shadow:var(--chart-actions-shadow, unset);width:var(--chart-actions-width, 35px);height:var(--chart-actions-height, 35px);border-radius:var(--chart-actions-border-radius, 4px);flex-grow:1;display:grid;place-items:center}.chart-actions__item .mat-icon{color:var(--main-color, currentColor)}.chart-actions__item:hover{--chart-actions-shadow: var(--chart-actions-hover-shadow, 0 0 0 1px var(--main-color))}.chart-actions__item.selected{--chart-actions-background: var(--chart-actions-active-background, var(--main-color));--chart-actions-color: var(--chart-actions-active-color, var(--main-hover))}.chart-actions__item.selected .mat-icon{color:currentColor!important}@media print{.chart-actions{display:none}}\n"], components: [{ type: GraphReportComponent, selector: "app-graph-report" }, { type: DynamicTimelineReportComponent, selector: "app-dynamic-timeline-report" }, { type: DigitReportComponent, selector: "app-digit-report" }], directives: [{ type: i4__namespace$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4__namespace$1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i4__namespace$1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush, encapsulation: i0__namespace.ViewEncapsulation.None });
46609
+ NdfReportComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: NdfReportComponent, selector: "app-ndf-report", inputs: { config: "config", direction: "direction", data: "data", criteria: "criteria" }, outputs: { onNavigate: "onNavigate", onOpen: "onOpen" }, usesInheritance: true, ngImport: i0__namespace, template: "<ng-container *ngIf=\"config\">\r\n\t<ng-container [ngSwitch]=\"config.mode\">\r\n\r\n\t\t<app-graph-report\r\n\t\t\t*ngSwitchCase=\"reportModes.graph\"\r\n\t\t\t[definition]=\"config\"\r\n\t\t\t[data]=\"data\"\r\n\t\t\t[criteria]=\"criteria\"\r\n\t\t\t[direction]=\"direction\"\r\n\t\t\t(onNavigate)=\"onNavigate.emit($event)\"\r\n\t\t\t(onOpen)=\"onOpen.emit($event)\"\r\n\t\t></app-graph-report>\r\n\r\n\t\t<app-dynamic-timeline-report\r\n\t\t\t*ngSwitchCase=\"reportModes.dynamicLine\"\r\n\t\t\t[definition]=\"config\"\r\n\t\t\t[data]=\"data\"\r\n\t\t\t[criteria]=\"criteria\"\r\n\t\t\t[direction]=\"direction\"\r\n\t\t\t(onOpen)=\"onOpen.emit($event)\"\r\n\t\t></app-dynamic-timeline-report>\r\n\r\n\t\t<app-digit-report\r\n\t\t\t*ngSwitchCase=\"reportModes.digit\"\r\n\t\t\t[definition]=\"config\"\r\n\t\t\t[data]=\"data\"\r\n\t\t\t[criteria]=\"criteria\"\r\n\t\t\t[direction]=\"direction\"\r\n\t\t\t(onOpen)=\"onOpen.emit($event)\"\r\n\t\t></app-digit-report>\r\n\r\n\t\t<app-custom-report\r\n\t\t\t*ngSwitchCase=\"reportModes.custom\"\r\n\t\t\t[definition]=\"config\"\r\n\t\t\t[data]=\"data\"\r\n\t\t\t[criteria]=\"criteria\"\r\n\t\t\t[direction]=\"direction\"\r\n\t\t\t(onOpen)=\"onOpen.emit($event)\"\r\n\t\t>\r\n\t\t</app-custom-report>\r\n\t</ng-container>\r\n</ng-container>\r\n", styles: [".ndf-report{display:flex;flex-direction:column;min-width:0;max-width:100%;flex-grow:1}.ndf-report__content{position:relative;padding-block:.5rem;flex-grow:1;min-width:0;max-width:100%}.chart-actions{border:var(--chart-actions-border, 1px solid var(--border-color))}.chart-actions__item{background:var(--chart-actions-background, transparent);color:var(--chart-actions-color, currentColor);box-shadow:var(--chart-actions-shadow, unset);width:var(--chart-actions-width, 35px);height:var(--chart-actions-height, 35px);border-radius:var(--chart-actions-border-radius, 4px);flex-grow:1;display:grid;place-items:center}.chart-actions__item .mat-icon{color:var(--main-color, currentColor)}.chart-actions__item:hover{--chart-actions-shadow: var(--chart-actions-hover-shadow, 0 0 0 1px var(--main-color))}.chart-actions__item.selected{--chart-actions-background: var(--chart-actions-active-background, var(--main-color));--chart-actions-color: var(--chart-actions-active-color, var(--main-hover))}.chart-actions__item.selected .mat-icon{color:currentColor!important}@media print{.chart-actions{display:none}}\n"], components: [{ type: GraphReportComponent, selector: "app-graph-report" }, { type: DynamicTimelineReportComponent, selector: "app-dynamic-timeline-report" }, { type: DigitReportComponent, selector: "app-digit-report" }, { type: CustomReportComponent, selector: "app-custom-report" }], directives: [{ type: i4__namespace$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4__namespace$1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i4__namespace$1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush, encapsulation: i0__namespace.ViewEncapsulation.None });
46323
46610
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NdfReportComponent, decorators: [{
46324
46611
  type: i0.Component,
46325
46612
  args: [{
@@ -46626,7 +46913,7 @@
46626
46913
  return NdfReportsComponent;
46627
46914
  }(DestroySubject));
46628
46915
  NdfReportsComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NdfReportsComponent, deps: [{ token: i1__namespace.TranslateService }, { token: FiltersMapperService }, { token: NdfReportsService }, { token: ChartManagerService }, { token: ReportTransformService }, { token: i0__namespace.ChangeDetectorRef }, { token: FilterQueryService }, { token: ReportsStateService }, { token: i1__namespace$5.Router }, { token: i0__namespace.NgZone }], target: i0__namespace.ɵɵFactoryTarget.Component });
46629
- NdfReportsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: NdfReportsComponent, selector: "app-ndf-reports", inputs: { jsonEditorEnabled: "jsonEditorEnabled", reportsKey: "reportsKey", navigateRoute: "navigateRoute", config: "config" }, outputs: { onQueryChange: "onQueryChange" }, host: { properties: { "dir": "direction" }, classAttribute: "ndf-reports" }, viewQueries: [{ propertyName: "fluidDirective", first: true, predicate: FluidHeightDirective, descendants: true }], usesInheritance: true, ngImport: i0__namespace, template: "<div\r\n\t*ngIf=\"reportsData$ | async as reports\"\r\n\tclass=\"ndf-reports__container\"\r\n\t[class.panel-opened]=\"isPanelOpened && filtersConfig\"\r\n\t[dir]=\"direction\"\r\n\tndfFluidHeight\r\n>\r\n\t<div class=\"ndf-reports__panel print:hidden\" *ngIf=\"!!filtersConfig?.fields?.length\">\r\n\t\t<app-filters-panel\r\n\t\t\t[fields]=\"filtersConfig?.fields\"\r\n\t\t\t[aggregations]=\"aggregations\"\r\n\t\t\t(filterChanged)=\"filterChanged($event)\"\r\n\t\t\t[activeQuery]=\"activeFiltersQuery$ | async\"\r\n\t\t\tclass=\"ndf-reports__filters\"\r\n\t\t></app-filters-panel>\r\n\t</div>\r\n\r\n\t<div class=\"ndf-reports__content\" (scrolled)=\"onContentScroll($event)\">\r\n\t\t<div class=\"ndf-reports__header flex pt-4 print:hidden\">\r\n\t\t\t<button mat-stroked-button class=\"toggle-button\" (click)=\"togglePanel()\">\r\n\t\t\t\t<mat-icon> filter_alt</mat-icon>\r\n\t\t\t</button>\r\n\t\t\t<app-editor-button\r\n\t\t\t\t*ngIf=\"jsonEditorEnabled && reportsKey\"\r\n\t\t\t\t[key]=\"reportsKey\"\r\n\t\t\t\t[type]=\"editorType\"\r\n\t\t\t></app-editor-button>\r\n\t\t\t<button mat-stroked-button *ngIf=\"config?.options?.print\" class=\"print-button\" (click)=\"printAll()\">\r\n\t\t\t\t<mat-icon> print</mat-icon>\r\n\t\t\t</button>\r\n\t\t</div>\r\n\t\t<mat-spinner *ngIf=\"isLoadingResult\" class=\"mt-5 mx-auto\" [diameter]=\"48\"></mat-spinner>\r\n\r\n\t\t<div class=\"reports-grid\" *ngIf=\"!isLoadingResult\">\r\n\t\t\t<app-ndf-report\r\n\t\t\t\t*ngFor=\"let config of reportConfig.items; trackBy: trackByFn\"\r\n\t\t\t\t[config]=\"config\"\r\n\t\t\t\t[data]=\"reports?.response\"\r\n\t\t\t\t[criteria]=\"filtersParams$ | async\"\r\n\t\t\t\t[direction]=\"direction\"\r\n\t\t\t\t[attr.data-width]=\"config?.layout?.width || 4\"\r\n\t\t\t\t[attr.data-height]=\"config?.layout?.height || 'auto'\"\r\n\t\t\t\t[attr.data-start-column]=\"config?.layout?.columnPosition || 'auto'\"\r\n\t\t\t\t[attr.data-start-row]=\"config?.layout?.rowPosition || 'auto'\"\r\n\t\t\t\t[class.wide]=\"config?.layout?.width >= 6\"\r\n\t\t\t\tclass=\"reports-grid__item {{ config?.layout?.styleClass }} \"\r\n\t\t\t\t(onNavigate)=\"onNavigate($event)\"\r\n\t\t\t\t(onOpen)=\"openReportDetails($event, config)\"\r\n\t\t\t></app-ndf-report>\r\n\t\t</div>\r\n\t</div>\r\n\t<div\r\n\t\tclass=\"ndf-reports__details print:hidden\"\r\n\t\t[class.opened]=\"showDetails\"\r\n\t\t[@slideInOut]=\"showDetails ? 'open' : 'closed'\"\r\n\t\t(@slideInOut.done)=\"onDetailsAnimationEnd($event)\"\r\n\t>\r\n\t\t<app-ndf-table\r\n\t\t\t*ngIf=\"reportDetails$ | async as report\"\r\n\t\t\t[config]=\"report.config\"\r\n\t\t\t[activeQuery]=\"activeFiltersQuery$ | async\"\r\n\t\t\t[customCriteria]=\"filtersParams$ | async\"\r\n\t\t>\r\n\t\t\t<ng-template searchTableTemplate>\r\n\t\t\t\t<div class=\"ndf-reports__details__header flex gap-2\">\r\n\t\t\t\t\t<button mat-stroked-button class=\"toggle-button\" (click)=\"togglePanel()\">\r\n\t\t\t\t\t\t<mat-icon> filter_alt</mat-icon>\r\n\t\t\t\t\t</button>\r\n\t\t\t\t\t<button mat-stroked-button class=\"close-button\" (click)=\"closeDetailsPanel()\">\r\n\t\t\t\t\t\t<mat-icon> close</mat-icon>\r\n\t\t\t\t\t</button>\r\n\t\t\t\t</div>\r\n\t\t\t\t<h3>\r\n\t\t\t\t\t{{ report.label | translate }}\r\n\t\t\t\t</h3>\r\n\t\t\t</ng-template>\r\n\t\t</app-ndf-table>\r\n\t</div>\r\n</div>\r\n", styles: [":host{padding-inline:var(--ndf-reports-inline-padding, 0);padding-block:var(--ndf-reports-block-padding, .5rem 0);height:100%;position:relative;display:flex;flex-direction:column;background-color:var(--ndf-reports-background, #fff);box-sizing:border-box;max-width:100%;flex:0 0 100%}:host:before,:host:after{box-sizing:border-box}:host[dir=ltr]{--ndf-reports-panel-translateX: -100%;--ndf-reports-details-translateX: 100%}.ndf-reports__header{background-color:var(--ndf-reports-background, #fff);flex-direction:var(--ndf-reports-header-direction, row);justify-content:var(--ndf-reports-header-justify, space-between);align-items:var(--ndf-reports-header-items, center);padding-inline:var(--ndf-reports-header-padding-inline, .5rem);padding-block:var(--ndf-reports-header-padding-block, 0 .5rem);position:var(--ndf-reports-header-position, sticky);top:0;z-index:1}.ndf-reports__header__actions{justify-content:var(--ndf-reports-actions-justify, flex-end)}.ndf-reports__header__custom-actions .toggle-button{min-width:0;padding:0 10px}.ndf-reports__container{--panel-width: var(--ndf-reports-panel-width, 18rem);position:relative;overflow:var(--ndf-reports-container-overflow, hidden);display:grid;transition:all .2s;max-width:100%;width:100%;height:var(--ndf-reports-height, calc(var(--ndf-fluid-height) - calc(var(--ndf-reports-block-padding, 1rem) * 2.5)));flex-grow:1;grid-gap:var(--ndf-table-container-gap, .5rem);gap:var(--ndf-table-container-gap, .5rem)}.ndf-reports__container.panel-opened{--ndf-details-margin: var(--panel-width);--ndf-reports-panel-translateX: 0;--ndf-reports-content-margin: var(--panel-width)}@media print{.ndf-reports__container{--ndf-reports-container-overflow: visible;height:100%}}.ndf-reports__panel,.ndf-reports__content .ndf-reports__details{overflow:auto;transition:all .2s}.ndf-reports__panel{position:absolute;width:var(--panel-width);height:100%;transform:translate(var(--ndf-reports-panel-translateX, 100%));padding-inline:var(--ndf-reports-panel-inline-padding, .5rem);padding-block:var(--ndf-reports-panel-block-padding, .5rem);background:var(--ndf-reports-panel-background, #fff);z-index:1}.ndf-reports__content{flex-grow:1;padding-inline-start:var(--ndf-reports-content-margin, 1rem);padding-inline-end:var(--ndf-reports-content-pie, 1rem);padding-block:var(--ndf-reports-content-pb, 0 1rem);overflow-y:var(--ndf-reports-content-overflow-y, auto);position:relative;display:flex;flex-direction:column}@media print{.ndf-reports__content{--ndf-reports-content-overflow-y: visible}}.ndf-reports__details{position:absolute;inset-inline-end:0;width:calc(100% - var(--ndf-details-margin, 0px));height:100%;transform:translate(var(--ndf-reports-details-translateX, -100%));padding-inline:var(--ndf-reports-details-inline-padding, 0rem);flex-grow:1;padding-block:var(--ndf-reports-details-block-padding, 0rem);background:var(--ndf-reports-details-background, #fff);z-index:1;transition:all .2s}.reports-grid{--grid-columns: 12;--column-width: calc(100% / var(--grid-columns));display:grid;grid-gap:var(--reports-grid-gap, 1.5rem);gap:var(--reports-grid-gap, 1.5rem);grid-template-columns:var(--rg-columns, repeat(var(--grid-columns), 1fr));margin-block:var(--reports-grid-margin-block, 1.25rem 0);padding-inline:var(--reports-grid-padding-inline, .5rem)}.reports-grid__item{background:#f5f5f5;display:grid;grid-gap:.3rem;gap:.3rem;min-width:0;text-align:center;vertical-align:middle}.reports-grid__item[data-width=\"1\"]{--col-span: span 1}.reports-grid__item[data-start-column=\"1\"]{--col-start: 1}.reports-grid__item[data-start-row=\"1\"]{--row-start: 1}.reports-grid__item[data-height=\"1\"]{--row-span: 1}.reports-grid__item[data-width=\"2\"]{--col-span: span 2}.reports-grid__item[data-start-column=\"2\"]{--col-start: 2}.reports-grid__item[data-start-row=\"2\"]{--row-start: 2}.reports-grid__item[data-height=\"2\"]{--row-span: 2}.reports-grid__item[data-width=\"3\"]{--col-span: span 3}.reports-grid__item[data-start-column=\"3\"]{--col-start: 3}.reports-grid__item[data-start-row=\"3\"]{--row-start: 3}.reports-grid__item[data-height=\"3\"]{--row-span: 3}.reports-grid__item[data-width=\"4\"]{--col-span: span 4}.reports-grid__item[data-start-column=\"4\"]{--col-start: 4}.reports-grid__item[data-start-row=\"4\"]{--row-start: 4}.reports-grid__item[data-height=\"4\"]{--row-span: 4}.reports-grid__item[data-width=\"5\"]{--col-span: span 5}.reports-grid__item[data-start-column=\"5\"]{--col-start: 5}.reports-grid__item[data-start-row=\"5\"]{--row-start: 5}.reports-grid__item[data-height=\"5\"]{--row-span: 5}.reports-grid__item[data-width=\"6\"]{--col-span: span 6}.reports-grid__item[data-start-column=\"6\"]{--col-start: 6}.reports-grid__item[data-start-row=\"6\"]{--row-start: 6}.reports-grid__item[data-height=\"6\"]{--row-span: 6}.reports-grid__item[data-width=\"7\"]{--col-span: span 7}.reports-grid__item[data-start-column=\"7\"]{--col-start: 7}.reports-grid__item[data-start-row=\"7\"]{--row-start: 7}.reports-grid__item[data-height=\"7\"]{--row-span: 7}.reports-grid__item[data-width=\"8\"]{--col-span: span 8}.reports-grid__item[data-start-column=\"8\"]{--col-start: 8}.reports-grid__item[data-start-row=\"8\"]{--row-start: 8}.reports-grid__item[data-height=\"8\"]{--row-span: 8}.reports-grid__item[data-width=\"9\"]{--col-span: span 9}.reports-grid__item[data-start-column=\"9\"]{--col-start: 9}.reports-grid__item[data-start-row=\"9\"]{--row-start: 9}.reports-grid__item[data-height=\"9\"]{--row-span: 9}.reports-grid__item[data-width=\"10\"]{--col-span: span 10}.reports-grid__item[data-start-column=\"10\"]{--col-start: 10}.reports-grid__item[data-start-row=\"10\"]{--row-start: 10}.reports-grid__item[data-height=\"10\"]{--row-span: 10}.reports-grid__item[data-width=\"11\"]{--col-span: span 11}.reports-grid__item[data-start-column=\"11\"]{--col-start: 11}.reports-grid__item[data-start-row=\"11\"]{--row-start: 11}.reports-grid__item[data-height=\"11\"]{--row-span: 11}.reports-grid__item[data-width=\"12\"]{--col-span: span 12}.reports-grid__item[data-start-column=\"12\"]{--col-start: 12}.reports-grid__item[data-start-row=\"12\"]{--row-start: 12}.reports-grid__item[data-height=\"12\"]{--row-span: 12}@media screen{.reports-grid__item{grid-column:var(--col-start, auto)/var(--col-span, span var(--grid-column, 2));grid-row:var(--row-start, auto)/span var(--row-span, 1);grid-template-rows:subgrid}}@media print{.reports-grid{--reports-grid-gap: 11mm;--reports-grid-margin-top: 9mm;--rg-columns: repeat(2, 1fr)}.reports-grid__item{--col-start: auto;--col-span: span 1;border:1px solid #f5f5f5;border-radius:var(--cp-radius, 1rem);page-break-inside:avoid;break-inside:avoid-page}}@media screen and (max-width: 1199px){.reports-grid__item[data-width=\"1\"]{--col-start: auto;--col-span: span 6}.reports-grid__item[data-width=\"2\"]{--col-start: auto;--col-span: span 6}.reports-grid__item[data-width=\"3\"]{--col-start: auto;--col-span: span 6}.reports-grid__item[data-width=\"4\"]{--col-start: auto;--col-span: span 6}.reports-grid__item[data-width=\"5\"]{--col-start: auto;--col-span: span 6}.reports-grid__item[data-width=\"6\"]{--col-start: auto;--col-span: span 6}.reports-grid__item.wide{--col-start: 1;--col-span: -1}}@media screen and (max-width: 767px){.reports-grid__item[data-width]{--col-start: 1;--col-span: -1}}\n"], components: [{ type: FiltersPanelComponent, selector: "app-filters-panel", inputs: ["aggregations", "fields", "activeQuery"], outputs: ["filterChanged"] }, { type: i1__namespace$c.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i2__namespace$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: EditorButtonComponent, selector: "app-editor-button", inputs: ["type", "key"] }, { type: i3__namespace$1.MatSpinner, selector: "mat-spinner", inputs: ["color"] }, { type: NdfReportComponent, selector: "app-ndf-report", inputs: ["config", "direction", "data", "criteria"], outputs: ["onNavigate", "onOpen"] }, { type: NdfTableComponent, selector: "app-ndf-table", inputs: ["rows", "totalRecords", "autoCalculateHeight", "emptyMessage", "activeQuery", "configPath", "configTransformer", "tableKey", "jsonEditorEnabled", "config", "customCriteria", "searchTerm"], outputs: ["onRowSelected", "onRowIndexSelected", "actionOnRow", "onGettingData", "onMultiRowSelected", "onLoading", "onPage", "onInitialized", "onLoaded", "onQueryChange", "onSort"] }], directives: [{ type: i4__namespace$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: FluidHeightDirective, selector: "[ndfFluidHeight]", inputs: ["minHeight", "ndfFluidHeight", "subtractItems", "decrease", "delay", "cssVar", "calculate", "inlineStyle"], exportAs: ["ndfFluidHeight"] }, { type: i4__namespace.Dir, selector: "[dir]", inputs: ["dir"], outputs: ["dirChange"], exportAs: ["dir"] }, { type: ScrollableDivDirective, selector: "[scrolled]", inputs: ["scrollTop"], outputs: ["scrolled"] }, { type: i4__namespace$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: SearchTableTemplateDirective, selector: "[searchTableTemplate]" }], pipes: { "async": i4__namespace$1.AsyncPipe, "translate": i1__namespace.TranslatePipe }, animations: [slideAnimation] });
46916
+ NdfReportsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: NdfReportsComponent, selector: "app-ndf-reports", inputs: { jsonEditorEnabled: "jsonEditorEnabled", reportsKey: "reportsKey", navigateRoute: "navigateRoute", config: "config" }, outputs: { onQueryChange: "onQueryChange" }, host: { properties: { "dir": "direction" }, classAttribute: "ndf-reports" }, viewQueries: [{ propertyName: "fluidDirective", first: true, predicate: FluidHeightDirective, descendants: true }], usesInheritance: true, ngImport: i0__namespace, template: "<div\r\n\t*ngIf=\"reportsData$ | async as reports\"\r\n\tclass=\"ndf-reports__container\"\r\n\t[class.panel-opened]=\"isPanelOpened && filtersConfig\"\r\n\t[dir]=\"direction\"\r\n\tndfFluidHeight\r\n>\r\n\t<div class=\"ndf-reports__panel print:hidden\" *ngIf=\"!!filtersConfig?.fields?.length\">\r\n\t\t<app-filters-panel\r\n\t\t\t[fields]=\"filtersConfig?.fields\"\r\n\t\t\t[aggregations]=\"aggregations\"\r\n\t\t\t(filterChanged)=\"filterChanged($event)\"\r\n\t\t\t[activeQuery]=\"activeFiltersQuery$ | async\"\r\n\t\t\tclass=\"ndf-reports__filters\"\r\n\t\t></app-filters-panel>\r\n\t</div>\r\n\r\n\t<div class=\"ndf-reports__content\" (scrolled)=\"onContentScroll($event)\">\r\n\t\t<div class=\"ndf-reports__header flex pt-4 print:hidden\">\r\n\t\t\t<button mat-stroked-button class=\"toggle-button\" (click)=\"togglePanel()\">\r\n\t\t\t\t<mat-icon> filter_alt</mat-icon>\r\n\t\t\t</button>\r\n\t\t\t<app-editor-button\r\n\t\t\t\t*ngIf=\"jsonEditorEnabled && reportsKey\"\r\n\t\t\t\t[key]=\"reportsKey\"\r\n\t\t\t\t[type]=\"editorType\"\r\n\t\t\t></app-editor-button>\r\n\t\t\t<button mat-stroked-button *ngIf=\"config?.options?.print\" class=\"print-button\" (click)=\"printAll()\">\r\n\t\t\t\t<mat-icon> print</mat-icon>\r\n\t\t\t</button>\r\n\t\t</div>\r\n\t\t<mat-spinner *ngIf=\"isLoadingResult\" class=\"mt-5 mx-auto\" [diameter]=\"48\"></mat-spinner>\r\n\r\n\t\t<div class=\"reports-grid\" *ngIf=\"!isLoadingResult\">\r\n\t\t\t<app-ndf-report\r\n\t\t\t\t*ngFor=\"let config of reportConfig.items; trackBy: trackByFn\"\r\n\t\t\t\t[config]=\"config\"\r\n\t\t\t\t[data]=\"reports?.response\"\r\n\t\t\t\t[criteria]=\"filtersParams$ | async\"\r\n\t\t\t\t[direction]=\"direction\"\r\n\t\t\t\t[attr.data-width]=\"config?.layout?.width || 4\"\r\n\t\t\t\t[attr.data-height]=\"config?.layout?.height || 'auto'\"\r\n\t\t\t\t[attr.data-start-column]=\"config?.layout?.columnPosition || 'auto'\"\r\n\t\t\t\t[attr.data-start-row]=\"config?.layout?.rowPosition || 'auto'\"\r\n\t\t\t\t[class.wide]=\"config?.layout?.width >= 6\"\r\n\t\t\t\tclass=\"reports-grid__item {{ config?.layout?.styleClass }} \"\r\n\t\t\t\t(onNavigate)=\"onNavigate($event)\"\r\n\t\t\t\t(onOpen)=\"openReportDetails($event, config)\"\r\n\t\t\t></app-ndf-report>\r\n\t\t</div>\r\n\t</div>\r\n\t<div\r\n\t\tclass=\"ndf-reports__details print:hidden\"\r\n\t\t[class.opened]=\"showDetails\"\r\n\t\t[@slideInOut]=\"showDetails ? 'open' : 'closed'\"\r\n\t\t(@slideInOut.done)=\"onDetailsAnimationEnd($event)\"\r\n\t>\r\n\t\t<app-ndf-table\r\n\t\t\t*ngIf=\"reportDetails$ | async as report\"\r\n\t\t\t[config]=\"report.config\"\r\n\t\t\t[activeQuery]=\"activeFiltersQuery$ | async\"\r\n\t\t\t[customCriteria]=\"filtersParams$ | async\"\r\n\t\t>\r\n\t\t\t<ng-template searchTableTemplate>\r\n\t\t\t\t<div class=\"ndf-reports__details__header flex gap-2\">\r\n\t\t\t\t\t<button mat-stroked-button class=\"toggle-button\" (click)=\"togglePanel()\">\r\n\t\t\t\t\t\t<mat-icon> filter_alt</mat-icon>\r\n\t\t\t\t\t</button>\r\n\t\t\t\t\t<button mat-stroked-button class=\"close-button\" (click)=\"closeDetailsPanel()\">\r\n\t\t\t\t\t\t<mat-icon> close</mat-icon>\r\n\t\t\t\t\t</button>\r\n\t\t\t\t</div>\r\n\t\t\t\t<h3>\r\n\t\t\t\t\t{{ report.label | translate }}\r\n\t\t\t\t</h3>\r\n\t\t\t</ng-template>\r\n\t\t</app-ndf-table>\r\n\t</div>\r\n</div>\r\n", styles: [":host{padding-inline:var(--ndf-reports-inline-padding, 0);padding-block:var(--ndf-reports-block-padding, .5rem 0);height:100%;position:relative;display:flex;flex-direction:column;background-color:var(--ndf-reports-background, #fff);box-sizing:border-box;max-width:100%;flex:0 0 100%}:host:before,:host:after{box-sizing:border-box}:host[dir=ltr]{--ndf-reports-panel-translateX: -100%;--ndf-reports-details-translateX: 100%}.ndf-reports__header{background-color:var(--ndf-reports-background, #fff);flex-direction:var(--ndf-reports-header-direction, row);justify-content:var(--ndf-reports-header-justify, space-between);align-items:var(--ndf-reports-header-items, center);padding-inline:var(--ndf-reports-header-padding-inline, .5rem);padding-block:var(--ndf-reports-header-padding-block, 0 .5rem);position:var(--ndf-reports-header-position, sticky);top:0;z-index:1}.ndf-reports__header__actions{justify-content:var(--ndf-reports-actions-justify, flex-end)}.ndf-reports__header__custom-actions .toggle-button{min-width:0;padding:0 10px}.ndf-reports__container{--panel-width: var(--ndf-reports-panel-width, 18rem);position:relative;overflow:var(--ndf-reports-container-overflow, hidden);display:grid;transition:all .2s;max-width:100%;width:100%;height:var(--ndf-reports-height, calc(var(--ndf-fluid-height) - calc(var(--ndf-reports-block-padding, 1rem) * 2.5)));flex-grow:1;grid-gap:var(--ndf-table-container-gap, .5rem);gap:var(--ndf-table-container-gap, .5rem)}.ndf-reports__container.panel-opened{--ndf-details-margin: var(--panel-width);--ndf-reports-panel-translateX: 0;--ndf-reports-content-margin: var(--panel-width)}@media print{.ndf-reports__container{--ndf-reports-container-overflow: visible;height:100%}}.ndf-reports__panel,.ndf-reports__content .ndf-reports__details{overflow:auto;transition:all .2s}.ndf-reports__panel{position:absolute;width:var(--panel-width);height:100%;transform:translate(var(--ndf-reports-panel-translateX, 100%));padding-inline:var(--ndf-reports-panel-inline-padding, .5rem);padding-block:var(--ndf-reports-panel-block-padding, .5rem);background:var(--ndf-reports-panel-background, #fff);z-index:1}.ndf-reports__content{flex-grow:1;padding-inline-start:var(--ndf-reports-content-margin, 1rem);padding-inline-end:var(--ndf-reports-content-pie, 1rem);padding-block:var(--ndf-reports-content-pb, 0 1rem);overflow-y:var(--ndf-reports-content-overflow-y, auto);position:relative;display:flex;flex-direction:column}@media print{.ndf-reports__content{--ndf-reports-content-overflow-y: visible}}.ndf-reports__details{position:absolute;inset-inline-end:0;width:calc(100% - var(--ndf-details-margin, 0px));height:100%;transform:translate(var(--ndf-reports-details-translateX, -100%));padding-inline:var(--ndf-reports-details-inline-padding, 0rem);flex-grow:1;padding-block:var(--ndf-reports-details-block-padding, 0rem);background:var(--ndf-reports-details-background, #fff);z-index:1;transition:all .2s}.reports-grid{--grid-columns: 12;--column-width: calc(100% / var(--grid-columns));display:grid;grid-gap:var(--reports-grid-gap, 1.5rem);gap:var(--reports-grid-gap, 1.5rem);grid-template-columns:var(--rg-columns, repeat(var(--grid-columns), 1fr));margin-block:var(--reports-grid-margin-block, 1.25rem 0);padding-inline:var(--reports-grid-padding-inline, .5rem)}.reports-grid__item{display:grid;grid-gap:.3rem;gap:.3rem;min-width:0;text-align:center;vertical-align:middle}.reports-grid__item[data-width=\"1\"]{--col-span: span 1}.reports-grid__item[data-start-column=\"1\"]{--col-start: 1}.reports-grid__item[data-start-row=\"1\"]{--row-start: 1}.reports-grid__item[data-height=\"1\"]{--row-span: 1}.reports-grid__item[data-width=\"2\"]{--col-span: span 2}.reports-grid__item[data-start-column=\"2\"]{--col-start: 2}.reports-grid__item[data-start-row=\"2\"]{--row-start: 2}.reports-grid__item[data-height=\"2\"]{--row-span: 2}.reports-grid__item[data-width=\"3\"]{--col-span: span 3}.reports-grid__item[data-start-column=\"3\"]{--col-start: 3}.reports-grid__item[data-start-row=\"3\"]{--row-start: 3}.reports-grid__item[data-height=\"3\"]{--row-span: 3}.reports-grid__item[data-width=\"4\"]{--col-span: span 4}.reports-grid__item[data-start-column=\"4\"]{--col-start: 4}.reports-grid__item[data-start-row=\"4\"]{--row-start: 4}.reports-grid__item[data-height=\"4\"]{--row-span: 4}.reports-grid__item[data-width=\"5\"]{--col-span: span 5}.reports-grid__item[data-start-column=\"5\"]{--col-start: 5}.reports-grid__item[data-start-row=\"5\"]{--row-start: 5}.reports-grid__item[data-height=\"5\"]{--row-span: 5}.reports-grid__item[data-width=\"6\"]{--col-span: span 6}.reports-grid__item[data-start-column=\"6\"]{--col-start: 6}.reports-grid__item[data-start-row=\"6\"]{--row-start: 6}.reports-grid__item[data-height=\"6\"]{--row-span: 6}.reports-grid__item[data-width=\"7\"]{--col-span: span 7}.reports-grid__item[data-start-column=\"7\"]{--col-start: 7}.reports-grid__item[data-start-row=\"7\"]{--row-start: 7}.reports-grid__item[data-height=\"7\"]{--row-span: 7}.reports-grid__item[data-width=\"8\"]{--col-span: span 8}.reports-grid__item[data-start-column=\"8\"]{--col-start: 8}.reports-grid__item[data-start-row=\"8\"]{--row-start: 8}.reports-grid__item[data-height=\"8\"]{--row-span: 8}.reports-grid__item[data-width=\"9\"]{--col-span: span 9}.reports-grid__item[data-start-column=\"9\"]{--col-start: 9}.reports-grid__item[data-start-row=\"9\"]{--row-start: 9}.reports-grid__item[data-height=\"9\"]{--row-span: 9}.reports-grid__item[data-width=\"10\"]{--col-span: span 10}.reports-grid__item[data-start-column=\"10\"]{--col-start: 10}.reports-grid__item[data-start-row=\"10\"]{--row-start: 10}.reports-grid__item[data-height=\"10\"]{--row-span: 10}.reports-grid__item[data-width=\"11\"]{--col-span: span 11}.reports-grid__item[data-start-column=\"11\"]{--col-start: 11}.reports-grid__item[data-start-row=\"11\"]{--row-start: 11}.reports-grid__item[data-height=\"11\"]{--row-span: 11}.reports-grid__item[data-width=\"12\"]{--col-span: span 12}.reports-grid__item[data-start-column=\"12\"]{--col-start: 12}.reports-grid__item[data-start-row=\"12\"]{--row-start: 12}.reports-grid__item[data-height=\"12\"]{--row-span: 12}@media screen{.reports-grid__item{grid-column:var(--col-start, auto)/var(--col-span, span var(--grid-column, 2));grid-row:var(--row-start, auto)/span var(--row-span, 1);grid-template-rows:subgrid}}@media print{.reports-grid{--reports-grid-gap: 11mm;--reports-grid-margin-top: 9mm;--rg-columns: repeat(2, 1fr)}.reports-grid__item{--col-start: auto;--col-span: span 1;border:1px solid #f5f5f5;border-radius:var(--cp-radius, 1rem);page-break-inside:avoid;break-inside:avoid-page}}@media screen and (max-width: 1199px){.reports-grid__item[data-width=\"1\"]{--col-start: auto;--col-span: span 6}.reports-grid__item[data-width=\"2\"]{--col-start: auto;--col-span: span 6}.reports-grid__item[data-width=\"3\"]{--col-start: auto;--col-span: span 6}.reports-grid__item[data-width=\"4\"]{--col-start: auto;--col-span: span 6}.reports-grid__item[data-width=\"5\"]{--col-start: auto;--col-span: span 6}.reports-grid__item[data-width=\"6\"]{--col-start: auto;--col-span: span 6}.reports-grid__item.wide{--col-start: 1;--col-span: -1}}@media screen and (max-width: 767px){.reports-grid__item[data-width]{--col-start: 1;--col-span: -1}}\n"], components: [{ type: FiltersPanelComponent, selector: "app-filters-panel", inputs: ["aggregations", "fields", "activeQuery"], outputs: ["filterChanged"] }, { type: i1__namespace$c.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i2__namespace$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: EditorButtonComponent, selector: "app-editor-button", inputs: ["type", "key"] }, { type: i3__namespace$1.MatSpinner, selector: "mat-spinner", inputs: ["color"] }, { type: NdfReportComponent, selector: "app-ndf-report", inputs: ["config", "direction", "data", "criteria"], outputs: ["onNavigate", "onOpen"] }, { type: NdfTableComponent, selector: "app-ndf-table", inputs: ["rows", "totalRecords", "autoCalculateHeight", "emptyMessage", "activeQuery", "configPath", "configTransformer", "tableKey", "jsonEditorEnabled", "config", "customCriteria", "searchTerm"], outputs: ["onRowSelected", "onRowIndexSelected", "actionOnRow", "onGettingData", "onMultiRowSelected", "onLoading", "onPage", "onInitialized", "onLoaded", "onQueryChange", "onSort"] }], directives: [{ type: i4__namespace$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: FluidHeightDirective, selector: "[ndfFluidHeight]", inputs: ["minHeight", "ndfFluidHeight", "subtractItems", "decrease", "delay", "cssVar", "calculate", "inlineStyle"], exportAs: ["ndfFluidHeight"] }, { type: i4__namespace.Dir, selector: "[dir]", inputs: ["dir"], outputs: ["dirChange"], exportAs: ["dir"] }, { type: ScrollableDivDirective, selector: "[scrolled]", inputs: ["scrollTop"], outputs: ["scrolled"] }, { type: i4__namespace$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: SearchTableTemplateDirective, selector: "[searchTableTemplate]" }], pipes: { "async": i4__namespace$1.AsyncPipe, "translate": i1__namespace.TranslatePipe }, animations: [slideAnimation] });
46630
46917
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NdfReportsComponent, decorators: [{
46631
46918
  type: i0.Component,
46632
46919
  args: [{
@@ -46678,7 +46965,7 @@
46678
46965
  DynamicTimelineReportComponent,
46679
46966
  TimeGroupSelectorComponent,
46680
46967
  GraphDialogComponent,
46681
- TimelineDialogComponent, ScrollableDivDirective, GraphChartComponent, DigitChartComponent, ReportActionsComponent, CustomReportComponent], imports: [i4.CommonModule,
46968
+ TimelineDialogComponent, ScrollableDivDirective, GraphChartComponent, DigitChartComponent, ReportActionsComponent, CustomReportComponent, CustomChartComponent, CustomChartDialogComponent], imports: [i4.CommonModule,
46682
46969
  i1.TranslateModule,
46683
46970
  i3$2.MatMenuModule,
46684
46971
  i2$2.MatIconModule,
@@ -46723,7 +47010,7 @@
46723
47010
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NdfReportsModule, decorators: [{
46724
47011
  type: i0.NgModule,
46725
47012
  args: [{
46726
- declarations: [CONTAINERS, COMPONENTS, DIRECTIVES, CHARTS, ReportActionsComponent, CustomReportComponent],
47013
+ declarations: [CONTAINERS, COMPONENTS, DIRECTIVES, CHARTS, ReportActionsComponent, CustomReportComponent, CustomChartComponent, CustomChartDialogComponent],
46727
47014
  imports: [
46728
47015
  i4.CommonModule,
46729
47016
  i1.TranslateModule,
@@ -46750,1355 +47037,35 @@
46750
47037
  }]
46751
47038
  }] });
46752
47039
 
46753
- var TABLE_DATA = {
46754
- options: {
46755
- columns: {
46756
- toggle: true,
46757
- sortable: {
46758
- enabled: true,
46759
- },
46760
- },
46761
- filters: {
46762
- mode: 'payload',
46763
- reload: {
46764
- strategy: 'always',
46765
- },
46766
- panel: {
46767
- visible: true,
46768
- toggleButton: true,
46769
- },
46770
- fields: [
46771
- {
46772
- type: 'aggregation',
46773
- config: {
46774
- label: 'rmAdvancedSearch.recDefintionSystemName',
46775
- aggregation: 'RecordDefinition_systemName_agg',
46776
- fieldKey: 'recdef:systemName',
46777
- dataTransformer: 'system',
46778
- order: 0,
46779
- sendMode: 'queryParam',
46780
- render: {
46781
- type: 'checkbox',
46782
- options: {
46783
- showTotal: true,
46784
- },
46785
- },
46786
- },
46787
- },
46788
- {
46789
- type: 'aggregation',
46790
- config: {
46791
- label: 'rmAdvancedSearch.gdocCategoryHierarchyCode',
46792
- aggregation: 'generaldocument_categoryHierarchyCode_agg',
46793
- fieldKey: 'gdoc:categoryHierarchyCode',
46794
- dataTransformer: 'subject',
46795
- order: 0,
46796
- sendMode: 'queryParam',
46797
- valueType: 'property',
46798
- render: {
46799
- type: 'checkbox',
46800
- options: {
46801
- showTotal: true,
46802
- },
46803
- },
46804
- },
46805
- },
46806
- {
46807
- type: 'aggregation',
46808
- config: {
46809
- label: 'rmAdvancedSearch.gdocCategoryHierarchyCode1',
46810
- aggregation: 'generaldocument_categoryHierarchyCode_1_agg',
46811
- fieldKey: 'gdoc:categoryHierarchyCode__1',
46812
- order: 0,
46813
- sendMode: 'queryParam',
46814
- valueType: 'property',
46815
- dataTransformer: 'subject',
46816
- render: {
46817
- type: 'checkbox',
46818
- options: {
46819
- showTotal: true,
46820
- collapse: true,
46821
- },
46822
- },
46823
- },
46824
- },
46825
- {
46826
- type: 'aggregation',
46827
- config: {
46828
- label: 'rmAdvancedSearch.gdocDocumentTypeCode',
46829
- aggregation: 'generaldocument_documentTypeCode_agg',
46830
- fieldKey: 'gdoc:documentTypeCode',
46831
- dataTransformer: 'documentTypee',
46832
- sendMode: 'queryParam',
46833
- render: {
46834
- type: 'checkbox',
46835
- options: {
46836
- showTotal: true,
46837
- filter: true,
46838
- sort: true,
46839
- collapse: true,
46840
- },
46841
- },
46842
- },
46843
- },
46844
- {
46845
- type: 'predicate',
46846
- config: {
46847
- label: 'FILTERS.gdocDocumentSubject',
46848
- fieldKey: 'gdoc:documentSubject',
46849
- sendMode: 'payload',
46850
- valueType: 'valueObject',
46851
- render: {
46852
- type: 'input',
46853
- options: {
46854
- delay: 300,
46855
- suffix: {
46856
- dropdown: {
46857
- items: [
46858
- {
46859
- key: 'OPERATORS.equals',
46860
- value: '=',
46861
- },
46862
- {
46863
- key: 'OPERATORS.notEquals',
46864
- value: '!=',
46865
- },
46866
- {
46867
- key: 'OPERATORS.like',
46868
- value: 'LIKE',
46869
- },
46870
- {
46871
- key: 'OPERATORS.iLike',
46872
- value: 'ILIKE',
46873
- },
46874
- ],
46875
- },
46876
- },
46877
- },
46878
- },
46879
- },
46880
- },
46881
- {
46882
- type: 'predicate',
46883
- config: {
46884
- label: 'FILTERS.dcTitle',
46885
- fieldKey: 'dc:title',
46886
- sendMode: 'payload',
46887
- valueType: 'valueObject',
46888
- render: {
46889
- type: 'input',
46890
- options: {
46891
- delay: 300,
46892
- suffix: {
46893
- dropdown: {
46894
- items: [
46895
- {
46896
- key: 'OPERATORS.equals',
46897
- value: '=',
46898
- },
46899
- {
46900
- key: 'OPERATORS.notEquals',
46901
- value: '!=',
46902
- },
46903
- {
46904
- key: 'OPERATORS.like',
46905
- value: 'LIKE',
46906
- },
46907
- {
46908
- key: 'OPERATORS.iLike',
46909
- value: 'ILIKE',
46910
- },
46911
- ],
46912
- },
46913
- },
46914
- },
46915
- },
46916
- },
46917
- },
46918
- {
46919
- type: 'predicate',
46920
- config: {
46921
- label: 'FILTERS.documentNumber',
46922
- fieldKey: 'gdoc:documentReferenceNumber',
46923
- sendMode: 'payload',
46924
- valueType: 'valueObject',
46925
- render: {
46926
- type: 'input',
46927
- options: {
46928
- debounceTime: 300,
46929
- suffix: {
46930
- dropdown: {
46931
- items: [
46932
- {
46933
- key: 'OPERATORS.equals',
46934
- value: '=',
46935
- },
46936
- {
46937
- key: 'OPERATORS.notEquals',
46938
- value: '!=',
46939
- },
46940
- {
46941
- key: 'OPERATORS.like',
46942
- value: 'LIKE',
46943
- },
46944
- {
46945
- key: 'OPERATORS.iLike',
46946
- value: 'ILIKE',
46947
- },
46948
- ],
46949
- },
46950
- },
46951
- },
46952
- },
46953
- },
46954
- },
46955
- {
46956
- type: 'predicate',
46957
- config: {
46958
- label: 'FILTERS.recUnifiedNumber',
46959
- fieldKey: 'recdef:unifiedNumber',
46960
- sendMode: 'payload',
46961
- valueType: 'valueObject',
46962
- render: {
46963
- type: 'input',
46964
- options: {
46965
- delay: 300,
46966
- suffix: {
46967
- dropdown: {
46968
- items: [
46969
- {
46970
- key: 'OPERATORS.equals',
46971
- value: '=',
46972
- },
46973
- {
46974
- key: 'OPERATORS.notEquals',
46975
- value: '!=',
46976
- },
46977
- {
46978
- key: 'OPERATORS.like',
46979
- value: 'LIKE',
46980
- },
46981
- {
46982
- key: 'OPERATORS.iLike',
46983
- value: 'ILIKE',
46984
- },
46985
- ],
46986
- },
46987
- },
46988
- },
46989
- },
46990
- },
46991
- },
46992
- {
46993
- type: 'aggregation',
46994
- config: {
46995
- label: 'FILTERS.recPhysicalOriginal',
46996
- aggregation: 'RecordDefinition_physicalOriginal_agg',
46997
- fieldKey: 'recdef:physicalOriginal',
46998
- prefix: 'FILTERS.BUCKETS.physicalOriginal.',
46999
- sendMode: 'queryParam',
47000
- render: {
47001
- type: 'checkbox',
47002
- options: {
47003
- showTotal: true,
47004
- },
47005
- },
47006
- },
47007
- },
47008
- {
47009
- type: 'aggregation',
47010
- config: {
47011
- label: 'rmAdvancedSearch.gdocSecrecyLevel',
47012
- aggregation: 'generaldocument_secrecyLevel_agg',
47013
- fieldKey: 'gdoc:secrecyLevel',
47014
- prefix: 'search.buckets.',
47015
- sendMode: 'queryParam',
47016
- render: {
47017
- type: 'checkbox',
47018
- options: {
47019
- showTotal: true,
47020
- },
47021
- },
47022
- },
47023
- },
47024
- {
47025
- type: 'predicate',
47026
- config: {
47027
- label: 'FILTERS.tags',
47028
- fieldKey: 'ecm:tag',
47029
- sendMode: 'payload',
47030
- valueType: 'valueObject',
47031
- render: {
47032
- type: 'input',
47033
- options: {
47034
- delay: 300,
47035
- suffix: {
47036
- dropdown: {
47037
- items: [
47038
- {
47039
- key: 'OPERATORS.equals',
47040
- value: '=',
47041
- },
47042
- {
47043
- key: 'OPERATORS.notEquals',
47044
- value: '!=',
47045
- },
47046
- {
47047
- key: 'OPERATORS.like',
47048
- value: 'LIKE',
47049
- },
47050
- {
47051
- key: 'OPERATORS.iLike',
47052
- value: 'ILIKE',
47053
- },
47054
- ],
47055
- },
47056
- },
47057
- },
47058
- },
47059
- },
47060
- },
47061
- {
47062
- type: 'aggregation',
47063
- config: {
47064
- label: 'FILTERS.priority',
47065
- aggregation: 'generaldocument_importance_agg',
47066
- fieldKey: 'gdoc:importance',
47067
- prefix: 'search.buckets.',
47068
- sendMode: 'queryParam',
47069
- render: {
47070
- type: 'checkbox',
47071
- options: {
47072
- showTotal: true,
47073
- },
47074
- },
47075
- },
47076
- },
47077
- {
47078
- type: 'aggregation',
47079
- config: {
47080
- label: 'FILTERS.dcCreated',
47081
- aggregation: 'dublincore_created_agg',
47082
- fieldKey: 'dc:created',
47083
- prefix: 'search.buckets.',
47084
- sendMode: 'queryParam',
47085
- tooltip: {
47086
- type: 'date',
47087
- properties: {
47088
- from: 'from',
47089
- to: 'to',
47090
- },
47091
- },
47092
- render: {
47093
- type: 'checkbox',
47094
- options: {
47095
- showTotal: true,
47096
- },
47097
- },
47098
- },
47099
- },
47100
- {
47101
- type: 'aggregation',
47102
- config: {
47103
- label: 'rmAdvancedSearch.gdocGDocumentDate',
47104
- aggregation: 'generaldocument_gDocumentDate_agg',
47105
- fieldKey: 'gdoc:gDocumentDate',
47106
- prefix: 'search.buckets.',
47107
- sendMode: 'custom',
47108
- valueType: 'valueObject',
47109
- render: {
47110
- type: 'dateList',
47111
- view: 'list',
47112
- options: {
47113
- showTotal: true,
47114
- minMax: true,
47115
- },
47116
- },
47117
- },
47118
- },
47119
- {
47120
- type: 'aggregation',
47121
- config: {
47122
- label: 'rmAdvancedSearch.saveTypee',
47123
- aggregation: 'RetentionInfo_saveTypee_agg',
47124
- fieldKey: 'retentioninfo:saveTypee',
47125
- prefix: 'FILTERS.BUCKETS.physicalOriginal.',
47126
- sendMode: 'queryParam',
47127
- render: {
47128
- type: 'checkbox',
47129
- options: {
47130
- showTotal: true,
47131
- },
47132
- },
47133
- },
47134
- },
47135
- {
47136
- type: 'aggregation',
47137
- config: {
47138
- label: 'rmAdvancedSearch.retentionPlan',
47139
- aggregation: 'RetentionInfo_status_agg',
47140
- fieldKey: 'retentioninfo:status',
47141
- prefix: 'FILTERS.BUCKETS.physicalOriginal.',
47142
- sendMode: 'queryParam',
47143
- render: {
47144
- type: 'checkbox',
47145
- options: {
47146
- showTotal: true,
47147
- },
47148
- },
47149
- },
47150
- },
47151
- {
47152
- type: 'aggregation',
47153
- config: {
47154
- label: 'FILTERS.startDateActiveRetention',
47155
- aggregation: 'RetentionInfo_activeRetentionStartDateHijri_agg',
47156
- fieldKey: 'retentioninfo:activeRetentionStartDateHijri',
47157
- prefix: 'search.buckets.',
47158
- sendMode: 'queryParam',
47159
- permission: 'hasRoleOnArchiveOrLoan',
47160
- tooltip: {
47161
- type: 'date',
47162
- properties: {
47163
- from: 'from',
47164
- to: 'to',
47165
- },
47166
- },
47167
- render: {
47168
- type: 'checkbox',
47169
- options: {
47170
- showTotal: true,
47171
- },
47172
- },
47173
- },
47174
- },
47175
- {
47176
- type: 'aggregation',
47177
- config: {
47178
- label: 'FILTERS.endDateActiveRetention',
47179
- aggregation: 'RetentionInfo_activeRetentionEndDateHijri_agg',
47180
- fieldKey: 'retentioninfo:activeRetentionEndDateHijri',
47181
- prefix: 'search.buckets.',
47182
- sendMode: 'queryParam',
47183
- permission: 'hasRoleOnArchiveOrLoan',
47184
- tooltip: {
47185
- type: 'date',
47186
- properties: {
47187
- from: 'from',
47188
- to: 'to',
47189
- },
47190
- },
47191
- render: {
47192
- type: 'checkbox',
47193
- options: {
47194
- showTotal: true,
47195
- },
47196
- },
47197
- },
47198
- },
47199
- {
47200
- type: 'aggregation',
47201
- config: {
47202
- label: 'FILTERS.endDateRetention',
47203
- aggregation: 'RetentionInfo_retentionEndDateHijri_agg',
47204
- fieldKey: 'retentioninfo:retentionEndDateHijri',
47205
- prefix: 'search.buckets.',
47206
- sendMode: 'queryParam',
47207
- permission: 'hasRoleOnArchiveOrLoan',
47208
- tooltip: {
47209
- type: 'date',
47210
- properties: {
47211
- from: 'from',
47212
- to: 'to',
47213
- },
47214
- },
47215
- render: {
47216
- type: 'checkbox',
47217
- options: {
47218
- showTotal: true,
47219
- },
47220
- },
47221
- },
47222
- },
47223
- {
47224
- type: 'aggregation',
47225
- config: {
47226
- label: 'rmAdvancedSearch.locationReference_site_agg',
47227
- aggregation: 'LocationReferenceSchema_site_agg',
47228
- permission: 'hasRoleOnArchiveOrLoan',
47229
- fieldKey: 'locRef:site',
47230
- order: 0,
47231
- sendMode: 'queryParam',
47232
- valueType: 'property',
47233
- dataTransformer: 'site',
47234
- render: {
47235
- type: 'checkbox',
47236
- options: {
47237
- showTotal: true,
47238
- },
47239
- },
47240
- },
47241
- },
47242
- {
47243
- type: 'aggregation',
47244
- config: {
47245
- label: 'rmAdvancedSearch.locationReference_store_agg',
47246
- aggregation: 'LocationReferenceSchema_store_agg',
47247
- fieldKey: 'locRef:store',
47248
- permission: 'hasRoleOnArchiveOrLoan',
47249
- order: 0,
47250
- sendMode: 'queryParam',
47251
- valueType: 'property',
47252
- dataTransformer: 'store',
47253
- render: {
47254
- type: 'checkbox',
47255
- options: {
47256
- showTotal: true,
47257
- },
47258
- },
47259
- },
47260
- },
47261
- {
47262
- type: 'predicate',
47263
- config: {
47264
- label: 'rmAdvancedSearch.locationReference_box',
47265
- fieldKey: 'locRef:boxCode',
47266
- permission: 'hasRoleOnArchiveOrLoan',
47267
- sendMode: 'payload',
47268
- valueType: 'valueObject',
47269
- render: {
47270
- type: 'input',
47271
- options: {
47272
- debounceTime: 400,
47273
- mask: {
47274
- mask: '00-00-00-00-000',
47275
- dropSpecialCharacters: false,
47276
- showMaskTyped: true,
47277
- },
47278
- suffix: {
47279
- dropdown: {
47280
- items: [
47281
- {
47282
- key: 'OPERATORS.equals',
47283
- value: '=',
47284
- },
47285
- {
47286
- key: 'OPERATORS.notEquals',
47287
- value: '!=',
47288
- },
47289
- {
47290
- key: 'OPERATORS.like',
47291
- value: 'LIKE',
47292
- },
47293
- {
47294
- key: 'OPERATORS.iLike',
47295
- value: 'ILIKE',
47296
- },
47297
- ],
47298
- },
47299
- },
47300
- },
47301
- },
47302
- },
47303
- },
47304
- ],
47305
- },
47306
- search: {
47307
- fieldKey: 'ecm:fulltext',
47308
- searchMode: 'triggered',
47309
- suffix: {
47310
- dialog: {
47311
- title: 'INFO.dialogTitle',
47312
- content: [
47313
- '##INFO.query_sequence##',
47314
- '##INFO.query_and##',
47315
- '##INFO.query_negation##',
47316
- '##INFO.query_prefix##',
47317
- '##INFO.query_historical##',
47318
- '##INFO.query_or##',
47319
- '##INFO.query_phrase##',
47320
- ],
47321
- },
47322
- },
47323
- },
47324
- tableMode: {
47325
- mode: 'list',
47326
- componentName: 'rms.components.advancedSearchCard',
47327
- toggleMode: true,
47328
- availableMode: [
47329
- {
47330
- value: 'list',
47331
- icon: 'table_rows',
47332
- },
47333
- {
47334
- value: 'custom',
47335
- icon: 'rectangle',
47336
- },
47337
- ],
47338
- },
47339
- },
47340
- scrollbarH: true,
47341
- pageNumber: 1,
47342
- pageSize: 10,
47343
- prefix: 'LISTING.',
47344
- pageProvider: 'PP_RM_Record',
47345
- customUrl: {
47346
- url: '/api/v1/custom-search/pp/PP_RM_Record/execute',
47347
- method: 'POST',
47348
- },
47349
- headers: {
47350
- properties: 'dublincore, file, generaldocument, RecordDefinition,RetentionInfo, LocationReferenceSchema, facetedTag',
47351
- },
47352
- quickFilters: 'After Archiving',
47353
- fullWidth: 'auto',
47354
- fields: {
47355
- systemName: 'recdef:systemName',
47356
- categoryHierarchyCode: 'gdoc:categoryHierarchyCode',
47357
- docTypee: 'gdoc:documentTypeCode',
47358
- subject: 'gdoc:documentSubject',
47359
- title: 'dc:title',
47360
- docNum: 'gdoc:documentReferenceNumber',
47361
- unifiedNumber: 'recdef:unifiedNumber',
47362
- physicalOriginal: 'recdef:physicalOriginal',
47363
- secrecyLevel: 'gdoc:secrecyLevel',
47364
- tags: 'ecm:tag',
47365
- importance: 'gdoc:importance',
47366
- created: 'dc:created',
47367
- gdocumentDate: 'gdoc:gDocumentDate',
47368
- saveTypee: 'retentioninfo:saveTypee',
47369
- retentioninfoStatus: 'retentioninfo:status',
47370
- activeRetentionStartDateHijri: 'retentioninfo:activeRetentionStartDateHijri',
47371
- activeRetentionEndDateHijri: 'retentioninfo:activeRetentionEndDateHijri',
47372
- retentionEndDateHijri: 'retentioninfo:retentionEndDateHijri',
47373
- site: 'locRef:site',
47374
- store: 'locRef:store',
47375
- box: 'locRef:boxCode',
47376
- file: 'file:content',
47377
- },
47378
- columns: [
47379
- {
47380
- name: 'systemName',
47381
- prop: 'properties.systemName',
47382
- display: true,
47383
- type: 'custom',
47384
- template: 'common.components.systemName',
47385
- translatePrefix: 'search.buckets',
47386
- isOrginalKey: true,
47387
- sortable: false,
47388
- headerClass: 'recdef:systemName',
47389
- defaultVisible: true,
47390
- minWidth: 150,
47391
- },
47392
- {
47393
- name: 'categoryHierarchyCode',
47394
- prop: 'properties.categoryHierarchyCode',
47395
- display: true,
47396
- type: 'custom',
47397
- template: 'rms.components.mainAndSecondaryCategory',
47398
- mainCategory: true,
47399
- sortable: true,
47400
- headerClass: 'gdoc:categoryHierarchyCode',
47401
- defaultVisible: true,
47402
- },
47403
- {
47404
- name: 'categoryHierarchyCode1',
47405
- prop: 'properties.categoryHierarchyCode',
47406
- display: true,
47407
- type: 'custom',
47408
- template: 'rms.components.mainAndSecondaryCategory',
47409
- mainCategory: false,
47410
- sortable: true,
47411
- headerClass: 'gdoc:categoryHierarchyCode',
47412
- defaultVisible: true,
47413
- },
47414
- {
47415
- name: 'Doc_Type',
47416
- prop: 'properties.docTypee',
47417
- display: true,
47418
- template: 'common.components.documentType',
47419
- type: 'custom',
47420
- headerClass: 'gdoc:documentTypeCode',
47421
- defaultVisible: true,
47422
- },
47423
- {
47424
- name: 'Doc_subject',
47425
- prop: 'properties.subject',
47426
- display: true,
47427
- type: 'text',
47428
- headerClass: 'gdoc:documentSubject',
47429
- defaultVisible: true,
47430
- },
47431
- {
47432
- name: 'Doc_Name',
47433
- prop: 'properties.title',
47434
- display: true,
47435
- type: 'custom',
47436
- template: 'common.components.titleWithIcon',
47437
- sortable: true,
47438
- headerClass: 'dc:title',
47439
- defaultVisible: false,
47440
- },
47441
- {
47442
- name: 'Doc_RefernceNum',
47443
- prop: 'properties.docNum',
47444
- display: true,
47445
- type: 'text',
47446
- sortable: true,
47447
- headerClass: 'gdoc:documentReferenceNumber',
47448
- defaultVisible: true,
47449
- },
47450
- {
47451
- name: 'unifiedNumber',
47452
- prop: 'properties.unifiedNumber',
47453
- display: true,
47454
- type: 'text',
47455
- sortable: true,
47456
- headerClass: 'recdef:unifiedNumber',
47457
- defaultVisible: true,
47458
- },
47459
- {
47460
- name: 'physicalOriginal',
47461
- prop: 'properties.physicalOriginal',
47462
- display: true,
47463
- type: 'custom',
47464
- template: 'rms.components.TranslatedValueColumn',
47465
- translatePrefix: 'rmDocumentUpload.hasPhysicalOriginal',
47466
- isBooleanValue: true,
47467
- sortable: false,
47468
- headerClass: 'recdef:physicalOriginal',
47469
- defaultVisible: false,
47470
- minWidth: 150,
47471
- },
47472
- {
47473
- name: 'secrecyLevel',
47474
- prop: 'properties.secrecyLevel',
47475
- display: true,
47476
- type: 'custom',
47477
- template: 'common.components.coloredSecrecyLevel',
47478
- headerClass: 'gdoc:secrecyLevel',
47479
- defaultVisible: true,
47480
- minWidth: 150,
47481
- },
47482
- {
47483
- name: 'tags',
47484
- prop: 'properties.tags',
47485
- display: true,
47486
- type: 'custom',
47487
- template: 'common.components.tags',
47488
- translatePrefix: 'search.buckets',
47489
- isOrginalKey: true,
47490
- sortable: false,
47491
- headerClass: 'ecm:tag',
47492
- defaultVisible: false,
47493
- minWidth: 150,
47494
- },
47495
- {
47496
- name: 'importance',
47497
- prop: 'properties.importance',
47498
- display: true,
47499
- translatePrefix: 'search.buckets',
47500
- type: 'custom',
47501
- template: 'rms.components.TranslatedValueColumn',
47502
- sortable: true,
47503
- isOrginalKey: true,
47504
- headerClass: 'gdoc:importance',
47505
- defaultVisible: false,
47506
- },
47507
- {
47508
- name: 'date_created',
47509
- prop: 'properties.created',
47510
- display: true,
47511
- type: 'custom',
47512
- template: 'common.components.dateWithoutTime',
47513
- headerClass: 'dc:created',
47514
- defaultVisible: false,
47515
- minWidth: 150,
47516
- },
47517
- {
47518
- name: 'docDate',
47519
- prop: 'properties.gdocumentDate',
47520
- display: true,
47521
- type: 'custom',
47522
- template: 'common.components.dateWithoutTime',
47523
- headerClass: 'gdoc:gDocumentDate',
47524
- defaultVisible: false,
47525
- },
47526
- {
47527
- name: 'retentionType',
47528
- prop: 'properties.saveTypee',
47529
- display: true,
47530
- translatePrefix: 'search.buckets',
47531
- type: 'custom',
47532
- template: 'rms.components.TranslatedValueColumn',
47533
- headerClass: 'retentioninfo:saveTypee',
47534
- defaultVisible: false,
47535
- },
47536
- {
47537
- name: 'retentioninfoStatus',
47538
- prop: 'properties.retentioninfoStatus',
47539
- display: true,
47540
- translatePrefix: 'search.buckets',
47541
- type: 'custom',
47542
- template: 'rms.components.TranslatedValueColumn',
47543
- headerClass: 'retentioninfo:status',
47544
- defaultVisible: false,
47545
- },
47546
- {
47547
- name: 'activeRetentionStartDateHijri',
47548
- prop: 'properties.activeRetentionStartDateHijri',
47549
- display: false,
47550
- type: 'custom',
47551
- template: 'common.components.hijri',
47552
- headerClass: 'retentioninfo:activeRetentionStartDateHijri',
47553
- defaultVisible: false,
47554
- },
47555
- {
47556
- name: 'activeRetentionEndDateHijri',
47557
- prop: 'properties.activeRetentionEndDateHijri',
47558
- display: false,
47559
- type: 'custom',
47560
- template: 'common.components.hijri',
47561
- headerClass: 'retentioninfo:activeRetentionEndDateHijri',
47562
- defaultVisible: false,
47563
- },
47564
- {
47565
- name: 'retentionEndDateHijri',
47566
- prop: 'properties.retentionEndDateHijri',
47567
- display: false,
47568
- type: 'custom',
47569
- template: 'common.components.hijri',
47570
- headerClass: 'retentioninfo:retentionEndDateHijri',
47571
- defaultVisible: true,
47572
- },
47573
- {
47574
- name: 'site',
47575
- prop: 'properties.site',
47576
- display: false,
47577
- type: 'custom',
47578
- template: 'common.components.site',
47579
- headerClass: 'locRef:site',
47580
- defaultVisible: true,
47581
- },
47582
- {
47583
- name: 'store',
47584
- prop: 'properties.store',
47585
- display: false,
47586
- type: 'custom',
47587
- template: 'common.components.store',
47588
- headerClass: 'locRef:store',
47589
- defaultVisible: true,
47590
- },
47591
- {
47592
- name: 'Box',
47593
- prop: 'properties.box',
47594
- display: false,
47595
- type: 'custom',
47596
- template: 'common.components.box',
47597
- headerClass: 'locRef:boxCode',
47598
- defaultVisible: true,
47599
- },
47600
- ],
47601
- columnsWithDynamicDisplay: [
47602
- 'activeRetentionStartDateHijri',
47603
- 'activeRetentionEndDateHijri',
47604
- 'retentionEndDateHijri',
47605
- 'site',
47606
- 'store',
47607
- 'Box',
47608
- ],
47609
- };
47610
- var REPORTS_DATA = {
47611
- request: {
47612
- pageProvider: 'PP_RPT_Expected_TransferArchive_Records',
47613
- customUrl: {
47614
- url: '/custom-search/pp/PP_RPT_Expected_TransferArchive_Records/execute',
47615
- method: 'post',
47616
- },
47617
- params: {
47618
- pageSize: 1,
47619
- },
47620
- },
47621
- filters: {
47622
- mode: 'payload',
47623
- visible: true,
47624
- togglePanel: true,
47625
- fields: [
47626
- {
47627
- type: 'aggregation',
47628
- config: {
47629
- label: 'rmAdvancedSearch.gdocCategoryHierarchyCode',
47630
- aggregation: 'generaldocument_categoryHierarchyCode_agg',
47631
- fieldKey: 'gdoc:categoryHierarchyCode',
47632
- dataTransformer: 'subject',
47633
- order: 0,
47634
- sendMode: 'queryParam',
47635
- valueType: 'property',
47636
- render: {
47637
- type: 'checkbox',
47638
- options: {
47639
- showTotal: true,
47640
- },
47641
- },
47642
- },
47643
- },
47644
- {
47645
- type: 'aggregation',
47646
- config: {
47647
- label: 'rmAdvancedSearch.gdocCategoryHierarchyCode1',
47648
- aggregation: 'generaldocument_categoryHierarchyCode_1_agg',
47649
- fieldKey: 'gdoc:categoryHierarchyCode__1',
47650
- order: 0,
47651
- sendMode: 'queryParam',
47652
- valueType: 'property',
47653
- dataTransformer: 'subject',
47654
- render: {
47655
- type: 'checkbox',
47656
- options: {
47657
- showTotal: true,
47658
- collapse: true,
47659
- },
47660
- },
47661
- },
47662
- },
47663
- ],
47664
- },
47665
- reports: {
47666
- details: {
47667
- enabled: true,
47668
- prefix: 'LISTING.',
47669
- // quickFilters: 'After Archiving',
47670
- columnsOptions: {
47671
- toggle: true,
47672
- sortable: {
47673
- enabled: true,
47674
- },
47675
- },
47676
- request: {
47677
- headers: {
47678
- properties: 'dublincore, file, generaldocument, RecordDefinition,retentioninfo',
47679
- },
47680
- },
47681
- fields: {
47682
- title: 'dc:title',
47683
- subject: 'gdoc:documentSubject',
47684
- docTypee: 'gdoc:documentTypeCode',
47685
- secrecyLevel: 'gdoc:secrecyLevel',
47686
- docTypeId: 'documenttypee:documentTypeId',
47687
- created: 'dc:created',
47688
- department: 'department',
47689
- file: 'file:content',
47690
- systemName: 'recdef:systemName',
47691
- docNum: 'gdoc:documentReferenceNumber',
47692
- physicalOriginal: 'recdef:physicalOriginal',
47693
- gdocumentDate: 'gdoc:gDocumentDate',
47694
- importance: 'gdoc:importance',
47695
- unifiedNumber: 'recdef:unifiedNumber',
47696
- creator: 'dc:creator',
47697
- saveTypee: 'retentioninfo:saveTypee',
47698
- },
47699
- columns: [
47700
- {
47701
- name: 'Doc_Name',
47702
- prop: 'properties.title',
47703
- display: true,
47704
- type: 'custom',
47705
- template: 'common.components.titleWithIcon',
47706
- sortable: true,
47707
- headerClass: 'dc:title',
47708
- defaultVisible: true,
47709
- },
47710
- {
47711
- name: 'systemName',
47712
- prop: 'properties.systemName',
47713
- display: true,
47714
- type: 'custom',
47715
- template: 'common.components.systemName',
47716
- translatePrefix: 'search.buckets',
47717
- isOrginalKey: true,
47718
- sortable: false,
47719
- headerClass: 'recdef:systemName',
47720
- defaultVisible: true,
47721
- },
47722
- {
47723
- name: 'Doc_RefernceNum',
47724
- prop: 'properties.docNum',
47725
- display: true,
47726
- type: 'text',
47727
- sortable: true,
47728
- headerClass: 'gdoc:documentReferenceNumber',
47729
- defaultVisible: true,
47730
- },
47731
- {
47732
- name: 'Doc_Type',
47733
- prop: 'properties.docTypee',
47734
- display: true,
47735
- template: 'common.components.documentType',
47736
- type: 'custom',
47737
- headerClass: 'gdoc:documentTypeCode',
47738
- defaultVisible: false,
47739
- },
47740
- {
47741
- name: 'retentionType',
47742
- prop: 'properties.saveTypee',
47743
- display: true,
47744
- type: 'text',
47745
- translatePrefix: 'vocabulary.VOC_SaveType',
47746
- headerClass: 'retentioninfo:saveTypee',
47747
- defaultVisible: false,
47748
- },
47749
- {
47750
- name: 'physicalOriginal',
47751
- prop: 'properties.physicalOriginal',
47752
- display: true,
47753
- type: 'custom',
47754
- template: 'rms.components.TranslatedValueColumn',
47755
- translatePrefix: 'rmDocumentUpload.hasPhysicalOriginal',
47756
- isBooleanValue: true,
47757
- sortable: false,
47758
- headerClass: 'recdef:physicalOriginal',
47759
- defaultVisible: false,
47760
- },
47761
- {
47762
- name: 'mainTopic',
47763
- prop: 'properties.subject',
47764
- display: true,
47765
- type: 'text',
47766
- headerClass: 'gdoc:documentSubject',
47767
- defaultVisible: false,
47768
- },
47769
- {
47770
- name: 'docDate',
47771
- prop: 'properties.gdocumentDate',
47772
- display: true,
47773
- type: 'custom',
47774
- template: 'common.components.dateWithoutTime',
47775
- headerClass: 'gdoc:gDocumentDate',
47776
- defaultVisible: true,
47777
- },
47778
- {
47779
- name: 'secrecyLevel',
47780
- prop: 'properties.secrecyLevel',
47781
- display: true,
47782
- type: 'custom',
47783
- template: 'common.components.coloredSecrecyLevel',
47784
- headerClass: 'gdoc:secrecyLevel',
47785
- defaultVisible: true,
47786
- },
47787
- {
47788
- name: 'importance',
47789
- prop: 'properties.importance',
47790
- display: true,
47791
- translatePrefix: 'search.buckets',
47792
- type: 'custom',
47793
- template: 'rms.components.TranslatedValueColumn',
47794
- sortable: true,
47795
- isOrginalKey: true,
47796
- headerClass: 'gdoc:importance',
47797
- },
47798
- {
47799
- name: 'unifiedNumber',
47800
- prop: 'properties.unifiedNumber',
47801
- display: true,
47802
- type: 'text',
47803
- sortable: true,
47804
- headerClass: 'recdef:unifiedNumber',
47805
- },
47806
- {
47807
- name: 'docDate',
47808
- prop: 'properties.created',
47809
- display: true,
47810
- type: 'custom',
47811
- template: 'common.components.dateWithoutTime',
47812
- headerClass: 'dc:created',
47813
- defaultVisible: false,
47814
- },
47815
- {
47816
- name: 'creator',
47817
- prop: 'properties.creator',
47818
- display: true,
47819
- type: 'text',
47820
- sortable: true,
47821
- headerClass: 'dc:creator',
47822
- defaultVisible: false,
47823
- },
47824
- {
47825
- name: 'documentType',
47826
- prop: 'properties.docTypeId',
47827
- display: true,
47828
- type: 'custom',
47829
- template: 'common.components.documentType',
47830
- headerClass: 'gdoc:documentTypeCode',
47831
- defaultVisible: false,
47832
- },
47833
- {
47834
- name: 'orgUnit',
47835
- prop: 'department.title',
47836
- display: true,
47837
- type: 'custom',
47838
- template: 'common.components.departement',
47839
- headerClass: 'recdef:departmentCode',
47840
- sortable: false,
47841
- defaultVisible: false,
47842
- },
47843
- ],
47844
- },
47845
- items: [
47846
- {
47847
- id: 'resultsCount',
47848
- label: 'REPORTS.resultsCount',
47849
- mode: 'digit',
47850
- datasource: {
47851
- propertyPath: 'resultsCount',
47852
- },
47853
- },
47854
- {
47855
- id: 'future__gdocCategoryHierarchyCode',
47856
- label: 'REPORTS.gdocCategoryHierarchyCode',
47857
- mode: 'graph',
47858
- print: true,
47859
- dialog: {
47860
- active: true,
47861
- },
47862
- details: {
47863
- enabled: true,
47864
- },
47865
- datasource: [
47866
- {
47867
- propertyPath: 'aggregations.generaldocument_categoryHierarchyCode_agg.buckets',
47868
- dataFormat: 'subject',
47869
- transformer: 'reduceData',
47870
- },
47871
- ],
47872
- chart: {
47873
- type: 'pie',
47874
- plugins: [
47875
- 'chartDataLabels',
47876
- 'scrollableLegends',
47877
- 'doughnutEmptyState',
47878
- ],
47879
- },
47880
- },
47881
- {
47882
- id: 'future__generaldocument_categoryHierarchyCode_1_agg',
47883
- label: 'REPORTS.gdocCategoryHierarchyCode1',
47884
- mode: 'graph',
47885
- print: true,
47886
- dialog: {
47887
- active: true,
47888
- },
47889
- details: {
47890
- enabled: true,
47891
- },
47892
- datasource: [
47893
- {
47894
- propertyPath: 'aggregations.generaldocument_categoryHierarchyCode_1_agg.buckets',
47895
- dataFormat: 'subject',
47896
- transformer: 'reduceData',
47897
- },
47898
- ],
47899
- chart: {
47900
- type: 'doughnut',
47901
- plugins: [
47902
- 'chartDataLabels',
47903
- 'scrollableLegends',
47904
- 'doughnutEmptyState',
47905
- ],
47906
- },
47907
- },
47908
- {
47909
- id: 'future__generaldocument_secrecyLevel_agg',
47910
- label: 'REPORTS.gdocSecrecyLevel',
47911
- mode: 'graph',
47912
- print: true,
47913
- dialog: {
47914
- active: true,
47915
- },
47916
- prefix: 'search.buckets.',
47917
- details: {
47918
- enabled: true,
47919
- },
47920
- datasource: [
47921
- {
47922
- propertyPath: 'aggregations.generaldocument_secrecyLevel_agg.buckets',
47923
- transformer: 'reduceData',
47924
- },
47925
- ],
47926
- chart: {
47927
- type: 'bar',
47928
- options: {
47929
- indexAxis: 'y',
47930
- responsive: true,
47931
- maintainAspectRatio: false,
47932
- scales: {
47933
- x: {
47934
- ticks: {
47935
- stepSize: 1,
47936
- },
47937
- grid: {
47938
- color: '#eee',
47939
- },
47940
- },
47941
- y: {
47942
- ticks: {
47943
- precision: 0,
47944
- stepSize: 1,
47945
- color: '#000',
47946
- crossAlign: 'far',
47947
- callback: function (_, index) {
47948
- var label = "" + this.getLabels()[index];
47949
- var maxLength = 18;
47950
- return (label === null || label === void 0 ? void 0 : label.length) > maxLength
47951
- ? label.substring(0, maxLength) + '...'
47952
- : label;
47953
- },
47954
- },
47955
- grid: {
47956
- color: '#000',
47957
- },
47958
- },
47959
- },
47960
- plugins: {
47961
- legend: {
47962
- display: false,
47963
- },
47964
- },
47965
- },
47966
- plugins: [
47967
- 'chartDataLabels',
47968
- 'scrollableLegends',
47969
- 'doughnutEmptyState',
47970
- ],
47971
- },
47972
- },
47973
- {
47974
- id: 'future__RetentionInfo_saveTypee_agg',
47975
- label: 'REPORTS.rinfoSaveTypee',
47976
- mode: 'graph',
47977
- print: true,
47978
- prefix: 'search.buckets.',
47979
- details: {
47980
- enabled: true,
47981
- },
47982
- datasource: [
47983
- {
47984
- propertyPath: 'aggregations.RetentionInfo_saveTypee_agg.buckets',
47985
- transformer: 'reduceData',
47986
- },
47987
- ],
47988
- chart: {
47989
- type: 'pie',
47990
- plugins: [
47991
- 'chartDataLabels',
47992
- 'scrollableLegends',
47993
- 'doughnutEmptyState',
47994
- ],
47995
- },
47996
- },
47997
- {
47998
- mode: 'dynamicLine',
47999
- id: 'late_RetentionInfo_activeRetentionExpireDate_agg',
48000
- label: 'REPORTS.expectedTransferDate',
48001
- print: true,
48002
- dialog: {
48003
- active: true,
48004
- },
48005
- details: {
48006
- enabled: true,
48007
- },
48008
- request: {
48009
- pageProvider: 'PP_RPT_Expected_TransferArchive_Records',
48010
- customUrl: {
48011
- url: '/custom-search/pp/PP_RPT_Expected_TransferArchive_Records/execute',
48012
- method: 'post',
48013
- },
48014
- },
48015
- datasource: [
48016
- {
48017
- aggregation: 'RetentionInfo_activeRetentionExpireDate_agg',
48018
- propertyPath: 'aggregations.RetentionInfo_activeRetentionExpireDate_agg.buckets',
48019
- transformer: 'timeFormat',
48020
- },
48021
- ],
48022
- chart: {
48023
- type: 'line',
48024
- options: {
48025
- layout: {
48026
- padding: {
48027
- right: 40,
48028
- left: 40,
48029
- },
48030
- },
48031
- },
48032
- datasets: [
48033
- {
48034
- borderWidth: 2,
48035
- borderColor: '#000',
48036
- pointBorderWidth: 0,
48037
- pointBackgroundColor: '#000',
48038
- },
48039
- ],
48040
- },
48041
- },
48042
- {
48043
- id: 'future__RecordDefinition_systemName_agg',
48044
- label: 'REPORTS.rdSystemName',
48045
- mode: 'graph',
48046
- print: true,
48047
- dialog: {
48048
- active: true,
48049
- },
48050
- prefix: 'search.buckets.',
48051
- details: {
48052
- enabled: true,
48053
- },
48054
- datasource: [
48055
- {
48056
- propertyPath: 'aggregations.RecordDefinition_systemName_agg.buckets',
48057
- transformer: 'reduceData',
48058
- },
48059
- ],
48060
- chart: {
48061
- type: 'bar',
48062
- direction: 'vertical',
48063
- plugins: [
48064
- 'chartDataLabels',
48065
- 'scrollableLegends',
48066
- 'doughnutEmptyState',
48067
- ],
48068
- },
48069
- },
48070
- ],
48071
- },
48072
- };
48073
-
48074
47040
  var DataAccessService = /** @class */ (function (_super) {
48075
47041
  __extends(DataAccessService, _super);
48076
- function DataAccessService() {
48077
- return _super !== null && _super.apply(this, arguments) || this;
47042
+ function DataAccessService(injector) {
47043
+ return _super.call(this, injector) || this;
48078
47044
  }
48079
- DataAccessService.prototype.getData = function (key, type) {
48080
- if (type == NDF_EDITOR_TYPE.REPORTS) {
48081
- return rxjs.of(JSON.stringify(REPORTS_DATA, null, 2));
48082
- }
48083
- return rxjs.of(JSON.stringify(TABLE_DATA, null, 2));
48084
- };
48085
- DataAccessService.prototype.saveData = function (key, data) {
48086
- return rxjs.of(JSON.stringify(TABLE_DATA, null, 2));
47045
+ DataAccessService.prototype.saveData = function (payload) {
47046
+ return this.customAutomation({
47047
+ operation: 'AC_UA_Create_UI_Configuration',
47048
+ context: payload
47049
+ });
48087
47050
  };
48088
47051
  return DataAccessService;
48089
- }(BaseService));
48090
- DataAccessService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: DataAccessService, deps: null, target: i0__namespace.ɵɵFactoryTarget.Injectable });
47052
+ }(BaseEditorConfigService));
47053
+ DataAccessService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: DataAccessService, deps: [{ token: i0__namespace.Injector }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
48091
47054
  DataAccessService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: DataAccessService, providedIn: 'root' });
48092
47055
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: DataAccessService, decorators: [{
48093
47056
  type: i0.Injectable,
48094
47057
  args: [{
48095
47058
  providedIn: 'root'
48096
47059
  }]
48097
- }] });
47060
+ }], ctorParameters: function () { return [{ type: i0__namespace.Injector }]; } });
47061
+
47062
+ var METADATA_EDITOR_OPTIONS = new i0.InjectionToken('METADATA_EDITOR_CONFIG');
48098
47063
 
48099
47064
  var DataStoreService = /** @class */ (function () {
48100
- function DataStoreService(dataAccessService) {
47065
+ function DataStoreService(dataAccessService, environment, options) {
48101
47066
  this.dataAccessService = dataAccessService;
47067
+ this.environment = environment;
47068
+ this.options = options;
48102
47069
  this._editorTypeSubject = new rxjs.BehaviorSubject(NDF_EDITOR_TYPE.TABLES);
48103
47070
  this.editorType$ = this._editorTypeSubject.asObservable();
48104
47071
  this._editorModeSubject = new rxjs.BehaviorSubject(CONFIG_EDITOR_MODE.EDIT);
@@ -48136,25 +47103,52 @@
48136
47103
  };
48137
47104
  DataStoreService.prototype.getData = function (key, type) {
48138
47105
  var _this = this;
48139
- return this.dataAccessService.getData(key, type).pipe(operators.switchMap(function (data) {
48140
- _this._dataSubject.next(data);
47106
+ var _a, _b;
47107
+ var metadata = ((_a = this.options) === null || _a === void 0 ? void 0 : _a[type]) || {};
47108
+ return this.dataAccessService
47109
+ .fetchData({
47110
+ app: (_b = this.environment) === null || _b === void 0 ? void 0 : _b.appKey,
47111
+ key: key,
47112
+ type: type,
47113
+ localPath: metadata === null || metadata === void 0 ? void 0 : metadata.localPath
47114
+ })
47115
+ .pipe(operators.switchMap(function (res) {
47116
+ var _a, _b;
47117
+ if ((_a = res === null || res === void 0 ? void 0 : res.data) === null || _a === void 0 ? void 0 : _a.config) {
47118
+ var data = JSON.stringify((_b = res === null || res === void 0 ? void 0 : res.data) === null || _b === void 0 ? void 0 : _b.config, null, 2);
47119
+ _this._dataSubject.next(data || '{\n"key": "value"\n}');
47120
+ }
48141
47121
  return _this.editorData$;
48142
47122
  }));
48143
47123
  };
48144
- DataStoreService.prototype.saveData = function (key) {
47124
+ DataStoreService.prototype.saveData = function (key, type) {
47125
+ var _a;
48145
47126
  var data = this._dataSubject.getValue();
48146
- return this.dataAccessService.saveData(key, data);
47127
+ return this.dataAccessService.saveData({
47128
+ app: (_a = this.environment) === null || _a === void 0 ? void 0 : _a.appKey,
47129
+ key: key,
47130
+ type: type,
47131
+ content: data
47132
+ });
48147
47133
  };
48148
47134
  DataStoreService.prototype.storeData = function (data) {
48149
47135
  this._dataSubject.next(data);
48150
47136
  };
48151
47137
  return DataStoreService;
48152
47138
  }());
48153
- DataStoreService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: DataStoreService, deps: [{ token: DataAccessService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
47139
+ DataStoreService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: DataStoreService, deps: [{ token: DataAccessService }, { token: 'environment' }, { token: METADATA_EDITOR_OPTIONS }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
48154
47140
  DataStoreService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: DataStoreService });
48155
47141
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: DataStoreService, decorators: [{
48156
47142
  type: i0.Injectable
48157
- }], ctorParameters: function () { return [{ type: DataAccessService }]; } });
47143
+ }], ctorParameters: function () {
47144
+ return [{ type: DataAccessService }, { type: undefined, decorators: [{
47145
+ type: i0.Inject,
47146
+ args: ['environment']
47147
+ }] }, { type: undefined, decorators: [{
47148
+ type: i0.Inject,
47149
+ args: [METADATA_EDITOR_OPTIONS]
47150
+ }] }];
47151
+ } });
48158
47152
 
48159
47153
  // monaco-loader.service.ts
48160
47154
  var MonacoLoaderService = /** @class */ (function () {
@@ -48606,7 +47600,7 @@
48606
47600
 
48607
47601
  var NdfConfigEditorComponent = /** @class */ (function (_super) {
48608
47602
  __extends(NdfConfigEditorComponent, _super);
48609
- function NdfConfigEditorComponent(environment, dataStore, configService, matDialog, location) {
47603
+ function NdfConfigEditorComponent(environment, dataStore, configService, matDialog, location, toastrService) {
48610
47604
  var _this = this;
48611
47605
  var _a;
48612
47606
  _this = _super.call(this) || this;
@@ -48615,6 +47609,7 @@
48615
47609
  _this.configService = configService;
48616
47610
  _this.matDialog = matDialog;
48617
47611
  _this.location = location;
47612
+ _this.toastrService = toastrService;
48618
47613
  _this.isEditorHasErrors = false;
48619
47614
  _this._defaultEditorOptions = {
48620
47615
  value: "",
@@ -48643,7 +47638,7 @@
48643
47638
  var _this = this;
48644
47639
  this._dataKeySubject
48645
47640
  .pipe(operators.switchMap(function (key) { return _this.dataStore.getData(key, _this.metadata.type); }), operators.takeUntil(this.destroy$))
48646
- .subscribe(function (res) { });
47641
+ .subscribe();
48647
47642
  };
48648
47643
  NdfConfigEditorComponent.prototype.onDataChanged = function (data) {
48649
47644
  this.dataStore.storeData(data);
@@ -48652,7 +47647,13 @@
48652
47647
  this.isEditorHasErrors = hasErrors;
48653
47648
  };
48654
47649
  NdfConfigEditorComponent.prototype.saveData = function () {
48655
- this.dataStore.saveData(this.metadata.key);
47650
+ var _this = this;
47651
+ this.dataStore
47652
+ .saveData(this.metadata.key, this.metadata.type)
47653
+ .pipe(operators.takeUntil(this.destroy$))
47654
+ .subscribe(function (res) {
47655
+ _this.toastrService.show('success', 'TOASTER.SUCCESS', 'JSON_EDITOR.MESSAGES.dataSaved');
47656
+ });
48656
47657
  };
48657
47658
  NdfConfigEditorComponent.prototype.navigateBack = function () {
48658
47659
  this.location.back();
@@ -48698,7 +47699,7 @@
48698
47699
  };
48699
47700
  return NdfConfigEditorComponent;
48700
47701
  }(DestroySubject));
48701
- NdfConfigEditorComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NdfConfigEditorComponent, deps: [{ token: 'environment' }, { token: DataStoreService }, { token: AppConfigService }, { token: i1__namespace$3.MatDialog }, { token: i4__namespace$1.Location }], target: i0__namespace.ɵɵFactoryTarget.Component });
47702
+ NdfConfigEditorComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NdfConfigEditorComponent, deps: [{ token: 'environment' }, { token: DataStoreService }, { token: AppConfigService }, { token: i1__namespace$3.MatDialog }, { token: i4__namespace$1.Location }, { token: CustomToastrService }], target: i0__namespace.ɵɵFactoryTarget.Component });
48702
47703
  NdfConfigEditorComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: NdfConfigEditorComponent, selector: "app-ndf-config-editor", inputs: { metadata: "metadata", theme: "theme", options: "options" }, providers: [DataStoreService], usesInheritance: true, usesOnChanges: true, ngImport: i0__namespace, template: "<ng-container *ngIf=\"config?.enabled && isFeatureEnabled; else emptyTpl\">\r\n\t<div class=\"ndf-config-editor\" ndfFluidHeight *permission=\"{ name: config?.types[metadata?.type]?.permission }\">\r\n\t\t<div class=\"ndf-config-editor__sidebar\">\r\n\t\t\t<app-editor-settings class=\"ndf-config-editor__setting\"></app-editor-settings>\r\n\t\t\t<app-config-editor-actions\r\n\t\t\t\tappItemHeight\r\n\t\t\t\tcssVar=\"--ndf-editor-actions-height\"\r\n\t\t\t\t[saveDisabled]=\"isEditorHasErrors || !(dataStore.editorData | isValidJson)\"\r\n\t\t\t\t[config]=\"config?.types[metadata?.type]\"\r\n\t\t\t\t(onInfo)=\"openInfoDialog($event)\"\r\n\t\t\t\t(onBack)=\"navigateBack()\"\r\n\t\t\t\t(onSave)=\"saveData()\"\r\n\t\t\t>\r\n\t\t\t</app-config-editor-actions>\r\n\t\t</div>\r\n\t\t<div class=\"ndf-config-editor__content\">\r\n\t\t\t<div class=\"ndf-config-editor__topbar\">\r\n\t\t\t\t<app-editor-mode-switch\r\n\t\t\t\t\t[mode]=\"dataStore.editorMode\"\r\n\t\t\t\t\t(changeMode)=\"dataStore.changeMode($event)\"\r\n\t\t\t\t></app-editor-mode-switch>\r\n\t\t\t</div>\r\n\t\t\t<app-config-preview\r\n\t\t\t\t*ngIf=\"dataStore.editorMode === modes.PREVIEW\"\r\n [type]=\"dataStore.editorType$ | async\"\r\n\t\t\t\t[data]=\"previewData$ | async\"\r\n\t\t\t></app-config-preview>\r\n\t\t\t<ndf-monaco-editor\r\n\t\t\t\t*ngIf=\"dataStore.editorMode === modes.EDIT\"\r\n\t\t\t\t[value]=\"editorData$ | async\"\r\n\t\t\t\t[options]=\"options$ | async\"\r\n\t\t\t\t[theme]=\"theme$ | async\"\r\n\t\t\t\t(valueChange)=\"onDataChanged($event)\"\r\n\t\t\t\t(hasError)=\"onEditorErrors($event)\"\r\n\t\t\t\t(onInit)=\"onEditorReady($event)\"\r\n\t\t\t></ndf-monaco-editor>\r\n\t\t</div>\r\n\t</div>\r\n</ng-container>\r\n\r\n<ng-template #emptyTpl>\r\n\t<div class=\"ndf-empty-config\">\r\n\t\t<app-no-data-found message=\"JSON_EDITOR.MESSAGES.notAllowed\"></app-no-data-found>\r\n\t</div>\r\n</ng-template>\r\n", styles: [":host{display:var(--ndf-config-wrapper-display, flex);flex-direction:var(--ndf-config-wrapper-direction, column);grid-gap:var(--ndf-config-wrapper-gap, .5rem);gap:var(--ndf-config-wrapper-gap, .5rem);flex-grow:1;height:var(--ndf-config-wrapper-height, 100%)}.ndf-empty-config{justify-content:center;align-items:center}.ndf-empty-config,.ndf-config-editor{padding:var(--ndf-editor-padding, 1rem);background-color:var(--ndf-editor-background-color, #fff);color:var(--ndf-editor-color);border-radius:var(--ndf-editor-border-radius, .5rem);display:flex;flex-grow:1;max-height:var(--ndf-fluid-height, 100%)}.ndf-config-editor{grid-gap:var(--ndf-editor--gap, 1rem);gap:var(--ndf-editor--gap, 1rem)}.ndf-config-editor__sidebar{width:var(--ndf-editor-sidebar-width, 18rem);background:var(--ndf-editor-sidebar-background);border:var(--ndf-editor-sidebars-border, 0px solid transparent);border-radius:var(--ndf-editor-sidebar-radius, 0rem);display:grid;grid-template-rows:var(--ndf-editor-sidebar-rows, 1fr auto)}.ndf-config-editor__content{flex-grow:1;background:var(--ndf-editor-content-background);border:var(--ndf-editor-content-border, 0px solid transparent);border-radius:var(--ndf-editor-content-radius, 0rem);display:flex;flex-direction:column;grid-gap:var(--ndf-editor-content-gap, 1rem);gap:var(--ndf-editor-content-gap, 1rem)}.ndf-config-editor__topbar{display:var(--ndf-editor-topbar-display, flex);justify-content:var(--ndf-editor-topbar-justify-content, flex-end)}.ndf-config-editor__setting{max-height:var(--ndf-editor-content-max-height, calc(var(--ndf-fluid-height) - var(--ndf-editor-actions-height, 125px) - 2.5rem));overflow:auto}\n"], components: [{ type: EditorSettingsComponent, selector: "app-editor-settings" }, { type: ConfigEditorActionsComponent, selector: "app-config-editor-actions", inputs: ["saveDisabled", "config"], outputs: ["onSave", "onInfo", "onBack"] }, { type: EditorModeSwitchComponent, selector: "app-editor-mode-switch", inputs: ["mode"], outputs: ["changeMode"] }, { type: ConfigPreviewComponent, selector: "app-config-preview", inputs: ["type", "data"] }, { type: MonacoEditorComponent, selector: "ndf-monaco-editor", inputs: ["value", "options", "theme", "model"], outputs: ["onInit", "hasError", "valueChange"] }, { type: NoDataFoundComponent, selector: "app-no-data-found", inputs: ["message", "width", "height"] }], directives: [{ type: i4__namespace$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: PermissionsDirective, selector: "[permission]", inputs: ["permission"] }, { type: FluidHeightDirective, selector: "[ndfFluidHeight]", inputs: ["minHeight", "ndfFluidHeight", "subtractItems", "decrease", "delay", "cssVar", "calculate", "inlineStyle"], exportAs: ["ndfFluidHeight"] }, { type: ElementHeightDirective, selector: "[appItemHeight]", inputs: ["cssVar", "calculate", "inlineStyle"], exportAs: ["appItemHeight"] }], pipes: { "isValidJson": IsValidJsonPipe, "async": i4__namespace$1.AsyncPipe } });
48703
47704
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NdfConfigEditorComponent, decorators: [{
48704
47705
  type: i0.Component,
@@ -48712,7 +47713,7 @@
48712
47713
  return [{ type: undefined, decorators: [{
48713
47714
  type: i0.Inject,
48714
47715
  args: ['environment']
48715
- }] }, { type: DataStoreService }, { type: AppConfigService }, { type: i1__namespace$3.MatDialog }, { type: i4__namespace$1.Location }];
47716
+ }] }, { type: DataStoreService }, { type: AppConfigService }, { type: i1__namespace$3.MatDialog }, { type: i4__namespace$1.Location }, { type: CustomToastrService }];
48716
47717
  }, propDecorators: { metadata: [{
48717
47718
  type: i0.Input
48718
47719
  }], theme: [{
@@ -48866,9 +47867,11 @@
48866
47867
  exports.BaseChartComponent = BaseChartComponent;
48867
47868
  exports.BaseColumnComponent = BaseColumnComponent;
48868
47869
  exports.BaseComponent = BaseComponent;
47870
+ exports.BaseCustomReport = BaseCustomReport;
48869
47871
  exports.BaseDatePicker = BaseDatePicker;
48870
47872
  exports.BaseDateValueAccessor = BaseDateValueAccessor;
48871
47873
  exports.BaseDialogComponent = BaseDialogComponent;
47874
+ exports.BaseEditorConfigService = BaseEditorConfigService;
48872
47875
  exports.BaseNodeClass = BaseNodeClass;
48873
47876
  exports.BaseSelector = BaseSelector;
48874
47877
  exports.BaseService = BaseService;
@@ -49115,6 +48118,7 @@
49115
48118
  exports.MAT_MOMENT_DATE_ADAPTER_OPTIONS = MAT_MOMENT_DATE_ADAPTER_OPTIONS;
49116
48119
  exports.MAT_MOMENT_DATE_ADAPTER_OPTIONS_FACTORY = MAT_MOMENT_DATE_ADAPTER_OPTIONS_FACTORY;
49117
48120
  exports.MESSAGE_TYPE = MESSAGE_TYPE;
48121
+ exports.METADATA_EDITOR_OPTIONS = METADATA_EDITOR_OPTIONS;
49118
48122
  exports.MIN_VISIBLE_COUNT = MIN_VISIBLE_COUNT;
49119
48123
  exports.MONACO_EDITOR_CONFIG = MONACO_EDITOR_CONFIG;
49120
48124
  exports.MY_MOMENT_FORMATS = MY_MOMENT_FORMATS;