nuxeo-development-framework 6.1.5 → 6.1.7

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 +688 -1009
  2. package/bundles/nuxeo-development-framework.umd.js.map +1 -1
  3. package/esm2015/lib/components/ndf-filters/components/__parts/filter-autocomplete-input/filter-autocomplete.service.js +7 -5
  4. package/esm2015/lib/components/ndf-filters/containers/filters-panel/filters-panel.component.js +9 -9
  5. package/esm2015/lib/components/ndf-filters/models/base-field-config.js +1 -1
  6. package/esm2015/lib/components/ndf-filters/pipes/check-condition.pipe.js +9 -4
  7. package/esm2015/lib/components/ndf-filters/pipes/evaluate-label.pipe.js +3 -3
  8. package/esm2015/lib/components/pdf-tron/pdftron/pdftron.component.js +2 -1
  9. package/esm2015/lib/components/pdf-tron/pdftron/silent-pdftron.service.js +2 -1
  10. package/esm2015/lib/components/reports/ndf-reports/models/details.js +1 -1
  11. package/esm2015/lib/components/reports/ndf-reports/models/graph-definition.js +1 -1
  12. package/esm2015/lib/components/reports/ndf-reports/pipes/check-condition.pipe.js +3 -3
  13. package/esm2015/lib/components/reports/ndf-reports/services/report-config-mapper.service.js +28 -15
  14. package/esm2015/lib/components/reports/ndf-reports/services/reports-hooks.service.js +3 -3
  15. package/esm2015/lib/components/tables/dynamic-table/dynamic-table/dynamic-table.component.js +1 -1
  16. package/esm2015/lib/components/tables/dynamic-table/services/table-hooks.service.js +4 -4
  17. package/esm2015/lib/components/tables/ndf-table/models/table-config.js +1 -1
  18. package/esm2015/lib/shared/index.js +5 -6
  19. package/esm2015/lib/shared-services/global-pdftron.service.js +2 -1
  20. package/esm2015/public-api.js +12 -13
  21. package/fesm2015/nuxeo-development-framework.js +644 -938
  22. package/fesm2015/nuxeo-development-framework.js.map +1 -1
  23. package/lib/components/ndf-filters/components/__parts/filter-autocomplete-input/filter-autocomplete.service.d.ts +1 -2
  24. package/lib/components/ndf-filters/containers/filters-panel/filters-panel.component.d.ts +3 -3
  25. package/lib/components/ndf-filters/models/base-field-config.d.ts +1 -1
  26. package/lib/components/ndf-filters/pipes/check-condition.pipe.d.ts +1 -2
  27. package/lib/components/reports/ndf-reports/models/details.d.ts +1 -1
  28. package/lib/components/reports/ndf-reports/models/graph-definition.d.ts +2 -2
  29. package/lib/components/reports/ndf-reports/services/report-config-mapper.service.d.ts +2 -2
  30. package/lib/components/tables/ndf-table/models/table-config.d.ts +1 -1
  31. package/lib/shared/index.d.ts +7 -5
  32. package/package.json +1 -1
  33. package/public-api.d.ts +11 -12
  34. package/esm2015/lib/shared/evaluator/evaluator.js +0 -318
  35. package/esm2015/lib/shared/evaluator/index.js +0 -3
  36. package/esm2015/lib/shared/evaluator/types.js +0 -2
  37. package/lib/shared/evaluator/evaluator.d.ts +0 -79
  38. package/lib/shared/evaluator/index.d.ts +0 -2
  39. package/lib/shared/evaluator/types.d.ts +0 -18
@@ -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('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('string-hash'), require('ngx-mask'), require('moment/moment'), 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', 'string-hash', 'ngx-mask', 'moment/moment', '@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.stringHash, global.i5$4, global.moment$8, 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, stringHash, i5$4, moment$8, 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('@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('ngx-markdown'), require('@kurkle/color'), 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', '@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', 'ngx-markdown', '@kurkle/color', '@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.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.i2$8, global.colorLib, 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, 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, i2$8, colorLib, 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
 
@@ -76,7 +76,6 @@
76
76
  var i1__namespace$b = /*#__PURE__*/_interopNamespace(i1$c);
77
77
  var i7__namespace$3 = /*#__PURE__*/_interopNamespace(i7$3);
78
78
  var i5__namespace$3 = /*#__PURE__*/_interopNamespace(i5$3);
79
- var stringHash__default = /*#__PURE__*/_interopDefaultLegacy(stringHash);
80
79
  var i5__namespace$4 = /*#__PURE__*/_interopNamespace(i5$4);
81
80
  var moment__namespace$1 = /*#__PURE__*/_interopNamespace(moment$8);
82
81
  var i5__namespace$5 = /*#__PURE__*/_interopNamespace(i5$5);
@@ -93,8 +92,8 @@
93
92
  var localeEn__default = /*#__PURE__*/_interopDefaultLegacy(localeEn);
94
93
  var i2__namespace$7 = /*#__PURE__*/_interopNamespace(i2$7);
95
94
  var i7__namespace$4 = /*#__PURE__*/_interopNamespace(i7$4);
96
- var colorLib__default = /*#__PURE__*/_interopDefaultLegacy(colorLib);
97
95
  var i2__namespace$8 = /*#__PURE__*/_interopNamespace(i2$8);
96
+ var colorLib__default = /*#__PURE__*/_interopDefaultLegacy(colorLib);
98
97
  var i6__namespace$4 = /*#__PURE__*/_interopNamespace(i6$4);
99
98
  var _flatMap__default = /*#__PURE__*/_interopDefaultLegacy(_flatMap);
100
99
  var i1__namespace$e = /*#__PURE__*/_interopNamespace(i1$e);
@@ -16321,11 +16320,13 @@
16321
16320
  payload: {
16322
16321
  name: query.field || fieldConfig.fieldKey,
16323
16322
  operator: (_a = query.operator) !== null && _a !== void 0 ? _a : COMPARISON_OPERATOR.like,
16324
- value: (query === null || query === void 0 ? void 0 : query.template) ? this.replacePlaceholder(query === null || query === void 0 ? void 0 : query.template, searchText) : "'%" + searchText + "%'"
16325
- }
16323
+ value: (query === null || query === void 0 ? void 0 : query.template)
16324
+ ? this.replacePlaceholder(query === null || query === void 0 ? void 0 : query.template, searchText)
16325
+ : "'%" + searchText + "%'",
16326
+ },
16326
16327
  }).pipe(operators.map(function (response) { return Object.values(response)[0]; }), operators.switchMap(function (response) { return _this._aggregationService.prepareAggregationFiled({
16327
16328
  fieldConfig: fieldConfig,
16328
- aggregation: response
16329
+ aggregation: response,
16329
16330
  }); }));
16330
16331
  };
16331
16332
  FilterAutocompleteService.prototype.replacePlaceholder = function (template, searchText) {
@@ -16338,7 +16339,7 @@
16338
16339
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: FilterAutocompleteService, decorators: [{
16339
16340
  type: i0.Injectable,
16340
16341
  args: [{
16341
- providedIn: 'root'
16342
+ providedIn: 'root',
16342
16343
  }]
16343
16344
  }], ctorParameters: function () { return [{ type: i0__namespace.Injector }]; } });
16344
16345
 
@@ -16412,348 +16413,6 @@
16412
16413
  }]
16413
16414
  }], ctorParameters: function () { return [{ type: i1__namespace.TranslateService }]; } });
16414
16415
 
16415
- /**
16416
- * Creates a secure context for function evaluation that prevents access to the window object.
16417
- * @returns {Record<string, any>} A secure context object with safe properties.
16418
- */
16419
- function createSecureContext() {
16420
- // Create a secure context with only safe properties
16421
- return {
16422
- // Add any safe globals here that should be accessible
16423
- console: {
16424
- log: console.log,
16425
- warn: console.warn,
16426
- error: console.error
16427
- },
16428
- // Add other safe objects/functions as needed
16429
- Math: Math,
16430
- Date: Date,
16431
- Number: Number,
16432
- String: String,
16433
- Boolean: Boolean,
16434
- Array: Array,
16435
- Object: Object,
16436
- JSON: JSON,
16437
- // Prevent access to window
16438
- window: undefined,
16439
- self: undefined,
16440
- globalThis: undefined,
16441
- _: ___default["default"] // Include lodash if needed, but ensure it's used safely
16442
- };
16443
- }
16444
- /**
16445
- * A utility class for evaluating expressions, interpolating strings, and working with templates.
16446
- * This class provides static methods for dynamic evaluation of code, string interpolation,
16447
- * and template processing with caching capabilities.
16448
- */
16449
- var Evaluator = /** @class */ (function () {
16450
- function Evaluator() {
16451
- }
16452
- /**
16453
- * Creates a function from a string or returns the function if already provided.
16454
- * Uses a secure context to prevent access to the window object by default.
16455
- * @param {string|Function} func - The function or string to convert to a function.
16456
- * @param {...any} params - The parameters to pass to the function.
16457
- * @param {EvaluatorOptions} [options={}] - Optional configuration for the evaluation.
16458
- * @returns {Function} - The resulting function.
16459
- */
16460
- Evaluator.evaluator = function (func) {
16461
- var params = [];
16462
- for (var _i = 1; _i < arguments.length; _i++) {
16463
- params[_i - 1] = arguments[_i];
16464
- }
16465
- // Extract options if the last parameter is an options object
16466
- var options = {};
16467
- if (params.length > 0 &&
16468
- params[params.length - 1] &&
16469
- typeof params[params.length - 1] === 'object' &&
16470
- 'securityMode' in params[params.length - 1]) {
16471
- options = params.pop();
16472
- }
16473
- if (typeof func === 'function') {
16474
- return func;
16475
- }
16476
- if (typeof params[0] === 'object') {
16477
- params = _.keys(params[0]);
16478
- }
16479
- // Check if we should use secure mode (default) or unsafe mode
16480
- var securityMode = options.securityMode || 'secure';
16481
- if (securityMode === 'unsafe') {
16482
- // In unsafe mode, create a function with access to all globals
16483
- return new (Function.bind.apply(Function, __spreadArray(__spreadArray([void 0], __read(params)), [func])))();
16484
- }
16485
- var sandbox = createSecureContext();
16486
- var sandboxKeys = Object.keys(sandbox);
16487
- var sandboxAssignments = sandboxKeys.map(function (key) { return "const " + key + " = sandbox." + key + ";"; }).join('');
16488
- var wrapper = new (Function.bind.apply(Function, __spreadArray(__spreadArray([void 0], __read(params)), ['sandbox', "" + sandboxAssignments + func])))();
16489
- return function () {
16490
- var args = [];
16491
- for (var _i = 0; _i < arguments.length; _i++) {
16492
- args[_i] = arguments[_i];
16493
- }
16494
- return wrapper.apply(void 0, __spreadArray(__spreadArray([], __read(args)), [sandbox]));
16495
- };
16496
- };
16497
- /**
16498
- * Replaces template expressions in a string with values from data.
16499
- * Supports function calls within templates and fallback values using || syntax.
16500
- * By default, ensures evaluation happens in a secure context to prevent access to window object.
16501
- * @param {string} rawTemplate - The template string containing expressions to interpolate.
16502
- * @param {Record<string, any>} data - The data object containing values to use for interpolation.
16503
- * @param {EvaluatorOptions} [options={}] - Optional configuration for the interpolation process.
16504
- * @returns {string} - The interpolated string with all expressions replaced with actual values.
16505
- */
16506
- Evaluator.interpolateString = function (rawTemplate, data, options) {
16507
- if (options === void 0) { options = {}; }
16508
- if (!rawTemplate) {
16509
- return '';
16510
- }
16511
- if (typeof rawTemplate !== 'string') {
16512
- return rawTemplate.toString();
16513
- }
16514
- // Check if we should use secure mode (default) or unsafe mode
16515
- var securityMode = options.securityMode || 'secure';
16516
- // Create a secure data object if needed
16517
- var secureData = securityMode === 'unsafe'
16518
- ? data
16519
- : Object.assign(Object.assign(Object.assign({}, createSecureContext()), data), {
16520
- // Ensure these remain undefined
16521
- window: undefined, self: undefined, globalThis: undefined
16522
- });
16523
- return rawTemplate.replace(/({{\s*(.*?)\s*}})/g, function (match, $1, expression) {
16524
- if (expression.indexOf('(') !== -1) {
16525
- return expression.replace(/([^(]+)\(([^)]+)\s*\);?/, function (_$1, fnName, argsStr) {
16526
- fnName = _.trim(fnName);
16527
- var func = _.get(secureData, fnName);
16528
- if (func) {
16529
- if (argsStr) {
16530
- var args = argsStr.split(',').map(function (arg) {
16531
- var trimmed = _.trim(arg);
16532
- if (/^['"]/.test(trimmed))
16533
- return trimmed.slice(1, -1);
16534
- return _.get(secureData, trimmed);
16535
- });
16536
- return Evaluator.evaluate(func, args, '', false, secureData, options);
16537
- }
16538
- return Evaluator.evaluate(func, [], '', false, secureData, options);
16539
- }
16540
- return '';
16541
- });
16542
- }
16543
- else {
16544
- var dataPath = expression;
16545
- if (expression.indexOf('?') !== -1) {
16546
- dataPath = expression.replace(/\?\./g, '.');
16547
- }
16548
- var parts = dataPath.split('||').map(function (item) { return item.trim(); });
16549
- var value = '';
16550
- var path = '';
16551
- for (var i = 0; i < parts.length; i++) {
16552
- path = parts[i];
16553
- if (___default["default"].has(secureData, path)) {
16554
- value = ___default["default"].get(secureData, path);
16555
- break;
16556
- }
16557
- }
16558
- if (options.data) {
16559
- _.set(options.data, path, value);
16560
- }
16561
- return value;
16562
- }
16563
- });
16564
- };
16565
- /**
16566
- * Performs an evaluation using the evaluation context of this component.
16567
- * By default, ensures evaluation happens in a secure context to prevent access to window object.
16568
- * @param {string|Function|object} func - The function or string to evaluate.
16569
- * @param {object} args - The arguments to pass to the evaluation.
16570
- * @param {string} ret - The name of the variable within the evaluation context to return.
16571
- * @param {boolean} interpolate - Determines if it should replace all {{ }} token references with actual data.
16572
- * @param {object} context - - The evaluation context.
16573
- * @param {EvaluatorOptions } options - The options to pass to the evaluation.
16574
- * @returns {*} - The result of the evaluation.
16575
- */
16576
- Evaluator.evaluate = function (func, args, ret, interpolate, context, options) {
16577
- if (args === void 0) { args = {}; }
16578
- if (ret === void 0) { ret = 'show'; }
16579
- if (interpolate === void 0) { interpolate = false; }
16580
- if (context === void 0) { context = {}; }
16581
- if (options === void 0) { options = {}; }
16582
- var returnVal = null;
16583
- var field = args.field ? args.field : { key: 'unknown' };
16584
- var fieldKey = field.key;
16585
- if (typeof func === 'string') {
16586
- if (ret) {
16587
- func = "var " + ret + ";" + func + ";return " + ret;
16588
- }
16589
- if (interpolate) {
16590
- func = Evaluator.interpolate(func, args, options);
16591
- }
16592
- try {
16593
- // Pass the security mode option to the evaluator
16594
- var evaluatorOptions = { securityMode: options.securityMode || 'secure' };
16595
- func = Evaluator.evaluator(func, args, context, evaluatorOptions);
16596
- args = Array.isArray(args) ? args : _.values(args);
16597
- }
16598
- catch (err) {
16599
- console.warn("An error occured within the custom function for " + fieldKey, err);
16600
- returnVal = null;
16601
- func = false;
16602
- }
16603
- }
16604
- if (typeof func === 'function') {
16605
- try {
16606
- returnVal = Evaluator.execute(func, args, context, options);
16607
- }
16608
- catch (err) {
16609
- returnVal = null;
16610
- console.warn("An error occured within custom function for " + fieldKey, err);
16611
- }
16612
- }
16613
- else if (func) {
16614
- console.warn("Unknown function type for " + fieldKey);
16615
- }
16616
- return returnVal;
16617
- };
16618
- /**
16619
- * Executes a function with provided arguments and context.
16620
- * By default, ensures execution happens in a secure context to prevent access to window object.
16621
- * @param {Function} func - The function to execute.
16622
- * @param {any[]|Record<string, any>} args - The arguments to pass to the function, either as an array or object.
16623
- * @param {Record<string, any>} [context={}] - The context (this) to use when executing the function.
16624
- * @param {EvaluatorOptions} [options={}] - Optional configuration for the execution.
16625
- * @returns {any} - The result of the function execution.
16626
- */
16627
- Evaluator.execute = function (func, args, context, options) {
16628
- if (context === void 0) { context = {}; }
16629
- if (options === void 0) { options = {}; }
16630
- // Check if we should use secure mode (default) or unsafe mode
16631
- var securityMode = options.securityMode || 'secure';
16632
- if (securityMode === 'unsafe') {
16633
- // In unsafe mode, execute with the original context
16634
- return Array.isArray(args) ? func.apply(context, args) : func.call(context, args);
16635
- }
16636
- else {
16637
- // In secure mode, create a secure context by merging the provided context with our secure context
16638
- var secureContext = Object.assign(Object.assign(Object.assign({}, createSecureContext()), context), {
16639
- // Ensure these remain undefined even if they were in the provided context
16640
- window: undefined, self: undefined, globalThis: undefined
16641
- });
16642
- // Execute the function with the secure context
16643
- return Array.isArray(args) ? func.apply(secureContext, args) : func.call(secureContext, args);
16644
- }
16645
- };
16646
- /**
16647
- * Creates a template function from a string with caching for performance.
16648
- * By default, ensures the template function executes in a secure context.
16649
- * @param {string} template - The template string to compile into a function.
16650
- * @param {string} [hash] - Optional hash to use as cache key. If not provided, a hash will be generated from the template.
16651
- * @param {EvaluatorOptions} [options={}] - Optional configuration for the template.
16652
- * @returns {Function|undefined} - The compiled template function, or undefined if compilation fails.
16653
- */
16654
- Evaluator.template = function (template, hash, options) {
16655
- if (options === void 0) { options = {}; }
16656
- hash = hash || stringHash__default["default"](template).toString();
16657
- // If hash contains options object, extract it
16658
- if (typeof hash === 'object' && 'securityMode' in hash) {
16659
- options = hash;
16660
- hash = stringHash__default["default"](template).toString();
16661
- }
16662
- // Check if we have a cached version
16663
- var cacheKey = hash + (options.securityMode || 'secure');
16664
- if (Evaluator.cache[cacheKey]) {
16665
- return Evaluator.cache[cacheKey];
16666
- }
16667
- try {
16668
- template = template.replace(/ctx\./g, '');
16669
- // Create the template function using lodash
16670
- var templateFunc_1 = ___default["default"].template(template, Evaluator.templateSettings);
16671
- // Check if we should use secure mode (default) or unsafe mode
16672
- var securityMode = options.securityMode || 'secure';
16673
- if (securityMode === 'unsafe') {
16674
- // In unsafe mode, return the original template function
16675
- return (Evaluator.cache[cacheKey] = templateFunc_1);
16676
- }
16677
- else {
16678
- // In secure mode, wrap the template function to ensure it runs in a secure context
16679
- var secureTemplateFunc = function (data) {
16680
- // Create a secure context for the template
16681
- var secureData = Object.assign(Object.assign(Object.assign({}, createSecureContext()), data), {
16682
- // Ensure these remain undefined
16683
- window: undefined, self: undefined, globalThis: undefined
16684
- });
16685
- return templateFunc_1(secureData);
16686
- };
16687
- // Cache and return the secure template function
16688
- return (Evaluator.cache[cacheKey] = secureTemplateFunc);
16689
- }
16690
- }
16691
- catch (err) {
16692
- console.warn('Error while processing template', err, template);
16693
- return undefined;
16694
- }
16695
- };
16696
- /**
16697
- * Interpolates a template with data, handling both function templates and string templates.
16698
- * By default, ensures interpolation happens in a secure context to prevent access to window object.
16699
- * @param {string|Function} rawTemplate - The template to interpolate, either as a string or a function.
16700
- * @param {Record<string, any>} data - The data object to use for interpolation.
16701
- * @param {EvaluatorOptions} options - Options for the interpolation process.
16702
- * @returns {string|any} - The result of the interpolation, typically a string but could be any type depending on the template.
16703
- */
16704
- Evaluator.interpolate = function (rawTemplate, data, options) {
16705
- if (options === void 0) { options = {}; }
16706
- if (typeof rawTemplate === 'function') {
16707
- try {
16708
- // If the template is a function, execute it with the data
16709
- // We can't directly secure a provided function, but we can use execute
16710
- // to run it in a secure context if needed
16711
- if (options.securityMode !== 'unsafe') {
16712
- var secureData = Object.assign(Object.assign(Object.assign({}, createSecureContext()), data), { window: undefined, self: undefined, globalThis: undefined });
16713
- return rawTemplate(secureData);
16714
- }
16715
- else {
16716
- return rawTemplate(data);
16717
- }
16718
- }
16719
- catch (err) {
16720
- console.warn('Error interpolating template', err, data);
16721
- return err.message;
16722
- }
16723
- }
16724
- rawTemplate = String(rawTemplate);
16725
- // Pass the security mode option to the template method
16726
- var template = Evaluator.template(rawTemplate, undefined, options);
16727
- if (typeof template === 'function') {
16728
- try {
16729
- return template(data);
16730
- }
16731
- catch (err) {
16732
- console.warn('Error interpolating template', err, rawTemplate, data);
16733
- return err.message;
16734
- }
16735
- }
16736
- return template;
16737
- };
16738
- return Evaluator;
16739
- }());
16740
- /**
16741
- * Cache for storing compiled template functions to improve performance.
16742
- * Keys are string hashes of the template, values are the compiled functions.
16743
- */
16744
- Evaluator.cache = {};
16745
- /**
16746
- * Settings for template processing, defining regex patterns for different template operations.
16747
- * - interpolate: Pattern for variable interpolation ({{ variable }})
16748
- * - evaluate: Pattern for code evaluation ({% code %})
16749
- * - escape: Pattern for HTML escaping ({{{ variable }}})
16750
- */
16751
- Evaluator.templateSettings = {
16752
- interpolate: /{{([\s\S]+?)}}/g,
16753
- evaluate: /\{%([\s\S]+?)%\}/g,
16754
- escape: /\{\{\{([\s\S]+?)\}\}\}/g
16755
- };
16756
-
16757
16416
  var EvaluatorLabelPipe = /** @class */ (function () {
16758
16417
  /**
16759
16418
  *
@@ -16766,7 +16425,7 @@
16766
16425
  return '';
16767
16426
  }
16768
16427
  try {
16769
- var text = Evaluator.interpolate(option.labelTemplate, {
16428
+ var text = formiojs.Utils.interpolate(option.labelTemplate, {
16770
16429
  language: language,
16771
16430
  option: option,
16772
16431
  moment: moment__namespace,
@@ -20847,11 +20506,6 @@
20847
20506
  type: i0.Input
20848
20507
  }] } });
20849
20508
 
20850
- var NDF_EDITOR_TYPE = {
20851
- REPORTS: 'report',
20852
- TABLES: 'table'
20853
- };
20854
-
20855
20509
  var BaseField = /** @class */ (function (_super) {
20856
20510
  __extends(BaseField, _super);
20857
20511
  function BaseField() {
@@ -21246,7 +20900,7 @@
21246
20900
  var _a;
21247
20901
  this.formGroup.patchValue(obj.query, {
21248
20902
  emitEvent: (_a = obj === null || obj === void 0 ? void 0 : obj.emitEvent) !== null && _a !== void 0 ? _a : true,
21249
- onlySelf: obj === null || obj === void 0 ? void 0 : obj.onlySelf
20903
+ onlySelf: obj === null || obj === void 0 ? void 0 : obj.onlySelf,
21250
20904
  });
21251
20905
  };
21252
20906
  FiltersPanelComponent.prototype._prepareFiltersForm = function () {
@@ -21306,12 +20960,12 @@
21306
20960
  var condition = (_a = field.config) === null || _a === void 0 ? void 0 : _a.condition;
21307
20961
  try {
21308
20962
  var isVisible = !condition ||
21309
- Evaluator.evaluate(condition, ___default["default"].cloneDeep({
20963
+ formiojs.Utils.evaluate(condition, ___default["default"].cloneDeep({
21310
20964
  aggregations: _this.aggregations,
21311
20965
  language: _this.currentLang,
21312
20966
  user: _this.nuxeoService.nuxeoClient.user,
21313
- values: _this.formGroup.getRawValue()
21314
- }));
20967
+ values: _this.formGroup.getRawValue(),
20968
+ }), 'show');
21315
20969
  _this.visibleFields[fieldKey] = isVisible;
21316
20970
  if (!isVisible) {
21317
20971
  var control = _this.formGroup.get(fieldKey);
@@ -21337,7 +20991,7 @@
21337
20991
  selector: 'app-filters-panel',
21338
20992
  templateUrl: './filters-panel.component.html',
21339
20993
  styleUrls: ['./filters-panel.component.scss'],
21340
- changeDetection: i0.ChangeDetectionStrategy.OnPush
20994
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
21341
20995
  }]
21342
20996
  }], ctorParameters: function () { return [{ type: i1__namespace.TranslateService }, { type: NuxeoService }]; }, propDecorators: { aggregations: [{
21343
20997
  type: i0.Input
@@ -21449,7 +21103,12 @@
21449
21103
  return true;
21450
21104
  }
21451
21105
  try {
21452
- return Evaluator.evaluate(condition, ___default["default"].cloneDeep({ aggregations: aggregations, language: language, user: this.user, values: filterValues }));
21106
+ return formiojs.Utils.evaluate(condition, ___default["default"].cloneDeep({
21107
+ aggregations: aggregations,
21108
+ language: language,
21109
+ user: this.user,
21110
+ values: filterValues,
21111
+ }), 'show');
21453
21112
  }
21454
21113
  catch (error) {
21455
21114
  console.error({ error: error });
@@ -21463,7 +21122,7 @@
21463
21122
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: CheckConditionPipe$1, decorators: [{
21464
21123
  type: i0.Pipe,
21465
21124
  args: [{
21466
- name: 'checkCondition'
21125
+ name: 'checkCondition',
21467
21126
  }]
21468
21127
  }], ctorParameters: function () { return [{ type: NuxeoService }]; } });
21469
21128
 
@@ -22052,6 +21711,11 @@
22052
21711
  }
22053
21712
  ];
22054
21713
 
21714
+ var NDF_EDITOR_TYPE = {
21715
+ REPORTS: 'report',
21716
+ TABLES: 'table'
21717
+ };
21718
+
22055
21719
  var EMPTY_TEMPLATE = new i0.InjectionToken('EmptyTemplateDirective');
22056
21720
  var EmptyTemplateDirective = /** @class */ (function () {
22057
21721
  function EmptyTemplateDirective(template) {
@@ -22160,7 +21824,7 @@
22160
21824
  TableHooksService.prototype.evaluate = function (expr, payload) {
22161
21825
  try {
22162
21826
  var context = { criteria: payload };
22163
- var result = Evaluator.evaluate(expr, context, 'payload');
21827
+ var result = formiojs.Utils.evaluate(expr, context, 'payload');
22164
21828
  return result !== null && result !== void 0 ? result : payload;
22165
21829
  }
22166
21830
  catch (e) {
@@ -22175,7 +21839,7 @@
22175
21839
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TableHooksService, decorators: [{
22176
21840
  type: i0.Injectable,
22177
21841
  args: [{
22178
- providedIn: 'root'
21842
+ providedIn: 'root',
22179
21843
  }]
22180
21844
  }] });
22181
21845
 
@@ -30121,6 +29785,7 @@
30121
29785
  WebViewer__default["default"]({
30122
29786
  path: this.baseHref + '/assets/pdftrons',
30123
29787
  }, document.getElementById('global-pdftron')).then(function (instance) {
29788
+ instance.CoreControls.disableEmbeddedJavaScript();
30124
29789
  _this.saveOptions = instance.CoreControls.SaveOptions;
30125
29790
  _this.instance = instance;
30126
29791
  });
@@ -38276,6 +37941,210 @@
38276
37941
  }]
38277
37942
  }], ctorParameters: function () { return []; } });
38278
37943
 
37944
+ var NdfTronExtractText = /** @class */ (function (_super) {
37945
+ __extends(NdfTronExtractText, _super);
37946
+ function NdfTronExtractText(pdfTronService, renderer, injector) {
37947
+ var _this = _super.call(this, injector) || this;
37948
+ _this.pdfTronService = pdfTronService;
37949
+ _this.renderer = renderer;
37950
+ _this.injector = injector;
37951
+ _this.listnerAdded = false;
37952
+ _this.detectionRectColor = {
37953
+ R: 255,
37954
+ G: 230,
37955
+ B: 162,
37956
+ A: 1
37957
+ };
37958
+ _this.focusedField = '';
37959
+ _this.focusedFieldPrefix = '';
37960
+ _this.onExtractText = new i0.EventEmitter();
37961
+ _this.extractedText = '';
37962
+ _this.savedCoordinates = [];
37963
+ _this.onAnnotationsChange = function (annotations, action) {
37964
+ var _a;
37965
+ _this.extractedText = '';
37966
+ var _f = (_a = _this.pdfTronService) === null || _a === void 0 ? void 0 : _a.instance, annotManager = _f.annotManager, docViewer = _f.docViewer, Annotations = _f.Annotations;
37967
+ if (action === 'add') {
37968
+ annotations.forEach(function (annot) {
37969
+ var _a;
37970
+ if (annot instanceof ((_a = _this.pdfTronService) === null || _a === void 0 ? void 0 : _a.instance.Annotations.RectangleAnnotation)) {
37971
+ _this.rect = annot.getRect();
37972
+ if (_this.currentPageNum != docViewer.getCurrentPage()) {
37973
+ _this.currentPageNum = docViewer.getCurrentPage();
37974
+ _this.targetPage = _this.pagesZones.pages[_this.currentPageNum - 1];
37975
+ _this.allWords = _this.getAllWordsInThePage();
37976
+ }
37977
+ var pageHeight = _this.targetPage.page_height;
37978
+ var pageWidth = _this.targetPage.page_width;
37979
+ var standardHeight = docViewer.getPageHeight(_this.currentPageNum);
37980
+ var standardWidth = docViewer.getPageWidth(_this.currentPageNum);
37981
+ var widthRatio_1 = pageWidth / standardWidth;
37982
+ var heightRatio_1 = pageHeight / standardHeight;
37983
+ _this.allWords.forEach(function (word) {
37984
+ if (word.coordinates.upper_left.x >= widthRatio_1 * _this.rect.x1 &&
37985
+ word.coordinates.upper_left.y >= heightRatio_1 * _this.rect.y1 &&
37986
+ word.coordinates.bottom_right.x <= widthRatio_1 * _this.rect.x2 &&
37987
+ word.coordinates.bottom_right.y <= heightRatio_1 * _this.rect.y2) {
37988
+ _this.extractedText += word.text + ' ';
37989
+ }
37990
+ });
37991
+ if (_this.extractedText) {
37992
+ _this.onExtractText.emit(_this.extractedText);
37993
+ _this.addFieldNameToRectangle(docViewer, annotManager, Annotations);
37994
+ _this.holdDrawedRectangleCoordinates({
37995
+ width: widthRatio_1,
37996
+ height: heightRatio_1
37997
+ });
37998
+ }
37999
+ }
38000
+ });
38001
+ }
38002
+ };
38003
+ _this.initiateTextDimensions();
38004
+ _this.routerService.events.pipe(operators.takeUntil(_this.destroy$)).subscribe(function (res) {
38005
+ var _a;
38006
+ if (res instanceof i1$3.NavigationStart) {
38007
+ var _f = (_a = _this.pdfTronService) === null || _a === void 0 ? void 0 : _a.instance, annotManager = _f.annotManager, docViewer = _f.docViewer;
38008
+ annotManager.off('annotationChanged', _this.onAnnotationsChange);
38009
+ docViewer.off('documentLoaded', _this.enableAnnotationRectangle);
38010
+ }
38011
+ });
38012
+ return _this;
38013
+ }
38014
+ NdfTronExtractText.prototype.ngOnChanges = function (changes) {
38015
+ if (changes.focusedField || changes.pagesZones) {
38016
+ this.enableAnnotationRectangle();
38017
+ }
38018
+ };
38019
+ NdfTronExtractText.prototype.enableAnnotationRectangle = function () {
38020
+ var _a, _b, _c, _d, _e;
38021
+ if (this.focusedField && ((_a = this.pagesZones.pages) === null || _a === void 0 ? void 0 : _a.length)) {
38022
+ (_c = (_b = this.pdfTronService) === null || _b === void 0 ? void 0 : _b.instance) === null || _c === void 0 ? void 0 : _c.setToolMode('AnnotationCreateRectangle');
38023
+ this.focusedLabelDimensions = this.calculateWidthOfText();
38024
+ }
38025
+ else {
38026
+ (_e = (_d = this.pdfTronService) === null || _d === void 0 ? void 0 : _d.instance) === null || _e === void 0 ? void 0 : _e.setToolMode('TextSelect');
38027
+ this.initiateTextDimensions();
38028
+ }
38029
+ };
38030
+ NdfTronExtractText.prototype.ngAfterViewChecked = function () {
38031
+ var _a, _b;
38032
+ if (((_a = this.pdfTronService) === null || _a === void 0 ? void 0 : _a.instance) && !this.listnerAdded && this.pagesZones) {
38033
+ this.listnerAdded = true;
38034
+ var _f = (_b = this.pdfTronService) === null || _b === void 0 ? void 0 : _b.instance, annotManager = _f.annotManager, docViewer = _f.docViewer;
38035
+ docViewer.on('documentLoaded', this.enableAnnotationRectangle);
38036
+ this.setColorOfRectangle(docViewer);
38037
+ annotManager.on('annotationChanged', this.onAnnotationsChange);
38038
+ }
38039
+ };
38040
+ NdfTronExtractText.prototype.setColorOfRectangle = function (docViewer) {
38041
+ var rectangleTool = docViewer.getTool('AnnotationCreateRectangle');
38042
+ rectangleTool.defaults = {
38043
+ StrokeColor: this.detectionRectColor,
38044
+ FillColor: this.detectionRectColor,
38045
+ StrokeThickness: 2,
38046
+ Opacity: 0.4
38047
+ };
38048
+ };
38049
+ NdfTronExtractText.prototype.addFieldNameToRectangle = function (docViewer, annotManager, Annotations) {
38050
+ var _f = this.rect, x1 = _f.x1, x2 = _f.x2, y1 = _f.y1, y2 = _f.y2;
38051
+ if (this.focusedField) {
38052
+ var textAnnot = new Annotations.FreeTextAnnotation();
38053
+ textAnnot.PageNumber = docViewer.getCurrentPage();
38054
+ var rectWidth = x2 - x1;
38055
+ var rectHeight = y2 - y1;
38056
+ if (this.focusedLabelDimensions.width > rectWidth || this.focusedLabelDimensions.height > rectHeight) {
38057
+ textAnnot.X = x1;
38058
+ textAnnot.Y = y1 - 15;
38059
+ }
38060
+ else {
38061
+ textAnnot.X = x1 + rectWidth / 2 - this.focusedLabelDimensions.width / 2;
38062
+ textAnnot.Y = y1 + rectHeight / 2 - this.focusedLabelDimensions.height / 2;
38063
+ }
38064
+ textAnnot.Width = this.focusedLabelDimensions.width;
38065
+ textAnnot.Height = this.focusedLabelDimensions.height;
38066
+ textAnnot.FontSize = '24px';
38067
+ textAnnot.setPadding(new Annotations.Rect(0, 0, 0, 0));
38068
+ textAnnot.TextColor = new Annotations.Color(83, 70, 199);
38069
+ textAnnot.setContents(this.translatedLabel);
38070
+ textAnnot.StrokeThickness = 0;
38071
+ annotManager.addAnnotation(textAnnot);
38072
+ annotManager.redrawAnnotation(textAnnot);
38073
+ }
38074
+ };
38075
+ NdfTronExtractText.prototype.holdDrawedRectangleCoordinates = function (ratio) {
38076
+ var _this = this;
38077
+ var _windowCoordinates = {
38078
+ x1: ratio.width * this.rect.x1,
38079
+ x2: ratio.width * this.rect.x2,
38080
+ y1: ratio.height * this.rect.y1,
38081
+ y2: ratio.height * this.rect.y2
38082
+ };
38083
+ var index = this.savedCoordinates.findIndex(function (elem) { return elem.fieldName === _this.focusedField; });
38084
+ if (index > -1) {
38085
+ this.savedCoordinates[index].coordinates.push({
38086
+ pdfTronCoordinate: this.rect,
38087
+ windowCoordinate: _windowCoordinates
38088
+ });
38089
+ }
38090
+ else {
38091
+ this.savedCoordinates.push({
38092
+ fieldName: this.focusedField,
38093
+ coordinates: [
38094
+ {
38095
+ pdfTronCoordinate: this.rect,
38096
+ windowCoordinate: _windowCoordinates
38097
+ }
38098
+ ]
38099
+ });
38100
+ }
38101
+ };
38102
+ NdfTronExtractText.prototype.getAllWordsInThePage = function () {
38103
+ return _.flatMap(this.targetPage.zones, function (zone) { return _.flatMap(zone.paragraphs, function (paragraph) { return _.flatMap(paragraph.lines, function (line) { return _.map(line.words); }); }); });
38104
+ };
38105
+ NdfTronExtractText.prototype.initiateTextDimensions = function () {
38106
+ this.focusedLabelDimensions = { width: 0, height: 0 };
38107
+ };
38108
+ NdfTronExtractText.prototype.calculateWidthOfText = function () {
38109
+ var span = this.renderer.createElement('span');
38110
+ var textNode = this.renderer.createText(this.translatedLabel);
38111
+ this.renderer.appendChild(span, textNode);
38112
+ this.renderer.setStyle(span, 'font-size', '24px');
38113
+ this.renderer.setStyle(span, 'visibility', 'hidden');
38114
+ this.renderer.setStyle(span, 'position', 'absolute');
38115
+ this.renderer.appendChild(document.body, span);
38116
+ var dimensions = { width: span.clientWidth, height: span.clientHeight };
38117
+ this.renderer.removeChild(document.body, span);
38118
+ return dimensions;
38119
+ };
38120
+ Object.defineProperty(NdfTronExtractText.prototype, "translatedLabel", {
38121
+ get: function () {
38122
+ return this.translateService.instant(this.focusedFieldPrefix + this.focusedField);
38123
+ },
38124
+ enumerable: false,
38125
+ configurable: true
38126
+ });
38127
+ return NdfTronExtractText;
38128
+ }(BaseComponent));
38129
+ NdfTronExtractText.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NdfTronExtractText, deps: [{ token: PdftronService }, { token: i0__namespace.Renderer2 }, { token: i0__namespace.Injector }], target: i0__namespace.ɵɵFactoryTarget.Directive });
38130
+ NdfTronExtractText.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: NdfTronExtractText, selector: "[ndfTronExtractText]", inputs: { pagesZones: "pagesZones", detectionRectColor: "detectionRectColor", focusedField: "focusedField", focusedFieldPrefix: "focusedFieldPrefix" }, outputs: { onExtractText: "onExtractText" }, usesInheritance: true, usesOnChanges: true, ngImport: i0__namespace });
38131
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NdfTronExtractText, decorators: [{
38132
+ type: i0.Directive,
38133
+ args: [{
38134
+ selector: '[ndfTronExtractText]'
38135
+ }]
38136
+ }], ctorParameters: function () { return [{ type: PdftronService }, { type: i0__namespace.Renderer2 }, { type: i0__namespace.Injector }]; }, propDecorators: { pagesZones: [{
38137
+ type: i0.Input
38138
+ }], detectionRectColor: [{
38139
+ type: i0.Input
38140
+ }], focusedField: [{
38141
+ type: i0.Input
38142
+ }], focusedFieldPrefix: [{
38143
+ type: i0.Input
38144
+ }], onExtractText: [{
38145
+ type: i0.Output
38146
+ }] } });
38147
+
38279
38148
  var _SilentPdfTronService_instances, _SilentPdfTronService_webViewerInstance, _SilentPdfTronService_webViewerElement, _SilentPdfTronService_isInitialized, _SilentPdfTronService_initializationPromise, _SilentPdfTronService_isArabic, _SilentPdfTronService_isEnabled, _SilentPdfTronService_initializeWebViewer;
38280
38149
  var SilentPdfTronService = /** @class */ (function () {
38281
38150
  function SilentPdfTronService(baseHref, translationService, environment, nuxeo) {
@@ -38346,6 +38215,7 @@
38346
38215
  disabledElements: ['downloadButton', 'printButton']
38347
38216
  }, __classPrivateFieldGet(this, _SilentPdfTronService_webViewerElement, "f"))
38348
38217
  .then(function (instance) {
38218
+ instance.CoreControls.disableEmbeddedJavaScript();
38349
38219
  __classPrivateFieldSet(_this, _SilentPdfTronService_webViewerInstance, instance, "f");
38350
38220
  __classPrivateFieldSet(_this, _SilentPdfTronService_isInitialized, true, "f");
38351
38221
  })
@@ -39124,6 +38994,7 @@
39124
38994
  });
39125
38995
  }, _PdftronComponent_afterLoadWebViewer = function _PdftronComponent_afterLoadWebViewer(instance) {
39126
38996
  var _a, _b;
38997
+ instance.CoreControls.disableEmbeddedJavaScript();
39127
38998
  this.isArabic ? instance.setLanguage('ar') : instance.setLanguage('en');
39128
38999
  this.pdftronService.instance = this.webViewerInstance = instance;
39129
39000
  if (this.correspondance.facets.indexOf('ctocr') > -1 && ((_b = (_a = this.correspondance) === null || _a === void 0 ? void 0 : _a.properties) === null || _b === void 0 ? void 0 : _b['ctocr:recognizedJson'])) {
@@ -39252,210 +39123,6 @@
39252
39123
  type: i0.Output
39253
39124
  }] } });
39254
39125
 
39255
- var NdfTronExtractText = /** @class */ (function (_super) {
39256
- __extends(NdfTronExtractText, _super);
39257
- function NdfTronExtractText(pdfTronService, renderer, injector) {
39258
- var _this = _super.call(this, injector) || this;
39259
- _this.pdfTronService = pdfTronService;
39260
- _this.renderer = renderer;
39261
- _this.injector = injector;
39262
- _this.listnerAdded = false;
39263
- _this.detectionRectColor = {
39264
- R: 255,
39265
- G: 230,
39266
- B: 162,
39267
- A: 1
39268
- };
39269
- _this.focusedField = '';
39270
- _this.focusedFieldPrefix = '';
39271
- _this.onExtractText = new i0.EventEmitter();
39272
- _this.extractedText = '';
39273
- _this.savedCoordinates = [];
39274
- _this.onAnnotationsChange = function (annotations, action) {
39275
- var _a;
39276
- _this.extractedText = '';
39277
- var _f = (_a = _this.pdfTronService) === null || _a === void 0 ? void 0 : _a.instance, annotManager = _f.annotManager, docViewer = _f.docViewer, Annotations = _f.Annotations;
39278
- if (action === 'add') {
39279
- annotations.forEach(function (annot) {
39280
- var _a;
39281
- if (annot instanceof ((_a = _this.pdfTronService) === null || _a === void 0 ? void 0 : _a.instance.Annotations.RectangleAnnotation)) {
39282
- _this.rect = annot.getRect();
39283
- if (_this.currentPageNum != docViewer.getCurrentPage()) {
39284
- _this.currentPageNum = docViewer.getCurrentPage();
39285
- _this.targetPage = _this.pagesZones.pages[_this.currentPageNum - 1];
39286
- _this.allWords = _this.getAllWordsInThePage();
39287
- }
39288
- var pageHeight = _this.targetPage.page_height;
39289
- var pageWidth = _this.targetPage.page_width;
39290
- var standardHeight = docViewer.getPageHeight(_this.currentPageNum);
39291
- var standardWidth = docViewer.getPageWidth(_this.currentPageNum);
39292
- var widthRatio_1 = pageWidth / standardWidth;
39293
- var heightRatio_1 = pageHeight / standardHeight;
39294
- _this.allWords.forEach(function (word) {
39295
- if (word.coordinates.upper_left.x >= widthRatio_1 * _this.rect.x1 &&
39296
- word.coordinates.upper_left.y >= heightRatio_1 * _this.rect.y1 &&
39297
- word.coordinates.bottom_right.x <= widthRatio_1 * _this.rect.x2 &&
39298
- word.coordinates.bottom_right.y <= heightRatio_1 * _this.rect.y2) {
39299
- _this.extractedText += word.text + ' ';
39300
- }
39301
- });
39302
- if (_this.extractedText) {
39303
- _this.onExtractText.emit(_this.extractedText);
39304
- _this.addFieldNameToRectangle(docViewer, annotManager, Annotations);
39305
- _this.holdDrawedRectangleCoordinates({
39306
- width: widthRatio_1,
39307
- height: heightRatio_1
39308
- });
39309
- }
39310
- }
39311
- });
39312
- }
39313
- };
39314
- _this.initiateTextDimensions();
39315
- _this.routerService.events.pipe(operators.takeUntil(_this.destroy$)).subscribe(function (res) {
39316
- var _a;
39317
- if (res instanceof i1$3.NavigationStart) {
39318
- var _f = (_a = _this.pdfTronService) === null || _a === void 0 ? void 0 : _a.instance, annotManager = _f.annotManager, docViewer = _f.docViewer;
39319
- annotManager.off('annotationChanged', _this.onAnnotationsChange);
39320
- docViewer.off('documentLoaded', _this.enableAnnotationRectangle);
39321
- }
39322
- });
39323
- return _this;
39324
- }
39325
- NdfTronExtractText.prototype.ngOnChanges = function (changes) {
39326
- if (changes.focusedField || changes.pagesZones) {
39327
- this.enableAnnotationRectangle();
39328
- }
39329
- };
39330
- NdfTronExtractText.prototype.enableAnnotationRectangle = function () {
39331
- var _a, _b, _c, _d, _e;
39332
- if (this.focusedField && ((_a = this.pagesZones.pages) === null || _a === void 0 ? void 0 : _a.length)) {
39333
- (_c = (_b = this.pdfTronService) === null || _b === void 0 ? void 0 : _b.instance) === null || _c === void 0 ? void 0 : _c.setToolMode('AnnotationCreateRectangle');
39334
- this.focusedLabelDimensions = this.calculateWidthOfText();
39335
- }
39336
- else {
39337
- (_e = (_d = this.pdfTronService) === null || _d === void 0 ? void 0 : _d.instance) === null || _e === void 0 ? void 0 : _e.setToolMode('TextSelect');
39338
- this.initiateTextDimensions();
39339
- }
39340
- };
39341
- NdfTronExtractText.prototype.ngAfterViewChecked = function () {
39342
- var _a, _b;
39343
- if (((_a = this.pdfTronService) === null || _a === void 0 ? void 0 : _a.instance) && !this.listnerAdded && this.pagesZones) {
39344
- this.listnerAdded = true;
39345
- var _f = (_b = this.pdfTronService) === null || _b === void 0 ? void 0 : _b.instance, annotManager = _f.annotManager, docViewer = _f.docViewer;
39346
- docViewer.on('documentLoaded', this.enableAnnotationRectangle);
39347
- this.setColorOfRectangle(docViewer);
39348
- annotManager.on('annotationChanged', this.onAnnotationsChange);
39349
- }
39350
- };
39351
- NdfTronExtractText.prototype.setColorOfRectangle = function (docViewer) {
39352
- var rectangleTool = docViewer.getTool('AnnotationCreateRectangle');
39353
- rectangleTool.defaults = {
39354
- StrokeColor: this.detectionRectColor,
39355
- FillColor: this.detectionRectColor,
39356
- StrokeThickness: 2,
39357
- Opacity: 0.4
39358
- };
39359
- };
39360
- NdfTronExtractText.prototype.addFieldNameToRectangle = function (docViewer, annotManager, Annotations) {
39361
- var _f = this.rect, x1 = _f.x1, x2 = _f.x2, y1 = _f.y1, y2 = _f.y2;
39362
- if (this.focusedField) {
39363
- var textAnnot = new Annotations.FreeTextAnnotation();
39364
- textAnnot.PageNumber = docViewer.getCurrentPage();
39365
- var rectWidth = x2 - x1;
39366
- var rectHeight = y2 - y1;
39367
- if (this.focusedLabelDimensions.width > rectWidth || this.focusedLabelDimensions.height > rectHeight) {
39368
- textAnnot.X = x1;
39369
- textAnnot.Y = y1 - 15;
39370
- }
39371
- else {
39372
- textAnnot.X = x1 + rectWidth / 2 - this.focusedLabelDimensions.width / 2;
39373
- textAnnot.Y = y1 + rectHeight / 2 - this.focusedLabelDimensions.height / 2;
39374
- }
39375
- textAnnot.Width = this.focusedLabelDimensions.width;
39376
- textAnnot.Height = this.focusedLabelDimensions.height;
39377
- textAnnot.FontSize = '24px';
39378
- textAnnot.setPadding(new Annotations.Rect(0, 0, 0, 0));
39379
- textAnnot.TextColor = new Annotations.Color(83, 70, 199);
39380
- textAnnot.setContents(this.translatedLabel);
39381
- textAnnot.StrokeThickness = 0;
39382
- annotManager.addAnnotation(textAnnot);
39383
- annotManager.redrawAnnotation(textAnnot);
39384
- }
39385
- };
39386
- NdfTronExtractText.prototype.holdDrawedRectangleCoordinates = function (ratio) {
39387
- var _this = this;
39388
- var _windowCoordinates = {
39389
- x1: ratio.width * this.rect.x1,
39390
- x2: ratio.width * this.rect.x2,
39391
- y1: ratio.height * this.rect.y1,
39392
- y2: ratio.height * this.rect.y2
39393
- };
39394
- var index = this.savedCoordinates.findIndex(function (elem) { return elem.fieldName === _this.focusedField; });
39395
- if (index > -1) {
39396
- this.savedCoordinates[index].coordinates.push({
39397
- pdfTronCoordinate: this.rect,
39398
- windowCoordinate: _windowCoordinates
39399
- });
39400
- }
39401
- else {
39402
- this.savedCoordinates.push({
39403
- fieldName: this.focusedField,
39404
- coordinates: [
39405
- {
39406
- pdfTronCoordinate: this.rect,
39407
- windowCoordinate: _windowCoordinates
39408
- }
39409
- ]
39410
- });
39411
- }
39412
- };
39413
- NdfTronExtractText.prototype.getAllWordsInThePage = function () {
39414
- return _.flatMap(this.targetPage.zones, function (zone) { return _.flatMap(zone.paragraphs, function (paragraph) { return _.flatMap(paragraph.lines, function (line) { return _.map(line.words); }); }); });
39415
- };
39416
- NdfTronExtractText.prototype.initiateTextDimensions = function () {
39417
- this.focusedLabelDimensions = { width: 0, height: 0 };
39418
- };
39419
- NdfTronExtractText.prototype.calculateWidthOfText = function () {
39420
- var span = this.renderer.createElement('span');
39421
- var textNode = this.renderer.createText(this.translatedLabel);
39422
- this.renderer.appendChild(span, textNode);
39423
- this.renderer.setStyle(span, 'font-size', '24px');
39424
- this.renderer.setStyle(span, 'visibility', 'hidden');
39425
- this.renderer.setStyle(span, 'position', 'absolute');
39426
- this.renderer.appendChild(document.body, span);
39427
- var dimensions = { width: span.clientWidth, height: span.clientHeight };
39428
- this.renderer.removeChild(document.body, span);
39429
- return dimensions;
39430
- };
39431
- Object.defineProperty(NdfTronExtractText.prototype, "translatedLabel", {
39432
- get: function () {
39433
- return this.translateService.instant(this.focusedFieldPrefix + this.focusedField);
39434
- },
39435
- enumerable: false,
39436
- configurable: true
39437
- });
39438
- return NdfTronExtractText;
39439
- }(BaseComponent));
39440
- NdfTronExtractText.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NdfTronExtractText, deps: [{ token: PdftronService }, { token: i0__namespace.Renderer2 }, { token: i0__namespace.Injector }], target: i0__namespace.ɵɵFactoryTarget.Directive });
39441
- NdfTronExtractText.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: NdfTronExtractText, selector: "[ndfTronExtractText]", inputs: { pagesZones: "pagesZones", detectionRectColor: "detectionRectColor", focusedField: "focusedField", focusedFieldPrefix: "focusedFieldPrefix" }, outputs: { onExtractText: "onExtractText" }, usesInheritance: true, usesOnChanges: true, ngImport: i0__namespace });
39442
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NdfTronExtractText, decorators: [{
39443
- type: i0.Directive,
39444
- args: [{
39445
- selector: '[ndfTronExtractText]'
39446
- }]
39447
- }], ctorParameters: function () { return [{ type: PdftronService }, { type: i0__namespace.Renderer2 }, { type: i0__namespace.Injector }]; }, propDecorators: { pagesZones: [{
39448
- type: i0.Input
39449
- }], detectionRectColor: [{
39450
- type: i0.Input
39451
- }], focusedField: [{
39452
- type: i0.Input
39453
- }], focusedFieldPrefix: [{
39454
- type: i0.Input
39455
- }], onExtractText: [{
39456
- type: i0.Output
39457
- }] } });
39458
-
39459
39126
  var PdfTronModule = /** @class */ (function () {
39460
39127
  function PdfTronModule() {
39461
39128
  }
@@ -44050,220 +43717,255 @@
44050
43717
  type: i0.Injectable
44051
43718
  }] });
44052
43719
 
44053
- var NdfPanelComponent = /** @class */ (function () {
44054
- function NdfPanelComponent() {
44055
- this.maxBodyHeight = 'auto';
43720
+ var DataAccessService = /** @class */ (function (_super) {
43721
+ __extends(DataAccessService, _super);
43722
+ function DataAccessService(injector) {
43723
+ return _super.call(this, injector) || this;
44056
43724
  }
44057
- return NdfPanelComponent;
44058
- }());
44059
- NdfPanelComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NdfPanelComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
44060
- NdfPanelComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: NdfPanelComponent, selector: "ndf-panel", inputs: { maxBodyHeight: "maxBodyHeight" }, queries: [{ propertyName: "panelHeader", first: true, predicate: ["panelHeader"], descendants: true, read: i0.TemplateRef }, { propertyName: "panelBody", first: true, predicate: ["panelBody"], descendants: true, read: i0.TemplateRef }, { propertyName: "panelFooter", first: true, predicate: ["panelFooter"], descendants: true, read: i0.TemplateRef }], ngImport: i0__namespace, template: "<div class=\"scroll-panel\">\r\n\t<div class=\"header\">\r\n\t\t<ng-container [ngTemplateOutlet]=\"panelHeader\"></ng-container>\r\n\t</div>\r\n\r\n\t<div class=\"body\" [style.maxHeight]=\"maxBodyHeight\">\r\n\t\t<ng-container [ngTemplateOutlet]=\"panelBody\"></ng-container>\r\n\t</div>\r\n\r\n\t<div class=\"footer\">\r\n\t\t<ng-container [ngTemplateOutlet]=\"panelFooter\"></ng-container>\r\n\t</div>\r\n</div>\r\n", styles: [".scroll-panel{display:var(--ndf-panel-display, flex);flex-direction:var(--ndf-panel-flex-direction, column);height:var(--ndf-panel-height, calc(100dvh - 65px));border:1px solid var(--ndf-panel-main-border)}.header{flex:var(--ndf-panel-header-flex, 0 0 auto);color:var(--ndf-panel-color, #3b3b3c);background-color:var(--ndf-panel-bg, #f6f9f5);border-bottom:1px solid var(--ndf-panel-border-color, #e7e7e7)}.footer{border-top:1px solid var(--ndf-panel-border-color, #e7e7e7)}.body{flex:var(--ndf-panel-body-flex, 1 1 auto);overflow-y:var(--ndf-panel-body-overflow-y, auto);min-height:var(--ndf-panel-body-min-height, 0)}\n"], directives: [{ type: i4__namespace$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
44061
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NdfPanelComponent, decorators: [{
44062
- type: i0.Component,
43725
+ DataAccessService.prototype.saveData = function (payload) {
43726
+ return this.customAutomation({
43727
+ operation: 'AC_UA_Create_UI_Configuration',
43728
+ context: payload
43729
+ });
43730
+ };
43731
+ return DataAccessService;
43732
+ }(BaseEditorConfigService));
43733
+ DataAccessService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: DataAccessService, deps: [{ token: i0__namespace.Injector }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
43734
+ DataAccessService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: DataAccessService, providedIn: 'root' });
43735
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: DataAccessService, decorators: [{
43736
+ type: i0.Injectable,
44063
43737
  args: [{
44064
- selector: 'ndf-panel',
44065
- templateUrl: './ndf-panel.component.html',
44066
- styleUrls: ['./ndf-panel.component.scss'],
44067
- changeDetection: i0.ChangeDetectionStrategy.OnPush
43738
+ providedIn: 'root'
44068
43739
  }]
44069
- }], propDecorators: { maxBodyHeight: [{
44070
- type: i0.Input
44071
- }], panelHeader: [{
44072
- type: i0.ContentChild,
44073
- args: ['panelHeader', { read: i0.TemplateRef }]
44074
- }], panelBody: [{
44075
- type: i0.ContentChild,
44076
- args: ['panelBody', { read: i0.TemplateRef }]
44077
- }], panelFooter: [{
44078
- type: i0.ContentChild,
44079
- args: ['panelFooter', { read: i0.TemplateRef }]
44080
- }] } });
43740
+ }], ctorParameters: function () { return [{ type: i0__namespace.Injector }]; } });
44081
43741
 
44082
- var NdfPanelModule = /** @class */ (function () {
44083
- function NdfPanelModule() {
44084
- }
44085
- return NdfPanelModule;
44086
- }());
44087
- NdfPanelModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NdfPanelModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
44088
- NdfPanelModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NdfPanelModule, declarations: [NdfPanelComponent], imports: [i4.CommonModule], exports: [NdfPanelComponent] });
44089
- NdfPanelModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NdfPanelModule, imports: [[i4.CommonModule]] });
44090
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NdfPanelModule, decorators: [{
44091
- type: i0.NgModule,
44092
- args: [{
44093
- declarations: [NdfPanelComponent],
44094
- imports: [i4.CommonModule],
44095
- exports: [NdfPanelComponent]
44096
- }]
44097
- }] });
43742
+ var METADATA_EDITOR_OPTIONS = new i0.InjectionToken('METADATA_EDITOR_CONFIG');
44098
43743
 
44099
- var NdfTabsComponent = /** @class */ (function (_super) {
44100
- __extends(NdfTabsComponent, _super);
44101
- function NdfTabsComponent(injector, evaluatorsService) {
44102
- var _this = _super.call(this, injector) || this;
44103
- _this.evaluatorsService = evaluatorsService;
44104
- _this.isAllowdTabFn = function (_) { return true; };
44105
- _this._showHeader = true;
44106
- _this.activeTabEmitter = new i0.EventEmitter();
44107
- _this.checkingPermission = false;
44108
- return _this;
43744
+ var DataStoreService = /** @class */ (function () {
43745
+ function DataStoreService(dataAccessService, environment, options) {
43746
+ this.dataAccessService = dataAccessService;
43747
+ this.environment = environment;
43748
+ this.options = options;
43749
+ this._editorTypeSubject = new rxjs.BehaviorSubject(NDF_EDITOR_TYPE.TABLES);
43750
+ this.editorType$ = this._editorTypeSubject.asObservable();
43751
+ this._editorModeSubject = new rxjs.BehaviorSubject(CONFIG_EDITOR_MODE.EDIT);
43752
+ this.editorMode$ = this._editorModeSubject.asObservable();
43753
+ this._dataSubject = new rxjs.BehaviorSubject('{\n"key": "value"\n}');
43754
+ this.editorData$ = this._dataSubject.asObservable();
43755
+ this.previewData$ = this._dataSubject.asObservable().pipe(operators.map(function (result) { return JSON.parse(result); }));
44109
43756
  }
44110
- Object.defineProperty(NdfTabsComponent.prototype, "showHeader", {
43757
+ Object.defineProperty(DataStoreService.prototype, "editorMode", {
44111
43758
  get: function () {
44112
- return this._showHeader;
44113
- },
44114
- set: function (value) {
44115
- this._showHeader = value;
43759
+ return this._editorModeSubject.getValue();
44116
43760
  },
44117
43761
  enumerable: false,
44118
43762
  configurable: true
44119
43763
  });
44120
- NdfTabsComponent.prototype.ngOnInit = function () {
44121
- this.checkTabsPermissions();
44122
- };
44123
- NdfTabsComponent.prototype.checkTabsPermissions = function () {
44124
- var _this = this;
44125
- this.checkingPermission = true;
44126
- var permissionCalls = [];
44127
- var createPermissionCall = function (id, permission, secondaryTab) {
44128
- if (secondaryTab === void 0) { secondaryTab = false; }
44129
- if (permission) {
44130
- return rxjs.from(_this.evaluatorsService.evaluateRule(permission)).pipe(operators.map(function (res) { return ({ id: id, enabled: res, secondaryTab: secondaryTab }); }));
44131
- }
44132
- return rxjs.of({ id: id, enabled: true, secondaryTab: secondaryTab });
44133
- };
44134
- this.tabs.forEach(function (tab) {
44135
- var _a;
44136
- permissionCalls.push(createPermissionCall(tab.id, tab.permission));
44137
- (_a = tab.secondary_tabs) === null || _a === void 0 ? void 0 : _a.forEach(function (subTab) {
44138
- permissionCalls.push(createPermissionCall(subTab.id, subTab.permission, true));
44139
- });
44140
- });
44141
- rxjs.forkJoin(permissionCalls)
44142
- .pipe(operators.takeUntil(this.destroy$), operators.tap(function (results) {
44143
- var secondaryTabsPerms = results.filter(function (r) { return r.secondaryTab; });
44144
- var primaryTabsPerms = results.filter(function (r) { return !r.secondaryTab; });
44145
- var filteredTabs = _.cloneDeep(_this.tabs);
44146
- filteredTabs = filteredTabs
44147
- .filter(function (tab) { return primaryTabsPerms.some(function (p) { return p.id === tab.id && p.enabled; }); })
44148
- .map(function (tab) {
44149
- var _a;
44150
- if ((_a = tab.secondary_tabs) === null || _a === void 0 ? void 0 : _a.length) {
44151
- tab.secondary_tabs = tab.secondary_tabs.filter(function (sub) { return secondaryTabsPerms.some(function (p) { return p.id === sub.id && p.enabled; }); });
44152
- }
44153
- return tab;
44154
- });
44155
- _this.tabs = filteredTabs;
44156
- }))
44157
- .subscribe(function () {
44158
- if (_this.tabs.length && !_this.activeTab) {
44159
- _this.activateTab(_this.tabs[0]);
44160
- }
44161
- _this.checkingPermission = false;
44162
- });
44163
- };
44164
- Object.defineProperty(NdfTabsComponent.prototype, "activatedTabId", {
43764
+ Object.defineProperty(DataStoreService.prototype, "type", {
44165
43765
  get: function () {
44166
- var _a, _b, _c;
44167
- return (_a = this.activeTab) !== null && _a !== void 0 ? _a : (_c = (_b = this.tabs) === null || _b === void 0 ? void 0 : _b[0]) === null || _c === void 0 ? void 0 : _c.id;
43766
+ return this._editorTypeSubject.getValue();
44168
43767
  },
44169
43768
  enumerable: false,
44170
43769
  configurable: true
44171
43770
  });
44172
- Object.defineProperty(NdfTabsComponent.prototype, "activatedTab", {
43771
+ Object.defineProperty(DataStoreService.prototype, "editorData", {
44173
43772
  get: function () {
44174
- var _this = this;
44175
- return this.tabs.find(function (_d) {
44176
- var id = _d.id;
44177
- return id === _this.activatedTabId;
44178
- });
43773
+ return this._dataSubject.getValue();
44179
43774
  },
44180
43775
  enumerable: false,
44181
43776
  configurable: true
44182
43777
  });
44183
- NdfTabsComponent.prototype.activateTab = function (tab) {
44184
- this.activeTab = tab.id;
44185
- this.activeTabEmitter.emit(tab);
43778
+ DataStoreService.prototype.changeMode = function (mode) {
43779
+ this._editorModeSubject.next(mode);
44186
43780
  };
44187
- NdfTabsComponent.prototype.ngOnDestroy = function () {
44188
- this.destroy$.next();
44189
- this.destroy$.complete();
43781
+ DataStoreService.prototype.changeEditorType = function (type) {
43782
+ this._editorTypeSubject.next(type);
44190
43783
  };
44191
- NdfTabsComponent.prototype.isEnabledTab = function (tabId) {
43784
+ DataStoreService.prototype.getData = function (key, type) {
43785
+ var _this = this;
43786
+ var _a, _b;
43787
+ var metadata = ((_a = this.options) === null || _a === void 0 ? void 0 : _a[type]) || {};
43788
+ return this.dataAccessService
43789
+ .fetchData({
43790
+ app: (_b = this.environment) === null || _b === void 0 ? void 0 : _b.appKey,
43791
+ key: key,
43792
+ type: type,
43793
+ localPath: metadata === null || metadata === void 0 ? void 0 : metadata.localPath
43794
+ })
43795
+ .pipe(operators.switchMap(function (res) {
43796
+ var _a, _b;
43797
+ if ((_a = res === null || res === void 0 ? void 0 : res.data) === null || _a === void 0 ? void 0 : _a.config) {
43798
+ var data = JSON.stringify((_b = res === null || res === void 0 ? void 0 : res.data) === null || _b === void 0 ? void 0 : _b.config, null, 2);
43799
+ _this._dataSubject.next(data || '{\n"key": "value"\n}');
43800
+ }
43801
+ return _this.editorData$;
43802
+ }));
43803
+ };
43804
+ DataStoreService.prototype.saveData = function (key, type) {
44192
43805
  var _a;
44193
- return (_a = tabId.isEnable) !== null && _a !== void 0 ? _a : true;
43806
+ var data = this._dataSubject.getValue();
43807
+ return this.dataAccessService.saveData({
43808
+ app: (_a = this.environment) === null || _a === void 0 ? void 0 : _a.appKey,
43809
+ key: key,
43810
+ type: type,
43811
+ content: data
43812
+ });
44194
43813
  };
44195
- return NdfTabsComponent;
44196
- }(BaseComponent));
44197
- NdfTabsComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NdfTabsComponent, deps: [{ token: i0__namespace.Injector }, { token: EvaluatorsService }], target: i0__namespace.ɵɵFactoryTarget.Component });
44198
- NdfTabsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: NdfTabsComponent, selector: "ndf-tabs", inputs: { tabs: "tabs", activeTab: "activeTab", isAllowdTabFn: "isAllowdTabFn", showHeader: "showHeader" }, outputs: { activeTabEmitter: "activeTabEmitter" }, host: { classAttribute: "w-full h-full" }, queries: [{ propertyName: "tabHeader", first: true, predicate: ["tabHeader"], descendants: true, read: i0.TemplateRef }, { propertyName: "headerOptions", first: true, predicate: ["headerOptions"], descendants: true, read: i0.TemplateRef }, { propertyName: "tabBody", first: true, predicate: ["tabBody"], descendants: true, read: i0.TemplateRef }], usesInheritance: true, ngImport: i0__namespace, template: "<div class=\"flex flex-col ndf-tabs-wrapper rounded-md px-0.5\" *ngIf=\"!checkingPermission\">\r\n\t<div\r\n\t\tclass=\"tabs-header flex justify-between items-center w-full border-b print:hidden\"\r\n\t\t[@visibilitySlide]=\"showHeader\"\r\n\t\t[class.overflow-hidden]=\"!showHeader\"\r\n\t>\r\n\t\t<div class=\"tabs-wrapper flex justify-start items-center gap-2.5 self-stretch\">\r\n\t\t\t<ng-container *ngFor=\"let tab of tabs\">\r\n\t\t\t\t<ng-container *ngIf=\"isEnabledTab(tab) && isAllowdTabFn(tab)\">\r\n\t\t\t\t\t<div\r\n\t\t\t\t\t\t[ngClass]=\"{\r\n\t\t\t\t\t\t\t'selected-tab': activeTab === tab.id\r\n\t\t\t\t\t\t}\"\r\n\t\t\t\t\t\tclass=\"tab-item flex p-4 justify-center items-center gap-2.5 rounded-t-md font-medium text-xl cursor-pointer\"\r\n\t\t\t\t\t\t(click)=\"activateTab(tab)\"\r\n\t\t\t\t\t>\r\n\t\t\t\t\t\t<ng-template\r\n\t\t\t\t\t\t\t[ngTemplateOutlet]=\"tabHeader || defaultHeader\"\r\n\t\t\t\t\t\t\t[ngTemplateOutletContext]=\"{ $implicit: tab }\"\r\n\t\t\t\t\t\t></ng-template>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</ng-container>\r\n\t\t\t</ng-container>\r\n\t\t</div>\r\n\t\t<ng-template\r\n\t\t\t[ngTemplateOutlet]=\"headerOptions\"\r\n\t\t\t[ngTemplateOutletContext]=\"{ $implicit: activatedTab }\"\r\n\t\t></ng-template>\r\n\t</div>\r\n\t<ng-template\r\n\t\t[ngTemplateOutlet]=\"tabBody || defaultBody\"\r\n\t\t[ngTemplateOutletContext]=\"{ $implicit: activatedTab }\"\r\n\t></ng-template>\r\n</div>\r\n\r\n<ng-template #defaultHeader let-tab>{{ tab.label | translate }}</ng-template>\r\n<ng-template #defaultBody>Default Body</ng-template>\r\n", styles: [":host{display:block}.ndf-tabs-wrapper{background-color:var(--ndf-tabs-body, #fff);border-radius:8px 8px 0 0;overflow:var(--ndf-tabs-wrapper-overflow, auto);height:var(--ndf-tabs-wrapper-height, calc(100vh - 100px))}.ndf-tabs-wrapper .tabs-header{background-color:var(--ndf-tabs-header, #fff)}@media print{.ndf-tabs-wrapper{--ndf-tabs-wrapper-overflow: visible;--ndf-tabs-wrapper-height: auto}}\n"], 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.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i4__namespace$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], pipes: { "translate": i1__namespace.TranslatePipe }, animations: [
44199
- animations.trigger('visibilitySlide', [
44200
- animations.state('true', animations.style({ height: '*', visibility: '*' })),
44201
- animations.state('false', animations.style({ height: '0', visibility: 'hidden' })),
44202
- animations.transition('false => true', animations.animate('150ms ease-out')),
44203
- animations.transition('true => false', animations.animate('150ms ease-in'))
44204
- ])
44205
- ] });
44206
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NdfTabsComponent, decorators: [{
43814
+ DataStoreService.prototype.storeData = function (data) {
43815
+ this._dataSubject.next(data);
43816
+ };
43817
+ return DataStoreService;
43818
+ }());
43819
+ DataStoreService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: DataStoreService, deps: [{ token: DataAccessService }, { token: 'environment' }, { token: METADATA_EDITOR_OPTIONS }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
43820
+ DataStoreService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: DataStoreService });
43821
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: DataStoreService, decorators: [{
43822
+ type: i0.Injectable
43823
+ }], ctorParameters: function () {
43824
+ return [{ type: DataAccessService }, { type: undefined, decorators: [{
43825
+ type: i0.Inject,
43826
+ args: ['environment']
43827
+ }] }, { type: undefined, decorators: [{
43828
+ type: i0.Inject,
43829
+ args: [METADATA_EDITOR_OPTIONS]
43830
+ }] }];
43831
+ } });
43832
+
43833
+ // monaco-loader.service.ts
43834
+ var MonacoLoaderService = /** @class */ (function () {
43835
+ function MonacoLoaderService() {
43836
+ this.loaded = false;
43837
+ }
43838
+ MonacoLoaderService.prototype.load = function (baseUrl) {
43839
+ if (baseUrl === void 0) { baseUrl = window.location.origin; }
43840
+ var _vsUrl = window.location.origin + baseUrl + '/assets/monaco-editor/min/vs';
43841
+ if (this.loaded)
43842
+ return this.loadPromise;
43843
+ this.loaded = true;
43844
+ this.loadPromise = new Promise(function (resolve) {
43845
+ // If already available
43846
+ if (window.monaco) {
43847
+ resolve(window.monaco);
43848
+ return;
43849
+ }
43850
+ var onAmdLoader = function () {
43851
+ window.require.config({ paths: { vs: _vsUrl } });
43852
+ // Set the worker URL to the correct path
43853
+ /*window.monaco.editor?.setWorkerOptions({
43854
+ // Make sure the worker path points to the correct location
43855
+ baseUrl: `${baseUrl}/worker/`
43856
+ });*/
43857
+ window.require(['vs/editor/editor.main'], function () {
43858
+ resolve(window.monaco);
43859
+ });
43860
+ };
43861
+ // Load AMD loader if needed
43862
+ if (!window.require) {
43863
+ var loaderScript = document.createElement('script');
43864
+ loaderScript.type = 'text/javascript';
43865
+ loaderScript.src = _vsUrl + "/loader.js";
43866
+ loaderScript.onload = onAmdLoader;
43867
+ document.body.appendChild(loaderScript);
43868
+ }
43869
+ else {
43870
+ onAmdLoader();
43871
+ }
43872
+ });
43873
+ return this.loadPromise;
43874
+ };
43875
+ return MonacoLoaderService;
43876
+ }());
43877
+ MonacoLoaderService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: MonacoLoaderService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
43878
+ MonacoLoaderService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: MonacoLoaderService, providedIn: 'root' });
43879
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: MonacoLoaderService, decorators: [{
43880
+ type: i0.Injectable,
43881
+ args: [{ providedIn: 'root' }]
43882
+ }] });
43883
+
43884
+ var EditorModeSwitchComponent = /** @class */ (function () {
43885
+ function EditorModeSwitchComponent() {
43886
+ this.changeMode = new i0.EventEmitter();
43887
+ this.modes = CONFIG_EDITOR_MODE;
43888
+ }
43889
+ EditorModeSwitchComponent.prototype.ngOnInit = function () { };
43890
+ EditorModeSwitchComponent.prototype.onModeChange = function (mode) {
43891
+ this.changeMode.emit(mode.value);
43892
+ };
43893
+ return EditorModeSwitchComponent;
43894
+ }());
43895
+ EditorModeSwitchComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: EditorModeSwitchComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
43896
+ EditorModeSwitchComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: EditorModeSwitchComponent, selector: "app-editor-mode-switch", inputs: { mode: "mode" }, outputs: { changeMode: "changeMode" }, ngImport: i0__namespace, template: "\n\t\t<mat-button-toggle-group [value]=\"mode\" (change)=\"onModeChange($event)\">\n\t\t\t<mat-button-toggle *ngFor=\"let mod of modes | keyvalue\" [value]=\"mod.value\"\n\t\t\t\t>{{ 'JSON_EDITOR.MODES.' + (mod.key | lowercase) | translate }}\n\t\t\t</mat-button-toggle>\n\t\t</mat-button-toggle-group>\n\t", isInline: true, styles: [""], components: [{ type: i1__namespace$b.MatButtonToggle, selector: "mat-button-toggle", inputs: ["disableRipple", "aria-labelledby", "tabIndex", "appearance", "checked", "disabled", "id", "name", "aria-label", "value"], outputs: ["change"], exportAs: ["matButtonToggle"] }], directives: [{ type: i1__namespace$b.MatButtonToggleGroup, selector: "mat-button-toggle-group", inputs: ["appearance", "name", "vertical", "value", "multiple", "disabled"], outputs: ["valueChange", "change"], exportAs: ["matButtonToggleGroup"] }, { type: i4__namespace$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "keyvalue": i4__namespace$1.KeyValuePipe, "translate": i1__namespace.TranslatePipe, "lowercase": i4__namespace$1.LowerCasePipe } });
43897
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: EditorModeSwitchComponent, decorators: [{
44207
43898
  type: i0.Component,
44208
43899
  args: [{
44209
- selector: 'ndf-tabs',
44210
- templateUrl: './ndf-tabs.component.html',
44211
- styleUrls: ['./ndf-tabs.component.scss'],
44212
- host: { class: 'w-full h-full' },
44213
- animations: [
44214
- animations.trigger('visibilitySlide', [
44215
- animations.state('true', animations.style({ height: '*', visibility: '*' })),
44216
- animations.state('false', animations.style({ height: '0', visibility: 'hidden' })),
44217
- animations.transition('false => true', animations.animate('150ms ease-out')),
44218
- animations.transition('true => false', animations.animate('150ms ease-in'))
44219
- ])
44220
- ]
43900
+ selector: 'app-editor-mode-switch',
43901
+ template: "\n\t\t<mat-button-toggle-group [value]=\"mode\" (change)=\"onModeChange($event)\">\n\t\t\t<mat-button-toggle *ngFor=\"let mod of modes | keyvalue\" [value]=\"mod.value\"\n\t\t\t\t>{{ 'JSON_EDITOR.MODES.' + (mod.key | lowercase) | translate }}\n\t\t\t</mat-button-toggle>\n\t\t</mat-button-toggle-group>\n\t",
43902
+ styles: ['']
44221
43903
  }]
44222
- }], ctorParameters: function () { return [{ type: i0__namespace.Injector }, { type: EvaluatorsService }]; }, propDecorators: { tabHeader: [{
44223
- type: i0.ContentChild,
44224
- args: ['tabHeader', { read: i0.TemplateRef }]
44225
- }], headerOptions: [{
44226
- type: i0.ContentChild,
44227
- args: ['headerOptions', { read: i0.TemplateRef }]
44228
- }], tabBody: [{
44229
- type: i0.ContentChild,
44230
- args: ['tabBody', { read: i0.TemplateRef }]
44231
- }], tabs: [{
44232
- type: i0.Input
44233
- }], activeTab: [{
44234
- type: i0.Input
44235
- }], isAllowdTabFn: [{
44236
- type: i0.Input
44237
- }], showHeader: [{
43904
+ }], ctorParameters: function () { return []; }, propDecorators: { mode: [{
44238
43905
  type: i0.Input
44239
- }], activeTabEmitter: [{
43906
+ }], changeMode: [{
44240
43907
  type: i0.Output
44241
43908
  }] } });
44242
43909
 
44243
- var NdfTabsModule = /** @class */ (function () {
44244
- function NdfTabsModule() {
43910
+ var InfoDialogComponent = /** @class */ (function (_super) {
43911
+ __extends(InfoDialogComponent, _super);
43912
+ function InfoDialogComponent() {
43913
+ var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
43914
+ _this.baseAppUrl = _this._injector.get(i4.APP_BASE_HREF);
43915
+ _this.activeDoc = null;
43916
+ return _this;
44245
43917
  }
44246
- return NdfTabsModule;
44247
- }());
44248
- NdfTabsModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NdfTabsModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
44249
- NdfTabsModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NdfTabsModule, declarations: [NdfTabsComponent], imports: [i4.CommonModule,
44250
- i1.TranslateModule], exports: [NdfTabsComponent] });
44251
- NdfTabsModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NdfTabsModule, imports: [[
44252
- i4.CommonModule,
44253
- i1.TranslateModule
44254
- ]] });
44255
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NdfTabsModule, decorators: [{
44256
- type: i0.NgModule,
43918
+ InfoDialogComponent.prototype.ngOnInit = function () {
43919
+ var _a;
43920
+ this.documentations = this.dialogData.documentations;
43921
+ if ((_a = this.documentations) === null || _a === void 0 ? void 0 : _a.length) {
43922
+ this.activeDoc = this.documentations[0].name || '';
43923
+ }
43924
+ };
43925
+ return InfoDialogComponent;
43926
+ }(BaseDialogComponent));
43927
+ InfoDialogComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: InfoDialogComponent, deps: null, target: i0__namespace.ɵɵFactoryTarget.Component });
43928
+ InfoDialogComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: InfoDialogComponent, selector: "app-info-dialog", usesInheritance: true, ngImport: i0__namespace, template: "<ndf-nuxeo-dialog [dialogTitle]=\"dialogData.title | translate\" bodyClass=\"gap-4 p-0\">\r\n\t<ng-template #contentTemplate>\r\n\t\t<div class=\"secondary-tabs flex gap-5 items-center self-stretch doc-tabs\">\r\n\t\t\t<div\r\n\t\t\t\t[class.selected-tab]=\"doc.name === activeDoc\"\r\n\t\t\t\tclass=\"tab-item relative flex py-5 px-3 justify-start items-center gap-2.5 cursor-pointer\"\r\n\t\t\t\t*ngFor=\"let doc of documentations\"\r\n\t\t\t\t(click)=\"activeDoc = doc.name\"\r\n\t\t\t>\r\n\t\t\t\t<h4>{{ doc?.name | translate }}</h4>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\r\n\t\t<ng-container *ngFor=\"let doc of documentations\">\r\n\t\t\t<markdown class=\"markdown-content\" [src]=\"baseAppUrl + doc.path\" *ngIf=\"doc.name === activeDoc\"> </markdown>\r\n\t\t</ng-container>\r\n\t</ng-template>\r\n\r\n\t<ng-template #actionsTemplate let-dialog=\"dialog\"> </ng-template>\r\n</ndf-nuxeo-dialog>\r\n", styles: ["::ng-deep .markdown-content{direction:var(--markdown-direction, ltr)!important;text-align:start;color:var(--markdonw-text-color, inherit);background:var(--markdonw-background-color, transparent);border:var(--markdonw-border, 0px solid transparent);border-radius:var(--markdonw-border-radius, 0);padding:var(--markdown-padding, 1rem)}::ng-deep .markdown-content em{background-color:transparent}::ng-deep .markdown-content code,::ng-deep .markdown-content kbd,::ng-deep .markdown-content samp,::ng-deep .markdown-content pre{font-family:ui-monospace,SFMono-Regular,Consolas,\"Liberation Mono\",Menlo,monospace;font-size:1em}::ng-deep .markdown-content hr{margin-block:1rem}::ng-deep .markdown-content table{border-spacing:0;border-collapse:collapse;display:block;width:max-content;max-width:100%;overflow:auto;font-variant:tabular-nums;margin-block:.5rem}::ng-deep .markdown-content table tr{border-top:1px solid var(--markdonw-table-tr-border-color, #d1d9e0b3)}::ng-deep .markdown-content table th,::ng-deep .markdown-content table td{padding:6px 13px;border:1px solid var(--markdonw-table-border-color, #d1d9e0)}.doc-tabs{position:sticky;top:0;background:var(--markdonw-tabs-background-color, #fff)}\n"], components: [{ type: NdfNuxeoDialog, selector: "ndf-nuxeo-dialog", inputs: ["dialogTitle", "subTitle", "panelClass", "bodyClass", "loaderMode"] }, { type: i2__namespace$8.MarkdownComponent, selector: "markdown, [markdown]", inputs: ["data", "src", "emoji", "katex", "katexOptions", "lineHighlight", "line", "lineOffset", "lineNumbers", "start"], outputs: ["error", "load", "ready"] }], directives: [{ type: i4__namespace$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i4__namespace$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "translate": i1__namespace.TranslatePipe } });
43929
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: InfoDialogComponent, decorators: [{
43930
+ type: i0.Component,
44257
43931
  args: [{
44258
- declarations: [NdfTabsComponent],
44259
- imports: [
44260
- i4.CommonModule,
44261
- i1.TranslateModule
44262
- ],
44263
- exports: [NdfTabsComponent]
43932
+ selector: 'app-info-dialog',
43933
+ templateUrl: './info-dialog.component.html',
43934
+ styleUrls: ['./info-dialog.component.scss']
44264
43935
  }]
44265
43936
  }] });
44266
43937
 
43938
+ var ConfigEditorActionsComponent = /** @class */ (function () {
43939
+ function ConfigEditorActionsComponent() {
43940
+ this.saveDisabled = false;
43941
+ this.onSave = new i0.EventEmitter();
43942
+ this.onInfo = new i0.EventEmitter();
43943
+ this.onBack = new i0.EventEmitter();
43944
+ }
43945
+ ConfigEditorActionsComponent.prototype.ngOnInit = function () { };
43946
+ return ConfigEditorActionsComponent;
43947
+ }());
43948
+ ConfigEditorActionsComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ConfigEditorActionsComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
43949
+ ConfigEditorActionsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: ConfigEditorActionsComponent, selector: "app-config-editor-actions", inputs: { saveDisabled: "saveDisabled", config: "config" }, outputs: { onSave: "onSave", onInfo: "onInfo", onBack: "onBack" }, ngImport: i0__namespace, template: "<button mat-stroked-button (click)=\"onSave.emit($event)\" [disabled]=\"saveDisabled\">\r\n\t{{ 'JSON_EDITOR.save' | translate }}\r\n</button>\r\n<button mat-stroked-button (click)=\"onInfo.emit(config?.documentations)\" *ngIf=\"!!config?.documentations?.length\">\r\n\t{{ 'JSON_EDITOR.info' | translate }}\r\n</button>\r\n\r\n<button mat-stroked-button (click)=\"onBack.emit($event)\">{{ 'JSON_EDITOR.back' | translate }}</button>\r\n", styles: [":host{display:var(--ndf-editor-actions-display, flex);flex-direction:var(--ndf-editor-actions-direction, column);grid-gap:var(--ndf-editor-actions-gap, .5rem);gap:var(--ndf-editor-actions-gap, .5rem)}\n"], components: [{ type: i1__namespace$c.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }], directives: [{ type: i4__namespace$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "translate": i1__namespace.TranslatePipe } });
43950
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ConfigEditorActionsComponent, decorators: [{
43951
+ type: i0.Component,
43952
+ args: [{
43953
+ selector: 'app-config-editor-actions',
43954
+ templateUrl: './config-editor-actions.component.html',
43955
+ styleUrls: ['./config-editor-actions.component.scss']
43956
+ }]
43957
+ }], ctorParameters: function () { return []; }, propDecorators: { saveDisabled: [{
43958
+ type: i0.Input
43959
+ }], config: [{
43960
+ type: i0.Input
43961
+ }], onSave: [{
43962
+ type: i0.Output
43963
+ }], onInfo: [{
43964
+ type: i0.Output
43965
+ }], onBack: [{
43966
+ type: i0.Output
43967
+ }] } });
43968
+
44267
43969
  var COLORS_COUNT = 10;
44268
43970
  var CHART_MAIN_COLOR = '#184e77';
44269
43971
 
@@ -46307,7 +46009,7 @@
46307
46009
  ReportsHooksService.prototype.evaluate = function (expr, payload) {
46308
46010
  try {
46309
46011
  var context = { criteria: payload };
46310
- var result = Evaluator.evaluate(expr, context, 'payload');
46012
+ var result = formiojs.Utils.evaluate(expr, context, 'payload');
46311
46013
  return result !== null && result !== void 0 ? result : payload;
46312
46014
  }
46313
46015
  catch (e) {
@@ -46858,22 +46560,35 @@
46858
46560
  type: 'bar',
46859
46561
  options: overrides === null || overrides === void 0 ? void 0 : overrides.verticalBar,
46860
46562
  direction: 'vertical',
46861
- callbacks: callbacks
46563
+ callbacks: callbacks,
46862
46564
  }),
46863
46565
  horizontalBar: this._getChartOptions({
46864
46566
  type: 'bar',
46865
46567
  options: overrides === null || overrides === void 0 ? void 0 : overrides.verticalBar,
46866
46568
  direction: 'horizontal',
46867
- callbacks: callbacks
46569
+ callbacks: callbacks,
46868
46570
  }),
46869
46571
  doughnut: this._getChartOptions({
46870
46572
  type: 'doughnut',
46871
46573
  options: overrides === null || overrides === void 0 ? void 0 : overrides.doughnut,
46872
- callbacks: callbacks
46574
+ callbacks: callbacks,
46575
+ }),
46576
+ line: this._getChartOptions({
46577
+ type: 'line',
46578
+ options: overrides === null || overrides === void 0 ? void 0 : overrides.line,
46579
+ callbacks: callbacks,
46873
46580
  }),
46874
- line: this._getChartOptions({ type: 'line', options: overrides === null || overrides === void 0 ? void 0 : overrides.line, callbacks: callbacks }),
46875
- pie: this._getChartOptions({ type: 'pie', options: overrides === null || overrides === void 0 ? void 0 : overrides.pie, callbacks: callbacks })
46876
- }, options: this._getChartOptions({ type: config.chart.type, options: options, direction: direction, callbacks: callbacks }) });
46581
+ pie: this._getChartOptions({
46582
+ type: 'pie',
46583
+ options: overrides === null || overrides === void 0 ? void 0 : overrides.pie,
46584
+ callbacks: callbacks,
46585
+ }),
46586
+ }, options: this._getChartOptions({
46587
+ type: config.chart.type,
46588
+ options: options,
46589
+ direction: direction,
46590
+ callbacks: callbacks,
46591
+ }) });
46877
46592
  if (Array.isArray(plugins) && plugins.length > 0) {
46878
46593
  chart.plugins = this._preparePlugins(plugins);
46879
46594
  }
@@ -46937,7 +46652,7 @@
46937
46652
  horizontalBar: getHorizontalBarOptions,
46938
46653
  doughnut: getDoughnutOptions,
46939
46654
  line: getLineOptions,
46940
- pie: getPieOptions
46655
+ pie: getPieOptions,
46941
46656
  };
46942
46657
  var key = type === 'bar' ? direction + "Bar" : type;
46943
46658
  var _options = ((_a = _optionsMap[key]) === null || _a === void 0 ? void 0 : _a.call(_optionsMap, options)) || {};
@@ -46960,7 +46675,7 @@
46960
46675
  .filter(function (call) { return !!call.path && !!call.callback; })
46961
46676
  .forEach(function (callback) {
46962
46677
  try {
46963
- var fn = Evaluator.evaluate(callback.callback, {
46678
+ var fn = formiojs.Utils.evaluate(callback.callback, {
46964
46679
  type: type,
46965
46680
  translate: _this._translateService,
46966
46681
  register: _this._chartPluginsCallbacks,
@@ -46980,7 +46695,7 @@
46980
46695
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ReportConfigMapperService, decorators: [{
46981
46696
  type: i0.Injectable,
46982
46697
  args: [{
46983
- providedIn: 'root'
46698
+ providedIn: 'root',
46984
46699
  }]
46985
46700
  }], ctorParameters: function () { return [{ type: ChartPluginsRegistry }, { type: ChartCallbacksRegisterService }, { type: i1__namespace.TranslateService }]; } });
46986
46701
 
@@ -48797,7 +48512,7 @@
48797
48512
  }
48798
48513
  CheckConditionPipe.prototype.transform = function (activeQuery, condition, config) {
48799
48514
  if (condition) {
48800
- return Evaluator.evaluate(condition, { activeQuery: activeQuery, config: config }, 'show');
48515
+ return formiojs.Utils.evaluate(condition, { activeQuery: activeQuery, config: config }, 'show');
48801
48516
  }
48802
48517
  return true;
48803
48518
  };
@@ -48933,255 +48648,6 @@
48933
48648
  }]
48934
48649
  }] });
48935
48650
 
48936
- var DataAccessService = /** @class */ (function (_super) {
48937
- __extends(DataAccessService, _super);
48938
- function DataAccessService(injector) {
48939
- return _super.call(this, injector) || this;
48940
- }
48941
- DataAccessService.prototype.saveData = function (payload) {
48942
- return this.customAutomation({
48943
- operation: 'AC_UA_Create_UI_Configuration',
48944
- context: payload
48945
- });
48946
- };
48947
- return DataAccessService;
48948
- }(BaseEditorConfigService));
48949
- DataAccessService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: DataAccessService, deps: [{ token: i0__namespace.Injector }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
48950
- DataAccessService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: DataAccessService, providedIn: 'root' });
48951
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: DataAccessService, decorators: [{
48952
- type: i0.Injectable,
48953
- args: [{
48954
- providedIn: 'root'
48955
- }]
48956
- }], ctorParameters: function () { return [{ type: i0__namespace.Injector }]; } });
48957
-
48958
- var METADATA_EDITOR_OPTIONS = new i0.InjectionToken('METADATA_EDITOR_CONFIG');
48959
-
48960
- var DataStoreService = /** @class */ (function () {
48961
- function DataStoreService(dataAccessService, environment, options) {
48962
- this.dataAccessService = dataAccessService;
48963
- this.environment = environment;
48964
- this.options = options;
48965
- this._editorTypeSubject = new rxjs.BehaviorSubject(NDF_EDITOR_TYPE.TABLES);
48966
- this.editorType$ = this._editorTypeSubject.asObservable();
48967
- this._editorModeSubject = new rxjs.BehaviorSubject(CONFIG_EDITOR_MODE.EDIT);
48968
- this.editorMode$ = this._editorModeSubject.asObservable();
48969
- this._dataSubject = new rxjs.BehaviorSubject('{\n"key": "value"\n}');
48970
- this.editorData$ = this._dataSubject.asObservable();
48971
- this.previewData$ = this._dataSubject.asObservable().pipe(operators.map(function (result) { return JSON.parse(result); }));
48972
- }
48973
- Object.defineProperty(DataStoreService.prototype, "editorMode", {
48974
- get: function () {
48975
- return this._editorModeSubject.getValue();
48976
- },
48977
- enumerable: false,
48978
- configurable: true
48979
- });
48980
- Object.defineProperty(DataStoreService.prototype, "type", {
48981
- get: function () {
48982
- return this._editorTypeSubject.getValue();
48983
- },
48984
- enumerable: false,
48985
- configurable: true
48986
- });
48987
- Object.defineProperty(DataStoreService.prototype, "editorData", {
48988
- get: function () {
48989
- return this._dataSubject.getValue();
48990
- },
48991
- enumerable: false,
48992
- configurable: true
48993
- });
48994
- DataStoreService.prototype.changeMode = function (mode) {
48995
- this._editorModeSubject.next(mode);
48996
- };
48997
- DataStoreService.prototype.changeEditorType = function (type) {
48998
- this._editorTypeSubject.next(type);
48999
- };
49000
- DataStoreService.prototype.getData = function (key, type) {
49001
- var _this = this;
49002
- var _a, _b;
49003
- var metadata = ((_a = this.options) === null || _a === void 0 ? void 0 : _a[type]) || {};
49004
- return this.dataAccessService
49005
- .fetchData({
49006
- app: (_b = this.environment) === null || _b === void 0 ? void 0 : _b.appKey,
49007
- key: key,
49008
- type: type,
49009
- localPath: metadata === null || metadata === void 0 ? void 0 : metadata.localPath
49010
- })
49011
- .pipe(operators.switchMap(function (res) {
49012
- var _a, _b;
49013
- if ((_a = res === null || res === void 0 ? void 0 : res.data) === null || _a === void 0 ? void 0 : _a.config) {
49014
- var data = JSON.stringify((_b = res === null || res === void 0 ? void 0 : res.data) === null || _b === void 0 ? void 0 : _b.config, null, 2);
49015
- _this._dataSubject.next(data || '{\n"key": "value"\n}');
49016
- }
49017
- return _this.editorData$;
49018
- }));
49019
- };
49020
- DataStoreService.prototype.saveData = function (key, type) {
49021
- var _a;
49022
- var data = this._dataSubject.getValue();
49023
- return this.dataAccessService.saveData({
49024
- app: (_a = this.environment) === null || _a === void 0 ? void 0 : _a.appKey,
49025
- key: key,
49026
- type: type,
49027
- content: data
49028
- });
49029
- };
49030
- DataStoreService.prototype.storeData = function (data) {
49031
- this._dataSubject.next(data);
49032
- };
49033
- return DataStoreService;
49034
- }());
49035
- DataStoreService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: DataStoreService, deps: [{ token: DataAccessService }, { token: 'environment' }, { token: METADATA_EDITOR_OPTIONS }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
49036
- DataStoreService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: DataStoreService });
49037
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: DataStoreService, decorators: [{
49038
- type: i0.Injectable
49039
- }], ctorParameters: function () {
49040
- return [{ type: DataAccessService }, { type: undefined, decorators: [{
49041
- type: i0.Inject,
49042
- args: ['environment']
49043
- }] }, { type: undefined, decorators: [{
49044
- type: i0.Inject,
49045
- args: [METADATA_EDITOR_OPTIONS]
49046
- }] }];
49047
- } });
49048
-
49049
- // monaco-loader.service.ts
49050
- var MonacoLoaderService = /** @class */ (function () {
49051
- function MonacoLoaderService() {
49052
- this.loaded = false;
49053
- }
49054
- MonacoLoaderService.prototype.load = function (baseUrl) {
49055
- if (baseUrl === void 0) { baseUrl = window.location.origin; }
49056
- var _vsUrl = window.location.origin + baseUrl + '/assets/monaco-editor/min/vs';
49057
- if (this.loaded)
49058
- return this.loadPromise;
49059
- this.loaded = true;
49060
- this.loadPromise = new Promise(function (resolve) {
49061
- // If already available
49062
- if (window.monaco) {
49063
- resolve(window.monaco);
49064
- return;
49065
- }
49066
- var onAmdLoader = function () {
49067
- window.require.config({ paths: { vs: _vsUrl } });
49068
- // Set the worker URL to the correct path
49069
- /*window.monaco.editor?.setWorkerOptions({
49070
- // Make sure the worker path points to the correct location
49071
- baseUrl: `${baseUrl}/worker/`
49072
- });*/
49073
- window.require(['vs/editor/editor.main'], function () {
49074
- resolve(window.monaco);
49075
- });
49076
- };
49077
- // Load AMD loader if needed
49078
- if (!window.require) {
49079
- var loaderScript = document.createElement('script');
49080
- loaderScript.type = 'text/javascript';
49081
- loaderScript.src = _vsUrl + "/loader.js";
49082
- loaderScript.onload = onAmdLoader;
49083
- document.body.appendChild(loaderScript);
49084
- }
49085
- else {
49086
- onAmdLoader();
49087
- }
49088
- });
49089
- return this.loadPromise;
49090
- };
49091
- return MonacoLoaderService;
49092
- }());
49093
- MonacoLoaderService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: MonacoLoaderService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
49094
- MonacoLoaderService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: MonacoLoaderService, providedIn: 'root' });
49095
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: MonacoLoaderService, decorators: [{
49096
- type: i0.Injectable,
49097
- args: [{ providedIn: 'root' }]
49098
- }] });
49099
-
49100
- var EditorModeSwitchComponent = /** @class */ (function () {
49101
- function EditorModeSwitchComponent() {
49102
- this.changeMode = new i0.EventEmitter();
49103
- this.modes = CONFIG_EDITOR_MODE;
49104
- }
49105
- EditorModeSwitchComponent.prototype.ngOnInit = function () { };
49106
- EditorModeSwitchComponent.prototype.onModeChange = function (mode) {
49107
- this.changeMode.emit(mode.value);
49108
- };
49109
- return EditorModeSwitchComponent;
49110
- }());
49111
- EditorModeSwitchComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: EditorModeSwitchComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
49112
- EditorModeSwitchComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: EditorModeSwitchComponent, selector: "app-editor-mode-switch", inputs: { mode: "mode" }, outputs: { changeMode: "changeMode" }, ngImport: i0__namespace, template: "\n\t\t<mat-button-toggle-group [value]=\"mode\" (change)=\"onModeChange($event)\">\n\t\t\t<mat-button-toggle *ngFor=\"let mod of modes | keyvalue\" [value]=\"mod.value\"\n\t\t\t\t>{{ 'JSON_EDITOR.MODES.' + (mod.key | lowercase) | translate }}\n\t\t\t</mat-button-toggle>\n\t\t</mat-button-toggle-group>\n\t", isInline: true, styles: [""], components: [{ type: i1__namespace$b.MatButtonToggle, selector: "mat-button-toggle", inputs: ["disableRipple", "aria-labelledby", "tabIndex", "appearance", "checked", "disabled", "id", "name", "aria-label", "value"], outputs: ["change"], exportAs: ["matButtonToggle"] }], directives: [{ type: i1__namespace$b.MatButtonToggleGroup, selector: "mat-button-toggle-group", inputs: ["appearance", "name", "vertical", "value", "multiple", "disabled"], outputs: ["valueChange", "change"], exportAs: ["matButtonToggleGroup"] }, { type: i4__namespace$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "keyvalue": i4__namespace$1.KeyValuePipe, "translate": i1__namespace.TranslatePipe, "lowercase": i4__namespace$1.LowerCasePipe } });
49113
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: EditorModeSwitchComponent, decorators: [{
49114
- type: i0.Component,
49115
- args: [{
49116
- selector: 'app-editor-mode-switch',
49117
- template: "\n\t\t<mat-button-toggle-group [value]=\"mode\" (change)=\"onModeChange($event)\">\n\t\t\t<mat-button-toggle *ngFor=\"let mod of modes | keyvalue\" [value]=\"mod.value\"\n\t\t\t\t>{{ 'JSON_EDITOR.MODES.' + (mod.key | lowercase) | translate }}\n\t\t\t</mat-button-toggle>\n\t\t</mat-button-toggle-group>\n\t",
49118
- styles: ['']
49119
- }]
49120
- }], ctorParameters: function () { return []; }, propDecorators: { mode: [{
49121
- type: i0.Input
49122
- }], changeMode: [{
49123
- type: i0.Output
49124
- }] } });
49125
-
49126
- var InfoDialogComponent = /** @class */ (function (_super) {
49127
- __extends(InfoDialogComponent, _super);
49128
- function InfoDialogComponent() {
49129
- var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
49130
- _this.baseAppUrl = _this._injector.get(i4.APP_BASE_HREF);
49131
- _this.activeDoc = null;
49132
- return _this;
49133
- }
49134
- InfoDialogComponent.prototype.ngOnInit = function () {
49135
- var _a;
49136
- this.documentations = this.dialogData.documentations;
49137
- if ((_a = this.documentations) === null || _a === void 0 ? void 0 : _a.length) {
49138
- this.activeDoc = this.documentations[0].name || '';
49139
- }
49140
- };
49141
- return InfoDialogComponent;
49142
- }(BaseDialogComponent));
49143
- InfoDialogComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: InfoDialogComponent, deps: null, target: i0__namespace.ɵɵFactoryTarget.Component });
49144
- InfoDialogComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: InfoDialogComponent, selector: "app-info-dialog", usesInheritance: true, ngImport: i0__namespace, template: "<ndf-nuxeo-dialog [dialogTitle]=\"dialogData.title | translate\" bodyClass=\"gap-4 p-0\">\r\n\t<ng-template #contentTemplate>\r\n\t\t<div class=\"secondary-tabs flex gap-5 items-center self-stretch doc-tabs\">\r\n\t\t\t<div\r\n\t\t\t\t[class.selected-tab]=\"doc.name === activeDoc\"\r\n\t\t\t\tclass=\"tab-item relative flex py-5 px-3 justify-start items-center gap-2.5 cursor-pointer\"\r\n\t\t\t\t*ngFor=\"let doc of documentations\"\r\n\t\t\t\t(click)=\"activeDoc = doc.name\"\r\n\t\t\t>\r\n\t\t\t\t<h4>{{ doc?.name | translate }}</h4>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\r\n\t\t<ng-container *ngFor=\"let doc of documentations\">\r\n\t\t\t<markdown class=\"markdown-content\" [src]=\"baseAppUrl + doc.path\" *ngIf=\"doc.name === activeDoc\"> </markdown>\r\n\t\t</ng-container>\r\n\t</ng-template>\r\n\r\n\t<ng-template #actionsTemplate let-dialog=\"dialog\"> </ng-template>\r\n</ndf-nuxeo-dialog>\r\n", styles: ["::ng-deep .markdown-content{direction:var(--markdown-direction, ltr)!important;text-align:start;color:var(--markdonw-text-color, inherit);background:var(--markdonw-background-color, transparent);border:var(--markdonw-border, 0px solid transparent);border-radius:var(--markdonw-border-radius, 0);padding:var(--markdown-padding, 1rem)}::ng-deep .markdown-content em{background-color:transparent}::ng-deep .markdown-content code,::ng-deep .markdown-content kbd,::ng-deep .markdown-content samp,::ng-deep .markdown-content pre{font-family:ui-monospace,SFMono-Regular,Consolas,\"Liberation Mono\",Menlo,monospace;font-size:1em}::ng-deep .markdown-content hr{margin-block:1rem}::ng-deep .markdown-content table{border-spacing:0;border-collapse:collapse;display:block;width:max-content;max-width:100%;overflow:auto;font-variant:tabular-nums;margin-block:.5rem}::ng-deep .markdown-content table tr{border-top:1px solid var(--markdonw-table-tr-border-color, #d1d9e0b3)}::ng-deep .markdown-content table th,::ng-deep .markdown-content table td{padding:6px 13px;border:1px solid var(--markdonw-table-border-color, #d1d9e0)}.doc-tabs{position:sticky;top:0;background:var(--markdonw-tabs-background-color, #fff)}\n"], components: [{ type: NdfNuxeoDialog, selector: "ndf-nuxeo-dialog", inputs: ["dialogTitle", "subTitle", "panelClass", "bodyClass", "loaderMode"] }, { type: i2__namespace$8.MarkdownComponent, selector: "markdown, [markdown]", inputs: ["data", "src", "emoji", "katex", "katexOptions", "lineHighlight", "line", "lineOffset", "lineNumbers", "start"], outputs: ["error", "load", "ready"] }], directives: [{ type: i4__namespace$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i4__namespace$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "translate": i1__namespace.TranslatePipe } });
49145
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: InfoDialogComponent, decorators: [{
49146
- type: i0.Component,
49147
- args: [{
49148
- selector: 'app-info-dialog',
49149
- templateUrl: './info-dialog.component.html',
49150
- styleUrls: ['./info-dialog.component.scss']
49151
- }]
49152
- }] });
49153
-
49154
- var ConfigEditorActionsComponent = /** @class */ (function () {
49155
- function ConfigEditorActionsComponent() {
49156
- this.saveDisabled = false;
49157
- this.onSave = new i0.EventEmitter();
49158
- this.onInfo = new i0.EventEmitter();
49159
- this.onBack = new i0.EventEmitter();
49160
- }
49161
- ConfigEditorActionsComponent.prototype.ngOnInit = function () { };
49162
- return ConfigEditorActionsComponent;
49163
- }());
49164
- ConfigEditorActionsComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ConfigEditorActionsComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
49165
- ConfigEditorActionsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: ConfigEditorActionsComponent, selector: "app-config-editor-actions", inputs: { saveDisabled: "saveDisabled", config: "config" }, outputs: { onSave: "onSave", onInfo: "onInfo", onBack: "onBack" }, ngImport: i0__namespace, template: "<button mat-stroked-button (click)=\"onSave.emit($event)\" [disabled]=\"saveDisabled\">\r\n\t{{ 'JSON_EDITOR.save' | translate }}\r\n</button>\r\n<button mat-stroked-button (click)=\"onInfo.emit(config?.documentations)\" *ngIf=\"!!config?.documentations?.length\">\r\n\t{{ 'JSON_EDITOR.info' | translate }}\r\n</button>\r\n\r\n<button mat-stroked-button (click)=\"onBack.emit($event)\">{{ 'JSON_EDITOR.back' | translate }}</button>\r\n", styles: [":host{display:var(--ndf-editor-actions-display, flex);flex-direction:var(--ndf-editor-actions-direction, column);grid-gap:var(--ndf-editor-actions-gap, .5rem);gap:var(--ndf-editor-actions-gap, .5rem)}\n"], components: [{ type: i1__namespace$c.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }], directives: [{ type: i4__namespace$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "translate": i1__namespace.TranslatePipe } });
49166
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ConfigEditorActionsComponent, decorators: [{
49167
- type: i0.Component,
49168
- args: [{
49169
- selector: 'app-config-editor-actions',
49170
- templateUrl: './config-editor-actions.component.html',
49171
- styleUrls: ['./config-editor-actions.component.scss']
49172
- }]
49173
- }], ctorParameters: function () { return []; }, propDecorators: { saveDisabled: [{
49174
- type: i0.Input
49175
- }], config: [{
49176
- type: i0.Input
49177
- }], onSave: [{
49178
- type: i0.Output
49179
- }], onInfo: [{
49180
- type: i0.Output
49181
- }], onBack: [{
49182
- type: i0.Output
49183
- }] } });
49184
-
49185
48651
  var EditorSettingsComponent = /** @class */ (function () {
49186
48652
  function EditorSettingsComponent(_componentRegister, _evaluatorsService, _ndfTransformService, _chartDataTransformers, _chartPluginsRegistry) {
49187
48653
  this._componentRegister = _componentRegister;
@@ -49728,6 +49194,52 @@
49728
49194
  }]
49729
49195
  }] });
49730
49196
 
49197
+ var NdfPanelComponent = /** @class */ (function () {
49198
+ function NdfPanelComponent() {
49199
+ this.maxBodyHeight = 'auto';
49200
+ }
49201
+ return NdfPanelComponent;
49202
+ }());
49203
+ NdfPanelComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NdfPanelComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
49204
+ NdfPanelComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: NdfPanelComponent, selector: "ndf-panel", inputs: { maxBodyHeight: "maxBodyHeight" }, queries: [{ propertyName: "panelHeader", first: true, predicate: ["panelHeader"], descendants: true, read: i0.TemplateRef }, { propertyName: "panelBody", first: true, predicate: ["panelBody"], descendants: true, read: i0.TemplateRef }, { propertyName: "panelFooter", first: true, predicate: ["panelFooter"], descendants: true, read: i0.TemplateRef }], ngImport: i0__namespace, template: "<div class=\"scroll-panel\">\r\n\t<div class=\"header\">\r\n\t\t<ng-container [ngTemplateOutlet]=\"panelHeader\"></ng-container>\r\n\t</div>\r\n\r\n\t<div class=\"body\" [style.maxHeight]=\"maxBodyHeight\">\r\n\t\t<ng-container [ngTemplateOutlet]=\"panelBody\"></ng-container>\r\n\t</div>\r\n\r\n\t<div class=\"footer\">\r\n\t\t<ng-container [ngTemplateOutlet]=\"panelFooter\"></ng-container>\r\n\t</div>\r\n</div>\r\n", styles: [".scroll-panel{display:var(--ndf-panel-display, flex);flex-direction:var(--ndf-panel-flex-direction, column);height:var(--ndf-panel-height, calc(100dvh - 65px));border:1px solid var(--ndf-panel-main-border)}.header{flex:var(--ndf-panel-header-flex, 0 0 auto);color:var(--ndf-panel-color, #3b3b3c);background-color:var(--ndf-panel-bg, #f6f9f5);border-bottom:1px solid var(--ndf-panel-border-color, #e7e7e7)}.footer{border-top:1px solid var(--ndf-panel-border-color, #e7e7e7)}.body{flex:var(--ndf-panel-body-flex, 1 1 auto);overflow-y:var(--ndf-panel-body-overflow-y, auto);min-height:var(--ndf-panel-body-min-height, 0)}\n"], directives: [{ type: i4__namespace$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
49205
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NdfPanelComponent, decorators: [{
49206
+ type: i0.Component,
49207
+ args: [{
49208
+ selector: 'ndf-panel',
49209
+ templateUrl: './ndf-panel.component.html',
49210
+ styleUrls: ['./ndf-panel.component.scss'],
49211
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
49212
+ }]
49213
+ }], propDecorators: { maxBodyHeight: [{
49214
+ type: i0.Input
49215
+ }], panelHeader: [{
49216
+ type: i0.ContentChild,
49217
+ args: ['panelHeader', { read: i0.TemplateRef }]
49218
+ }], panelBody: [{
49219
+ type: i0.ContentChild,
49220
+ args: ['panelBody', { read: i0.TemplateRef }]
49221
+ }], panelFooter: [{
49222
+ type: i0.ContentChild,
49223
+ args: ['panelFooter', { read: i0.TemplateRef }]
49224
+ }] } });
49225
+
49226
+ var NdfPanelModule = /** @class */ (function () {
49227
+ function NdfPanelModule() {
49228
+ }
49229
+ return NdfPanelModule;
49230
+ }());
49231
+ NdfPanelModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NdfPanelModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
49232
+ NdfPanelModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NdfPanelModule, declarations: [NdfPanelComponent], imports: [i4.CommonModule], exports: [NdfPanelComponent] });
49233
+ NdfPanelModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NdfPanelModule, imports: [[i4.CommonModule]] });
49234
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NdfPanelModule, decorators: [{
49235
+ type: i0.NgModule,
49236
+ args: [{
49237
+ declarations: [NdfPanelComponent],
49238
+ imports: [i4.CommonModule],
49239
+ exports: [NdfPanelComponent]
49240
+ }]
49241
+ }] });
49242
+
49731
49243
  var UPLOADER_CONFIG = {
49732
49244
  DEFAULT_PROVIDER: 'nuxeo',
49733
49245
  MAX_CONCURRENT_REQUESTS: 5,
@@ -52159,6 +51671,174 @@
52159
51671
  }]
52160
51672
  }] });
52161
51673
 
51674
+ var NdfTabsComponent = /** @class */ (function (_super) {
51675
+ __extends(NdfTabsComponent, _super);
51676
+ function NdfTabsComponent(injector, evaluatorsService) {
51677
+ var _this = _super.call(this, injector) || this;
51678
+ _this.evaluatorsService = evaluatorsService;
51679
+ _this.isAllowdTabFn = function (_) { return true; };
51680
+ _this._showHeader = true;
51681
+ _this.activeTabEmitter = new i0.EventEmitter();
51682
+ _this.checkingPermission = false;
51683
+ return _this;
51684
+ }
51685
+ Object.defineProperty(NdfTabsComponent.prototype, "showHeader", {
51686
+ get: function () {
51687
+ return this._showHeader;
51688
+ },
51689
+ set: function (value) {
51690
+ this._showHeader = value;
51691
+ },
51692
+ enumerable: false,
51693
+ configurable: true
51694
+ });
51695
+ NdfTabsComponent.prototype.ngOnInit = function () {
51696
+ this.checkTabsPermissions();
51697
+ };
51698
+ NdfTabsComponent.prototype.checkTabsPermissions = function () {
51699
+ var _this = this;
51700
+ this.checkingPermission = true;
51701
+ var permissionCalls = [];
51702
+ var createPermissionCall = function (id, permission, secondaryTab) {
51703
+ if (secondaryTab === void 0) { secondaryTab = false; }
51704
+ if (permission) {
51705
+ return rxjs.from(_this.evaluatorsService.evaluateRule(permission)).pipe(operators.map(function (res) { return ({ id: id, enabled: res, secondaryTab: secondaryTab }); }));
51706
+ }
51707
+ return rxjs.of({ id: id, enabled: true, secondaryTab: secondaryTab });
51708
+ };
51709
+ this.tabs.forEach(function (tab) {
51710
+ var _a;
51711
+ permissionCalls.push(createPermissionCall(tab.id, tab.permission));
51712
+ (_a = tab.secondary_tabs) === null || _a === void 0 ? void 0 : _a.forEach(function (subTab) {
51713
+ permissionCalls.push(createPermissionCall(subTab.id, subTab.permission, true));
51714
+ });
51715
+ });
51716
+ rxjs.forkJoin(permissionCalls)
51717
+ .pipe(operators.takeUntil(this.destroy$), operators.tap(function (results) {
51718
+ var secondaryTabsPerms = results.filter(function (r) { return r.secondaryTab; });
51719
+ var primaryTabsPerms = results.filter(function (r) { return !r.secondaryTab; });
51720
+ var filteredTabs = _.cloneDeep(_this.tabs);
51721
+ filteredTabs = filteredTabs
51722
+ .filter(function (tab) { return primaryTabsPerms.some(function (p) { return p.id === tab.id && p.enabled; }); })
51723
+ .map(function (tab) {
51724
+ var _a;
51725
+ if ((_a = tab.secondary_tabs) === null || _a === void 0 ? void 0 : _a.length) {
51726
+ tab.secondary_tabs = tab.secondary_tabs.filter(function (sub) { return secondaryTabsPerms.some(function (p) { return p.id === sub.id && p.enabled; }); });
51727
+ }
51728
+ return tab;
51729
+ });
51730
+ _this.tabs = filteredTabs;
51731
+ }))
51732
+ .subscribe(function () {
51733
+ if (_this.tabs.length && !_this.activeTab) {
51734
+ _this.activateTab(_this.tabs[0]);
51735
+ }
51736
+ _this.checkingPermission = false;
51737
+ });
51738
+ };
51739
+ Object.defineProperty(NdfTabsComponent.prototype, "activatedTabId", {
51740
+ get: function () {
51741
+ var _a, _b, _c;
51742
+ return (_a = this.activeTab) !== null && _a !== void 0 ? _a : (_c = (_b = this.tabs) === null || _b === void 0 ? void 0 : _b[0]) === null || _c === void 0 ? void 0 : _c.id;
51743
+ },
51744
+ enumerable: false,
51745
+ configurable: true
51746
+ });
51747
+ Object.defineProperty(NdfTabsComponent.prototype, "activatedTab", {
51748
+ get: function () {
51749
+ var _this = this;
51750
+ return this.tabs.find(function (_d) {
51751
+ var id = _d.id;
51752
+ return id === _this.activatedTabId;
51753
+ });
51754
+ },
51755
+ enumerable: false,
51756
+ configurable: true
51757
+ });
51758
+ NdfTabsComponent.prototype.activateTab = function (tab) {
51759
+ this.activeTab = tab.id;
51760
+ this.activeTabEmitter.emit(tab);
51761
+ };
51762
+ NdfTabsComponent.prototype.ngOnDestroy = function () {
51763
+ this.destroy$.next();
51764
+ this.destroy$.complete();
51765
+ };
51766
+ NdfTabsComponent.prototype.isEnabledTab = function (tabId) {
51767
+ var _a;
51768
+ return (_a = tabId.isEnable) !== null && _a !== void 0 ? _a : true;
51769
+ };
51770
+ return NdfTabsComponent;
51771
+ }(BaseComponent));
51772
+ NdfTabsComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NdfTabsComponent, deps: [{ token: i0__namespace.Injector }, { token: EvaluatorsService }], target: i0__namespace.ɵɵFactoryTarget.Component });
51773
+ NdfTabsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: NdfTabsComponent, selector: "ndf-tabs", inputs: { tabs: "tabs", activeTab: "activeTab", isAllowdTabFn: "isAllowdTabFn", showHeader: "showHeader" }, outputs: { activeTabEmitter: "activeTabEmitter" }, host: { classAttribute: "w-full h-full" }, queries: [{ propertyName: "tabHeader", first: true, predicate: ["tabHeader"], descendants: true, read: i0.TemplateRef }, { propertyName: "headerOptions", first: true, predicate: ["headerOptions"], descendants: true, read: i0.TemplateRef }, { propertyName: "tabBody", first: true, predicate: ["tabBody"], descendants: true, read: i0.TemplateRef }], usesInheritance: true, ngImport: i0__namespace, template: "<div class=\"flex flex-col ndf-tabs-wrapper rounded-md px-0.5\" *ngIf=\"!checkingPermission\">\r\n\t<div\r\n\t\tclass=\"tabs-header flex justify-between items-center w-full border-b print:hidden\"\r\n\t\t[@visibilitySlide]=\"showHeader\"\r\n\t\t[class.overflow-hidden]=\"!showHeader\"\r\n\t>\r\n\t\t<div class=\"tabs-wrapper flex justify-start items-center gap-2.5 self-stretch\">\r\n\t\t\t<ng-container *ngFor=\"let tab of tabs\">\r\n\t\t\t\t<ng-container *ngIf=\"isEnabledTab(tab) && isAllowdTabFn(tab)\">\r\n\t\t\t\t\t<div\r\n\t\t\t\t\t\t[ngClass]=\"{\r\n\t\t\t\t\t\t\t'selected-tab': activeTab === tab.id\r\n\t\t\t\t\t\t}\"\r\n\t\t\t\t\t\tclass=\"tab-item flex p-4 justify-center items-center gap-2.5 rounded-t-md font-medium text-xl cursor-pointer\"\r\n\t\t\t\t\t\t(click)=\"activateTab(tab)\"\r\n\t\t\t\t\t>\r\n\t\t\t\t\t\t<ng-template\r\n\t\t\t\t\t\t\t[ngTemplateOutlet]=\"tabHeader || defaultHeader\"\r\n\t\t\t\t\t\t\t[ngTemplateOutletContext]=\"{ $implicit: tab }\"\r\n\t\t\t\t\t\t></ng-template>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</ng-container>\r\n\t\t\t</ng-container>\r\n\t\t</div>\r\n\t\t<ng-template\r\n\t\t\t[ngTemplateOutlet]=\"headerOptions\"\r\n\t\t\t[ngTemplateOutletContext]=\"{ $implicit: activatedTab }\"\r\n\t\t></ng-template>\r\n\t</div>\r\n\t<ng-template\r\n\t\t[ngTemplateOutlet]=\"tabBody || defaultBody\"\r\n\t\t[ngTemplateOutletContext]=\"{ $implicit: activatedTab }\"\r\n\t></ng-template>\r\n</div>\r\n\r\n<ng-template #defaultHeader let-tab>{{ tab.label | translate }}</ng-template>\r\n<ng-template #defaultBody>Default Body</ng-template>\r\n", styles: [":host{display:block}.ndf-tabs-wrapper{background-color:var(--ndf-tabs-body, #fff);border-radius:8px 8px 0 0;overflow:var(--ndf-tabs-wrapper-overflow, auto);height:var(--ndf-tabs-wrapper-height, calc(100vh - 100px))}.ndf-tabs-wrapper .tabs-header{background-color:var(--ndf-tabs-header, #fff)}@media print{.ndf-tabs-wrapper{--ndf-tabs-wrapper-overflow: visible;--ndf-tabs-wrapper-height: auto}}\n"], 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.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i4__namespace$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], pipes: { "translate": i1__namespace.TranslatePipe }, animations: [
51774
+ animations.trigger('visibilitySlide', [
51775
+ animations.state('true', animations.style({ height: '*', visibility: '*' })),
51776
+ animations.state('false', animations.style({ height: '0', visibility: 'hidden' })),
51777
+ animations.transition('false => true', animations.animate('150ms ease-out')),
51778
+ animations.transition('true => false', animations.animate('150ms ease-in'))
51779
+ ])
51780
+ ] });
51781
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NdfTabsComponent, decorators: [{
51782
+ type: i0.Component,
51783
+ args: [{
51784
+ selector: 'ndf-tabs',
51785
+ templateUrl: './ndf-tabs.component.html',
51786
+ styleUrls: ['./ndf-tabs.component.scss'],
51787
+ host: { class: 'w-full h-full' },
51788
+ animations: [
51789
+ animations.trigger('visibilitySlide', [
51790
+ animations.state('true', animations.style({ height: '*', visibility: '*' })),
51791
+ animations.state('false', animations.style({ height: '0', visibility: 'hidden' })),
51792
+ animations.transition('false => true', animations.animate('150ms ease-out')),
51793
+ animations.transition('true => false', animations.animate('150ms ease-in'))
51794
+ ])
51795
+ ]
51796
+ }]
51797
+ }], ctorParameters: function () { return [{ type: i0__namespace.Injector }, { type: EvaluatorsService }]; }, propDecorators: { tabHeader: [{
51798
+ type: i0.ContentChild,
51799
+ args: ['tabHeader', { read: i0.TemplateRef }]
51800
+ }], headerOptions: [{
51801
+ type: i0.ContentChild,
51802
+ args: ['headerOptions', { read: i0.TemplateRef }]
51803
+ }], tabBody: [{
51804
+ type: i0.ContentChild,
51805
+ args: ['tabBody', { read: i0.TemplateRef }]
51806
+ }], tabs: [{
51807
+ type: i0.Input
51808
+ }], activeTab: [{
51809
+ type: i0.Input
51810
+ }], isAllowdTabFn: [{
51811
+ type: i0.Input
51812
+ }], showHeader: [{
51813
+ type: i0.Input
51814
+ }], activeTabEmitter: [{
51815
+ type: i0.Output
51816
+ }] } });
51817
+
51818
+ var NdfTabsModule = /** @class */ (function () {
51819
+ function NdfTabsModule() {
51820
+ }
51821
+ return NdfTabsModule;
51822
+ }());
51823
+ NdfTabsModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NdfTabsModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
51824
+ NdfTabsModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NdfTabsModule, declarations: [NdfTabsComponent], imports: [i4.CommonModule,
51825
+ i1.TranslateModule], exports: [NdfTabsComponent] });
51826
+ NdfTabsModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NdfTabsModule, imports: [[
51827
+ i4.CommonModule,
51828
+ i1.TranslateModule
51829
+ ]] });
51830
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NdfTabsModule, decorators: [{
51831
+ type: i0.NgModule,
51832
+ args: [{
51833
+ declarations: [NdfTabsComponent],
51834
+ imports: [
51835
+ i4.CommonModule,
51836
+ i1.TranslateModule
51837
+ ],
51838
+ exports: [NdfTabsComponent]
51839
+ }]
51840
+ }] });
51841
+
52162
51842
  /*
52163
51843
  * Public API Surface of nuxeo-development-framework
52164
51844
  */
@@ -52388,7 +52068,6 @@
52388
52068
  exports.EmptyContentTemplateDirective = EmptyContentTemplateDirective;
52389
52069
  exports.EmptyTemplateDirective = EmptyTemplateDirective;
52390
52070
  exports.EnvManager = EnvManager;
52391
- exports.Evaluator = Evaluator;
52392
52071
  exports.EvaluatorLabelPipe = EvaluatorLabelPipe;
52393
52072
  exports.EvaluatorsService = EvaluatorsService;
52394
52073
  exports.ExtensionLoaderService = ExtensionLoaderService;