nuxeo-development-framework 6.1.1 → 6.1.2

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 (32) hide show
  1. package/bundles/nuxeo-development-framework.umd.js +793 -638
  2. package/bundles/nuxeo-development-framework.umd.js.map +1 -1
  3. package/esm2015/lib/components/ndf-config-editor/containers/config-preview/config-preview.component.js +1 -1
  4. package/esm2015/lib/components/reports/ndf-reports/components/dynamic-timeline-report/dynamic-timeline-report.component.js +2 -2
  5. package/esm2015/lib/components/reports/ndf-reports/containers/ndf-reports/ndf-reports.component.js +32 -16
  6. package/esm2015/lib/components/reports/ndf-reports/models/common.js +1 -1
  7. package/esm2015/lib/components/reports/ndf-reports/models/dynamic-line.js +1 -1
  8. package/esm2015/lib/components/reports/ndf-reports/models/ndf-reports.config.js +1 -1
  9. package/esm2015/lib/components/reports/ndf-reports/pipes/check-condition.pipe.js +4 -4
  10. package/esm2015/lib/components/reports/ndf-reports/services/dynamic-timeline-report.service.js +26 -31
  11. package/esm2015/lib/components/reports/ndf-reports/services/ndf-reports.service.js +16 -21
  12. package/esm2015/lib/components/reports/ndf-reports/services/reports-hooks.service.js +34 -1
  13. package/esm2015/lib/components/tables/dynamic-table/dynamic-table/dynamic-table.component.js +116 -102
  14. package/esm2015/lib/components/tables/dynamic-table/public-api.js +3 -2
  15. package/esm2015/lib/components/tables/dynamic-table/services/table-hooks.service.js +56 -0
  16. package/esm2015/lib/shared/services/base/base.service.js +9 -10
  17. package/fesm2015/nuxeo-development-framework.js +519 -415
  18. package/fesm2015/nuxeo-development-framework.js.map +1 -1
  19. package/lib/components/reports/ndf-reports/components/dynamic-timeline-report/dynamic-timeline-report.component.d.ts +1 -1
  20. package/lib/components/reports/ndf-reports/containers/ndf-reports/ndf-reports.component.d.ts +9 -3
  21. package/lib/components/reports/ndf-reports/models/common.d.ts +9 -1
  22. package/lib/components/reports/ndf-reports/models/dynamic-line.d.ts +4 -5
  23. package/lib/components/reports/ndf-reports/models/ndf-reports.config.d.ts +1 -0
  24. package/lib/components/reports/ndf-reports/pipes/check-condition.pipe.d.ts +2 -2
  25. package/lib/components/reports/ndf-reports/services/dynamic-timeline-report.service.d.ts +4 -2
  26. package/lib/components/reports/ndf-reports/services/ndf-reports.service.d.ts +6 -6
  27. package/lib/components/reports/ndf-reports/services/reports-hooks.service.d.ts +15 -3
  28. package/lib/components/tables/dynamic-table/dynamic-table/dynamic-table.component.d.ts +23 -9
  29. package/lib/components/tables/dynamic-table/public-api.d.ts +2 -1
  30. package/lib/components/tables/dynamic-table/services/table-hooks.service.d.ts +13 -0
  31. package/lib/shared/services/base/base.service.d.ts +4 -2
  32. package/package.json +1 -1
@@ -1,8 +1,8 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@angular/forms'), require('@angular/material/dialog'), require('@angular/router'), require('@ngx-translate/core'), require('rxjs/operators'), require('rxjs'), require('@angular/animations'), require('ngx-toastr'), require('crypto-js'), require('@angular/cdk/bidi'), require('@angular/common/http'), require('keycloak-angular'), require('ngx-cookie-service'), require('@angular/cdk/coercion'), require('@angular/material/icon'), require('@angular/material/progress-spinner'), require('@angular/material/tooltip'), require('lodash-es'), require('moment'), require('lodash/omit'), require('lodash/assign'), require('lodash/cloneDeep'), require('lodash'), require('@angular/platform-browser'), require('moment-es6'), require('moment-hijri'), require('ngx-infinite-scroll'), require('@angular/material/list'), require('@angular/material/menu'), require('angular-ng-autocomplete'), require('@angular/material/core'), require('@angular/cdk/clipboard'), require('ts-cacheable'), require('@ng-select/ng-select'), require('@angular/material/form-field'), require('@angular/material/chips'), require('@angular/material/expansion'), require('@angular/material/button'), require('@angular/material/checkbox'), require('@angular/material/datepicker'), require('@angular/material/input'), require('@angular/material/radio'), require('@angular/material/slide-toggle'), require('@busacca/ng-pick-datetime'), require('@mat-datetimepicker/core'), require('angular-formio'), require('ngx-treeview'), require('@ng-bootstrap/ng-bootstrap'), require('formiojs'), require('lodash/find'), require('lodash/isEqual'), require('@swimlane/ngx-datatable'), require('@angular/material/button-toggle'), require('@angular/cdk/collections'), require('@angular/cdk/drag-drop'), require('@angular/material/autocomplete'), require('ngx-mask'), require('moment/moment'), require('string-hash'), require('@angular/cdk/layout'), require('dwt'), require('@angular/material/progress-bar'), require('chart.js/auto'), require('chartjs-adapter-moment'), require('devextreme-angular'), require('file-saver'), require('devextreme-angular/ui/nested'), require('@pdftron/webviewer'), require('@angular/material/tabs'), require('@angular/material/divider'), require('@angular/common/locales/ar'), require('@angular/common/locales/en'), require('@rxweb/reactive-form-validators'), require('rete-angular-plugin'), require('rete'), require('rete-area-plugin'), require('rete-auto-arrange-plugin'), require('rete-connection-plugin'), require('rete-connection-reroute-plugin'), require('rete-readonly-plugin'), require('rete-minimap-plugin'), require('d3-shape'), require('rete-connection-path-plugin'), require('rete-render-utils'), require('@angular/material/badge'), require('@angular/material/toolbar'), require('@kurkle/color'), require('ngx-markdown'), require('@angular/cdk/accordion'), require('lodash/flatMap'), require('@angular/material/bottom-sheet')) :
3
- typeof define === 'function' && define.amd ? define('nuxeo-development-framework', ['exports', '@angular/core', '@angular/common', '@angular/forms', '@angular/material/dialog', '@angular/router', '@ngx-translate/core', 'rxjs/operators', 'rxjs', '@angular/animations', 'ngx-toastr', 'crypto-js', '@angular/cdk/bidi', '@angular/common/http', 'keycloak-angular', 'ngx-cookie-service', '@angular/cdk/coercion', '@angular/material/icon', '@angular/material/progress-spinner', '@angular/material/tooltip', 'lodash-es', 'moment', 'lodash/omit', 'lodash/assign', 'lodash/cloneDeep', 'lodash', '@angular/platform-browser', 'moment-es6', 'moment-hijri', 'ngx-infinite-scroll', '@angular/material/list', '@angular/material/menu', 'angular-ng-autocomplete', '@angular/material/core', '@angular/cdk/clipboard', 'ts-cacheable', '@ng-select/ng-select', '@angular/material/form-field', '@angular/material/chips', '@angular/material/expansion', '@angular/material/button', '@angular/material/checkbox', '@angular/material/datepicker', '@angular/material/input', '@angular/material/radio', '@angular/material/slide-toggle', '@busacca/ng-pick-datetime', '@mat-datetimepicker/core', 'angular-formio', 'ngx-treeview', '@ng-bootstrap/ng-bootstrap', 'formiojs', 'lodash/find', 'lodash/isEqual', '@swimlane/ngx-datatable', '@angular/material/button-toggle', '@angular/cdk/collections', '@angular/cdk/drag-drop', '@angular/material/autocomplete', 'ngx-mask', 'moment/moment', 'string-hash', '@angular/cdk/layout', 'dwt', '@angular/material/progress-bar', 'chart.js/auto', 'chartjs-adapter-moment', 'devextreme-angular', 'file-saver', 'devextreme-angular/ui/nested', '@pdftron/webviewer', '@angular/material/tabs', '@angular/material/divider', '@angular/common/locales/ar', '@angular/common/locales/en', '@rxweb/reactive-form-validators', 'rete-angular-plugin', 'rete', 'rete-area-plugin', 'rete-auto-arrange-plugin', 'rete-connection-plugin', 'rete-connection-reroute-plugin', 'rete-readonly-plugin', 'rete-minimap-plugin', 'd3-shape', 'rete-connection-path-plugin', 'rete-render-utils', '@angular/material/badge', '@angular/material/toolbar', '@kurkle/color', 'ngx-markdown', '@angular/cdk/accordion', 'lodash/flatMap', '@angular/material/bottom-sheet'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["nuxeo-development-framework"] = {}, global.ng.core, global.ng.common, global.ng.forms, global.ng.material.dialog, global.ng.router, global.i1, global.rxjs.operators, global.rxjs, global.ng.animations, global.i1$1, global.CryptoJS, global.ng.cdk.bidi, global.ng.common.http, global.i2$1, global.i3, global.ng.cdk.coercion, global.ng.material.icon, global.ng.material.progressSpinner, global.ng.material.tooltip, global.lodashEs, global.moment$6, global._omit, global._assign, global._cloneDeep, global._, global.ng.platformBrowser, global.moment$7, global.moment_, global.i7$1, global.ng.material.list, global.ng.material.menu, global.i6$1, global.ng.material.core, global.ng.cdk.clipboard, global.tsCacheable, global.i5, global.ng.material.formField, global.ng.material.chips, global.ng.material.expansion, global.ng.material.button, global.ng.material.checkbox, global.ng.material.datepicker, global.ng.material.input, global.ng.material.radio, global.ng.material.slideToggle, global.i6$3, global.core, global.i3$2, global.i1$9, global.i1$8, global.formiojs, global._find, global._isEqual, global.i4$2, global.ng.material.buttonToggle, global.ng.cdk.collections, global.ng.cdk.dragDrop, global.ng.material.autocomplete, global.i5$4, global.moment$8, global.stringHash, global.ng.cdk.layout, global.Dynamsoft, global.ng.material.progressBar, global.Chart, null, global.i4$4, global.FileSaver, global.i5$6, global.WebViewer, global.ng.material.tabs, global.ng.material.divider, global.ng.common.locales.ar, global.ng.common.locales.en, global.reactiveFormValidators, global.i2$7, global.rete, global.reteAreaPlugin, global.reteAutoArrangePlugin, global.reteConnectionPlugin, global.reteConnectionReroutePlugin, global.reteReadonlyPlugin, global.reteMinimapPlugin, global.d3Shape, global.reteConnectionPathPlugin, global.reteRenderUtils, global.ng.material.badge, global.ng.material.toolbar, global.colorLib, global.i2$8, global.ng.cdk.accordion, global._flatMap, global.ng.material.bottomSheet));
5
- })(this, (function (exports, i0, i4, i2, i1$4, i1$3, i1, operators, rxjs, animations, i1$1, CryptoJS, i4$1, i1$2, i2$1, i3, coercion, i2$2, i6, i7, lodashEs, moment$6, _omit, _assign, _cloneDeep, _, i1$5, moment$7, moment_, i7$1, i2$3, i3$1, i6$1, i2$4, i1$6, tsCacheable, i5, i1$7, i7$2, i6$2, i1$b, i5$1, i2$6, i5$2, i2$5, i1$a, i6$3, core, i3$2, i1$9, i1$8, formiojs, _find, _isEqual, i4$2, i1$c, collections, i7$3, i5$3, i5$4, moment$8, stringHash, i5$5, Dynamsoft, i4$3, Chart, chartjsAdapterMoment, i4$4, FileSaver, i5$6, WebViewer, i1$d, i9, localeAr, localeEn, reactiveFormValidators, i2$7, rete, reteAreaPlugin, reteAutoArrangePlugin, reteConnectionPlugin, reteConnectionReroutePlugin, reteReadonlyPlugin, reteMinimapPlugin, d3Shape, reteConnectionPathPlugin, reteRenderUtils, i7$4, toolbar, colorLib, i2$8, i6$4, _flatMap, i1$e) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@angular/forms'), require('@angular/material/dialog'), require('@angular/router'), require('@ngx-translate/core'), require('rxjs/operators'), require('rxjs'), require('@angular/animations'), require('ngx-toastr'), require('crypto-js'), require('@angular/cdk/bidi'), require('@angular/common/http'), require('keycloak-angular'), require('ngx-cookie-service'), require('@angular/cdk/coercion'), require('@angular/material/icon'), require('@angular/material/progress-spinner'), require('@angular/material/tooltip'), require('lodash-es'), require('lodash'), require('moment'), require('lodash/omit'), require('lodash/assign'), require('lodash/cloneDeep'), require('@angular/platform-browser'), require('moment-es6'), require('moment-hijri'), require('ngx-infinite-scroll'), require('@angular/material/list'), require('@angular/material/menu'), require('angular-ng-autocomplete'), require('@angular/material/core'), require('@angular/cdk/clipboard'), require('ts-cacheable'), require('@ng-select/ng-select'), require('@angular/material/form-field'), require('@angular/material/chips'), require('@angular/material/expansion'), require('@angular/material/button'), require('@angular/material/checkbox'), require('@angular/material/datepicker'), require('@angular/material/input'), require('@angular/material/radio'), require('@angular/material/slide-toggle'), require('@busacca/ng-pick-datetime'), require('@mat-datetimepicker/core'), require('angular-formio'), require('ngx-treeview'), require('@ng-bootstrap/ng-bootstrap'), require('formiojs'), require('lodash/find'), require('lodash/isEqual'), require('@swimlane/ngx-datatable'), require('@angular/material/button-toggle'), require('@angular/cdk/collections'), require('@angular/cdk/drag-drop'), require('@angular/material/autocomplete'), require('ngx-mask'), require('moment/moment'), require('string-hash'), require('@angular/cdk/layout'), require('dwt'), require('@angular/material/progress-bar'), require('chart.js/auto'), require('chartjs-adapter-moment'), require('devextreme-angular'), require('file-saver'), require('devextreme-angular/ui/nested'), require('@pdftron/webviewer'), require('@angular/material/tabs'), require('@angular/material/divider'), require('@angular/common/locales/ar'), require('@angular/common/locales/en'), require('@rxweb/reactive-form-validators'), require('rete-angular-plugin'), require('rete'), require('rete-area-plugin'), require('rete-auto-arrange-plugin'), require('rete-connection-plugin'), require('rete-connection-reroute-plugin'), require('rete-readonly-plugin'), require('rete-minimap-plugin'), require('d3-shape'), require('rete-connection-path-plugin'), require('rete-render-utils'), require('@angular/material/badge'), require('@angular/material/toolbar'), require('@kurkle/color'), require('ngx-markdown'), require('@angular/cdk/accordion'), require('lodash/flatMap'), require('@angular/material/bottom-sheet')) :
3
+ typeof define === 'function' && define.amd ? define('nuxeo-development-framework', ['exports', '@angular/core', '@angular/common', '@angular/forms', '@angular/material/dialog', '@angular/router', '@ngx-translate/core', 'rxjs/operators', 'rxjs', '@angular/animations', 'ngx-toastr', 'crypto-js', '@angular/cdk/bidi', '@angular/common/http', 'keycloak-angular', 'ngx-cookie-service', '@angular/cdk/coercion', '@angular/material/icon', '@angular/material/progress-spinner', '@angular/material/tooltip', 'lodash-es', 'lodash', 'moment', 'lodash/omit', 'lodash/assign', 'lodash/cloneDeep', '@angular/platform-browser', 'moment-es6', 'moment-hijri', 'ngx-infinite-scroll', '@angular/material/list', '@angular/material/menu', 'angular-ng-autocomplete', '@angular/material/core', '@angular/cdk/clipboard', 'ts-cacheable', '@ng-select/ng-select', '@angular/material/form-field', '@angular/material/chips', '@angular/material/expansion', '@angular/material/button', '@angular/material/checkbox', '@angular/material/datepicker', '@angular/material/input', '@angular/material/radio', '@angular/material/slide-toggle', '@busacca/ng-pick-datetime', '@mat-datetimepicker/core', 'angular-formio', 'ngx-treeview', '@ng-bootstrap/ng-bootstrap', 'formiojs', 'lodash/find', 'lodash/isEqual', '@swimlane/ngx-datatable', '@angular/material/button-toggle', '@angular/cdk/collections', '@angular/cdk/drag-drop', '@angular/material/autocomplete', 'ngx-mask', 'moment/moment', 'string-hash', '@angular/cdk/layout', 'dwt', '@angular/material/progress-bar', 'chart.js/auto', 'chartjs-adapter-moment', 'devextreme-angular', 'file-saver', 'devextreme-angular/ui/nested', '@pdftron/webviewer', '@angular/material/tabs', '@angular/material/divider', '@angular/common/locales/ar', '@angular/common/locales/en', '@rxweb/reactive-form-validators', 'rete-angular-plugin', 'rete', 'rete-area-plugin', 'rete-auto-arrange-plugin', 'rete-connection-plugin', 'rete-connection-reroute-plugin', 'rete-readonly-plugin', 'rete-minimap-plugin', 'd3-shape', 'rete-connection-path-plugin', 'rete-render-utils', '@angular/material/badge', '@angular/material/toolbar', '@kurkle/color', 'ngx-markdown', '@angular/cdk/accordion', 'lodash/flatMap', '@angular/material/bottom-sheet'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["nuxeo-development-framework"] = {}, global.ng.core, global.ng.common, global.ng.forms, global.ng.material.dialog, global.ng.router, global.i1, global.rxjs.operators, global.rxjs, global.ng.animations, global.i1$1, global.CryptoJS, global.ng.cdk.bidi, global.ng.common.http, global.i2$1, global.i3, global.ng.cdk.coercion, global.ng.material.icon, global.ng.material.progressSpinner, global.ng.material.tooltip, global.lodashEs, global._, global.moment$6, global._omit, global._assign, global._cloneDeep, global.ng.platformBrowser, global.moment$7, global.moment_, global.i7$1, global.ng.material.list, global.ng.material.menu, global.i6$1, global.ng.material.core, global.ng.cdk.clipboard, global.tsCacheable, global.i5, global.ng.material.formField, global.ng.material.chips, global.ng.material.expansion, global.ng.material.button, global.ng.material.checkbox, global.ng.material.datepicker, global.ng.material.input, global.ng.material.radio, global.ng.material.slideToggle, global.i6$3, global.core, global.i3$2, global.i1$9, global.i1$8, global.formiojs, global._find, global._isEqual, global.i4$2, global.ng.material.buttonToggle, global.ng.cdk.collections, global.ng.cdk.dragDrop, global.ng.material.autocomplete, global.i5$4, global.moment$8, global.stringHash, global.ng.cdk.layout, global.Dynamsoft, global.ng.material.progressBar, global.Chart, null, global.i4$4, global.FileSaver, global.i5$6, global.WebViewer, global.ng.material.tabs, global.ng.material.divider, global.ng.common.locales.ar, global.ng.common.locales.en, global.reactiveFormValidators, global.i2$7, global.rete, global.reteAreaPlugin, global.reteAutoArrangePlugin, global.reteConnectionPlugin, global.reteConnectionReroutePlugin, global.reteReadonlyPlugin, global.reteMinimapPlugin, global.d3Shape, global.reteConnectionPathPlugin, global.reteRenderUtils, global.ng.material.badge, global.ng.material.toolbar, global.colorLib, global.i2$8, global.ng.cdk.accordion, global._flatMap, global.ng.material.bottomSheet));
5
+ })(this, (function (exports, i0, i4, i2, i1$4, i1$3, i1, operators, rxjs, animations, i1$1, CryptoJS, i4$1, i1$2, i2$1, i3, coercion, i2$2, i6, i7, lodashEs, _, moment$6, _omit, _assign, _cloneDeep, i1$5, moment$7, moment_, i7$1, i2$3, i3$1, i6$1, i2$4, i1$6, tsCacheable, i5, i1$7, i7$2, i6$2, i1$b, i5$1, i2$6, i5$2, i2$5, i1$a, i6$3, core, i3$2, i1$9, i1$8, formiojs, _find, _isEqual, i4$2, i1$c, collections, i7$3, i5$3, i5$4, moment$8, stringHash, i5$5, Dynamsoft, i4$3, Chart, chartjsAdapterMoment, i4$4, FileSaver, i5$6, WebViewer, i1$d, i9, localeAr, localeEn, reactiveFormValidators, i2$7, rete, reteAreaPlugin, reteAutoArrangePlugin, reteConnectionPlugin, reteConnectionReroutePlugin, reteReadonlyPlugin, reteMinimapPlugin, d3Shape, reteConnectionPathPlugin, reteRenderUtils, i7$4, toolbar, colorLib, i2$8, i6$4, _flatMap, i1$e) { 'use strict';
6
6
 
7
7
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
8
8
 
@@ -39,13 +39,13 @@
39
39
  var i2__namespace$1 = /*#__PURE__*/_interopNamespace(i2$2);
40
40
  var i6__namespace = /*#__PURE__*/_interopNamespace(i6);
41
41
  var i7__namespace = /*#__PURE__*/_interopNamespace(i7);
42
+ var ___default = /*#__PURE__*/_interopDefaultLegacy(_);
43
+ var ___namespace = /*#__PURE__*/_interopNamespace(_);
42
44
  var moment__namespace = /*#__PURE__*/_interopNamespace(moment$6);
43
45
  var moment__default$1 = /*#__PURE__*/_interopDefaultLegacy(moment$6);
44
46
  var _omit__default = /*#__PURE__*/_interopDefaultLegacy(_omit);
45
47
  var _assign__default = /*#__PURE__*/_interopDefaultLegacy(_assign);
46
48
  var _cloneDeep__default = /*#__PURE__*/_interopDefaultLegacy(_cloneDeep);
47
- var ___default = /*#__PURE__*/_interopDefaultLegacy(_);
48
- var ___namespace = /*#__PURE__*/_interopNamespace(_);
49
49
  var i1__namespace$4 = /*#__PURE__*/_interopNamespace(i1$5);
50
50
  var moment__default = /*#__PURE__*/_interopDefaultLegacy(moment$7);
51
51
  var moment___namespace = /*#__PURE__*/_interopNamespace(moment_);
@@ -3256,131 +3256,93 @@
3256
3256
 
3257
3257
  var ENTITY_TYPE = 'entity-type';
3258
3258
 
3259
- var _HttpBaseService_http;
3260
- var HttpBaseService = /** @class */ (function () {
3261
- function HttpBaseService(injector) {
3262
- _HttpBaseService_http.set(this, void 0);
3263
- __classPrivateFieldSet(this, _HttpBaseService_http, injector.get(i1$2.HttpClient), "f");
3259
+ var CallApiService = /** @class */ (function () {
3260
+ function CallApiService(nuxeoService, http, environment) {
3261
+ this.nuxeoService = nuxeoService;
3262
+ this.http = http;
3263
+ this.environment = environment;
3264
3264
  }
3265
- Object.defineProperty(HttpBaseService.prototype, "environment", {
3266
- get: function () {
3267
- return EnvManager.environment;
3268
- },
3269
- enumerable: false,
3270
- configurable: true
3271
- });
3272
- HttpBaseService.prototype.httpRequest = function (req) {
3273
- return __classPrivateFieldGet(this, _HttpBaseService_http, "f").request(req);
3274
- };
3275
- HttpBaseService.prototype.get = function (endpointOrOptions, params, headers, responseType) {
3276
- if (params === void 0) { params = undefined; }
3277
- if (headers === void 0) { headers = undefined; }
3278
- if (responseType === void 0) { responseType = undefined; }
3279
- var _a, _b, _c;
3280
- var url;
3281
- if (typeof endpointOrOptions === 'string') {
3282
- url = endpointOrOptions;
3283
- }
3284
- else {
3285
- var options = endpointOrOptions;
3286
- url = options.endpoint;
3287
- params = (_a = options.params) !== null && _a !== void 0 ? _a : undefined;
3288
- headers = (_b = options.headers) !== null && _b !== void 0 ? _b : undefined;
3289
- responseType = (_c = options.responseType) !== null && _c !== void 0 ? _c : undefined;
3290
- }
3291
- return __classPrivateFieldGet(this, _HttpBaseService_http, "f").get(url, { headers: headers, params: params, responseType: responseType }).pipe(operators.map(function (response) { return response; }), this.catchErrors());
3292
- };
3293
- HttpBaseService.prototype.post = function (endpointOrOptions, payload, params, headers, responseType) {
3294
- if (payload === void 0) { payload = undefined; }
3295
- if (params === void 0) { params = undefined; }
3296
- if (headers === void 0) { headers = undefined; }
3297
- if (responseType === void 0) { responseType = undefined; }
3298
- var _a, _b, _c, _d;
3299
- var url;
3300
- if (typeof endpointOrOptions === 'string') {
3301
- url = endpointOrOptions;
3302
- }
3303
- else {
3304
- var options = endpointOrOptions;
3305
- url = options.endpoint;
3306
- payload = (_a = options.payload) !== null && _a !== void 0 ? _a : undefined;
3307
- params = (_b = options.params) !== null && _b !== void 0 ? _b : undefined;
3308
- headers = (_c = options.headers) !== null && _c !== void 0 ? _c : undefined;
3309
- responseType = (_d = options.responseType) !== null && _d !== void 0 ? _d : undefined;
3310
- }
3311
- return __classPrivateFieldGet(this, _HttpBaseService_http, "f").post(url, payload, { headers: headers, params: params, responseType: responseType }).pipe(operators.map(function (response) { return response; }), this.catchErrors());
3312
- };
3313
- HttpBaseService.prototype.put = function (endpointOrOptions, payload, params, headers, responseType) {
3314
- if (payload === void 0) { payload = undefined; }
3315
- if (params === void 0) { params = undefined; }
3316
- if (headers === void 0) { headers = undefined; }
3317
- if (responseType === void 0) { responseType = undefined; }
3318
- var _a, _b, _c, _d;
3319
- var url;
3320
- if (typeof endpointOrOptions === 'string') {
3321
- url = endpointOrOptions;
3322
- }
3323
- else {
3324
- var options = endpointOrOptions;
3325
- url = options.endpoint;
3326
- payload = (_a = options.payload) !== null && _a !== void 0 ? _a : undefined;
3327
- params = (_b = options.params) !== null && _b !== void 0 ? _b : undefined;
3328
- headers = (_c = options.headers) !== null && _c !== void 0 ? _c : undefined;
3329
- responseType = (_d = options.responseType) !== null && _d !== void 0 ? _d : undefined;
3330
- }
3331
- return __classPrivateFieldGet(this, _HttpBaseService_http, "f").put(url, payload, { headers: headers, params: params, responseType: responseType }).pipe(operators.map(function (response) { return response; }), this.catchErrors());
3265
+ CallApiService.prototype.query = function (queryOptions, options) {
3266
+ return this.inerQuery(queryOptions, options);
3332
3267
  };
3333
- HttpBaseService.prototype.patch = function (endpointOrOptions, payload, params, headers, responseType) {
3334
- if (payload === void 0) { payload = undefined; }
3335
- if (params === void 0) { params = undefined; }
3336
- if (headers === void 0) { headers = undefined; }
3337
- if (responseType === void 0) { responseType = undefined; }
3338
- var _a, _b, _c, _d;
3339
- var url;
3340
- if (typeof endpointOrOptions === 'string') {
3341
- url = endpointOrOptions;
3342
- }
3343
- else {
3344
- var options = endpointOrOptions;
3345
- url = options.endpoint;
3346
- payload = (_a = options.payload) !== null && _a !== void 0 ? _a : undefined;
3347
- params = (_b = options.params) !== null && _b !== void 0 ? _b : undefined;
3348
- headers = (_c = options.headers) !== null && _c !== void 0 ? _c : undefined;
3349
- responseType = (_d = options.responseType) !== null && _d !== void 0 ? _d : undefined;
3350
- }
3351
- return __classPrivateFieldGet(this, _HttpBaseService_http, "f").patch(url, payload, { headers: headers, params: params, responseType: responseType }).pipe(operators.map(function (response) { return response; }), this.catchErrors());
3268
+ CallApiService.prototype.inerQuery = function (queryOptions, options) {
3269
+ return rxjs.from(this.nuxeoService.nuxeoClient.repository().query(queryOptions, options)).pipe(operators.map(function (res) {
3270
+ if (res.entries.length > 0) {
3271
+ res.entries.forEach(function (data) {
3272
+ delete data._nuxeo;
3273
+ delete data._repository;
3274
+ });
3275
+ }
3276
+ return res;
3277
+ }));
3352
3278
  };
3353
- HttpBaseService.prototype.delete = function (endpointOrOptions, params, headers, responseType) {
3354
- if (params === void 0) { params = undefined; }
3355
- if (headers === void 0) { headers = undefined; }
3356
- if (responseType === void 0) { responseType = undefined; }
3357
- var _a, _b, _c;
3358
- var url;
3359
- if (typeof endpointOrOptions === 'string') {
3360
- url = endpointOrOptions;
3279
+ CallApiService.prototype.customQuery = function (query, params, headers, body) {
3280
+ if (headers === void 0) { headers = {}; }
3281
+ if (body === void 0) { body = {}; }
3282
+ var _payload = body;
3283
+ if (query === null || query === void 0 ? void 0 : query.payload) {
3284
+ var _key_1 = (query === null || query === void 0 ? void 0 : query.predicateKey) || 'predicateList';
3285
+ _payload = ___default["default"].mergeWith(body, query.payload, function (objValue, srcValue, key) {
3286
+ if (Array.isArray(objValue) && key === _key_1) {
3287
+ return ___default["default"].uniqWith(objValue.concat(srcValue), ___default["default"].isEqual);
3288
+ }
3289
+ });
3361
3290
  }
3362
- else {
3363
- var options = endpointOrOptions;
3364
- url = options.endpoint;
3365
- params = (_a = options.params) !== null && _a !== void 0 ? _a : undefined;
3366
- headers = (_b = options.headers) !== null && _b !== void 0 ? _b : undefined;
3367
- responseType = (_c = options.responseType) !== null && _c !== void 0 ? _c : undefined;
3291
+ if (this.bearerToken) {
3292
+ headers['Authorization'] = this.bearerToken;
3368
3293
  }
3369
- return __classPrivateFieldGet(this, _HttpBaseService_http, "f").delete(url, { headers: headers, params: params, responseType: responseType }).pipe(operators.map(function (response) { return response; }), this.catchErrors());
3294
+ return this.http
3295
+ .request(query.method, "" + this.environment.nuxeo + query.url, {
3296
+ body: _payload,
3297
+ headers: headers,
3298
+ params: params
3299
+ })
3300
+ .pipe(operators.map(function (res) {
3301
+ return res;
3302
+ }));
3370
3303
  };
3371
- HttpBaseService.prototype.httpAutomation = function (endpoint, payload, responseType) {
3372
- if (payload === void 0) { payload = undefined; }
3373
- if (responseType === void 0) { responseType = undefined; }
3374
- return __classPrivateFieldGet(this, _HttpBaseService_http, "f").post(endpoint, payload, { responseType: responseType }).pipe(this.catchErrors());
3304
+ return CallApiService;
3305
+ }());
3306
+ CallApiService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: CallApiService, deps: [{ token: NuxeoService }, { token: i1__namespace$2.HttpClient }, { token: 'environment' }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
3307
+ CallApiService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: CallApiService, providedIn: 'root' });
3308
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: CallApiService, decorators: [{
3309
+ type: i0.Injectable,
3310
+ args: [{
3311
+ providedIn: 'root'
3312
+ }]
3313
+ }], ctorParameters: function () {
3314
+ return [{ type: NuxeoService }, { type: i1__namespace$2.HttpClient }, { type: undefined, decorators: [{
3315
+ type: i0.Inject,
3316
+ args: ['environment']
3317
+ }] }];
3318
+ } });
3319
+
3320
+ var _ApisErrorsMessagesService_handlerFn;
3321
+ var ApisErrorsMessagesService = /** @class */ (function () {
3322
+ function ApisErrorsMessagesService() {
3323
+ _ApisErrorsMessagesService_handlerFn.set(this, function () {
3324
+ return rxjs.pipe(operators.catchError(function (err) {
3325
+ throw err;
3326
+ }));
3327
+ });
3328
+ }
3329
+ ApisErrorsMessagesService.prototype.setErrorHandler = function (handler) {
3330
+ __classPrivateFieldSet(this, _ApisErrorsMessagesService_handlerFn, handler, "f");
3375
3331
  };
3376
- HttpBaseService.prototype.catchErrors = function () {
3377
- return rxjs.pipe(operators.catchError(function (err) {
3378
- throw err;
3379
- }));
3332
+ ApisErrorsMessagesService.prototype.handleErrorMessage = function () {
3333
+ return __classPrivateFieldGet(this, _ApisErrorsMessagesService_handlerFn, "f").call(this);
3380
3334
  };
3381
- return HttpBaseService;
3335
+ return ApisErrorsMessagesService;
3382
3336
  }());
3383
- _HttpBaseService_http = new WeakMap();
3337
+ _ApisErrorsMessagesService_handlerFn = new WeakMap();
3338
+ ApisErrorsMessagesService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ApisErrorsMessagesService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
3339
+ ApisErrorsMessagesService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ApisErrorsMessagesService, providedIn: 'root' });
3340
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ApisErrorsMessagesService, decorators: [{
3341
+ type: i0.Injectable,
3342
+ args: [{
3343
+ providedIn: 'root'
3344
+ }]
3345
+ }] });
3384
3346
 
3385
3347
  var DEFAULT_CACHE_OPTIONS = {
3386
3348
  PREFIX: "cache__",
@@ -3751,105 +3713,142 @@
3751
3713
  }]
3752
3714
  }], ctorParameters: function () { return [{ type: UserPreferencesService }, { type: UtilityService }]; } });
3753
3715
 
3754
- var CallApiService = /** @class */ (function () {
3755
- function CallApiService(nuxeoService, http, environment) {
3756
- this.nuxeoService = nuxeoService;
3757
- this.http = http;
3758
- this.environment = environment;
3716
+ var _HttpBaseService_http;
3717
+ var HttpBaseService = /** @class */ (function () {
3718
+ function HttpBaseService(injector) {
3719
+ _HttpBaseService_http.set(this, void 0);
3720
+ __classPrivateFieldSet(this, _HttpBaseService_http, injector.get(i1$2.HttpClient), "f");
3759
3721
  }
3760
- CallApiService.prototype.query = function (queryOptions, options) {
3761
- return this.inerQuery(queryOptions, options);
3722
+ Object.defineProperty(HttpBaseService.prototype, "environment", {
3723
+ get: function () {
3724
+ return EnvManager.environment;
3725
+ },
3726
+ enumerable: false,
3727
+ configurable: true
3728
+ });
3729
+ HttpBaseService.prototype.httpRequest = function (req) {
3730
+ return __classPrivateFieldGet(this, _HttpBaseService_http, "f").request(req);
3762
3731
  };
3763
- CallApiService.prototype.inerQuery = function (queryOptions, options) {
3764
- return rxjs.from(this.nuxeoService.nuxeoClient.repository().query(queryOptions, options)).pipe(operators.map(function (res) {
3765
- if (res.entries.length > 0) {
3766
- res.entries.forEach(function (data) {
3767
- delete data._nuxeo;
3768
- delete data._repository;
3769
- });
3770
- }
3771
- return res;
3772
- }));
3732
+ HttpBaseService.prototype.get = function (endpointOrOptions, params, headers, responseType) {
3733
+ if (params === void 0) { params = undefined; }
3734
+ if (headers === void 0) { headers = undefined; }
3735
+ if (responseType === void 0) { responseType = undefined; }
3736
+ var _a, _b, _c;
3737
+ var url;
3738
+ if (typeof endpointOrOptions === 'string') {
3739
+ url = endpointOrOptions;
3740
+ }
3741
+ else {
3742
+ var options = endpointOrOptions;
3743
+ url = options.endpoint;
3744
+ params = (_a = options.params) !== null && _a !== void 0 ? _a : undefined;
3745
+ headers = (_b = options.headers) !== null && _b !== void 0 ? _b : undefined;
3746
+ responseType = (_c = options.responseType) !== null && _c !== void 0 ? _c : undefined;
3747
+ }
3748
+ return __classPrivateFieldGet(this, _HttpBaseService_http, "f").get(url, { headers: headers, params: params, responseType: responseType }).pipe(operators.map(function (response) { return response; }), this.catchErrors());
3773
3749
  };
3774
- CallApiService.prototype.customQuery = function (query, params, headers, body) {
3775
- if (headers === void 0) { headers = {}; }
3776
- if (body === void 0) { body = {}; }
3777
- var _payload = body;
3778
- if (query === null || query === void 0 ? void 0 : query.payload) {
3779
- var _key_1 = (query === null || query === void 0 ? void 0 : query.predicateKey) || 'predicateList';
3780
- _payload = ___default["default"].mergeWith(body, query.payload, function (objValue, srcValue, key) {
3781
- if (Array.isArray(objValue) && key === _key_1) {
3782
- return ___default["default"].uniqWith(objValue.concat(srcValue), ___default["default"].isEqual);
3783
- }
3784
- });
3750
+ HttpBaseService.prototype.post = function (endpointOrOptions, payload, params, headers, responseType) {
3751
+ if (payload === void 0) { payload = undefined; }
3752
+ if (params === void 0) { params = undefined; }
3753
+ if (headers === void 0) { headers = undefined; }
3754
+ if (responseType === void 0) { responseType = undefined; }
3755
+ var _a, _b, _c, _d;
3756
+ var url;
3757
+ if (typeof endpointOrOptions === 'string') {
3758
+ url = endpointOrOptions;
3785
3759
  }
3786
- if (this.bearerToken) {
3787
- headers['Authorization'] = this.bearerToken;
3760
+ else {
3761
+ var options = endpointOrOptions;
3762
+ url = options.endpoint;
3763
+ payload = (_a = options.payload) !== null && _a !== void 0 ? _a : undefined;
3764
+ params = (_b = options.params) !== null && _b !== void 0 ? _b : undefined;
3765
+ headers = (_c = options.headers) !== null && _c !== void 0 ? _c : undefined;
3766
+ responseType = (_d = options.responseType) !== null && _d !== void 0 ? _d : undefined;
3788
3767
  }
3789
- return this.http
3790
- .request(query.method, "" + this.environment.nuxeo + query.url, {
3791
- body: _payload,
3792
- headers: headers,
3793
- params: params
3794
- })
3795
- .pipe(operators.map(function (res) {
3796
- return res;
3797
- }));
3768
+ return __classPrivateFieldGet(this, _HttpBaseService_http, "f").post(url, payload, { headers: headers, params: params, responseType: responseType }).pipe(operators.map(function (response) { return response; }), this.catchErrors());
3798
3769
  };
3799
- return CallApiService;
3800
- }());
3801
- CallApiService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: CallApiService, deps: [{ token: NuxeoService }, { token: i1__namespace$2.HttpClient }, { token: 'environment' }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
3802
- CallApiService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: CallApiService, providedIn: 'root' });
3803
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: CallApiService, decorators: [{
3804
- type: i0.Injectable,
3805
- args: [{
3806
- providedIn: 'root'
3807
- }]
3808
- }], ctorParameters: function () {
3809
- return [{ type: NuxeoService }, { type: i1__namespace$2.HttpClient }, { type: undefined, decorators: [{
3810
- type: i0.Inject,
3811
- args: ['environment']
3812
- }] }];
3813
- } });
3814
-
3815
- var _ApisErrorsMessagesService_handlerFn;
3816
- var ApisErrorsMessagesService = /** @class */ (function () {
3817
- function ApisErrorsMessagesService() {
3818
- _ApisErrorsMessagesService_handlerFn.set(this, function () {
3819
- return rxjs.pipe(operators.catchError(function (err) {
3820
- throw err;
3821
- }));
3822
- });
3823
- }
3824
- ApisErrorsMessagesService.prototype.setErrorHandler = function (handler) {
3825
- __classPrivateFieldSet(this, _ApisErrorsMessagesService_handlerFn, handler, "f");
3770
+ HttpBaseService.prototype.put = function (endpointOrOptions, payload, params, headers, responseType) {
3771
+ if (payload === void 0) { payload = undefined; }
3772
+ if (params === void 0) { params = undefined; }
3773
+ if (headers === void 0) { headers = undefined; }
3774
+ if (responseType === void 0) { responseType = undefined; }
3775
+ var _a, _b, _c, _d;
3776
+ var url;
3777
+ if (typeof endpointOrOptions === 'string') {
3778
+ url = endpointOrOptions;
3779
+ }
3780
+ else {
3781
+ var options = endpointOrOptions;
3782
+ url = options.endpoint;
3783
+ payload = (_a = options.payload) !== null && _a !== void 0 ? _a : undefined;
3784
+ params = (_b = options.params) !== null && _b !== void 0 ? _b : undefined;
3785
+ headers = (_c = options.headers) !== null && _c !== void 0 ? _c : undefined;
3786
+ responseType = (_d = options.responseType) !== null && _d !== void 0 ? _d : undefined;
3787
+ }
3788
+ return __classPrivateFieldGet(this, _HttpBaseService_http, "f").put(url, payload, { headers: headers, params: params, responseType: responseType }).pipe(operators.map(function (response) { return response; }), this.catchErrors());
3826
3789
  };
3827
- ApisErrorsMessagesService.prototype.handleErrorMessage = function () {
3828
- return __classPrivateFieldGet(this, _ApisErrorsMessagesService_handlerFn, "f").call(this);
3790
+ HttpBaseService.prototype.patch = function (endpointOrOptions, payload, params, headers, responseType) {
3791
+ if (payload === void 0) { payload = undefined; }
3792
+ if (params === void 0) { params = undefined; }
3793
+ if (headers === void 0) { headers = undefined; }
3794
+ if (responseType === void 0) { responseType = undefined; }
3795
+ var _a, _b, _c, _d;
3796
+ var url;
3797
+ if (typeof endpointOrOptions === 'string') {
3798
+ url = endpointOrOptions;
3799
+ }
3800
+ else {
3801
+ var options = endpointOrOptions;
3802
+ url = options.endpoint;
3803
+ payload = (_a = options.payload) !== null && _a !== void 0 ? _a : undefined;
3804
+ params = (_b = options.params) !== null && _b !== void 0 ? _b : undefined;
3805
+ headers = (_c = options.headers) !== null && _c !== void 0 ? _c : undefined;
3806
+ responseType = (_d = options.responseType) !== null && _d !== void 0 ? _d : undefined;
3807
+ }
3808
+ return __classPrivateFieldGet(this, _HttpBaseService_http, "f").patch(url, payload, { headers: headers, params: params, responseType: responseType }).pipe(operators.map(function (response) { return response; }), this.catchErrors());
3829
3809
  };
3830
- return ApisErrorsMessagesService;
3810
+ HttpBaseService.prototype.delete = function (endpointOrOptions, params, headers, responseType) {
3811
+ if (params === void 0) { params = undefined; }
3812
+ if (headers === void 0) { headers = undefined; }
3813
+ if (responseType === void 0) { responseType = undefined; }
3814
+ var _a, _b, _c;
3815
+ var url;
3816
+ if (typeof endpointOrOptions === 'string') {
3817
+ url = endpointOrOptions;
3818
+ }
3819
+ else {
3820
+ var options = endpointOrOptions;
3821
+ url = options.endpoint;
3822
+ params = (_a = options.params) !== null && _a !== void 0 ? _a : undefined;
3823
+ headers = (_b = options.headers) !== null && _b !== void 0 ? _b : undefined;
3824
+ responseType = (_c = options.responseType) !== null && _c !== void 0 ? _c : undefined;
3825
+ }
3826
+ return __classPrivateFieldGet(this, _HttpBaseService_http, "f").delete(url, { headers: headers, params: params, responseType: responseType }).pipe(operators.map(function (response) { return response; }), this.catchErrors());
3827
+ };
3828
+ HttpBaseService.prototype.httpAutomation = function (endpoint, payload, responseType) {
3829
+ if (payload === void 0) { payload = undefined; }
3830
+ if (responseType === void 0) { responseType = undefined; }
3831
+ return __classPrivateFieldGet(this, _HttpBaseService_http, "f").post(endpoint, payload, { responseType: responseType }).pipe(this.catchErrors());
3832
+ };
3833
+ HttpBaseService.prototype.catchErrors = function () {
3834
+ return rxjs.pipe(operators.catchError(function (err) {
3835
+ throw err;
3836
+ }));
3837
+ };
3838
+ return HttpBaseService;
3831
3839
  }());
3832
- _ApisErrorsMessagesService_handlerFn = new WeakMap();
3833
- ApisErrorsMessagesService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ApisErrorsMessagesService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
3834
- ApisErrorsMessagesService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ApisErrorsMessagesService, providedIn: 'root' });
3835
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ApisErrorsMessagesService, decorators: [{
3836
- type: i0.Injectable,
3837
- args: [{
3838
- providedIn: 'root'
3839
- }]
3840
- }] });
3840
+ _HttpBaseService_http = new WeakMap();
3841
3841
 
3842
- var _BaseService_nuxeoService, _BaseService_callApiService, _BaseService_cacheBaseService, _BaseService_apisErrorsService;
3842
+ var _BaseService_nuxeoService, _BaseService_cacheBaseService, _BaseService_apisErrorsService;
3843
3843
  var BaseService = /** @class */ (function (_super) {
3844
3844
  __extends(BaseService, _super);
3845
3845
  function BaseService(injector) {
3846
3846
  var _this = _super.call(this, injector) || this;
3847
3847
  _BaseService_nuxeoService.set(_this, void 0);
3848
- _BaseService_callApiService.set(_this, void 0);
3849
3848
  _BaseService_cacheBaseService.set(_this, void 0);
3850
3849
  _BaseService_apisErrorsService.set(_this, void 0);
3851
3850
  __classPrivateFieldSet(_this, _BaseService_nuxeoService, injector.get(NuxeoService), "f");
3852
- __classPrivateFieldSet(_this, _BaseService_callApiService, injector.get(CallApiService), "f");
3851
+ _this._callApiService = injector.get(CallApiService);
3853
3852
  __classPrivateFieldSet(_this, _BaseService_cacheBaseService, injector.get(CacheBaseService), "f");
3854
3853
  __classPrivateFieldSet(_this, _BaseService_apisErrorsService, injector.get(ApisErrorsMessagesService), "f");
3855
3854
  _this.adapterService = injector.get(AdapterService);
@@ -3953,7 +3952,7 @@
3953
3952
  params = (_a = options.params) !== null && _a !== void 0 ? _a : undefined;
3954
3953
  headers = (_b = options.headers) !== null && _b !== void 0 ? _b : undefined;
3955
3954
  }
3956
- return __classPrivateFieldGet(this, _BaseService_callApiService, "f")
3955
+ return this._callApiService
3957
3956
  .query(Object.assign({ pageProvider: pageProvider }, (params ? params : {})), {
3958
3957
  headers: headers ? Object.assign({}, headers) : undefined
3959
3958
  })
@@ -4016,7 +4015,7 @@
4016
4015
  };
4017
4016
  return BaseService;
4018
4017
  }(HttpBaseService));
4019
- _BaseService_nuxeoService = new WeakMap(), _BaseService_callApiService = new WeakMap(), _BaseService_cacheBaseService = new WeakMap(), _BaseService_apisErrorsService = new WeakMap();
4018
+ _BaseService_nuxeoService = new WeakMap(), _BaseService_cacheBaseService = new WeakMap(), _BaseService_apisErrorsService = new WeakMap();
4020
4019
  BaseService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: BaseService, deps: [{ token: i0__namespace.Injector }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
4021
4020
  BaseService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: BaseService, providedIn: 'root' });
4022
4021
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: BaseService, decorators: [{
@@ -21950,21 +21949,6 @@
21950
21949
  }
21951
21950
  ];
21952
21951
 
21953
- var DynamicTableService = /** @class */ (function () {
21954
- function DynamicTableService() {
21955
- this.refreshData = new i0.EventEmitter();
21956
- }
21957
- return DynamicTableService;
21958
- }());
21959
- DynamicTableService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: DynamicTableService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
21960
- DynamicTableService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: DynamicTableService, providedIn: 'root' });
21961
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: DynamicTableService, decorators: [{
21962
- type: i0.Injectable,
21963
- args: [{
21964
- providedIn: 'root'
21965
- }]
21966
- }], ctorParameters: function () { return []; } });
21967
-
21968
21952
  var EMPTY_TEMPLATE = new i0.InjectionToken('EmptyTemplateDirective');
21969
21953
  var EmptyTemplateDirective = /** @class */ (function () {
21970
21954
  function EmptyTemplateDirective(template) {
@@ -21992,6 +21976,106 @@
21992
21976
  }]
21993
21977
  }], ctorParameters: function () { return [{ type: i0__namespace.TemplateRef }]; } });
21994
21978
 
21979
+ var DynamicTableService = /** @class */ (function () {
21980
+ function DynamicTableService() {
21981
+ this.refreshData = new i0.EventEmitter();
21982
+ }
21983
+ return DynamicTableService;
21984
+ }());
21985
+ DynamicTableService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: DynamicTableService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
21986
+ DynamicTableService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: DynamicTableService, providedIn: 'root' });
21987
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: DynamicTableService, decorators: [{
21988
+ type: i0.Injectable,
21989
+ args: [{
21990
+ providedIn: 'root'
21991
+ }]
21992
+ }], ctorParameters: function () { return []; } });
21993
+
21994
+ var TableHooksService = /** @class */ (function () {
21995
+ function TableHooksService() {
21996
+ this.beforeSubmitHooks = [];
21997
+ }
21998
+ TableHooksService.prototype.registerBeforeSubmit = function (handler) {
21999
+ this.beforeSubmitHooks.push(handler);
22000
+ };
22001
+ TableHooksService.prototype.unregisterBeforeSubmit = function (handler) {
22002
+ var index = this.beforeSubmitHooks.indexOf(handler);
22003
+ if (index > -1) {
22004
+ this.beforeSubmitHooks.splice(index, 1);
22005
+ }
22006
+ };
22007
+ TableHooksService.prototype.clearBeforeSubmitHooks = function () {
22008
+ this.beforeSubmitHooks = [];
22009
+ };
22010
+ TableHooksService.prototype.executeBeforeSubmit = function (payload) {
22011
+ return __awaiter(this, void 0, void 0, function () {
22012
+ var modifiedPayload, _a, _b, handler, result, err_1, e_1_1;
22013
+ var e_1, _c;
22014
+ return __generator(this, function (_d) {
22015
+ switch (_d.label) {
22016
+ case 0:
22017
+ modifiedPayload = Object.assign({}, payload);
22018
+ _d.label = 1;
22019
+ case 1:
22020
+ _d.trys.push([1, 8, 9, 10]);
22021
+ _a = __values(this.beforeSubmitHooks), _b = _a.next();
22022
+ _d.label = 2;
22023
+ case 2:
22024
+ if (!!_b.done) return [3 /*break*/, 7];
22025
+ handler = _b.value;
22026
+ _d.label = 3;
22027
+ case 3:
22028
+ _d.trys.push([3, 5, , 6]);
22029
+ return [4 /*yield*/, Promise.resolve(handler(modifiedPayload))];
22030
+ case 4:
22031
+ result = _d.sent();
22032
+ modifiedPayload = result !== null && result !== void 0 ? result : modifiedPayload;
22033
+ return [3 /*break*/, 6];
22034
+ case 5:
22035
+ err_1 = _d.sent();
22036
+ console.error('Error executing beforeSubmit handler:', err_1);
22037
+ return [3 /*break*/, 6];
22038
+ case 6:
22039
+ _b = _a.next();
22040
+ return [3 /*break*/, 2];
22041
+ case 7: return [3 /*break*/, 10];
22042
+ case 8:
22043
+ e_1_1 = _d.sent();
22044
+ e_1 = { error: e_1_1 };
22045
+ return [3 /*break*/, 10];
22046
+ case 9:
22047
+ try {
22048
+ if (_b && !_b.done && (_c = _a.return)) _c.call(_a);
22049
+ }
22050
+ finally { if (e_1) throw e_1.error; }
22051
+ return [7 /*endfinally*/];
22052
+ case 10: return [2 /*return*/, modifiedPayload];
22053
+ }
22054
+ });
22055
+ });
22056
+ };
22057
+ TableHooksService.prototype.evaluate = function (expr, payload) {
22058
+ try {
22059
+ var context = { criteria: payload };
22060
+ var result = Evaluator.evaluate(expr, context, 'payload');
22061
+ return result !== null && result !== void 0 ? result : payload;
22062
+ }
22063
+ catch (e) {
22064
+ console.error('Error evaluating beforeSubmit string:', e);
22065
+ return payload;
22066
+ }
22067
+ };
22068
+ return TableHooksService;
22069
+ }());
22070
+ TableHooksService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TableHooksService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
22071
+ TableHooksService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TableHooksService, providedIn: 'root' });
22072
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TableHooksService, decorators: [{
22073
+ type: i0.Injectable,
22074
+ args: [{
22075
+ providedIn: 'root'
22076
+ }]
22077
+ }] });
22078
+
21995
22079
  /**
21996
22080
  * you can use this component for any pagination
21997
22081
  *
@@ -22226,66 +22310,70 @@
22226
22310
  * (actionOnRow)="performAction($event)">
22227
22311
  * </cts-dynamic-table>
22228
22312
  */
22229
- var DynamicTableComponent = /** @class */ (function () {
22230
- function DynamicTableComponent(adapter, callApi, nuxeoService, dynamicTableService, cdr) {
22231
- this.adapter = adapter;
22232
- this.callApi = callApi;
22233
- this.nuxeoService = nuxeoService;
22234
- this.dynamicTableService = dynamicTableService;
22235
- this.cdr = cdr;
22313
+ var DynamicTableComponent = /** @class */ (function (_super) {
22314
+ __extends(DynamicTableComponent, _super);
22315
+ function DynamicTableComponent(adapter, callApi, nuxeoService, dynamicTableService, cdr, _tableHooksService) {
22316
+ var _this = _super.call(this) || this;
22317
+ _this.adapter = adapter;
22318
+ _this.callApi = callApi;
22319
+ _this.nuxeoService = nuxeoService;
22320
+ _this.dynamicTableService = dynamicTableService;
22321
+ _this.cdr = cdr;
22322
+ _this._tableHooksService = _tableHooksService;
22236
22323
  /** event to emit when selecting single row */
22237
- this.onRowSelected = new i0.EventEmitter();
22324
+ _this.onRowSelected = new i0.EventEmitter();
22238
22325
  /** event to emit when selecting single row to catch index*/
22239
- this.onRowIndexSelected = new i0.EventEmitter();
22326
+ _this.onRowIndexSelected = new i0.EventEmitter();
22240
22327
  /** event to emit when perform action on row (delte, edit, ... ) */
22241
- this.actionOnRow = new i0.EventEmitter();
22328
+ _this.actionOnRow = new i0.EventEmitter();
22242
22329
  /** event to emit to the higher level when getting data from api is finished */
22243
- this.onGettingData = new i0.EventEmitter();
22330
+ _this.onGettingData = new i0.EventEmitter();
22244
22331
  /** event t emit when selecting multiple row */
22245
- this.onMultiRowSelected = new i0.EventEmitter();
22332
+ _this.onMultiRowSelected = new i0.EventEmitter();
22246
22333
  /** event t emit when start getting data and when finish */
22247
- this.onLoading = new i0.EventEmitter();
22248
- this.sortChanged = new i0.EventEmitter();
22334
+ _this.onLoading = new i0.EventEmitter();
22335
+ _this.sortChanged = new i0.EventEmitter();
22249
22336
  /**
22250
22337
  * @deprecated Use `onPage` instead.
22251
22338
  * @see onPage
22252
22339
  */
22253
- this.onPageChange = new i0.EventEmitter();
22254
- this.onPage = new i0.EventEmitter();
22255
- this.onLoad = new i0.EventEmitter();
22256
- this.onInitialize = new i0.EventEmitter();
22340
+ _this.onPageChange = new i0.EventEmitter();
22341
+ _this.onPage = new i0.EventEmitter();
22342
+ _this.onLoad = new i0.EventEmitter();
22343
+ _this.onInitialize = new i0.EventEmitter();
22257
22344
  /** Translations prefix */
22258
- this.prefix = '';
22345
+ _this.prefix = '';
22259
22346
  /** Controls number of items per page in table */
22260
- this.pageSize = 10;
22347
+ _this.pageSize = 10;
22261
22348
  /** Controls number of items per page in table */
22262
- this.higlightUnread = false;
22263
- this.isLegacyMode = true;
22264
- this.showTotalRecord = false;
22265
- this._pageNumber = 1;
22349
+ _this.higlightUnread = false;
22350
+ _this.isLegacyMode = true;
22351
+ _this.showTotalRecord = false;
22352
+ _this._pageNumber = 1;
22266
22353
  /** Sorting column */
22267
- this.sortingBy = {};
22268
- this.queryParam = {};
22269
- this.customFilters = {};
22270
- this.fullWidth = 'auto';
22354
+ _this.sortingBy = {};
22355
+ _this.queryParam = {};
22356
+ _this.customFilters = {};
22357
+ _this.fullWidth = 'auto';
22271
22358
  /** 'list' for noraml table 'card' for cards mode like in memos */
22272
- this.tableMode = 'list';
22273
- this.defultSort = { name: 'properties.createdAt', dir: 'desc' };
22274
- this.isSearchPage = false;
22359
+ _this.tableMode = 'list';
22360
+ _this.defultSort = { name: 'properties.createdAt', dir: 'desc' };
22361
+ _this.isSearchPage = false;
22275
22362
  /** allow multiselect rows with checkbox */
22276
- this.multiSelectRows = false;
22363
+ _this.multiSelectRows = false;
22277
22364
  /** to show 1st row with custom template in the table*/
22278
- this.customFirstRow = false;
22279
- this.highlightSelectedCard = false;
22280
- this.showActionsAsMenu = false; // flage to show action in menu or side by side
22281
- this.filterParams = {};
22282
- this.skipAggregation = 'onPageChange';
22283
- this.format = 'MMMM d, y';
22284
- this.rows = [];
22285
- this.totalRecords = 0;
22286
- this.sorting = false;
22287
- this.pageSizes = [];
22288
- this.initialized = false;
22365
+ _this.customFirstRow = false;
22366
+ _this.highlightSelectedCard = false;
22367
+ _this.showActionsAsMenu = false; // flage to show action in menu or side by side
22368
+ _this.filterParams = {};
22369
+ _this.skipAggregation = 'onPageChange';
22370
+ _this.format = 'MMMM d, y';
22371
+ _this.rows = [];
22372
+ _this.totalRecords = 0;
22373
+ _this.sorting = false;
22374
+ _this.pageSizes = [];
22375
+ _this.initialized = false;
22376
+ return _this;
22289
22377
  }
22290
22378
  Object.defineProperty(DynamicTableComponent.prototype, "pageNumber", {
22291
22379
  set: function (value) {
@@ -22303,7 +22391,9 @@
22303
22391
  });
22304
22392
  DynamicTableComponent.prototype.ngOnInit = function () {
22305
22393
  var _this = this;
22306
- this.myDataSubscription = this.dynamicTableService.refreshData.pipe(operators.startWith(null)).subscribe(function (filterData) {
22394
+ this.dynamicTableService.refreshData
22395
+ .pipe(operators.startWith(null), operators.takeUntil(this.destroy$))
22396
+ .subscribe(function (filterData) {
22307
22397
  if (filterData) {
22308
22398
  _this.filterParams = Object.assign({}, filterData);
22309
22399
  // reset page number when start new filtering
@@ -22312,9 +22402,6 @@
22312
22402
  _this.getData();
22313
22403
  });
22314
22404
  };
22315
- DynamicTableComponent.prototype.ngOnDestroy = function () {
22316
- this.myDataSubscription ? this.myDataSubscription.unsubscribe() : '';
22317
- };
22318
22405
  DynamicTableComponent.prototype.ngOnChanges = function (changes) {
22319
22406
  var isFirstChange = Object.values(changes).some(function (c) { return c.isFirstChange(); });
22320
22407
  if (isFirstChange) {
@@ -22341,94 +22428,113 @@
22341
22428
  this.onPage.emit({
22342
22429
  pageIndex: this._pageNumber,
22343
22430
  pageSize: this.pageSize,
22344
- length: this.totalRecords
22431
+ length: this.totalRecords,
22345
22432
  });
22346
22433
  };
22347
22434
  DynamicTableComponent.prototype.getData = function (payload, headers) {
22348
- var _this = this;
22349
22435
  if (payload === void 0) { payload = {}; }
22350
22436
  if (headers === void 0) { headers = {}; }
22351
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
22352
- this.loading = true; // internal loading
22353
- this.onLoading.emit(true); // external loading
22354
- var params = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, (this.range ? { dublincore_created_agg: this.range } : {})), this.filterParams), this.queryParam), this.quickFilter), (Object.keys(this.sortingBy || {}).length
22355
- ? {
22356
- sortBy: (_a = this.sortingBy) === null || _a === void 0 ? void 0 : _a.sortBy,
22357
- sortOrder: (_b = this.sortingBy) === null || _b === void 0 ? void 0 : _b.sortOrder
22358
- }
22359
- : {})), { currentPageIndex: +this.pageNum - 1 }), (this.pageSize ? { pageSize: this.pageSize } : {})), { offset: 0 }), payload);
22360
- // don't refresh all table in case of sorting only
22361
- if (!this.sorting && this.isLegacyMode) {
22362
- // used to not refreshing all table in case of sorting since table lose sorting state when refresh all table
22363
- this.rows = []; // used to refresh table to feel changes in actions when perform action and need to refresh actions
22364
- }
22365
- this.sorting = false; // reset sorting status to false and for next sorting func sorting set it to true again
22366
- var _headers = Object.assign(Object.assign({}, this.headers), headers);
22367
- var _providerPayload = {
22368
- query: Object.assign({ pageProvider: this.pageProvider }, params),
22369
- options: {
22370
- headers: _headers
22371
- }
22372
- };
22373
- var _customPayload = {
22374
- params: Object.assign(Object.assign({}, params), (((_c = this.customFilters) === null || _c === void 0 ? void 0 : _c.params) || {})),
22375
- headers: _headers,
22376
- payload: ___default["default"].merge({}, ((_d = this.customUrl) === null || _d === void 0 ? void 0 : _d.payload) || {}, ((_e = this.customFilters) === null || _e === void 0 ? void 0 : _e.payload) || {})
22377
- };
22378
- if (((_f = this.requestActions) === null || _f === void 0 ? void 0 : _f.beforeSubmit) && typeof ((_g = this.requestActions) === null || _g === void 0 ? void 0 : _g.beforeSubmit) === 'string') {
22379
- try {
22380
- if (this.customUrl) {
22381
- _customPayload = Evaluator.evaluate((_h = this.requestActions) === null || _h === void 0 ? void 0 : _h.beforeSubmit, { criteria: _customPayload }, 'payload');
22382
- }
22383
- else {
22384
- _providerPayload = Evaluator.evaluate((_j = this.requestActions) === null || _j === void 0 ? void 0 : _j.beforeSubmit, { criteria: _providerPayload }, 'payload');
22437
+ var _a, _b, _c, _d, _e, _f, _g, _h;
22438
+ return __awaiter(this, void 0, void 0, function () {
22439
+ var params, _headers, _providerPayload, _customPayload, requestData, beforeSubmitString, query$, _request, _request;
22440
+ var _this = this;
22441
+ return __generator(this, function (_j) {
22442
+ switch (_j.label) {
22443
+ case 0:
22444
+ this.loading = true; // internal loading
22445
+ this.onLoading.emit(true); // external loading
22446
+ params = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, (this.range ? { dublincore_created_agg: this.range } : {})), this.filterParams), this.queryParam), this.quickFilter), (Object.keys(this.sortingBy || {}).length
22447
+ ? {
22448
+ sortBy: (_a = this.sortingBy) === null || _a === void 0 ? void 0 : _a.sortBy,
22449
+ sortOrder: (_b = this.sortingBy) === null || _b === void 0 ? void 0 : _b.sortOrder,
22450
+ }
22451
+ : {})), { currentPageIndex: +this.pageNum - 1 }), (this.pageSize ? { pageSize: this.pageSize } : {})), { offset: 0 }), payload);
22452
+ // don't refresh all table in case of sorting only
22453
+ if (!this.sorting && this.isLegacyMode) {
22454
+ // used to not refreshing all table in case of sorting since table lose sorting state when refresh all table
22455
+ this.rows = []; // used to refresh table to feel changes in actions when perform action and need to refresh actions
22456
+ }
22457
+ this.sorting = false; // reset sorting status to false and for next sorting func sorting set it to true again
22458
+ _headers = Object.assign(Object.assign({}, this.headers), headers);
22459
+ _providerPayload = {
22460
+ query: Object.assign(Object.assign({ pageProvider: this.pageProvider }, params), (((_c = this.customFilters) === null || _c === void 0 ? void 0 : _c.params) || {})),
22461
+ options: {
22462
+ headers: _headers,
22463
+ },
22464
+ };
22465
+ _customPayload = {
22466
+ url: (_d = this.customUrl) === null || _d === void 0 ? void 0 : _d.url,
22467
+ params: Object.assign(Object.assign({}, params), (((_e = this.customFilters) === null || _e === void 0 ? void 0 : _e.params) || {})),
22468
+ headers: _headers,
22469
+ payload: ___default["default"].merge({}, ((_f = this.customUrl) === null || _f === void 0 ? void 0 : _f.payload) || {}, ((_g = this.customFilters) === null || _g === void 0 ? void 0 : _g.payload) || {}),
22470
+ };
22471
+ requestData = this.customUrl
22472
+ ? _customPayload
22473
+ : _providerPayload;
22474
+ beforeSubmitString = (_h = this.requestActions) === null || _h === void 0 ? void 0 : _h.beforeSubmit;
22475
+ if (!(typeof beforeSubmitString === 'string')) return [3 /*break*/, 2];
22476
+ return [4 /*yield*/, this._tableHooksService.evaluate(beforeSubmitString, requestData)];
22477
+ case 1:
22478
+ requestData = _j.sent();
22479
+ _j.label = 2;
22480
+ case 2: return [4 /*yield*/, this._tableHooksService.executeBeforeSubmit(requestData)];
22481
+ case 3:
22482
+ requestData = _j.sent();
22483
+ if (this.customUrl) {
22484
+ _request = requestData;
22485
+ query$ = this.callApi.customQuery({
22486
+ url: _request.url,
22487
+ method: this.customUrl.method,
22488
+ }, _request.params, _request.headers, _request.payload);
22489
+ }
22490
+ else {
22491
+ _request = requestData;
22492
+ query$ = this.callApi.query(_request.query, _request.options);
22493
+ }
22494
+ query$
22495
+ .pipe(operators.map(function (data) {
22496
+ data.entries.map(function (item) { return _this.adapter.adaptIn(item, _this.fields); });
22497
+ return data;
22498
+ }), operators.catchError(function (err) {
22499
+ throw err;
22500
+ }), operators.takeUntil(this.destroy$))
22501
+ .subscribe(function (res) {
22502
+ _this.loading = false;
22503
+ _this.onLoading.emit(false);
22504
+ _this.onLoad.emit(res);
22505
+ if (!_this.initialized) {
22506
+ _this.onInitialize.emit(res);
22507
+ _this.initialized = true;
22508
+ }
22509
+ res.entries.forEach(function (element) {
22510
+ var _a, _b, _c, _d, _e, _f, _g, _h;
22511
+ if (element.properties &&
22512
+ ((_a = element.properties) === null || _a === void 0 ? void 0 : _a.creator) &&
22513
+ ((_b = element.properties.creator) === null || _b === void 0 ? void 0 : _b.properties)) {
22514
+ element.properties['creatorFullObject'] = Object.assign({}, element.properties.creator);
22515
+ element.properties.creator =
22516
+ ((_d = (_c = element.properties.creator) === null || _c === void 0 ? void 0 : _c.properties) === null || _d === void 0 ? void 0 : _d.firstName) +
22517
+ ' ' +
22518
+ ((_f = (_e = element.properties.creator) === null || _e === void 0 ? void 0 : _e.properties) === null || _f === void 0 ? void 0 : _f.lastName);
22519
+ }
22520
+ if (element.properties && ((_g = element.properties) === null || _g === void 0 ? void 0 : _g.assignee)) {
22521
+ element.properties.assignee = (_h = element.properties) === null || _h === void 0 ? void 0 : _h.assignee.fullName;
22522
+ }
22523
+ // if(this.higlightUnread){
22524
+ // this.cechkIfReadOrNot(element.properties);
22525
+ // }
22526
+ });
22527
+ _this.totalRecords = res.resultsCount;
22528
+ _this.rows = res.entries;
22529
+ _this.cdr.detectChanges();
22530
+ // emit data to outside in case of search page for the first time only to prevent refreshing aggregation with every page change
22531
+ // and for any other page type emit data directly in all page numbers
22532
+ if ((_this.isSearchPage && _this.pageNum === 1) || !_this.isSearchPage)
22533
+ _this.onGettingData.emit(res);
22534
+ });
22535
+ return [2 /*return*/];
22385
22536
  }
22386
- }
22387
- catch (e) {
22388
- console.error(e);
22389
- }
22390
- }
22391
- var query$ = this.customUrl
22392
- ? this.callApi.customQuery(this.customUrl, _customPayload.params, _customPayload.headers, _customPayload.payload)
22393
- : this.callApi.query(_providerPayload.query, _providerPayload.options);
22394
- query$
22395
- .pipe(operators.map(function (data) {
22396
- data.entries.map(function (item) { return _this.adapter.adaptIn(item, _this.fields); });
22397
- return data;
22398
- }), operators.catchError(function (err) {
22399
- throw err;
22400
- }))
22401
- .subscribe(function (res) {
22402
- _this.loading = false;
22403
- _this.onLoading.emit(false);
22404
- _this.onLoad.emit(res);
22405
- if (!_this.initialized) {
22406
- _this.onInitialize.emit(res);
22407
- _this.initialized = true;
22408
- }
22409
- res.entries.forEach(function (element) {
22410
- var _a, _b, _c, _d, _e, _f, _g, _h;
22411
- if (element.properties && ((_a = element.properties) === null || _a === void 0 ? void 0 : _a.creator) && ((_b = element.properties.creator) === null || _b === void 0 ? void 0 : _b.properties)) {
22412
- element.properties['creatorFullObject'] = Object.assign({}, element.properties.creator);
22413
- element.properties.creator =
22414
- ((_d = (_c = element.properties.creator) === null || _c === void 0 ? void 0 : _c.properties) === null || _d === void 0 ? void 0 : _d.firstName) +
22415
- ' ' +
22416
- ((_f = (_e = element.properties.creator) === null || _e === void 0 ? void 0 : _e.properties) === null || _f === void 0 ? void 0 : _f.lastName);
22417
- }
22418
- if (element.properties && ((_g = element.properties) === null || _g === void 0 ? void 0 : _g.assignee)) {
22419
- element.properties.assignee = (_h = element.properties) === null || _h === void 0 ? void 0 : _h.assignee.fullName;
22420
- }
22421
- // if(this.higlightUnread){
22422
- // this.cechkIfReadOrNot(element.properties);
22423
- // }
22424
- });
22425
- _this.totalRecords = res.resultsCount;
22426
- _this.rows = res.entries;
22427
- _this.cdr.detectChanges();
22428
- // emit data to outside in case of search page for the first time only to prevent refreshing aggregation with every page change
22429
- // and for any other page type emit data directly in all page numbers
22430
- if ((_this.isSearchPage && _this.pageNum === 1) || !_this.isSearchPage)
22431
- _this.onGettingData.emit(res);
22537
+ });
22432
22538
  });
22433
22539
  };
22434
22540
  // function to be executed when clicking on single row
@@ -22458,7 +22564,7 @@
22458
22564
  this.onPage.emit({
22459
22565
  pageIndex: this._pageNumber,
22460
22566
  pageSize: this.pageSize,
22461
- length: this.totalRecords
22567
+ length: this.totalRecords,
22462
22568
  });
22463
22569
  this.getData({}, this.skipAggregation === 'onPageChange' ? { skipAggregates: 'true' } : {});
22464
22570
  };
@@ -22473,7 +22579,9 @@
22473
22579
  if (element['viewers:users'] && element['viewers:users'].length) {
22474
22580
  element.isReaded = false;
22475
22581
  element['viewers:users'].map(function (user) {
22476
- if (user.username === _this.nuxeoService.nuxeoClient.user.properties.username && user.state === "read") {
22582
+ if (user.username ===
22583
+ _this.nuxeoService.nuxeoClient.user.properties.username &&
22584
+ user.state === 'read') {
22477
22585
  element.isReaded = true;
22478
22586
  }
22479
22587
  });
@@ -22483,9 +22591,9 @@
22483
22591
  }
22484
22592
  };
22485
22593
  return DynamicTableComponent;
22486
- }());
22487
- DynamicTableComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: DynamicTableComponent, deps: [{ token: AdapterService }, { token: CallApiService }, { token: NuxeoService }, { token: DynamicTableService }, { token: i0__namespace.ChangeDetectorRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
22488
- DynamicTableComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: DynamicTableComponent, selector: "cts-dynamic-table", inputs: { columns: "columns", responsiveColumns: "responsiveColumns", entityType: "entityType", prefix: "prefix", headers: "headers", fields: "fields", pageProvider: "pageProvider", pageSize: "pageSize", higlightUnread: "higlightUnread", isLegacyMode: "isLegacyMode", showTotalRecord: "showTotalRecord", pageNumber: "pageNumber", sortingBy: "sortingBy", queryParam: "queryParam", customFilters: "customFilters", quickFilter: "quickFilter", report: "report", rowCursor: "rowCursor", fullWidth: "fullWidth", tableMode: "tableMode", componentName: "componentName", tableActions: "tableActions", defultSort: "defultSort", range: "range", isSearchPage: "isSearchPage", multiSelectRows: "multiSelectRows", customFirstRow: "customFirstRow", highlightSelectedCard: "highlightSelectedCard", showActionsAsMenu: "showActionsAsMenu", filterParams: "filterParams", skipAggregation: "skipAggregation", customUrl: "customUrl", format: "format", requestActions: "requestActions", pageSizes: "pageSizes" }, outputs: { onRowSelected: "onRowSelected", onRowIndexSelected: "onRowIndexSelected", actionOnRow: "actionOnRow", onGettingData: "onGettingData", onMultiRowSelected: "onMultiRowSelected", onLoading: "onLoading", sortChanged: "sortChanged", onPageChange: "onPageChange", onPage: "onPage", onLoad: "onLoad", onInitialize: "onInitialize" }, host: { properties: { "class.loading-results": "loading", "class.no-data": "rows.length <= 0" } }, queries: [{ propertyName: "emptyTemplate", first: true, predicate: EMPTY_TEMPLATE, descendants: true, read: i0.TemplateRef, static: true }], usesOnChanges: true, ngImport: i0__namespace, template: "<div class=\"wrapping table-wrapping\">\r\n\t<ng-container *ngIf=\"isLegacyMode\">\r\n\t\t<div class=\"table-reposition\">\r\n\t\t\t<ng-container *ngIf=\"rows.length\" [ngTemplateOutlet]=\"table\"></ng-container>\r\n\t\t</div>\r\n\t\t<ng-container *ngIf=\"loading\">\r\n\t\t\t<cts-spinner></cts-spinner>\r\n\t\t</ng-container>\r\n\t</ng-container>\r\n\r\n\t<div class=\"table-reposition\" *ngIf=\"!isLegacyMode\">\r\n\t\t<ng-container [ngTemplateOutlet]=\"table\"></ng-container>\r\n\t\t<ng-container\r\n\t\t\t*ngIf=\"!initialized\"\r\n\t\t\t[ngTemplateOutlet]=\"skeleton\"\r\n\t\t\t[ngTemplateOutletContext]=\"{ $implicit: 10 }\"\r\n\t\t></ng-container>\r\n\t</div>\r\n\r\n\t<div\r\n\t\tclass=\"pagination-iner-wraper my-3\"\r\n\t\t[ngClass]=\"{ relative: pageSizes?.length }\"\r\n\t\t*ngIf=\"rows.length \"\r\n\t>\r\n\t\t<cts-pagination\r\n *ngIf=\"totalRecords > pageSize\"\r\n\t\t\t[page]=\"pageNum\"\r\n\t\t\t(change)=\"paginationChange($event)\"\r\n\t\t\t[size]=\"pageSize\"\r\n\t\t\t[count]=\"totalRecords\"\r\n\t\t></cts-pagination>\r\n\t\t<div class=\"absolute ndfPageSizes flex gap-x-3 items-center mt-2\">\r\n\t\t\t<ndf-page-sizes-list\r\n\t\t\t\t*ngIf=\"pageSizes?.length\"\r\n\t\t\t\t[pageSizes]=\"pageSizes\"\r\n\t\t\t\t[selectedPageSize]=\"pageSize\"\r\n\t\t\t\t(onChangePageSize)=\"onChangePageSize($event)\"\r\n\t\t\t>\r\n\t\t\t</ndf-page-sizes-list>\r\n\r\n\t\t\t<span *ngIf=\"showTotalRecord\">{{ 'TABLE.totalRecords' | translate: { count: totalRecords } }}</span>\r\n\t\t</div>\r\n\t</div>\r\n\r\n\t<ng-container\r\n\t\t*ngIf=\"isLegacyMode\"\r\n\t\t[ngTemplateOutlet]=\"emptyTemplate || legacyDefaultEmptyState\"\r\n\t\t[ngTemplateOutletContext]=\"{ $implicit: loading, rows: rows, initialized: initialized }\"\r\n\t></ng-container>\r\n\r\n\t<ng-container\r\n\t\t*ngIf=\"!isLegacyMode\"\r\n\t\t[ngTemplateOutlet]=\"emptyTemplate || defaultEmptyState\"\r\n\t\t[ngTemplateOutletContext]=\"{ $implicit: loading, rows: rows, initialized: initialized }\"\r\n\t></ng-container>\r\n</div>\r\n\r\n<ng-template #table>\r\n\t<cts-table\r\n\t\t[rows]=\"rows\"\r\n\t\t[columns]=\"columns\"\r\n\t\t[responsiveColumns]=\"responsiveColumns\"\r\n\t\t[rowCursor]=\"rowCursor\"\r\n\t\t[fullWidth]=\"fullWidth\"\r\n\t\t[entityType]=\"entityType\"\r\n\t\t[prefix]=\"prefix\"\r\n\t\t[totalRecords]=\"totalRecords\"\r\n\t\t[tableMode]=\"tableMode\"\r\n\t\t[higlightUnread]=\"higlightUnread\"\r\n\t\t[componentName]=\"componentName\"\r\n\t\t[multiSelectRows]=\"multiSelectRows\"\r\n\t\t[tableActions]=\"tableActions\"\r\n\t\t[showActionsAsMenu]=\"showActionsAsMenu\"\r\n\t\t[defultSort]=\"defultSort\"\r\n\t\t[format]=\"format\"\r\n\t\t[highlightSelectedCard]=\"highlightSelectedCard\"\r\n\t\t[customFirstRow]=\"customFirstRow\"\r\n\t\t(onRowSelected)=\"rowDetails($event)\"\r\n\t\t(onRowIndexSelected)=\"indexDetails($event)\"\r\n\t\t(onMultiRowSelected)=\"onMultiRowSelectValue($event)\"\r\n\t\t(actionOnRow)=\"performAction($event)\"\r\n\t\t(onSorting)=\"onSort($event)\"\r\n\t></cts-table>\r\n</ng-template>\r\n\r\n<ng-template #legacyDefaultEmptyState>\r\n\t<div class=\"empty-state\" *ngIf=\"!loading && rows.length === 0\">\r\n\t\t<div class=\"text\">\r\n\t\t\t{{ (prefix ? prefix + 'noData' : 'noData') | translate }}\r\n\t\t</div>\r\n\t</div>\r\n\t<div class=\"empty-state\" *ngIf=\"loading && rows.length === 0\">\r\n\t\t<div class=\"text\">\r\n\t\t\t{{ (prefix ? prefix + 'gettingData' : 'gettingData') | translate }}\r\n\t\t</div>\r\n\t</div>\r\n</ng-template>\r\n\r\n<ng-template #defaultEmptyState>\r\n\t<div class=\"empty-state\" *ngIf=\"!loading && rows.length === 0\">\r\n\t\t<div class=\"text\">\r\n\t\t\t{{ (prefix ? prefix + 'noData' : 'noData') | translate }}\r\n\t\t</div>\r\n\t</div>\r\n\t<div *ngIf=\"loading && initialized\" class=\"loading-content\">\r\n\t\t<mat-spinner [diameter]=\"100\"></mat-spinner>\r\n\t</div>\r\n</ng-template>\r\n\r\n<ng-template #skeleton let-rows>\r\n\t<table class=\"w-full\">\r\n\t\t<thead *ngIf=\"false\">\r\n\t\t\t<tr class=\"border-b border-green-900\">\r\n\t\t\t\t<th *ngIf=\"multiSelectRows\" class=\"p-3 py-4\" style=\"width: 60px\">\r\n\t\t\t\t\t<app-skeleton width=\"60px\" height=\"1.3rem\"></app-skeleton>\r\n\t\t\t\t</th>\r\n\t\t\t\t<th *ngFor=\"let num of [].constructor(columns?.length || 4); let i = index\" class=\"px-3 py-4\">\r\n\t\t\t\t\t<app-skeleton [randomWidth]=\"true\" height=\"1.7rem\"></app-skeleton>\r\n\t\t\t\t</th>\r\n\t\t\t</tr>\r\n\t\t</thead>\r\n\t\t<tbody>\r\n\t\t\t<tr *ngFor=\"let row of [].constructor(rows || 10); let index = index\" class=\"border-b border-gray-200\">\r\n\t\t\t\t<td *ngIf=\"multiSelectRows\" class=\"p-3 py-4\" style=\"width: 50px\">\r\n\t\t\t\t\t<app-skeleton width=\"50px\" height=\"1.3rem\"></app-skeleton>\r\n\t\t\t\t</td>\r\n\t\t\t\t<td *ngFor=\"let col of [].constructor(columns?.length || 4); let i = index\" class=\"p-3 py-4\">\r\n\t\t\t\t\t<app-skeleton [randomWidth]=\"true\" height=\"1.3rem\"></app-skeleton>\r\n\t\t\t\t</td>\r\n\t\t\t</tr>\r\n\t\t</tbody>\r\n\t</table>\r\n</ng-template>\r\n", styles: [".bi{margin:0!important}.memo-sorting-wrapper{width:265px;margin:0 10px;height:100%;display:flex}.memo-sorting-wrapper .sorting-direction{width:65px;height:40px;background-color:#465573;color:#fff;font-size:20px;display:flex;justify-content:center;align-items:center;cursor:pointer}.memo-sorting-wrapper .memo-sorting-trigger{width:calc(100% - 65px);height:100%;background-color:transparent;border:1px solid lightgrey;display:flex;justify-content:space-between;align-items:center;padding:0 15px;font-size:14px}.memo-sorting-wrapper .memo-sorting-trigger i{font-size:16px;color:gray}.memo-sorting-menu{width:200px}.my-button{border:1px solid #465573;color:#465573;border-radius:5px;background-color:transparent;font-weight:bold;min-width:80px;height:40px}.my-button.reset{border:none}.my-button:hover{color:#fff;background-color:#465573}.my-button:hover.reset{color:#465573;border:1px solid #465573;background-color:#fff}.app-property-value .app-input-wrapper label{color:#646f85;font-size:13px;margin-bottom:5px}.app-property-value .app-input-wrapper label .text-danger{font-size:16px;line-height:14px;margin:0 5px!important}.app-property-value .app-input-wrapper .form-control{border:1px solid #ccc;border-radius:5px;background-color:#8f98aa1a;height:40px}.app-property-value .app-input-wrapper .form-control:disabled{background-color:#e9ecef!important}.app-property-value .app-input-wrapper .form-control:focus{border:1px solid #1a96c6;box-shadow:0 0 4px #79c3c26b!important}.app-property-value .app-input-wrapper .app-textitem-editable-error .error-containers{list-style:none;padding:0;margin:0;font-size:14px}.app-property-value .app-input-wrapper .app-textitem-editable-error .error-containers .error{margin-top:5px}.autocomplete-container .input-container input:focus,hijri-gregorian-datepicker .form-group .input-group .form-control:focus,.ng-select.ng-select-focused .ng-select-container{border:1px solid #1a96c6!important;box-shadow:0 0 4px #79c3c26b!important}input::placeholder{font-size:12px}.form-control:focus{box-shadow:none!important}.mat-stepper-horizontal{margin-top:-25px}.mat-stepper-horizontal .mat-horizontal-stepper-header-container .mat-step-header.cdk-program-focused{background-color:transparent}.mat-stepper-horizontal .mat-horizontal-stepper-header-container .mat-step-header .mat-step-icon-selected{background-color:transparent;color:#fff;background-image:linear-gradient(to right,#0dbab5,#1a96c6)}@media only screen and (max-width: 576px){.mat-stepper-horizontal .mat-horizontal-stepper-header-container .mat-step-header .mat-step-label .mat-step-text-label{white-space:pre-wrap;overflow:visible}}.mat-stepper-horizontal .mat-horizontal-content-container{overflow:visible}@media only screen and (max-width: 768px){.mat-stepper-horizontal .mat-horizontal-content-container{padding:0 0 24px}}.mat-stepper-horizontal.rtl .mat-horizontal-stepper-header:first-child:after,.mat-stepper-horizontal.rtl .mat-horizontal-stepper-header:last-child:before{display:none}.mat-stepper-horizontal.rtl .mat-horizontal-stepper-header:first-child:before{border-top-width:1px;border-top-style:solid;content:\"\";display:inline-block;height:0;position:absolute;width:calc(50% - 20px);left:0}.mat-stepper-horizontal.rtl .mat-horizontal-stepper-header:last-child:after{border-top-width:1px;border-top-style:solid;content:\"\";display:inline-block;height:0;position:absolute;width:calc(50% - 20px);right:0}.form-wrapper{padding:30px 15px;border:1px solid #dde0e2}.form-wrapper .buttons-wrapper{display:flex;justify-content:space-between}.form-wrapper .buttons-wrapper .action-buttons-wrapper{display:flex}.form-wrapper .buttons-wrapper button{background-image:linear-gradient(to right,#0dbab5,#1a96c6);height:40px;color:#fff;border:none;width:125px;margin-top:20px;border-radius:5px}.form-wrapper .buttons-wrapper button:disabled{opacity:.4;cursor:not-allowed}.form-wrapper .buttons-wrapper button:hover{opacity:.7}.form-wrapper .upload-wrapper{display:flex;flex-direction:column;justify-content:flex-end}.form-wrapper .upload-wrapper label{color:#8f98aa;font-size:14px}.form-wrapper .upload-wrapper button{padding:10px;border:1px solid lightgray}.form-wrapper .upload-wrapper button span{margin:0 10px}.renameFileComponent .form-wrapper{padding:30px 15px;border:none!important}.renameFileComponent .form-wrapper .buttons-wrapper{display:flex;justify-content:space-between}.renameFileComponent .form-wrapper .buttons-wrapper .action-buttons-wrapper{display:flex}.renameFileComponent .form-wrapper .buttons-wrapper button{background-image:linear-gradient(to right,#0dbab5,#1a96c6);height:40px;color:#fff;border:none;width:125px;margin-top:20px;border-radius:5px}.renameFileComponent .form-wrapper .buttons-wrapper button:disabled{opacity:.4;cursor:not-allowed}.renameFileComponent .form-wrapper .buttons-wrapper button:hover{opacity:.7}.renameFileComponent .form-wrapper .upload-wrapper{display:flex;flex-direction:column;justify-content:flex-end}.renameFileComponent .form-wrapper .upload-wrapper label{color:#8f98aa;font-size:14px}.renameFileComponent .form-wrapper .upload-wrapper button{padding:10px;border:1px solid lightgray}.renameFileComponent .form-wrapper .upload-wrapper button span{margin:0 10px}.my-dynamic-viewer{display:flex;align-items:center;font-size:12px;min-height:30px}.my-dynamic-viewer .my-label{font-size:12px;font-weight:500;width:150px;word-break:break-word}@media (max-width: 992px){.my-dynamic-viewer .my-label{width:50%}}.my-dynamic-viewer .my-value{width:calc(100% - 150px);word-break:break-word}@media (max-width: 992px){.my-dynamic-viewer .my-value{width:50%}}.my-dynamic-viewer .direction-img{font-size:14px}.my-dynamic-viewer .direction-img .incoming{display:none}.my-dynamic-viewer .direction-img .outgoing{display:none}.my-dynamic-viewer .direction-img .internal{display:none}.my-dynamic-viewer.draft .my-value{color:#596973}.my-dynamic-viewer.inProgress .my-value{color:#3c3cf0}.my-dynamic-viewer.registered .my-value{color:#4f008c}.my-dynamic-viewer.archived .my-value{color:#fbb62c}.my-dynamic-viewer.closed .my-value{color:#00dca5}.my-dynamic-viewer.approved .my-value{color:#06a57e}.my-dynamic-viewer.assigned .my-value{color:#fd6670}.my-dynamic-viewer.sent .my-value{color:#3c3cf0}.my-dynamic-viewer.published .my-value{color:#00dca5}.my-dynamic-viewer.Outgoing .my-value{display:flex}.my-dynamic-viewer.Outgoing .my-value .direction-img .outgoing{color:#fbb62c;margin:1px 5px;display:flex}.my-dynamic-viewer.Outgoing .my-value .text{margin:0 5px}.my-dynamic-viewer.Internal .my-value{display:flex}.my-dynamic-viewer.Internal .my-value .direction-img .internal{color:#3c3cf0;margin:1px 5px;display:flex}.my-dynamic-viewer.Internal .my-value .text{margin:0 5px}.my-dynamic-viewer.Incoming .my-value{display:flex}.my-dynamic-viewer.Incoming .my-value .direction-img .incoming{color:#00dca5;display:flex}.my-dynamic-viewer.Incoming .my-value .text{margin:-3px 5px 0}.my-dynamic-viewer.vertical{display:block}.my-dynamic-viewer.vertical .my-label{width:auto}.my-dynamic-viewer.vertical .my-value{width:auto}.my-dynamic-viewer.with-out-label{width:100%!important}.wrapping{position:relative}.wrapping .table-reposition{overflow-y:var(--table-reposition-overflow-y, hidden);scrollbar-color:#b4bac6 transparent!important;scrollbar-width:thin!important;overflow-x:hidden}.empty-state{padding:200px;display:flex;justify-content:center;align-items:center;font-size:20px;font-weight:bold}::-webkit-scrollbar{width:8px;height:8px}::-webkit-scrollbar-thumb{background:#b4bac6}.dark-scroll::-webkit-scrollbar-thumb{background:#8f98aa}.ndfPageSizes{right:0;left:unset}.rtl .ndfPageSizes{right:unset;left:0}.loading-content{position:var(--loading-content-position, absolute);inset:0;display:grid;place-items:center;background:var(--loading-content-background, rgba(255, 255, 255, .2));-webkit-backdrop-filter:var(--loading-content-backdrop-filter, blur(3px));backdrop-filter:var(--loading-content-backdrop-filter, blur(3px))}.pagination-iner-wraper{display:var(--pagination-inner-display, flex);justify-content:var(--pagination-inner-justify, center);align-items:var(--pagination-inner-align, center)}\n"], components: [{ type: SpinnerComponent, selector: "cts-spinner" }, { type: PaginationComponent, selector: "cts-pagination", inputs: ["size", "count", "page"], outputs: ["change"] }, { type: PageSizesListComponent, selector: "ndf-page-sizes-list", inputs: ["pageSizes", "selectedPageSize"], outputs: ["onChangePageSize"] }, { type: TableComponent, selector: "cts-table", inputs: ["rows", "columns", "responsiveColumns", "entityType", "prefix", "pageCount", "totalRecords", "rowCursor", "fullWidth", "vocItemTranslationPrefix", "higlightUnread", "tableMode", "componentName", "tableActions", "format", "defultSort", "highlightSelectedCard", "multiSelectRows", "customFirstRow", "showActionsAsMenu", "messages", "defaultColumnSize"], outputs: ["onRowSelected", "onRowIndexSelected", "onIconSelected", "actionOnRow", "onSorting", "onMultiRowSelected"] }, { type: i6__namespace.MatSpinner, selector: "mat-spinner", inputs: ["color"] }, { type: SkeletonComponent, selector: "app-skeleton", inputs: ["styleClass", "style", "shape", "animation", "radius", "size", "width", "height", "randomWidth"] }], directives: [{ type: i4__namespace$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4__namespace$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i4__namespace$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i4__namespace$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "translate": i1__namespace.TranslatePipe }, encapsulation: i0__namespace.ViewEncapsulation.None });
22594
+ }(DestroySubject));
22595
+ DynamicTableComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: DynamicTableComponent, deps: [{ token: AdapterService }, { token: CallApiService }, { token: NuxeoService }, { token: DynamicTableService }, { token: i0__namespace.ChangeDetectorRef }, { token: TableHooksService }], target: i0__namespace.ɵɵFactoryTarget.Component });
22596
+ DynamicTableComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: DynamicTableComponent, selector: "cts-dynamic-table", inputs: { columns: "columns", responsiveColumns: "responsiveColumns", entityType: "entityType", prefix: "prefix", headers: "headers", fields: "fields", pageProvider: "pageProvider", pageSize: "pageSize", higlightUnread: "higlightUnread", isLegacyMode: "isLegacyMode", showTotalRecord: "showTotalRecord", pageNumber: "pageNumber", sortingBy: "sortingBy", queryParam: "queryParam", customFilters: "customFilters", quickFilter: "quickFilter", report: "report", rowCursor: "rowCursor", fullWidth: "fullWidth", tableMode: "tableMode", componentName: "componentName", tableActions: "tableActions", defultSort: "defultSort", range: "range", isSearchPage: "isSearchPage", multiSelectRows: "multiSelectRows", customFirstRow: "customFirstRow", highlightSelectedCard: "highlightSelectedCard", showActionsAsMenu: "showActionsAsMenu", filterParams: "filterParams", skipAggregation: "skipAggregation", customUrl: "customUrl", format: "format", requestActions: "requestActions", pageSizes: "pageSizes" }, outputs: { onRowSelected: "onRowSelected", onRowIndexSelected: "onRowIndexSelected", actionOnRow: "actionOnRow", onGettingData: "onGettingData", onMultiRowSelected: "onMultiRowSelected", onLoading: "onLoading", sortChanged: "sortChanged", onPageChange: "onPageChange", onPage: "onPage", onLoad: "onLoad", onInitialize: "onInitialize" }, host: { properties: { "class.loading-results": "loading", "class.no-data": "rows.length <= 0" } }, queries: [{ propertyName: "emptyTemplate", first: true, predicate: EMPTY_TEMPLATE, descendants: true, read: i0.TemplateRef, static: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0__namespace, template: "<div class=\"wrapping table-wrapping\">\r\n\t<ng-container *ngIf=\"isLegacyMode\">\r\n\t\t<div class=\"table-reposition\">\r\n\t\t\t<ng-container *ngIf=\"rows.length\" [ngTemplateOutlet]=\"table\"></ng-container>\r\n\t\t</div>\r\n\t\t<ng-container *ngIf=\"loading\">\r\n\t\t\t<cts-spinner></cts-spinner>\r\n\t\t</ng-container>\r\n\t</ng-container>\r\n\r\n\t<div class=\"table-reposition\" *ngIf=\"!isLegacyMode\">\r\n\t\t<ng-container [ngTemplateOutlet]=\"table\"></ng-container>\r\n\t\t<ng-container\r\n\t\t\t*ngIf=\"!initialized\"\r\n\t\t\t[ngTemplateOutlet]=\"skeleton\"\r\n\t\t\t[ngTemplateOutletContext]=\"{ $implicit: 10 }\"\r\n\t\t></ng-container>\r\n\t</div>\r\n\r\n\t<div\r\n\t\tclass=\"pagination-iner-wraper my-3\"\r\n\t\t[ngClass]=\"{ relative: pageSizes?.length }\"\r\n\t\t*ngIf=\"rows.length \"\r\n\t>\r\n\t\t<cts-pagination\r\n *ngIf=\"totalRecords > pageSize\"\r\n\t\t\t[page]=\"pageNum\"\r\n\t\t\t(change)=\"paginationChange($event)\"\r\n\t\t\t[size]=\"pageSize\"\r\n\t\t\t[count]=\"totalRecords\"\r\n\t\t></cts-pagination>\r\n\t\t<div class=\"absolute ndfPageSizes flex gap-x-3 items-center mt-2\">\r\n\t\t\t<ndf-page-sizes-list\r\n\t\t\t\t*ngIf=\"pageSizes?.length\"\r\n\t\t\t\t[pageSizes]=\"pageSizes\"\r\n\t\t\t\t[selectedPageSize]=\"pageSize\"\r\n\t\t\t\t(onChangePageSize)=\"onChangePageSize($event)\"\r\n\t\t\t>\r\n\t\t\t</ndf-page-sizes-list>\r\n\r\n\t\t\t<span *ngIf=\"showTotalRecord\">{{ 'TABLE.totalRecords' | translate: { count: totalRecords } }}</span>\r\n\t\t</div>\r\n\t</div>\r\n\r\n\t<ng-container\r\n\t\t*ngIf=\"isLegacyMode\"\r\n\t\t[ngTemplateOutlet]=\"emptyTemplate || legacyDefaultEmptyState\"\r\n\t\t[ngTemplateOutletContext]=\"{ $implicit: loading, rows: rows, initialized: initialized }\"\r\n\t></ng-container>\r\n\r\n\t<ng-container\r\n\t\t*ngIf=\"!isLegacyMode\"\r\n\t\t[ngTemplateOutlet]=\"emptyTemplate || defaultEmptyState\"\r\n\t\t[ngTemplateOutletContext]=\"{ $implicit: loading, rows: rows, initialized: initialized }\"\r\n\t></ng-container>\r\n</div>\r\n\r\n<ng-template #table>\r\n\t<cts-table\r\n\t\t[rows]=\"rows\"\r\n\t\t[columns]=\"columns\"\r\n\t\t[responsiveColumns]=\"responsiveColumns\"\r\n\t\t[rowCursor]=\"rowCursor\"\r\n\t\t[fullWidth]=\"fullWidth\"\r\n\t\t[entityType]=\"entityType\"\r\n\t\t[prefix]=\"prefix\"\r\n\t\t[totalRecords]=\"totalRecords\"\r\n\t\t[tableMode]=\"tableMode\"\r\n\t\t[higlightUnread]=\"higlightUnread\"\r\n\t\t[componentName]=\"componentName\"\r\n\t\t[multiSelectRows]=\"multiSelectRows\"\r\n\t\t[tableActions]=\"tableActions\"\r\n\t\t[showActionsAsMenu]=\"showActionsAsMenu\"\r\n\t\t[defultSort]=\"defultSort\"\r\n\t\t[format]=\"format\"\r\n\t\t[highlightSelectedCard]=\"highlightSelectedCard\"\r\n\t\t[customFirstRow]=\"customFirstRow\"\r\n\t\t(onRowSelected)=\"rowDetails($event)\"\r\n\t\t(onRowIndexSelected)=\"indexDetails($event)\"\r\n\t\t(onMultiRowSelected)=\"onMultiRowSelectValue($event)\"\r\n\t\t(actionOnRow)=\"performAction($event)\"\r\n\t\t(onSorting)=\"onSort($event)\"\r\n\t></cts-table>\r\n</ng-template>\r\n\r\n<ng-template #legacyDefaultEmptyState>\r\n\t<div class=\"empty-state\" *ngIf=\"!loading && rows.length === 0\">\r\n\t\t<div class=\"text\">\r\n\t\t\t{{ (prefix ? prefix + 'noData' : 'noData') | translate }}\r\n\t\t</div>\r\n\t</div>\r\n\t<div class=\"empty-state\" *ngIf=\"loading && rows.length === 0\">\r\n\t\t<div class=\"text\">\r\n\t\t\t{{ (prefix ? prefix + 'gettingData' : 'gettingData') | translate }}\r\n\t\t</div>\r\n\t</div>\r\n</ng-template>\r\n\r\n<ng-template #defaultEmptyState>\r\n\t<div class=\"empty-state\" *ngIf=\"!loading && rows.length === 0\">\r\n\t\t<div class=\"text\">\r\n\t\t\t{{ (prefix ? prefix + 'noData' : 'noData') | translate }}\r\n\t\t</div>\r\n\t</div>\r\n\t<div *ngIf=\"loading && initialized\" class=\"loading-content\">\r\n\t\t<mat-spinner [diameter]=\"100\"></mat-spinner>\r\n\t</div>\r\n</ng-template>\r\n\r\n<ng-template #skeleton let-rows>\r\n\t<table class=\"w-full\">\r\n\t\t<thead *ngIf=\"false\">\r\n\t\t\t<tr class=\"border-b border-green-900\">\r\n\t\t\t\t<th *ngIf=\"multiSelectRows\" class=\"p-3 py-4\" style=\"width: 60px\">\r\n\t\t\t\t\t<app-skeleton width=\"60px\" height=\"1.3rem\"></app-skeleton>\r\n\t\t\t\t</th>\r\n\t\t\t\t<th *ngFor=\"let num of [].constructor(columns?.length || 4); let i = index\" class=\"px-3 py-4\">\r\n\t\t\t\t\t<app-skeleton [randomWidth]=\"true\" height=\"1.7rem\"></app-skeleton>\r\n\t\t\t\t</th>\r\n\t\t\t</tr>\r\n\t\t</thead>\r\n\t\t<tbody>\r\n\t\t\t<tr *ngFor=\"let row of [].constructor(rows || 10); let index = index\" class=\"border-b border-gray-200\">\r\n\t\t\t\t<td *ngIf=\"multiSelectRows\" class=\"p-3 py-4\" style=\"width: 50px\">\r\n\t\t\t\t\t<app-skeleton width=\"50px\" height=\"1.3rem\"></app-skeleton>\r\n\t\t\t\t</td>\r\n\t\t\t\t<td *ngFor=\"let col of [].constructor(columns?.length || 4); let i = index\" class=\"p-3 py-4\">\r\n\t\t\t\t\t<app-skeleton [randomWidth]=\"true\" height=\"1.3rem\"></app-skeleton>\r\n\t\t\t\t</td>\r\n\t\t\t</tr>\r\n\t\t</tbody>\r\n\t</table>\r\n</ng-template>\r\n", styles: [".bi{margin:0!important}.memo-sorting-wrapper{width:265px;margin:0 10px;height:100%;display:flex}.memo-sorting-wrapper .sorting-direction{width:65px;height:40px;background-color:#465573;color:#fff;font-size:20px;display:flex;justify-content:center;align-items:center;cursor:pointer}.memo-sorting-wrapper .memo-sorting-trigger{width:calc(100% - 65px);height:100%;background-color:transparent;border:1px solid lightgrey;display:flex;justify-content:space-between;align-items:center;padding:0 15px;font-size:14px}.memo-sorting-wrapper .memo-sorting-trigger i{font-size:16px;color:gray}.memo-sorting-menu{width:200px}.my-button{border:1px solid #465573;color:#465573;border-radius:5px;background-color:transparent;font-weight:bold;min-width:80px;height:40px}.my-button.reset{border:none}.my-button:hover{color:#fff;background-color:#465573}.my-button:hover.reset{color:#465573;border:1px solid #465573;background-color:#fff}.app-property-value .app-input-wrapper label{color:#646f85;font-size:13px;margin-bottom:5px}.app-property-value .app-input-wrapper label .text-danger{font-size:16px;line-height:14px;margin:0 5px!important}.app-property-value .app-input-wrapper .form-control{border:1px solid #ccc;border-radius:5px;background-color:#8f98aa1a;height:40px}.app-property-value .app-input-wrapper .form-control:disabled{background-color:#e9ecef!important}.app-property-value .app-input-wrapper .form-control:focus{border:1px solid #1a96c6;box-shadow:0 0 4px #79c3c26b!important}.app-property-value .app-input-wrapper .app-textitem-editable-error .error-containers{list-style:none;padding:0;margin:0;font-size:14px}.app-property-value .app-input-wrapper .app-textitem-editable-error .error-containers .error{margin-top:5px}.autocomplete-container .input-container input:focus,hijri-gregorian-datepicker .form-group .input-group .form-control:focus,.ng-select.ng-select-focused .ng-select-container{border:1px solid #1a96c6!important;box-shadow:0 0 4px #79c3c26b!important}input::placeholder{font-size:12px}.form-control:focus{box-shadow:none!important}.mat-stepper-horizontal{margin-top:-25px}.mat-stepper-horizontal .mat-horizontal-stepper-header-container .mat-step-header.cdk-program-focused{background-color:transparent}.mat-stepper-horizontal .mat-horizontal-stepper-header-container .mat-step-header .mat-step-icon-selected{background-color:transparent;color:#fff;background-image:linear-gradient(to right,#0dbab5,#1a96c6)}@media only screen and (max-width: 576px){.mat-stepper-horizontal .mat-horizontal-stepper-header-container .mat-step-header .mat-step-label .mat-step-text-label{white-space:pre-wrap;overflow:visible}}.mat-stepper-horizontal .mat-horizontal-content-container{overflow:visible}@media only screen and (max-width: 768px){.mat-stepper-horizontal .mat-horizontal-content-container{padding:0 0 24px}}.mat-stepper-horizontal.rtl .mat-horizontal-stepper-header:first-child:after,.mat-stepper-horizontal.rtl .mat-horizontal-stepper-header:last-child:before{display:none}.mat-stepper-horizontal.rtl .mat-horizontal-stepper-header:first-child:before{border-top-width:1px;border-top-style:solid;content:\"\";display:inline-block;height:0;position:absolute;width:calc(50% - 20px);left:0}.mat-stepper-horizontal.rtl .mat-horizontal-stepper-header:last-child:after{border-top-width:1px;border-top-style:solid;content:\"\";display:inline-block;height:0;position:absolute;width:calc(50% - 20px);right:0}.form-wrapper{padding:30px 15px;border:1px solid #dde0e2}.form-wrapper .buttons-wrapper{display:flex;justify-content:space-between}.form-wrapper .buttons-wrapper .action-buttons-wrapper{display:flex}.form-wrapper .buttons-wrapper button{background-image:linear-gradient(to right,#0dbab5,#1a96c6);height:40px;color:#fff;border:none;width:125px;margin-top:20px;border-radius:5px}.form-wrapper .buttons-wrapper button:disabled{opacity:.4;cursor:not-allowed}.form-wrapper .buttons-wrapper button:hover{opacity:.7}.form-wrapper .upload-wrapper{display:flex;flex-direction:column;justify-content:flex-end}.form-wrapper .upload-wrapper label{color:#8f98aa;font-size:14px}.form-wrapper .upload-wrapper button{padding:10px;border:1px solid lightgray}.form-wrapper .upload-wrapper button span{margin:0 10px}.renameFileComponent .form-wrapper{padding:30px 15px;border:none!important}.renameFileComponent .form-wrapper .buttons-wrapper{display:flex;justify-content:space-between}.renameFileComponent .form-wrapper .buttons-wrapper .action-buttons-wrapper{display:flex}.renameFileComponent .form-wrapper .buttons-wrapper button{background-image:linear-gradient(to right,#0dbab5,#1a96c6);height:40px;color:#fff;border:none;width:125px;margin-top:20px;border-radius:5px}.renameFileComponent .form-wrapper .buttons-wrapper button:disabled{opacity:.4;cursor:not-allowed}.renameFileComponent .form-wrapper .buttons-wrapper button:hover{opacity:.7}.renameFileComponent .form-wrapper .upload-wrapper{display:flex;flex-direction:column;justify-content:flex-end}.renameFileComponent .form-wrapper .upload-wrapper label{color:#8f98aa;font-size:14px}.renameFileComponent .form-wrapper .upload-wrapper button{padding:10px;border:1px solid lightgray}.renameFileComponent .form-wrapper .upload-wrapper button span{margin:0 10px}.my-dynamic-viewer{display:flex;align-items:center;font-size:12px;min-height:30px}.my-dynamic-viewer .my-label{font-size:12px;font-weight:500;width:150px;word-break:break-word}@media (max-width: 992px){.my-dynamic-viewer .my-label{width:50%}}.my-dynamic-viewer .my-value{width:calc(100% - 150px);word-break:break-word}@media (max-width: 992px){.my-dynamic-viewer .my-value{width:50%}}.my-dynamic-viewer .direction-img{font-size:14px}.my-dynamic-viewer .direction-img .incoming{display:none}.my-dynamic-viewer .direction-img .outgoing{display:none}.my-dynamic-viewer .direction-img .internal{display:none}.my-dynamic-viewer.draft .my-value{color:#596973}.my-dynamic-viewer.inProgress .my-value{color:#3c3cf0}.my-dynamic-viewer.registered .my-value{color:#4f008c}.my-dynamic-viewer.archived .my-value{color:#fbb62c}.my-dynamic-viewer.closed .my-value{color:#00dca5}.my-dynamic-viewer.approved .my-value{color:#06a57e}.my-dynamic-viewer.assigned .my-value{color:#fd6670}.my-dynamic-viewer.sent .my-value{color:#3c3cf0}.my-dynamic-viewer.published .my-value{color:#00dca5}.my-dynamic-viewer.Outgoing .my-value{display:flex}.my-dynamic-viewer.Outgoing .my-value .direction-img .outgoing{color:#fbb62c;margin:1px 5px;display:flex}.my-dynamic-viewer.Outgoing .my-value .text{margin:0 5px}.my-dynamic-viewer.Internal .my-value{display:flex}.my-dynamic-viewer.Internal .my-value .direction-img .internal{color:#3c3cf0;margin:1px 5px;display:flex}.my-dynamic-viewer.Internal .my-value .text{margin:0 5px}.my-dynamic-viewer.Incoming .my-value{display:flex}.my-dynamic-viewer.Incoming .my-value .direction-img .incoming{color:#00dca5;display:flex}.my-dynamic-viewer.Incoming .my-value .text{margin:-3px 5px 0}.my-dynamic-viewer.vertical{display:block}.my-dynamic-viewer.vertical .my-label{width:auto}.my-dynamic-viewer.vertical .my-value{width:auto}.my-dynamic-viewer.with-out-label{width:100%!important}.wrapping{position:relative}.wrapping .table-reposition{overflow-y:var(--table-reposition-overflow-y, hidden);scrollbar-color:#b4bac6 transparent!important;scrollbar-width:thin!important;overflow-x:hidden}.empty-state{padding:200px;display:flex;justify-content:center;align-items:center;font-size:20px;font-weight:bold}::-webkit-scrollbar{width:8px;height:8px}::-webkit-scrollbar-thumb{background:#b4bac6}.dark-scroll::-webkit-scrollbar-thumb{background:#8f98aa}.ndfPageSizes{right:0;left:unset}.rtl .ndfPageSizes{right:unset;left:0}.loading-content{position:var(--loading-content-position, absolute);inset:0;display:grid;place-items:center;background:var(--loading-content-background, rgba(255, 255, 255, .2));-webkit-backdrop-filter:var(--loading-content-backdrop-filter, blur(3px));backdrop-filter:var(--loading-content-backdrop-filter, blur(3px))}.pagination-iner-wraper{display:var(--pagination-inner-display, flex);justify-content:var(--pagination-inner-justify, center);align-items:var(--pagination-inner-align, center)}\n"], components: [{ type: SpinnerComponent, selector: "cts-spinner" }, { type: PaginationComponent, selector: "cts-pagination", inputs: ["size", "count", "page"], outputs: ["change"] }, { type: PageSizesListComponent, selector: "ndf-page-sizes-list", inputs: ["pageSizes", "selectedPageSize"], outputs: ["onChangePageSize"] }, { type: TableComponent, selector: "cts-table", inputs: ["rows", "columns", "responsiveColumns", "entityType", "prefix", "pageCount", "totalRecords", "rowCursor", "fullWidth", "vocItemTranslationPrefix", "higlightUnread", "tableMode", "componentName", "tableActions", "format", "defultSort", "highlightSelectedCard", "multiSelectRows", "customFirstRow", "showActionsAsMenu", "messages", "defaultColumnSize"], outputs: ["onRowSelected", "onRowIndexSelected", "onIconSelected", "actionOnRow", "onSorting", "onMultiRowSelected"] }, { type: i6__namespace.MatSpinner, selector: "mat-spinner", inputs: ["color"] }, { type: SkeletonComponent, selector: "app-skeleton", inputs: ["styleClass", "style", "shape", "animation", "radius", "size", "width", "height", "randomWidth"] }], directives: [{ type: i4__namespace$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4__namespace$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i4__namespace$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i4__namespace$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "translate": i1__namespace.TranslatePipe }, encapsulation: i0__namespace.ViewEncapsulation.None });
22489
22597
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: DynamicTableComponent, decorators: [{
22490
22598
  type: i0.Component,
22491
22599
  args: [{
@@ -22495,10 +22603,10 @@
22495
22603
  encapsulation: i0.ViewEncapsulation.None,
22496
22604
  host: {
22497
22605
  '[class.loading-results]': 'loading',
22498
- '[class.no-data]': 'rows.length <= 0'
22499
- }
22606
+ '[class.no-data]': 'rows.length <= 0',
22607
+ },
22500
22608
  }]
22501
- }], ctorParameters: function () { return [{ type: AdapterService }, { type: CallApiService }, { type: NuxeoService }, { type: DynamicTableService }, { type: i0__namespace.ChangeDetectorRef }]; }, propDecorators: { onRowSelected: [{
22609
+ }], ctorParameters: function () { return [{ type: AdapterService }, { type: CallApiService }, { type: NuxeoService }, { type: DynamicTableService }, { type: i0__namespace.ChangeDetectorRef }, { type: TableHooksService }]; }, propDecorators: { onRowSelected: [{
22502
22610
  type: i0.Output
22503
22611
  }], onRowIndexSelected: [{
22504
22612
  type: i0.Output
@@ -45898,9 +46006,268 @@
45898
46006
  }]
45899
46007
  }], ctorParameters: function () { return [{ type: ChartDataTransformers }]; } });
45900
46008
 
46009
+ var ReportsDataTransformers = /** @class */ (function () {
46010
+ function ReportsDataTransformers() {
46011
+ this._transformations = new Map();
46012
+ }
46013
+ ReportsDataTransformers.prototype.register = function (arg1, arg2) {
46014
+ var _this = this;
46015
+ if (typeof arg1 === 'object') {
46016
+ Object.entries(arg1).forEach(function (_a) {
46017
+ var _b = __read(_a, 2), key = _b[0], fn = _b[1];
46018
+ return _this._transformations.set(key, fn);
46019
+ });
46020
+ return;
46021
+ }
46022
+ if (typeof arg1 === 'string' && arg2) {
46023
+ this._transformations.set(arg1, arg2);
46024
+ }
46025
+ };
46026
+ /**
46027
+ * Retrieves a transformer function by its key.
46028
+ *
46029
+ * @param {string} key - The key of the transformer function.
46030
+ * @returns {ReportDataTransformer | undefined} - The transformer function or undefined if not found.
46031
+ */
46032
+ ReportsDataTransformers.prototype.get = function (key) {
46033
+ return this._transformations.get(key);
46034
+ };
46035
+ /**
46036
+ * Retrieves all registered transformer functions.
46037
+ *
46038
+ * @returns {Map<string, ReportDataTransformer>} - A map of all transformer functions.
46039
+ */
46040
+ ReportsDataTransformers.prototype.getAll = function () {
46041
+ return this._transformations;
46042
+ };
46043
+ /**
46044
+ * Clears all registered transformer functions.
46045
+ */
46046
+ ReportsDataTransformers.prototype.clear = function () {
46047
+ this._transformations.clear();
46048
+ };
46049
+ /**
46050
+ * Checks if a transformer function is registered for a specific key.
46051
+ *
46052
+ * @param {string} key - The key to check.
46053
+ * @returns {boolean} - True if the key exists, false otherwise.
46054
+ */
46055
+ ReportsDataTransformers.prototype.has = function (key) {
46056
+ return this._transformations.has(key);
46057
+ };
46058
+ /**
46059
+ * Removes a transformer function by its key.
46060
+ *
46061
+ * @param {string} key - The key of the transformer function to remove.
46062
+ */
46063
+ ReportsDataTransformers.prototype.remove = function (key) {
46064
+ this._transformations.delete(key);
46065
+ };
46066
+ ReportsDataTransformers.prototype.transform = function (key, data) {
46067
+ var fn = this.get(key);
46068
+ if (!fn) {
46069
+ throw new Error("No transformer registered for key: " + key);
46070
+ }
46071
+ return fn(data);
46072
+ };
46073
+ return ReportsDataTransformers;
46074
+ }());
46075
+ ReportsDataTransformers.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ReportsDataTransformers, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
46076
+ ReportsDataTransformers.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ReportsDataTransformers, providedIn: 'root' });
46077
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ReportsDataTransformers, decorators: [{
46078
+ type: i0.Injectable,
46079
+ args: [{ providedIn: 'root' }]
46080
+ }] });
46081
+
46082
+ var NdfReportsService = /** @class */ (function (_super) {
46083
+ __extends(NdfReportsService, _super);
46084
+ function NdfReportsService(injector, _reportsDataTransformers) {
46085
+ var _this = _super.call(this, injector) || this;
46086
+ _this._reportsDataTransformers = _reportsDataTransformers;
46087
+ return _this;
46088
+ }
46089
+ NdfReportsService.prototype.getData = function (request, criteria) {
46090
+ if (criteria === void 0) { criteria = {}; }
46091
+ return (request === null || request === void 0 ? void 0 : request.customUrl)
46092
+ ? this._customQuery(request, criteria)
46093
+ : this._query(request, criteria);
46094
+ };
46095
+ NdfReportsService.prototype._query = function (request, criteria) {
46096
+ var _this = this;
46097
+ return this.query({
46098
+ pageProvider: request.pageProvider,
46099
+ headers: request === null || request === void 0 ? void 0 : request.headers,
46100
+ params: criteria === null || criteria === void 0 ? void 0 : criteria.params,
46101
+ }).pipe(operators.switchMap(function (response) { return !!(request === null || request === void 0 ? void 0 : request.transformer)
46102
+ ? _this._reportsDataTransformers.transform(request === null || request === void 0 ? void 0 : request.transformer, response)
46103
+ : rxjs.of(response); }));
46104
+ };
46105
+ NdfReportsService.prototype._customQuery = function (request, criteria) {
46106
+ var _this = this;
46107
+ var _a;
46108
+ return this._callApiService
46109
+ .customQuery({
46110
+ url: '/api/v1' + request.customUrl.url,
46111
+ method: ((_a = request.customUrl) === null || _a === void 0 ? void 0 : _a.method) || 'GET',
46112
+ }, Object.assign({}, (criteria === null || criteria === void 0 ? void 0 : criteria.params) || {}, (request === null || request === void 0 ? void 0 : request.params) || {}), request === null || request === void 0 ? void 0 : request.headers, Object.assign({}, (criteria === null || criteria === void 0 ? void 0 : criteria.payload) || {}, (request === null || request === void 0 ? void 0 : request.payload) || {}))
46113
+ .pipe(operators.switchMap(function (response) { return !!(request === null || request === void 0 ? void 0 : request.transformer)
46114
+ ? _this._reportsDataTransformers.transform(request === null || request === void 0 ? void 0 : request.transformer, response)
46115
+ : rxjs.of(response); }));
46116
+ };
46117
+ NdfReportsService.prototype.prepareRequest = function (request, criteria) {
46118
+ var params = Object.assign(Object.assign({ pageSize: 1 }, ((request === null || request === void 0 ? void 0 : request.params) || {})), ((criteria === null || criteria === void 0 ? void 0 : criteria.params) || {}));
46119
+ var payload = ___default["default"].mergeWith(request.payload || {}, (criteria === null || criteria === void 0 ? void 0 : criteria.payload) || {}, function (objValue, srcValue, key) {
46120
+ if (Array.isArray(objValue) && key === 'predicateList') {
46121
+ return objValue.concat(srcValue);
46122
+ }
46123
+ });
46124
+ return {
46125
+ params: params,
46126
+ payload: payload,
46127
+ };
46128
+ };
46129
+ return NdfReportsService;
46130
+ }(BaseService));
46131
+ NdfReportsService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NdfReportsService, deps: [{ token: i0__namespace.Injector }, { token: ReportsDataTransformers }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
46132
+ NdfReportsService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NdfReportsService, providedIn: 'root' });
46133
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NdfReportsService, decorators: [{
46134
+ type: i0.Injectable,
46135
+ args: [{
46136
+ providedIn: 'root',
46137
+ }]
46138
+ }], ctorParameters: function () { return [{ type: i0__namespace.Injector }, { type: ReportsDataTransformers }]; } });
46139
+
46140
+ var ReportsHooksService = /** @class */ (function () {
46141
+ function ReportsHooksService() {
46142
+ this.beforeSubmitHooks = [];
46143
+ this.reportsActions = new Map();
46144
+ }
46145
+ ReportsHooksService.prototype.registerBeforeSubmit = function (handler) {
46146
+ this.beforeSubmitHooks.push(handler);
46147
+ };
46148
+ ReportsHooksService.prototype.unregisterBeforeSubmit = function (handler) {
46149
+ var index = this.beforeSubmitHooks.indexOf(handler);
46150
+ if (index > -1) {
46151
+ this.beforeSubmitHooks.splice(index, 1);
46152
+ }
46153
+ };
46154
+ ReportsHooksService.prototype.clearBeforeSubmitHooks = function () {
46155
+ this.beforeSubmitHooks = [];
46156
+ };
46157
+ ReportsHooksService.prototype.executeBeforeSubmit = function (payload) {
46158
+ return __awaiter(this, void 0, void 0, function () {
46159
+ var modifiedPayload, _b, _c, handler, result, err_1, e_1_1;
46160
+ var e_1, _d;
46161
+ return __generator(this, function (_e) {
46162
+ switch (_e.label) {
46163
+ case 0:
46164
+ modifiedPayload = Object.assign({}, payload);
46165
+ _e.label = 1;
46166
+ case 1:
46167
+ _e.trys.push([1, 8, 9, 10]);
46168
+ _b = __values(this.beforeSubmitHooks), _c = _b.next();
46169
+ _e.label = 2;
46170
+ case 2:
46171
+ if (!!_c.done) return [3 /*break*/, 7];
46172
+ handler = _c.value;
46173
+ _e.label = 3;
46174
+ case 3:
46175
+ _e.trys.push([3, 5, , 6]);
46176
+ return [4 /*yield*/, Promise.resolve(handler(modifiedPayload))];
46177
+ case 4:
46178
+ result = _e.sent();
46179
+ modifiedPayload = result !== null && result !== void 0 ? result : modifiedPayload;
46180
+ return [3 /*break*/, 6];
46181
+ case 5:
46182
+ err_1 = _e.sent();
46183
+ console.error('Error executing beforeSubmit handler:', err_1);
46184
+ return [3 /*break*/, 6];
46185
+ case 6:
46186
+ _c = _b.next();
46187
+ return [3 /*break*/, 2];
46188
+ case 7: return [3 /*break*/, 10];
46189
+ case 8:
46190
+ e_1_1 = _e.sent();
46191
+ e_1 = { error: e_1_1 };
46192
+ return [3 /*break*/, 10];
46193
+ case 9:
46194
+ try {
46195
+ if (_c && !_c.done && (_d = _b.return)) _d.call(_b);
46196
+ }
46197
+ finally { if (e_1) throw e_1.error; }
46198
+ return [7 /*endfinally*/];
46199
+ case 10: return [2 /*return*/, modifiedPayload];
46200
+ }
46201
+ });
46202
+ });
46203
+ };
46204
+ ReportsHooksService.prototype.evaluate = function (expr, payload) {
46205
+ try {
46206
+ var context = { criteria: payload };
46207
+ var result = Evaluator.evaluate(expr, context, 'payload');
46208
+ return result !== null && result !== void 0 ? result : payload;
46209
+ }
46210
+ catch (e) {
46211
+ console.error('Error evaluating beforeSubmit string:', e);
46212
+ return payload;
46213
+ }
46214
+ };
46215
+ ReportsHooksService.prototype.registerBeforeSubmitAction = function (name, action) {
46216
+ this.reportsActions.set(name, action);
46217
+ };
46218
+ ReportsHooksService.prototype.unregisterBeforeSubmitAction = function (name) {
46219
+ this.reportsActions.delete(name);
46220
+ };
46221
+ ReportsHooksService.prototype.executeBeforeSubmitAction = function (name, context) {
46222
+ var _a;
46223
+ return __awaiter(this, void 0, void 0, function () {
46224
+ var action, e_2;
46225
+ return __generator(this, function (_b) {
46226
+ switch (_b.label) {
46227
+ case 0:
46228
+ action = this.reportsActions.get(name);
46229
+ if (!action) {
46230
+ console.warn("beforeSubmit action \"" + name + "\" not found");
46231
+ return [2 /*return*/, {
46232
+ request: context.request,
46233
+ data: context.data,
46234
+ }];
46235
+ }
46236
+ _b.label = 1;
46237
+ case 1:
46238
+ _b.trys.push([1, 3, , 4]);
46239
+ return [4 /*yield*/, action(context)];
46240
+ case 2: return [2 /*return*/, ((_a = (_b.sent())) !== null && _a !== void 0 ? _a : {
46241
+ request: context.request,
46242
+ data: context.data,
46243
+ })];
46244
+ case 3:
46245
+ e_2 = _b.sent();
46246
+ console.error("Error executing beforeSubmit action \"" + name + "\"", e_2);
46247
+ return [2 /*return*/, {
46248
+ request: context.request,
46249
+ data: context.data,
46250
+ }];
46251
+ case 4: return [2 /*return*/];
46252
+ }
46253
+ });
46254
+ });
46255
+ };
46256
+ return ReportsHooksService;
46257
+ }());
46258
+ ReportsHooksService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ReportsHooksService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
46259
+ ReportsHooksService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ReportsHooksService, providedIn: 'root' });
46260
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ReportsHooksService, decorators: [{
46261
+ type: i0.Injectable,
46262
+ args: [{
46263
+ providedIn: 'root',
46264
+ }]
46265
+ }] });
46266
+
45901
46267
  var DynamicTimelineReportService = /** @class */ (function () {
45902
- function DynamicTimelineReportService(_ndfReportsService) {
46268
+ function DynamicTimelineReportService(_ndfReportsService, _reportsHooksService) {
45903
46269
  this._ndfReportsService = _ndfReportsService;
46270
+ this._reportsHooksService = _reportsHooksService;
45904
46271
  this._isInitialized = false;
45905
46272
  this.isLoadingResult = false;
45906
46273
  this._selectedGroupSub = new rxjs.BehaviorSubject(null);
@@ -45917,285 +46284,55 @@
45917
46284
  };
45918
46285
  DynamicTimelineReportService.prototype.prepareData = function () {
45919
46286
  var _this = this;
45920
- return rxjs.pipe(operators.tap(function (_d) {
45921
- var _e = __read(_d, 2), config = _e[0], criteria = _e[1];
46287
+ return rxjs.pipe(operators.tap(function (_b) {
46288
+ var _c = __read(_b, 2), config = _c[0], criteria = _c[1];
45922
46289
  var _a;
45923
46290
  if (!_this._selectedGroupSub.getValue()) {
45924
46291
  _this._selectedGroupSub.next(((_a = config === null || config === void 0 ? void 0 : config.group) === null || _a === void 0 ? void 0 : _a.selected) || 'week');
45925
46292
  }
45926
46293
  _this.payload = ___default["default"].merge(_this.prepareSelectedGroups(config), criteria || {});
45927
- }), operators.switchMap(function (_d) {
45928
- var _e = __read(_d, 2), config = _e[0], criteria = _e[1];
45929
- var _a, _b, _c;
46294
+ }), operators.switchMap(function (_b) {
46295
+ var _c = __read(_b, 2), config = _c[0], criteria = _c[1];
46296
+ var _a;
45930
46297
  var request = config === null || config === void 0 ? void 0 : config.request;
45931
46298
  if (!request) {
45932
46299
  return rxjs.of(null);
45933
46300
  }
45934
- var _payload = _this.payload;
45935
- if (((_a = request === null || request === void 0 ? void 0 : request.actions) === null || _a === void 0 ? void 0 : _a.beforeSubmit) && typeof ((_b = request === null || request === void 0 ? void 0 : request.actions) === null || _b === void 0 ? void 0 : _b.beforeSubmit) === 'string') {
45936
- try {
45937
- _payload = Evaluator.evaluate((_c = request === null || request === void 0 ? void 0 : request.actions) === null || _c === void 0 ? void 0 : _c.beforeSubmit, { config: config, criteria: _this.payload }, 'payload');
45938
- }
45939
- catch (e) {
45940
- console.error(e);
45941
- _payload = _this.payload;
45942
- }
45943
- }
45944
- var data$ = _this._ndfReportsService.getData(request, _payload).pipe(operators.catchError(function (error) {
45945
- console.error(error);
45946
- return rxjs.of(null);
45947
- }), operators.finalize(function () {
45948
- _this.isLoadingResult = false;
45949
- }));
45950
- return rxjs.forkJoin({
46301
+ var _request = {
46302
+ request: request,
46303
+ data: _this._ndfReportsService.prepareRequest(request, _this.payload),
46304
+ };
46305
+ var beforeSubmit$ = ((_a = request === null || request === void 0 ? void 0 : request.actions) === null || _a === void 0 ? void 0 : _a.beforeSubmit)
46306
+ ? rxjs.from(_this._reportsHooksService.executeBeforeSubmitAction(request.actions.beforeSubmit, Object.assign({ config: Object.assign(Object.assign({}, config), { request: undefined }), criteria: criteria }, _request)))
46307
+ : rxjs.of(_request);
46308
+ return beforeSubmit$.pipe(operators.switchMap(function (req) { return rxjs.forkJoin({
45951
46309
  config: rxjs.of(config),
45952
- data: data$
45953
- });
46310
+ data: _this._ndfReportsService.getData(req.request, req.data).pipe(operators.catchError(function (error) {
46311
+ console.error(error);
46312
+ return rxjs.of(null);
46313
+ }), operators.finalize(function () { return (_this.isLoadingResult = false); })),
46314
+ }); }));
45954
46315
  }));
45955
46316
  };
45956
46317
  DynamicTimelineReportService.prototype.prepareSelectedGroups = function (config) {
45957
46318
  var _this = this;
45958
46319
  var data = config.datasource.map(function (source) { return ({
45959
46320
  name: source.aggregation,
45960
- interval: _this._selectedGroupSub.getValue()
46321
+ interval: _this._selectedGroupSub.getValue(),
45961
46322
  }); });
45962
46323
  return {
45963
46324
  payload: {
45964
- aggregationNames: data
45965
- }
46325
+ aggregationNames: data,
46326
+ },
45966
46327
  };
45967
46328
  };
45968
46329
  return DynamicTimelineReportService;
45969
46330
  }());
45970
- DynamicTimelineReportService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: DynamicTimelineReportService, deps: [{ token: NdfReportsService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
46331
+ DynamicTimelineReportService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: DynamicTimelineReportService, deps: [{ token: NdfReportsService }, { token: ReportsHooksService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
45971
46332
  DynamicTimelineReportService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: DynamicTimelineReportService });
45972
46333
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: DynamicTimelineReportService, decorators: [{
45973
46334
  type: i0.Injectable
45974
- }], ctorParameters: function () { return [{ type: NdfReportsService }]; } });
45975
-
45976
- var ReportsDataTransformers = /** @class */ (function () {
45977
- function ReportsDataTransformers() {
45978
- this._transformations = new Map();
45979
- }
45980
- ReportsDataTransformers.prototype.register = function (arg1, arg2) {
45981
- var _this = this;
45982
- if (typeof arg1 === 'object') {
45983
- Object.entries(arg1).forEach(function (_a) {
45984
- var _b = __read(_a, 2), key = _b[0], fn = _b[1];
45985
- return _this._transformations.set(key, fn);
45986
- });
45987
- return;
45988
- }
45989
- if (typeof arg1 === 'string' && arg2) {
45990
- this._transformations.set(arg1, arg2);
45991
- }
45992
- };
45993
- /**
45994
- * Retrieves a transformer function by its key.
45995
- *
45996
- * @param {string} key - The key of the transformer function.
45997
- * @returns {ReportDataTransformer | undefined} - The transformer function or undefined if not found.
45998
- */
45999
- ReportsDataTransformers.prototype.get = function (key) {
46000
- return this._transformations.get(key);
46001
- };
46002
- /**
46003
- * Retrieves all registered transformer functions.
46004
- *
46005
- * @returns {Map<string, ReportDataTransformer>} - A map of all transformer functions.
46006
- */
46007
- ReportsDataTransformers.prototype.getAll = function () {
46008
- return this._transformations;
46009
- };
46010
- /**
46011
- * Clears all registered transformer functions.
46012
- */
46013
- ReportsDataTransformers.prototype.clear = function () {
46014
- this._transformations.clear();
46015
- };
46016
- /**
46017
- * Checks if a transformer function is registered for a specific key.
46018
- *
46019
- * @param {string} key - The key to check.
46020
- * @returns {boolean} - True if the key exists, false otherwise.
46021
- */
46022
- ReportsDataTransformers.prototype.has = function (key) {
46023
- return this._transformations.has(key);
46024
- };
46025
- /**
46026
- * Removes a transformer function by its key.
46027
- *
46028
- * @param {string} key - The key of the transformer function to remove.
46029
- */
46030
- ReportsDataTransformers.prototype.remove = function (key) {
46031
- this._transformations.delete(key);
46032
- };
46033
- ReportsDataTransformers.prototype.transform = function (key, data) {
46034
- var fn = this.get(key);
46035
- if (!fn) {
46036
- throw new Error("No transformer registered for key: " + key);
46037
- }
46038
- return fn(data);
46039
- };
46040
- return ReportsDataTransformers;
46041
- }());
46042
- ReportsDataTransformers.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ReportsDataTransformers, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
46043
- ReportsDataTransformers.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ReportsDataTransformers, providedIn: 'root' });
46044
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ReportsDataTransformers, decorators: [{
46045
- type: i0.Injectable,
46046
- args: [{ providedIn: 'root' }]
46047
- }] });
46048
-
46049
- var ReportsHooksService = /** @class */ (function () {
46050
- function ReportsHooksService() {
46051
- this.beforeSubmitHooks = [];
46052
- }
46053
- ReportsHooksService.prototype.registerBeforeSubmit = function (handler) {
46054
- this.beforeSubmitHooks.push(handler);
46055
- };
46056
- ReportsHooksService.prototype.unregisterBeforeSubmit = function (handler) {
46057
- var index = this.beforeSubmitHooks.indexOf(handler);
46058
- if (index > -1) {
46059
- this.beforeSubmitHooks.splice(index, 1);
46060
- }
46061
- };
46062
- ReportsHooksService.prototype.clearBeforeSubmitHooks = function () {
46063
- this.beforeSubmitHooks = [];
46064
- };
46065
- ReportsHooksService.prototype.executeBeforeSubmit = function (payload) {
46066
- return __awaiter(this, void 0, void 0, function () {
46067
- var modifiedPayload, _a, _b, handler, result, err_1, e_1_1;
46068
- var e_1, _c;
46069
- return __generator(this, function (_d) {
46070
- switch (_d.label) {
46071
- case 0:
46072
- modifiedPayload = Object.assign({}, payload);
46073
- _d.label = 1;
46074
- case 1:
46075
- _d.trys.push([1, 8, 9, 10]);
46076
- _a = __values(this.beforeSubmitHooks), _b = _a.next();
46077
- _d.label = 2;
46078
- case 2:
46079
- if (!!_b.done) return [3 /*break*/, 7];
46080
- handler = _b.value;
46081
- _d.label = 3;
46082
- case 3:
46083
- _d.trys.push([3, 5, , 6]);
46084
- return [4 /*yield*/, Promise.resolve(handler(modifiedPayload))];
46085
- case 4:
46086
- result = _d.sent();
46087
- modifiedPayload = result !== null && result !== void 0 ? result : modifiedPayload;
46088
- return [3 /*break*/, 6];
46089
- case 5:
46090
- err_1 = _d.sent();
46091
- console.error('Error executing beforeSubmit handler:', err_1);
46092
- return [3 /*break*/, 6];
46093
- case 6:
46094
- _b = _a.next();
46095
- return [3 /*break*/, 2];
46096
- case 7: return [3 /*break*/, 10];
46097
- case 8:
46098
- e_1_1 = _d.sent();
46099
- e_1 = { error: e_1_1 };
46100
- return [3 /*break*/, 10];
46101
- case 9:
46102
- try {
46103
- if (_b && !_b.done && (_c = _a.return)) _c.call(_a);
46104
- }
46105
- finally { if (e_1) throw e_1.error; }
46106
- return [7 /*endfinally*/];
46107
- case 10: return [2 /*return*/, modifiedPayload];
46108
- }
46109
- });
46110
- });
46111
- };
46112
- ReportsHooksService.prototype.evaluate = function (expr, payload) {
46113
- try {
46114
- var context = { criteria: payload };
46115
- var result = Evaluator.evaluate(expr, context, 'payload');
46116
- return result !== null && result !== void 0 ? result : payload;
46117
- }
46118
- catch (e) {
46119
- console.error('Error evaluating beforeSubmit string:', e);
46120
- return payload;
46121
- }
46122
- };
46123
- return ReportsHooksService;
46124
- }());
46125
- ReportsHooksService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ReportsHooksService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
46126
- ReportsHooksService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ReportsHooksService, providedIn: 'root' });
46127
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ReportsHooksService, decorators: [{
46128
- type: i0.Injectable,
46129
- args: [{
46130
- providedIn: 'root',
46131
- }]
46132
- }] });
46133
-
46134
- var NdfReportsService = /** @class */ (function (_super) {
46135
- __extends(NdfReportsService, _super);
46136
- function NdfReportsService(injector, _reportsDataTransformers, _reportsHooksService) {
46137
- var _this = _super.call(this, injector) || this;
46138
- _this._reportsDataTransformers = _reportsDataTransformers;
46139
- _this._reportsHooksService = _reportsHooksService;
46140
- return _this;
46141
- }
46142
- NdfReportsService.prototype.getData = function (request, criteria) {
46143
- if (criteria === void 0) { criteria = {}; }
46144
- return (request === null || request === void 0 ? void 0 : request.customUrl)
46145
- ? this._customQuery(request, criteria)
46146
- : this._query(request, criteria);
46147
- };
46148
- NdfReportsService.prototype._query = function (request, criteria) {
46149
- var _this = this;
46150
- return rxjs.from(this._reportsHooksService.executeBeforeSubmit(Object.assign(Object.assign({}, this._prepareRequest(request, criteria)), { request: request }))).pipe(operators.switchMap(function (_b) {
46151
- var params = _b.params;
46152
- return _this.query({
46153
- pageProvider: request.pageProvider,
46154
- headers: request === null || request === void 0 ? void 0 : request.headers,
46155
- params: params,
46156
- });
46157
- }), operators.switchMap(function (response) { return !!(request === null || request === void 0 ? void 0 : request.transformer)
46158
- ? _this._reportsDataTransformers.transform(request === null || request === void 0 ? void 0 : request.transformer, response)
46159
- : rxjs.of(response); }));
46160
- };
46161
- NdfReportsService.prototype._customQuery = function (request, criteria) {
46162
- var _this = this;
46163
- return rxjs.from(this._reportsHooksService.executeBeforeSubmit(Object.assign(Object.assign({}, this._prepareRequest(request, criteria)), { request: request }))).pipe(operators.switchMap(function (_b) {
46164
- var params = _b.params, payload = _b.payload;
46165
- var _a;
46166
- return _this.request({
46167
- type: ((_a = request.customUrl) === null || _a === void 0 ? void 0 : _a.method) || 'get',
46168
- endpoint: request.customUrl.url,
46169
- headers: request === null || request === void 0 ? void 0 : request.headers,
46170
- queryParams: params,
46171
- payload: payload,
46172
- });
46173
- }), operators.switchMap(function (response) { return !!(request === null || request === void 0 ? void 0 : request.transformer)
46174
- ? _this._reportsDataTransformers.transform(request === null || request === void 0 ? void 0 : request.transformer, response)
46175
- : rxjs.of(response); }));
46176
- };
46177
- NdfReportsService.prototype._prepareRequest = function (request, criteria) {
46178
- var params = Object.assign(Object.assign({ pageSize: 1 }, ((request === null || request === void 0 ? void 0 : request.params) || {})), ((criteria === null || criteria === void 0 ? void 0 : criteria.params) || {}));
46179
- var payload = ___default["default"].mergeWith(request.payload || {}, (criteria === null || criteria === void 0 ? void 0 : criteria.payload) || {}, function (objValue, srcValue, key) {
46180
- if (Array.isArray(objValue) && key === 'predicateList') {
46181
- return objValue.concat(srcValue);
46182
- }
46183
- });
46184
- return {
46185
- params: params,
46186
- payload: payload,
46187
- };
46188
- };
46189
- return NdfReportsService;
46190
- }(BaseService));
46191
- NdfReportsService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NdfReportsService, deps: [{ token: i0__namespace.Injector }, { token: ReportsDataTransformers }, { token: ReportsHooksService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
46192
- NdfReportsService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NdfReportsService, providedIn: 'root' });
46193
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NdfReportsService, decorators: [{
46194
- type: i0.Injectable,
46195
- args: [{
46196
- providedIn: 'root',
46197
- }]
46198
- }], ctorParameters: function () { return [{ type: i0__namespace.Injector }, { type: ReportsDataTransformers }, { type: ReportsHooksService }]; } });
46335
+ }], ctorParameters: function () { return [{ type: NdfReportsService }, { type: ReportsHooksService }]; } });
46199
46336
 
46200
46337
  /**
46201
46338
  * Horizontal Bar Options
@@ -48138,26 +48275,6 @@
48138
48275
  type: i0.Output
48139
48276
  }] } });
48140
48277
 
48141
- var CheckConditionPipe = /** @class */ (function () {
48142
- function CheckConditionPipe() {
48143
- }
48144
- CheckConditionPipe.prototype.transform = function (activeQuery, reports, config) {
48145
- if (reports === null || reports === void 0 ? void 0 : reports.condition) {
48146
- return Evaluator.evaluate(reports === null || reports === void 0 ? void 0 : reports.condition, { activeQuery: activeQuery, config: config }, 'show');
48147
- }
48148
- return true;
48149
- };
48150
- return CheckConditionPipe;
48151
- }());
48152
- CheckConditionPipe.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: CheckConditionPipe, deps: [], target: i0__namespace.ɵɵFactoryTarget.Pipe });
48153
- CheckConditionPipe.ɵpipe = i0__namespace.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: CheckConditionPipe, name: "checkCondition" });
48154
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: CheckConditionPipe, decorators: [{
48155
- type: i0.Pipe,
48156
- args: [{
48157
- name: 'checkCondition',
48158
- }]
48159
- }] });
48160
-
48161
48278
  var slideAnimation = animations.trigger('slideInOut', [
48162
48279
  animations.state('closed', animations.style({
48163
48280
  transform: 'translateX(var(--ndf-reports-details-translateX, -100%))',
@@ -48167,7 +48284,7 @@
48167
48284
  ]);
48168
48285
  var NdfReportsComponent = /** @class */ (function (_super) {
48169
48286
  __extends(NdfReportsComponent, _super);
48170
- function NdfReportsComponent(_translateService, _filtersMapper, _ndfReportsService, _chartHelperService, _transformService, _cdr, _filterQueryService, _stateService, _configurationService, _router, _ngZone) {
48287
+ function NdfReportsComponent(_translateService, _filtersMapper, _ndfReportsService, _chartHelperService, _transformService, _cdr, _filterQueryService, _stateService, _configurationService, _router, _ngZone, _reportsHooksService) {
48171
48288
  var _this = _super.call(this) || this;
48172
48289
  _this._translateService = _translateService;
48173
48290
  _this._filtersMapper = _filtersMapper;
@@ -48180,6 +48297,7 @@
48180
48297
  _this._configurationService = _configurationService;
48181
48298
  _this._router = _router;
48182
48299
  _this._ngZone = _ngZone;
48300
+ _this._reportsHooksService = _reportsHooksService;
48183
48301
  _this._isHeightUpdated = false;
48184
48302
  _this.direction = 'rtl';
48185
48303
  _this.isPanelOpened = false;
@@ -48192,6 +48310,7 @@
48192
48310
  _this.reportConfig$ = _this._configSubject.asObservable();
48193
48311
  _this._filtersCriteriaSubject = new rxjs.BehaviorSubject(null);
48194
48312
  _this.filtersParams$ = _this._filtersCriteriaSubject.asObservable();
48313
+ _this._triggerFiltersSub = new rxjs.BehaviorSubject(true);
48195
48314
  _this._detailsFiltersSubject = new rxjs.BehaviorSubject(null);
48196
48315
  _this.detailsFiltersParams$ = _this._detailsFiltersSubject.asObservable();
48197
48316
  _this._reportDetailsSubject = new rxjs.BehaviorSubject(null);
@@ -48205,6 +48324,12 @@
48205
48324
  _this.trackByFn = function (_, report) {
48206
48325
  return report.id;
48207
48326
  };
48327
+ _this.triggerUpdate = function () {
48328
+ _this._triggerFiltersSub.next(true);
48329
+ };
48330
+ _this.resetFilters = function () {
48331
+ _this._resetQueryAndFiltersCriteria();
48332
+ };
48208
48333
  _this.filterChanged = function (criteria) {
48209
48334
  if (___default["default"].isEqual(_this.activeQuery, criteria)) {
48210
48335
  return;
@@ -48266,6 +48391,12 @@
48266
48391
  this.reportsData$ = this._prepareReports();
48267
48392
  this._handleKeyboardEvent();
48268
48393
  };
48394
+ NdfReportsComponent.prototype.callLoadCondition = function () {
48395
+ if (this.loadCondition && typeof this.loadCondition == 'function') {
48396
+ return this.loadCondition(this.activeQuery);
48397
+ }
48398
+ return true;
48399
+ };
48269
48400
  NdfReportsComponent.prototype.ngOnChanges = function (changes) {
48270
48401
  var _a, _b;
48271
48402
  var reportsKey = (_a = changes.reportsKey) === null || _a === void 0 ? void 0 : _a.currentValue;
@@ -48378,8 +48509,9 @@
48378
48509
  var _this = this;
48379
48510
  this.isLoadingResult = true;
48380
48511
  return rxjs.combineLatest([
48381
- this.filtersParams$.pipe(operators.distinctUntilChanged(function (a, b) { return ___default["default"].isEqual(a, b); })),
48512
+ this.filtersParams$,
48382
48513
  this.reportConfig$,
48514
+ this._triggerFiltersSub,
48383
48515
  ]).pipe(operators.tap(function () {
48384
48516
  _this.isLoadingResult = true;
48385
48517
  _this._cdr.detectChanges();
@@ -48393,7 +48525,7 @@
48393
48525
  if (!criteria && !!config.activeQuery) {
48394
48526
  _payload = _this.prepareCriteriaPayload(config.activeQuery);
48395
48527
  }
48396
- var data$ = _this._ndfReportsService.getData(request, _payload).pipe(operators.switchMap(function (reports) {
48528
+ var data$ = rxjs.from(_this._reportsHooksService.executeBeforeSubmit(Object.assign(Object.assign({}, _this._ndfReportsService.prepareRequest(request, criteria)), { request: request }))).pipe(operators.switchMap(function (res) { return _this._ndfReportsService.getData(request, res); }), operators.switchMap(function (reports) {
48397
48529
  return _this._transformService.prepareData(reports, config);
48398
48530
  }), operators.finalize(function () {
48399
48531
  _this.isLoadingResult = false;
@@ -48517,8 +48649,8 @@
48517
48649
  };
48518
48650
  return NdfReportsComponent;
48519
48651
  }(DestroySubject));
48520
- 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: ReportConfigurationService }, { token: i1__namespace$5.Router }, { token: i0__namespace.NgZone }], target: i0__namespace.ɵɵFactoryTarget.Component });
48521
- 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" }, queries: [{ propertyName: "filterCustomTemplate", first: true, predicate: CUSTOM_TEMPLATE, descendants: true, read: i0.TemplateRef }, { propertyName: "headerPanelTemplate", first: true, predicate: HEADER_PANEL_TEMPLATE, descendants: true, read: i0.TemplateRef }, { propertyName: "emptyContentTemplate", first: true, predicate: EMPTY_CONTENT_TEMPLATE, descendants: true, read: i0.TemplateRef }], viewQueries: [{ propertyName: "fluidDirective", first: true, predicate: FluidHeightDirective, descendants: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0__namespace, template: "<div\r\n class=\"ndf-reports__container\"\r\n [class.panel-opened]=\"isPanelOpened && filtersConfig\"\r\n [dir]=\"direction\"\r\n ndfFluidHeight\r\n>\r\n <div class=\"ndf-reports__panel print:hidden\">\r\n <ng-container\r\n [ngTemplateOutlet]=\"headerPanelTemplate\"\r\n [ngTemplateOutletContext]=\"{\r\n $implicit: aggregations,\r\n filterChanged: filterChanged,\r\n activeQuery: activeQuery,\r\n config: config\r\n }\"\r\n ></ng-container>\r\n <app-filters-panel\r\n *ngIf=\"!!filtersConfig?.fields?.length\"\r\n [fields]=\"filtersConfig?.fields\"\r\n [aggregations]=\"aggregations\"\r\n (filterChanged)=\"filterChanged($event)\"\r\n [activeQuery]=\"activeFiltersQuery$ | async\"\r\n class=\"ndf-reports__filters\"\r\n [customTemplateRef]=\"filterCustomTemplate\"\r\n ></app-filters-panel>\r\n </div>\r\n\r\n <ng-container\r\n *ngIf=\"\r\n activeQuery | checkCondition : reportConfig : config;\r\n else emptyContent\r\n \"\r\n >\r\n <div\r\n class=\"ndf-reports__content\"\r\n (scrolled)=\"onContentScroll($event)\"\r\n *ngIf=\"reportsData$ | async as reports\"\r\n >\r\n <div class=\"ndf-reports__header flex pt-4 print:hidden\">\r\n <button\r\n mat-stroked-button\r\n class=\"toggle-button\"\r\n (click)=\"togglePanel()\"\r\n >\r\n <mat-icon> filter_alt</mat-icon>\r\n </button>\r\n <app-editor-button\r\n *ngIf=\"jsonEditorEnabled && reportsKey\"\r\n [key]=\"reportsKey\"\r\n [type]=\"editorType\"\r\n ></app-editor-button>\r\n <button\r\n mat-stroked-button\r\n *ngIf=\"config?.options?.print\"\r\n class=\"print-button\"\r\n (click)=\"printAll()\"\r\n >\r\n <mat-icon> print</mat-icon>\r\n </button>\r\n </div>\r\n <mat-spinner\r\n *ngIf=\"isLoadingResult\"\r\n class=\"mt-5 mx-auto\"\r\n [diameter]=\"48\"\r\n ></mat-spinner>\r\n\r\n <div class=\"reports-grid\" *ngIf=\"!isLoadingResult\">\r\n <app-ndf-report\r\n *ngFor=\"let config of reportConfig.items; trackBy: trackByFn\"\r\n [config]=\"config\"\r\n [data]=\"reports?.response\"\r\n [criteria]=\"filtersParams$ | async\"\r\n [direction]=\"direction\"\r\n [attr.data-width]=\"config?.layout?.width || 4\"\r\n [attr.data-height]=\"config?.layout?.height || 'auto'\"\r\n [attr.data-start-column]=\"config?.layout?.columnPosition || 'auto'\"\r\n [attr.data-start-row]=\"config?.layout?.rowPosition || 'auto'\"\r\n [class.wide]=\"config?.layout?.width >= 6\"\r\n [style]=\"config?.layout?.style\"\r\n class=\"reports-grid__item {{ config?.layout?.styleClass }} \"\r\n (onNavigate)=\"onNavigate($event)\"\r\n (onOpen)=\"openReportDetails($event, config)\"\r\n ></app-ndf-report>\r\n </div>\r\n </div>\r\n </ng-container>\r\n <div\r\n class=\"ndf-reports__details print:hidden\"\r\n [class.opened]=\"showDetails\"\r\n [@slideInOut]=\"showDetails ? 'open' : 'closed'\"\r\n (@slideInOut.done)=\"onDetailsAnimationEnd($event)\"\r\n >\r\n <app-ndf-table\r\n *ngIf=\"reportDetails$ | async as report\"\r\n [config]=\"report.config\"\r\n [activeQuery]=\"activeFiltersQuery$ | async\"\r\n [customCriteria]=\"detailsFiltersParams$ | async\"\r\n >\r\n <ng-template searchTableTemplate let-toggle=\"togglePanel\">\r\n <div class=\"ndf-reports__details__header flex gap-2\">\r\n <button mat-stroked-button class=\"toggle-button\" (click)=\"toggle()\">\r\n <mat-icon> filter_alt</mat-icon>\r\n </button>\r\n <button\r\n mat-stroked-button\r\n class=\"close-button\"\r\n (click)=\"closeDetailsPanel()\"\r\n >\r\n <mat-icon> close</mat-icon>\r\n </button>\r\n </div>\r\n <h3>\r\n {{ report.label | translate }}\r\n </h3>\r\n </ng-template>\r\n </app-ndf-table>\r\n </div>\r\n</div>\r\n\r\n<ng-template #emptyContent>\r\n <div class=\"ndf-reports__content flex items-center flex-grow-1\">\r\n <ng-container\r\n [ngTemplateOutlet]=\"emptyContentTemplate || defaultEmptyContent\"\r\n ></ng-container>\r\n </div>\r\n</ng-template>\r\n\r\n<ng-template #defaultEmptyContent>\r\n <div class=\"no-data mt-26\">\r\n {{ 'noData' | translate }}\r\n </div>\r\n</ng-template>\r\n", styles: [":host{--table-dev-height: var(--ndf-reports-table-dev-height, auto);--report-height: var(--ndf-reports-report-height, 430px);--cp-height: var(--report-height);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%}@media print{:host{--report-height: auto;--cp-print-min-height: 80mm;padding:0}}.ndf-reports *{box-sizing:border-box;min-height:0}.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-pis: 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-pis, 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;width:100%;margin:0;padding:0;page-break-after:avoid}}.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: 10mm;--reports-grid-margin-top: 0;padding:0;margin:0;--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: i6__namespace.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", "styleClass", "configTransformer", "tableKey", "jsonEditorEnabled", "config", "customCriteria", "searchTerm"], outputs: ["onRowSelected", "onRowIndexSelected", "actionOnRow", "onGettingData", "onMultiRowSelected", "onLoading", "onPage", "onInitialized", "onLoaded", "onQueryChange", "onSort"] }], directives: [{ 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: i4__namespace$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i4__namespace$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { 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, "checkCondition": CheckConditionPipe, "translate": i1__namespace.TranslatePipe }, animations: [slideAnimation] });
48652
+ 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: ReportConfigurationService }, { token: i1__namespace$5.Router }, { token: i0__namespace.NgZone }, { token: ReportsHooksService }], target: i0__namespace.ɵɵFactoryTarget.Component });
48653
+ 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", loadCondition: "loadCondition", config: "config" }, outputs: { onQueryChange: "onQueryChange" }, host: { properties: { "dir": "direction" }, classAttribute: "ndf-reports" }, queries: [{ propertyName: "filterCustomTemplate", first: true, predicate: CUSTOM_TEMPLATE, descendants: true, read: i0.TemplateRef }, { propertyName: "headerPanelTemplate", first: true, predicate: HEADER_PANEL_TEMPLATE, descendants: true, read: i0.TemplateRef }, { propertyName: "emptyContentTemplate", first: true, predicate: EMPTY_CONTENT_TEMPLATE, descendants: true, read: i0.TemplateRef }], viewQueries: [{ propertyName: "fluidDirective", first: true, predicate: FluidHeightDirective, descendants: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0__namespace, template: "<div\r\n class=\"ndf-reports__container\"\r\n [class.panel-opened]=\"isPanelOpened && filtersConfig\"\r\n [dir]=\"direction\"\r\n ndfFluidHeight\r\n>\r\n <div\r\n class=\"absolute flex justify-center items-center loading-result\"\r\n *ngIf=\"isLoadingResult && callLoadCondition()\"\r\n >\r\n <mat-spinner class=\"mt-5 mx-auto\" [diameter]=\"48\"></mat-spinner>\r\n </div>\r\n\r\n <div class=\"ndf-reports__panel print:hidden\">\r\n <ng-container\r\n [ngTemplateOutlet]=\"headerPanelTemplate\"\r\n [ngTemplateOutletContext]=\"{\r\n $implicit: aggregations,\r\n filterChanged: filterChanged,\r\n activeQuery: activeQuery,\r\n triggerUpdate: triggerUpdate,\r\n reset: resetFilters,\r\n config: config\r\n }\"\r\n ></ng-container>\r\n\r\n <app-filters-panel\r\n *ngIf=\"!!filtersConfig?.fields?.length && callLoadCondition()\"\r\n [fields]=\"filtersConfig?.fields\"\r\n [aggregations]=\"aggregations\"\r\n (filterChanged)=\"filterChanged($event)\"\r\n [activeQuery]=\"activeFiltersQuery$ | async\"\r\n class=\"ndf-reports__filters\"\r\n [customTemplateRef]=\"filterCustomTemplate\"\r\n ></app-filters-panel>\r\n </div>\r\n\r\n <ng-container *ngIf=\"callLoadCondition(); else emptyContent\">\r\n <div\r\n class=\"ndf-reports__content\"\r\n (scrolled)=\"onContentScroll($event)\"\r\n *ngIf=\"reportsData$ | async as reports\"\r\n >\r\n <div class=\"ndf-reports__header flex pt-4 print:hidden\">\r\n <button\r\n mat-stroked-button\r\n class=\"toggle-button\"\r\n (click)=\"togglePanel()\"\r\n >\r\n <mat-icon> filter_alt</mat-icon>\r\n </button>\r\n <app-editor-button\r\n *ngIf=\"jsonEditorEnabled && reportsKey\"\r\n [key]=\"reportsKey\"\r\n [type]=\"editorType\"\r\n ></app-editor-button>\r\n <button\r\n mat-stroked-button\r\n *ngIf=\"config?.options?.print\"\r\n class=\"print-button\"\r\n (click)=\"printAll()\"\r\n >\r\n <mat-icon> print</mat-icon>\r\n </button>\r\n </div>\r\n\r\n <div class=\"reports-grid\" *ngIf=\"!isLoadingResult\">\r\n <app-ndf-report\r\n *ngFor=\"let config of reportConfig.items; trackBy: trackByFn\"\r\n [config]=\"config\"\r\n [data]=\"reports?.response\"\r\n [criteria]=\"filtersParams$ | async\"\r\n [direction]=\"direction\"\r\n [attr.data-width]=\"config?.layout?.width || 4\"\r\n [attr.data-height]=\"config?.layout?.height || 'auto'\"\r\n [attr.data-start-column]=\"config?.layout?.columnPosition || 'auto'\"\r\n [attr.data-start-row]=\"config?.layout?.rowPosition || 'auto'\"\r\n [class.wide]=\"config?.layout?.width >= 6\"\r\n [style]=\"config?.layout?.style\"\r\n class=\"reports-grid__item {{ config?.layout?.styleClass }} \"\r\n (onNavigate)=\"onNavigate($event)\"\r\n (onOpen)=\"openReportDetails($event, config)\"\r\n ></app-ndf-report>\r\n </div>\r\n </div>\r\n </ng-container>\r\n <div\r\n class=\"ndf-reports__details print:hidden\"\r\n [class.opened]=\"showDetails\"\r\n [@slideInOut]=\"showDetails ? 'open' : 'closed'\"\r\n (@slideInOut.done)=\"onDetailsAnimationEnd($event)\"\r\n >\r\n <app-ndf-table\r\n *ngIf=\"reportDetails$ | async as report\"\r\n [config]=\"report.config\"\r\n [activeQuery]=\"activeFiltersQuery$ | async\"\r\n [customCriteria]=\"detailsFiltersParams$ | async\"\r\n >\r\n <ng-template searchTableTemplate let-toggle=\"togglePanel\">\r\n <div class=\"ndf-reports__details__header flex gap-2\">\r\n <button mat-stroked-button class=\"toggle-button\" (click)=\"toggle()\">\r\n <mat-icon> filter_alt</mat-icon>\r\n </button>\r\n <button\r\n mat-stroked-button\r\n class=\"close-button\"\r\n (click)=\"closeDetailsPanel()\"\r\n >\r\n <mat-icon> close</mat-icon>\r\n </button>\r\n </div>\r\n <h3>\r\n {{ report.label | translate }}\r\n </h3>\r\n </ng-template>\r\n </app-ndf-table>\r\n </div>\r\n</div>\r\n\r\n<ng-template #emptyContent>\r\n <div class=\"ndf-reports__content flex items-center flex-grow-1\">\r\n <ng-container\r\n [ngTemplateOutlet]=\"emptyContentTemplate || defaultEmptyContent\"\r\n ></ng-container>\r\n </div>\r\n</ng-template>\r\n\r\n<ng-template #defaultEmptyContent>\r\n <div class=\"no-data mt-26\">\r\n {{ 'noData' | translate }}\r\n </div>\r\n</ng-template>\r\n", styles: [":host{--table-dev-height: var(--ndf-reports-table-dev-height, auto);--report-height: var(--ndf-reports-report-height, 430px);--cp-height: var(--report-height);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%}@media print{:host{--report-height: auto;--cp-print-min-height: 80mm;padding:0}}.loading-result{background:var(--loading-result-background, rgba(255, 255, 255, .5));-webkit-backdrop-filter:var(--loading-result-filter, blur(3px));backdrop-filter:var(--loading-result-filter, blur(3px));width:100%;height:100%;z-index:3}.ndf-reports *{box-sizing:border-box;min-height:0}.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-pis: 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-pis, 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;width:100%;margin:0;padding:0;page-break-after:avoid}}.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: 10mm;--reports-grid-margin-top: 0;padding:0;margin:0;--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: i6__namespace.MatSpinner, selector: "mat-spinner", inputs: ["color"] }, { 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: 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", "styleClass", "configTransformer", "tableKey", "jsonEditorEnabled", "config", "customCriteria", "searchTerm"], outputs: ["onRowSelected", "onRowIndexSelected", "actionOnRow", "onGettingData", "onMultiRowSelected", "onLoading", "onPage", "onInitialized", "onLoaded", "onQueryChange", "onSort"] }], directives: [{ 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: i4__namespace$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4__namespace$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { 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] });
48522
48654
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NdfReportsComponent, decorators: [{
48523
48655
  type: i0.Component,
48524
48656
  args: [{
@@ -48531,7 +48663,7 @@
48531
48663
  },
48532
48664
  animations: [slideAnimation],
48533
48665
  }]
48534
- }], ctorParameters: function () { return [{ type: i1__namespace.TranslateService }, { type: FiltersMapperService }, { type: NdfReportsService }, { type: ChartManagerService }, { type: ReportTransformService }, { type: i0__namespace.ChangeDetectorRef }, { type: FilterQueryService }, { type: ReportsStateService }, { type: ReportConfigurationService }, { type: i1__namespace$5.Router }, { type: i0__namespace.NgZone }]; }, propDecorators: { fluidDirective: [{
48666
+ }], ctorParameters: function () { return [{ type: i1__namespace.TranslateService }, { type: FiltersMapperService }, { type: NdfReportsService }, { type: ChartManagerService }, { type: ReportTransformService }, { type: i0__namespace.ChangeDetectorRef }, { type: FilterQueryService }, { type: ReportsStateService }, { type: ReportConfigurationService }, { type: i1__namespace$5.Router }, { type: i0__namespace.NgZone }, { type: ReportsHooksService }]; }, propDecorators: { fluidDirective: [{
48535
48667
  type: i0.ViewChild,
48536
48668
  args: [FluidHeightDirective]
48537
48669
  }], jsonEditorEnabled: [{
@@ -48540,6 +48672,8 @@
48540
48672
  type: i0.Input
48541
48673
  }], navigateRoute: [{
48542
48674
  type: i0.Input
48675
+ }], loadCondition: [{
48676
+ type: i0.Input
48543
48677
  }], config: [{
48544
48678
  type: i0.Input
48545
48679
  }], onQueryChange: [{
@@ -48555,6 +48689,26 @@
48555
48689
  args: [EMPTY_CONTENT_TEMPLATE, { read: i0.TemplateRef }]
48556
48690
  }] } });
48557
48691
 
48692
+ var CheckConditionPipe = /** @class */ (function () {
48693
+ function CheckConditionPipe() {
48694
+ }
48695
+ CheckConditionPipe.prototype.transform = function (activeQuery, condition, config) {
48696
+ if (condition) {
48697
+ return Evaluator.evaluate(condition, { activeQuery: activeQuery, config: config }, 'show');
48698
+ }
48699
+ return true;
48700
+ };
48701
+ return CheckConditionPipe;
48702
+ }());
48703
+ CheckConditionPipe.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: CheckConditionPipe, deps: [], target: i0__namespace.ɵɵFactoryTarget.Pipe });
48704
+ CheckConditionPipe.ɵpipe = i0__namespace.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: CheckConditionPipe, name: "checkCondition" });
48705
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: CheckConditionPipe, decorators: [{
48706
+ type: i0.Pipe,
48707
+ args: [{
48708
+ name: 'checkCondition',
48709
+ }]
48710
+ }] });
48711
+
48558
48712
  var CONTAINERS = [NdfReportsComponent, NdfReportComponent];
48559
48713
  var DIRECTIVES = [
48560
48714
  ScrollableDivDirective,
@@ -49014,7 +49168,7 @@
49014
49168
  return ConfigPreviewComponent;
49015
49169
  }());
49016
49170
  ConfigPreviewComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ConfigPreviewComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
49017
- ConfigPreviewComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: ConfigPreviewComponent, selector: "app-config-preview", inputs: { type: "type", data: "data" }, ngImport: i0__namespace, template: "<ng-container *ngIf=\"data | validateObject\">\r\n\t<ng-container [ngSwitch]=\"type\">\r\n\t\t<app-ndf-table *ngSwitchCase=\"types.TABLES\" [config]=\"data\"></app-ndf-table>\r\n\t\t<app-ndf-reports *ngSwitchCase=\"types.REPORTS\" [config]=\"data\"></app-ndf-reports>\r\n\t</ng-container>\r\n</ng-container>\r\n", styles: [":host{display:block;height:var(--monaco-config-editor-height, 100%);border:var(--monaco-config-editor-border, 1px solid var(--monaco-border-color, #bbb))}\n"], components: [{ type: NdfTableComponent, selector: "app-ndf-table", inputs: ["rows", "totalRecords", "autoCalculateHeight", "emptyMessage", "activeQuery", "configPath", "styleClass", "configTransformer", "tableKey", "jsonEditorEnabled", "config", "customCriteria", "searchTerm"], outputs: ["onRowSelected", "onRowIndexSelected", "actionOnRow", "onGettingData", "onMultiRowSelected", "onLoading", "onPage", "onInitialized", "onLoaded", "onQueryChange", "onSort"] }, { type: NdfReportsComponent, selector: "app-ndf-reports", inputs: ["jsonEditorEnabled", "reportsKey", "navigateRoute", "config"], outputs: ["onQueryChange"] }], 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"] }], pipes: { "validateObject": ValidateObjectPipe } });
49171
+ ConfigPreviewComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: ConfigPreviewComponent, selector: "app-config-preview", inputs: { type: "type", data: "data" }, ngImport: i0__namespace, template: "<ng-container *ngIf=\"data | validateObject\">\r\n\t<ng-container [ngSwitch]=\"type\">\r\n\t\t<app-ndf-table *ngSwitchCase=\"types.TABLES\" [config]=\"data\"></app-ndf-table>\r\n\t\t<app-ndf-reports *ngSwitchCase=\"types.REPORTS\" [config]=\"data\"></app-ndf-reports>\r\n\t</ng-container>\r\n</ng-container>\r\n", styles: [":host{display:block;height:var(--monaco-config-editor-height, 100%);border:var(--monaco-config-editor-border, 1px solid var(--monaco-border-color, #bbb))}\n"], components: [{ type: NdfTableComponent, selector: "app-ndf-table", inputs: ["rows", "totalRecords", "autoCalculateHeight", "emptyMessage", "activeQuery", "configPath", "styleClass", "configTransformer", "tableKey", "jsonEditorEnabled", "config", "customCriteria", "searchTerm"], outputs: ["onRowSelected", "onRowIndexSelected", "actionOnRow", "onGettingData", "onMultiRowSelected", "onLoading", "onPage", "onInitialized", "onLoaded", "onQueryChange", "onSort"] }, { type: NdfReportsComponent, selector: "app-ndf-reports", inputs: ["jsonEditorEnabled", "reportsKey", "navigateRoute", "loadCondition", "config"], outputs: ["onQueryChange"] }], 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"] }], pipes: { "validateObject": ValidateObjectPipe } });
49018
49172
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ConfigPreviewComponent, decorators: [{
49019
49173
  type: i0.Component,
49020
49174
  args: [{
@@ -52375,6 +52529,7 @@
52375
52529
  exports.TableColumnsTogglerComponent = TableColumnsTogglerComponent;
52376
52530
  exports.TableComponent = TableComponent;
52377
52531
  exports.TableExportComponent = TableExportComponent;
52532
+ exports.TableHooksService = TableHooksService;
52378
52533
  exports.TableModule = TableModule;
52379
52534
  exports.TableSkeletonComponent = TableSkeletonComponent;
52380
52535
  exports.TagsApiService = TagsApiService;