nuxeo-development-framework 6.1.3 → 6.1.5
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.
- package/bundles/nuxeo-development-framework.umd.js +390 -350
- package/bundles/nuxeo-development-framework.umd.js.map +1 -1
- package/esm2015/lib/components/ndf-filters/components/__parts/filter-option-text/filter-option-text.component.js +4 -3
- package/esm2015/lib/components/ndf-filters/models/base-field-config.js +1 -1
- package/esm2015/lib/components/ndf-filters/models/filter-option.model.js +1 -1
- package/esm2015/lib/components/ndf-filters/ndf-filters-panel.module.js +5 -3
- package/esm2015/lib/components/ndf-filters/pipes/evaluate-label.pipe.js +40 -0
- package/esm2015/lib/components/ndf-filters/pipes/index.js +4 -3
- package/esm2015/lib/components/ndf-filters/services/aggregation-field.service.js +2 -1
- package/esm2015/lib/components/reports/ndf-reports/containers/ndf-reports/ndf-reports.component.js +2 -2
- package/esm2015/lib/shared/evaluator/types.js +1 -1
- package/fesm2015/nuxeo-development-framework.js +360 -322
- package/fesm2015/nuxeo-development-framework.js.map +1 -1
- package/lib/components/ndf-filters/models/base-field-config.d.ts +2 -1
- package/lib/components/ndf-filters/models/filter-option.model.d.ts +3 -0
- package/lib/components/ndf-filters/ndf-filters-panel.module.d.ts +31 -30
- package/lib/components/ndf-filters/pipes/evaluate-label.pipe.d.ts +14 -0
- package/lib/components/ndf-filters/pipes/index.d.ts +3 -2
- package/lib/shared/evaluator/types.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@angular/forms'), require('@angular/material/dialog'), require('@angular/router'), require('@ngx-translate/core'), require('rxjs/operators'), require('rxjs'), require('@angular/animations'), require('ngx-toastr'), require('crypto-js'), require('@angular/cdk/bidi'), require('@angular/common/http'), require('keycloak-angular'), require('ngx-cookie-service'), require('@angular/cdk/coercion'), require('@angular/material/icon'), require('@angular/material/progress-spinner'), require('@angular/material/tooltip'), require('lodash-es'), require('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('
|
|
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', '
|
|
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.
|
|
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,
|
|
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';
|
|
6
6
|
|
|
7
7
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
8
|
|
|
@@ -76,9 +76,9 @@
|
|
|
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);
|
|
79
80
|
var i5__namespace$4 = /*#__PURE__*/_interopNamespace(i5$4);
|
|
80
81
|
var moment__namespace$1 = /*#__PURE__*/_interopNamespace(moment$8);
|
|
81
|
-
var stringHash__default = /*#__PURE__*/_interopDefaultLegacy(stringHash);
|
|
82
82
|
var i5__namespace$5 = /*#__PURE__*/_interopNamespace(i5$5);
|
|
83
83
|
var Dynamsoft__default = /*#__PURE__*/_interopDefaultLegacy(Dynamsoft);
|
|
84
84
|
var i4__namespace$3 = /*#__PURE__*/_interopNamespace(i4$3);
|
|
@@ -16260,6 +16260,7 @@
|
|
|
16260
16260
|
en: ___default["default"].get(item, config === null || config === void 0 ? void 0 : config.bindLabel.en),
|
|
16261
16261
|
}
|
|
16262
16262
|
: null,
|
|
16263
|
+
labelTemplate: config === null || config === void 0 ? void 0 : config.labelTemplate,
|
|
16263
16264
|
};
|
|
16264
16265
|
if (config === null || config === void 0 ? void 0 : config.tooltip) {
|
|
16265
16266
|
var _a = config === null || config === void 0 ? void 0 : config.tooltip, properties = _a.properties, tooltipConfig = __rest(_a, ["properties"]);
|
|
@@ -16411,6 +16412,384 @@
|
|
|
16411
16412
|
}]
|
|
16412
16413
|
}], ctorParameters: function () { return [{ type: i1__namespace.TranslateService }]; } });
|
|
16413
16414
|
|
|
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
|
+
var EvaluatorLabelPipe = /** @class */ (function () {
|
|
16758
|
+
/**
|
|
16759
|
+
*
|
|
16760
|
+
*/
|
|
16761
|
+
function EvaluatorLabelPipe(translate) {
|
|
16762
|
+
this.translate = translate;
|
|
16763
|
+
}
|
|
16764
|
+
EvaluatorLabelPipe.prototype.transform = function (option, language) {
|
|
16765
|
+
if (!option || !(option === null || option === void 0 ? void 0 : option.labelTemplate)) {
|
|
16766
|
+
return '';
|
|
16767
|
+
}
|
|
16768
|
+
try {
|
|
16769
|
+
var text = Evaluator.interpolate(option.labelTemplate, {
|
|
16770
|
+
language: language,
|
|
16771
|
+
option: option,
|
|
16772
|
+
moment: moment__namespace,
|
|
16773
|
+
translate: this.translate,
|
|
16774
|
+
value: option.value,
|
|
16775
|
+
});
|
|
16776
|
+
return text;
|
|
16777
|
+
}
|
|
16778
|
+
catch (error) {
|
|
16779
|
+
return option.label;
|
|
16780
|
+
}
|
|
16781
|
+
};
|
|
16782
|
+
return EvaluatorLabelPipe;
|
|
16783
|
+
}());
|
|
16784
|
+
EvaluatorLabelPipe.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: EvaluatorLabelPipe, deps: [{ token: i1__namespace.TranslateService }], target: i0__namespace.ɵɵFactoryTarget.Pipe });
|
|
16785
|
+
EvaluatorLabelPipe.ɵpipe = i0__namespace.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: EvaluatorLabelPipe, name: "evaluateLabel" });
|
|
16786
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: EvaluatorLabelPipe, decorators: [{
|
|
16787
|
+
type: i0.Pipe,
|
|
16788
|
+
args: [{
|
|
16789
|
+
name: 'evaluateLabel',
|
|
16790
|
+
}]
|
|
16791
|
+
}], ctorParameters: function () { return [{ type: i1__namespace.TranslateService }]; } });
|
|
16792
|
+
|
|
16414
16793
|
var LocalizedLabelPipe = /** @class */ (function () {
|
|
16415
16794
|
/**
|
|
16416
16795
|
*
|
|
@@ -16444,7 +16823,7 @@
|
|
|
16444
16823
|
return FilterOptionTextComponent;
|
|
16445
16824
|
}());
|
|
16446
16825
|
FilterOptionTextComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: FilterOptionTextComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
16447
|
-
FilterOptionTextComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: FilterOptionTextComponent, selector: "filter-option-text", inputs: { option: "option", showCount: "showCount", language: "language" }, host: { classAttribute: "fot" }, ngImport: i0__namespace, template: "<span
|
|
16826
|
+
FilterOptionTextComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: FilterOptionTextComponent, selector: "filter-option-text", inputs: { option: "option", showCount: "showCount", language: "language" }, host: { classAttribute: "fot" }, ngImport: i0__namespace, template: "<span\r\n class=\"fot__label\"\r\n [matTooltip]=\"option?.tooltip | optionTooltip : language\"\r\n>\r\n {{\r\n option?.labelTemplate\r\n ? (option | evaluateLabel : language)\r\n : (option | localizedLabel : language)\r\n }}\r\n</span>\r\n\r\n<small class=\"fot__count\" *ngIf=\"showCount\">{{ option.count }}</small>\r\n", styles: [".fot{display:grid;grid-template-columns:1fr auto;align-items:center;grid-gap:.3rem;gap:.3rem;margin-inline:var(--fot-margin-inline, 0);font-size:var(--fot-font-size, .8rem);line-height:var(--fot-line-height, 1.3);width:var(--fot-width, 100%)}.fot__label{color:var(--fot-label-color, currentColor);white-space:var(--fot-label-white-space, pre-wrap);word-break:var(--fot-label-word-break, break-word);max-width:var(--fot-label-width, 100%)}.fot__count{color:var(--fot-count-color, var(--secondary, currentColor));background:var(--fot-count-background, #eee);border-radius:var(--fot-count-radius, 9px);padding:var(--fot-count-padding, .2rem .3rem);min-width:var(--fot-count-min-width, 1.8rem);text-align:center}\n"], directives: [{ type: i7__namespace.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltipPosition", "matTooltipDisabled", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { type: i4__namespace$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "optionTooltip": TooltipPipe, "evaluateLabel": EvaluatorLabelPipe, "localizedLabel": LocalizedLabelPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush, encapsulation: i0__namespace.ViewEncapsulation.None });
|
|
16448
16827
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: FilterOptionTextComponent, decorators: [{
|
|
16449
16828
|
type: i0.Component,
|
|
16450
16829
|
args: [{
|
|
@@ -20468,348 +20847,6 @@
|
|
|
20468
20847
|
type: i0.Input
|
|
20469
20848
|
}] } });
|
|
20470
20849
|
|
|
20471
|
-
/**
|
|
20472
|
-
* Creates a secure context for function evaluation that prevents access to the window object.
|
|
20473
|
-
* @returns {Record<string, any>} A secure context object with safe properties.
|
|
20474
|
-
*/
|
|
20475
|
-
function createSecureContext() {
|
|
20476
|
-
// Create a secure context with only safe properties
|
|
20477
|
-
return {
|
|
20478
|
-
// Add any safe globals here that should be accessible
|
|
20479
|
-
console: {
|
|
20480
|
-
log: console.log,
|
|
20481
|
-
warn: console.warn,
|
|
20482
|
-
error: console.error
|
|
20483
|
-
},
|
|
20484
|
-
// Add other safe objects/functions as needed
|
|
20485
|
-
Math: Math,
|
|
20486
|
-
Date: Date,
|
|
20487
|
-
Number: Number,
|
|
20488
|
-
String: String,
|
|
20489
|
-
Boolean: Boolean,
|
|
20490
|
-
Array: Array,
|
|
20491
|
-
Object: Object,
|
|
20492
|
-
JSON: JSON,
|
|
20493
|
-
// Prevent access to window
|
|
20494
|
-
window: undefined,
|
|
20495
|
-
self: undefined,
|
|
20496
|
-
globalThis: undefined,
|
|
20497
|
-
_: ___default["default"] // Include lodash if needed, but ensure it's used safely
|
|
20498
|
-
};
|
|
20499
|
-
}
|
|
20500
|
-
/**
|
|
20501
|
-
* A utility class for evaluating expressions, interpolating strings, and working with templates.
|
|
20502
|
-
* This class provides static methods for dynamic evaluation of code, string interpolation,
|
|
20503
|
-
* and template processing with caching capabilities.
|
|
20504
|
-
*/
|
|
20505
|
-
var Evaluator = /** @class */ (function () {
|
|
20506
|
-
function Evaluator() {
|
|
20507
|
-
}
|
|
20508
|
-
/**
|
|
20509
|
-
* Creates a function from a string or returns the function if already provided.
|
|
20510
|
-
* Uses a secure context to prevent access to the window object by default.
|
|
20511
|
-
* @param {string|Function} func - The function or string to convert to a function.
|
|
20512
|
-
* @param {...any} params - The parameters to pass to the function.
|
|
20513
|
-
* @param {EvaluatorOptions} [options={}] - Optional configuration for the evaluation.
|
|
20514
|
-
* @returns {Function} - The resulting function.
|
|
20515
|
-
*/
|
|
20516
|
-
Evaluator.evaluator = function (func) {
|
|
20517
|
-
var params = [];
|
|
20518
|
-
for (var _i = 1; _i < arguments.length; _i++) {
|
|
20519
|
-
params[_i - 1] = arguments[_i];
|
|
20520
|
-
}
|
|
20521
|
-
// Extract options if the last parameter is an options object
|
|
20522
|
-
var options = {};
|
|
20523
|
-
if (params.length > 0 &&
|
|
20524
|
-
params[params.length - 1] &&
|
|
20525
|
-
typeof params[params.length - 1] === 'object' &&
|
|
20526
|
-
'securityMode' in params[params.length - 1]) {
|
|
20527
|
-
options = params.pop();
|
|
20528
|
-
}
|
|
20529
|
-
if (typeof func === 'function') {
|
|
20530
|
-
return func;
|
|
20531
|
-
}
|
|
20532
|
-
if (typeof params[0] === 'object') {
|
|
20533
|
-
params = _.keys(params[0]);
|
|
20534
|
-
}
|
|
20535
|
-
// Check if we should use secure mode (default) or unsafe mode
|
|
20536
|
-
var securityMode = options.securityMode || 'secure';
|
|
20537
|
-
if (securityMode === 'unsafe') {
|
|
20538
|
-
// In unsafe mode, create a function with access to all globals
|
|
20539
|
-
return new (Function.bind.apply(Function, __spreadArray(__spreadArray([void 0], __read(params)), [func])))();
|
|
20540
|
-
}
|
|
20541
|
-
var sandbox = createSecureContext();
|
|
20542
|
-
var sandboxKeys = Object.keys(sandbox);
|
|
20543
|
-
var sandboxAssignments = sandboxKeys.map(function (key) { return "const " + key + " = sandbox." + key + ";"; }).join('');
|
|
20544
|
-
var wrapper = new (Function.bind.apply(Function, __spreadArray(__spreadArray([void 0], __read(params)), ['sandbox', "" + sandboxAssignments + func])))();
|
|
20545
|
-
return function () {
|
|
20546
|
-
var args = [];
|
|
20547
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
20548
|
-
args[_i] = arguments[_i];
|
|
20549
|
-
}
|
|
20550
|
-
return wrapper.apply(void 0, __spreadArray(__spreadArray([], __read(args)), [sandbox]));
|
|
20551
|
-
};
|
|
20552
|
-
};
|
|
20553
|
-
/**
|
|
20554
|
-
* Replaces template expressions in a string with values from data.
|
|
20555
|
-
* Supports function calls within templates and fallback values using || syntax.
|
|
20556
|
-
* By default, ensures evaluation happens in a secure context to prevent access to window object.
|
|
20557
|
-
* @param {string} rawTemplate - The template string containing expressions to interpolate.
|
|
20558
|
-
* @param {Record<string, any>} data - The data object containing values to use for interpolation.
|
|
20559
|
-
* @param {EvaluatorOptions} [options={}] - Optional configuration for the interpolation process.
|
|
20560
|
-
* @returns {string} - The interpolated string with all expressions replaced with actual values.
|
|
20561
|
-
*/
|
|
20562
|
-
Evaluator.interpolateString = function (rawTemplate, data, options) {
|
|
20563
|
-
if (options === void 0) { options = {}; }
|
|
20564
|
-
if (!rawTemplate) {
|
|
20565
|
-
return '';
|
|
20566
|
-
}
|
|
20567
|
-
if (typeof rawTemplate !== 'string') {
|
|
20568
|
-
return rawTemplate.toString();
|
|
20569
|
-
}
|
|
20570
|
-
// Check if we should use secure mode (default) or unsafe mode
|
|
20571
|
-
var securityMode = options.securityMode || 'secure';
|
|
20572
|
-
// Create a secure data object if needed
|
|
20573
|
-
var secureData = securityMode === 'unsafe'
|
|
20574
|
-
? data
|
|
20575
|
-
: Object.assign(Object.assign(Object.assign({}, createSecureContext()), data), {
|
|
20576
|
-
// Ensure these remain undefined
|
|
20577
|
-
window: undefined, self: undefined, globalThis: undefined
|
|
20578
|
-
});
|
|
20579
|
-
return rawTemplate.replace(/({{\s*(.*?)\s*}})/g, function (match, $1, expression) {
|
|
20580
|
-
if (expression.indexOf('(') !== -1) {
|
|
20581
|
-
return expression.replace(/([^(]+)\(([^)]+)\s*\);?/, function (_$1, fnName, argsStr) {
|
|
20582
|
-
fnName = _.trim(fnName);
|
|
20583
|
-
var func = _.get(secureData, fnName);
|
|
20584
|
-
if (func) {
|
|
20585
|
-
if (argsStr) {
|
|
20586
|
-
var args = argsStr.split(',').map(function (arg) {
|
|
20587
|
-
var trimmed = _.trim(arg);
|
|
20588
|
-
if (/^['"]/.test(trimmed))
|
|
20589
|
-
return trimmed.slice(1, -1);
|
|
20590
|
-
return _.get(secureData, trimmed);
|
|
20591
|
-
});
|
|
20592
|
-
return Evaluator.evaluate(func, args, '', false, secureData, options);
|
|
20593
|
-
}
|
|
20594
|
-
return Evaluator.evaluate(func, [], '', false, secureData, options);
|
|
20595
|
-
}
|
|
20596
|
-
return '';
|
|
20597
|
-
});
|
|
20598
|
-
}
|
|
20599
|
-
else {
|
|
20600
|
-
var dataPath = expression;
|
|
20601
|
-
if (expression.indexOf('?') !== -1) {
|
|
20602
|
-
dataPath = expression.replace(/\?\./g, '.');
|
|
20603
|
-
}
|
|
20604
|
-
var parts = dataPath.split('||').map(function (item) { return item.trim(); });
|
|
20605
|
-
var value = '';
|
|
20606
|
-
var path = '';
|
|
20607
|
-
for (var i = 0; i < parts.length; i++) {
|
|
20608
|
-
path = parts[i];
|
|
20609
|
-
if (___default["default"].has(secureData, path)) {
|
|
20610
|
-
value = ___default["default"].get(secureData, path);
|
|
20611
|
-
break;
|
|
20612
|
-
}
|
|
20613
|
-
}
|
|
20614
|
-
if (options.data) {
|
|
20615
|
-
_.set(options.data, path, value);
|
|
20616
|
-
}
|
|
20617
|
-
return value;
|
|
20618
|
-
}
|
|
20619
|
-
});
|
|
20620
|
-
};
|
|
20621
|
-
/**
|
|
20622
|
-
* Performs an evaluation using the evaluation context of this component.
|
|
20623
|
-
* By default, ensures evaluation happens in a secure context to prevent access to window object.
|
|
20624
|
-
* @param {string|Function|object} func - The function or string to evaluate.
|
|
20625
|
-
* @param {object} args - The arguments to pass to the evaluation.
|
|
20626
|
-
* @param {string} ret - The name of the variable within the evaluation context to return.
|
|
20627
|
-
* @param {boolean} interpolate - Determines if it should replace all {{ }} token references with actual data.
|
|
20628
|
-
* @param {object} context - - The evaluation context.
|
|
20629
|
-
* @param {EvaluatorOptions } options - The options to pass to the evaluation.
|
|
20630
|
-
* @returns {*} - The result of the evaluation.
|
|
20631
|
-
*/
|
|
20632
|
-
Evaluator.evaluate = function (func, args, ret, interpolate, context, options) {
|
|
20633
|
-
if (args === void 0) { args = {}; }
|
|
20634
|
-
if (ret === void 0) { ret = 'show'; }
|
|
20635
|
-
if (interpolate === void 0) { interpolate = false; }
|
|
20636
|
-
if (context === void 0) { context = {}; }
|
|
20637
|
-
if (options === void 0) { options = {}; }
|
|
20638
|
-
var returnVal = null;
|
|
20639
|
-
var field = args.field ? args.field : { key: 'unknown' };
|
|
20640
|
-
var fieldKey = field.key;
|
|
20641
|
-
if (typeof func === 'string') {
|
|
20642
|
-
if (ret) {
|
|
20643
|
-
func = "var " + ret + ";" + func + ";return " + ret;
|
|
20644
|
-
}
|
|
20645
|
-
if (interpolate) {
|
|
20646
|
-
func = Evaluator.interpolate(func, args, options);
|
|
20647
|
-
}
|
|
20648
|
-
try {
|
|
20649
|
-
// Pass the security mode option to the evaluator
|
|
20650
|
-
var evaluatorOptions = { securityMode: options.securityMode || 'secure' };
|
|
20651
|
-
func = Evaluator.evaluator(func, args, context, evaluatorOptions);
|
|
20652
|
-
args = Array.isArray(args) ? args : _.values(args);
|
|
20653
|
-
}
|
|
20654
|
-
catch (err) {
|
|
20655
|
-
console.warn("An error occured within the custom function for " + fieldKey, err);
|
|
20656
|
-
returnVal = null;
|
|
20657
|
-
func = false;
|
|
20658
|
-
}
|
|
20659
|
-
}
|
|
20660
|
-
if (typeof func === 'function') {
|
|
20661
|
-
try {
|
|
20662
|
-
returnVal = Evaluator.execute(func, args, context, options);
|
|
20663
|
-
}
|
|
20664
|
-
catch (err) {
|
|
20665
|
-
returnVal = null;
|
|
20666
|
-
console.warn("An error occured within custom function for " + fieldKey, err);
|
|
20667
|
-
}
|
|
20668
|
-
}
|
|
20669
|
-
else if (func) {
|
|
20670
|
-
console.warn("Unknown function type for " + fieldKey);
|
|
20671
|
-
}
|
|
20672
|
-
return returnVal;
|
|
20673
|
-
};
|
|
20674
|
-
/**
|
|
20675
|
-
* Executes a function with provided arguments and context.
|
|
20676
|
-
* By default, ensures execution happens in a secure context to prevent access to window object.
|
|
20677
|
-
* @param {Function} func - The function to execute.
|
|
20678
|
-
* @param {any[]|Record<string, any>} args - The arguments to pass to the function, either as an array or object.
|
|
20679
|
-
* @param {Record<string, any>} [context={}] - The context (this) to use when executing the function.
|
|
20680
|
-
* @param {EvaluatorOptions} [options={}] - Optional configuration for the execution.
|
|
20681
|
-
* @returns {any} - The result of the function execution.
|
|
20682
|
-
*/
|
|
20683
|
-
Evaluator.execute = function (func, args, context, options) {
|
|
20684
|
-
if (context === void 0) { context = {}; }
|
|
20685
|
-
if (options === void 0) { options = {}; }
|
|
20686
|
-
// Check if we should use secure mode (default) or unsafe mode
|
|
20687
|
-
var securityMode = options.securityMode || 'secure';
|
|
20688
|
-
if (securityMode === 'unsafe') {
|
|
20689
|
-
// In unsafe mode, execute with the original context
|
|
20690
|
-
return Array.isArray(args) ? func.apply(context, args) : func.call(context, args);
|
|
20691
|
-
}
|
|
20692
|
-
else {
|
|
20693
|
-
// In secure mode, create a secure context by merging the provided context with our secure context
|
|
20694
|
-
var secureContext = Object.assign(Object.assign(Object.assign({}, createSecureContext()), context), {
|
|
20695
|
-
// Ensure these remain undefined even if they were in the provided context
|
|
20696
|
-
window: undefined, self: undefined, globalThis: undefined
|
|
20697
|
-
});
|
|
20698
|
-
// Execute the function with the secure context
|
|
20699
|
-
return Array.isArray(args) ? func.apply(secureContext, args) : func.call(secureContext, args);
|
|
20700
|
-
}
|
|
20701
|
-
};
|
|
20702
|
-
/**
|
|
20703
|
-
* Creates a template function from a string with caching for performance.
|
|
20704
|
-
* By default, ensures the template function executes in a secure context.
|
|
20705
|
-
* @param {string} template - The template string to compile into a function.
|
|
20706
|
-
* @param {string} [hash] - Optional hash to use as cache key. If not provided, a hash will be generated from the template.
|
|
20707
|
-
* @param {EvaluatorOptions} [options={}] - Optional configuration for the template.
|
|
20708
|
-
* @returns {Function|undefined} - The compiled template function, or undefined if compilation fails.
|
|
20709
|
-
*/
|
|
20710
|
-
Evaluator.template = function (template, hash, options) {
|
|
20711
|
-
if (options === void 0) { options = {}; }
|
|
20712
|
-
hash = hash || stringHash__default["default"](template).toString();
|
|
20713
|
-
// If hash contains options object, extract it
|
|
20714
|
-
if (typeof hash === 'object' && 'securityMode' in hash) {
|
|
20715
|
-
options = hash;
|
|
20716
|
-
hash = stringHash__default["default"](template).toString();
|
|
20717
|
-
}
|
|
20718
|
-
// Check if we have a cached version
|
|
20719
|
-
var cacheKey = hash + (options.securityMode || 'secure');
|
|
20720
|
-
if (Evaluator.cache[cacheKey]) {
|
|
20721
|
-
return Evaluator.cache[cacheKey];
|
|
20722
|
-
}
|
|
20723
|
-
try {
|
|
20724
|
-
template = template.replace(/ctx\./g, '');
|
|
20725
|
-
// Create the template function using lodash
|
|
20726
|
-
var templateFunc_1 = ___default["default"].template(template, Evaluator.templateSettings);
|
|
20727
|
-
// Check if we should use secure mode (default) or unsafe mode
|
|
20728
|
-
var securityMode = options.securityMode || 'secure';
|
|
20729
|
-
if (securityMode === 'unsafe') {
|
|
20730
|
-
// In unsafe mode, return the original template function
|
|
20731
|
-
return (Evaluator.cache[cacheKey] = templateFunc_1);
|
|
20732
|
-
}
|
|
20733
|
-
else {
|
|
20734
|
-
// In secure mode, wrap the template function to ensure it runs in a secure context
|
|
20735
|
-
var secureTemplateFunc = function (data) {
|
|
20736
|
-
// Create a secure context for the template
|
|
20737
|
-
var secureData = Object.assign(Object.assign(Object.assign({}, createSecureContext()), data), {
|
|
20738
|
-
// Ensure these remain undefined
|
|
20739
|
-
window: undefined, self: undefined, globalThis: undefined
|
|
20740
|
-
});
|
|
20741
|
-
return templateFunc_1(secureData);
|
|
20742
|
-
};
|
|
20743
|
-
// Cache and return the secure template function
|
|
20744
|
-
return (Evaluator.cache[cacheKey] = secureTemplateFunc);
|
|
20745
|
-
}
|
|
20746
|
-
}
|
|
20747
|
-
catch (err) {
|
|
20748
|
-
console.warn('Error while processing template', err, template);
|
|
20749
|
-
return undefined;
|
|
20750
|
-
}
|
|
20751
|
-
};
|
|
20752
|
-
/**
|
|
20753
|
-
* Interpolates a template with data, handling both function templates and string templates.
|
|
20754
|
-
* By default, ensures interpolation happens in a secure context to prevent access to window object.
|
|
20755
|
-
* @param {string|Function} rawTemplate - The template to interpolate, either as a string or a function.
|
|
20756
|
-
* @param {Record<string, any>} data - The data object to use for interpolation.
|
|
20757
|
-
* @param {EvaluatorOptions} options - Options for the interpolation process.
|
|
20758
|
-
* @returns {string|any} - The result of the interpolation, typically a string but could be any type depending on the template.
|
|
20759
|
-
*/
|
|
20760
|
-
Evaluator.interpolate = function (rawTemplate, data, options) {
|
|
20761
|
-
if (options === void 0) { options = {}; }
|
|
20762
|
-
if (typeof rawTemplate === 'function') {
|
|
20763
|
-
try {
|
|
20764
|
-
// If the template is a function, execute it with the data
|
|
20765
|
-
// We can't directly secure a provided function, but we can use execute
|
|
20766
|
-
// to run it in a secure context if needed
|
|
20767
|
-
if (options.securityMode !== 'unsafe') {
|
|
20768
|
-
var secureData = Object.assign(Object.assign(Object.assign({}, createSecureContext()), data), { window: undefined, self: undefined, globalThis: undefined });
|
|
20769
|
-
return rawTemplate(secureData);
|
|
20770
|
-
}
|
|
20771
|
-
else {
|
|
20772
|
-
return rawTemplate(data);
|
|
20773
|
-
}
|
|
20774
|
-
}
|
|
20775
|
-
catch (err) {
|
|
20776
|
-
console.warn('Error interpolating template', err, data);
|
|
20777
|
-
return err.message;
|
|
20778
|
-
}
|
|
20779
|
-
}
|
|
20780
|
-
rawTemplate = String(rawTemplate);
|
|
20781
|
-
// Pass the security mode option to the template method
|
|
20782
|
-
var template = Evaluator.template(rawTemplate, undefined, options);
|
|
20783
|
-
if (typeof template === 'function') {
|
|
20784
|
-
try {
|
|
20785
|
-
return template(data);
|
|
20786
|
-
}
|
|
20787
|
-
catch (err) {
|
|
20788
|
-
console.warn('Error interpolating template', err, rawTemplate, data);
|
|
20789
|
-
return err.message;
|
|
20790
|
-
}
|
|
20791
|
-
}
|
|
20792
|
-
return template;
|
|
20793
|
-
};
|
|
20794
|
-
return Evaluator;
|
|
20795
|
-
}());
|
|
20796
|
-
/**
|
|
20797
|
-
* Cache for storing compiled template functions to improve performance.
|
|
20798
|
-
* Keys are string hashes of the template, values are the compiled functions.
|
|
20799
|
-
*/
|
|
20800
|
-
Evaluator.cache = {};
|
|
20801
|
-
/**
|
|
20802
|
-
* Settings for template processing, defining regex patterns for different template operations.
|
|
20803
|
-
* - interpolate: Pattern for variable interpolation ({{ variable }})
|
|
20804
|
-
* - evaluate: Pattern for code evaluation ({% code %})
|
|
20805
|
-
* - escape: Pattern for HTML escaping ({{{ variable }}})
|
|
20806
|
-
*/
|
|
20807
|
-
Evaluator.templateSettings = {
|
|
20808
|
-
interpolate: /{{([\s\S]+?)}}/g,
|
|
20809
|
-
evaluate: /\{%([\s\S]+?)%\}/g,
|
|
20810
|
-
escape: /\{\{\{([\s\S]+?)\}\}\}/g
|
|
20811
|
-
};
|
|
20812
|
-
|
|
20813
20850
|
var NDF_EDITOR_TYPE = {
|
|
20814
20851
|
REPORTS: 'report',
|
|
20815
20852
|
TABLES: 'table'
|
|
@@ -21637,6 +21674,7 @@
|
|
|
21637
21674
|
TooltipPipe,
|
|
21638
21675
|
FiltersByRolesPipe,
|
|
21639
21676
|
CheckConditionPipe$1,
|
|
21677
|
+
EvaluatorLabelPipe
|
|
21640
21678
|
];
|
|
21641
21679
|
var NdfFiltersPanelModule = /** @class */ (function () {
|
|
21642
21680
|
/**
|
|
@@ -21707,7 +21745,8 @@
|
|
|
21707
21745
|
SortListPipe,
|
|
21708
21746
|
TooltipPipe,
|
|
21709
21747
|
FiltersByRolesPipe,
|
|
21710
|
-
CheckConditionPipe$1,
|
|
21748
|
+
CheckConditionPipe$1,
|
|
21749
|
+
EvaluatorLabelPipe, FilterOptionTextComponent,
|
|
21711
21750
|
FilterSearchInputComponent,
|
|
21712
21751
|
FilterCollapseControlComponent,
|
|
21713
21752
|
FieldHeaderComponent,
|
|
@@ -48714,7 +48753,7 @@
|
|
|
48714
48753
|
return NdfReportsComponent;
|
|
48715
48754
|
}(DestroySubject));
|
|
48716
48755
|
NdfReportsComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NdfReportsComponent, deps: [{ token: i1__namespace.TranslateService }, { token: FiltersMapperService }, { token: NdfReportsService }, { token: ChartManagerService }, { token: ReportTransformService }, { token: i0__namespace.ChangeDetectorRef }, { token: FilterQueryService }, { token: ReportsStateService }, { token: ReportConfigurationService }, { token: i1__namespace$5.Router }, { token: i0__namespace.NgZone }, { token: ReportsHooksService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
48717
|
-
NdfReportsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: NdfReportsComponent, selector: "app-ndf-reports", inputs: { jsonEditorEnabled: "jsonEditorEnabled", reportsKey: "reportsKey", navigateRoute: "navigateRoute", loadCondition: "loadCondition", config: "config" }, outputs: { onQueryChange: "onQueryChange" }, host: { properties: { "dir": "direction" }, classAttribute: "ndf-reports" }, queries: [{ propertyName: "filterCustomTemplate", first: true, predicate: CUSTOM_TEMPLATE, descendants: true, read: i0.TemplateRef }, { propertyName: "headerPanelTemplate", first: true, predicate: HEADER_PANEL_TEMPLATE, descendants: true, read: i0.TemplateRef }, { propertyName: "emptyContentTemplate", first: true, predicate: EMPTY_CONTENT_TEMPLATE, descendants: true, read: i0.TemplateRef }], viewQueries: [{ propertyName: "fluidDirective", first: true, predicate: FluidHeightDirective, descendants: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0__namespace, template: "<div\r\n class=\"ndf-reports__container\"\r\n [class.panel-opened]=\"isPanelOpened && filtersConfig\"\r\n [dir]=\"direction\"\r\n ndfFluidHeight\r\n>\r\n <div\r\n class=\"absolute flex justify-center items-center loading-result\"\r\n *ngIf=\"isLoadingResult && callLoadCondition()\"\r\n >\r\n <mat-spinner class=\"mt-5 mx-auto\" [diameter]=\"48\"></mat-spinner>\r\n </div>\r\n\r\n <div class=\"ndf-reports__panel print:hidden\">\r\n <ng-container\r\n [ngTemplateOutlet]=\"headerPanelTemplate\"\r\n [ngTemplateOutletContext]=\"{\r\n $implicit: aggregations,\r\n filterChanged: filterChanged,\r\n activeQuery: activeQuery,\r\n triggerUpdate: triggerUpdate,\r\n reset: resetFilters,\r\n config: config\r\n }\"\r\n ></ng-container>\r\n\r\n <app-filters-panel\r\n *ngIf=\"!!filtersConfig?.fields?.length && callLoadCondition()\"\r\n [fields]=\"filtersConfig?.fields\"\r\n [aggregations]=\"aggregations\"\r\n (filterChanged)=\"filterChanged($event)\"\r\n [activeQuery]=\"activeFiltersQuery$ | async\"\r\n class=\"ndf-reports__filters\"\r\n [customTemplateRef]=\"filterCustomTemplate\"\r\n ></app-filters-panel>\r\n </div>\r\n\r\n <ng-container *ngIf=\"callLoadCondition(); else emptyContent\">\r\n <div\r\n class=\"ndf-reports__content\"\r\n (scrolled)=\"onContentScroll($event)\"\r\n *ngIf=\"reportsData$ | async as reports\"\r\n >\r\n <div class=\"ndf-reports__header flex pt-4 print:hidden\">\r\n <button\r\n mat-stroked-button\r\n class=\"toggle-button\"\r\n (click)=\"togglePanel()\"\r\n >\r\n <mat-icon> filter_alt</mat-icon>\r\n </button>\r\n <app-editor-button\r\n *ngIf=\"jsonEditorEnabled && reportsKey\"\r\n [key]=\"reportsKey\"\r\n [type]=\"editorType\"\r\n ></app-editor-button>\r\n <button\r\n mat-stroked-button\r\n *ngIf=\"config?.options?.print\"\r\n class=\"print-button\"\r\n (click)=\"printAll()\"\r\n >\r\n <mat-icon> print</mat-icon>\r\n </button>\r\n </div>\r\n\r\n <div class=\"reports-grid\" *ngIf=\"!isLoadingResult\">\r\n <app-ndf-report\r\n *ngFor=\"let config of reportConfig.items; trackBy: trackByFn\"\r\n [config]=\"config\"\r\n [data]=\"reports?.response\"\r\n [criteria]=\"filtersParams$ | async\"\r\n [direction]=\"direction\"\r\n [attr.data-width]=\"config?.layout?.width || 4\"\r\n [attr.data-height]=\"config?.layout?.height || 'auto'\"\r\n [attr.data-start-column]=\"config?.layout?.columnPosition || 'auto'\"\r\n [attr.data-start-row]=\"config?.layout?.rowPosition || 'auto'\"\r\n [class.wide]=\"config?.layout?.width >= 6\"\r\n [style]=\"config?.layout?.style\"\r\n class=\"reports-grid__item {{ config?.layout?.styleClass }} \"\r\n (onNavigate)=\"onNavigate($event)\"\r\n (onOpen)=\"openReportDetails($event, config)\"\r\n ></app-ndf-report>\r\n </div>\r\n </div>\r\n </ng-container>\r\n <div\r\n class=\"ndf-reports__details print:hidden\"\r\n [class.opened]=\"showDetails\"\r\n [@slideInOut]=\"showDetails ? 'open' : 'closed'\"\r\n (@slideInOut.done)=\"onDetailsAnimationEnd($event)\"\r\n >\r\n <app-ndf-table\r\n *ngIf=\"reportDetails$ | async as report\"\r\n [config]=\"report.config\"\r\n [activeQuery]=\"activeFiltersQuery$ | async\"\r\n [customCriteria]=\"detailsFiltersParams$ | async\"\r\n >\r\n <ng-template searchTableTemplate let-toggle=\"togglePanel\">\r\n <div class=\"ndf-reports__details__header flex gap-2\">\r\n <button mat-stroked-button class=\"toggle-button\" (click)=\"toggle()\">\r\n <mat-icon> filter_alt</mat-icon>\r\n </button>\r\n <button\r\n mat-stroked-button\r\n class=\"close-button\"\r\n (click)=\"closeDetailsPanel()\"\r\n >\r\n <mat-icon> close</mat-icon>\r\n </button>\r\n </div>\r\n <h3>\r\n {{ report.label | translate }}\r\n </h3>\r\n </ng-template>\r\n </app-ndf-table>\r\n </div>\r\n</div>\r\n\r\n<ng-template #emptyContent>\r\n <div class=\"ndf-reports__content flex items-center flex-grow-1\">\r\n <ng-container\r\n [ngTemplateOutlet]=\"emptyContentTemplate || defaultEmptyContent\"\r\n ></ng-container>\r\n </div>\r\n</ng-template>\r\n\r\n<ng-template #defaultEmptyContent>\r\n <div class=\"no-data mt-26\">\r\n {{ 'noData' | translate }}\r\n </div>\r\n</ng-template>\r\n", styles: [":host{--table-dev-height: var(--ndf-reports-table-dev-height, auto);--report-height: var(--ndf-reports-report-height, 430px);--cp-height: var(--report-height);padding-inline:var(--ndf-reports-inline-padding, 0);padding-block:var(--ndf-reports-block-padding, .5rem 0);height:100%;position:relative;display:flex;flex-direction:column;background-color:var(--ndf-reports-background, #fff);box-sizing:border-box;max-width:100%;flex:0 0 100%}:host:before,:host:after{box-sizing:border-box}:host[dir=ltr]{--ndf-reports-panel-translateX: -100%;--ndf-reports-details-translateX: 100%}@media print{:host{--report-height: auto;--cp-print-min-height: 80mm;padding:0}}.loading-result{background:var(--loading-result-background, rgba(255, 255, 255, .5));-webkit-backdrop-filter:var(--loading-result-filter, blur(3px));backdrop-filter:var(--loading-result-filter, blur(3px));width:100%;height:100%;z-index:3}.ndf-reports *{box-sizing:border-box;min-height:0}.ndf-reports__header{background-color:var(--ndf-reports-background, #fff);flex-direction:var(--ndf-reports-header-direction, row);justify-content:var(--ndf-reports-header-justify, space-between);align-items:var(--ndf-reports-header-items, center);padding-inline:var(--ndf-reports-header-padding-inline, .5rem);padding-block:var(--ndf-reports-header-padding-block, 0 .5rem);position:var(--ndf-reports-header-position, sticky);top:0;z-index:1}.ndf-reports__header__actions{justify-content:var(--ndf-reports-actions-justify, flex-end)}.ndf-reports__header__custom-actions .toggle-button{min-width:0;padding:0 10px}.ndf-reports__container{--panel-width: var(--ndf-reports-panel-width, 18rem);position:relative;overflow:var(--ndf-reports-container-overflow, hidden);display:grid;transition:all .2s;max-width:100%;width:100%;height:var(--ndf-reports-height, calc( var(--ndf-fluid-height) - calc(var(--ndf-reports-block-padding, 1rem) * 2.5) ));flex-grow:1;grid-gap:var(--ndf-table-container-gap, .5rem);gap:var(--ndf-table-container-gap, .5rem)}.ndf-reports__container.panel-opened{--ndf-details-margin: var(--panel-width);--ndf-reports-panel-translateX: 0;--ndf-reports-content-pis: var(--panel-width)}@media print{.ndf-reports__container{--ndf-reports-container-overflow: visible;height:100%}}.ndf-reports__panel,.ndf-reports__content .ndf-reports__details{overflow:auto;transition:all .2s}.ndf-reports__panel{position:absolute;width:var(--panel-width);height:100%;transform:translate(var(--ndf-reports-panel-translateX, 100%));padding-inline:var(--ndf-reports-panel-inline-padding, .5rem);padding-block:var(--ndf-reports-panel-block-padding, .5rem);background:var(--ndf-reports-panel-background, #fff);z-index:1}.ndf-reports__content{flex-grow:1;padding-inline-start:var(--ndf-reports-content-pis, 1rem);padding-inline-end:var(--ndf-reports-content-pie, 1rem);padding-block:var(--ndf-reports-content-pb, 0 1rem);overflow-y:var(--ndf-reports-content-overflow-y, auto);position:relative;display:flex;flex-direction:column}@media print{.ndf-reports__content{--ndf-reports-content-overflow-y: visible;width:100%;margin:0;padding:0;page-break-after:avoid}}.ndf-reports__details{position:absolute;inset-inline-end:0;width:calc(100% - var(--ndf-details-margin, 0px));height:100%;transform:translate(var(--ndf-reports-details-translateX, -100%));padding-inline:var(--ndf-reports-details-inline-padding, 0rem);flex-grow:1;padding-block:var(--ndf-reports-details-block-padding, 0rem);background:var(--ndf-reports-details-background, #fff);z-index:1;transition:all .2s}.reports-grid{--grid-columns: 12;--column-width: calc(100% / var(--grid-columns));display:grid;grid-gap:var(--reports-grid-gap, 1.5rem);gap:var(--reports-grid-gap, 1.5rem);grid-template-columns:var(--rg-columns, repeat(var(--grid-columns), 1fr));margin-block:var(--reports-grid-margin-block, 1.25rem 0);padding-inline:var(--reports-grid-padding-inline, .5rem)}.reports-grid__item{display:grid;grid-gap:.3rem;gap:.3rem;min-width:0;text-align:center;vertical-align:middle}.reports-grid__item[data-width=\"1\"]{--col-span: span 1}.reports-grid__item[data-start-column=\"1\"]{--col-start: 1}.reports-grid__item[data-start-row=\"1\"]{--row-start: 1}.reports-grid__item[data-height=\"1\"]{--row-span: 1}.reports-grid__item[data-width=\"2\"]{--col-span: span 2}.reports-grid__item[data-start-column=\"2\"]{--col-start: 2}.reports-grid__item[data-start-row=\"2\"]{--row-start: 2}.reports-grid__item[data-height=\"2\"]{--row-span: 2}.reports-grid__item[data-width=\"3\"]{--col-span: span 3}.reports-grid__item[data-start-column=\"3\"]{--col-start: 3}.reports-grid__item[data-start-row=\"3\"]{--row-start: 3}.reports-grid__item[data-height=\"3\"]{--row-span: 3}.reports-grid__item[data-width=\"4\"]{--col-span: span 4}.reports-grid__item[data-start-column=\"4\"]{--col-start: 4}.reports-grid__item[data-start-row=\"4\"]{--row-start: 4}.reports-grid__item[data-height=\"4\"]{--row-span: 4}.reports-grid__item[data-width=\"5\"]{--col-span: span 5}.reports-grid__item[data-start-column=\"5\"]{--col-start: 5}.reports-grid__item[data-start-row=\"5\"]{--row-start: 5}.reports-grid__item[data-height=\"5\"]{--row-span: 5}.reports-grid__item[data-width=\"6\"]{--col-span: span 6}.reports-grid__item[data-start-column=\"6\"]{--col-start: 6}.reports-grid__item[data-start-row=\"6\"]{--row-start: 6}.reports-grid__item[data-height=\"6\"]{--row-span: 6}.reports-grid__item[data-width=\"7\"]{--col-span: span 7}.reports-grid__item[data-start-column=\"7\"]{--col-start: 7}.reports-grid__item[data-start-row=\"7\"]{--row-start: 7}.reports-grid__item[data-height=\"7\"]{--row-span: 7}.reports-grid__item[data-width=\"8\"]{--col-span: span 8}.reports-grid__item[data-start-column=\"8\"]{--col-start: 8}.reports-grid__item[data-start-row=\"8\"]{--row-start: 8}.reports-grid__item[data-height=\"8\"]{--row-span: 8}.reports-grid__item[data-width=\"9\"]{--col-span: span 9}.reports-grid__item[data-start-column=\"9\"]{--col-start: 9}.reports-grid__item[data-start-row=\"9\"]{--row-start: 9}.reports-grid__item[data-height=\"9\"]{--row-span: 9}.reports-grid__item[data-width=\"10\"]{--col-span: span 10}.reports-grid__item[data-start-column=\"10\"]{--col-start: 10}.reports-grid__item[data-start-row=\"10\"]{--row-start: 10}.reports-grid__item[data-height=\"10\"]{--row-span: 10}.reports-grid__item[data-width=\"11\"]{--col-span: span 11}.reports-grid__item[data-start-column=\"11\"]{--col-start: 11}.reports-grid__item[data-start-row=\"11\"]{--row-start: 11}.reports-grid__item[data-height=\"11\"]{--row-span: 11}.reports-grid__item[data-width=\"12\"]{--col-span: span 12}.reports-grid__item[data-start-column=\"12\"]{--col-start: 12}.reports-grid__item[data-start-row=\"12\"]{--row-start: 12}.reports-grid__item[data-height=\"12\"]{--row-span: 12}@media screen{.reports-grid__item{grid-column:var(--col-start, auto)/var(--col-span, span var(--grid-column, 2));grid-row:var(--row-start, auto)/span var(--row-span, 1);grid-template-rows:subgrid}}@media print{.reports-grid{--reports-grid-gap: 10mm;--reports-grid-margin-top: 0;padding:0;margin:0;--rg-columns: repeat(2, 1fr)}.reports-grid__item{--col-start: auto;--col-span: span 1;border:1px solid #f5f5f5;border-radius:var(--cp-radius, 1rem);page-break-inside:avoid;break-inside:avoid-page}}@media screen and (max-width: 1199px){.reports-grid__item[data-width=\"1\"]{--col-start: auto;--col-span: span 6}.reports-grid__item[data-width=\"2\"]{--col-start: auto;--col-span: span 6}.reports-grid__item[data-width=\"3\"]{--col-start: auto;--col-span: span 6}.reports-grid__item[data-width=\"4\"]{--col-start: auto;--col-span: span 6}.reports-grid__item[data-width=\"5\"]{--col-start: auto;--col-span: span 6}.reports-grid__item[data-width=\"6\"]{--col-start: auto;--col-span: span 6}.reports-grid__item.wide{--col-start: 1;--col-span: -1}}@media screen and (max-width: 767px){.reports-grid__item[data-width]{--col-start: 1;--col-span: -1}}\n"], components: [{ type: i6__namespace.MatSpinner, selector: "mat-spinner", inputs: ["color"] }, { type: FiltersPanelComponent, selector: "app-filters-panel", inputs: ["aggregations", "fields", "activeQuery"], outputs: ["filterChanged"] }, { type: i1__namespace$c.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i2__namespace$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: EditorButtonComponent, selector: "app-editor-button", inputs: ["type", "key"] }, { type: NdfReportComponent, selector: "app-ndf-report", inputs: ["config", "direction", "data", "criteria"], outputs: ["onNavigate", "onOpen"] }, { type: NdfTableComponent, selector: "app-ndf-table", inputs: ["rows", "totalRecords", "autoCalculateHeight", "emptyMessage", "activeQuery", "configPath", "styleClass", "configTransformer", "tableKey", "jsonEditorEnabled", "config", "customCriteria", "searchTerm"], outputs: ["onRowSelected", "onRowIndexSelected", "actionOnRow", "onGettingData", "onMultiRowSelected", "onLoading", "onPage", "onInitialized", "onLoaded", "onQueryChange", "onSort"] }], directives: [{ type: FluidHeightDirective, selector: "[ndfFluidHeight]", inputs: ["minHeight", "ndfFluidHeight", "subtractItems", "decrease", "delay", "cssVar", "calculate", "inlineStyle"], exportAs: ["ndfFluidHeight"] }, { type: i4__namespace.Dir, selector: "[dir]", inputs: ["dir"], outputs: ["dirChange"], exportAs: ["dir"] }, { type: i4__namespace$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4__namespace$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: ScrollableDivDirective, selector: "[scrolled]", inputs: ["scrollTop"], outputs: ["scrolled"] }, { type: i4__namespace$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: SearchTableTemplateDirective, selector: "[searchTableTemplate]" }], pipes: { "async": i4__namespace$1.AsyncPipe, "translate": i1__namespace.TranslatePipe }, animations: [slideAnimation] });
|
|
48756
|
+
NdfReportsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: NdfReportsComponent, selector: "app-ndf-reports", inputs: { jsonEditorEnabled: "jsonEditorEnabled", reportsKey: "reportsKey", navigateRoute: "navigateRoute", loadCondition: "loadCondition", config: "config" }, outputs: { onQueryChange: "onQueryChange" }, host: { properties: { "dir": "direction" }, classAttribute: "ndf-reports" }, queries: [{ propertyName: "filterCustomTemplate", first: true, predicate: CUSTOM_TEMPLATE, descendants: true, read: i0.TemplateRef }, { propertyName: "headerPanelTemplate", first: true, predicate: HEADER_PANEL_TEMPLATE, descendants: true, read: i0.TemplateRef }, { propertyName: "emptyContentTemplate", first: true, predicate: EMPTY_CONTENT_TEMPLATE, descendants: true, read: i0.TemplateRef }], viewQueries: [{ propertyName: "fluidDirective", first: true, predicate: FluidHeightDirective, descendants: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0__namespace, template: "<div\r\n class=\"ndf-reports__container\"\r\n [class.panel-opened]=\"isPanelOpened && filtersConfig\"\r\n [dir]=\"direction\"\r\n ndfFluidHeight\r\n>\r\n <div\r\n class=\"absolute flex justify-center items-center loading-result\"\r\n *ngIf=\"isLoadingResult && callLoadCondition()\"\r\n >\r\n <mat-spinner class=\"mt-5 mx-auto\" [diameter]=\"48\"></mat-spinner>\r\n </div>\r\n\r\n <div class=\"ndf-reports__panel print:hidden\">\r\n <ng-container\r\n [ngTemplateOutlet]=\"headerPanelTemplate\"\r\n [ngTemplateOutletContext]=\"{\r\n $implicit: aggregations,\r\n filterChanged: filterChanged,\r\n activeQuery: activeQuery,\r\n triggerUpdate: triggerUpdate,\r\n reset: resetFilters,\r\n config: config\r\n }\"\r\n ></ng-container>\r\n\r\n <app-filters-panel\r\n *ngIf=\"!!filtersConfig?.fields?.length && callLoadCondition()\"\r\n [fields]=\"filtersConfig?.fields\"\r\n [aggregations]=\"aggregations\"\r\n (filterChanged)=\"filterChanged($event)\"\r\n [activeQuery]=\"activeFiltersQuery$ | async\"\r\n class=\"ndf-reports__filters\"\r\n [customTemplateRef]=\"filterCustomTemplate\"\r\n ></app-filters-panel>\r\n </div>\r\n\r\n <ng-container *ngIf=\"callLoadCondition(); else emptyContent\">\r\n <div\r\n class=\"ndf-reports__content\"\r\n (scrolled)=\"onContentScroll($event)\"\r\n *ngIf=\"reportsData$ | async as reports\"\r\n >\r\n <div class=\"ndf-reports__header flex pt-4 print:hidden\">\r\n <button\r\n mat-stroked-button\r\n class=\"toggle-button\"\r\n (click)=\"togglePanel()\"\r\n >\r\n <mat-icon> filter_alt</mat-icon>\r\n </button>\r\n <app-editor-button\r\n *ngIf=\"jsonEditorEnabled && reportsKey\"\r\n [key]=\"reportsKey\"\r\n [type]=\"editorType\"\r\n ></app-editor-button>\r\n <button\r\n mat-stroked-button\r\n *ngIf=\"config?.options?.print\"\r\n class=\"print-button\"\r\n (click)=\"printAll()\"\r\n >\r\n <mat-icon> print</mat-icon>\r\n </button>\r\n </div>\r\n\r\n <div class=\"reports-grid\" *ngIf=\"!isLoadingResult\">\r\n <app-ndf-report\r\n *ngFor=\"let config of reportConfig.items; trackBy: trackByFn\"\r\n [config]=\"config\"\r\n [data]=\"reports?.response\"\r\n [criteria]=\"filtersParams$ | async\"\r\n [direction]=\"direction\"\r\n [attr.data-width]=\"config?.layout?.width || 4\"\r\n [attr.data-height]=\"config?.layout?.height || 'auto'\"\r\n [attr.data-start-column]=\"config?.layout?.columnPosition || 'auto'\"\r\n [attr.data-start-row]=\"config?.layout?.rowPosition || 'auto'\"\r\n [class.wide]=\"config?.layout?.width >= 6\"\r\n [style]=\"config?.layout?.style\"\r\n class=\"reports-grid__item {{ config?.layout?.styleClass }} \"\r\n (onNavigate)=\"onNavigate($event)\"\r\n (onOpen)=\"openReportDetails($event, config)\"\r\n ></app-ndf-report>\r\n </div>\r\n </div>\r\n </ng-container>\r\n <div\r\n class=\"ndf-reports__details print:hidden\"\r\n [class.opened]=\"showDetails\"\r\n [@slideInOut]=\"showDetails ? 'open' : 'closed'\"\r\n (@slideInOut.done)=\"onDetailsAnimationEnd($event)\"\r\n >\r\n <app-ndf-table\r\n *ngIf=\"reportDetails$ | async as report\"\r\n [config]=\"report.config\"\r\n [activeQuery]=\"activeFiltersQuery$ | async\"\r\n [customCriteria]=\"detailsFiltersParams$ | async\"\r\n >\r\n <ng-template searchTableTemplate let-toggle=\"togglePanel\">\r\n <div class=\"ndf-reports__details__header flex gap-2\">\r\n <button mat-stroked-button class=\"toggle-button\" (click)=\"toggle()\">\r\n <mat-icon> filter_alt</mat-icon>\r\n </button>\r\n <button\r\n mat-stroked-button\r\n class=\"close-button\"\r\n (click)=\"closeDetailsPanel()\"\r\n >\r\n <mat-icon> close</mat-icon>\r\n </button>\r\n </div>\r\n <h3>\r\n {{ report.label | translate }}\r\n </h3>\r\n </ng-template>\r\n </app-ndf-table>\r\n </div>\r\n</div>\r\n\r\n<ng-template #emptyContent>\r\n <div class=\"ndf-reports__content flex items-center flex-grow-1\">\r\n <ng-container\r\n [ngTemplateOutlet]=\"emptyContentTemplate || defaultEmptyContent\"\r\n ></ng-container>\r\n </div>\r\n</ng-template>\r\n\r\n<ng-template #defaultEmptyContent>\r\n <div class=\"no-data mt-26\">\r\n {{ 'noData' | translate }}\r\n </div>\r\n</ng-template>\r\n", styles: [":host{--table-dev-height: var(--ndf-reports-table-dev-height, auto);--report-height: var(--ndf-reports-report-height, 430px);--cp-height: var(--report-height);padding-inline:var(--ndf-reports-inline-padding, 0);padding-block:var(--ndf-reports-block-padding, .5rem 0);height:100%;position:relative;display:flex;flex-direction:column;background-color:var(--ndf-reports-background, #fff);box-sizing:border-box;max-width:100%;flex:0 0 100%}:host:before,:host:after{box-sizing:border-box}:host[dir=ltr]{--ndf-reports-panel-translateX: -100%;--ndf-reports-details-translateX: 100%}@media print{:host{--report-height: auto;--cp-print-min-height: 80mm;padding:0}}.loading-result{background:var(--loading-result-background, rgba(255, 255, 255, .5));-webkit-backdrop-filter:var(--loading-result-filter, blur(3px));backdrop-filter:var(--loading-result-filter, blur(3px));width:100%;height:100%;z-index:3}.ndf-reports *{box-sizing:border-box;min-height:0}.ndf-reports__header{background-color:var(--ndf-reports-background, #fff);flex-direction:var(--ndf-reports-header-direction, row);justify-content:var(--ndf-reports-header-justify, space-between);align-items:var(--ndf-reports-header-items, center);padding-inline:var(--ndf-reports-header-padding-inline, .5rem);padding-block:var(--ndf-reports-header-padding-block, 0 .5rem);position:var(--ndf-reports-header-position, sticky);top:0;z-index:1}.ndf-reports__header__actions{justify-content:var(--ndf-reports-actions-justify, flex-end)}.ndf-reports__header__custom-actions .toggle-button{min-width:0;padding:0 10px}.ndf-reports__container{--panel-width: var(--ndf-reports-panel-width, 18rem);position:relative;overflow:var(--ndf-reports-container-overflow, hidden);display:grid;transition:all .2s;max-width:100%;width:100%;height:var(--ndf-reports-height, calc( var(--ndf-fluid-height) - calc(var(--ndf-reports-block-padding, 1rem) * 2.5) ));flex-grow:1;grid-gap:var(--ndf-table-container-gap, .5rem);gap:var(--ndf-table-container-gap, .5rem)}.ndf-reports__container.panel-opened{--ndf-details-margin: var(--panel-width);--ndf-reports-panel-translateX: 0;--ndf-reports-content-pis: var(--panel-width)}@media print{.ndf-reports__container{--ndf-reports-container-overflow: visible;height:100%}}.ndf-reports__panel,.ndf-reports__content .ndf-reports__details{overflow:auto;transition:all .2s}.ndf-reports__panel{position:absolute;width:var(--panel-width);height:100%;transform:translate(var(--ndf-reports-panel-translateX, 100%));padding-inline:var(--ndf-reports-panel-inline-padding, .5rem);padding-block:var(--ndf-reports-panel-block-padding, .5rem);background:var(--ndf-reports-panel-background, #fff);z-index:1}.ndf-reports__content{flex-grow:1;padding-inline-start:var(--ndf-reports-content-pis, 1rem);padding-inline-end:var(--ndf-reports-content-pie, 1rem);padding-block:var(--ndf-reports-content-pb, 0 1rem);overflow-y:var(--ndf-reports-content-overflow-y, auto);position:relative;display:flex;flex-direction:column}@media print{.ndf-reports__content{--ndf-reports-content-overflow-y: visible;width:100%;margin:0;padding:0;page-break-after:avoid}}.ndf-reports__details{position:absolute;inset-inline-end:0;width:calc(100% - var(--ndf-details-margin, 0px));height:100%;transform:translate(var(--ndf-reports-details-translateX, -100%));padding-inline:var(--ndf-reports-details-inline-padding, 0rem);flex-grow:1;padding-block:var(--ndf-reports-details-block-padding, 0rem);background:var(--ndf-reports-details-background, #fff);z-index:1;transition:all .2s}.reports-grid{--grid-columns: 12;--column-width: calc(100% / var(--grid-columns));display:grid;grid-gap:var(--reports-grid-gap, 1.5rem);gap:var(--reports-grid-gap, 1.5rem);grid-template-columns:var(--rg-columns, repeat(var(--grid-columns), 1fr));grid-template-rows:var(--reports-grid-rows, auto);margin-block:var(--reports-grid-margin-block, 1.25rem 0);padding-inline:var(--reports-grid-padding-inline, .5rem)}.reports-grid__item{display:grid;grid-gap:.3rem;gap:.3rem;min-width:0;text-align:center;vertical-align:middle}.reports-grid__item[data-width=\"1\"]{--col-span: span 1}.reports-grid__item[data-start-column=\"1\"]{--col-start: 1}.reports-grid__item[data-start-row=\"1\"]{--row-start: 1}.reports-grid__item[data-height=\"1\"]{--row-span: 1}.reports-grid__item[data-width=\"2\"]{--col-span: span 2}.reports-grid__item[data-start-column=\"2\"]{--col-start: 2}.reports-grid__item[data-start-row=\"2\"]{--row-start: 2}.reports-grid__item[data-height=\"2\"]{--row-span: 2}.reports-grid__item[data-width=\"3\"]{--col-span: span 3}.reports-grid__item[data-start-column=\"3\"]{--col-start: 3}.reports-grid__item[data-start-row=\"3\"]{--row-start: 3}.reports-grid__item[data-height=\"3\"]{--row-span: 3}.reports-grid__item[data-width=\"4\"]{--col-span: span 4}.reports-grid__item[data-start-column=\"4\"]{--col-start: 4}.reports-grid__item[data-start-row=\"4\"]{--row-start: 4}.reports-grid__item[data-height=\"4\"]{--row-span: 4}.reports-grid__item[data-width=\"5\"]{--col-span: span 5}.reports-grid__item[data-start-column=\"5\"]{--col-start: 5}.reports-grid__item[data-start-row=\"5\"]{--row-start: 5}.reports-grid__item[data-height=\"5\"]{--row-span: 5}.reports-grid__item[data-width=\"6\"]{--col-span: span 6}.reports-grid__item[data-start-column=\"6\"]{--col-start: 6}.reports-grid__item[data-start-row=\"6\"]{--row-start: 6}.reports-grid__item[data-height=\"6\"]{--row-span: 6}.reports-grid__item[data-width=\"7\"]{--col-span: span 7}.reports-grid__item[data-start-column=\"7\"]{--col-start: 7}.reports-grid__item[data-start-row=\"7\"]{--row-start: 7}.reports-grid__item[data-height=\"7\"]{--row-span: 7}.reports-grid__item[data-width=\"8\"]{--col-span: span 8}.reports-grid__item[data-start-column=\"8\"]{--col-start: 8}.reports-grid__item[data-start-row=\"8\"]{--row-start: 8}.reports-grid__item[data-height=\"8\"]{--row-span: 8}.reports-grid__item[data-width=\"9\"]{--col-span: span 9}.reports-grid__item[data-start-column=\"9\"]{--col-start: 9}.reports-grid__item[data-start-row=\"9\"]{--row-start: 9}.reports-grid__item[data-height=\"9\"]{--row-span: 9}.reports-grid__item[data-width=\"10\"]{--col-span: span 10}.reports-grid__item[data-start-column=\"10\"]{--col-start: 10}.reports-grid__item[data-start-row=\"10\"]{--row-start: 10}.reports-grid__item[data-height=\"10\"]{--row-span: 10}.reports-grid__item[data-width=\"11\"]{--col-span: span 11}.reports-grid__item[data-start-column=\"11\"]{--col-start: 11}.reports-grid__item[data-start-row=\"11\"]{--row-start: 11}.reports-grid__item[data-height=\"11\"]{--row-span: 11}.reports-grid__item[data-width=\"12\"]{--col-span: span 12}.reports-grid__item[data-start-column=\"12\"]{--col-start: 12}.reports-grid__item[data-start-row=\"12\"]{--row-start: 12}.reports-grid__item[data-height=\"12\"]{--row-span: 12}@media screen{.reports-grid__item{grid-column:var(--col-start, auto)/var(--col-span, span var(--grid-column, 2));grid-row:var(--row-start, auto)/span var(--row-span, 1);grid-template-rows:subgrid}}@media print{.reports-grid{--reports-grid-gap: 10mm;--reports-grid-margin-top: 0;padding:0;margin:0;--rg-columns: repeat(2, 1fr)}.reports-grid__item{--col-start: auto;--col-span: span 1;border:1px solid #f5f5f5;border-radius:var(--cp-radius, 1rem);page-break-inside:avoid;break-inside:avoid-page}}@media screen and (max-width: 1199px){.reports-grid__item[data-width=\"1\"]{--col-start: auto;--col-span: span 6}.reports-grid__item[data-width=\"2\"]{--col-start: auto;--col-span: span 6}.reports-grid__item[data-width=\"3\"]{--col-start: auto;--col-span: span 6}.reports-grid__item[data-width=\"4\"]{--col-start: auto;--col-span: span 6}.reports-grid__item[data-width=\"5\"]{--col-start: auto;--col-span: span 6}.reports-grid__item[data-width=\"6\"]{--col-start: auto;--col-span: span 6}.reports-grid__item.wide{--col-start: 1;--col-span: -1}}@media screen and (max-width: 767px){.reports-grid__item[data-width]{--col-start: 1;--col-span: -1}}\n"], components: [{ type: i6__namespace.MatSpinner, selector: "mat-spinner", inputs: ["color"] }, { type: FiltersPanelComponent, selector: "app-filters-panel", inputs: ["aggregations", "fields", "activeQuery"], outputs: ["filterChanged"] }, { type: i1__namespace$c.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i2__namespace$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: EditorButtonComponent, selector: "app-editor-button", inputs: ["type", "key"] }, { type: NdfReportComponent, selector: "app-ndf-report", inputs: ["config", "direction", "data", "criteria"], outputs: ["onNavigate", "onOpen"] }, { type: NdfTableComponent, selector: "app-ndf-table", inputs: ["rows", "totalRecords", "autoCalculateHeight", "emptyMessage", "activeQuery", "configPath", "styleClass", "configTransformer", "tableKey", "jsonEditorEnabled", "config", "customCriteria", "searchTerm"], outputs: ["onRowSelected", "onRowIndexSelected", "actionOnRow", "onGettingData", "onMultiRowSelected", "onLoading", "onPage", "onInitialized", "onLoaded", "onQueryChange", "onSort"] }], directives: [{ type: FluidHeightDirective, selector: "[ndfFluidHeight]", inputs: ["minHeight", "ndfFluidHeight", "subtractItems", "decrease", "delay", "cssVar", "calculate", "inlineStyle"], exportAs: ["ndfFluidHeight"] }, { type: i4__namespace.Dir, selector: "[dir]", inputs: ["dir"], outputs: ["dirChange"], exportAs: ["dir"] }, { type: i4__namespace$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4__namespace$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: ScrollableDivDirective, selector: "[scrolled]", inputs: ["scrollTop"], outputs: ["scrolled"] }, { type: i4__namespace$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: SearchTableTemplateDirective, selector: "[searchTableTemplate]" }], pipes: { "async": i4__namespace$1.AsyncPipe, "translate": i1__namespace.TranslatePipe }, animations: [slideAnimation] });
|
|
48718
48757
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NdfReportsComponent, decorators: [{
|
|
48719
48758
|
type: i0.Component,
|
|
48720
48759
|
args: [{
|
|
@@ -52350,6 +52389,7 @@
|
|
|
52350
52389
|
exports.EmptyTemplateDirective = EmptyTemplateDirective;
|
|
52351
52390
|
exports.EnvManager = EnvManager;
|
|
52352
52391
|
exports.Evaluator = Evaluator;
|
|
52392
|
+
exports.EvaluatorLabelPipe = EvaluatorLabelPipe;
|
|
52353
52393
|
exports.EvaluatorsService = EvaluatorsService;
|
|
52354
52394
|
exports.ExtensionLoaderService = ExtensionLoaderService;
|
|
52355
52395
|
exports.ExtensionService = ExtensionService;
|