nuxeo-development-framework 5.4.4 → 5.4.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 +730 -426
- package/bundles/nuxeo-development-framework.umd.js.map +1 -1
- package/esm2015/lib/components/ndf-filters/base/base-checkbox-radio.component.js +18 -7
- package/esm2015/lib/components/ndf-filters/constants/type.js +3 -2
- package/esm2015/lib/components/ndf-filters/containers/aggregation-field/aggregation-field.component.js +29 -14
- package/esm2015/lib/components/ndf-filters/containers/base-field.js +1 -1
- package/esm2015/lib/components/ndf-filters/containers/custom-field/custom-field.component.js +3 -2
- package/esm2015/lib/components/ndf-filters/containers/filters-panel/filters-panel.component.js +5 -3
- package/esm2015/lib/components/ndf-filters/custom-components/aggregation-group/aggregation-group.component.js +87 -0
- package/esm2015/lib/components/ndf-filters/custom-components/aggregation-group/map-aggregation-config.js +20 -0
- package/esm2015/lib/components/ndf-filters/custom-components/index.js +2 -1
- package/esm2015/lib/components/ndf-filters/models/custom-field-config.js +1 -1
- package/esm2015/lib/components/ndf-filters/models/field-options/custom-fields-options.js +1 -1
- package/esm2015/lib/components/ndf-filters/ndf-filters-panel.module.js +98 -28
- package/esm2015/lib/components/ndf-filters/public-api.js +4 -3
- package/esm2015/lib/components/ndf-filters/services/dynamic-component-loader.service.js +2 -33
- package/esm2015/lib/components/ndf-filters/utility/nxql-query.js +4 -4
- package/esm2015/lib/components/reports/ndf-reports/base/base-chart.js +10 -2
- package/esm2015/lib/components/reports/ndf-reports/charts-components/digit-chart/digit-chart.component.js +2 -2
- package/esm2015/lib/components/reports/ndf-reports/charts-components/graph-chart/graph-chart.component.js +2 -2
- package/esm2015/lib/components/reports/ndf-reports/components/_parts/timeline-dialog/timeline-dialog.component.js +12 -4
- package/esm2015/lib/components/reports/ndf-reports/components/dynamic-timeline-report/dynamic-timeline-report.component.js +8 -8
- package/esm2015/lib/components/reports/ndf-reports/containers/ndf-reports/ndf-reports.component.js +24 -3
- package/esm2015/lib/components/reports/ndf-reports/models/base.js +1 -1
- package/esm2015/lib/components/reports/ndf-reports/models/dynamic-line.js +1 -1
- package/esm2015/lib/components/reports/ndf-reports/models/ndf-reports.config.js +1 -1
- package/esm2015/lib/components/reports/ndf-reports/models/request.js +1 -1
- package/esm2015/lib/components/reports/ndf-reports/services/base-chart-builder.service.js +5 -5
- package/esm2015/lib/components/reports/ndf-reports/services/chart-data-transformers.service.js +1 -1
- package/esm2015/lib/components/reports/ndf-reports/services/digit-chart.service.js +3 -3
- package/esm2015/lib/components/reports/ndf-reports/services/dynamic-timeline-report.service.js +34 -29
- package/esm2015/lib/components/reports/ndf-reports/services/index.js +2 -1
- package/esm2015/lib/components/reports/ndf-reports/services/ndf-reports.service.js +12 -5
- package/esm2015/lib/components/reports/ndf-reports/services/reports-data-transformers.service.js +70 -0
- package/esm2015/lib/components/reports/ndf-reports/utilities/reports-table.mapper.js +3 -3
- package/esm2015/lib/components/skeleton/skeleton.component.js +1 -1
- package/esm2015/lib/components/spell-checker-field/spell-checker-field.module.js +1 -1
- package/esm2015/lib/shared/evaluator/types.js +1 -1
- package/fesm2015/nuxeo-development-framework.js +649 -378
- package/fesm2015/nuxeo-development-framework.js.map +1 -1
- package/lib/components/ndf-filters/base/base-checkbox-radio.component.d.ts +1 -0
- package/lib/components/ndf-filters/constants/type.d.ts +1 -0
- package/lib/components/ndf-filters/containers/aggregation-field/aggregation-field.component.d.ts +7 -0
- package/lib/components/ndf-filters/custom-components/aggregation-group/aggregation-group.component.d.ts +26 -0
- package/lib/components/ndf-filters/custom-components/aggregation-group/map-aggregation-config.d.ts +9 -0
- package/lib/components/ndf-filters/custom-components/index.d.ts +1 -0
- package/lib/components/ndf-filters/models/custom-field-config.d.ts +2 -2
- package/lib/components/ndf-filters/models/field-options/custom-fields-options.d.ts +14 -0
- package/lib/components/ndf-filters/ndf-filters-panel.module.d.ts +70 -59
- package/lib/components/ndf-filters/public-api.d.ts +3 -2
- package/lib/components/ndf-filters/services/dynamic-component-loader.service.d.ts +0 -3
- package/lib/components/reports/ndf-reports/base/base-chart.d.ts +5 -2
- package/lib/components/reports/ndf-reports/components/_parts/timeline-dialog/timeline-dialog.component.d.ts +2 -0
- package/lib/components/reports/ndf-reports/components/dynamic-timeline-report/dynamic-timeline-report.component.d.ts +4 -2
- package/lib/components/reports/ndf-reports/containers/ndf-reports/ndf-reports.component.d.ts +7 -2
- package/lib/components/reports/ndf-reports/models/base.d.ts +3 -1
- package/lib/components/reports/ndf-reports/models/dynamic-line.d.ts +6 -1
- package/lib/components/reports/ndf-reports/models/ndf-reports.config.d.ts +1 -0
- package/lib/components/reports/ndf-reports/models/request.d.ts +1 -0
- package/lib/components/reports/ndf-reports/services/base-chart-builder.service.d.ts +3 -3
- package/lib/components/reports/ndf-reports/services/chart-data-transformers.service.d.ts +9 -2
- package/lib/components/reports/ndf-reports/services/digit-chart.service.d.ts +2 -2
- package/lib/components/reports/ndf-reports/services/dynamic-timeline-report.service.d.ts +10 -15
- package/lib/components/reports/ndf-reports/services/index.d.ts +1 -0
- package/lib/components/reports/ndf-reports/services/ndf-reports.service.d.ts +5 -1
- package/lib/components/reports/ndf-reports/services/reports-data-transformers.service.d.ts +48 -0
- package/lib/shared/evaluator/types.d.ts +1 -1
- package/package.json +1 -1
- package/src/docs/ndf-table.doc.md +4 -5
|
@@ -15675,7 +15675,8 @@
|
|
|
15675
15675
|
date: 'date'
|
|
15676
15676
|
};
|
|
15677
15677
|
var CUSTOM_FIELD_TYPES = {
|
|
15678
|
-
activeUser: 'activeUser'
|
|
15678
|
+
activeUser: 'activeUser',
|
|
15679
|
+
aggregationGroup: 'aggregationGroup',
|
|
15679
15680
|
};
|
|
15680
15681
|
|
|
15681
15682
|
var AggregationFieldService = /** @class */ (function () {
|
|
@@ -17908,317 +17909,10 @@
|
|
|
17908
17909
|
return FieldValueObject;
|
|
17909
17910
|
}());
|
|
17910
17911
|
|
|
17911
|
-
var BaseCustomValueAccessor = /** @class */ (function (_super) {
|
|
17912
|
-
__extends(BaseCustomValueAccessor, _super);
|
|
17913
|
-
function BaseCustomValueAccessor(injector) {
|
|
17914
|
-
var _this = _super.call(this, injector) || this;
|
|
17915
|
-
_this.injector = injector;
|
|
17916
|
-
_this.onChange = function () { };
|
|
17917
|
-
_this.onTouched = function () { };
|
|
17918
|
-
_this.onValidationChange = function () { };
|
|
17919
|
-
return _this;
|
|
17920
|
-
}
|
|
17921
|
-
BaseCustomValueAccessor.prototype.registerOnChange = function (fn) {
|
|
17922
|
-
this.onChange = fn;
|
|
17923
|
-
};
|
|
17924
|
-
BaseCustomValueAccessor.prototype.registerOnTouched = function (fn) {
|
|
17925
|
-
this.onTouched = fn;
|
|
17926
|
-
};
|
|
17927
|
-
BaseCustomValueAccessor.prototype.setDisabledState = function (isDisabled) {
|
|
17928
|
-
this.disabled = isDisabled;
|
|
17929
|
-
this.cdr.markForCheck();
|
|
17930
|
-
};
|
|
17931
|
-
BaseCustomValueAccessor.prototype.registerOnValidatorChange = function (fn) {
|
|
17932
|
-
this.onValidationChange = fn;
|
|
17933
|
-
};
|
|
17934
|
-
return BaseCustomValueAccessor;
|
|
17935
|
-
}(BaseComponent));
|
|
17936
|
-
BaseCustomValueAccessor.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: BaseCustomValueAccessor, deps: [{ token: i0__namespace.Injector }], target: i0__namespace.ɵɵFactoryTarget.Directive });
|
|
17937
|
-
BaseCustomValueAccessor.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: BaseCustomValueAccessor, inputs: { disabled: "disabled" }, usesInheritance: true, ngImport: i0__namespace });
|
|
17938
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: BaseCustomValueAccessor, decorators: [{
|
|
17939
|
-
type: i0.Directive,
|
|
17940
|
-
args: [{}]
|
|
17941
|
-
}], ctorParameters: function () { return [{ type: i0__namespace.Injector }]; }, propDecorators: { disabled: [{
|
|
17942
|
-
type: i0.Input
|
|
17943
|
-
}] } });
|
|
17944
|
-
|
|
17945
|
-
var BaseCustomField = /** @class */ (function (_super) {
|
|
17946
|
-
__extends(BaseCustomField, _super);
|
|
17947
|
-
function BaseCustomField(injector) {
|
|
17948
|
-
var _this = _super.call(this, injector) || this;
|
|
17949
|
-
_this.injector = injector;
|
|
17950
|
-
_this._isFieldDirty = false;
|
|
17951
|
-
return _this;
|
|
17952
|
-
}
|
|
17953
|
-
Object.defineProperty(BaseCustomField.prototype, "renderOptions", {
|
|
17954
|
-
get: function () {
|
|
17955
|
-
var _a, _b;
|
|
17956
|
-
return (_b = (_a = this.field) === null || _a === void 0 ? void 0 : _a.render) === null || _b === void 0 ? void 0 : _b.options;
|
|
17957
|
-
},
|
|
17958
|
-
enumerable: false,
|
|
17959
|
-
configurable: true
|
|
17960
|
-
});
|
|
17961
|
-
BaseCustomField.prototype.validate = function (control) {
|
|
17962
|
-
return control.valid ? null : control.errors;
|
|
17963
|
-
};
|
|
17964
|
-
BaseCustomField.prototype._isValueObject = function () {
|
|
17965
|
-
var _a;
|
|
17966
|
-
return ((_a = this.field) === null || _a === void 0 ? void 0 : _a.valueType) === 'valueObject';
|
|
17967
|
-
};
|
|
17968
|
-
BaseCustomField.prototype._isSendAsQueryParams = function () {
|
|
17969
|
-
var _a;
|
|
17970
|
-
return ((_a = this.field) === null || _a === void 0 ? void 0 : _a.sendMode) === FIELD_SEND_MODE.queryParam;
|
|
17971
|
-
};
|
|
17972
|
-
BaseCustomField.prototype._prepareValueObject = function (value, operator, prefix) {
|
|
17973
|
-
var _a;
|
|
17974
|
-
if (operator === void 0) {
|
|
17975
|
-
operator = (_a = this.field) === null || _a === void 0 ? void 0 : _a.operator;
|
|
17976
|
-
}
|
|
17977
|
-
return new FieldValueObject({
|
|
17978
|
-
operator: operator,
|
|
17979
|
-
value: value,
|
|
17980
|
-
prefix: prefix
|
|
17981
|
-
});
|
|
17982
|
-
};
|
|
17983
|
-
return BaseCustomField;
|
|
17984
|
-
}(BaseCustomValueAccessor));
|
|
17985
|
-
BaseCustomField.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: BaseCustomField, deps: [{ token: i0__namespace.Injector }], target: i0__namespace.ɵɵFactoryTarget.Directive });
|
|
17986
|
-
BaseCustomField.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: BaseCustomField, inputs: { aggregations: "aggregations", field: "field" }, usesInheritance: true, ngImport: i0__namespace });
|
|
17987
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: BaseCustomField, decorators: [{
|
|
17988
|
-
type: i0.Directive
|
|
17989
|
-
}], ctorParameters: function () { return [{ type: i0__namespace.Injector }]; }, propDecorators: { aggregations: [{
|
|
17990
|
-
type: i0.Input
|
|
17991
|
-
}], field: [{
|
|
17992
|
-
type: i0.Input
|
|
17993
|
-
}] } });
|
|
17994
|
-
|
|
17995
|
-
var NxQL = /** @class */ (function () {
|
|
17996
|
-
function NxQL() {
|
|
17997
|
-
}
|
|
17998
|
-
NxQL._getDateRange = function (value) {
|
|
17999
|
-
return NxQL._getMinMaxRange(value, 'DATE');
|
|
18000
|
-
};
|
|
18001
|
-
NxQL._getMinMaxRange = function (value, prefix) {
|
|
18002
|
-
if (prefix === void 0) { prefix = ''; }
|
|
18003
|
-
var min = value.min, max = value.max;
|
|
18004
|
-
if (min && max) {
|
|
18005
|
-
return prefix + " '" + min + "' AND " + prefix + " '" + max + "'";
|
|
18006
|
-
}
|
|
18007
|
-
if (max) {
|
|
18008
|
-
return prefix + " '" + max + "'";
|
|
18009
|
-
}
|
|
18010
|
-
if (min) {
|
|
18011
|
-
return prefix + " '" + min + "'";
|
|
18012
|
-
}
|
|
18013
|
-
return '';
|
|
18014
|
-
};
|
|
18015
|
-
NxQL._getRangeOperator = function (value) {
|
|
18016
|
-
var min = value.min, max = value.max;
|
|
18017
|
-
if (min && max) {
|
|
18018
|
-
return COMPARISON_OPERATOR.between;
|
|
18019
|
-
}
|
|
18020
|
-
if (max) {
|
|
18021
|
-
return COMPARISON_OPERATOR.lessThan;
|
|
18022
|
-
}
|
|
18023
|
-
if (min) {
|
|
18024
|
-
return COMPARISON_OPERATOR.greaterThan;
|
|
18025
|
-
}
|
|
18026
|
-
return null;
|
|
18027
|
-
};
|
|
18028
|
-
NxQL._getValueRange = function (value, prefix, operator) {
|
|
18029
|
-
if (prefix === void 0) { prefix = ''; }
|
|
18030
|
-
var min = value.min, max = value.max;
|
|
18031
|
-
var baseObject = { value: '', prefix: prefix, operator: operator };
|
|
18032
|
-
if (min && max) {
|
|
18033
|
-
return new FieldValueObject(Object.assign(Object.assign({}, baseObject), { value: prefix + " '" + min + "' AND " + prefix + " '" + max + "'", min: "" + min, max: "" + max }));
|
|
18034
|
-
}
|
|
18035
|
-
if (max) {
|
|
18036
|
-
return new FieldValueObject(Object.assign(Object.assign({}, baseObject), { value: "" + max, max: "" + max }));
|
|
18037
|
-
}
|
|
18038
|
-
if (min) {
|
|
18039
|
-
return new FieldValueObject(Object.assign(Object.assign({}, baseObject), { value: "" + min, min: "" + min }));
|
|
18040
|
-
}
|
|
18041
|
-
};
|
|
18042
|
-
return NxQL;
|
|
18043
|
-
}());
|
|
18044
|
-
|
|
18045
|
-
function isFieldValueObject(value) {
|
|
18046
|
-
return typeof value === 'object' && (value[VALUE_OBJECT] || ('value' in value && 'operator' in value));
|
|
18047
|
-
}
|
|
18048
|
-
function isDateObject(obj) {
|
|
18049
|
-
return (obj &&
|
|
18050
|
-
typeof obj === 'object' &&
|
|
18051
|
-
'min' in obj &&
|
|
18052
|
-
'max' in obj &&
|
|
18053
|
-
typeof obj.min === 'string' &&
|
|
18054
|
-
typeof obj.max === 'string');
|
|
18055
|
-
}
|
|
18056
|
-
function removeEmptyKeys(data) {
|
|
18057
|
-
return Object.entries(data || {}).reduce(function (obj, _a) {
|
|
18058
|
-
var _b = __read(_a, 2), key = _b[0], value = _b[1];
|
|
18059
|
-
if (Array.isArray(value)) {
|
|
18060
|
-
var cleanedArray = value
|
|
18061
|
-
.map(function (item) { return (_.isObject(value) ? removeEmptyKeys(item) : item); })
|
|
18062
|
-
.filter(shouldIncludeValue);
|
|
18063
|
-
if (cleanedArray.length > 0) {
|
|
18064
|
-
obj[key] = cleanedArray;
|
|
18065
|
-
}
|
|
18066
|
-
}
|
|
18067
|
-
if (_.isObject(value) && !_.isDate(value) && !Array.isArray(value)) {
|
|
18068
|
-
var cleanedValue = removeEmptyKeys(value);
|
|
18069
|
-
if (Object.keys(cleanedValue).length > 0) {
|
|
18070
|
-
obj[key] = cleanedValue;
|
|
18071
|
-
}
|
|
18072
|
-
}
|
|
18073
|
-
else if (shouldIncludeValue(value)) {
|
|
18074
|
-
obj[key] = value;
|
|
18075
|
-
}
|
|
18076
|
-
return obj;
|
|
18077
|
-
}, {});
|
|
18078
|
-
}
|
|
18079
|
-
function shouldIncludeValue(value) {
|
|
18080
|
-
if (Array.isArray(value) && value.length > 0) {
|
|
18081
|
-
return value.some(function (item) { return shouldIncludeValue(item); });
|
|
18082
|
-
}
|
|
18083
|
-
return !Array.isArray(value) && (!!value || _.isBoolean(value) || _.isNumber(value) || _.isDate(value));
|
|
18084
|
-
}
|
|
18085
|
-
|
|
18086
|
-
var NxQlQuery = /** @class */ (function (_super) {
|
|
18087
|
-
__extends(NxQlQuery, _super);
|
|
18088
|
-
function NxQlQuery() {
|
|
18089
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
18090
|
-
}
|
|
18091
|
-
NxQlQuery.preparePayloadItem = function (value, field) {
|
|
18092
|
-
var _a;
|
|
18093
|
-
var _defaultOperator = field.type == 'aggregation' ? COMPARISON_OPERATOR.in : COMPARISON_OPERATOR.like;
|
|
18094
|
-
var _fieldName = field.config.fieldKey;
|
|
18095
|
-
var _operator = (value === null || value === void 0 ? void 0 : value.operator) || ((_a = field.config) === null || _a === void 0 ? void 0 : _a.operator) || _defaultOperator;
|
|
18096
|
-
return {
|
|
18097
|
-
name: _fieldName,
|
|
18098
|
-
operator: _operator,
|
|
18099
|
-
value: NxQlQuery.prepareValueByOperator(_operator, value)
|
|
18100
|
-
};
|
|
18101
|
-
};
|
|
18102
|
-
NxQlQuery.prepareValueByOperator = function (operator, fieldValue) {
|
|
18103
|
-
var _b;
|
|
18104
|
-
var _opr = COMPARISON_OPERATOR;
|
|
18105
|
-
var value = fieldValue.value, prefix = fieldValue.prefix;
|
|
18106
|
-
if (operator === _opr.between) {
|
|
18107
|
-
return NxQlQuery._getMinMaxRange(fieldValue, prefix);
|
|
18108
|
-
}
|
|
18109
|
-
var operatorHandlers = (_b = {},
|
|
18110
|
-
_b[_opr.equals] = NxQlQuery.equals,
|
|
18111
|
-
_b[_opr.notEquals] = NxQlQuery.equals,
|
|
18112
|
-
_b[_opr.lessThan] = NxQlQuery.equals,
|
|
18113
|
-
_b[_opr.greaterThan] = NxQlQuery.equals,
|
|
18114
|
-
_b[_opr.in] = NxQlQuery.in,
|
|
18115
|
-
_b[_opr.notIn] = NxQlQuery.in,
|
|
18116
|
-
_b[_opr.lessThanOrEqual] = NxQlQuery.equals,
|
|
18117
|
-
_b[_opr.greaterThanOrEqual] = NxQlQuery.equals,
|
|
18118
|
-
_b[_opr.like] = NxQlQuery.like,
|
|
18119
|
-
_b[_opr.iLike] = NxQlQuery.like,
|
|
18120
|
-
_b[_opr.notLike] = NxQlQuery.like,
|
|
18121
|
-
_b[_opr.notILike] = NxQlQuery.like,
|
|
18122
|
-
_b[_opr.startsWith] = NxQlQuery.equals,
|
|
18123
|
-
_b[_opr.fullText] = NxQlQuery.equals,
|
|
18124
|
-
_b);
|
|
18125
|
-
var _val = Array.isArray(value) ? value.join(',') : value;
|
|
18126
|
-
return operatorHandlers[operator](_val, prefix);
|
|
18127
|
-
};
|
|
18128
|
-
NxQlQuery.equals = function (value, prefix) {
|
|
18129
|
-
if (prefix === void 0) { prefix = ''; }
|
|
18130
|
-
return (prefix ? prefix + " " : '') + "'" + value.trim() + "'";
|
|
18131
|
-
};
|
|
18132
|
-
NxQlQuery.like = function (value, prefix) {
|
|
18133
|
-
if (prefix === void 0) { prefix = ''; }
|
|
18134
|
-
return (prefix ? prefix + " " : '') + "'%" + value.trim() + "%'";
|
|
18135
|
-
};
|
|
18136
|
-
NxQlQuery.in = function (value, prefix) {
|
|
18137
|
-
if (prefix === void 0) { prefix = ''; }
|
|
18138
|
-
return (prefix ? prefix + " " : '') + "(" + value.trim() + ")";
|
|
18139
|
-
};
|
|
18140
|
-
NxQlQuery.between = function (value1, value2) {
|
|
18141
|
-
return value1 + " AND " + value2;
|
|
18142
|
-
};
|
|
18143
|
-
return NxQlQuery;
|
|
18144
|
-
}(NxQL));
|
|
18145
|
-
|
|
18146
|
-
var ActiveUserService = /** @class */ (function (_super) {
|
|
18147
|
-
__extends(ActiveUserService, _super);
|
|
18148
|
-
function ActiveUserService() {
|
|
18149
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
18150
|
-
}
|
|
18151
|
-
ActiveUserService.prototype.getCurrentUser = function () {
|
|
18152
|
-
return this.user;
|
|
18153
|
-
};
|
|
18154
|
-
return ActiveUserService;
|
|
18155
|
-
}(BaseService));
|
|
18156
|
-
ActiveUserService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ActiveUserService, deps: null, target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
18157
|
-
ActiveUserService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ActiveUserService, providedIn: 'root' });
|
|
18158
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ActiveUserService, decorators: [{
|
|
18159
|
-
type: i0.Injectable,
|
|
18160
|
-
args: [{
|
|
18161
|
-
providedIn: 'root'
|
|
18162
|
-
}]
|
|
18163
|
-
}] });
|
|
18164
|
-
|
|
18165
|
-
var ActiveUserSwitchComponent = /** @class */ (function (_super) {
|
|
18166
|
-
__extends(ActiveUserSwitchComponent, _super);
|
|
18167
|
-
function ActiveUserSwitchComponent() {
|
|
18168
|
-
var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
|
|
18169
|
-
_this._userService = _this.injector.get(ActiveUserService);
|
|
18170
|
-
_this.isUserSelected = false;
|
|
18171
|
-
return _this;
|
|
18172
|
-
}
|
|
18173
|
-
ActiveUserSwitchComponent.prototype.writeValue = function (value) {
|
|
18174
|
-
if (value) {
|
|
18175
|
-
var val = isFieldValueObject(value) ? value.value : value;
|
|
18176
|
-
this.isUserSelected = val === this.getValue();
|
|
18177
|
-
}
|
|
18178
|
-
};
|
|
18179
|
-
ActiveUserSwitchComponent.prototype.toggle = function (_b) {
|
|
18180
|
-
var checked = _b.checked;
|
|
18181
|
-
this.isUserSelected = checked;
|
|
18182
|
-
if (!checked) {
|
|
18183
|
-
this.onChange(null);
|
|
18184
|
-
return;
|
|
18185
|
-
}
|
|
18186
|
-
if (this.field.valueType === 'property') {
|
|
18187
|
-
this.onChange(this.getValue());
|
|
18188
|
-
return;
|
|
18189
|
-
}
|
|
18190
|
-
this.updateObjectValue();
|
|
18191
|
-
};
|
|
18192
|
-
ActiveUserSwitchComponent.prototype.getValue = function () {
|
|
18193
|
-
var _a;
|
|
18194
|
-
return ___default["default"].get(this._userService.getCurrentUser(), ((_a = this.renderOptions) === null || _a === void 0 ? void 0 : _a.bindValue) || 'properties.username');
|
|
18195
|
-
};
|
|
18196
|
-
ActiveUserSwitchComponent.prototype.updateObjectValue = function () {
|
|
18197
|
-
var _a;
|
|
18198
|
-
var operator = ((_a = this.field) === null || _a === void 0 ? void 0 : _a.operator) || COMPARISON_OPERATOR.equals;
|
|
18199
|
-
var data = this._prepareValueObject(this.getValue(), operator);
|
|
18200
|
-
this.onChange(data);
|
|
18201
|
-
};
|
|
18202
|
-
return ActiveUserSwitchComponent;
|
|
18203
|
-
}(BaseCustomField));
|
|
18204
|
-
ActiveUserSwitchComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ActiveUserSwitchComponent, deps: null, target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
18205
|
-
ActiveUserSwitchComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: ActiveUserSwitchComponent, selector: "active-user-switch", usesInheritance: true, ngImport: i0__namespace, template: "<mat-slide-toggle\r\n\tclass=\"filter-switch__item\"\r\n\t[checked]=\"isUserSelected\"\r\n\t(change)=\"toggle($event)\"\r\n\t[class.checkedBox]=\"isUserSelected\"\r\n\t[class.unCheckedBox]=\"!isUserSelected\"\r\n>\r\n\t{{ renderOptions?.text || field?.label | translate }}\r\n</mat-slide-toggle>\r\n", styles: [""], components: [{ type: i1__namespace$9.MatSlideToggle, selector: "mat-slide-toggle", inputs: ["disabled", "disableRipple", "color", "tabIndex", "name", "id", "labelPosition", "aria-label", "aria-labelledby", "required", "checked"], outputs: ["change", "toggleChange"], exportAs: ["matSlideToggle"] }], pipes: { "translate": i1__namespace.TranslatePipe } });
|
|
18206
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ActiveUserSwitchComponent, decorators: [{
|
|
18207
|
-
type: i0.Component,
|
|
18208
|
-
args: [{
|
|
18209
|
-
selector: 'active-user-switch',
|
|
18210
|
-
templateUrl: './active-user-switch.component.html',
|
|
18211
|
-
styleUrls: ['./active-user-switch.component.scss']
|
|
18212
|
-
}]
|
|
18213
|
-
}] });
|
|
18214
|
-
|
|
18215
17912
|
var DynamicComponentLoaderService = /** @class */ (function () {
|
|
18216
17913
|
function DynamicComponentLoaderService(_factoryResolver) {
|
|
18217
17914
|
this._factoryResolver = _factoryResolver;
|
|
18218
17915
|
this._components = new Map();
|
|
18219
|
-
this._registerCustomComponent();
|
|
18220
|
-
this._registerAggregationsComponents();
|
|
18221
|
-
this._registerPredicateComponents();
|
|
18222
17916
|
}
|
|
18223
17917
|
DynamicComponentLoaderService.prototype.registerComponent = function (key, component) {
|
|
18224
17918
|
this._components.set(key, component);
|
|
@@ -18234,31 +17928,6 @@
|
|
|
18234
17928
|
var component = this._factoryResolver.resolveComponentFactory(componentAngularType);
|
|
18235
17929
|
return vcr.createComponent(component);
|
|
18236
17930
|
};
|
|
18237
|
-
//------
|
|
18238
|
-
// CUSTOM
|
|
18239
|
-
//------
|
|
18240
|
-
DynamicComponentLoaderService.prototype._registerCustomComponent = function () {
|
|
18241
|
-
this.registerComponent(CUSTOM_FIELD_TYPES.activeUser, ActiveUserSwitchComponent);
|
|
18242
|
-
};
|
|
18243
|
-
//------
|
|
18244
|
-
// AGGREGATION
|
|
18245
|
-
//------
|
|
18246
|
-
DynamicComponentLoaderService.prototype._registerAggregationsComponents = function () {
|
|
18247
|
-
this.registerComponent(AGGREGATION_FIELD_TYPES.autocomplete, AggregationAutocompleteComponent);
|
|
18248
|
-
this.registerComponent(AGGREGATION_FIELD_TYPES.dropdown, AggregationSelectComponent);
|
|
18249
|
-
this.registerComponent(AGGREGATION_FIELD_TYPES.switch, AggregationSwitchComponent);
|
|
18250
|
-
this.registerComponent(AGGREGATION_FIELD_TYPES.radio, AggregationRadioComponent);
|
|
18251
|
-
this.registerComponent(AGGREGATION_FIELD_TYPES.dateList, AggregationDateListComponent);
|
|
18252
|
-
this.registerComponent(AGGREGATION_FIELD_TYPES.custom, AggregationCustomComponent);
|
|
18253
|
-
this.registerComponent(AGGREGATION_FIELD_TYPES.checkbox, AggregationCheckboxComponent);
|
|
18254
|
-
};
|
|
18255
|
-
//------
|
|
18256
|
-
// PREDICATE
|
|
18257
|
-
//------
|
|
18258
|
-
DynamicComponentLoaderService.prototype._registerPredicateComponents = function () {
|
|
18259
|
-
this.registerComponent(PREDICATE_FIELD_TYPES.input, PredicateTextInputComponent);
|
|
18260
|
-
this.registerComponent(PREDICATE_FIELD_TYPES.date, PredicateDateInputComponent);
|
|
18261
|
-
};
|
|
18262
17931
|
return DynamicComponentLoaderService;
|
|
18263
17932
|
}());
|
|
18264
17933
|
DynamicComponentLoaderService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: DynamicComponentLoaderService, deps: [{ token: i0__namespace.ComponentFactoryResolver }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
@@ -18389,6 +18058,157 @@
|
|
|
18389
18058
|
}]
|
|
18390
18059
|
}], ctorParameters: function () { return []; } });
|
|
18391
18060
|
|
|
18061
|
+
var NxQL = /** @class */ (function () {
|
|
18062
|
+
function NxQL() {
|
|
18063
|
+
}
|
|
18064
|
+
NxQL._getDateRange = function (value) {
|
|
18065
|
+
return NxQL._getMinMaxRange(value, 'DATE');
|
|
18066
|
+
};
|
|
18067
|
+
NxQL._getMinMaxRange = function (value, prefix) {
|
|
18068
|
+
if (prefix === void 0) { prefix = ''; }
|
|
18069
|
+
var min = value.min, max = value.max;
|
|
18070
|
+
if (min && max) {
|
|
18071
|
+
return prefix + " '" + min + "' AND " + prefix + " '" + max + "'";
|
|
18072
|
+
}
|
|
18073
|
+
if (max) {
|
|
18074
|
+
return prefix + " '" + max + "'";
|
|
18075
|
+
}
|
|
18076
|
+
if (min) {
|
|
18077
|
+
return prefix + " '" + min + "'";
|
|
18078
|
+
}
|
|
18079
|
+
return '';
|
|
18080
|
+
};
|
|
18081
|
+
NxQL._getRangeOperator = function (value) {
|
|
18082
|
+
var min = value.min, max = value.max;
|
|
18083
|
+
if (min && max) {
|
|
18084
|
+
return COMPARISON_OPERATOR.between;
|
|
18085
|
+
}
|
|
18086
|
+
if (max) {
|
|
18087
|
+
return COMPARISON_OPERATOR.lessThan;
|
|
18088
|
+
}
|
|
18089
|
+
if (min) {
|
|
18090
|
+
return COMPARISON_OPERATOR.greaterThan;
|
|
18091
|
+
}
|
|
18092
|
+
return null;
|
|
18093
|
+
};
|
|
18094
|
+
NxQL._getValueRange = function (value, prefix, operator) {
|
|
18095
|
+
if (prefix === void 0) { prefix = ''; }
|
|
18096
|
+
var min = value.min, max = value.max;
|
|
18097
|
+
var baseObject = { value: '', prefix: prefix, operator: operator };
|
|
18098
|
+
if (min && max) {
|
|
18099
|
+
return new FieldValueObject(Object.assign(Object.assign({}, baseObject), { value: prefix + " '" + min + "' AND " + prefix + " '" + max + "'", min: "" + min, max: "" + max }));
|
|
18100
|
+
}
|
|
18101
|
+
if (max) {
|
|
18102
|
+
return new FieldValueObject(Object.assign(Object.assign({}, baseObject), { value: "" + max, max: "" + max }));
|
|
18103
|
+
}
|
|
18104
|
+
if (min) {
|
|
18105
|
+
return new FieldValueObject(Object.assign(Object.assign({}, baseObject), { value: "" + min, min: "" + min }));
|
|
18106
|
+
}
|
|
18107
|
+
};
|
|
18108
|
+
return NxQL;
|
|
18109
|
+
}());
|
|
18110
|
+
|
|
18111
|
+
function isFieldValueObject(value) {
|
|
18112
|
+
return typeof value === 'object' && (value[VALUE_OBJECT] || ('value' in value && 'operator' in value));
|
|
18113
|
+
}
|
|
18114
|
+
function isDateObject(obj) {
|
|
18115
|
+
return (obj &&
|
|
18116
|
+
typeof obj === 'object' &&
|
|
18117
|
+
'min' in obj &&
|
|
18118
|
+
'max' in obj &&
|
|
18119
|
+
typeof obj.min === 'string' &&
|
|
18120
|
+
typeof obj.max === 'string');
|
|
18121
|
+
}
|
|
18122
|
+
function removeEmptyKeys(data) {
|
|
18123
|
+
return Object.entries(data || {}).reduce(function (obj, _a) {
|
|
18124
|
+
var _b = __read(_a, 2), key = _b[0], value = _b[1];
|
|
18125
|
+
if (Array.isArray(value)) {
|
|
18126
|
+
var cleanedArray = value
|
|
18127
|
+
.map(function (item) { return (_.isObject(value) ? removeEmptyKeys(item) : item); })
|
|
18128
|
+
.filter(shouldIncludeValue);
|
|
18129
|
+
if (cleanedArray.length > 0) {
|
|
18130
|
+
obj[key] = cleanedArray;
|
|
18131
|
+
}
|
|
18132
|
+
}
|
|
18133
|
+
if (_.isObject(value) && !_.isDate(value) && !Array.isArray(value)) {
|
|
18134
|
+
var cleanedValue = removeEmptyKeys(value);
|
|
18135
|
+
if (Object.keys(cleanedValue).length > 0) {
|
|
18136
|
+
obj[key] = cleanedValue;
|
|
18137
|
+
}
|
|
18138
|
+
}
|
|
18139
|
+
else if (shouldIncludeValue(value)) {
|
|
18140
|
+
obj[key] = value;
|
|
18141
|
+
}
|
|
18142
|
+
return obj;
|
|
18143
|
+
}, {});
|
|
18144
|
+
}
|
|
18145
|
+
function shouldIncludeValue(value) {
|
|
18146
|
+
if (Array.isArray(value) && value.length > 0) {
|
|
18147
|
+
return value.some(function (item) { return shouldIncludeValue(item); });
|
|
18148
|
+
}
|
|
18149
|
+
return !Array.isArray(value) && (!!value || _.isBoolean(value) || _.isNumber(value) || _.isDate(value));
|
|
18150
|
+
}
|
|
18151
|
+
|
|
18152
|
+
var NxQlQuery = /** @class */ (function (_super) {
|
|
18153
|
+
__extends(NxQlQuery, _super);
|
|
18154
|
+
function NxQlQuery() {
|
|
18155
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
18156
|
+
}
|
|
18157
|
+
NxQlQuery.preparePayloadItem = function (value, field) {
|
|
18158
|
+
var _a;
|
|
18159
|
+
var _defaultOperator = field.type == 'aggregation' ? COMPARISON_OPERATOR.in : COMPARISON_OPERATOR.like;
|
|
18160
|
+
var _fieldName = field.config.fieldKey;
|
|
18161
|
+
var _operator = (value === null || value === void 0 ? void 0 : value.operator) || ((_a = field.config) === null || _a === void 0 ? void 0 : _a.operator) || _defaultOperator;
|
|
18162
|
+
return {
|
|
18163
|
+
name: _fieldName,
|
|
18164
|
+
operator: _operator,
|
|
18165
|
+
value: NxQlQuery.prepareValueByOperator(_operator, value)
|
|
18166
|
+
};
|
|
18167
|
+
};
|
|
18168
|
+
NxQlQuery.prepareValueByOperator = function (operator, fieldValue) {
|
|
18169
|
+
var _b;
|
|
18170
|
+
var _opr = COMPARISON_OPERATOR;
|
|
18171
|
+
var value = fieldValue.value, prefix = fieldValue.prefix;
|
|
18172
|
+
if (operator === _opr.between) {
|
|
18173
|
+
return NxQlQuery._getMinMaxRange(fieldValue, prefix);
|
|
18174
|
+
}
|
|
18175
|
+
var operatorHandlers = (_b = {},
|
|
18176
|
+
_b[_opr.equals] = NxQlQuery.equals,
|
|
18177
|
+
_b[_opr.notEquals] = NxQlQuery.equals,
|
|
18178
|
+
_b[_opr.lessThan] = NxQlQuery.equals,
|
|
18179
|
+
_b[_opr.greaterThan] = NxQlQuery.equals,
|
|
18180
|
+
_b[_opr.in] = NxQlQuery.in,
|
|
18181
|
+
_b[_opr.notIn] = NxQlQuery.in,
|
|
18182
|
+
_b[_opr.lessThanOrEqual] = NxQlQuery.equals,
|
|
18183
|
+
_b[_opr.greaterThanOrEqual] = NxQlQuery.equals,
|
|
18184
|
+
_b[_opr.like] = NxQlQuery.like,
|
|
18185
|
+
_b[_opr.iLike] = NxQlQuery.like,
|
|
18186
|
+
_b[_opr.notLike] = NxQlQuery.like,
|
|
18187
|
+
_b[_opr.notILike] = NxQlQuery.like,
|
|
18188
|
+
_b[_opr.startsWith] = NxQlQuery.equals,
|
|
18189
|
+
_b[_opr.fullText] = NxQlQuery.equals,
|
|
18190
|
+
_b);
|
|
18191
|
+
return operatorHandlers[operator](value, prefix);
|
|
18192
|
+
};
|
|
18193
|
+
NxQlQuery.equals = function (value, prefix) {
|
|
18194
|
+
if (prefix === void 0) { prefix = ''; }
|
|
18195
|
+
return (prefix ? prefix + " " : '') + "'" + value.trim() + "'";
|
|
18196
|
+
};
|
|
18197
|
+
NxQlQuery.like = function (value, prefix) {
|
|
18198
|
+
if (prefix === void 0) { prefix = ''; }
|
|
18199
|
+
return (prefix ? prefix + " " : '') + "'%" + value.trim() + "%'";
|
|
18200
|
+
};
|
|
18201
|
+
NxQlQuery.in = function (value, prefix) {
|
|
18202
|
+
if (prefix === void 0) { prefix = ''; }
|
|
18203
|
+
var _val = Array.isArray(value) ? value.map(function (item) { return "'" + item + "'"; }).join(',') : value;
|
|
18204
|
+
return (prefix ? prefix + " " : '') + "(" + _val.trim() + ")";
|
|
18205
|
+
};
|
|
18206
|
+
NxQlQuery.between = function (value1, value2) {
|
|
18207
|
+
return value1 + " AND " + value2;
|
|
18208
|
+
};
|
|
18209
|
+
return NxQlQuery;
|
|
18210
|
+
}(NxQL));
|
|
18211
|
+
|
|
18392
18212
|
var FiltersMapperService = /** @class */ (function () {
|
|
18393
18213
|
function FiltersMapperService() {
|
|
18394
18214
|
}
|
|
@@ -18588,12 +18408,15 @@
|
|
|
18588
18408
|
return _this;
|
|
18589
18409
|
}
|
|
18590
18410
|
AggregationBaseSelectionComponent.prototype.writeValue = function (values) {
|
|
18591
|
-
var
|
|
18411
|
+
var _b;
|
|
18592
18412
|
if (values) {
|
|
18593
|
-
var _values =
|
|
18413
|
+
var _values = this._getValues(values);
|
|
18414
|
+
if (___default["default"].isEqual(_values, this.internalValue)) {
|
|
18415
|
+
return;
|
|
18416
|
+
}
|
|
18594
18417
|
var _vals = Array.isArray(_values) ? _values : [_values];
|
|
18595
18418
|
this.internalValue = _values;
|
|
18596
|
-
(
|
|
18419
|
+
(_b = this.selectionModel).select.apply(_b, __spreadArray([], __read(_vals)));
|
|
18597
18420
|
this._isFieldDirty = true;
|
|
18598
18421
|
this.cdr.markForCheck();
|
|
18599
18422
|
}
|
|
@@ -18606,19 +18429,28 @@
|
|
|
18606
18429
|
var _this = this;
|
|
18607
18430
|
this.selectionModel.changed
|
|
18608
18431
|
.asObservable()
|
|
18609
|
-
.pipe(operators.map(function (data) { return data.source.selected; }), operators.distinctUntilChanged(function (a, b) { return ___default["default"].isEqual(a, b); }), operators.takeUntil(this.destroy$))
|
|
18432
|
+
.pipe(operators.map(function (data) { return data.source.selected; }), operators.distinctUntilChanged(function (a, b) { return ___default["default"].isEqual(a, b); }), operators.filter(function (value) { return !___default["default"].isEqual(_this.internalValue, value); }), operators.takeUntil(this.destroy$))
|
|
18610
18433
|
.subscribe(function (value) {
|
|
18611
18434
|
_this.emitValue(value);
|
|
18612
18435
|
});
|
|
18613
18436
|
};
|
|
18614
18437
|
AggregationBaseSelectionComponent.prototype.emitValue = function (value) {
|
|
18438
|
+
var _a;
|
|
18615
18439
|
this.internalValue = value;
|
|
18616
18440
|
this._isFieldDirty = !!(value === null || value === void 0 ? void 0 : value.length);
|
|
18617
|
-
|
|
18441
|
+
if ((value === null || value === void 0 ? void 0 : value.length) !== 0 && this._isValueObject()) {
|
|
18442
|
+
this.onChange(this._prepareValueObject(value, ((_a = this.fieldConfig) === null || _a === void 0 ? void 0 : _a.operator) || COMPARISON_OPERATOR.in));
|
|
18443
|
+
return;
|
|
18444
|
+
}
|
|
18445
|
+
this.onChange(value);
|
|
18618
18446
|
};
|
|
18619
18447
|
AggregationBaseSelectionComponent.prototype.sortChange = function (event) {
|
|
18620
18448
|
this.sort = Object.assign({}, event);
|
|
18621
18449
|
};
|
|
18450
|
+
AggregationBaseSelectionComponent.prototype._getValues = function (values) {
|
|
18451
|
+
var _a;
|
|
18452
|
+
return Array.isArray(values) ? values : ((_a = values) === null || _a === void 0 ? void 0 : _a.value) || [];
|
|
18453
|
+
};
|
|
18622
18454
|
return AggregationBaseSelectionComponent;
|
|
18623
18455
|
}(BaseAggregationField));
|
|
18624
18456
|
AggregationBaseSelectionComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: AggregationBaseSelectionComponent, deps: [{ token: i0__namespace.Injector }], target: i0__namespace.ɵɵFactoryTarget.Directive });
|
|
@@ -18627,6 +18459,40 @@
|
|
|
18627
18459
|
type: i0.Directive
|
|
18628
18460
|
}], ctorParameters: function () { return [{ type: i0__namespace.Injector }]; } });
|
|
18629
18461
|
|
|
18462
|
+
var BaseCustomValueAccessor = /** @class */ (function (_super) {
|
|
18463
|
+
__extends(BaseCustomValueAccessor, _super);
|
|
18464
|
+
function BaseCustomValueAccessor(injector) {
|
|
18465
|
+
var _this = _super.call(this, injector) || this;
|
|
18466
|
+
_this.injector = injector;
|
|
18467
|
+
_this.onChange = function () { };
|
|
18468
|
+
_this.onTouched = function () { };
|
|
18469
|
+
_this.onValidationChange = function () { };
|
|
18470
|
+
return _this;
|
|
18471
|
+
}
|
|
18472
|
+
BaseCustomValueAccessor.prototype.registerOnChange = function (fn) {
|
|
18473
|
+
this.onChange = fn;
|
|
18474
|
+
};
|
|
18475
|
+
BaseCustomValueAccessor.prototype.registerOnTouched = function (fn) {
|
|
18476
|
+
this.onTouched = fn;
|
|
18477
|
+
};
|
|
18478
|
+
BaseCustomValueAccessor.prototype.setDisabledState = function (isDisabled) {
|
|
18479
|
+
this.disabled = isDisabled;
|
|
18480
|
+
this.cdr.markForCheck();
|
|
18481
|
+
};
|
|
18482
|
+
BaseCustomValueAccessor.prototype.registerOnValidatorChange = function (fn) {
|
|
18483
|
+
this.onValidationChange = fn;
|
|
18484
|
+
};
|
|
18485
|
+
return BaseCustomValueAccessor;
|
|
18486
|
+
}(BaseComponent));
|
|
18487
|
+
BaseCustomValueAccessor.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: BaseCustomValueAccessor, deps: [{ token: i0__namespace.Injector }], target: i0__namespace.ɵɵFactoryTarget.Directive });
|
|
18488
|
+
BaseCustomValueAccessor.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: BaseCustomValueAccessor, inputs: { disabled: "disabled" }, usesInheritance: true, ngImport: i0__namespace });
|
|
18489
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: BaseCustomValueAccessor, decorators: [{
|
|
18490
|
+
type: i0.Directive,
|
|
18491
|
+
args: [{}]
|
|
18492
|
+
}], ctorParameters: function () { return [{ type: i0__namespace.Injector }]; }, propDecorators: { disabled: [{
|
|
18493
|
+
type: i0.Input
|
|
18494
|
+
}] } });
|
|
18495
|
+
|
|
18630
18496
|
var BasePredicateField = /** @class */ (function (_super) {
|
|
18631
18497
|
__extends(BasePredicateField, _super);
|
|
18632
18498
|
function BasePredicateField() {
|
|
@@ -18674,6 +18540,56 @@
|
|
|
18674
18540
|
type: i0.Input
|
|
18675
18541
|
}] } });
|
|
18676
18542
|
|
|
18543
|
+
var BaseCustomField = /** @class */ (function (_super) {
|
|
18544
|
+
__extends(BaseCustomField, _super);
|
|
18545
|
+
function BaseCustomField(injector) {
|
|
18546
|
+
var _this = _super.call(this, injector) || this;
|
|
18547
|
+
_this.injector = injector;
|
|
18548
|
+
_this._isFieldDirty = false;
|
|
18549
|
+
return _this;
|
|
18550
|
+
}
|
|
18551
|
+
Object.defineProperty(BaseCustomField.prototype, "renderOptions", {
|
|
18552
|
+
get: function () {
|
|
18553
|
+
var _a, _b;
|
|
18554
|
+
return (_b = (_a = this.field) === null || _a === void 0 ? void 0 : _a.render) === null || _b === void 0 ? void 0 : _b.options;
|
|
18555
|
+
},
|
|
18556
|
+
enumerable: false,
|
|
18557
|
+
configurable: true
|
|
18558
|
+
});
|
|
18559
|
+
BaseCustomField.prototype.validate = function (control) {
|
|
18560
|
+
return control.valid ? null : control.errors;
|
|
18561
|
+
};
|
|
18562
|
+
BaseCustomField.prototype._isValueObject = function () {
|
|
18563
|
+
var _a;
|
|
18564
|
+
return ((_a = this.field) === null || _a === void 0 ? void 0 : _a.valueType) === 'valueObject';
|
|
18565
|
+
};
|
|
18566
|
+
BaseCustomField.prototype._isSendAsQueryParams = function () {
|
|
18567
|
+
var _a;
|
|
18568
|
+
return ((_a = this.field) === null || _a === void 0 ? void 0 : _a.sendMode) === FIELD_SEND_MODE.queryParam;
|
|
18569
|
+
};
|
|
18570
|
+
BaseCustomField.prototype._prepareValueObject = function (value, operator, prefix) {
|
|
18571
|
+
var _a;
|
|
18572
|
+
if (operator === void 0) {
|
|
18573
|
+
operator = (_a = this.field) === null || _a === void 0 ? void 0 : _a.operator;
|
|
18574
|
+
}
|
|
18575
|
+
return new FieldValueObject({
|
|
18576
|
+
operator: operator,
|
|
18577
|
+
value: value,
|
|
18578
|
+
prefix: prefix
|
|
18579
|
+
});
|
|
18580
|
+
};
|
|
18581
|
+
return BaseCustomField;
|
|
18582
|
+
}(BaseCustomValueAccessor));
|
|
18583
|
+
BaseCustomField.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: BaseCustomField, deps: [{ token: i0__namespace.Injector }], target: i0__namespace.ɵɵFactoryTarget.Directive });
|
|
18584
|
+
BaseCustomField.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: BaseCustomField, inputs: { aggregations: "aggregations", field: "field" }, usesInheritance: true, ngImport: i0__namespace });
|
|
18585
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: BaseCustomField, decorators: [{
|
|
18586
|
+
type: i0.Directive
|
|
18587
|
+
}], ctorParameters: function () { return [{ type: i0__namespace.Injector }]; }, propDecorators: { aggregations: [{
|
|
18588
|
+
type: i0.Input
|
|
18589
|
+
}], field: [{
|
|
18590
|
+
type: i0.Input
|
|
18591
|
+
}] } });
|
|
18592
|
+
|
|
18677
18593
|
var AUTOCOMPLETE_TEMPLATE = new i0.InjectionToken('AutocompleteTemplateDirective');
|
|
18678
18594
|
var AutocompleteTemplateDirective = /** @class */ (function () {
|
|
18679
18595
|
function AutocompleteTemplateDirective(template) {
|
|
@@ -20127,7 +20043,8 @@
|
|
|
20127
20043
|
}
|
|
20128
20044
|
};
|
|
20129
20045
|
AggregationFieldComponent.prototype._prepareField = function () {
|
|
20130
|
-
var instance = this._componentRef
|
|
20046
|
+
var instance = this._componentRef
|
|
20047
|
+
.instance;
|
|
20131
20048
|
instance.aggregation = this.aggregation;
|
|
20132
20049
|
instance.fieldConfig = this.fieldConfig;
|
|
20133
20050
|
if (this.contentTemplate) {
|
|
@@ -20141,13 +20058,13 @@
|
|
|
20141
20058
|
{
|
|
20142
20059
|
provide: i2.NG_VALUE_ACCESSOR,
|
|
20143
20060
|
useExisting: i0.forwardRef(function () { return AggregationFieldComponent; }),
|
|
20144
|
-
multi: true
|
|
20061
|
+
multi: true,
|
|
20145
20062
|
},
|
|
20146
20063
|
{
|
|
20147
20064
|
provide: i2.NG_VALIDATORS,
|
|
20148
20065
|
useExisting: i0.forwardRef(function () { return AggregationFieldComponent; }),
|
|
20149
|
-
multi: true
|
|
20150
|
-
}
|
|
20066
|
+
multi: true,
|
|
20067
|
+
},
|
|
20151
20068
|
], usesInheritance: true, ngImport: i0__namespace, template: '<ng-container #dynamicContainer></ng-container>', isInline: true, styles: [""], encapsulation: i0__namespace.ViewEncapsulation.None });
|
|
20152
20069
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: AggregationFieldComponent, decorators: [{
|
|
20153
20070
|
type: i0.Component,
|
|
@@ -20160,30 +20077,47 @@
|
|
|
20160
20077
|
{
|
|
20161
20078
|
provide: i2.NG_VALUE_ACCESSOR,
|
|
20162
20079
|
useExisting: i0.forwardRef(function () { return AggregationFieldComponent; }),
|
|
20163
|
-
multi: true
|
|
20080
|
+
multi: true,
|
|
20164
20081
|
},
|
|
20165
20082
|
{
|
|
20166
20083
|
provide: i2.NG_VALIDATORS,
|
|
20167
20084
|
useExisting: i0.forwardRef(function () { return AggregationFieldComponent; }),
|
|
20168
|
-
multi: true
|
|
20169
|
-
}
|
|
20085
|
+
multi: true,
|
|
20086
|
+
},
|
|
20170
20087
|
],
|
|
20171
20088
|
host: {
|
|
20172
|
-
'[class]': "'aggregation-field' + ' aggregation-field__fieldConfig?.render?.type' "
|
|
20173
|
-
}
|
|
20089
|
+
'[class]': "'aggregation-field' + ' aggregation-field__fieldConfig?.render?.type' ",
|
|
20090
|
+
},
|
|
20174
20091
|
}]
|
|
20175
20092
|
}], propDecorators: { aggregation: [{
|
|
20176
20093
|
type: i0.Input
|
|
20177
20094
|
}], contentTemplate: [{
|
|
20178
20095
|
type: i0.Input
|
|
20179
|
-
}] } });
|
|
20096
|
+
}] } });
|
|
20097
|
+
var AggregationFieldModule = /** @class */ (function () {
|
|
20098
|
+
function AggregationFieldModule() {
|
|
20099
|
+
}
|
|
20100
|
+
return AggregationFieldModule;
|
|
20101
|
+
}());
|
|
20102
|
+
AggregationFieldModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: AggregationFieldModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
20103
|
+
AggregationFieldModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: AggregationFieldModule, declarations: [AggregationFieldComponent], imports: [i4.CommonModule, i2.FormsModule, i2.ReactiveFormsModule], exports: [AggregationFieldComponent] });
|
|
20104
|
+
AggregationFieldModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: AggregationFieldModule, imports: [[i4.CommonModule, i2.FormsModule, i2.ReactiveFormsModule]] });
|
|
20105
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: AggregationFieldModule, decorators: [{
|
|
20106
|
+
type: i0.NgModule,
|
|
20107
|
+
args: [{
|
|
20108
|
+
declarations: [AggregationFieldComponent],
|
|
20109
|
+
exports: [AggregationFieldComponent],
|
|
20110
|
+
imports: [i4.CommonModule, i2.FormsModule, i2.ReactiveFormsModule],
|
|
20111
|
+
}]
|
|
20112
|
+
}] });
|
|
20180
20113
|
|
|
20181
20114
|
var CustomFieldComponent = /** @class */ (function (_super) {
|
|
20182
20115
|
__extends(CustomFieldComponent, _super);
|
|
20183
20116
|
function CustomFieldComponent() {
|
|
20184
20117
|
var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
|
|
20185
20118
|
_this.handlers = {
|
|
20186
|
-
activeUser: _this._prepareField.bind(_this)
|
|
20119
|
+
activeUser: _this._prepareField.bind(_this),
|
|
20120
|
+
aggregationGroup: _this._prepareField.bind(_this)
|
|
20187
20121
|
};
|
|
20188
20122
|
return _this;
|
|
20189
20123
|
}
|
|
@@ -20731,7 +20665,9 @@
|
|
|
20731
20665
|
for (var _c = __values(this.fields), _d = _c.next(); !_d.done; _d = _c.next()) {
|
|
20732
20666
|
var field = _d.value;
|
|
20733
20667
|
var key = field.config.fieldKey;
|
|
20734
|
-
this.formGroup.
|
|
20668
|
+
if (!this.formGroup.contains(key)) {
|
|
20669
|
+
this.formGroup.addControl(key, new i2.FormControl(field.config.values));
|
|
20670
|
+
}
|
|
20735
20671
|
}
|
|
20736
20672
|
}
|
|
20737
20673
|
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
@@ -20745,7 +20681,7 @@
|
|
|
20745
20681
|
FiltersPanelComponent.prototype._handleFormGroupChanges = function () {
|
|
20746
20682
|
var _this = this;
|
|
20747
20683
|
this.formGroup.valueChanges
|
|
20748
|
-
.pipe(operators.debounceTime(300), operators.map(function (data) { return removeEmptyKeys(data); }), operators.distinctUntilChanged(function (a, b) { return ___default["default"].isEqual(a
|
|
20684
|
+
.pipe(operators.debounceTime(300), operators.map(function (data) { return removeEmptyKeys(data); }), operators.distinctUntilChanged(function (a, b) { return ___default["default"].isEqual(a, b); }), operators.takeUntil(this.destroy$))
|
|
20749
20685
|
.subscribe(function (res) {
|
|
20750
20686
|
_this.filterChanged.emit(res);
|
|
20751
20687
|
});
|
|
@@ -20786,6 +20722,183 @@
|
|
|
20786
20722
|
type: i0.Output
|
|
20787
20723
|
}] } });
|
|
20788
20724
|
|
|
20725
|
+
var ActiveUserService = /** @class */ (function (_super) {
|
|
20726
|
+
__extends(ActiveUserService, _super);
|
|
20727
|
+
function ActiveUserService() {
|
|
20728
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
20729
|
+
}
|
|
20730
|
+
ActiveUserService.prototype.getCurrentUser = function () {
|
|
20731
|
+
return this.user;
|
|
20732
|
+
};
|
|
20733
|
+
return ActiveUserService;
|
|
20734
|
+
}(BaseService));
|
|
20735
|
+
ActiveUserService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ActiveUserService, deps: null, target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
20736
|
+
ActiveUserService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ActiveUserService, providedIn: 'root' });
|
|
20737
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ActiveUserService, decorators: [{
|
|
20738
|
+
type: i0.Injectable,
|
|
20739
|
+
args: [{
|
|
20740
|
+
providedIn: 'root'
|
|
20741
|
+
}]
|
|
20742
|
+
}] });
|
|
20743
|
+
|
|
20744
|
+
var ActiveUserSwitchComponent = /** @class */ (function (_super) {
|
|
20745
|
+
__extends(ActiveUserSwitchComponent, _super);
|
|
20746
|
+
function ActiveUserSwitchComponent() {
|
|
20747
|
+
var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
|
|
20748
|
+
_this._userService = _this.injector.get(ActiveUserService);
|
|
20749
|
+
_this.isUserSelected = false;
|
|
20750
|
+
return _this;
|
|
20751
|
+
}
|
|
20752
|
+
ActiveUserSwitchComponent.prototype.writeValue = function (value) {
|
|
20753
|
+
if (value) {
|
|
20754
|
+
var val = isFieldValueObject(value) ? value.value : value;
|
|
20755
|
+
this.isUserSelected = val === this.getValue();
|
|
20756
|
+
}
|
|
20757
|
+
};
|
|
20758
|
+
ActiveUserSwitchComponent.prototype.toggle = function (_b) {
|
|
20759
|
+
var checked = _b.checked;
|
|
20760
|
+
this.isUserSelected = checked;
|
|
20761
|
+
if (!checked) {
|
|
20762
|
+
this.onChange(null);
|
|
20763
|
+
return;
|
|
20764
|
+
}
|
|
20765
|
+
if (this.field.valueType === 'property') {
|
|
20766
|
+
this.onChange(this.getValue());
|
|
20767
|
+
return;
|
|
20768
|
+
}
|
|
20769
|
+
this.updateObjectValue();
|
|
20770
|
+
};
|
|
20771
|
+
ActiveUserSwitchComponent.prototype.getValue = function () {
|
|
20772
|
+
var _a;
|
|
20773
|
+
return ___default["default"].get(this._userService.getCurrentUser(), ((_a = this.renderOptions) === null || _a === void 0 ? void 0 : _a.bindValue) || 'properties.username');
|
|
20774
|
+
};
|
|
20775
|
+
ActiveUserSwitchComponent.prototype.updateObjectValue = function () {
|
|
20776
|
+
var _a;
|
|
20777
|
+
var operator = ((_a = this.field) === null || _a === void 0 ? void 0 : _a.operator) || COMPARISON_OPERATOR.equals;
|
|
20778
|
+
var data = this._prepareValueObject(this.getValue(), operator);
|
|
20779
|
+
this.onChange(data);
|
|
20780
|
+
};
|
|
20781
|
+
return ActiveUserSwitchComponent;
|
|
20782
|
+
}(BaseCustomField));
|
|
20783
|
+
ActiveUserSwitchComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ActiveUserSwitchComponent, deps: null, target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
20784
|
+
ActiveUserSwitchComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: ActiveUserSwitchComponent, selector: "active-user-switch", usesInheritance: true, ngImport: i0__namespace, template: "<mat-slide-toggle\r\n\tclass=\"filter-switch__item\"\r\n\t[checked]=\"isUserSelected\"\r\n\t(change)=\"toggle($event)\"\r\n\t[class.checkedBox]=\"isUserSelected\"\r\n\t[class.unCheckedBox]=\"!isUserSelected\"\r\n>\r\n\t{{ renderOptions?.text || field?.label | translate }}\r\n</mat-slide-toggle>\r\n", styles: [""], components: [{ type: i1__namespace$9.MatSlideToggle, selector: "mat-slide-toggle", inputs: ["disabled", "disableRipple", "color", "tabIndex", "name", "id", "labelPosition", "aria-label", "aria-labelledby", "required", "checked"], outputs: ["change", "toggleChange"], exportAs: ["matSlideToggle"] }], pipes: { "translate": i1__namespace.TranslatePipe } });
|
|
20785
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ActiveUserSwitchComponent, decorators: [{
|
|
20786
|
+
type: i0.Component,
|
|
20787
|
+
args: [{
|
|
20788
|
+
selector: 'active-user-switch',
|
|
20789
|
+
templateUrl: './active-user-switch.component.html',
|
|
20790
|
+
styleUrls: ['./active-user-switch.component.scss']
|
|
20791
|
+
}]
|
|
20792
|
+
}] });
|
|
20793
|
+
|
|
20794
|
+
var MapToAggregationConfigPipe = /** @class */ (function () {
|
|
20795
|
+
function MapToAggregationConfigPipe() {
|
|
20796
|
+
}
|
|
20797
|
+
MapToAggregationConfigPipe.prototype.transform = function (config) {
|
|
20798
|
+
if (!config) {
|
|
20799
|
+
return null;
|
|
20800
|
+
}
|
|
20801
|
+
var aggregationConfig = Object.assign(Object.assign({}, config), { valueType: 'property', sendMode: 'queryParam' });
|
|
20802
|
+
return aggregationConfig;
|
|
20803
|
+
};
|
|
20804
|
+
return MapToAggregationConfigPipe;
|
|
20805
|
+
}());
|
|
20806
|
+
MapToAggregationConfigPipe.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: MapToAggregationConfigPipe, deps: [], target: i0__namespace.ɵɵFactoryTarget.Pipe });
|
|
20807
|
+
MapToAggregationConfigPipe.ɵpipe = i0__namespace.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: MapToAggregationConfigPipe, name: "mapToAggregationConfig" });
|
|
20808
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: MapToAggregationConfigPipe, decorators: [{
|
|
20809
|
+
type: i0.Pipe,
|
|
20810
|
+
args: [{
|
|
20811
|
+
name: 'mapToAggregationConfig'
|
|
20812
|
+
}]
|
|
20813
|
+
}] });
|
|
20814
|
+
|
|
20815
|
+
var AggregationGroupComponent = /** @class */ (function (_super) {
|
|
20816
|
+
__extends(AggregationGroupComponent, _super);
|
|
20817
|
+
function AggregationGroupComponent() {
|
|
20818
|
+
var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
|
|
20819
|
+
_this.formItems = new i2.FormArray([]);
|
|
20820
|
+
_this.formGroup = new i2.FormGroup({
|
|
20821
|
+
items: _this.formItems
|
|
20822
|
+
});
|
|
20823
|
+
_this.internalValue = [];
|
|
20824
|
+
_this.fieldTypes = FIELD_TYPE;
|
|
20825
|
+
return _this;
|
|
20826
|
+
}
|
|
20827
|
+
Object.defineProperty(AggregationGroupComponent.prototype, "options", {
|
|
20828
|
+
get: function () {
|
|
20829
|
+
var _a, _b;
|
|
20830
|
+
return (_b = (_a = this.field) === null || _a === void 0 ? void 0 : _a.render) === null || _b === void 0 ? void 0 : _b.options;
|
|
20831
|
+
},
|
|
20832
|
+
enumerable: false,
|
|
20833
|
+
configurable: true
|
|
20834
|
+
});
|
|
20835
|
+
AggregationGroupComponent.prototype.trackByFieldKey = function (_, field) {
|
|
20836
|
+
return field === null || field === void 0 ? void 0 : field.fieldKey;
|
|
20837
|
+
};
|
|
20838
|
+
AggregationGroupComponent.prototype.writeValue = function (value) {
|
|
20839
|
+
if (value) {
|
|
20840
|
+
var _values = this._getValues(value);
|
|
20841
|
+
if (___default["default"].isEqual(_values, this.internalValue)) {
|
|
20842
|
+
return;
|
|
20843
|
+
}
|
|
20844
|
+
this.internalValue = _values;
|
|
20845
|
+
this.formItems.clear();
|
|
20846
|
+
this._prepareFormFields(this.internalValue);
|
|
20847
|
+
}
|
|
20848
|
+
};
|
|
20849
|
+
AggregationGroupComponent.prototype.ngOnInit = function () {
|
|
20850
|
+
this._prepareFormFields(this.internalValue);
|
|
20851
|
+
this._listenToChanges();
|
|
20852
|
+
};
|
|
20853
|
+
AggregationGroupComponent.prototype._listenToChanges = function () {
|
|
20854
|
+
var _this = this;
|
|
20855
|
+
this.formGroup.valueChanges
|
|
20856
|
+
.pipe(operators.distinctUntilChanged(function (a, b) { return ___default["default"].isEqual(a, b); }), operators.map(function (_c) {
|
|
20857
|
+
var items = _c.items;
|
|
20858
|
+
return items.reduce(function (acc, curr) { return acc.concat(curr); }, []).filter(Boolean);
|
|
20859
|
+
}), operators.filter(function (value) { return !___default["default"].isEqual(_this.internalValue, value); }), operators.takeUntil(this.destroy$))
|
|
20860
|
+
.subscribe(function (value) {
|
|
20861
|
+
_this.emitValue(value);
|
|
20862
|
+
});
|
|
20863
|
+
};
|
|
20864
|
+
AggregationGroupComponent.prototype._prepareFormFields = function (values) {
|
|
20865
|
+
var _this = this;
|
|
20866
|
+
if (values === void 0) { values = []; }
|
|
20867
|
+
var _a;
|
|
20868
|
+
var items = ((_a = this.options) === null || _a === void 0 ? void 0 : _a.aggregations) || [];
|
|
20869
|
+
if (!!items.length) {
|
|
20870
|
+
this.formItems.clear();
|
|
20871
|
+
items.forEach(function (item) {
|
|
20872
|
+
_this.formItems.push(new i2.FormControl(values));
|
|
20873
|
+
});
|
|
20874
|
+
}
|
|
20875
|
+
};
|
|
20876
|
+
AggregationGroupComponent.prototype.emitValue = function (value) {
|
|
20877
|
+
var _a;
|
|
20878
|
+
this.internalValue = value;
|
|
20879
|
+
if ((value === null || value === void 0 ? void 0 : value.length) !== 0 && this._isValueObject()) {
|
|
20880
|
+
this.onChange(this._prepareValueObject(value, ((_a = this.field) === null || _a === void 0 ? void 0 : _a.operator) || COMPARISON_OPERATOR.in));
|
|
20881
|
+
return;
|
|
20882
|
+
}
|
|
20883
|
+
this.onChange(value);
|
|
20884
|
+
};
|
|
20885
|
+
AggregationGroupComponent.prototype._getValues = function (values) {
|
|
20886
|
+
var _a;
|
|
20887
|
+
return Array.isArray(values) ? values : ((_a = values) === null || _a === void 0 ? void 0 : _a.value) || [];
|
|
20888
|
+
};
|
|
20889
|
+
return AggregationGroupComponent;
|
|
20890
|
+
}(BaseCustomField));
|
|
20891
|
+
AggregationGroupComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: AggregationGroupComponent, deps: null, target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
20892
|
+
AggregationGroupComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: AggregationGroupComponent, selector: "app-aggregation-group", usesInheritance: true, ngImport: i0__namespace, template: "<div [formGroup]=\"formGroup\" *ngIf=\"options?.aggregations && aggregations\">\r\n\t<div formArrayName=\"items\">\r\n\t\t<ng-container *ngFor=\"let fieldConfig of options?.aggregations; trackBy: trackByFieldKey; let i = index\">\r\n\t\t\t<ng-container *permission=\"{ name: fieldConfig?.permission }\">\r\n\t\t\t\t<app-aggregation-field\r\n\t\t\t\t\t*ngIf=\"fieldConfig?.condition | checkCondition: aggregations : currentLang\"\r\n\t\t\t\t\t[aggregation]=\"aggregations[fieldConfig.aggregation]\"\r\n\t\t\t\t\t[fieldConfig]=\"fieldConfig | mapToAggregationConfig\"\r\n\t\t\t\t\t[formControlName]=\"i\"\r\n\t\t\t\t></app-aggregation-field>\r\n\t\t\t</ng-container>\r\n\t\t</ng-container>\r\n\t</div>\r\n</div>\r\n", styles: [""], components: [{ type: AggregationFieldComponent, selector: "app-aggregation-field", inputs: ["aggregation", "contentTemplate"] }], directives: [{ type: i4__namespace$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2__namespace$4.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i2__namespace$4.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i2__namespace$4.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }, { type: i4__namespace$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: PermissionsDirective, selector: "[permission]", inputs: ["permission"] }, { type: i2__namespace$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2__namespace$4.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }], pipes: { "mapToAggregationConfig": MapToAggregationConfigPipe, "checkCondition": CheckConditionPipe } });
|
|
20893
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: AggregationGroupComponent, decorators: [{
|
|
20894
|
+
type: i0.Component,
|
|
20895
|
+
args: [{
|
|
20896
|
+
selector: 'app-aggregation-group',
|
|
20897
|
+
templateUrl: './aggregation-group.component.html',
|
|
20898
|
+
styleUrls: ['./aggregation-group.component.scss']
|
|
20899
|
+
}]
|
|
20900
|
+
}] });
|
|
20901
|
+
|
|
20789
20902
|
var NdfDatepickerModule = /** @class */ (function () {
|
|
20790
20903
|
function NdfDatepickerModule() {
|
|
20791
20904
|
}
|
|
@@ -20841,7 +20954,11 @@
|
|
|
20841
20954
|
}]
|
|
20842
20955
|
}] });
|
|
20843
20956
|
|
|
20844
|
-
var CONTAINERS$1 = [
|
|
20957
|
+
var CONTAINERS$1 = [
|
|
20958
|
+
FiltersPanelComponent,
|
|
20959
|
+
PredicateFieldComponent,
|
|
20960
|
+
CustomFieldComponent,
|
|
20961
|
+
];
|
|
20845
20962
|
var COMPONENTS$4 = [
|
|
20846
20963
|
AggregationAutocompleteComponent,
|
|
20847
20964
|
AggregationSelectComponent,
|
|
@@ -20851,9 +20968,13 @@
|
|
|
20851
20968
|
AggregationCustomComponent,
|
|
20852
20969
|
AggregationDateListComponent,
|
|
20853
20970
|
PredicateTextInputComponent,
|
|
20854
|
-
PredicateDateInputComponent
|
|
20971
|
+
PredicateDateInputComponent,
|
|
20972
|
+
];
|
|
20973
|
+
var CUSTOM_ELEMENTS = [
|
|
20974
|
+
ActiveUserSwitchComponent,
|
|
20975
|
+
AggregationGroupComponent,
|
|
20976
|
+
MapToAggregationConfigPipe,
|
|
20855
20977
|
];
|
|
20856
|
-
var CUSTOM_ELEMENTS = [ActiveUserSwitchComponent];
|
|
20857
20978
|
var PARTS = [
|
|
20858
20979
|
FilterOptionTextComponent,
|
|
20859
20980
|
FilterSearchInputComponent,
|
|
@@ -20862,7 +20983,7 @@
|
|
|
20862
20983
|
FilterEmptyMessageComponent,
|
|
20863
20984
|
FilterDateRangeComponent,
|
|
20864
20985
|
FilterAutocompleteInputComponent,
|
|
20865
|
-
FilterOptionsSortComponent
|
|
20986
|
+
FilterOptionsSortComponent,
|
|
20866
20987
|
];
|
|
20867
20988
|
var EXPORTED_PARTS = [HtmlDialogComponent];
|
|
20868
20989
|
var DIRECTIVES$3 = [
|
|
@@ -20874,7 +20995,7 @@
|
|
|
20874
20995
|
CustomTemplateDirective,
|
|
20875
20996
|
DropdownLabelTemplateDirective,
|
|
20876
20997
|
DropdownMultiLabelTemplateDirective,
|
|
20877
|
-
DateListTemplateDirective
|
|
20998
|
+
DateListTemplateDirective,
|
|
20878
20999
|
];
|
|
20879
21000
|
var PIPES = [
|
|
20880
21001
|
AutocompleteFilterPipe,
|
|
@@ -20886,15 +21007,50 @@
|
|
|
20886
21007
|
SortListPipe,
|
|
20887
21008
|
TooltipPipe,
|
|
20888
21009
|
FiltersByRolesPipe,
|
|
20889
|
-
CheckConditionPipe
|
|
21010
|
+
CheckConditionPipe,
|
|
20890
21011
|
];
|
|
20891
21012
|
var NdfFiltersPanelModule = /** @class */ (function () {
|
|
20892
|
-
|
|
21013
|
+
/**
|
|
21014
|
+
*
|
|
21015
|
+
*/
|
|
21016
|
+
function NdfFiltersPanelModule(loaderService) {
|
|
21017
|
+
this.loaderService = loaderService;
|
|
21018
|
+
this._registerCustomComponent();
|
|
21019
|
+
this._registerAggregationsComponents();
|
|
21020
|
+
this._registerPredicateComponents();
|
|
20893
21021
|
}
|
|
21022
|
+
//------
|
|
21023
|
+
// CUSTOM
|
|
21024
|
+
//------
|
|
21025
|
+
NdfFiltersPanelModule.prototype._registerCustomComponent = function () {
|
|
21026
|
+
this.loaderService.registerComponent(CUSTOM_FIELD_TYPES.activeUser, ActiveUserSwitchComponent);
|
|
21027
|
+
this.loaderService.registerComponent(CUSTOM_FIELD_TYPES.aggregationGroup, AggregationGroupComponent);
|
|
21028
|
+
};
|
|
21029
|
+
//------
|
|
21030
|
+
// AGGREGATION
|
|
21031
|
+
//------
|
|
21032
|
+
NdfFiltersPanelModule.prototype._registerAggregationsComponents = function () {
|
|
21033
|
+
this.loaderService.registerComponent(AGGREGATION_FIELD_TYPES.autocomplete, AggregationAutocompleteComponent);
|
|
21034
|
+
this.loaderService.registerComponent(AGGREGATION_FIELD_TYPES.dropdown, AggregationSelectComponent);
|
|
21035
|
+
this.loaderService.registerComponent(AGGREGATION_FIELD_TYPES.switch, AggregationSwitchComponent);
|
|
21036
|
+
this.loaderService.registerComponent(AGGREGATION_FIELD_TYPES.radio, AggregationRadioComponent);
|
|
21037
|
+
this.loaderService.registerComponent(AGGREGATION_FIELD_TYPES.dateList, AggregationDateListComponent);
|
|
21038
|
+
this.loaderService.registerComponent(AGGREGATION_FIELD_TYPES.custom, AggregationCustomComponent);
|
|
21039
|
+
this.loaderService.registerComponent(AGGREGATION_FIELD_TYPES.checkbox, AggregationCheckboxComponent);
|
|
21040
|
+
};
|
|
21041
|
+
//------
|
|
21042
|
+
// PREDICATE
|
|
21043
|
+
//------
|
|
21044
|
+
NdfFiltersPanelModule.prototype._registerPredicateComponents = function () {
|
|
21045
|
+
this.loaderService.registerComponent(PREDICATE_FIELD_TYPES.input, PredicateTextInputComponent);
|
|
21046
|
+
this.loaderService.registerComponent(PREDICATE_FIELD_TYPES.date, PredicateDateInputComponent);
|
|
21047
|
+
};
|
|
20894
21048
|
return NdfFiltersPanelModule;
|
|
20895
21049
|
}());
|
|
20896
|
-
NdfFiltersPanelModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NdfFiltersPanelModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
20897
|
-
NdfFiltersPanelModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NdfFiltersPanelModule, declarations: [FiltersPanelComponent,
|
|
21050
|
+
NdfFiltersPanelModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NdfFiltersPanelModule, deps: [{ token: DynamicComponentLoaderService }], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
21051
|
+
NdfFiltersPanelModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NdfFiltersPanelModule, declarations: [FiltersPanelComponent,
|
|
21052
|
+
PredicateFieldComponent,
|
|
21053
|
+
CustomFieldComponent, AggregationAutocompleteComponent,
|
|
20898
21054
|
AggregationSelectComponent,
|
|
20899
21055
|
AggregationCheckboxComponent,
|
|
20900
21056
|
AggregationSwitchComponent,
|
|
@@ -20902,7 +21058,9 @@
|
|
|
20902
21058
|
AggregationCustomComponent,
|
|
20903
21059
|
AggregationDateListComponent,
|
|
20904
21060
|
PredicateTextInputComponent,
|
|
20905
|
-
PredicateDateInputComponent, ActiveUserSwitchComponent,
|
|
21061
|
+
PredicateDateInputComponent, ActiveUserSwitchComponent,
|
|
21062
|
+
AggregationGroupComponent,
|
|
21063
|
+
MapToAggregationConfigPipe, CheckboxTemplateDirective,
|
|
20906
21064
|
RadioTemplateDirective,
|
|
20907
21065
|
SwitchTemplateDirective,
|
|
20908
21066
|
DropdownTemplateDirective,
|
|
@@ -20945,7 +21103,10 @@
|
|
|
20945
21103
|
DynamicFormModule,
|
|
20946
21104
|
NuxeoDialogModule,
|
|
20947
21105
|
DirectiveModule,
|
|
20948
|
-
NdfDatepickerModule,
|
|
21106
|
+
NdfDatepickerModule,
|
|
21107
|
+
AggregationFieldModule, i5__namespace$4.NgxMaskModule], exports: [FiltersPanelComponent,
|
|
21108
|
+
PredicateFieldComponent,
|
|
21109
|
+
CustomFieldComponent, AggregationAutocompleteComponent,
|
|
20949
21110
|
AggregationSelectComponent,
|
|
20950
21111
|
AggregationCheckboxComponent,
|
|
20951
21112
|
AggregationSwitchComponent,
|
|
@@ -20953,7 +21114,9 @@
|
|
|
20953
21114
|
AggregationCustomComponent,
|
|
20954
21115
|
AggregationDateListComponent,
|
|
20955
21116
|
PredicateTextInputComponent,
|
|
20956
|
-
PredicateDateInputComponent, ActiveUserSwitchComponent,
|
|
21117
|
+
PredicateDateInputComponent, ActiveUserSwitchComponent,
|
|
21118
|
+
AggregationGroupComponent,
|
|
21119
|
+
MapToAggregationConfigPipe, CheckboxTemplateDirective,
|
|
20957
21120
|
RadioTemplateDirective,
|
|
20958
21121
|
SwitchTemplateDirective,
|
|
20959
21122
|
DropdownTemplateDirective,
|
|
@@ -20983,15 +21146,30 @@
|
|
|
20983
21146
|
NuxeoDialogModule,
|
|
20984
21147
|
DirectiveModule,
|
|
20985
21148
|
NdfDatepickerModule,
|
|
21149
|
+
AggregationFieldModule,
|
|
20986
21150
|
i5$4.NgxMaskModule.forRoot({
|
|
20987
|
-
validation: true
|
|
20988
|
-
})
|
|
21151
|
+
validation: true,
|
|
21152
|
+
}),
|
|
20989
21153
|
]] });
|
|
20990
21154
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NdfFiltersPanelModule, decorators: [{
|
|
20991
21155
|
type: i0.NgModule,
|
|
20992
21156
|
args: [{
|
|
20993
|
-
declarations: [
|
|
20994
|
-
|
|
21157
|
+
declarations: [
|
|
21158
|
+
CONTAINERS$1,
|
|
21159
|
+
COMPONENTS$4,
|
|
21160
|
+
CUSTOM_ELEMENTS,
|
|
21161
|
+
DIRECTIVES$3,
|
|
21162
|
+
PIPES,
|
|
21163
|
+
PARTS,
|
|
21164
|
+
EXPORTED_PARTS,
|
|
21165
|
+
],
|
|
21166
|
+
exports: [
|
|
21167
|
+
CONTAINERS$1,
|
|
21168
|
+
COMPONENTS$4,
|
|
21169
|
+
CUSTOM_ELEMENTS,
|
|
21170
|
+
DIRECTIVES$3,
|
|
21171
|
+
EXPORTED_PARTS,
|
|
21172
|
+
],
|
|
20995
21173
|
imports: [
|
|
20996
21174
|
i4.CommonModule,
|
|
20997
21175
|
i2.FormsModule,
|
|
@@ -21013,13 +21191,14 @@
|
|
|
21013
21191
|
NuxeoDialogModule,
|
|
21014
21192
|
DirectiveModule,
|
|
21015
21193
|
NdfDatepickerModule,
|
|
21194
|
+
AggregationFieldModule,
|
|
21016
21195
|
i5$4.NgxMaskModule.forRoot({
|
|
21017
|
-
validation: true
|
|
21018
|
-
})
|
|
21196
|
+
validation: true,
|
|
21197
|
+
}),
|
|
21019
21198
|
],
|
|
21020
|
-
providers: [DynamicComponentLoaderService, AggregationFieldService]
|
|
21199
|
+
providers: [DynamicComponentLoaderService, AggregationFieldService],
|
|
21021
21200
|
}]
|
|
21022
|
-
}] });
|
|
21201
|
+
}], ctorParameters: function () { return [{ type: DynamicComponentLoaderService }]; } });
|
|
21023
21202
|
|
|
21024
21203
|
var TextSearchComponent = /** @class */ (function (_super) {
|
|
21025
21204
|
__extends(TextSearchComponent, _super);
|
|
@@ -21440,7 +21619,7 @@
|
|
|
21440
21619
|
return SkeletonComponent;
|
|
21441
21620
|
}());
|
|
21442
21621
|
SkeletonComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: SkeletonComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
21443
|
-
SkeletonComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: SkeletonComponent, selector: "app-skeleton", inputs: { styleClass: "styleClass", style: "style", shape: "shape", animation: "animation", radius: "radius", size: "size", width: "width", height: "height", randomWidth: "randomWidth" }, ngImport: i0__namespace, template: "<div [ngClass]=\"containerClass()\" [class]=\"styleClass\" [ngStyle]=\"containerStyle()\"></div>", isInline: true, styles: [".skeleton-circle{--skeleton-radius: 50%}.skeleton-none{--skeleton-animation: none}.skeleton-opacity{--skeleton-animation: skeleton-opacity 1.2s infinite;--skeleton-bg: linear-gradient( 0deg, rgba(150, 153, 158, 0) 40%, rgba(150, 153, 158, .6) 100% );--skeleton-transform: none}.skeleton{position:relative;overflow:hidden;background-color:var(--skeleton-bg
|
|
21622
|
+
SkeletonComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: SkeletonComponent, selector: "app-skeleton", inputs: { styleClass: "styleClass", style: "style", shape: "shape", animation: "animation", radius: "radius", size: "size", width: "width", height: "height", randomWidth: "randomWidth" }, ngImport: i0__namespace, template: "<div [ngClass]=\"containerClass()\" [class]=\"styleClass\" [ngStyle]=\"containerStyle()\"></div>", isInline: true, styles: [".skeleton-circle{--skeleton-radius: 50%}.skeleton-none{--skeleton-animation: none}.skeleton-opacity{--skeleton-animation: skeleton-opacity 1.2s infinite;--skeleton-opacity-bg: linear-gradient( 0deg, rgba(150, 153, 158, 0) 40%, rgba(150, 153, 158, .6) 100% );--skeleton-transform: none}.skeleton{position:relative;overflow:hidden;background-color:var(--skeleton-bg);border-radius:var(--skeleton-radius, 3px)}.skeleton:after{content:\"\";animation:var(--skeleton-animation, skeleton-animation 1.2s infinite);height:100%;left:0;position:absolute;right:0;top:0;transform:var(--skeleton-transform, translateX(-100%));z-index:1;background:var(--skeleton-animation-bg, linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, .5), rgba(255, 255, 255, 0)))}@keyframes skeleton-animation{0%{transform:translate(-100%)}to{transform:translate(100%)}}@keyframes skeleton-opacity{0%{opacity:.12}to{opacity:.02}}\n"], directives: [{ type: i4__namespace$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i4__namespace$1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush, encapsulation: i0__namespace.ViewEncapsulation.None });
|
|
21444
21623
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: SkeletonComponent, decorators: [{
|
|
21445
21624
|
type: i0.Component,
|
|
21446
21625
|
args: [{
|
|
@@ -43918,6 +44097,16 @@
|
|
|
43918
44097
|
enumerable: false,
|
|
43919
44098
|
configurable: true
|
|
43920
44099
|
});
|
|
44100
|
+
Object.defineProperty(BaseChart.prototype, "criteria", {
|
|
44101
|
+
get: function () {
|
|
44102
|
+
return this._criteria;
|
|
44103
|
+
},
|
|
44104
|
+
set: function (value) {
|
|
44105
|
+
this._criteria = ___default["default"].cloneDeep(value);
|
|
44106
|
+
},
|
|
44107
|
+
enumerable: false,
|
|
44108
|
+
configurable: true
|
|
44109
|
+
});
|
|
43921
44110
|
BaseChart.prototype._subscribeToLanguage = function () {
|
|
43922
44111
|
var _this = this;
|
|
43923
44112
|
this._translateService.onLangChange
|
|
@@ -43929,35 +44118,114 @@
|
|
|
43929
44118
|
return BaseChart;
|
|
43930
44119
|
}(DestroySubject));
|
|
43931
44120
|
BaseChart.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: BaseChart, deps: [{ token: i0__namespace.Injector }], target: i0__namespace.ɵɵFactoryTarget.Directive });
|
|
43932
|
-
BaseChart.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: BaseChart, inputs: { data: "data", config: "config" }, outputs: { onReady: "onReady" }, usesInheritance: true, ngImport: i0__namespace });
|
|
44121
|
+
BaseChart.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: BaseChart, inputs: { data: "data", config: "config", criteria: "criteria" }, outputs: { onReady: "onReady" }, usesInheritance: true, ngImport: i0__namespace });
|
|
43933
44122
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: BaseChart, decorators: [{
|
|
43934
44123
|
type: i0.Directive
|
|
43935
44124
|
}], ctorParameters: function () { return [{ type: i0__namespace.Injector }]; }, propDecorators: { data: [{
|
|
43936
44125
|
type: i0.Input
|
|
43937
44126
|
}], config: [{
|
|
43938
44127
|
type: i0.Input
|
|
44128
|
+
}], criteria: [{
|
|
44129
|
+
type: i0.Input
|
|
43939
44130
|
}], onReady: [{
|
|
43940
44131
|
type: i0.Output
|
|
43941
44132
|
}] } });
|
|
43942
44133
|
|
|
44134
|
+
var ReportsDataTransformers = /** @class */ (function () {
|
|
44135
|
+
function ReportsDataTransformers() {
|
|
44136
|
+
this._transformations = new Map();
|
|
44137
|
+
}
|
|
44138
|
+
ReportsDataTransformers.prototype.register = function (arg1, arg2) {
|
|
44139
|
+
var _this = this;
|
|
44140
|
+
if (typeof arg1 === 'object') {
|
|
44141
|
+
Object.entries(arg1).forEach(function (_a) {
|
|
44142
|
+
var _b = __read(_a, 2), key = _b[0], fn = _b[1];
|
|
44143
|
+
return _this._transformations.set(key, fn);
|
|
44144
|
+
});
|
|
44145
|
+
return;
|
|
44146
|
+
}
|
|
44147
|
+
if (typeof arg1 === 'string' && arg2) {
|
|
44148
|
+
this._transformations.set(arg1, arg2);
|
|
44149
|
+
}
|
|
44150
|
+
};
|
|
44151
|
+
/**
|
|
44152
|
+
* Retrieves a transformer function by its key.
|
|
44153
|
+
*
|
|
44154
|
+
* @param {string} key - The key of the transformer function.
|
|
44155
|
+
* @returns {ReportDataTransformer | undefined} - The transformer function or undefined if not found.
|
|
44156
|
+
*/
|
|
44157
|
+
ReportsDataTransformers.prototype.get = function (key) {
|
|
44158
|
+
return this._transformations.get(key);
|
|
44159
|
+
};
|
|
44160
|
+
/**
|
|
44161
|
+
* Retrieves all registered transformer functions.
|
|
44162
|
+
*
|
|
44163
|
+
* @returns {Map<string, ReportDataTransformer>} - A map of all transformer functions.
|
|
44164
|
+
*/
|
|
44165
|
+
ReportsDataTransformers.prototype.getAll = function () {
|
|
44166
|
+
return this._transformations;
|
|
44167
|
+
};
|
|
44168
|
+
/**
|
|
44169
|
+
* Clears all registered transformer functions.
|
|
44170
|
+
*/
|
|
44171
|
+
ReportsDataTransformers.prototype.clear = function () {
|
|
44172
|
+
this._transformations.clear();
|
|
44173
|
+
};
|
|
44174
|
+
/**
|
|
44175
|
+
* Checks if a transformer function is registered for a specific key.
|
|
44176
|
+
*
|
|
44177
|
+
* @param {string} key - The key to check.
|
|
44178
|
+
* @returns {boolean} - True if the key exists, false otherwise.
|
|
44179
|
+
*/
|
|
44180
|
+
ReportsDataTransformers.prototype.has = function (key) {
|
|
44181
|
+
return this._transformations.has(key);
|
|
44182
|
+
};
|
|
44183
|
+
/**
|
|
44184
|
+
* Removes a transformer function by its key.
|
|
44185
|
+
*
|
|
44186
|
+
* @param {string} key - The key of the transformer function to remove.
|
|
44187
|
+
*/
|
|
44188
|
+
ReportsDataTransformers.prototype.remove = function (key) {
|
|
44189
|
+
this._transformations.delete(key);
|
|
44190
|
+
};
|
|
44191
|
+
ReportsDataTransformers.prototype.transform = function (key, data) {
|
|
44192
|
+
var fn = this.get(key);
|
|
44193
|
+
if (!fn) {
|
|
44194
|
+
throw new Error("No transformer registered for key: " + key);
|
|
44195
|
+
}
|
|
44196
|
+
return fn(data);
|
|
44197
|
+
};
|
|
44198
|
+
return ReportsDataTransformers;
|
|
44199
|
+
}());
|
|
44200
|
+
ReportsDataTransformers.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ReportsDataTransformers, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
44201
|
+
ReportsDataTransformers.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ReportsDataTransformers, providedIn: 'root' });
|
|
44202
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ReportsDataTransformers, decorators: [{
|
|
44203
|
+
type: i0.Injectable,
|
|
44204
|
+
args: [{ providedIn: 'root' }]
|
|
44205
|
+
}] });
|
|
44206
|
+
|
|
43943
44207
|
var NdfReportsService = /** @class */ (function (_super) {
|
|
43944
44208
|
__extends(NdfReportsService, _super);
|
|
43945
|
-
function NdfReportsService() {
|
|
43946
|
-
|
|
44209
|
+
function NdfReportsService(injector, _reportsDataTransformers) {
|
|
44210
|
+
var _this = _super.call(this, injector) || this;
|
|
44211
|
+
_this._reportsDataTransformers = _reportsDataTransformers;
|
|
44212
|
+
return _this;
|
|
43947
44213
|
}
|
|
43948
44214
|
NdfReportsService.prototype.getData = function (request, criteria) {
|
|
43949
44215
|
if (criteria === void 0) { criteria = {}; }
|
|
43950
44216
|
return (request === null || request === void 0 ? void 0 : request.customUrl) ? this._customQuery(request, criteria) : this._query(request, criteria);
|
|
43951
44217
|
};
|
|
43952
44218
|
NdfReportsService.prototype._query = function (request, criteria) {
|
|
44219
|
+
var _this = this;
|
|
43953
44220
|
var params = this._prepareRequest(request, criteria).params;
|
|
43954
44221
|
return this.query({
|
|
43955
44222
|
pageProvider: request.pageProvider,
|
|
43956
44223
|
headers: request === null || request === void 0 ? void 0 : request.headers,
|
|
43957
44224
|
params: params
|
|
43958
|
-
});
|
|
44225
|
+
}).pipe(operators.switchMap(function (response) { return !!(request === null || request === void 0 ? void 0 : request.transformer) ? _this._reportsDataTransformers.transform(request === null || request === void 0 ? void 0 : request.transformer, response) : rxjs.of(response); }));
|
|
43959
44226
|
};
|
|
43960
44227
|
NdfReportsService.prototype._customQuery = function (request, criteria) {
|
|
44228
|
+
var _this = this;
|
|
43961
44229
|
var _a;
|
|
43962
44230
|
var _b = this._prepareRequest(request, criteria), params = _b.params, payload = _b.payload;
|
|
43963
44231
|
return this.request({
|
|
@@ -43966,7 +44234,7 @@
|
|
|
43966
44234
|
headers: request === null || request === void 0 ? void 0 : request.headers,
|
|
43967
44235
|
queryParams: params,
|
|
43968
44236
|
payload: payload
|
|
43969
|
-
});
|
|
44237
|
+
}).pipe(operators.switchMap(function (response) { return !!(request === null || request === void 0 ? void 0 : request.transformer) ? _this._reportsDataTransformers.transform(request === null || request === void 0 ? void 0 : request.transformer, response) : rxjs.of(response); }));
|
|
43970
44238
|
};
|
|
43971
44239
|
NdfReportsService.prototype._prepareRequest = function (request, criteria) {
|
|
43972
44240
|
var params = Object.assign(Object.assign({ pageSize: 1 }, ((request === null || request === void 0 ? void 0 : request.params) || {})), ((criteria === null || criteria === void 0 ? void 0 : criteria.params) || {}));
|
|
@@ -43982,14 +44250,14 @@
|
|
|
43982
44250
|
};
|
|
43983
44251
|
return NdfReportsService;
|
|
43984
44252
|
}(BaseService));
|
|
43985
|
-
NdfReportsService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NdfReportsService, deps:
|
|
44253
|
+
NdfReportsService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NdfReportsService, deps: [{ token: i0__namespace.Injector }, { token: ReportsDataTransformers }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
43986
44254
|
NdfReportsService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NdfReportsService, providedIn: 'root' });
|
|
43987
44255
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NdfReportsService, decorators: [{
|
|
43988
44256
|
type: i0.Injectable,
|
|
43989
44257
|
args: [{
|
|
43990
44258
|
providedIn: 'root'
|
|
43991
44259
|
}]
|
|
43992
|
-
}] });
|
|
44260
|
+
}], ctorParameters: function () { return [{ type: i0__namespace.Injector }, { type: ReportsDataTransformers }]; } });
|
|
43993
44261
|
|
|
43994
44262
|
var ChartManagerService = /** @class */ (function () {
|
|
43995
44263
|
function ChartManagerService(_translateService, _document) {
|
|
@@ -44228,38 +44496,47 @@
|
|
|
44228
44496
|
var DynamicTimelineReportService = /** @class */ (function () {
|
|
44229
44497
|
function DynamicTimelineReportService(_ndfReportsService) {
|
|
44230
44498
|
this._ndfReportsService = _ndfReportsService;
|
|
44231
|
-
this._rebuildTriggerSub = new rxjs.BehaviorSubject(false);
|
|
44232
|
-
this.rebuild$ = this._rebuildTriggerSub.asObservable();
|
|
44233
44499
|
this._isInitialized = false;
|
|
44234
44500
|
this.isLoadingResult = false;
|
|
44235
|
-
this._selectedGroupSub = new rxjs.
|
|
44501
|
+
this._selectedGroupSub = new rxjs.BehaviorSubject(null);
|
|
44236
44502
|
this.selectedGroup$ = this._selectedGroupSub.asObservable();
|
|
44503
|
+
this._rebuildTriggerSub = new rxjs.BehaviorSubject(false);
|
|
44504
|
+
this.rebuild$ = this._rebuildTriggerSub.asObservable();
|
|
44237
44505
|
}
|
|
44238
|
-
DynamicTimelineReportService.prototype.updateSelectedGroup = function (selected) {
|
|
44239
|
-
if (!this._selectedGroup) {
|
|
44240
|
-
this._selectedGroup = selected || 'week';
|
|
44241
|
-
}
|
|
44242
|
-
this._selectedGroupSub.next(this._selectedGroup);
|
|
44243
|
-
};
|
|
44244
44506
|
DynamicTimelineReportService.prototype.changeGroup = function (group) {
|
|
44245
|
-
this.
|
|
44246
|
-
this.
|
|
44507
|
+
this._selectedGroupSub.next(group);
|
|
44508
|
+
this.rebuild();
|
|
44247
44509
|
};
|
|
44248
44510
|
DynamicTimelineReportService.prototype.rebuild = function () {
|
|
44249
44511
|
this._rebuildTriggerSub.next(true);
|
|
44250
44512
|
};
|
|
44251
44513
|
DynamicTimelineReportService.prototype.prepareData = function () {
|
|
44252
44514
|
var _this = this;
|
|
44253
|
-
return rxjs.pipe(operators.
|
|
44254
|
-
var
|
|
44515
|
+
return rxjs.pipe(operators.tap(function (_d) {
|
|
44516
|
+
var _e = __read(_d, 2), config = _e[0], criteria = _e[1];
|
|
44255
44517
|
var _a;
|
|
44518
|
+
if (!_this._selectedGroupSub.getValue()) {
|
|
44519
|
+
_this._selectedGroupSub.next(((_a = config === null || config === void 0 ? void 0 : config.group) === null || _a === void 0 ? void 0 : _a.selected) || 'week');
|
|
44520
|
+
}
|
|
44521
|
+
_this.payload = ___default["default"].merge(_this.prepareSelectedGroups(config), criteria || {});
|
|
44522
|
+
}), operators.switchMap(function (_d) {
|
|
44523
|
+
var _e = __read(_d, 2), config = _e[0], criteria = _e[1];
|
|
44524
|
+
var _a, _b, _c;
|
|
44256
44525
|
var request = config === null || config === void 0 ? void 0 : config.request;
|
|
44257
44526
|
if (!request) {
|
|
44258
44527
|
return rxjs.of(null);
|
|
44259
44528
|
}
|
|
44260
|
-
|
|
44261
|
-
|
|
44262
|
-
|
|
44529
|
+
var _payload = _this.payload;
|
|
44530
|
+
if (((_a = request === null || request === void 0 ? void 0 : request.actions) === null || _a === void 0 ? void 0 : _a.beforeSubmit) && typeof ((_b = request === null || request === void 0 ? void 0 : request.actions) === null || _b === void 0 ? void 0 : _b.beforeSubmit) === 'string') {
|
|
44531
|
+
try {
|
|
44532
|
+
_payload = Evaluator.evaluate((_c = request === null || request === void 0 ? void 0 : request.actions) === null || _c === void 0 ? void 0 : _c.beforeSubmit, { config: config, criteria: _this.payload }, 'payload');
|
|
44533
|
+
}
|
|
44534
|
+
catch (e) {
|
|
44535
|
+
console.error(e);
|
|
44536
|
+
_payload = _this.payload;
|
|
44537
|
+
}
|
|
44538
|
+
}
|
|
44539
|
+
var data$ = _this._ndfReportsService.getData(request, _payload).pipe(operators.catchError(function (error) {
|
|
44263
44540
|
console.error(error);
|
|
44264
44541
|
return rxjs.of(null);
|
|
44265
44542
|
}), operators.finalize(function () {
|
|
@@ -44271,15 +44548,12 @@
|
|
|
44271
44548
|
});
|
|
44272
44549
|
}));
|
|
44273
44550
|
};
|
|
44274
|
-
DynamicTimelineReportService.prototype.
|
|
44551
|
+
DynamicTimelineReportService.prototype.prepareSelectedGroups = function (config) {
|
|
44275
44552
|
var _this = this;
|
|
44276
|
-
var data = config.datasource.map(function (source) {
|
|
44277
|
-
|
|
44278
|
-
|
|
44279
|
-
|
|
44280
|
-
interval: _this._selectedGroup || ((_a = config === null || config === void 0 ? void 0 : config.group) === null || _a === void 0 ? void 0 : _a.selected) || 'week'
|
|
44281
|
-
});
|
|
44282
|
-
});
|
|
44553
|
+
var data = config.datasource.map(function (source) { return ({
|
|
44554
|
+
name: source.aggregation,
|
|
44555
|
+
interval: _this._selectedGroupSub.getValue()
|
|
44556
|
+
}); });
|
|
44283
44557
|
return {
|
|
44284
44558
|
payload: {
|
|
44285
44559
|
aggregationNames: data
|
|
@@ -44289,10 +44563,9 @@
|
|
|
44289
44563
|
return DynamicTimelineReportService;
|
|
44290
44564
|
}());
|
|
44291
44565
|
DynamicTimelineReportService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: DynamicTimelineReportService, deps: [{ token: NdfReportsService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
44292
|
-
DynamicTimelineReportService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: DynamicTimelineReportService
|
|
44566
|
+
DynamicTimelineReportService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: DynamicTimelineReportService });
|
|
44293
44567
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: DynamicTimelineReportService, decorators: [{
|
|
44294
|
-
type: i0.Injectable
|
|
44295
|
-
args: [{ providedIn: 'root' }]
|
|
44568
|
+
type: i0.Injectable
|
|
44296
44569
|
}], ctorParameters: function () { return [{ type: NdfReportsService }]; } });
|
|
44297
44570
|
|
|
44298
44571
|
var ReportsStateService = /** @class */ (function () {
|
|
@@ -44431,7 +44704,7 @@
|
|
|
44431
44704
|
function DigitChartService(_dataTransformers) {
|
|
44432
44705
|
this._dataTransformers = _dataTransformers;
|
|
44433
44706
|
}
|
|
44434
|
-
DigitChartService.prototype.prepareChart = function (response, config) {
|
|
44707
|
+
DigitChartService.prototype.prepareChart = function (response, config, filterCriteria) {
|
|
44435
44708
|
var _this = this;
|
|
44436
44709
|
if (!config.datasource) {
|
|
44437
44710
|
console.warn('No datasource provided for chart configuration');
|
|
@@ -44441,7 +44714,7 @@
|
|
|
44441
44714
|
var rawData = ___default["default"].get(response, sourceConfig.propertyPath);
|
|
44442
44715
|
if (_this._dataTransformers.hasDigitsTransformer(sourceConfig === null || sourceConfig === void 0 ? void 0 : sourceConfig.transformer)) {
|
|
44443
44716
|
var adapter = _this._dataTransformers.getDigitsTransformer(sourceConfig === null || sourceConfig === void 0 ? void 0 : sourceConfig.transformer);
|
|
44444
|
-
return adapter(rawData, response);
|
|
44717
|
+
return adapter(rawData, response, filterCriteria);
|
|
44445
44718
|
}
|
|
44446
44719
|
if (___default["default"].isObject(rawData)) {
|
|
44447
44720
|
return ___default["default"].get(rawData, sourceConfig === null || sourceConfig === void 0 ? void 0 : sourceConfig.bindValue, rawData);
|
|
@@ -44471,7 +44744,7 @@
|
|
|
44471
44744
|
this._dataTransformers = _dataTransformers;
|
|
44472
44745
|
this._translatePrefix = '';
|
|
44473
44746
|
}
|
|
44474
|
-
BaseChartBuilderService.prototype.prepareChart = function (response, config) {
|
|
44747
|
+
BaseChartBuilderService.prototype.prepareChart = function (response, config, filterCriteria) {
|
|
44475
44748
|
var _this = this;
|
|
44476
44749
|
var _a;
|
|
44477
44750
|
this._translatePrefix = (_a = config === null || config === void 0 ? void 0 : config.prefix) !== null && _a !== void 0 ? _a : '';
|
|
@@ -44483,7 +44756,7 @@
|
|
|
44483
44756
|
});
|
|
44484
44757
|
}
|
|
44485
44758
|
return rxjs.of(config.datasource).pipe(operators.switchMap(function (sources) {
|
|
44486
|
-
var observables$ = sources.map(function (src) { return _this._prepareDataSource(src, response); });
|
|
44759
|
+
var observables$ = sources.map(function (src) { return _this._prepareDataSource(src, response, filterCriteria); });
|
|
44487
44760
|
return rxjs.forkJoin(observables$).pipe(operators.map(function (results) {
|
|
44488
44761
|
return {
|
|
44489
44762
|
data: _this._prepareChartData(results, config),
|
|
@@ -44498,13 +44771,13 @@
|
|
|
44498
44771
|
}));
|
|
44499
44772
|
}));
|
|
44500
44773
|
};
|
|
44501
|
-
BaseChartBuilderService.prototype._prepareDataSource = function (sourceConfig, response) {
|
|
44774
|
+
BaseChartBuilderService.prototype._prepareDataSource = function (sourceConfig, response, filterCriteria) {
|
|
44502
44775
|
var _this = this;
|
|
44503
44776
|
var buckets = ___default["default"].get(response, sourceConfig.propertyPath) || [];
|
|
44504
44777
|
return rxjs.of(buckets).pipe(operators.map(function (rawData) {
|
|
44505
44778
|
if (_this._dataTransformers.hasGraphTransformer(sourceConfig === null || sourceConfig === void 0 ? void 0 : sourceConfig.transformer)) {
|
|
44506
44779
|
var transformer = _this._dataTransformers.getGraphTransformer(sourceConfig === null || sourceConfig === void 0 ? void 0 : sourceConfig.transformer);
|
|
44507
|
-
var adaptedData = transformer(rawData, response);
|
|
44780
|
+
var adaptedData = transformer(rawData, response, filterCriteria, _this._translateService.currentLang);
|
|
44508
44781
|
if (adaptedData) {
|
|
44509
44782
|
return adaptedData.map(function (row) { return (Object.assign(Object.assign({}, row), { key: _this._getLabel(row, sourceConfig) })); });
|
|
44510
44783
|
}
|
|
@@ -44915,7 +45188,7 @@
|
|
|
44915
45188
|
this._rebuildTriggerSub.asObservable()
|
|
44916
45189
|
]).pipe(operators.switchMap(function (_a) {
|
|
44917
45190
|
var _b = __read(_a, 2), response = _b[0], config = _b[1];
|
|
44918
|
-
return _this._digitService.prepareChart(response, config);
|
|
45191
|
+
return _this._digitService.prepareChart(response, config, _this.criteria);
|
|
44919
45192
|
}), operators.finalize(function () {
|
|
44920
45193
|
_this._isInitialized = true;
|
|
44921
45194
|
}));
|
|
@@ -44981,7 +45254,7 @@
|
|
|
44981
45254
|
this._rebuildTriggerSub.asObservable()
|
|
44982
45255
|
]).pipe(operators.switchMap(function (_a) {
|
|
44983
45256
|
var _b = __read(_a, 2), response = _b[0], config = _b[1];
|
|
44984
|
-
return _this._graphService.prepareChart(response, config);
|
|
45257
|
+
return _this._graphService.prepareChart(response, config, _this.criteria);
|
|
44985
45258
|
}), operators.tap(function (data) {
|
|
44986
45259
|
_this._isInitialized = true;
|
|
44987
45260
|
}));
|
|
@@ -45446,11 +45719,16 @@
|
|
|
45446
45719
|
|
|
45447
45720
|
var TimelineDialogComponent = /** @class */ (function () {
|
|
45448
45721
|
function TimelineDialogComponent(dialogRef, chart, _timelineService) {
|
|
45722
|
+
var _this = this;
|
|
45449
45723
|
this.dialogRef = dialogRef;
|
|
45450
45724
|
this.chart = chart;
|
|
45451
45725
|
this._timelineService = _timelineService;
|
|
45726
|
+
this._rebuildTriggerSub = new rxjs.BehaviorSubject(false);
|
|
45452
45727
|
this.selectedGroup$ = this._timelineService.selectedGroup$;
|
|
45453
45728
|
this.report$ = rxjs.combineLatest([rxjs.of(this.chart.config), rxjs.of(this.chart.criteria), this._timelineService.rebuild$]).pipe(this._timelineService.prepareData());
|
|
45729
|
+
this.filterCriteria$ = this._timelineService.selectedGroup$.pipe(operators.map(function (group) {
|
|
45730
|
+
return ___default["default"].cloneDeep(___default["default"].merge(_this.chart.criteria || {}, _this._timelineService.prepareSelectedGroups(_this.chart.config)));
|
|
45731
|
+
}));
|
|
45454
45732
|
}
|
|
45455
45733
|
TimelineDialogComponent.prototype.changeGroup = function (group) {
|
|
45456
45734
|
this._timelineService.changeGroup(group);
|
|
@@ -45463,13 +45741,14 @@
|
|
|
45463
45741
|
return TimelineDialogComponent;
|
|
45464
45742
|
}());
|
|
45465
45743
|
TimelineDialogComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TimelineDialogComponent, deps: [{ token: i1__namespace$3.MatDialogRef }, { token: i1$4.MAT_DIALOG_DATA }, { token: DynamicTimelineReportService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
45466
|
-
TimelineDialogComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TimelineDialogComponent, selector: "app-timeline-dialog", viewQueries: [{ propertyName: "graphChartComponent", first: true, predicate: ["graphChart"], descendants: true }], ngImport: i0__namespace, template: "<ndf-nuxeo-dialog dialogTitle=\"{{ chart?.title | translate }}\" *ngIf=\"report$ | async as report\">\r\n\t<ng-template #contentTemplate>\r\n\t\t<app-graph-chart\r\n\t\t\t#graphChart\r\n\t\t\
|
|
45744
|
+
TimelineDialogComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TimelineDialogComponent, selector: "app-timeline-dialog", providers: [DynamicTimelineReportService], viewQueries: [{ propertyName: "graphChartComponent", first: true, predicate: ["graphChart"], descendants: true }], ngImport: i0__namespace, template: "<ndf-nuxeo-dialog dialogTitle=\"{{ chart?.title | translate }}\" *ngIf=\"report$ | async as report\">\r\n\t<ng-template #contentTemplate>\r\n\t\t<app-graph-chart\r\n\t\t\t#graphChart\r\n\t\t\tclass=\"ndf-report__content ndf-report__content timeline-chart\"\r\n\t\t\t[config]=\"report.config\"\r\n\t\t\t[criteria]=\"filterCriteria$ | async\"\r\n\t\t\t[data]=\"report.data\"\r\n\t\t></app-graph-chart>\r\n\t</ng-template>\r\n\t<ng-template #footerTemplate>\r\n\t\t<div class=\"flex gap-x-4\">\r\n\t\t\t<div class=\"chart-actions flex items-center rounded-lg gap-2 p-1\">\r\n\t\t\t\t<button\r\n\t\t\t\t\tclass=\"print-button chart-actions__item rounded\"\r\n\t\t\t\t\t(click)=\"printChart()\"\r\n\t\t\t\t\t[matTooltip]=\"'REPORTS.print' | translate\"\r\n\t\t\t\t\t*ngIf=\"chart.config?.print\"\r\n\t\t\t\t>\r\n\t\t\t\t\t<mat-icon>print</mat-icon>\r\n\t\t\t\t</button>\r\n\t\t\t</div>\r\n\r\n\t\t\t<time-group-selector\r\n\t\t\t\t*ngIf=\"report.config?.group?.active ?? true\"\r\n\t\t\t\t[group]=\"selectedGroup$ | async\"\r\n\t\t\t\t(groupChange)=\"changeGroup($event)\"\r\n\t\t\t></time-group-selector>\r\n\t\t</div>\r\n\t</ng-template>\r\n</ndf-nuxeo-dialog>\r\n", styles: [":host{--graph-chart-height: 100%;--app-chart-height: 100%;--dialog-body-max-height: 100%}\n"], components: [{ type: NdfNuxeoDialog, selector: "ndf-nuxeo-dialog", inputs: ["dialogTitle", "subTitle", "panelClass", "loaderMode"] }, { type: GraphChartComponent, selector: "app-graph-chart" }, { type: i2__namespace$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: TimeGroupSelectorComponent, selector: "time-group-selector", inputs: ["direction", "group"], outputs: ["groupChange"] }], directives: [{ type: i4__namespace$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i7__namespace.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltipPosition", "matTooltipDisabled", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }], pipes: { "translate": i1__namespace.TranslatePipe, "async": i4__namespace$1.AsyncPipe } });
|
|
45467
45745
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TimelineDialogComponent, decorators: [{
|
|
45468
45746
|
type: i0.Component,
|
|
45469
45747
|
args: [{
|
|
45470
45748
|
selector: 'app-timeline-dialog',
|
|
45471
45749
|
templateUrl: './timeline-dialog.component.html',
|
|
45472
|
-
styleUrls: ['./timeline-dialog.component.scss']
|
|
45750
|
+
styleUrls: ['./timeline-dialog.component.scss'],
|
|
45751
|
+
providers: [DynamicTimelineReportService]
|
|
45473
45752
|
}]
|
|
45474
45753
|
}], ctorParameters: function () {
|
|
45475
45754
|
return [{ type: i1__namespace$3.MatDialogRef }, { type: undefined, decorators: [{
|
|
@@ -45572,12 +45851,13 @@
|
|
|
45572
45851
|
var _this = _super.call(this, injector) || this;
|
|
45573
45852
|
_this.injector = injector;
|
|
45574
45853
|
_this._timelineService = _this.injector.get(DynamicTimelineReportService);
|
|
45575
|
-
_this.
|
|
45576
|
-
_this.config$,
|
|
45577
|
-
_this.criteria$.pipe(operators.distinctUntilChanged(function (a, b) { return ___default["default"].isEqual(a, b); })),
|
|
45578
|
-
_this._timelineService.rebuild$
|
|
45579
|
-
]).pipe(_this._timelineService.prepareData());
|
|
45854
|
+
_this._criteria$ = _this.criteria$.pipe(operators.distinctUntilChanged(function (a, b) { return ___default["default"].isEqual(a, b); }));
|
|
45580
45855
|
_this.selectedGroup$ = _this._timelineService.selectedGroup$;
|
|
45856
|
+
_this.filterCriteria$ = rxjs.combineLatest([_this._criteria$, _this._timelineService.selectedGroup$]).pipe(operators.map(function (_a) {
|
|
45857
|
+
var _b = __read(_a, 1), criteria = _b[0];
|
|
45858
|
+
return ___default["default"].cloneDeep(___default["default"].merge(criteria || {}, _this._timelineService.prepareSelectedGroups(_this.config)));
|
|
45859
|
+
}));
|
|
45860
|
+
_this.report$ = rxjs.combineLatest([_this.config$, _this._criteria$, _this._timelineService.rebuild$]).pipe(_this._timelineService.prepareData());
|
|
45581
45861
|
_this._subscribeToLanguage();
|
|
45582
45862
|
return _this;
|
|
45583
45863
|
}
|
|
@@ -45610,7 +45890,7 @@
|
|
|
45610
45890
|
return DynamicTimelineReportComponent;
|
|
45611
45891
|
}(BaseGraphReport));
|
|
45612
45892
|
DynamicTimelineReportComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: DynamicTimelineReportComponent, deps: [{ token: i0__namespace.Injector }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
45613
|
-
DynamicTimelineReportComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: DynamicTimelineReportComponent, selector: "app-dynamic-timeline-report", host: { classAttribute: "timeline-report flex flex-col flex-grow" }, providers: [DynamicTimelineReportService], viewQueries: [{ propertyName: "graphChartComponent", first: true, predicate: ["graphChart"], descendants: true }], usesInheritance: true, ngImport: i0__namespace, template: "<chart-panel *ngIf=\"report$ | async as report; else noData\" class=\"ndf-report\">\r\n\t<chart-panel-header class=\"ndf-report__header mb-3\">\r\n\t\t<span>\r\n\t\t\t{{ config.label | translate }}\r\n\t\t</span>\r\n\r\n\t\t<button\r\n\t\t\t*ngIf=\"config?.dialog?.active\"\r\n\t\t\tclass=\"dialog-button\"\r\n\t\t\t(click)=\"openTimelineDialog()\"\r\n\t\t\t[matTooltip]=\"'REPORTS.fullscreen' | translate\"\r\n\t\t>\r\n\t\t\t<mat-icon>fullscreen</mat-icon>\r\n\t\t</button>\r\n\t</chart-panel-header>\r\n\r\n\t<app-graph-chart\r\n\
|
|
45893
|
+
DynamicTimelineReportComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: DynamicTimelineReportComponent, selector: "app-dynamic-timeline-report", host: { classAttribute: "timeline-report flex flex-col flex-grow" }, providers: [DynamicTimelineReportService], viewQueries: [{ propertyName: "graphChartComponent", first: true, predicate: ["graphChart"], descendants: true }], usesInheritance: true, ngImport: i0__namespace, template: "<chart-panel *ngIf=\"report$ | async as report; else noData\" class=\"ndf-report\">\r\n\t<chart-panel-header class=\"ndf-report__header mb-3\">\r\n\t\t<span>\r\n\t\t\t{{ config.label | translate }}\r\n\t\t</span>\r\n\r\n\t\t<button\r\n\t\t\t*ngIf=\"config?.dialog?.active\"\r\n\t\t\tclass=\"dialog-button\"\r\n\t\t\t(click)=\"openTimelineDialog()\"\r\n\t\t\t[matTooltip]=\"'REPORTS.fullscreen' | translate\"\r\n\t\t>\r\n\t\t\t<mat-icon>fullscreen</mat-icon>\r\n\t\t</button>\r\n\t</chart-panel-header>\r\n\r\n\t<app-graph-chart\r\n\t\t#graphChart\r\n\t\tclass=\"ndf-report__content ndf-report__content timeline-chart\"\r\n\t\t[config]=\"report.config\"\r\n\t\t[criteria]=\"filterCriteria$ | async\"\r\n\t\t[data]=\"report.data\"\r\n\t></app-graph-chart>\r\n\r\n\t<chart-panel-footer class=\"ndf-report__footer\">\r\n\t\t<div class=\"chart-actions flex items-center rounded-lg gap-2 flex-wrap p-1\">\r\n\t\t\t<button\r\n\t\t\t\tclass=\"print-button chart-actions__item\"\r\n\t\t\t\t(click)=\"printChart()\"\r\n\t\t\t\t[matTooltip]=\"'REPORTS.print' | translate\"\r\n\t\t\t\t*ngIf=\"config?.print\"\r\n\t\t\t>\r\n\t\t\t\t<mat-icon>print</mat-icon>\r\n\t\t\t</button>\r\n\t\t\t<button\r\n\t\t\t\tclass=\"navigate-button chart-actions__item\"\r\n\t\t\t\t(click)=\"navigate()\"\r\n\t\t\t\t*ngIf=\"config?.navigate?.enabled\"\r\n\t\t\t\t[matTooltip]=\"'REPORTS.enabled' | translate\"\r\n\t\t\t>\r\n\t\t\t\t<mat-icon>send</mat-icon>\r\n\t\t\t</button>\r\n\r\n\t\t\t<button\r\n\t\t\t\tclass=\"navigate-button chart-actions__item\"\r\n\t\t\t\t(click)=\"openDetails()\"\r\n\t\t\t\t*ngIf=\"config?.details?.enabled\"\r\n\t\t\t\t[matTooltip]=\"'REPORTS.details' | translate\"\r\n\t\t\t>\r\n\t\t\t\t<mat-icon>info</mat-icon>\r\n\t\t\t</button>\r\n\t\t</div>\r\n\t\t<time-group-selector\r\n\t\t\t*ngIf=\"config?.group?.active ?? true\"\r\n\t\t\t[group]=\"selectedGroup$ | async\"\r\n\t\t\t(groupChange)=\"changeGroup($event)\"\r\n\t\t></time-group-selector>\r\n\t</chart-panel-footer>\r\n</chart-panel>\r\n\r\n<ng-template #noData>\r\n\t<chart-panel class=\"ndf-report\">\r\n\t\t<chart-panel-header class=\"ndf-report__header mb-3\">\r\n\t\t\t{{ config.label | translate }}\r\n\t\t</chart-panel-header>\r\n\t\t<app-skeleton\r\n\t\t\tanimation=\"opacity\"\r\n\t\t\tclass=\"ndf-report__content ndf-report__content timeline-chart\"\r\n\t\t\theight=\"220px\"\r\n\t\t></app-skeleton>\r\n\t</chart-panel>\r\n</ng-template>\r\n", styles: [".ndf-report{display:flex;flex-direction:column;min-width:0;max-width:100%;flex-grow:1}.ndf-report__content{position:relative;padding-block:.5rem;flex-grow:1;min-width:0;max-width:100%}.chart-actions{border:var(--chart-actions-border, 1px solid var(--border-color))}.chart-actions__item{background:var(--chart-actions-background, transparent);color:var(--chart-actions-color, currentColor);box-shadow:var(--chart-actions-shadow, unset);width:var(--chart-actions-width, 35px);height:var(--chart-actions-height, 35px);border-radius:var(--chart-actions-border-radius, 4px);flex-grow:1;display:grid;place-items:center}.chart-actions__item .mat-icon{color:var(--main-color, currentColor)}.chart-actions__item:hover{--chart-actions-shadow: var(--chart-actions-hover-shadow, 0 0 0 1px var(--main-color))}.chart-actions__item.selected{--chart-actions-background: var(--chart-actions-active-background, var(--main-color));--chart-actions-color: var(--chart-actions-active-color, var(--main-hover))}.chart-actions__item.selected .mat-icon{color:currentColor!important}:host{min-width:0;max-width:100%}.timeline-chart{display:var(--ndf-report-display, flex);flex-direction:var(--ndf-report-direction, column);justify-content:var(--ndf-report-justify-content, center);align-items:var(--ndf-report-align-items, center)}\n"], components: [{ type: ChartPanel, selector: "chart-panel" }, { type: ChartPanelHeaderComponent, selector: "chart-panel-header" }, { type: i2__namespace$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: GraphChartComponent, selector: "app-graph-chart" }, { type: ChartPanelFooterComponent, selector: "chart-panel-footer" }, { type: TimeGroupSelectorComponent, selector: "time-group-selector", inputs: ["direction", "group"], outputs: ["groupChange"] }, { type: SkeletonComponent, selector: "app-skeleton", inputs: ["styleClass", "style", "shape", "animation", "radius", "size", "width", "height", "randomWidth"] }], directives: [{ type: i4__namespace$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i7__namespace.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltipPosition", "matTooltipDisabled", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }], pipes: { "async": i4__namespace$1.AsyncPipe, "translate": i1__namespace.TranslatePipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
45614
45894
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: DynamicTimelineReportComponent, decorators: [{
|
|
45615
45895
|
type: i0.Component,
|
|
45616
45896
|
args: [{
|
|
@@ -45636,8 +45916,8 @@
|
|
|
45636
45916
|
url: "/api/v1" + (_request === null || _request === void 0 ? void 0 : _request.customUrl.url),
|
|
45637
45917
|
method: _request === null || _request === void 0 ? void 0 : _request.customUrl.method
|
|
45638
45918
|
}, ((_b = _detailsConfig === null || _detailsConfig === void 0 ? void 0 : _detailsConfig.request) === null || _b === void 0 ? void 0 : _b.customUrl) || {});
|
|
45639
|
-
var _headers =
|
|
45640
|
-
var _queryParam =
|
|
45919
|
+
var _headers = ((_c = _detailsConfig.request) === null || _c === void 0 ? void 0 : _c.headers) || _request.headers || {};
|
|
45920
|
+
var _queryParam = ((_d = _detailsConfig.request) === null || _d === void 0 ? void 0 : _d.params) || _request.params || {};
|
|
45641
45921
|
var _sortingBy = ___default["default"].merge({
|
|
45642
45922
|
sortBy: 'dc:modified',
|
|
45643
45923
|
sortOrder: 'desc'
|
|
@@ -45780,6 +46060,7 @@
|
|
|
45780
46060
|
_this.jsonEditorEnabled = false;
|
|
45781
46061
|
_this.editorType = NDF_EDITOR_TYPE.REPORTS;
|
|
45782
46062
|
_this.navigateRoute = [];
|
|
46063
|
+
_this._isConfigChanged = false;
|
|
45783
46064
|
_this.onQueryChange = new i0.EventEmitter();
|
|
45784
46065
|
_this.trackByFn = function (_, report) {
|
|
45785
46066
|
return report.id;
|
|
@@ -45800,7 +46081,9 @@
|
|
|
45800
46081
|
get: function () {
|
|
45801
46082
|
return this._configSubject.getValue();
|
|
45802
46083
|
},
|
|
45803
|
-
set: function (
|
|
46084
|
+
set: function (config) {
|
|
46085
|
+
var value = ___default["default"].cloneDeep(config);
|
|
46086
|
+
this._checkConfigChange(value);
|
|
45804
46087
|
this._configSubject.next(value);
|
|
45805
46088
|
if (value === null || value === void 0 ? void 0 : value.activeQuery) {
|
|
45806
46089
|
this._updateActiveQuery(value === null || value === void 0 ? void 0 : value.activeQuery);
|
|
@@ -45935,6 +46218,7 @@
|
|
|
45935
46218
|
return rxjs.forkJoin([rxjs.of(config), data$]);
|
|
45936
46219
|
}), operators.map(function (_d) {
|
|
45937
46220
|
var _e = __read(_d, 2), config = _e[0], response = _e[1];
|
|
46221
|
+
_this._prepareAggregations(response === null || response === void 0 ? void 0 : response.aggregations);
|
|
45938
46222
|
return {
|
|
45939
46223
|
config: config,
|
|
45940
46224
|
response: response
|
|
@@ -45965,10 +46249,26 @@
|
|
|
45965
46249
|
emitEvent: false
|
|
45966
46250
|
});
|
|
45967
46251
|
};
|
|
46252
|
+
NdfReportsComponent.prototype._prepareAggregations = function (aggregations) {
|
|
46253
|
+
var _a;
|
|
46254
|
+
if (this._isConfigChanged && this.aggregations) {
|
|
46255
|
+
this.aggregations = null;
|
|
46256
|
+
}
|
|
46257
|
+
if (this.aggregations && ((_a = this.config.filters) === null || _a === void 0 ? void 0 : _a.reloadStrategy) === 'never') {
|
|
46258
|
+
return;
|
|
46259
|
+
}
|
|
46260
|
+
this.aggregations = aggregations;
|
|
46261
|
+
this._isConfigChanged = false;
|
|
46262
|
+
};
|
|
46263
|
+
NdfReportsComponent.prototype._checkConfigChange = function (value) {
|
|
46264
|
+
var activeQuery = value.activeQuery, config = __rest(value, ["activeQuery"]);
|
|
46265
|
+
var _a = this._configSubject.getValue() || {}, aq = _a.activeQuery, currentConfig = __rest(_a, ["activeQuery"]);
|
|
46266
|
+
this._isConfigChanged = !___default["default"].isEqual(currentConfig, config);
|
|
46267
|
+
};
|
|
45968
46268
|
return NdfReportsComponent;
|
|
45969
46269
|
}(DestroySubject));
|
|
45970
46270
|
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: i1__namespace$5.Router }, { token: i0__namespace.NgZone }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
45971
|
-
NdfReportsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: NdfReportsComponent, selector: "app-ndf-reports", inputs: { jsonEditorEnabled: "jsonEditorEnabled", reportsKey: "reportsKey", navigateRoute: "navigateRoute", config: "config" }, outputs: { onQueryChange: "onQueryChange" }, host: { properties: { "dir": "direction" }, classAttribute: "ndf-reports" }, viewQueries: [{ propertyName: "fluidDirective", first: true, predicate: FluidHeightDirective, descendants: true }], usesInheritance: true, ngImport: i0__namespace, template: "<div\r\n\t*ngIf=\"reportsData$ | async as reports\"\r\n\t[class.panel-opened]=\"isPanelOpened && filtersConfig\"\r\n\t[dir]=\"direction\"\r\n\tclass=\"ndf-reports__container\"\r\n\tndfFluidHeight\r\n>\r\n\t<div class=\"ndf-reports__panel\" *ngIf=\"!!filtersConfig?.fields?.length\">\r\n\t\t<app-filters-panel\r\n\t\t\t[fields]=\"filtersConfig?.fields\"\r\n\t\t\t[aggregations]=\"reports?.response?.aggregations\"\r\n\t\t\t(filterChanged)=\"filterChanged($event)\"\r\n\t\t\t[activeQuery]=\"activeFiltersQuery$ | async\"\r\n\t\t\tclass=\"ndf-reports__filters\"\r\n\t\t></app-filters-panel>\r\n\t</div>\r\n\r\n\t<div class=\"ndf-reports__content p-4 pt-0\" (scrolled)=\"onContentScroll($event)\">\r\n\t\t<div class=\"ndf-reports__header flex pt-4\">\r\n\t\t\t<button mat-stroked-button class=\"toggle-button\" (click)=\"togglePanel()\">\r\n\t\t\t\t<mat-icon> filter_alt</mat-icon>\r\n\t\t\t</button>\r\n\t\t\t<app-editor-button\r\n\t\t\t\t*ngIf=\"jsonEditorEnabled && reportsKey\"\r\n\t\t\t\t[key]=\"reportsKey\"\r\n\t\t\t\t[type]=\"editorType\"\r\n\t\t\t></app-editor-button>\r\n\t\t</div>\r\n\t\t<mat-spinner *ngIf=\"isLoadingResult\" class=\"mt-5 mx-auto\" [diameter]=\"48\"></mat-spinner>\r\n\r\n\t\t<div class=\"reports-grid\" *ngIf=\"!isLoadingResult\">\r\n\t\t\t<app-ndf-report\r\n\t\t\t\t*ngFor=\"let config of reportConfig.items; trackBy: trackByFn\"\r\n\t\t\t\t[config]=\"config\"\r\n\t\t\t\t[data]=\"reports?.response\"\r\n\t\t\t\t[criteria]=\"filtersParams$ | async\"\r\n\t\t\t\t[class.col-small]=\"config?.layout?.width === 'small'\"\r\n\t\t\t\t[class.col-medium]=\"config?.layout?.width === 'medium'\"\r\n\t\t\t\t[class.col-half]=\"config?.layout?.width === 'half'\"\r\n\t\t\t\t[class.col-wide]=\"config?.layout?.width === 'wide'\"\r\n\t\t\t\t[class.col-extra-wide]=\"config?.layout?.width === 'extra'\"\r\n\t\t\t\t[class.col-full]=\"config?.layout?.width === 'full'\"\r\n\t\t\t\t[direction]=\"direction\"\r\n\t\t\t\tclass=\"reports-grid__item {{ config?.layout?.styleClass }}\"\r\n\t\t\t\t(onNavigate)=\"onNavigate($event)\"\r\n\t\t\t\t(onOpen)=\"openReportDetails($event, config)\"\r\n\t\t\t></app-ndf-report>\r\n\t\t</div>\r\n\t</div>\r\n\t<div\r\n\t\tclass=\"ndf-reports__details\"\r\n\t\t[class.opened]=\"showDetails\"\r\n\t\t[@slideInOut]=\"showDetails ? 'open' : 'closed'\"\r\n\t\t(@slideInOut.done)=\"onDetailsAnimationEnd($event)\"\r\n\t>\r\n\t\t<app-ndf-table\r\n\t\t\t*ngIf=\"reportDetails$ | async as report\"\r\n\t\t\t[config]=\"report.config\"\r\n\t\t\t[activeQuery]=\"activeFiltersQuery$ | async\"\r\n\t\t\t[customCriteria]=\"filtersParams$ | async\"\r\n\t\t>\r\n\t\t\t<ng-template searchTableTemplate>\r\n\t\t\t\t<div class=\"ndf-reports__details__header flex gap-2\">\r\n\t\t\t\t\t<button mat-stroked-button class=\"toggle-button\" (click)=\"togglePanel()\">\r\n\t\t\t\t\t\t<mat-icon> filter_alt</mat-icon>\r\n\t\t\t\t\t</button>\r\n\t\t\t\t\t<button mat-stroked-button class=\"close-button\" (click)=\"closeDetailsPanel()\">\r\n\t\t\t\t\t\t<mat-icon> close</mat-icon>\r\n\t\t\t\t\t</button>\r\n\t\t\t\t</div>\r\n\t\t\t\t<h3>\r\n\t\t\t\t\t{{ report.label | translate }}\r\n\t\t\t\t</h3>\r\n\t\t\t</ng-template>\r\n\t\t</app-ndf-table>\r\n\t</div>\r\n</div>\r\n", styles: [":host{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%}.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: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-margin: var(--panel-width)}.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-margin, 0);overflow-y:var(--ndf-reports-content-overflow-y, auto);position:relative}.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: 6;--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}@media screen{.reports-grid__item{grid-column:var(--col-span, span var(--grid-column, 2));grid-row:span var(--row-span, 1);grid-template-rows:subgrid}}.reports-grid__item.col-small{--col-span: var(--col-small-span, span 1)}.reports-grid__item.col-medium{--col-span: var(--col-medium-span, span 2)}.reports-grid__item.col-half{--col-span: var(--col-half-span, span 3)}.reports-grid__item.col-wide{--col-span: var(--col-wide-span, span 4)}.reports-grid__item.col-extra-wide{--col-span: var(--col-extra-wide-span, span 5)}.reports-grid__item.col-full{--col-span: 1 / -1}@media screen and (max-width: 1200px){.reports-grid{--col-span: span 1;--col-half-span: var(--col-span);--col-medium-span: var(--col-span);--col-small-span: var(--col-span);--col-extra-wide-span: 1 / -1;--col-wide-span: 1 / -1;--reports-grid-gap: 1rem;--grid-columns: 2}}@media screen and (max-width: 776px){.reports-grid{--col-half-span: var(--col-span);--col-medium-span: var(--col-span);--col-small-span: var(--col-span);--col-span: 1 / -1;--reports-grid-gap: 1rem;--grid-columns: 1}}@media print{.reports-grid{--reports-grid-gap: 11mm;--reports-grid-margin-top: 11mm;--rg-columns: repeat(2, 1fr)}}\n"], components: [{ type: FiltersPanelComponent, selector: "app-filters-panel", inputs: ["aggregations", "fields", "activeQuery"], outputs: ["filterChanged"] }, { type: i1__namespace$c.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i2__namespace$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: EditorButtonComponent, selector: "app-editor-button", inputs: ["type", "key"] }, { type: i3__namespace$1.MatSpinner, selector: "mat-spinner", inputs: ["color"] }, { type: NdfReportComponent, selector: "app-ndf-report", inputs: ["config", "direction", "data", "criteria"], outputs: ["onNavigate", "onOpen"] }, { type: NdfTableComponent, selector: "app-ndf-table", inputs: ["rows", "totalRecords", "autoCalculateHeight", "emptyMessage", "activeQuery", "configPath", "configTransformer", "tableKey", "jsonEditorEnabled", "config", "customCriteria", "searchTerm"], outputs: ["onRowSelected", "onRowIndexSelected", "actionOnRow", "onGettingData", "onMultiRowSelected", "onLoading", "onPage", "onInitialized", "onLoaded", "onQueryChange", "onSort"] }], directives: [{ type: i4__namespace$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { 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: 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] });
|
|
46271
|
+
NdfReportsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: NdfReportsComponent, selector: "app-ndf-reports", inputs: { jsonEditorEnabled: "jsonEditorEnabled", reportsKey: "reportsKey", navigateRoute: "navigateRoute", config: "config" }, outputs: { onQueryChange: "onQueryChange" }, host: { properties: { "dir": "direction" }, classAttribute: "ndf-reports" }, viewQueries: [{ propertyName: "fluidDirective", first: true, predicate: FluidHeightDirective, descendants: true }], usesInheritance: true, ngImport: i0__namespace, template: "<div\r\n\t*ngIf=\"reportsData$ | async as reports\"\r\n\t[class.panel-opened]=\"isPanelOpened && filtersConfig\"\r\n\t[dir]=\"direction\"\r\n\tclass=\"ndf-reports__container\"\r\n\tndfFluidHeight\r\n>\r\n\t<div class=\"ndf-reports__panel\" *ngIf=\"!!filtersConfig?.fields?.length\">\r\n\t\t<app-filters-panel\r\n\t\t\t[fields]=\"filtersConfig?.fields\"\r\n\t\t\t[aggregations]=\"aggregations\"\r\n\t\t\t(filterChanged)=\"filterChanged($event)\"\r\n\t\t\t[activeQuery]=\"activeFiltersQuery$ | async\"\r\n\t\t\tclass=\"ndf-reports__filters\"\r\n\t\t></app-filters-panel>\r\n\t</div>\r\n\r\n\t<div class=\"ndf-reports__content p-4 pt-0\" (scrolled)=\"onContentScroll($event)\">\r\n\t\t<div class=\"ndf-reports__header flex pt-4\">\r\n\t\t\t<button mat-stroked-button class=\"toggle-button\" (click)=\"togglePanel()\">\r\n\t\t\t\t<mat-icon> filter_alt</mat-icon>\r\n\t\t\t</button>\r\n\t\t\t<app-editor-button\r\n\t\t\t\t*ngIf=\"jsonEditorEnabled && reportsKey\"\r\n\t\t\t\t[key]=\"reportsKey\"\r\n\t\t\t\t[type]=\"editorType\"\r\n\t\t\t></app-editor-button>\r\n\t\t</div>\r\n\t\t<mat-spinner *ngIf=\"isLoadingResult\" class=\"mt-5 mx-auto\" [diameter]=\"48\"></mat-spinner>\r\n\r\n\t\t<div class=\"reports-grid\" *ngIf=\"!isLoadingResult\">\r\n\t\t\t<app-ndf-report\r\n\t\t\t\t*ngFor=\"let config of reportConfig.items; trackBy: trackByFn\"\r\n\t\t\t\t[config]=\"config\"\r\n\t\t\t\t[data]=\"reports?.response\"\r\n\t\t\t\t[criteria]=\"filtersParams$ | async\"\r\n\t\t\t\t[direction]=\"direction\"\r\n\t\t\t\t[style.--col-start]=\"config.layout?.startColumn || 'auto'\"\r\n\r\n [class.wide]=\"config.layout?.width >= 6\"\r\n [attr.data-width]=\"config.layout?.width || 4\"\r\n\t\t\t\tclass=\"reports-grid__item {{ config?.layout?.styleClass }} \"\r\n\t\t\t\t(onNavigate)=\"onNavigate($event)\"\r\n\t\t\t\t(onOpen)=\"openReportDetails($event, config)\"\r\n\t\t\t></app-ndf-report>\r\n\t\t</div>\r\n\t</div>\r\n\t<div\r\n\t\tclass=\"ndf-reports__details\"\r\n\t\t[class.opened]=\"showDetails\"\r\n\t\t[@slideInOut]=\"showDetails ? 'open' : 'closed'\"\r\n\t\t(@slideInOut.done)=\"onDetailsAnimationEnd($event)\"\r\n\t>\r\n\t\t<app-ndf-table\r\n\t\t\t*ngIf=\"reportDetails$ | async as report\"\r\n\t\t\t[config]=\"report.config\"\r\n\t\t\t[activeQuery]=\"activeFiltersQuery$ | async\"\r\n\t\t\t[customCriteria]=\"filtersParams$ | async\"\r\n\t\t>\r\n\t\t\t<ng-template searchTableTemplate>\r\n\t\t\t\t<div class=\"ndf-reports__details__header flex gap-2\">\r\n\t\t\t\t\t<button mat-stroked-button class=\"toggle-button\" (click)=\"togglePanel()\">\r\n\t\t\t\t\t\t<mat-icon> filter_alt</mat-icon>\r\n\t\t\t\t\t</button>\r\n\t\t\t\t\t<button mat-stroked-button class=\"close-button\" (click)=\"closeDetailsPanel()\">\r\n\t\t\t\t\t\t<mat-icon> close</mat-icon>\r\n\t\t\t\t\t</button>\r\n\t\t\t\t</div>\r\n\t\t\t\t<h3>\r\n\t\t\t\t\t{{ report.label | translate }}\r\n\t\t\t\t</h3>\r\n\t\t\t</ng-template>\r\n\t\t</app-ndf-table>\r\n\t</div>\r\n</div>\r\n", styles: [":host{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%}.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: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-margin: var(--panel-width)}.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-margin, 0);overflow-y:var(--ndf-reports-content-overflow-y, auto);position:relative}.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-width=\"2\"]{--col-span: span 2}.reports-grid__item[data-width=\"3\"]{--col-span: span 3}.reports-grid__item[data-width=\"4\"]{--col-span: span 4}.reports-grid__item[data-width=\"5\"]{--col-span: span 5}.reports-grid__item[data-width=\"6\"]{--col-span: span 6}.reports-grid__item[data-width=\"7\"]{--col-span: span 7}.reports-grid__item[data-width=\"8\"]{--col-span: span 8}.reports-grid__item[data-width=\"9\"]{--col-span: span 9}.reports-grid__item[data-width=\"10\"]{--col-span: span 10}.reports-grid__item[data-width=\"11\"]{--col-span: span 11}.reports-grid__item[data-width=\"12\"]{--col-span: span 12}@media screen{.reports-grid__item{grid-row-start:var(--row-start, initial);grid-column:var(--col-start, auto)/var(--col-span, span var(--grid-column, 2));grid-row:var(--start-row, auto)/span var(--row-span, 1);grid-template-rows:subgrid}}@media print{.reports-grid{--reports-grid-gap: 11mm;--reports-grid-margin-top: 11mm;--rg-columns: repeat(2, 1fr)}}\n"], components: [{ type: FiltersPanelComponent, selector: "app-filters-panel", inputs: ["aggregations", "fields", "activeQuery"], outputs: ["filterChanged"] }, { type: i1__namespace$c.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i2__namespace$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: EditorButtonComponent, selector: "app-editor-button", inputs: ["type", "key"] }, { type: i3__namespace$1.MatSpinner, selector: "mat-spinner", inputs: ["color"] }, { type: NdfReportComponent, selector: "app-ndf-report", inputs: ["config", "direction", "data", "criteria"], outputs: ["onNavigate", "onOpen"] }, { type: NdfTableComponent, selector: "app-ndf-table", inputs: ["rows", "totalRecords", "autoCalculateHeight", "emptyMessage", "activeQuery", "configPath", "configTransformer", "tableKey", "jsonEditorEnabled", "config", "customCriteria", "searchTerm"], outputs: ["onRowSelected", "onRowIndexSelected", "actionOnRow", "onGettingData", "onMultiRowSelected", "onLoading", "onPage", "onInitialized", "onLoaded", "onQueryChange", "onSort"] }], directives: [{ type: i4__namespace$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { 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: 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] });
|
|
45972
46272
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NdfReportsComponent, decorators: [{
|
|
45973
46273
|
type: i0.Component,
|
|
45974
46274
|
args: [{
|
|
@@ -48187,6 +48487,8 @@
|
|
|
48187
48487
|
exports.AggregationCustomComponent = AggregationCustomComponent;
|
|
48188
48488
|
exports.AggregationDateListComponent = AggregationDateListComponent;
|
|
48189
48489
|
exports.AggregationFieldComponent = AggregationFieldComponent;
|
|
48490
|
+
exports.AggregationFieldModule = AggregationFieldModule;
|
|
48491
|
+
exports.AggregationGroupComponent = AggregationGroupComponent;
|
|
48190
48492
|
exports.AggregationRadioComponent = AggregationRadioComponent;
|
|
48191
48493
|
exports.AggregationSelectComponent = AggregationSelectComponent;
|
|
48192
48494
|
exports.AggregationSwitchComponent = AggregationSwitchComponent;
|
|
@@ -48459,6 +48761,7 @@
|
|
|
48459
48761
|
exports.MONACO_EDITOR_CONFIG = MONACO_EDITOR_CONFIG;
|
|
48460
48762
|
exports.MY_MOMENT_FORMATS = MY_MOMENT_FORMATS;
|
|
48461
48763
|
exports.MainfolderService = MainfolderService;
|
|
48764
|
+
exports.MapToAggregationConfigPipe = MapToAggregationConfigPipe;
|
|
48462
48765
|
exports.MessageService = MessageService;
|
|
48463
48766
|
exports.ModeTogglerComponent = ModeTogglerComponent;
|
|
48464
48767
|
exports.MomentDateAdapter = MomentDateAdapter;
|
|
@@ -48564,6 +48867,7 @@
|
|
|
48564
48867
|
exports.RenameComponent = RenameComponent;
|
|
48565
48868
|
exports.ReportConfigMapperService = ReportConfigMapperService;
|
|
48566
48869
|
exports.ReportTransformService = ReportTransformService;
|
|
48870
|
+
exports.ReportsDataTransformers = ReportsDataTransformers;
|
|
48567
48871
|
exports.ReportsStateService = ReportsStateService;
|
|
48568
48872
|
exports.RolesService = RolesService;
|
|
48569
48873
|
exports.SEARCH_TABLE_TEMPLATE = SEARCH_TABLE_TEMPLATE;
|