nuxeo-development-framework 6.1.2 → 6.1.4
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 +101 -37
- package/bundles/nuxeo-development-framework.umd.js.map +1 -1
- package/esm2015/lib/components/ndf-filters/components/aggregation-date-list/aggregation-date-list.component.js +76 -23
- package/esm2015/lib/components/ndf-filters/models/field-options/date-list-options.js +1 -1
- package/esm2015/lib/components/ndf-filters/models/filter-option.model.js +1 -1
- package/esm2015/lib/components/ndf-filters/services/aggregation-field.service.js +23 -12
- package/esm2015/lib/components/reports/ndf-reports/containers/ndf-reports/ndf-reports.component.js +2 -2
- package/fesm2015/nuxeo-development-framework.js +95 -32
- package/fesm2015/nuxeo-development-framework.js.map +1 -1
- package/lib/components/ndf-filters/components/aggregation-date-list/aggregation-date-list.component.d.ts +7 -0
- package/lib/components/ndf-filters/models/field-options/date-list-options.d.ts +2 -1
- package/lib/components/ndf-filters/models/filter-option.model.d.ts +6 -0
- package/package.json +1 -1
|
@@ -16191,21 +16191,22 @@
|
|
|
16191
16191
|
this._ndfTransformService = _ndfTransformService;
|
|
16192
16192
|
}
|
|
16193
16193
|
AggregationFieldService.prototype.prepareAggregationFiled = function (data) {
|
|
16194
|
-
var _a
|
|
16194
|
+
var _a;
|
|
16195
16195
|
return !!((_a = data.fieldConfig) === null || _a === void 0 ? void 0 : _a.dataTransformer)
|
|
16196
|
-
? this._transformData(data.aggregation,
|
|
16196
|
+
? this._transformData(data.aggregation, data.fieldConfig)
|
|
16197
16197
|
: this._prepareOptions(data);
|
|
16198
16198
|
};
|
|
16199
|
-
AggregationFieldService.prototype._prepareOptions = function (
|
|
16199
|
+
AggregationFieldService.prototype._prepareOptions = function (_b) {
|
|
16200
16200
|
var _this = this;
|
|
16201
|
-
var fieldConfig =
|
|
16201
|
+
var fieldConfig = _b.fieldConfig, aggregation = _b.aggregation;
|
|
16202
16202
|
return rxjs.of(aggregation).pipe(operators.map(function (aggregation) {
|
|
16203
16203
|
var _items = ___default["default"].get(aggregation, (fieldConfig === null || fieldConfig === void 0 ? void 0 : fieldConfig.propertyPath) || 'buckets') || [];
|
|
16204
16204
|
return _items.map(function (item) { return _this._mapOption(item, fieldConfig); });
|
|
16205
16205
|
}));
|
|
16206
16206
|
};
|
|
16207
|
-
AggregationFieldService.prototype._transformData = function (aggregation,
|
|
16207
|
+
AggregationFieldService.prototype._transformData = function (aggregation, config) {
|
|
16208
16208
|
var _this = this;
|
|
16209
|
+
var transformer = config.dataTransformer;
|
|
16209
16210
|
var _key = function (k) { return ("" + k).split('/').pop(); };
|
|
16210
16211
|
var createMappedData = function (res, aggregation) {
|
|
16211
16212
|
return res.map(function (item) {
|
|
@@ -16216,7 +16217,7 @@
|
|
|
16216
16217
|
};
|
|
16217
16218
|
var dataMappers = {
|
|
16218
16219
|
subject: function (res, aggregation) { return createMappedData(res, aggregation); },
|
|
16219
|
-
format: function (res, aggregation) { return createMappedData(res, aggregation); }
|
|
16220
|
+
format: function (res, aggregation) { return createMappedData(res, aggregation); },
|
|
16220
16221
|
};
|
|
16221
16222
|
if (!this._ndfTransformService.has(transformer)) {
|
|
16222
16223
|
throw new Error("No transformer defined for type: " + transformer);
|
|
@@ -16235,13 +16236,14 @@
|
|
|
16235
16236
|
};
|
|
16236
16237
|
AggregationFieldService.prototype._createFilterOption = function (item, docCount) {
|
|
16237
16238
|
var code = item.code || item.id;
|
|
16238
|
-
|
|
16239
|
+
var option = {
|
|
16239
16240
|
id: code,
|
|
16240
16241
|
label: item.code,
|
|
16241
16242
|
value: code,
|
|
16242
16243
|
count: docCount,
|
|
16243
|
-
localizedLabel: { ar: item.arabicTitle, en: item.englishTitle }
|
|
16244
|
+
localizedLabel: { ar: item.arabicTitle, en: item.englishTitle },
|
|
16244
16245
|
};
|
|
16246
|
+
return option;
|
|
16245
16247
|
};
|
|
16246
16248
|
AggregationFieldService.prototype._mapOption = function (item, config) {
|
|
16247
16249
|
var prefix = (config === null || config === void 0 ? void 0 : config.prefix) || '';
|
|
@@ -16255,22 +16257,31 @@
|
|
|
16255
16257
|
localizedLabel: config.bindLabel
|
|
16256
16258
|
? {
|
|
16257
16259
|
ar: ___default["default"].get(item, config === null || config === void 0 ? void 0 : config.bindLabel.ar),
|
|
16258
|
-
en: ___default["default"].get(item, config === null || config === void 0 ? void 0 : config.bindLabel.en)
|
|
16260
|
+
en: ___default["default"].get(item, config === null || config === void 0 ? void 0 : config.bindLabel.en),
|
|
16259
16261
|
}
|
|
16260
|
-
: null
|
|
16262
|
+
: null,
|
|
16261
16263
|
};
|
|
16262
16264
|
if (config === null || config === void 0 ? void 0 : config.tooltip) {
|
|
16263
16265
|
var _a = config === null || config === void 0 ? void 0 : config.tooltip, properties = _a.properties, tooltipConfig = __rest(_a, ["properties"]);
|
|
16264
16266
|
option.tooltip = {
|
|
16265
16267
|
config: tooltipConfig,
|
|
16266
|
-
values: this._prepareTooltip(item, config === null || config === void 0 ? void 0 : config.tooltip) || null
|
|
16268
|
+
values: this._prepareTooltip(item, config === null || config === void 0 ? void 0 : config.tooltip) || null,
|
|
16269
|
+
};
|
|
16270
|
+
}
|
|
16271
|
+
var keys = Object.keys(item);
|
|
16272
|
+
if (keys.includes('from') || keys.includes('to')) {
|
|
16273
|
+
option.constraints = {
|
|
16274
|
+
range: {
|
|
16275
|
+
from: item === null || item === void 0 ? void 0 : item.from,
|
|
16276
|
+
to: item.to,
|
|
16277
|
+
},
|
|
16267
16278
|
};
|
|
16268
16279
|
}
|
|
16269
16280
|
return option;
|
|
16270
16281
|
};
|
|
16271
16282
|
AggregationFieldService.prototype._prepareTooltip = function (item, config) {
|
|
16272
|
-
return Object.entries(config.properties).reduce(function (acc,
|
|
16273
|
-
var
|
|
16283
|
+
return Object.entries(config.properties).reduce(function (acc, _b) {
|
|
16284
|
+
var _c = __read(_b, 1), key = _c[0];
|
|
16274
16285
|
var val = ___default["default"].get(item, key);
|
|
16275
16286
|
if (val) {
|
|
16276
16287
|
acc[key] = val;
|
|
@@ -16285,7 +16296,7 @@
|
|
|
16285
16296
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: AggregationFieldService, decorators: [{
|
|
16286
16297
|
type: i0.Injectable,
|
|
16287
16298
|
args: [{
|
|
16288
|
-
providedIn: 'root'
|
|
16299
|
+
providedIn: 'root',
|
|
16289
16300
|
}]
|
|
16290
16301
|
}], ctorParameters: function () { return [{ type: NdfTransformService }]; } });
|
|
16291
16302
|
|
|
@@ -19677,11 +19688,16 @@
|
|
|
19677
19688
|
}
|
|
19678
19689
|
};
|
|
19679
19690
|
AggregationDateListComponent.prototype._initValue = function (obj) {
|
|
19691
|
+
var _a;
|
|
19680
19692
|
if (!isFieldValueObject(obj)) {
|
|
19681
19693
|
this._handleSelection(obj);
|
|
19682
19694
|
return;
|
|
19683
19695
|
}
|
|
19684
19696
|
var min = obj.min, max = obj.max, value = obj.value;
|
|
19697
|
+
if ((_a = this.renderOptions) === null || _a === void 0 ? void 0 : _a.convertTime) {
|
|
19698
|
+
this._handleConvertedTime(this._dateToTimestamp(min), this._dateToTimestamp(max));
|
|
19699
|
+
return;
|
|
19700
|
+
}
|
|
19685
19701
|
if (min || max) {
|
|
19686
19702
|
this.minMaxDateCtrl.patchValue({ min: min, max: max }, { emitEvent: false });
|
|
19687
19703
|
}
|
|
@@ -19689,12 +19705,19 @@
|
|
|
19689
19705
|
this._handleSelection(value);
|
|
19690
19706
|
}
|
|
19691
19707
|
};
|
|
19708
|
+
AggregationDateListComponent.prototype._handleConvertedTime = function (from, to) {
|
|
19709
|
+
var options = this._optionsSub.getValue();
|
|
19710
|
+
var option = this.findByRange(options, { from: from, to: to });
|
|
19711
|
+
if (option) {
|
|
19712
|
+
this.selectionModel.select(option === null || option === void 0 ? void 0 : option.value);
|
|
19713
|
+
}
|
|
19714
|
+
};
|
|
19692
19715
|
AggregationDateListComponent.prototype._handleSelection = function (values) {
|
|
19693
|
-
var
|
|
19716
|
+
var _c;
|
|
19694
19717
|
this.internalValue = values;
|
|
19695
19718
|
if (this._isList()) {
|
|
19696
19719
|
var selectedValues = Array.isArray(values) ? values : [values];
|
|
19697
|
-
(
|
|
19720
|
+
(_c = this.selectionModel).select.apply(_c, __spreadArray([], __read(selectedValues)));
|
|
19698
19721
|
}
|
|
19699
19722
|
};
|
|
19700
19723
|
AggregationDateListComponent.prototype.ngOnInit = function () {
|
|
@@ -19704,13 +19727,31 @@
|
|
|
19704
19727
|
this._updateVisibility();
|
|
19705
19728
|
};
|
|
19706
19729
|
AggregationDateListComponent.prototype.updateValueSelection = function (value) {
|
|
19707
|
-
var _a;
|
|
19708
|
-
this._onChange(value);
|
|
19730
|
+
var _a, _b;
|
|
19731
|
+
this._onChange(!!((_a = this.renderOptions) === null || _a === void 0 ? void 0 : _a.convertTime) ? this._convertToTime(value) : value);
|
|
19709
19732
|
if (this.renderOptions.minMax) {
|
|
19710
|
-
var _emitEvent = ((
|
|
19733
|
+
var _emitEvent = ((_b = this.fieldConfig) === null || _b === void 0 ? void 0 : _b.sendMode) === FIELD_SEND_MODE.queryParam;
|
|
19711
19734
|
this._resetMinMaxCtrl(_emitEvent);
|
|
19712
19735
|
}
|
|
19713
19736
|
};
|
|
19737
|
+
AggregationDateListComponent.prototype._convertToTime = function (value) {
|
|
19738
|
+
var _a;
|
|
19739
|
+
var _c = __read(value, 1), _val = _c[0];
|
|
19740
|
+
var options = this._optionsSub.getValue();
|
|
19741
|
+
var option = options.find(function (opt) { return opt.value === _val; });
|
|
19742
|
+
if (option && ((_a = option.constraints) === null || _a === void 0 ? void 0 : _a.range)) {
|
|
19743
|
+
var _d = option.constraints.range, from = _d.from, to = _d.to;
|
|
19744
|
+
var _val_1 = {
|
|
19745
|
+
min: this._toEndOfDayISO(from),
|
|
19746
|
+
max: this._toEndOfDayISO(to),
|
|
19747
|
+
};
|
|
19748
|
+
if (this._isValueObject()) {
|
|
19749
|
+
return this._prepareValueRange(_val_1);
|
|
19750
|
+
}
|
|
19751
|
+
return _val_1;
|
|
19752
|
+
}
|
|
19753
|
+
return value;
|
|
19754
|
+
};
|
|
19714
19755
|
AggregationDateListComponent.prototype.updateSelectValue = function (value) {
|
|
19715
19756
|
this.updateValueSelection([value]);
|
|
19716
19757
|
};
|
|
@@ -19723,13 +19764,15 @@
|
|
|
19723
19764
|
this._internalReset();
|
|
19724
19765
|
this._isFieldDirty = !!_hasData;
|
|
19725
19766
|
if (this._isValueObject()) {
|
|
19726
|
-
|
|
19727
|
-
var _val = NxQL._getValueRange(value, 'DATE', _operator);
|
|
19728
|
-
this._onChange(_val);
|
|
19767
|
+
this._onChange(this._prepareValueRange(value));
|
|
19729
19768
|
return;
|
|
19730
19769
|
}
|
|
19731
19770
|
this._onChange(value);
|
|
19732
19771
|
};
|
|
19772
|
+
AggregationDateListComponent.prototype._prepareValueRange = function (value) {
|
|
19773
|
+
var _operator = NxQL._getRangeOperator(value);
|
|
19774
|
+
return NxQL._getValueRange(value, 'DATE', _operator);
|
|
19775
|
+
};
|
|
19733
19776
|
AggregationDateListComponent.prototype.updateValue = function (value) {
|
|
19734
19777
|
this.internalValue = value;
|
|
19735
19778
|
this._onChange(value);
|
|
@@ -19746,7 +19789,9 @@
|
|
|
19746
19789
|
}
|
|
19747
19790
|
if (this._isSendAsQueryParams()) {
|
|
19748
19791
|
formGroup.addControl(this.fieldConfig.aggregation + "__minMaxDate", this.minMaxDateCtrl);
|
|
19749
|
-
this.minMaxDateCtrl.valueChanges
|
|
19792
|
+
this.minMaxDateCtrl.valueChanges
|
|
19793
|
+
.pipe(operators.takeUntil(this.destroy$))
|
|
19794
|
+
.subscribe(function (_) {
|
|
19750
19795
|
_this._internalReset();
|
|
19751
19796
|
_this.updateValue(null);
|
|
19752
19797
|
});
|
|
@@ -19765,23 +19810,21 @@
|
|
|
19765
19810
|
};
|
|
19766
19811
|
AggregationDateListComponent.prototype._addSelectionListener = function () {
|
|
19767
19812
|
var _this = this;
|
|
19768
|
-
if (!!this.renderOptions.view &&
|
|
19813
|
+
if (!!this.renderOptions.view &&
|
|
19814
|
+
this.renderOptions.view !== DATE_LIST_VIEW.list) {
|
|
19769
19815
|
return;
|
|
19770
19816
|
}
|
|
19771
19817
|
this.selectionModel.changed
|
|
19772
19818
|
.asObservable()
|
|
19773
19819
|
.pipe(operators.map(function (data) { return data.source.selected; }), operators.takeUntil(this.destroy$))
|
|
19774
19820
|
.subscribe(function (value) {
|
|
19775
|
-
if (_this.renderOptions.minMax) {
|
|
19776
|
-
_this._resetMinMaxCtrl(false);
|
|
19777
|
-
}
|
|
19778
19821
|
_this.updateValueSelection(value);
|
|
19779
19822
|
});
|
|
19780
19823
|
};
|
|
19781
19824
|
AggregationDateListComponent.prototype._resetMinMaxCtrl = function (emitEvent) {
|
|
19782
19825
|
if (emitEvent === void 0) { emitEvent = true; }
|
|
19783
19826
|
this.minMaxDateCtrl.reset(null, {
|
|
19784
|
-
emitEvent: emitEvent
|
|
19827
|
+
emitEvent: emitEvent,
|
|
19785
19828
|
});
|
|
19786
19829
|
};
|
|
19787
19830
|
AggregationDateListComponent.prototype._internalReset = function () {
|
|
@@ -19816,6 +19859,27 @@
|
|
|
19816
19859
|
}
|
|
19817
19860
|
});
|
|
19818
19861
|
};
|
|
19862
|
+
AggregationDateListComponent.prototype._toEndOfDayISO = function (timestamp) {
|
|
19863
|
+
moment__default$1["default"].locale('en');
|
|
19864
|
+
return moment__default$1["default"](timestamp).format('YYYY-MM-DDTHH:mm:ssZ');
|
|
19865
|
+
};
|
|
19866
|
+
AggregationDateListComponent.prototype._dateToTimestamp = function (date) {
|
|
19867
|
+
moment__default$1["default"].locale('en');
|
|
19868
|
+
return moment__default$1["default"].parseZone(date).valueOf();
|
|
19869
|
+
};
|
|
19870
|
+
AggregationDateListComponent.prototype.normalize = function (ts) {
|
|
19871
|
+
return moment__default$1["default"](ts).startOf('second').valueOf();
|
|
19872
|
+
};
|
|
19873
|
+
AggregationDateListComponent.prototype.findByRange = function (list, range) {
|
|
19874
|
+
var _this = this;
|
|
19875
|
+
var from = this.normalize(range.from);
|
|
19876
|
+
var to = this.normalize(range.to);
|
|
19877
|
+
return list.find(function (item) {
|
|
19878
|
+
var itemFrom = _this.normalize(item.constraints.range.from);
|
|
19879
|
+
var itemTo = _this.normalize(item.constraints.range.to);
|
|
19880
|
+
return itemFrom === from && itemTo === to;
|
|
19881
|
+
});
|
|
19882
|
+
};
|
|
19819
19883
|
return AggregationDateListComponent;
|
|
19820
19884
|
}(BaseAggregationField));
|
|
19821
19885
|
AggregationDateListComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: AggregationDateListComponent, deps: null, target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
@@ -19823,13 +19887,13 @@
|
|
|
19823
19887
|
{
|
|
19824
19888
|
provide: i2.NG_VALUE_ACCESSOR,
|
|
19825
19889
|
useExisting: i0.forwardRef(function () { return AggregationDateListComponent; }),
|
|
19826
|
-
multi: true
|
|
19890
|
+
multi: true,
|
|
19827
19891
|
},
|
|
19828
19892
|
{
|
|
19829
19893
|
provide: i2.NG_VALIDATORS,
|
|
19830
19894
|
useExisting: i0.forwardRef(function () { return AggregationDateListComponent; }),
|
|
19831
|
-
multi: true
|
|
19832
|
-
}
|
|
19895
|
+
multi: true,
|
|
19896
|
+
},
|
|
19833
19897
|
], usesInheritance: true, ngImport: i0__namespace, template: "<div *ngIf=\"options$ | async as options\">\r\n\t<field-header *ngIf=\"fieldConfig.label && !renderOptions?.hideLabel\" class=\"filter-date-list__label\">{{\r\n\t\tfieldConfig.label | translate\r\n\t}}</field-header>\r\n\r\n\t<div class=\"filter-date-list__wrapper\">\r\n\t\t<ng-container *ngIf=\"!renderOptions?.view || renderOptions.view === viewLayout.list\">\r\n\t\t\t<mat-radio-button\r\n\t\t\t\tclass=\"filter-date-list__item\"\r\n\t\t\t\t*ngFor=\"let option of options; index as index\"\r\n\t\t\t\t[checked]=\"selectionModel.isSelected(option.value)\"\r\n\t\t\t\t(change)=\"selectionModel.toggle(option.value)\"\r\n\t\t\t\t[class.checkedBox]=\"selectionModel.isSelected(option.value)\"\r\n\t\t\t\t[class.unCheckedBox]=\"!selectionModel.isSelected(option.value)\"\r\n\t\t\t>\r\n\t\t\t\t<ng-container\r\n\t\t\t\t\t[ngTemplateOutlet]=\"contentTemplate || defaultTemplate\"\r\n\t\t\t\t\t[ngTemplateOutletContext]=\"{ $implicit: option, fieldConfig, aggregation }\"\r\n\t\t\t\t></ng-container>\r\n\r\n\t\t\t\t<ng-template #defaultTemplate>\r\n\t\t\t\t\t<filter-option-text\r\n\t\t\t\t\t\t[option]=\"option\"\r\n\t\t\t\t\t\t[language]=\"language\"\r\n\t\t\t\t\t\t[showCount]=\"renderOptions?.showTotal\"\r\n\t\t\t\t\t></filter-option-text>\r\n\t\t\t\t</ng-template>\r\n\t\t\t</mat-radio-button>\r\n\r\n\t\t\t<button *ngIf=\"selectionModel.hasValue()\" mat-flat-button class=\"mb-2\" (click)=\"clearSelected()\">\r\n\t\t\t\t{{ 'FILTERS.clear' | translate }}\r\n\t\t\t</button>\r\n\t\t</ng-container>\r\n\r\n\t\t<ng-container *ngIf=\"renderOptions.view === viewLayout.dropdown\">\r\n\t\t\t<ng-select\r\n\t\t\t\tclass=\"filter-date-list__select\"\r\n\t\t\t\t[items]=\"options\"\r\n\t\t\t\tbindValue=\"value\"\r\n\t\t\t\t[multiple]=\"false\"\r\n\t\t\t\t[ngModel]=\"internalValue\"\r\n\t\t\t\t(ngModelChange)=\"updateSelectValue($event)\"\r\n\t\t\t\t[notFoundText]=\"emptyPlaceholder || 'SELECT.notFoundText' | translate\"\r\n\t\t\t\t[placeholder]=\"'SELECT.placeholder' | translate\"\r\n\t\t\t\t[clearAllText]=\"'SELECT.clearAllText' | translate\"\r\n\t\t\t\t[typeToSearchText]=\"'SELECT.typeToSearchText' | translate\"\r\n\t\t\t\t[searchable]=\"false\"\r\n\t\t\t>\r\n\t\t\t\t<ng-template ng-option-tmp let-item=\"item\">\r\n\t\t\t\t\t<ng-container\r\n\t\t\t\t\t\t[ngTemplateOutlet]=\"contentTemplate || defaultTemplate\"\r\n\t\t\t\t\t\t[ngTemplateOutletContext]=\"{ $implicit: item, fieldConfig, aggregation }\"\r\n\t\t\t\t\t></ng-container>\r\n\r\n\t\t\t\t\t<ng-template #defaultTemplate>\r\n\t\t\t\t\t\t<filter-option-text\r\n\t\t\t\t\t\t\t[option]=\"item\"\r\n\t\t\t\t\t\t\t[language]=\"language\"\r\n\t\t\t\t\t\t\t[showCount]=\"renderOptions?.showTotal\"\r\n\t\t\t\t\t\t></filter-option-text>\r\n\t\t\t\t\t</ng-template>\r\n\t\t\t\t</ng-template>\r\n\r\n\t\t\t\t<ng-template ng-multi-label-tmp let-items=\"items\" let-clear=\"clear\">\r\n\t\t\t\t\t<div *ngFor=\"let item of items\" class=\"ng-value\">\r\n\t\t\t\t\t\t<span class=\"ng-value-label\">{{ item | localizedLabel : language }}</span>\r\n\t\t\t\t\t\t<button class=\"ng-value-icon left\" (click)=\"clear(item)\" aria-hidden=\"true\">\u00D7</button>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</ng-template>\r\n\r\n\t\t\t\t<ng-template ng-label-tmp let-item=\"item\">\r\n\t\t\t\t\t<filter-option-text\r\n\t\t\t\t\t\t[option]=\"item\"\r\n\t\t\t\t\t\t[language]=\"language\"\r\n\t\t\t\t\t\t[showCount]=\"renderOptions?.showTotal\"\r\n\t\t\t\t\t></filter-option-text>\r\n\t\t\t\t</ng-template>\r\n\t\t\t</ng-select>\r\n\t\t</ng-container>\r\n\r\n\t\t<filter-date-range\r\n\t\t\tclass=\"filter-date-list__range\"\r\n\t\t\t*ngIf=\"renderOptions?.minMax\"\r\n\t\t\t[formControl]=\"minMaxDateCtrl\"\r\n\t\t></filter-date-range>\r\n\t</div>\r\n</div>\r\n", styles: [".filter-date-list{display:var(--fdl-display, block)}.filter-date-list__label{display:var(--fdl-label-display, block);margin-block:var(--fdl-label-margin-block, 0 .5rem);margin-inline:var(--fdl-label-margin-inline, 0 .2rem);padding:var(--fdl-padding, .2rem);font-weight:var(--fdl-weight, 600)}.filter-date-list__wrapper{display:var(--fdl-wrapper-display, flex);flex-direction:var(--fdl-wrapper-direction, column)}.filter-date-list__item{padding-inline-start:.5rem;margin-bottom:var(--fdl-row-margin-bottom, .3rem)}.filter-date-list__item .mat-radio-label{display:flex}.filter-date-list__item .mat-radio-label .mat-radio-label-content{flex-grow:1}.filter-date-list__select{margin-bottom:var(--fdl-row-margin-bottom, .3rem)}.filter-date-list__range{margin-top:var(--fdl-range-margin-top, .5rem);display:var(--fdl-range-display, flex);flex-direction:var(--fdl-range-direction, column)}\n"], components: [{ type: FieldHeaderComponent, selector: "field-header" }, { type: i2__namespace$5.MatRadioButton, selector: "mat-radio-button", inputs: ["disableRipple", "tabIndex"], exportAs: ["matRadioButton"] }, { type: FilterOptionTextComponent, selector: "filter-option-text", inputs: ["option", "showCount", "language"] }, { type: i1__namespace$c.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i5__namespace.NgSelectComponent, selector: "ng-select", inputs: ["markFirst", "dropdownPosition", "loading", "closeOnSelect", "hideSelected", "selectOnTab", "bufferAmount", "selectableGroup", "selectableGroupAsModel", "searchFn", "trackByFn", "clearOnBackspace", "labelForId", "inputAttrs", "readonly", "searchWhileComposing", "minTermLength", "editableSearchTerm", "keyDownFn", "multiple", "addTag", "searchable", "clearable", "isOpen", "items", "compareWith", "clearSearchOnAdd", "bindLabel", "placeholder", "notFoundText", "typeToSearchText", "addTagText", "loadingText", "clearAllText", "virtualScroll", "openOnEnter", "appendTo", "bindValue", "appearance", "maxSelectedItems", "groupBy", "groupValue", "tabIndex", "typeahead"], outputs: ["blur", "focus", "change", "open", "close", "search", "clear", "add", "remove", "scroll", "scrollToEnd"] }, { type: FilterDateRangeComponent, selector: "filter-date-range" }], directives: [{ type: i4__namespace$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4__namespace$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i4__namespace$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i2__namespace$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2__namespace$4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i5__namespace.ɵf, selector: "[ng-option-tmp]" }, { type: i5__namespace.ɵi, selector: "[ng-multi-label-tmp]" }, { type: i5__namespace.ɵh, selector: "[ng-label-tmp]" }, { type: i2__namespace$4.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }], pipes: { "async": i4__namespace$1.AsyncPipe, "translate": i1__namespace.TranslatePipe, "localizedLabel": LocalizedLabelPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.Default, encapsulation: i0__namespace.ViewEncapsulation.None });
|
|
19834
19898
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: AggregationDateListComponent, decorators: [{
|
|
19835
19899
|
type: i0.Component,
|
|
@@ -19843,17 +19907,17 @@
|
|
|
19843
19907
|
{
|
|
19844
19908
|
provide: i2.NG_VALUE_ACCESSOR,
|
|
19845
19909
|
useExisting: i0.forwardRef(function () { return AggregationDateListComponent; }),
|
|
19846
|
-
multi: true
|
|
19910
|
+
multi: true,
|
|
19847
19911
|
},
|
|
19848
19912
|
{
|
|
19849
19913
|
provide: i2.NG_VALIDATORS,
|
|
19850
19914
|
useExisting: i0.forwardRef(function () { return AggregationDateListComponent; }),
|
|
19851
|
-
multi: true
|
|
19852
|
-
}
|
|
19915
|
+
multi: true,
|
|
19916
|
+
},
|
|
19853
19917
|
],
|
|
19854
19918
|
host: {
|
|
19855
|
-
class: 'filter-date-list'
|
|
19856
|
-
}
|
|
19919
|
+
class: 'filter-date-list',
|
|
19920
|
+
},
|
|
19857
19921
|
}]
|
|
19858
19922
|
}], propDecorators: { _controlContainer: [{
|
|
19859
19923
|
type: i0.Optional
|
|
@@ -48650,7 +48714,7 @@
|
|
|
48650
48714
|
return NdfReportsComponent;
|
|
48651
48715
|
}(DestroySubject));
|
|
48652
48716
|
NdfReportsComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NdfReportsComponent, deps: [{ token: i1__namespace.TranslateService }, { token: FiltersMapperService }, { token: NdfReportsService }, { token: ChartManagerService }, { token: ReportTransformService }, { token: i0__namespace.ChangeDetectorRef }, { token: FilterQueryService }, { token: ReportsStateService }, { token: ReportConfigurationService }, { token: i1__namespace$5.Router }, { token: i0__namespace.NgZone }, { token: ReportsHooksService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
48653
|
-
NdfReportsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: NdfReportsComponent, selector: "app-ndf-reports", inputs: { jsonEditorEnabled: "jsonEditorEnabled", reportsKey: "reportsKey", navigateRoute: "navigateRoute", loadCondition: "loadCondition", config: "config" }, outputs: { onQueryChange: "onQueryChange" }, host: { properties: { "dir": "direction" }, classAttribute: "ndf-reports" }, queries: [{ propertyName: "filterCustomTemplate", first: true, predicate: CUSTOM_TEMPLATE, descendants: true, read: i0.TemplateRef }, { propertyName: "headerPanelTemplate", first: true, predicate: HEADER_PANEL_TEMPLATE, descendants: true, read: i0.TemplateRef }, { propertyName: "emptyContentTemplate", first: true, predicate: EMPTY_CONTENT_TEMPLATE, descendants: true, read: i0.TemplateRef }], viewQueries: [{ propertyName: "fluidDirective", first: true, predicate: FluidHeightDirective, descendants: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0__namespace, template: "<div\r\n class=\"ndf-reports__container\"\r\n [class.panel-opened]=\"isPanelOpened && filtersConfig\"\r\n [dir]=\"direction\"\r\n ndfFluidHeight\r\n>\r\n <div\r\n class=\"absolute flex justify-center items-center loading-result\"\r\n *ngIf=\"isLoadingResult && callLoadCondition()\"\r\n >\r\n <mat-spinner class=\"mt-5 mx-auto\" [diameter]=\"48\"></mat-spinner>\r\n </div>\r\n\r\n <div class=\"ndf-reports__panel print:hidden\">\r\n <ng-container\r\n [ngTemplateOutlet]=\"headerPanelTemplate\"\r\n [ngTemplateOutletContext]=\"{\r\n $implicit: aggregations,\r\n filterChanged: filterChanged,\r\n activeQuery: activeQuery,\r\n triggerUpdate: triggerUpdate,\r\n reset: resetFilters,\r\n config: config\r\n }\"\r\n ></ng-container>\r\n\r\n <app-filters-panel\r\n *ngIf=\"!!filtersConfig?.fields?.length && callLoadCondition()\"\r\n [fields]=\"filtersConfig?.fields\"\r\n [aggregations]=\"aggregations\"\r\n (filterChanged)=\"filterChanged($event)\"\r\n [activeQuery]=\"activeFiltersQuery$ | async\"\r\n class=\"ndf-reports__filters\"\r\n [customTemplateRef]=\"filterCustomTemplate\"\r\n ></app-filters-panel>\r\n </div>\r\n\r\n <ng-container *ngIf=\"callLoadCondition(); else emptyContent\">\r\n <div\r\n class=\"ndf-reports__content\"\r\n (scrolled)=\"onContentScroll($event)\"\r\n *ngIf=\"reportsData$ | async as reports\"\r\n >\r\n <div class=\"ndf-reports__header flex pt-4 print:hidden\">\r\n <button\r\n mat-stroked-button\r\n class=\"toggle-button\"\r\n (click)=\"togglePanel()\"\r\n >\r\n <mat-icon> filter_alt</mat-icon>\r\n </button>\r\n <app-editor-button\r\n *ngIf=\"jsonEditorEnabled && reportsKey\"\r\n [key]=\"reportsKey\"\r\n [type]=\"editorType\"\r\n ></app-editor-button>\r\n <button\r\n mat-stroked-button\r\n *ngIf=\"config?.options?.print\"\r\n class=\"print-button\"\r\n (click)=\"printAll()\"\r\n >\r\n <mat-icon> print</mat-icon>\r\n </button>\r\n </div>\r\n\r\n <div class=\"reports-grid\" *ngIf=\"!isLoadingResult\">\r\n <app-ndf-report\r\n *ngFor=\"let config of reportConfig.items; trackBy: trackByFn\"\r\n [config]=\"config\"\r\n [data]=\"reports?.response\"\r\n [criteria]=\"filtersParams$ | async\"\r\n [direction]=\"direction\"\r\n [attr.data-width]=\"config?.layout?.width || 4\"\r\n [attr.data-height]=\"config?.layout?.height || 'auto'\"\r\n [attr.data-start-column]=\"config?.layout?.columnPosition || 'auto'\"\r\n [attr.data-start-row]=\"config?.layout?.rowPosition || 'auto'\"\r\n [class.wide]=\"config?.layout?.width >= 6\"\r\n [style]=\"config?.layout?.style\"\r\n class=\"reports-grid__item {{ config?.layout?.styleClass }} \"\r\n (onNavigate)=\"onNavigate($event)\"\r\n (onOpen)=\"openReportDetails($event, config)\"\r\n ></app-ndf-report>\r\n </div>\r\n </div>\r\n </ng-container>\r\n <div\r\n class=\"ndf-reports__details print:hidden\"\r\n [class.opened]=\"showDetails\"\r\n [@slideInOut]=\"showDetails ? 'open' : 'closed'\"\r\n (@slideInOut.done)=\"onDetailsAnimationEnd($event)\"\r\n >\r\n <app-ndf-table\r\n *ngIf=\"reportDetails$ | async as report\"\r\n [config]=\"report.config\"\r\n [activeQuery]=\"activeFiltersQuery$ | async\"\r\n [customCriteria]=\"detailsFiltersParams$ | async\"\r\n >\r\n <ng-template searchTableTemplate let-toggle=\"togglePanel\">\r\n <div class=\"ndf-reports__details__header flex gap-2\">\r\n <button mat-stroked-button class=\"toggle-button\" (click)=\"toggle()\">\r\n <mat-icon> filter_alt</mat-icon>\r\n </button>\r\n <button\r\n mat-stroked-button\r\n class=\"close-button\"\r\n (click)=\"closeDetailsPanel()\"\r\n >\r\n <mat-icon> close</mat-icon>\r\n </button>\r\n </div>\r\n <h3>\r\n {{ report.label | translate }}\r\n </h3>\r\n </ng-template>\r\n </app-ndf-table>\r\n </div>\r\n</div>\r\n\r\n<ng-template #emptyContent>\r\n <div class=\"ndf-reports__content flex items-center flex-grow-1\">\r\n <ng-container\r\n [ngTemplateOutlet]=\"emptyContentTemplate || defaultEmptyContent\"\r\n ></ng-container>\r\n </div>\r\n</ng-template>\r\n\r\n<ng-template #defaultEmptyContent>\r\n <div class=\"no-data mt-26\">\r\n {{ 'noData' | translate }}\r\n </div>\r\n</ng-template>\r\n", styles: [":host{--table-dev-height: var(--ndf-reports-table-dev-height, auto);--report-height: var(--ndf-reports-report-height, 430px);--cp-height: var(--report-height);padding-inline:var(--ndf-reports-inline-padding, 0);padding-block:var(--ndf-reports-block-padding, .5rem 0);height:100%;position:relative;display:flex;flex-direction:column;background-color:var(--ndf-reports-background, #fff);box-sizing:border-box;max-width:100%;flex:0 0 100%}:host:before,:host:after{box-sizing:border-box}:host[dir=ltr]{--ndf-reports-panel-translateX: -100%;--ndf-reports-details-translateX: 100%}@media print{:host{--report-height: auto;--cp-print-min-height: 80mm;padding:0}}.loading-result{background:var(--loading-result-background, rgba(255, 255, 255, .5));-webkit-backdrop-filter:var(--loading-result-filter, blur(3px));backdrop-filter:var(--loading-result-filter, blur(3px));width:100%;height:100%;z-index:3}.ndf-reports *{box-sizing:border-box;min-height:0}.ndf-reports__header{background-color:var(--ndf-reports-background, #fff);flex-direction:var(--ndf-reports-header-direction, row);justify-content:var(--ndf-reports-header-justify, space-between);align-items:var(--ndf-reports-header-items, center);padding-inline:var(--ndf-reports-header-padding-inline, .5rem);padding-block:var(--ndf-reports-header-padding-block, 0 .5rem);position:var(--ndf-reports-header-position, sticky);top:0;z-index:1}.ndf-reports__header__actions{justify-content:var(--ndf-reports-actions-justify, flex-end)}.ndf-reports__header__custom-actions .toggle-button{min-width:0;padding:0 10px}.ndf-reports__container{--panel-width: var(--ndf-reports-panel-width, 18rem);position:relative;overflow:var(--ndf-reports-container-overflow, hidden);display:grid;transition:all .2s;max-width:100%;width:100%;height:var(--ndf-reports-height, calc( var(--ndf-fluid-height) - calc(var(--ndf-reports-block-padding, 1rem) * 2.5) ));flex-grow:1;grid-gap:var(--ndf-table-container-gap, .5rem);gap:var(--ndf-table-container-gap, .5rem)}.ndf-reports__container.panel-opened{--ndf-details-margin: var(--panel-width);--ndf-reports-panel-translateX: 0;--ndf-reports-content-pis: var(--panel-width)}@media print{.ndf-reports__container{--ndf-reports-container-overflow: visible;height:100%}}.ndf-reports__panel,.ndf-reports__content .ndf-reports__details{overflow:auto;transition:all .2s}.ndf-reports__panel{position:absolute;width:var(--panel-width);height:100%;transform:translate(var(--ndf-reports-panel-translateX, 100%));padding-inline:var(--ndf-reports-panel-inline-padding, .5rem);padding-block:var(--ndf-reports-panel-block-padding, .5rem);background:var(--ndf-reports-panel-background, #fff);z-index:1}.ndf-reports__content{flex-grow:1;padding-inline-start:var(--ndf-reports-content-pis, 1rem);padding-inline-end:var(--ndf-reports-content-pie, 1rem);padding-block:var(--ndf-reports-content-pb, 0 1rem);overflow-y:var(--ndf-reports-content-overflow-y, auto);position:relative;display:flex;flex-direction:column}@media print{.ndf-reports__content{--ndf-reports-content-overflow-y: visible;width:100%;margin:0;padding:0;page-break-after:avoid}}.ndf-reports__details{position:absolute;inset-inline-end:0;width:calc(100% - var(--ndf-details-margin, 0px));height:100%;transform:translate(var(--ndf-reports-details-translateX, -100%));padding-inline:var(--ndf-reports-details-inline-padding, 0rem);flex-grow:1;padding-block:var(--ndf-reports-details-block-padding, 0rem);background:var(--ndf-reports-details-background, #fff);z-index:1;transition:all .2s}.reports-grid{--grid-columns: 12;--column-width: calc(100% / var(--grid-columns));display:grid;grid-gap:var(--reports-grid-gap, 1.5rem);gap:var(--reports-grid-gap, 1.5rem);grid-template-columns:var(--rg-columns, repeat(var(--grid-columns), 1fr));margin-block:var(--reports-grid-margin-block, 1.25rem 0);padding-inline:var(--reports-grid-padding-inline, .5rem)}.reports-grid__item{display:grid;grid-gap:.3rem;gap:.3rem;min-width:0;text-align:center;vertical-align:middle}.reports-grid__item[data-width=\"1\"]{--col-span: span 1}.reports-grid__item[data-start-column=\"1\"]{--col-start: 1}.reports-grid__item[data-start-row=\"1\"]{--row-start: 1}.reports-grid__item[data-height=\"1\"]{--row-span: 1}.reports-grid__item[data-width=\"2\"]{--col-span: span 2}.reports-grid__item[data-start-column=\"2\"]{--col-start: 2}.reports-grid__item[data-start-row=\"2\"]{--row-start: 2}.reports-grid__item[data-height=\"2\"]{--row-span: 2}.reports-grid__item[data-width=\"3\"]{--col-span: span 3}.reports-grid__item[data-start-column=\"3\"]{--col-start: 3}.reports-grid__item[data-start-row=\"3\"]{--row-start: 3}.reports-grid__item[data-height=\"3\"]{--row-span: 3}.reports-grid__item[data-width=\"4\"]{--col-span: span 4}.reports-grid__item[data-start-column=\"4\"]{--col-start: 4}.reports-grid__item[data-start-row=\"4\"]{--row-start: 4}.reports-grid__item[data-height=\"4\"]{--row-span: 4}.reports-grid__item[data-width=\"5\"]{--col-span: span 5}.reports-grid__item[data-start-column=\"5\"]{--col-start: 5}.reports-grid__item[data-start-row=\"5\"]{--row-start: 5}.reports-grid__item[data-height=\"5\"]{--row-span: 5}.reports-grid__item[data-width=\"6\"]{--col-span: span 6}.reports-grid__item[data-start-column=\"6\"]{--col-start: 6}.reports-grid__item[data-start-row=\"6\"]{--row-start: 6}.reports-grid__item[data-height=\"6\"]{--row-span: 6}.reports-grid__item[data-width=\"7\"]{--col-span: span 7}.reports-grid__item[data-start-column=\"7\"]{--col-start: 7}.reports-grid__item[data-start-row=\"7\"]{--row-start: 7}.reports-grid__item[data-height=\"7\"]{--row-span: 7}.reports-grid__item[data-width=\"8\"]{--col-span: span 8}.reports-grid__item[data-start-column=\"8\"]{--col-start: 8}.reports-grid__item[data-start-row=\"8\"]{--row-start: 8}.reports-grid__item[data-height=\"8\"]{--row-span: 8}.reports-grid__item[data-width=\"9\"]{--col-span: span 9}.reports-grid__item[data-start-column=\"9\"]{--col-start: 9}.reports-grid__item[data-start-row=\"9\"]{--row-start: 9}.reports-grid__item[data-height=\"9\"]{--row-span: 9}.reports-grid__item[data-width=\"10\"]{--col-span: span 10}.reports-grid__item[data-start-column=\"10\"]{--col-start: 10}.reports-grid__item[data-start-row=\"10\"]{--row-start: 10}.reports-grid__item[data-height=\"10\"]{--row-span: 10}.reports-grid__item[data-width=\"11\"]{--col-span: span 11}.reports-grid__item[data-start-column=\"11\"]{--col-start: 11}.reports-grid__item[data-start-row=\"11\"]{--row-start: 11}.reports-grid__item[data-height=\"11\"]{--row-span: 11}.reports-grid__item[data-width=\"12\"]{--col-span: span 12}.reports-grid__item[data-start-column=\"12\"]{--col-start: 12}.reports-grid__item[data-start-row=\"12\"]{--row-start: 12}.reports-grid__item[data-height=\"12\"]{--row-span: 12}@media screen{.reports-grid__item{grid-column:var(--col-start, auto)/var(--col-span, span var(--grid-column, 2));grid-row:var(--row-start, auto)/span var(--row-span, 1);grid-template-rows:subgrid}}@media print{.reports-grid{--reports-grid-gap: 10mm;--reports-grid-margin-top: 0;padding:0;margin:0;--rg-columns: repeat(2, 1fr)}.reports-grid__item{--col-start: auto;--col-span: span 1;border:1px solid #f5f5f5;border-radius:var(--cp-radius, 1rem);page-break-inside:avoid;break-inside:avoid-page}}@media screen and (max-width: 1199px){.reports-grid__item[data-width=\"1\"]{--col-start: auto;--col-span: span 6}.reports-grid__item[data-width=\"2\"]{--col-start: auto;--col-span: span 6}.reports-grid__item[data-width=\"3\"]{--col-start: auto;--col-span: span 6}.reports-grid__item[data-width=\"4\"]{--col-start: auto;--col-span: span 6}.reports-grid__item[data-width=\"5\"]{--col-start: auto;--col-span: span 6}.reports-grid__item[data-width=\"6\"]{--col-start: auto;--col-span: span 6}.reports-grid__item.wide{--col-start: 1;--col-span: -1}}@media screen and (max-width: 767px){.reports-grid__item[data-width]{--col-start: 1;--col-span: -1}}\n"], components: [{ type: i6__namespace.MatSpinner, selector: "mat-spinner", inputs: ["color"] }, { type: FiltersPanelComponent, selector: "app-filters-panel", inputs: ["aggregations", "fields", "activeQuery"], outputs: ["filterChanged"] }, { type: i1__namespace$c.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i2__namespace$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: EditorButtonComponent, selector: "app-editor-button", inputs: ["type", "key"] }, { type: NdfReportComponent, selector: "app-ndf-report", inputs: ["config", "direction", "data", "criteria"], outputs: ["onNavigate", "onOpen"] }, { type: NdfTableComponent, selector: "app-ndf-table", inputs: ["rows", "totalRecords", "autoCalculateHeight", "emptyMessage", "activeQuery", "configPath", "styleClass", "configTransformer", "tableKey", "jsonEditorEnabled", "config", "customCriteria", "searchTerm"], outputs: ["onRowSelected", "onRowIndexSelected", "actionOnRow", "onGettingData", "onMultiRowSelected", "onLoading", "onPage", "onInitialized", "onLoaded", "onQueryChange", "onSort"] }], directives: [{ type: FluidHeightDirective, selector: "[ndfFluidHeight]", inputs: ["minHeight", "ndfFluidHeight", "subtractItems", "decrease", "delay", "cssVar", "calculate", "inlineStyle"], exportAs: ["ndfFluidHeight"] }, { type: i4__namespace.Dir, selector: "[dir]", inputs: ["dir"], outputs: ["dirChange"], exportAs: ["dir"] }, { type: i4__namespace$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4__namespace$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: ScrollableDivDirective, selector: "[scrolled]", inputs: ["scrollTop"], outputs: ["scrolled"] }, { type: i4__namespace$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: SearchTableTemplateDirective, selector: "[searchTableTemplate]" }], pipes: { "async": i4__namespace$1.AsyncPipe, "translate": i1__namespace.TranslatePipe }, animations: [slideAnimation] });
|
|
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));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] });
|
|
48654
48718
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NdfReportsComponent, decorators: [{
|
|
48655
48719
|
type: i0.Component,
|
|
48656
48720
|
args: [{
|