nuxeo-development-framework 6.1.1 → 6.1.3

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 (39) hide show
  1. package/bundles/nuxeo-development-framework.umd.js +893 -674
  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/ndf-filters/components/aggregation-date-list/aggregation-date-list.component.js +76 -23
  5. package/esm2015/lib/components/ndf-filters/models/field-options/date-list-options.js +1 -1
  6. package/esm2015/lib/components/ndf-filters/models/filter-option.model.js +1 -1
  7. package/esm2015/lib/components/ndf-filters/services/aggregation-field.service.js +23 -12
  8. package/esm2015/lib/components/reports/ndf-reports/components/dynamic-timeline-report/dynamic-timeline-report.component.js +2 -2
  9. package/esm2015/lib/components/reports/ndf-reports/containers/ndf-reports/ndf-reports.component.js +32 -16
  10. package/esm2015/lib/components/reports/ndf-reports/models/common.js +1 -1
  11. package/esm2015/lib/components/reports/ndf-reports/models/dynamic-line.js +1 -1
  12. package/esm2015/lib/components/reports/ndf-reports/models/ndf-reports.config.js +1 -1
  13. package/esm2015/lib/components/reports/ndf-reports/pipes/check-condition.pipe.js +4 -4
  14. package/esm2015/lib/components/reports/ndf-reports/services/dynamic-timeline-report.service.js +26 -31
  15. package/esm2015/lib/components/reports/ndf-reports/services/ndf-reports.service.js +16 -21
  16. package/esm2015/lib/components/reports/ndf-reports/services/reports-hooks.service.js +34 -1
  17. package/esm2015/lib/components/tables/dynamic-table/dynamic-table/dynamic-table.component.js +116 -102
  18. package/esm2015/lib/components/tables/dynamic-table/public-api.js +3 -2
  19. package/esm2015/lib/components/tables/dynamic-table/services/table-hooks.service.js +56 -0
  20. package/esm2015/lib/shared/services/base/base.service.js +9 -10
  21. package/fesm2015/nuxeo-development-framework.js +613 -446
  22. package/fesm2015/nuxeo-development-framework.js.map +1 -1
  23. package/lib/components/ndf-filters/components/aggregation-date-list/aggregation-date-list.component.d.ts +7 -0
  24. package/lib/components/ndf-filters/models/field-options/date-list-options.d.ts +2 -1
  25. package/lib/components/ndf-filters/models/filter-option.model.d.ts +6 -0
  26. package/lib/components/reports/ndf-reports/components/dynamic-timeline-report/dynamic-timeline-report.component.d.ts +1 -1
  27. package/lib/components/reports/ndf-reports/containers/ndf-reports/ndf-reports.component.d.ts +9 -3
  28. package/lib/components/reports/ndf-reports/models/common.d.ts +9 -1
  29. package/lib/components/reports/ndf-reports/models/dynamic-line.d.ts +4 -5
  30. package/lib/components/reports/ndf-reports/models/ndf-reports.config.d.ts +1 -0
  31. package/lib/components/reports/ndf-reports/pipes/check-condition.pipe.d.ts +2 -2
  32. package/lib/components/reports/ndf-reports/services/dynamic-timeline-report.service.d.ts +4 -2
  33. package/lib/components/reports/ndf-reports/services/ndf-reports.service.d.ts +6 -6
  34. package/lib/components/reports/ndf-reports/services/reports-hooks.service.d.ts +15 -3
  35. package/lib/components/tables/dynamic-table/dynamic-table/dynamic-table.component.d.ts +23 -9
  36. package/lib/components/tables/dynamic-table/public-api.d.ts +2 -1
  37. package/lib/components/tables/dynamic-table/services/table-hooks.service.d.ts +13 -0
  38. package/lib/shared/services/base/base.service.d.ts +4 -2
  39. 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: [{
@@ -16192,21 +16191,22 @@
16192
16191
  this._ndfTransformService = _ndfTransformService;
16193
16192
  }
16194
16193
  AggregationFieldService.prototype.prepareAggregationFiled = function (data) {
16195
- var _a, _b;
16194
+ var _a;
16196
16195
  return !!((_a = data.fieldConfig) === null || _a === void 0 ? void 0 : _a.dataTransformer)
16197
- ? this._transformData(data.aggregation, (_b = data.fieldConfig) === null || _b === void 0 ? void 0 : _b.dataTransformer)
16196
+ ? this._transformData(data.aggregation, data.fieldConfig)
16198
16197
  : this._prepareOptions(data);
16199
16198
  };
16200
- AggregationFieldService.prototype._prepareOptions = function (_c) {
16199
+ AggregationFieldService.prototype._prepareOptions = function (_b) {
16201
16200
  var _this = this;
16202
- var fieldConfig = _c.fieldConfig, aggregation = _c.aggregation;
16201
+ var fieldConfig = _b.fieldConfig, aggregation = _b.aggregation;
16203
16202
  return rxjs.of(aggregation).pipe(operators.map(function (aggregation) {
16204
16203
  var _items = ___default["default"].get(aggregation, (fieldConfig === null || fieldConfig === void 0 ? void 0 : fieldConfig.propertyPath) || 'buckets') || [];
16205
16204
  return _items.map(function (item) { return _this._mapOption(item, fieldConfig); });
16206
16205
  }));
16207
16206
  };
16208
- AggregationFieldService.prototype._transformData = function (aggregation, transformer) {
16207
+ AggregationFieldService.prototype._transformData = function (aggregation, config) {
16209
16208
  var _this = this;
16209
+ var transformer = config.dataTransformer;
16210
16210
  var _key = function (k) { return ("" + k).split('/').pop(); };
16211
16211
  var createMappedData = function (res, aggregation) {
16212
16212
  return res.map(function (item) {
@@ -16217,7 +16217,7 @@
16217
16217
  };
16218
16218
  var dataMappers = {
16219
16219
  subject: function (res, aggregation) { return createMappedData(res, aggregation); },
16220
- format: function (res, aggregation) { return createMappedData(res, aggregation); }
16220
+ format: function (res, aggregation) { return createMappedData(res, aggregation); },
16221
16221
  };
16222
16222
  if (!this._ndfTransformService.has(transformer)) {
16223
16223
  throw new Error("No transformer defined for type: " + transformer);
@@ -16236,13 +16236,14 @@
16236
16236
  };
16237
16237
  AggregationFieldService.prototype._createFilterOption = function (item, docCount) {
16238
16238
  var code = item.code || item.id;
16239
- return {
16239
+ var option = {
16240
16240
  id: code,
16241
16241
  label: item.code,
16242
16242
  value: code,
16243
16243
  count: docCount,
16244
- localizedLabel: { ar: item.arabicTitle, en: item.englishTitle }
16244
+ localizedLabel: { ar: item.arabicTitle, en: item.englishTitle },
16245
16245
  };
16246
+ return option;
16246
16247
  };
16247
16248
  AggregationFieldService.prototype._mapOption = function (item, config) {
16248
16249
  var prefix = (config === null || config === void 0 ? void 0 : config.prefix) || '';
@@ -16256,22 +16257,31 @@
16256
16257
  localizedLabel: config.bindLabel
16257
16258
  ? {
16258
16259
  ar: ___default["default"].get(item, config === null || config === void 0 ? void 0 : config.bindLabel.ar),
16259
- en: ___default["default"].get(item, config === null || config === void 0 ? void 0 : config.bindLabel.en)
16260
+ en: ___default["default"].get(item, config === null || config === void 0 ? void 0 : config.bindLabel.en),
16260
16261
  }
16261
- : null
16262
+ : null,
16262
16263
  };
16263
16264
  if (config === null || config === void 0 ? void 0 : config.tooltip) {
16264
16265
  var _a = config === null || config === void 0 ? void 0 : config.tooltip, properties = _a.properties, tooltipConfig = __rest(_a, ["properties"]);
16265
16266
  option.tooltip = {
16266
16267
  config: tooltipConfig,
16267
- values: this._prepareTooltip(item, config === null || config === void 0 ? void 0 : config.tooltip) || null
16268
+ values: this._prepareTooltip(item, config === null || config === void 0 ? void 0 : config.tooltip) || null,
16269
+ };
16270
+ }
16271
+ var keys = Object.keys(item);
16272
+ if (keys.includes('from') || keys.includes('to')) {
16273
+ option.constraints = {
16274
+ range: {
16275
+ from: item === null || item === void 0 ? void 0 : item.from,
16276
+ to: item.to,
16277
+ },
16268
16278
  };
16269
16279
  }
16270
16280
  return option;
16271
16281
  };
16272
16282
  AggregationFieldService.prototype._prepareTooltip = function (item, config) {
16273
- return Object.entries(config.properties).reduce(function (acc, _c) {
16274
- var _d = __read(_c, 1), key = _d[0];
16283
+ return Object.entries(config.properties).reduce(function (acc, _b) {
16284
+ var _c = __read(_b, 1), key = _c[0];
16275
16285
  var val = ___default["default"].get(item, key);
16276
16286
  if (val) {
16277
16287
  acc[key] = val;
@@ -16286,7 +16296,7 @@
16286
16296
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: AggregationFieldService, decorators: [{
16287
16297
  type: i0.Injectable,
16288
16298
  args: [{
16289
- providedIn: 'root'
16299
+ providedIn: 'root',
16290
16300
  }]
16291
16301
  }], ctorParameters: function () { return [{ type: NdfTransformService }]; } });
16292
16302
 
@@ -19678,11 +19688,16 @@
19678
19688
  }
19679
19689
  };
19680
19690
  AggregationDateListComponent.prototype._initValue = function (obj) {
19691
+ var _a;
19681
19692
  if (!isFieldValueObject(obj)) {
19682
19693
  this._handleSelection(obj);
19683
19694
  return;
19684
19695
  }
19685
19696
  var min = obj.min, max = obj.max, value = obj.value;
19697
+ if ((_a = this.renderOptions) === null || _a === void 0 ? void 0 : _a.convertTime) {
19698
+ this._handleConvertedTime(this._dateToTimestamp(min), this._dateToTimestamp(max));
19699
+ return;
19700
+ }
19686
19701
  if (min || max) {
19687
19702
  this.minMaxDateCtrl.patchValue({ min: min, max: max }, { emitEvent: false });
19688
19703
  }
@@ -19690,12 +19705,19 @@
19690
19705
  this._handleSelection(value);
19691
19706
  }
19692
19707
  };
19708
+ AggregationDateListComponent.prototype._handleConvertedTime = function (from, to) {
19709
+ var options = this._optionsSub.getValue();
19710
+ var option = this.findByRange(options, { from: from, to: to });
19711
+ if (option) {
19712
+ this.selectionModel.select(option === null || option === void 0 ? void 0 : option.value);
19713
+ }
19714
+ };
19693
19715
  AggregationDateListComponent.prototype._handleSelection = function (values) {
19694
- var _b;
19716
+ var _c;
19695
19717
  this.internalValue = values;
19696
19718
  if (this._isList()) {
19697
19719
  var selectedValues = Array.isArray(values) ? values : [values];
19698
- (_b = this.selectionModel).select.apply(_b, __spreadArray([], __read(selectedValues)));
19720
+ (_c = this.selectionModel).select.apply(_c, __spreadArray([], __read(selectedValues)));
19699
19721
  }
19700
19722
  };
19701
19723
  AggregationDateListComponent.prototype.ngOnInit = function () {
@@ -19705,13 +19727,31 @@
19705
19727
  this._updateVisibility();
19706
19728
  };
19707
19729
  AggregationDateListComponent.prototype.updateValueSelection = function (value) {
19708
- var _a;
19709
- this._onChange(value);
19730
+ var _a, _b;
19731
+ this._onChange(!!((_a = this.renderOptions) === null || _a === void 0 ? void 0 : _a.convertTime) ? this._convertToTime(value) : value);
19710
19732
  if (this.renderOptions.minMax) {
19711
- var _emitEvent = ((_a = this.fieldConfig) === null || _a === void 0 ? void 0 : _a.sendMode) === FIELD_SEND_MODE.queryParam;
19733
+ var _emitEvent = ((_b = this.fieldConfig) === null || _b === void 0 ? void 0 : _b.sendMode) === FIELD_SEND_MODE.queryParam;
19712
19734
  this._resetMinMaxCtrl(_emitEvent);
19713
19735
  }
19714
19736
  };
19737
+ AggregationDateListComponent.prototype._convertToTime = function (value) {
19738
+ var _a;
19739
+ var _c = __read(value, 1), _val = _c[0];
19740
+ var options = this._optionsSub.getValue();
19741
+ var option = options.find(function (opt) { return opt.value === _val; });
19742
+ if (option && ((_a = option.constraints) === null || _a === void 0 ? void 0 : _a.range)) {
19743
+ var _d = option.constraints.range, from = _d.from, to = _d.to;
19744
+ var _val_1 = {
19745
+ min: this._toEndOfDayISO(from),
19746
+ max: this._toEndOfDayISO(to),
19747
+ };
19748
+ if (this._isValueObject()) {
19749
+ return this._prepareValueRange(_val_1);
19750
+ }
19751
+ return _val_1;
19752
+ }
19753
+ return value;
19754
+ };
19715
19755
  AggregationDateListComponent.prototype.updateSelectValue = function (value) {
19716
19756
  this.updateValueSelection([value]);
19717
19757
  };
@@ -19724,13 +19764,15 @@
19724
19764
  this._internalReset();
19725
19765
  this._isFieldDirty = !!_hasData;
19726
19766
  if (this._isValueObject()) {
19727
- var _operator = NxQL._getRangeOperator(value);
19728
- var _val = NxQL._getValueRange(value, 'DATE', _operator);
19729
- this._onChange(_val);
19767
+ this._onChange(this._prepareValueRange(value));
19730
19768
  return;
19731
19769
  }
19732
19770
  this._onChange(value);
19733
19771
  };
19772
+ AggregationDateListComponent.prototype._prepareValueRange = function (value) {
19773
+ var _operator = NxQL._getRangeOperator(value);
19774
+ return NxQL._getValueRange(value, 'DATE', _operator);
19775
+ };
19734
19776
  AggregationDateListComponent.prototype.updateValue = function (value) {
19735
19777
  this.internalValue = value;
19736
19778
  this._onChange(value);
@@ -19747,7 +19789,9 @@
19747
19789
  }
19748
19790
  if (this._isSendAsQueryParams()) {
19749
19791
  formGroup.addControl(this.fieldConfig.aggregation + "__minMaxDate", this.minMaxDateCtrl);
19750
- this.minMaxDateCtrl.valueChanges.pipe(operators.takeUntil(this.destroy$)).subscribe(function (_) {
19792
+ this.minMaxDateCtrl.valueChanges
19793
+ .pipe(operators.takeUntil(this.destroy$))
19794
+ .subscribe(function (_) {
19751
19795
  _this._internalReset();
19752
19796
  _this.updateValue(null);
19753
19797
  });
@@ -19766,23 +19810,21 @@
19766
19810
  };
19767
19811
  AggregationDateListComponent.prototype._addSelectionListener = function () {
19768
19812
  var _this = this;
19769
- if (!!this.renderOptions.view && this.renderOptions.view !== DATE_LIST_VIEW.list) {
19813
+ if (!!this.renderOptions.view &&
19814
+ this.renderOptions.view !== DATE_LIST_VIEW.list) {
19770
19815
  return;
19771
19816
  }
19772
19817
  this.selectionModel.changed
19773
19818
  .asObservable()
19774
19819
  .pipe(operators.map(function (data) { return data.source.selected; }), operators.takeUntil(this.destroy$))
19775
19820
  .subscribe(function (value) {
19776
- if (_this.renderOptions.minMax) {
19777
- _this._resetMinMaxCtrl(false);
19778
- }
19779
19821
  _this.updateValueSelection(value);
19780
19822
  });
19781
19823
  };
19782
19824
  AggregationDateListComponent.prototype._resetMinMaxCtrl = function (emitEvent) {
19783
19825
  if (emitEvent === void 0) { emitEvent = true; }
19784
19826
  this.minMaxDateCtrl.reset(null, {
19785
- emitEvent: emitEvent
19827
+ emitEvent: emitEvent,
19786
19828
  });
19787
19829
  };
19788
19830
  AggregationDateListComponent.prototype._internalReset = function () {
@@ -19817,6 +19859,27 @@
19817
19859
  }
19818
19860
  });
19819
19861
  };
19862
+ AggregationDateListComponent.prototype._toEndOfDayISO = function (timestamp) {
19863
+ moment__default$1["default"].locale('en');
19864
+ return moment__default$1["default"](timestamp).format('YYYY-MM-DDTHH:mm:ssZ');
19865
+ };
19866
+ AggregationDateListComponent.prototype._dateToTimestamp = function (date) {
19867
+ moment__default$1["default"].locale('en');
19868
+ return moment__default$1["default"].parseZone(date).valueOf();
19869
+ };
19870
+ AggregationDateListComponent.prototype.normalize = function (ts) {
19871
+ return moment__default$1["default"](ts).startOf('second').valueOf();
19872
+ };
19873
+ AggregationDateListComponent.prototype.findByRange = function (list, range) {
19874
+ var _this = this;
19875
+ var from = this.normalize(range.from);
19876
+ var to = this.normalize(range.to);
19877
+ return list.find(function (item) {
19878
+ var itemFrom = _this.normalize(item.constraints.range.from);
19879
+ var itemTo = _this.normalize(item.constraints.range.to);
19880
+ return itemFrom === from && itemTo === to;
19881
+ });
19882
+ };
19820
19883
  return AggregationDateListComponent;
19821
19884
  }(BaseAggregationField));
19822
19885
  AggregationDateListComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: AggregationDateListComponent, deps: null, target: i0__namespace.ɵɵFactoryTarget.Component });
@@ -19824,13 +19887,13 @@
19824
19887
  {
19825
19888
  provide: i2.NG_VALUE_ACCESSOR,
19826
19889
  useExisting: i0.forwardRef(function () { return AggregationDateListComponent; }),
19827
- multi: true
19890
+ multi: true,
19828
19891
  },
19829
19892
  {
19830
19893
  provide: i2.NG_VALIDATORS,
19831
19894
  useExisting: i0.forwardRef(function () { return AggregationDateListComponent; }),
19832
- multi: true
19833
- }
19895
+ multi: true,
19896
+ },
19834
19897
  ], usesInheritance: true, ngImport: i0__namespace, template: "<div *ngIf=\"options$ | async as options\">\r\n\t<field-header *ngIf=\"fieldConfig.label && !renderOptions?.hideLabel\" class=\"filter-date-list__label\">{{\r\n\t\tfieldConfig.label | translate\r\n\t}}</field-header>\r\n\r\n\t<div class=\"filter-date-list__wrapper\">\r\n\t\t<ng-container *ngIf=\"!renderOptions?.view || renderOptions.view === viewLayout.list\">\r\n\t\t\t<mat-radio-button\r\n\t\t\t\tclass=\"filter-date-list__item\"\r\n\t\t\t\t*ngFor=\"let option of options; index as index\"\r\n\t\t\t\t[checked]=\"selectionModel.isSelected(option.value)\"\r\n\t\t\t\t(change)=\"selectionModel.toggle(option.value)\"\r\n\t\t\t\t[class.checkedBox]=\"selectionModel.isSelected(option.value)\"\r\n\t\t\t\t[class.unCheckedBox]=\"!selectionModel.isSelected(option.value)\"\r\n\t\t\t>\r\n\t\t\t\t<ng-container\r\n\t\t\t\t\t[ngTemplateOutlet]=\"contentTemplate || defaultTemplate\"\r\n\t\t\t\t\t[ngTemplateOutletContext]=\"{ $implicit: option, fieldConfig, aggregation }\"\r\n\t\t\t\t></ng-container>\r\n\r\n\t\t\t\t<ng-template #defaultTemplate>\r\n\t\t\t\t\t<filter-option-text\r\n\t\t\t\t\t\t[option]=\"option\"\r\n\t\t\t\t\t\t[language]=\"language\"\r\n\t\t\t\t\t\t[showCount]=\"renderOptions?.showTotal\"\r\n\t\t\t\t\t></filter-option-text>\r\n\t\t\t\t</ng-template>\r\n\t\t\t</mat-radio-button>\r\n\r\n\t\t\t<button *ngIf=\"selectionModel.hasValue()\" mat-flat-button class=\"mb-2\" (click)=\"clearSelected()\">\r\n\t\t\t\t{{ 'FILTERS.clear' | translate }}\r\n\t\t\t</button>\r\n\t\t</ng-container>\r\n\r\n\t\t<ng-container *ngIf=\"renderOptions.view === viewLayout.dropdown\">\r\n\t\t\t<ng-select\r\n\t\t\t\tclass=\"filter-date-list__select\"\r\n\t\t\t\t[items]=\"options\"\r\n\t\t\t\tbindValue=\"value\"\r\n\t\t\t\t[multiple]=\"false\"\r\n\t\t\t\t[ngModel]=\"internalValue\"\r\n\t\t\t\t(ngModelChange)=\"updateSelectValue($event)\"\r\n\t\t\t\t[notFoundText]=\"emptyPlaceholder || 'SELECT.notFoundText' | translate\"\r\n\t\t\t\t[placeholder]=\"'SELECT.placeholder' | translate\"\r\n\t\t\t\t[clearAllText]=\"'SELECT.clearAllText' | translate\"\r\n\t\t\t\t[typeToSearchText]=\"'SELECT.typeToSearchText' | translate\"\r\n\t\t\t\t[searchable]=\"false\"\r\n\t\t\t>\r\n\t\t\t\t<ng-template ng-option-tmp let-item=\"item\">\r\n\t\t\t\t\t<ng-container\r\n\t\t\t\t\t\t[ngTemplateOutlet]=\"contentTemplate || defaultTemplate\"\r\n\t\t\t\t\t\t[ngTemplateOutletContext]=\"{ $implicit: item, fieldConfig, aggregation }\"\r\n\t\t\t\t\t></ng-container>\r\n\r\n\t\t\t\t\t<ng-template #defaultTemplate>\r\n\t\t\t\t\t\t<filter-option-text\r\n\t\t\t\t\t\t\t[option]=\"item\"\r\n\t\t\t\t\t\t\t[language]=\"language\"\r\n\t\t\t\t\t\t\t[showCount]=\"renderOptions?.showTotal\"\r\n\t\t\t\t\t\t></filter-option-text>\r\n\t\t\t\t\t</ng-template>\r\n\t\t\t\t</ng-template>\r\n\r\n\t\t\t\t<ng-template ng-multi-label-tmp let-items=\"items\" let-clear=\"clear\">\r\n\t\t\t\t\t<div *ngFor=\"let item of items\" class=\"ng-value\">\r\n\t\t\t\t\t\t<span class=\"ng-value-label\">{{ item | localizedLabel : language }}</span>\r\n\t\t\t\t\t\t<button class=\"ng-value-icon left\" (click)=\"clear(item)\" aria-hidden=\"true\">\u00D7</button>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</ng-template>\r\n\r\n\t\t\t\t<ng-template ng-label-tmp let-item=\"item\">\r\n\t\t\t\t\t<filter-option-text\r\n\t\t\t\t\t\t[option]=\"item\"\r\n\t\t\t\t\t\t[language]=\"language\"\r\n\t\t\t\t\t\t[showCount]=\"renderOptions?.showTotal\"\r\n\t\t\t\t\t></filter-option-text>\r\n\t\t\t\t</ng-template>\r\n\t\t\t</ng-select>\r\n\t\t</ng-container>\r\n\r\n\t\t<filter-date-range\r\n\t\t\tclass=\"filter-date-list__range\"\r\n\t\t\t*ngIf=\"renderOptions?.minMax\"\r\n\t\t\t[formControl]=\"minMaxDateCtrl\"\r\n\t\t></filter-date-range>\r\n\t</div>\r\n</div>\r\n", styles: [".filter-date-list{display:var(--fdl-display, block)}.filter-date-list__label{display:var(--fdl-label-display, block);margin-block:var(--fdl-label-margin-block, 0 .5rem);margin-inline:var(--fdl-label-margin-inline, 0 .2rem);padding:var(--fdl-padding, .2rem);font-weight:var(--fdl-weight, 600)}.filter-date-list__wrapper{display:var(--fdl-wrapper-display, flex);flex-direction:var(--fdl-wrapper-direction, column)}.filter-date-list__item{padding-inline-start:.5rem;margin-bottom:var(--fdl-row-margin-bottom, .3rem)}.filter-date-list__item .mat-radio-label{display:flex}.filter-date-list__item .mat-radio-label .mat-radio-label-content{flex-grow:1}.filter-date-list__select{margin-bottom:var(--fdl-row-margin-bottom, .3rem)}.filter-date-list__range{margin-top:var(--fdl-range-margin-top, .5rem);display:var(--fdl-range-display, flex);flex-direction:var(--fdl-range-direction, column)}\n"], components: [{ type: FieldHeaderComponent, selector: "field-header" }, { type: i2__namespace$5.MatRadioButton, selector: "mat-radio-button", inputs: ["disableRipple", "tabIndex"], exportAs: ["matRadioButton"] }, { type: FilterOptionTextComponent, selector: "filter-option-text", inputs: ["option", "showCount", "language"] }, { 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: i5__namespace.NgSelectComponent, selector: "ng-select", inputs: ["markFirst", "dropdownPosition", "loading", "closeOnSelect", "hideSelected", "selectOnTab", "bufferAmount", "selectableGroup", "selectableGroupAsModel", "searchFn", "trackByFn", "clearOnBackspace", "labelForId", "inputAttrs", "readonly", "searchWhileComposing", "minTermLength", "editableSearchTerm", "keyDownFn", "multiple", "addTag", "searchable", "clearable", "isOpen", "items", "compareWith", "clearSearchOnAdd", "bindLabel", "placeholder", "notFoundText", "typeToSearchText", "addTagText", "loadingText", "clearAllText", "virtualScroll", "openOnEnter", "appendTo", "bindValue", "appearance", "maxSelectedItems", "groupBy", "groupValue", "tabIndex", "typeahead"], outputs: ["blur", "focus", "change", "open", "close", "search", "clear", "add", "remove", "scroll", "scrollToEnd"] }, { type: FilterDateRangeComponent, selector: "filter-date-range" }], directives: [{ type: i4__namespace$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4__namespace$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i4__namespace$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i2__namespace$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2__namespace$4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i5__namespace.ɵf, selector: "[ng-option-tmp]" }, { type: i5__namespace.ɵi, selector: "[ng-multi-label-tmp]" }, { type: i5__namespace.ɵh, selector: "[ng-label-tmp]" }, { type: i2__namespace$4.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }], pipes: { "async": i4__namespace$1.AsyncPipe, "translate": i1__namespace.TranslatePipe, "localizedLabel": LocalizedLabelPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.Default, encapsulation: i0__namespace.ViewEncapsulation.None });
19835
19898
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: AggregationDateListComponent, decorators: [{
19836
19899
  type: i0.Component,
@@ -19844,17 +19907,17 @@
19844
19907
  {
19845
19908
  provide: i2.NG_VALUE_ACCESSOR,
19846
19909
  useExisting: i0.forwardRef(function () { return AggregationDateListComponent; }),
19847
- multi: true
19910
+ multi: true,
19848
19911
  },
19849
19912
  {
19850
19913
  provide: i2.NG_VALIDATORS,
19851
19914
  useExisting: i0.forwardRef(function () { return AggregationDateListComponent; }),
19852
- multi: true
19853
- }
19915
+ multi: true,
19916
+ },
19854
19917
  ],
19855
19918
  host: {
19856
- class: 'filter-date-list'
19857
- }
19919
+ class: 'filter-date-list',
19920
+ },
19858
19921
  }]
19859
19922
  }], propDecorators: { _controlContainer: [{
19860
19923
  type: i0.Optional
@@ -21950,21 +22013,6 @@
21950
22013
  }
21951
22014
  ];
21952
22015
 
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
22016
  var EMPTY_TEMPLATE = new i0.InjectionToken('EmptyTemplateDirective');
21969
22017
  var EmptyTemplateDirective = /** @class */ (function () {
21970
22018
  function EmptyTemplateDirective(template) {
@@ -21992,6 +22040,106 @@
21992
22040
  }]
21993
22041
  }], ctorParameters: function () { return [{ type: i0__namespace.TemplateRef }]; } });
21994
22042
 
22043
+ var DynamicTableService = /** @class */ (function () {
22044
+ function DynamicTableService() {
22045
+ this.refreshData = new i0.EventEmitter();
22046
+ }
22047
+ return DynamicTableService;
22048
+ }());
22049
+ DynamicTableService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: DynamicTableService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
22050
+ DynamicTableService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: DynamicTableService, providedIn: 'root' });
22051
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: DynamicTableService, decorators: [{
22052
+ type: i0.Injectable,
22053
+ args: [{
22054
+ providedIn: 'root'
22055
+ }]
22056
+ }], ctorParameters: function () { return []; } });
22057
+
22058
+ var TableHooksService = /** @class */ (function () {
22059
+ function TableHooksService() {
22060
+ this.beforeSubmitHooks = [];
22061
+ }
22062
+ TableHooksService.prototype.registerBeforeSubmit = function (handler) {
22063
+ this.beforeSubmitHooks.push(handler);
22064
+ };
22065
+ TableHooksService.prototype.unregisterBeforeSubmit = function (handler) {
22066
+ var index = this.beforeSubmitHooks.indexOf(handler);
22067
+ if (index > -1) {
22068
+ this.beforeSubmitHooks.splice(index, 1);
22069
+ }
22070
+ };
22071
+ TableHooksService.prototype.clearBeforeSubmitHooks = function () {
22072
+ this.beforeSubmitHooks = [];
22073
+ };
22074
+ TableHooksService.prototype.executeBeforeSubmit = function (payload) {
22075
+ return __awaiter(this, void 0, void 0, function () {
22076
+ var modifiedPayload, _a, _b, handler, result, err_1, e_1_1;
22077
+ var e_1, _c;
22078
+ return __generator(this, function (_d) {
22079
+ switch (_d.label) {
22080
+ case 0:
22081
+ modifiedPayload = Object.assign({}, payload);
22082
+ _d.label = 1;
22083
+ case 1:
22084
+ _d.trys.push([1, 8, 9, 10]);
22085
+ _a = __values(this.beforeSubmitHooks), _b = _a.next();
22086
+ _d.label = 2;
22087
+ case 2:
22088
+ if (!!_b.done) return [3 /*break*/, 7];
22089
+ handler = _b.value;
22090
+ _d.label = 3;
22091
+ case 3:
22092
+ _d.trys.push([3, 5, , 6]);
22093
+ return [4 /*yield*/, Promise.resolve(handler(modifiedPayload))];
22094
+ case 4:
22095
+ result = _d.sent();
22096
+ modifiedPayload = result !== null && result !== void 0 ? result : modifiedPayload;
22097
+ return [3 /*break*/, 6];
22098
+ case 5:
22099
+ err_1 = _d.sent();
22100
+ console.error('Error executing beforeSubmit handler:', err_1);
22101
+ return [3 /*break*/, 6];
22102
+ case 6:
22103
+ _b = _a.next();
22104
+ return [3 /*break*/, 2];
22105
+ case 7: return [3 /*break*/, 10];
22106
+ case 8:
22107
+ e_1_1 = _d.sent();
22108
+ e_1 = { error: e_1_1 };
22109
+ return [3 /*break*/, 10];
22110
+ case 9:
22111
+ try {
22112
+ if (_b && !_b.done && (_c = _a.return)) _c.call(_a);
22113
+ }
22114
+ finally { if (e_1) throw e_1.error; }
22115
+ return [7 /*endfinally*/];
22116
+ case 10: return [2 /*return*/, modifiedPayload];
22117
+ }
22118
+ });
22119
+ });
22120
+ };
22121
+ TableHooksService.prototype.evaluate = function (expr, payload) {
22122
+ try {
22123
+ var context = { criteria: payload };
22124
+ var result = Evaluator.evaluate(expr, context, 'payload');
22125
+ return result !== null && result !== void 0 ? result : payload;
22126
+ }
22127
+ catch (e) {
22128
+ console.error('Error evaluating beforeSubmit string:', e);
22129
+ return payload;
22130
+ }
22131
+ };
22132
+ return TableHooksService;
22133
+ }());
22134
+ TableHooksService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TableHooksService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
22135
+ TableHooksService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TableHooksService, providedIn: 'root' });
22136
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TableHooksService, decorators: [{
22137
+ type: i0.Injectable,
22138
+ args: [{
22139
+ providedIn: 'root'
22140
+ }]
22141
+ }] });
22142
+
21995
22143
  /**
21996
22144
  * you can use this component for any pagination
21997
22145
  *
@@ -22226,66 +22374,70 @@
22226
22374
  * (actionOnRow)="performAction($event)">
22227
22375
  * </cts-dynamic-table>
22228
22376
  */
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;
22377
+ var DynamicTableComponent = /** @class */ (function (_super) {
22378
+ __extends(DynamicTableComponent, _super);
22379
+ function DynamicTableComponent(adapter, callApi, nuxeoService, dynamicTableService, cdr, _tableHooksService) {
22380
+ var _this = _super.call(this) || this;
22381
+ _this.adapter = adapter;
22382
+ _this.callApi = callApi;
22383
+ _this.nuxeoService = nuxeoService;
22384
+ _this.dynamicTableService = dynamicTableService;
22385
+ _this.cdr = cdr;
22386
+ _this._tableHooksService = _tableHooksService;
22236
22387
  /** event to emit when selecting single row */
22237
- this.onRowSelected = new i0.EventEmitter();
22388
+ _this.onRowSelected = new i0.EventEmitter();
22238
22389
  /** event to emit when selecting single row to catch index*/
22239
- this.onRowIndexSelected = new i0.EventEmitter();
22390
+ _this.onRowIndexSelected = new i0.EventEmitter();
22240
22391
  /** event to emit when perform action on row (delte, edit, ... ) */
22241
- this.actionOnRow = new i0.EventEmitter();
22392
+ _this.actionOnRow = new i0.EventEmitter();
22242
22393
  /** event to emit to the higher level when getting data from api is finished */
22243
- this.onGettingData = new i0.EventEmitter();
22394
+ _this.onGettingData = new i0.EventEmitter();
22244
22395
  /** event t emit when selecting multiple row */
22245
- this.onMultiRowSelected = new i0.EventEmitter();
22396
+ _this.onMultiRowSelected = new i0.EventEmitter();
22246
22397
  /** event t emit when start getting data and when finish */
22247
- this.onLoading = new i0.EventEmitter();
22248
- this.sortChanged = new i0.EventEmitter();
22398
+ _this.onLoading = new i0.EventEmitter();
22399
+ _this.sortChanged = new i0.EventEmitter();
22249
22400
  /**
22250
22401
  * @deprecated Use `onPage` instead.
22251
22402
  * @see onPage
22252
22403
  */
22253
- this.onPageChange = new i0.EventEmitter();
22254
- this.onPage = new i0.EventEmitter();
22255
- this.onLoad = new i0.EventEmitter();
22256
- this.onInitialize = new i0.EventEmitter();
22404
+ _this.onPageChange = new i0.EventEmitter();
22405
+ _this.onPage = new i0.EventEmitter();
22406
+ _this.onLoad = new i0.EventEmitter();
22407
+ _this.onInitialize = new i0.EventEmitter();
22257
22408
  /** Translations prefix */
22258
- this.prefix = '';
22409
+ _this.prefix = '';
22259
22410
  /** Controls number of items per page in table */
22260
- this.pageSize = 10;
22411
+ _this.pageSize = 10;
22261
22412
  /** Controls number of items per page in table */
22262
- this.higlightUnread = false;
22263
- this.isLegacyMode = true;
22264
- this.showTotalRecord = false;
22265
- this._pageNumber = 1;
22413
+ _this.higlightUnread = false;
22414
+ _this.isLegacyMode = true;
22415
+ _this.showTotalRecord = false;
22416
+ _this._pageNumber = 1;
22266
22417
  /** Sorting column */
22267
- this.sortingBy = {};
22268
- this.queryParam = {};
22269
- this.customFilters = {};
22270
- this.fullWidth = 'auto';
22418
+ _this.sortingBy = {};
22419
+ _this.queryParam = {};
22420
+ _this.customFilters = {};
22421
+ _this.fullWidth = 'auto';
22271
22422
  /** '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;
22423
+ _this.tableMode = 'list';
22424
+ _this.defultSort = { name: 'properties.createdAt', dir: 'desc' };
22425
+ _this.isSearchPage = false;
22275
22426
  /** allow multiselect rows with checkbox */
22276
- this.multiSelectRows = false;
22427
+ _this.multiSelectRows = false;
22277
22428
  /** 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;
22429
+ _this.customFirstRow = false;
22430
+ _this.highlightSelectedCard = false;
22431
+ _this.showActionsAsMenu = false; // flage to show action in menu or side by side
22432
+ _this.filterParams = {};
22433
+ _this.skipAggregation = 'onPageChange';
22434
+ _this.format = 'MMMM d, y';
22435
+ _this.rows = [];
22436
+ _this.totalRecords = 0;
22437
+ _this.sorting = false;
22438
+ _this.pageSizes = [];
22439
+ _this.initialized = false;
22440
+ return _this;
22289
22441
  }
22290
22442
  Object.defineProperty(DynamicTableComponent.prototype, "pageNumber", {
22291
22443
  set: function (value) {
@@ -22303,7 +22455,9 @@
22303
22455
  });
22304
22456
  DynamicTableComponent.prototype.ngOnInit = function () {
22305
22457
  var _this = this;
22306
- this.myDataSubscription = this.dynamicTableService.refreshData.pipe(operators.startWith(null)).subscribe(function (filterData) {
22458
+ this.dynamicTableService.refreshData
22459
+ .pipe(operators.startWith(null), operators.takeUntil(this.destroy$))
22460
+ .subscribe(function (filterData) {
22307
22461
  if (filterData) {
22308
22462
  _this.filterParams = Object.assign({}, filterData);
22309
22463
  // reset page number when start new filtering
@@ -22312,9 +22466,6 @@
22312
22466
  _this.getData();
22313
22467
  });
22314
22468
  };
22315
- DynamicTableComponent.prototype.ngOnDestroy = function () {
22316
- this.myDataSubscription ? this.myDataSubscription.unsubscribe() : '';
22317
- };
22318
22469
  DynamicTableComponent.prototype.ngOnChanges = function (changes) {
22319
22470
  var isFirstChange = Object.values(changes).some(function (c) { return c.isFirstChange(); });
22320
22471
  if (isFirstChange) {
@@ -22341,94 +22492,113 @@
22341
22492
  this.onPage.emit({
22342
22493
  pageIndex: this._pageNumber,
22343
22494
  pageSize: this.pageSize,
22344
- length: this.totalRecords
22495
+ length: this.totalRecords,
22345
22496
  });
22346
22497
  };
22347
22498
  DynamicTableComponent.prototype.getData = function (payload, headers) {
22348
- var _this = this;
22349
22499
  if (payload === void 0) { payload = {}; }
22350
22500
  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');
22501
+ var _a, _b, _c, _d, _e, _f, _g, _h;
22502
+ return __awaiter(this, void 0, void 0, function () {
22503
+ var params, _headers, _providerPayload, _customPayload, requestData, beforeSubmitString, query$, _request, _request;
22504
+ var _this = this;
22505
+ return __generator(this, function (_j) {
22506
+ switch (_j.label) {
22507
+ case 0:
22508
+ this.loading = true; // internal loading
22509
+ this.onLoading.emit(true); // external loading
22510
+ 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
22511
+ ? {
22512
+ sortBy: (_a = this.sortingBy) === null || _a === void 0 ? void 0 : _a.sortBy,
22513
+ sortOrder: (_b = this.sortingBy) === null || _b === void 0 ? void 0 : _b.sortOrder,
22514
+ }
22515
+ : {})), { currentPageIndex: +this.pageNum - 1 }), (this.pageSize ? { pageSize: this.pageSize } : {})), { offset: 0 }), payload);
22516
+ // don't refresh all table in case of sorting only
22517
+ if (!this.sorting && this.isLegacyMode) {
22518
+ // used to not refreshing all table in case of sorting since table lose sorting state when refresh all table
22519
+ this.rows = []; // used to refresh table to feel changes in actions when perform action and need to refresh actions
22520
+ }
22521
+ this.sorting = false; // reset sorting status to false and for next sorting func sorting set it to true again
22522
+ _headers = Object.assign(Object.assign({}, this.headers), headers);
22523
+ _providerPayload = {
22524
+ query: Object.assign(Object.assign({ pageProvider: this.pageProvider }, params), (((_c = this.customFilters) === null || _c === void 0 ? void 0 : _c.params) || {})),
22525
+ options: {
22526
+ headers: _headers,
22527
+ },
22528
+ };
22529
+ _customPayload = {
22530
+ url: (_d = this.customUrl) === null || _d === void 0 ? void 0 : _d.url,
22531
+ params: Object.assign(Object.assign({}, params), (((_e = this.customFilters) === null || _e === void 0 ? void 0 : _e.params) || {})),
22532
+ headers: _headers,
22533
+ 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) || {}),
22534
+ };
22535
+ requestData = this.customUrl
22536
+ ? _customPayload
22537
+ : _providerPayload;
22538
+ beforeSubmitString = (_h = this.requestActions) === null || _h === void 0 ? void 0 : _h.beforeSubmit;
22539
+ if (!(typeof beforeSubmitString === 'string')) return [3 /*break*/, 2];
22540
+ return [4 /*yield*/, this._tableHooksService.evaluate(beforeSubmitString, requestData)];
22541
+ case 1:
22542
+ requestData = _j.sent();
22543
+ _j.label = 2;
22544
+ case 2: return [4 /*yield*/, this._tableHooksService.executeBeforeSubmit(requestData)];
22545
+ case 3:
22546
+ requestData = _j.sent();
22547
+ if (this.customUrl) {
22548
+ _request = requestData;
22549
+ query$ = this.callApi.customQuery({
22550
+ url: _request.url,
22551
+ method: this.customUrl.method,
22552
+ }, _request.params, _request.headers, _request.payload);
22553
+ }
22554
+ else {
22555
+ _request = requestData;
22556
+ query$ = this.callApi.query(_request.query, _request.options);
22557
+ }
22558
+ query$
22559
+ .pipe(operators.map(function (data) {
22560
+ data.entries.map(function (item) { return _this.adapter.adaptIn(item, _this.fields); });
22561
+ return data;
22562
+ }), operators.catchError(function (err) {
22563
+ throw err;
22564
+ }), operators.takeUntil(this.destroy$))
22565
+ .subscribe(function (res) {
22566
+ _this.loading = false;
22567
+ _this.onLoading.emit(false);
22568
+ _this.onLoad.emit(res);
22569
+ if (!_this.initialized) {
22570
+ _this.onInitialize.emit(res);
22571
+ _this.initialized = true;
22572
+ }
22573
+ res.entries.forEach(function (element) {
22574
+ var _a, _b, _c, _d, _e, _f, _g, _h;
22575
+ if (element.properties &&
22576
+ ((_a = element.properties) === null || _a === void 0 ? void 0 : _a.creator) &&
22577
+ ((_b = element.properties.creator) === null || _b === void 0 ? void 0 : _b.properties)) {
22578
+ element.properties['creatorFullObject'] = Object.assign({}, element.properties.creator);
22579
+ element.properties.creator =
22580
+ ((_d = (_c = element.properties.creator) === null || _c === void 0 ? void 0 : _c.properties) === null || _d === void 0 ? void 0 : _d.firstName) +
22581
+ ' ' +
22582
+ ((_f = (_e = element.properties.creator) === null || _e === void 0 ? void 0 : _e.properties) === null || _f === void 0 ? void 0 : _f.lastName);
22583
+ }
22584
+ if (element.properties && ((_g = element.properties) === null || _g === void 0 ? void 0 : _g.assignee)) {
22585
+ element.properties.assignee = (_h = element.properties) === null || _h === void 0 ? void 0 : _h.assignee.fullName;
22586
+ }
22587
+ // if(this.higlightUnread){
22588
+ // this.cechkIfReadOrNot(element.properties);
22589
+ // }
22590
+ });
22591
+ _this.totalRecords = res.resultsCount;
22592
+ _this.rows = res.entries;
22593
+ _this.cdr.detectChanges();
22594
+ // emit data to outside in case of search page for the first time only to prevent refreshing aggregation with every page change
22595
+ // and for any other page type emit data directly in all page numbers
22596
+ if ((_this.isSearchPage && _this.pageNum === 1) || !_this.isSearchPage)
22597
+ _this.onGettingData.emit(res);
22598
+ });
22599
+ return [2 /*return*/];
22385
22600
  }
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);
22601
+ });
22432
22602
  });
22433
22603
  };
22434
22604
  // function to be executed when clicking on single row
@@ -22458,7 +22628,7 @@
22458
22628
  this.onPage.emit({
22459
22629
  pageIndex: this._pageNumber,
22460
22630
  pageSize: this.pageSize,
22461
- length: this.totalRecords
22631
+ length: this.totalRecords,
22462
22632
  });
22463
22633
  this.getData({}, this.skipAggregation === 'onPageChange' ? { skipAggregates: 'true' } : {});
22464
22634
  };
@@ -22473,7 +22643,9 @@
22473
22643
  if (element['viewers:users'] && element['viewers:users'].length) {
22474
22644
  element.isReaded = false;
22475
22645
  element['viewers:users'].map(function (user) {
22476
- if (user.username === _this.nuxeoService.nuxeoClient.user.properties.username && user.state === "read") {
22646
+ if (user.username ===
22647
+ _this.nuxeoService.nuxeoClient.user.properties.username &&
22648
+ user.state === 'read') {
22477
22649
  element.isReaded = true;
22478
22650
  }
22479
22651
  });
@@ -22483,9 +22655,9 @@
22483
22655
  }
22484
22656
  };
22485
22657
  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 });
22658
+ }(DestroySubject));
22659
+ 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 });
22660
+ 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
22661
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: DynamicTableComponent, decorators: [{
22490
22662
  type: i0.Component,
22491
22663
  args: [{
@@ -22495,10 +22667,10 @@
22495
22667
  encapsulation: i0.ViewEncapsulation.None,
22496
22668
  host: {
22497
22669
  '[class.loading-results]': 'loading',
22498
- '[class.no-data]': 'rows.length <= 0'
22499
- }
22670
+ '[class.no-data]': 'rows.length <= 0',
22671
+ },
22500
22672
  }]
22501
- }], ctorParameters: function () { return [{ type: AdapterService }, { type: CallApiService }, { type: NuxeoService }, { type: DynamicTableService }, { type: i0__namespace.ChangeDetectorRef }]; }, propDecorators: { onRowSelected: [{
22673
+ }], ctorParameters: function () { return [{ type: AdapterService }, { type: CallApiService }, { type: NuxeoService }, { type: DynamicTableService }, { type: i0__namespace.ChangeDetectorRef }, { type: TableHooksService }]; }, propDecorators: { onRowSelected: [{
22502
22674
  type: i0.Output
22503
22675
  }], onRowIndexSelected: [{
22504
22676
  type: i0.Output
@@ -45898,9 +46070,268 @@
45898
46070
  }]
45899
46071
  }], ctorParameters: function () { return [{ type: ChartDataTransformers }]; } });
45900
46072
 
46073
+ var ReportsDataTransformers = /** @class */ (function () {
46074
+ function ReportsDataTransformers() {
46075
+ this._transformations = new Map();
46076
+ }
46077
+ ReportsDataTransformers.prototype.register = function (arg1, arg2) {
46078
+ var _this = this;
46079
+ if (typeof arg1 === 'object') {
46080
+ Object.entries(arg1).forEach(function (_a) {
46081
+ var _b = __read(_a, 2), key = _b[0], fn = _b[1];
46082
+ return _this._transformations.set(key, fn);
46083
+ });
46084
+ return;
46085
+ }
46086
+ if (typeof arg1 === 'string' && arg2) {
46087
+ this._transformations.set(arg1, arg2);
46088
+ }
46089
+ };
46090
+ /**
46091
+ * Retrieves a transformer function by its key.
46092
+ *
46093
+ * @param {string} key - The key of the transformer function.
46094
+ * @returns {ReportDataTransformer | undefined} - The transformer function or undefined if not found.
46095
+ */
46096
+ ReportsDataTransformers.prototype.get = function (key) {
46097
+ return this._transformations.get(key);
46098
+ };
46099
+ /**
46100
+ * Retrieves all registered transformer functions.
46101
+ *
46102
+ * @returns {Map<string, ReportDataTransformer>} - A map of all transformer functions.
46103
+ */
46104
+ ReportsDataTransformers.prototype.getAll = function () {
46105
+ return this._transformations;
46106
+ };
46107
+ /**
46108
+ * Clears all registered transformer functions.
46109
+ */
46110
+ ReportsDataTransformers.prototype.clear = function () {
46111
+ this._transformations.clear();
46112
+ };
46113
+ /**
46114
+ * Checks if a transformer function is registered for a specific key.
46115
+ *
46116
+ * @param {string} key - The key to check.
46117
+ * @returns {boolean} - True if the key exists, false otherwise.
46118
+ */
46119
+ ReportsDataTransformers.prototype.has = function (key) {
46120
+ return this._transformations.has(key);
46121
+ };
46122
+ /**
46123
+ * Removes a transformer function by its key.
46124
+ *
46125
+ * @param {string} key - The key of the transformer function to remove.
46126
+ */
46127
+ ReportsDataTransformers.prototype.remove = function (key) {
46128
+ this._transformations.delete(key);
46129
+ };
46130
+ ReportsDataTransformers.prototype.transform = function (key, data) {
46131
+ var fn = this.get(key);
46132
+ if (!fn) {
46133
+ throw new Error("No transformer registered for key: " + key);
46134
+ }
46135
+ return fn(data);
46136
+ };
46137
+ return ReportsDataTransformers;
46138
+ }());
46139
+ ReportsDataTransformers.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ReportsDataTransformers, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
46140
+ ReportsDataTransformers.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ReportsDataTransformers, providedIn: 'root' });
46141
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ReportsDataTransformers, decorators: [{
46142
+ type: i0.Injectable,
46143
+ args: [{ providedIn: 'root' }]
46144
+ }] });
46145
+
46146
+ var NdfReportsService = /** @class */ (function (_super) {
46147
+ __extends(NdfReportsService, _super);
46148
+ function NdfReportsService(injector, _reportsDataTransformers) {
46149
+ var _this = _super.call(this, injector) || this;
46150
+ _this._reportsDataTransformers = _reportsDataTransformers;
46151
+ return _this;
46152
+ }
46153
+ NdfReportsService.prototype.getData = function (request, criteria) {
46154
+ if (criteria === void 0) { criteria = {}; }
46155
+ return (request === null || request === void 0 ? void 0 : request.customUrl)
46156
+ ? this._customQuery(request, criteria)
46157
+ : this._query(request, criteria);
46158
+ };
46159
+ NdfReportsService.prototype._query = function (request, criteria) {
46160
+ var _this = this;
46161
+ return this.query({
46162
+ pageProvider: request.pageProvider,
46163
+ headers: request === null || request === void 0 ? void 0 : request.headers,
46164
+ params: criteria === null || criteria === void 0 ? void 0 : criteria.params,
46165
+ }).pipe(operators.switchMap(function (response) { return !!(request === null || request === void 0 ? void 0 : request.transformer)
46166
+ ? _this._reportsDataTransformers.transform(request === null || request === void 0 ? void 0 : request.transformer, response)
46167
+ : rxjs.of(response); }));
46168
+ };
46169
+ NdfReportsService.prototype._customQuery = function (request, criteria) {
46170
+ var _this = this;
46171
+ var _a;
46172
+ return this._callApiService
46173
+ .customQuery({
46174
+ url: '/api/v1' + request.customUrl.url,
46175
+ method: ((_a = request.customUrl) === null || _a === void 0 ? void 0 : _a.method) || 'GET',
46176
+ }, 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) || {}))
46177
+ .pipe(operators.switchMap(function (response) { return !!(request === null || request === void 0 ? void 0 : request.transformer)
46178
+ ? _this._reportsDataTransformers.transform(request === null || request === void 0 ? void 0 : request.transformer, response)
46179
+ : rxjs.of(response); }));
46180
+ };
46181
+ NdfReportsService.prototype.prepareRequest = function (request, criteria) {
46182
+ 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) || {}));
46183
+ var payload = ___default["default"].mergeWith(request.payload || {}, (criteria === null || criteria === void 0 ? void 0 : criteria.payload) || {}, function (objValue, srcValue, key) {
46184
+ if (Array.isArray(objValue) && key === 'predicateList') {
46185
+ return objValue.concat(srcValue);
46186
+ }
46187
+ });
46188
+ return {
46189
+ params: params,
46190
+ payload: payload,
46191
+ };
46192
+ };
46193
+ return NdfReportsService;
46194
+ }(BaseService));
46195
+ 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 });
46196
+ NdfReportsService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NdfReportsService, providedIn: 'root' });
46197
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NdfReportsService, decorators: [{
46198
+ type: i0.Injectable,
46199
+ args: [{
46200
+ providedIn: 'root',
46201
+ }]
46202
+ }], ctorParameters: function () { return [{ type: i0__namespace.Injector }, { type: ReportsDataTransformers }]; } });
46203
+
46204
+ var ReportsHooksService = /** @class */ (function () {
46205
+ function ReportsHooksService() {
46206
+ this.beforeSubmitHooks = [];
46207
+ this.reportsActions = new Map();
46208
+ }
46209
+ ReportsHooksService.prototype.registerBeforeSubmit = function (handler) {
46210
+ this.beforeSubmitHooks.push(handler);
46211
+ };
46212
+ ReportsHooksService.prototype.unregisterBeforeSubmit = function (handler) {
46213
+ var index = this.beforeSubmitHooks.indexOf(handler);
46214
+ if (index > -1) {
46215
+ this.beforeSubmitHooks.splice(index, 1);
46216
+ }
46217
+ };
46218
+ ReportsHooksService.prototype.clearBeforeSubmitHooks = function () {
46219
+ this.beforeSubmitHooks = [];
46220
+ };
46221
+ ReportsHooksService.prototype.executeBeforeSubmit = function (payload) {
46222
+ return __awaiter(this, void 0, void 0, function () {
46223
+ var modifiedPayload, _b, _c, handler, result, err_1, e_1_1;
46224
+ var e_1, _d;
46225
+ return __generator(this, function (_e) {
46226
+ switch (_e.label) {
46227
+ case 0:
46228
+ modifiedPayload = Object.assign({}, payload);
46229
+ _e.label = 1;
46230
+ case 1:
46231
+ _e.trys.push([1, 8, 9, 10]);
46232
+ _b = __values(this.beforeSubmitHooks), _c = _b.next();
46233
+ _e.label = 2;
46234
+ case 2:
46235
+ if (!!_c.done) return [3 /*break*/, 7];
46236
+ handler = _c.value;
46237
+ _e.label = 3;
46238
+ case 3:
46239
+ _e.trys.push([3, 5, , 6]);
46240
+ return [4 /*yield*/, Promise.resolve(handler(modifiedPayload))];
46241
+ case 4:
46242
+ result = _e.sent();
46243
+ modifiedPayload = result !== null && result !== void 0 ? result : modifiedPayload;
46244
+ return [3 /*break*/, 6];
46245
+ case 5:
46246
+ err_1 = _e.sent();
46247
+ console.error('Error executing beforeSubmit handler:', err_1);
46248
+ return [3 /*break*/, 6];
46249
+ case 6:
46250
+ _c = _b.next();
46251
+ return [3 /*break*/, 2];
46252
+ case 7: return [3 /*break*/, 10];
46253
+ case 8:
46254
+ e_1_1 = _e.sent();
46255
+ e_1 = { error: e_1_1 };
46256
+ return [3 /*break*/, 10];
46257
+ case 9:
46258
+ try {
46259
+ if (_c && !_c.done && (_d = _b.return)) _d.call(_b);
46260
+ }
46261
+ finally { if (e_1) throw e_1.error; }
46262
+ return [7 /*endfinally*/];
46263
+ case 10: return [2 /*return*/, modifiedPayload];
46264
+ }
46265
+ });
46266
+ });
46267
+ };
46268
+ ReportsHooksService.prototype.evaluate = function (expr, payload) {
46269
+ try {
46270
+ var context = { criteria: payload };
46271
+ var result = Evaluator.evaluate(expr, context, 'payload');
46272
+ return result !== null && result !== void 0 ? result : payload;
46273
+ }
46274
+ catch (e) {
46275
+ console.error('Error evaluating beforeSubmit string:', e);
46276
+ return payload;
46277
+ }
46278
+ };
46279
+ ReportsHooksService.prototype.registerBeforeSubmitAction = function (name, action) {
46280
+ this.reportsActions.set(name, action);
46281
+ };
46282
+ ReportsHooksService.prototype.unregisterBeforeSubmitAction = function (name) {
46283
+ this.reportsActions.delete(name);
46284
+ };
46285
+ ReportsHooksService.prototype.executeBeforeSubmitAction = function (name, context) {
46286
+ var _a;
46287
+ return __awaiter(this, void 0, void 0, function () {
46288
+ var action, e_2;
46289
+ return __generator(this, function (_b) {
46290
+ switch (_b.label) {
46291
+ case 0:
46292
+ action = this.reportsActions.get(name);
46293
+ if (!action) {
46294
+ console.warn("beforeSubmit action \"" + name + "\" not found");
46295
+ return [2 /*return*/, {
46296
+ request: context.request,
46297
+ data: context.data,
46298
+ }];
46299
+ }
46300
+ _b.label = 1;
46301
+ case 1:
46302
+ _b.trys.push([1, 3, , 4]);
46303
+ return [4 /*yield*/, action(context)];
46304
+ case 2: return [2 /*return*/, ((_a = (_b.sent())) !== null && _a !== void 0 ? _a : {
46305
+ request: context.request,
46306
+ data: context.data,
46307
+ })];
46308
+ case 3:
46309
+ e_2 = _b.sent();
46310
+ console.error("Error executing beforeSubmit action \"" + name + "\"", e_2);
46311
+ return [2 /*return*/, {
46312
+ request: context.request,
46313
+ data: context.data,
46314
+ }];
46315
+ case 4: return [2 /*return*/];
46316
+ }
46317
+ });
46318
+ });
46319
+ };
46320
+ return ReportsHooksService;
46321
+ }());
46322
+ ReportsHooksService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ReportsHooksService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
46323
+ ReportsHooksService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ReportsHooksService, providedIn: 'root' });
46324
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ReportsHooksService, decorators: [{
46325
+ type: i0.Injectable,
46326
+ args: [{
46327
+ providedIn: 'root',
46328
+ }]
46329
+ }] });
46330
+
45901
46331
  var DynamicTimelineReportService = /** @class */ (function () {
45902
- function DynamicTimelineReportService(_ndfReportsService) {
46332
+ function DynamicTimelineReportService(_ndfReportsService, _reportsHooksService) {
45903
46333
  this._ndfReportsService = _ndfReportsService;
46334
+ this._reportsHooksService = _reportsHooksService;
45904
46335
  this._isInitialized = false;
45905
46336
  this.isLoadingResult = false;
45906
46337
  this._selectedGroupSub = new rxjs.BehaviorSubject(null);
@@ -45917,285 +46348,55 @@
45917
46348
  };
45918
46349
  DynamicTimelineReportService.prototype.prepareData = function () {
45919
46350
  var _this = this;
45920
- return rxjs.pipe(operators.tap(function (_d) {
45921
- var _e = __read(_d, 2), config = _e[0], criteria = _e[1];
46351
+ return rxjs.pipe(operators.tap(function (_b) {
46352
+ var _c = __read(_b, 2), config = _c[0], criteria = _c[1];
45922
46353
  var _a;
45923
46354
  if (!_this._selectedGroupSub.getValue()) {
45924
46355
  _this._selectedGroupSub.next(((_a = config === null || config === void 0 ? void 0 : config.group) === null || _a === void 0 ? void 0 : _a.selected) || 'week');
45925
46356
  }
45926
46357
  _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;
46358
+ }), operators.switchMap(function (_b) {
46359
+ var _c = __read(_b, 2), config = _c[0], criteria = _c[1];
46360
+ var _a;
45930
46361
  var request = config === null || config === void 0 ? void 0 : config.request;
45931
46362
  if (!request) {
45932
46363
  return rxjs.of(null);
45933
46364
  }
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({
46365
+ var _request = {
46366
+ request: request,
46367
+ data: _this._ndfReportsService.prepareRequest(request, _this.payload),
46368
+ };
46369
+ var beforeSubmit$ = ((_a = request === null || request === void 0 ? void 0 : request.actions) === null || _a === void 0 ? void 0 : _a.beforeSubmit)
46370
+ ? rxjs.from(_this._reportsHooksService.executeBeforeSubmitAction(request.actions.beforeSubmit, Object.assign({ config: Object.assign(Object.assign({}, config), { request: undefined }), criteria: criteria }, _request)))
46371
+ : rxjs.of(_request);
46372
+ return beforeSubmit$.pipe(operators.switchMap(function (req) { return rxjs.forkJoin({
45951
46373
  config: rxjs.of(config),
45952
- data: data$
45953
- });
46374
+ data: _this._ndfReportsService.getData(req.request, req.data).pipe(operators.catchError(function (error) {
46375
+ console.error(error);
46376
+ return rxjs.of(null);
46377
+ }), operators.finalize(function () { return (_this.isLoadingResult = false); })),
46378
+ }); }));
45954
46379
  }));
45955
46380
  };
45956
46381
  DynamicTimelineReportService.prototype.prepareSelectedGroups = function (config) {
45957
46382
  var _this = this;
45958
46383
  var data = config.datasource.map(function (source) { return ({
45959
46384
  name: source.aggregation,
45960
- interval: _this._selectedGroupSub.getValue()
46385
+ interval: _this._selectedGroupSub.getValue(),
45961
46386
  }); });
45962
46387
  return {
45963
46388
  payload: {
45964
- aggregationNames: data
45965
- }
46389
+ aggregationNames: data,
46390
+ },
45966
46391
  };
45967
46392
  };
45968
46393
  return DynamicTimelineReportService;
45969
46394
  }());
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 });
46395
+ 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
46396
  DynamicTimelineReportService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: DynamicTimelineReportService });
45972
46397
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: DynamicTimelineReportService, decorators: [{
45973
46398
  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 }]; } });
46399
+ }], ctorParameters: function () { return [{ type: NdfReportsService }, { type: ReportsHooksService }]; } });
46199
46400
 
46200
46401
  /**
46201
46402
  * Horizontal Bar Options
@@ -48138,26 +48339,6 @@
48138
48339
  type: i0.Output
48139
48340
  }] } });
48140
48341
 
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
48342
  var slideAnimation = animations.trigger('slideInOut', [
48162
48343
  animations.state('closed', animations.style({
48163
48344
  transform: 'translateX(var(--ndf-reports-details-translateX, -100%))',
@@ -48167,7 +48348,7 @@
48167
48348
  ]);
48168
48349
  var NdfReportsComponent = /** @class */ (function (_super) {
48169
48350
  __extends(NdfReportsComponent, _super);
48170
- function NdfReportsComponent(_translateService, _filtersMapper, _ndfReportsService, _chartHelperService, _transformService, _cdr, _filterQueryService, _stateService, _configurationService, _router, _ngZone) {
48351
+ function NdfReportsComponent(_translateService, _filtersMapper, _ndfReportsService, _chartHelperService, _transformService, _cdr, _filterQueryService, _stateService, _configurationService, _router, _ngZone, _reportsHooksService) {
48171
48352
  var _this = _super.call(this) || this;
48172
48353
  _this._translateService = _translateService;
48173
48354
  _this._filtersMapper = _filtersMapper;
@@ -48180,6 +48361,7 @@
48180
48361
  _this._configurationService = _configurationService;
48181
48362
  _this._router = _router;
48182
48363
  _this._ngZone = _ngZone;
48364
+ _this._reportsHooksService = _reportsHooksService;
48183
48365
  _this._isHeightUpdated = false;
48184
48366
  _this.direction = 'rtl';
48185
48367
  _this.isPanelOpened = false;
@@ -48192,6 +48374,7 @@
48192
48374
  _this.reportConfig$ = _this._configSubject.asObservable();
48193
48375
  _this._filtersCriteriaSubject = new rxjs.BehaviorSubject(null);
48194
48376
  _this.filtersParams$ = _this._filtersCriteriaSubject.asObservable();
48377
+ _this._triggerFiltersSub = new rxjs.BehaviorSubject(true);
48195
48378
  _this._detailsFiltersSubject = new rxjs.BehaviorSubject(null);
48196
48379
  _this.detailsFiltersParams$ = _this._detailsFiltersSubject.asObservable();
48197
48380
  _this._reportDetailsSubject = new rxjs.BehaviorSubject(null);
@@ -48205,6 +48388,12 @@
48205
48388
  _this.trackByFn = function (_, report) {
48206
48389
  return report.id;
48207
48390
  };
48391
+ _this.triggerUpdate = function () {
48392
+ _this._triggerFiltersSub.next(true);
48393
+ };
48394
+ _this.resetFilters = function () {
48395
+ _this._resetQueryAndFiltersCriteria();
48396
+ };
48208
48397
  _this.filterChanged = function (criteria) {
48209
48398
  if (___default["default"].isEqual(_this.activeQuery, criteria)) {
48210
48399
  return;
@@ -48266,6 +48455,12 @@
48266
48455
  this.reportsData$ = this._prepareReports();
48267
48456
  this._handleKeyboardEvent();
48268
48457
  };
48458
+ NdfReportsComponent.prototype.callLoadCondition = function () {
48459
+ if (this.loadCondition && typeof this.loadCondition == 'function') {
48460
+ return this.loadCondition(this.activeQuery);
48461
+ }
48462
+ return true;
48463
+ };
48269
48464
  NdfReportsComponent.prototype.ngOnChanges = function (changes) {
48270
48465
  var _a, _b;
48271
48466
  var reportsKey = (_a = changes.reportsKey) === null || _a === void 0 ? void 0 : _a.currentValue;
@@ -48378,8 +48573,9 @@
48378
48573
  var _this = this;
48379
48574
  this.isLoadingResult = true;
48380
48575
  return rxjs.combineLatest([
48381
- this.filtersParams$.pipe(operators.distinctUntilChanged(function (a, b) { return ___default["default"].isEqual(a, b); })),
48576
+ this.filtersParams$,
48382
48577
  this.reportConfig$,
48578
+ this._triggerFiltersSub,
48383
48579
  ]).pipe(operators.tap(function () {
48384
48580
  _this.isLoadingResult = true;
48385
48581
  _this._cdr.detectChanges();
@@ -48393,7 +48589,7 @@
48393
48589
  if (!criteria && !!config.activeQuery) {
48394
48590
  _payload = _this.prepareCriteriaPayload(config.activeQuery);
48395
48591
  }
48396
- var data$ = _this._ndfReportsService.getData(request, _payload).pipe(operators.switchMap(function (reports) {
48592
+ 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
48593
  return _this._transformService.prepareData(reports, config);
48398
48594
  }), operators.finalize(function () {
48399
48595
  _this.isLoadingResult = false;
@@ -48517,8 +48713,8 @@
48517
48713
  };
48518
48714
  return NdfReportsComponent;
48519
48715
  }(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] });
48716
+ 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 });
48717
+ 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
48718
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NdfReportsComponent, decorators: [{
48523
48719
  type: i0.Component,
48524
48720
  args: [{
@@ -48531,7 +48727,7 @@
48531
48727
  },
48532
48728
  animations: [slideAnimation],
48533
48729
  }]
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: [{
48730
+ }], 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
48731
  type: i0.ViewChild,
48536
48732
  args: [FluidHeightDirective]
48537
48733
  }], jsonEditorEnabled: [{
@@ -48540,6 +48736,8 @@
48540
48736
  type: i0.Input
48541
48737
  }], navigateRoute: [{
48542
48738
  type: i0.Input
48739
+ }], loadCondition: [{
48740
+ type: i0.Input
48543
48741
  }], config: [{
48544
48742
  type: i0.Input
48545
48743
  }], onQueryChange: [{
@@ -48555,6 +48753,26 @@
48555
48753
  args: [EMPTY_CONTENT_TEMPLATE, { read: i0.TemplateRef }]
48556
48754
  }] } });
48557
48755
 
48756
+ var CheckConditionPipe = /** @class */ (function () {
48757
+ function CheckConditionPipe() {
48758
+ }
48759
+ CheckConditionPipe.prototype.transform = function (activeQuery, condition, config) {
48760
+ if (condition) {
48761
+ return Evaluator.evaluate(condition, { activeQuery: activeQuery, config: config }, 'show');
48762
+ }
48763
+ return true;
48764
+ };
48765
+ return CheckConditionPipe;
48766
+ }());
48767
+ CheckConditionPipe.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: CheckConditionPipe, deps: [], target: i0__namespace.ɵɵFactoryTarget.Pipe });
48768
+ CheckConditionPipe.ɵpipe = i0__namespace.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: CheckConditionPipe, name: "checkCondition" });
48769
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: CheckConditionPipe, decorators: [{
48770
+ type: i0.Pipe,
48771
+ args: [{
48772
+ name: 'checkCondition',
48773
+ }]
48774
+ }] });
48775
+
48558
48776
  var CONTAINERS = [NdfReportsComponent, NdfReportComponent];
48559
48777
  var DIRECTIVES = [
48560
48778
  ScrollableDivDirective,
@@ -49014,7 +49232,7 @@
49014
49232
  return ConfigPreviewComponent;
49015
49233
  }());
49016
49234
  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 } });
49235
+ 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
49236
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ConfigPreviewComponent, decorators: [{
49019
49237
  type: i0.Component,
49020
49238
  args: [{
@@ -52375,6 +52593,7 @@
52375
52593
  exports.TableColumnsTogglerComponent = TableColumnsTogglerComponent;
52376
52594
  exports.TableComponent = TableComponent;
52377
52595
  exports.TableExportComponent = TableExportComponent;
52596
+ exports.TableHooksService = TableHooksService;
52378
52597
  exports.TableModule = TableModule;
52379
52598
  exports.TableSkeletonComponent = TableSkeletonComponent;
52380
52599
  exports.TagsApiService = TagsApiService;