nuxeo-development-framework 5.5.5 → 5.5.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/nuxeo-development-framework.umd.js +308 -153
- package/bundles/nuxeo-development-framework.umd.js.map +1 -1
- package/esm2015/lib/components/reports/charts/chart.token.js +1 -1
- package/esm2015/lib/components/reports/charts/components/chart.component.js +1 -1
- package/esm2015/lib/components/reports/charts/utility/colors.js +7 -1
- package/esm2015/lib/components/reports/charts/utility/css.js +32 -1
- package/esm2015/lib/components/reports/ndf-reports/base/base-graph.report.js +30 -1
- package/esm2015/lib/components/reports/ndf-reports/charts-components/graph-chart/graph-chart.component.js +1 -1
- package/esm2015/lib/components/reports/ndf-reports/components/dynamic-timeline-report/dynamic-timeline-report.component.js +1 -23
- package/esm2015/lib/components/reports/ndf-reports/components/graph-report/graph-report.component.js +2 -24
- package/esm2015/lib/components/reports/ndf-reports/services/report-config-mapper.service.js +3 -9
- package/esm2015/lib/components/reports/ndf-reports/utilities/dataset-colors.js +3 -5
- package/esm2015/lib/components/spell-checker-field/spell-checker-field.module.js +1 -1
- package/esm2015/lib/components/tables/table/dynamic-column/dynamic-column.component.js +10 -5
- package/esm2015/lib/components/tables/table/dynamic-component.js +10 -5
- package/esm2015/lib/core/services/column-renderer/column-renderer-registry.service.js +102 -0
- package/esm2015/lib/core/services/column-renderer/index.js +2 -0
- package/esm2015/lib/core/services/extension/extension.service.js +35 -4
- package/esm2015/lib/core/services/index.js +2 -1
- package/fesm2015/nuxeo-development-framework.js +298 -145
- package/fesm2015/nuxeo-development-framework.js.map +1 -1
- package/lib/components/reports/charts/chart.token.d.ts +3 -0
- package/lib/components/reports/charts/utility/colors.d.ts +1 -0
- package/lib/components/reports/charts/utility/css.d.ts +4 -0
- package/lib/components/reports/ndf-reports/base/base-graph.report.d.ts +5 -1
- package/lib/components/reports/ndf-reports/components/dynamic-timeline-report/dynamic-timeline-report.component.d.ts +2 -5
- package/lib/components/reports/ndf-reports/components/graph-report/graph-report.component.d.ts +1 -5
- package/lib/components/tables/table/dynamic-column/dynamic-column.component.d.ts +3 -1
- package/lib/components/tables/table/dynamic-component.d.ts +3 -1
- package/lib/core/services/column-renderer/column-renderer-registry.service.d.ts +62 -0
- package/lib/core/services/column-renderer/index.d.ts +1 -0
- package/lib/core/services/extension/extension.service.d.ts +33 -0
- package/lib/core/services/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -14777,6 +14777,39 @@
|
|
|
14777
14777
|
/**
|
|
14778
14778
|
* Adds one or more new components to the existing set.
|
|
14779
14779
|
* @param values The new components to add
|
|
14780
|
+
* @deprecated This method is deprecated for column components and will be removed in a future version.
|
|
14781
|
+
* Use `ColumnRendererRegistryService.register()` instead for registering column components.
|
|
14782
|
+
*
|
|
14783
|
+
* @example
|
|
14784
|
+
* // For columns (deprecated)
|
|
14785
|
+
* this.setComponents({ 'common.components.text': TextComponent, 'number': NumberComponent });
|
|
14786
|
+
*
|
|
14787
|
+
* // For columns (recommended - single)
|
|
14788
|
+
* this.columnRegistry.register({
|
|
14789
|
+
* name: 'Text Column',
|
|
14790
|
+
* type: 'common.text',
|
|
14791
|
+
* category: 'basic',
|
|
14792
|
+
* component: TextComponent
|
|
14793
|
+
* });
|
|
14794
|
+
*
|
|
14795
|
+
* // For columns (recommended - multiple)
|
|
14796
|
+
* this.columnRegistry.register([
|
|
14797
|
+
* {
|
|
14798
|
+
* name: 'Text Column',
|
|
14799
|
+
* type: 'common.text',
|
|
14800
|
+
* category: 'basic',
|
|
14801
|
+
* component: TextComponent
|
|
14802
|
+
* },
|
|
14803
|
+
* {
|
|
14804
|
+
* name: 'Number Column',
|
|
14805
|
+
* type: 'common.number',
|
|
14806
|
+
* category: 'basic',
|
|
14807
|
+
* component: NumberComponent
|
|
14808
|
+
* }
|
|
14809
|
+
* ]);
|
|
14810
|
+
*
|
|
14811
|
+
* // For viewer components (still supported)
|
|
14812
|
+
* this.setComponents({ 'viewer.components.pdf': PdfViewerComponent });
|
|
14780
14813
|
*/
|
|
14781
14814
|
ExtensionService.prototype.setComponents = function (values) {
|
|
14782
14815
|
this.componentRegister.setComponents(values);
|
|
@@ -14788,9 +14821,7 @@
|
|
|
14788
14821
|
*/
|
|
14789
14822
|
ExtensionService.prototype.getAuthGuards = function (ids) {
|
|
14790
14823
|
var _this = this;
|
|
14791
|
-
return (ids || [])
|
|
14792
|
-
.map(function (id) { return _this.authGuards[id]; })
|
|
14793
|
-
.filter(function (guard) { return guard; });
|
|
14824
|
+
return (ids || []).map(function (id) { return _this.authGuards[id]; }).filter(function (guard) { return guard; });
|
|
14794
14825
|
};
|
|
14795
14826
|
/**
|
|
14796
14827
|
* Retrieves a registered extension component using its ID value.
|
|
@@ -14846,14 +14877,203 @@
|
|
|
14846
14877
|
}] }];
|
|
14847
14878
|
} });
|
|
14848
14879
|
|
|
14880
|
+
var NdfTransformService = /** @class */ (function () {
|
|
14881
|
+
function NdfTransformService() {
|
|
14882
|
+
this._transformations = new Map();
|
|
14883
|
+
}
|
|
14884
|
+
NdfTransformService.prototype.register = function (arg1, arg2) {
|
|
14885
|
+
var _this = this;
|
|
14886
|
+
if (typeof arg1 === 'object') {
|
|
14887
|
+
Object.entries(arg1).forEach(function (_a) {
|
|
14888
|
+
var _b = __read(_a, 2), key = _b[0], fn = _b[1];
|
|
14889
|
+
return _this._transformations.set(key, fn);
|
|
14890
|
+
});
|
|
14891
|
+
return;
|
|
14892
|
+
}
|
|
14893
|
+
if (typeof arg1 === 'string' && arg2) {
|
|
14894
|
+
this._transformations.set(arg1, arg2);
|
|
14895
|
+
}
|
|
14896
|
+
};
|
|
14897
|
+
/**
|
|
14898
|
+
* Retrieves a transformer function by its key.
|
|
14899
|
+
*
|
|
14900
|
+
* @param {string} key - The key of the transformer function.
|
|
14901
|
+
* @returns {NdfTransformerFunction | undefined} - The transformer function or undefined if not found.
|
|
14902
|
+
*/
|
|
14903
|
+
NdfTransformService.prototype.get = function (key) {
|
|
14904
|
+
return this._transformations.get(key);
|
|
14905
|
+
};
|
|
14906
|
+
/**
|
|
14907
|
+
* Retrieves all registered transformer functions.
|
|
14908
|
+
*
|
|
14909
|
+
* @returns {Map<string, NdfTransformerFunction>} - A map of all transformer functions.
|
|
14910
|
+
*/
|
|
14911
|
+
NdfTransformService.prototype.getAll = function () {
|
|
14912
|
+
return this._transformations;
|
|
14913
|
+
};
|
|
14914
|
+
/**
|
|
14915
|
+
* Clears all registered transformer functions.
|
|
14916
|
+
*/
|
|
14917
|
+
NdfTransformService.prototype.clear = function () {
|
|
14918
|
+
this._transformations.clear();
|
|
14919
|
+
};
|
|
14920
|
+
/**
|
|
14921
|
+
* Checks if a transformer function is registered for a specific key.
|
|
14922
|
+
*
|
|
14923
|
+
* @param {string} key - The key to check.
|
|
14924
|
+
* @returns {boolean} - True if the key exists, false otherwise.
|
|
14925
|
+
*/
|
|
14926
|
+
NdfTransformService.prototype.has = function (key) {
|
|
14927
|
+
return this._transformations.has(key);
|
|
14928
|
+
};
|
|
14929
|
+
/**
|
|
14930
|
+
* Removes a transformer function by its key.
|
|
14931
|
+
*
|
|
14932
|
+
* @param {string} key - The key of the transformer function to remove.
|
|
14933
|
+
*/
|
|
14934
|
+
NdfTransformService.prototype.remove = function (key) {
|
|
14935
|
+
this._transformations.delete(key);
|
|
14936
|
+
};
|
|
14937
|
+
/**
|
|
14938
|
+
* Executes a transformer function for a specific key with the provided input keys.
|
|
14939
|
+
*
|
|
14940
|
+
* @param {string} key - The key of the transformer function to execute.
|
|
14941
|
+
* @param {string[]} keys - The input keys to pass to the transformer function.
|
|
14942
|
+
* @throws {Error} - If no transformer function is registered for the key.
|
|
14943
|
+
* @returns {Observable<NdfTransformerDataModel[]>} - The result of the transformer function.
|
|
14944
|
+
*/
|
|
14945
|
+
NdfTransformService.prototype.transform = function (key, keys) {
|
|
14946
|
+
var fn = this.get(key);
|
|
14947
|
+
if (!fn) {
|
|
14948
|
+
throw new Error("No transformer registered for key: " + key);
|
|
14949
|
+
}
|
|
14950
|
+
return fn(keys);
|
|
14951
|
+
};
|
|
14952
|
+
return NdfTransformService;
|
|
14953
|
+
}());
|
|
14954
|
+
NdfTransformService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NdfTransformService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
14955
|
+
NdfTransformService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NdfTransformService, providedIn: 'root' });
|
|
14956
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NdfTransformService, decorators: [{
|
|
14957
|
+
type: i0.Injectable,
|
|
14958
|
+
args: [{
|
|
14959
|
+
providedIn: 'root'
|
|
14960
|
+
}]
|
|
14961
|
+
}] });
|
|
14962
|
+
|
|
14963
|
+
var ColumnRendererRegistryService = /** @class */ (function () {
|
|
14964
|
+
function ColumnRendererRegistryService() {
|
|
14965
|
+
this.registry = new Map();
|
|
14966
|
+
}
|
|
14967
|
+
ColumnRendererRegistryService.prototype.register = function (columns) {
|
|
14968
|
+
var _this = this;
|
|
14969
|
+
if (Array.isArray(columns)) {
|
|
14970
|
+
columns.forEach(function (def) { return _this._set(def); });
|
|
14971
|
+
}
|
|
14972
|
+
else {
|
|
14973
|
+
this._set(columns);
|
|
14974
|
+
}
|
|
14975
|
+
};
|
|
14976
|
+
/**
|
|
14977
|
+
* Retrieves a column type definition by its unique type key.
|
|
14978
|
+
* @param type The column type identifier
|
|
14979
|
+
*/
|
|
14980
|
+
ColumnRendererRegistryService.prototype.get = function (type) {
|
|
14981
|
+
return this.registry.get(type);
|
|
14982
|
+
};
|
|
14983
|
+
/**
|
|
14984
|
+
* Returns all registered column type definitions.
|
|
14985
|
+
*/
|
|
14986
|
+
ColumnRendererRegistryService.prototype.getAll = function () {
|
|
14987
|
+
return Array.from(this.registry.values());
|
|
14988
|
+
};
|
|
14989
|
+
/**
|
|
14990
|
+
* Gets column types filtered by app
|
|
14991
|
+
*/
|
|
14992
|
+
ColumnRendererRegistryService.prototype.getByApp = function (app) {
|
|
14993
|
+
return this.getAll().filter(function (def) { return (def === null || def === void 0 ? void 0 : def.app) === app; });
|
|
14994
|
+
};
|
|
14995
|
+
/**
|
|
14996
|
+
* Returns only the component associated with a column type.
|
|
14997
|
+
* @param type The column type identifier
|
|
14998
|
+
*/
|
|
14999
|
+
ColumnRendererRegistryService.prototype.getComponent = function (type) {
|
|
15000
|
+
var _a;
|
|
15001
|
+
return (_a = this.registry.get(type)) === null || _a === void 0 ? void 0 : _a.component;
|
|
15002
|
+
};
|
|
15003
|
+
/**
|
|
15004
|
+
* Gets all column types filtered by category
|
|
15005
|
+
*/
|
|
15006
|
+
ColumnRendererRegistryService.prototype.getByCategory = function (category) {
|
|
15007
|
+
return Array.from(this.registry.values()).filter(function (def) { return def.category === category; });
|
|
15008
|
+
};
|
|
15009
|
+
/**
|
|
15010
|
+
* Returns all unique categories
|
|
15011
|
+
*/
|
|
15012
|
+
ColumnRendererRegistryService.prototype.getCategories = function () {
|
|
15013
|
+
var categories = Array.from(this.registry.values()).map(function (def) { return def.category; });
|
|
15014
|
+
return __spreadArray([], __read(new Set(categories))).sort();
|
|
15015
|
+
};
|
|
15016
|
+
/**
|
|
15017
|
+
* Returns column types grouped by category
|
|
15018
|
+
*/
|
|
15019
|
+
ColumnRendererRegistryService.prototype.getGroupedByCategory = function () {
|
|
15020
|
+
var grouped = {};
|
|
15021
|
+
this.registry.forEach(function (definition) {
|
|
15022
|
+
if (!grouped[definition.category]) {
|
|
15023
|
+
grouped[definition.category] = [];
|
|
15024
|
+
}
|
|
15025
|
+
grouped[definition.category].push(definition);
|
|
15026
|
+
});
|
|
15027
|
+
return grouped;
|
|
15028
|
+
};
|
|
15029
|
+
/**
|
|
15030
|
+
* Gets column types filtered by multiple categories
|
|
15031
|
+
*/
|
|
15032
|
+
ColumnRendererRegistryService.prototype.getByCategories = function (categories) {
|
|
15033
|
+
return Array.from(this.registry.values()).filter(function (def) { return categories.includes(def.category); });
|
|
15034
|
+
};
|
|
15035
|
+
/**
|
|
15036
|
+
* Checks if a column type exists
|
|
15037
|
+
*/
|
|
15038
|
+
ColumnRendererRegistryService.prototype.has = function (type) {
|
|
15039
|
+
return this.registry.has(type);
|
|
15040
|
+
};
|
|
15041
|
+
/**
|
|
15042
|
+
* Clears all registered column types (mainly for testing or hot reload scenarios).
|
|
15043
|
+
*/
|
|
15044
|
+
ColumnRendererRegistryService.prototype.clear = function () {
|
|
15045
|
+
this.registry.clear();
|
|
15046
|
+
};
|
|
15047
|
+
ColumnRendererRegistryService.prototype._set = function (definition) {
|
|
15048
|
+
if (!definition.type || !definition.name) {
|
|
15049
|
+
throw new Error('[ColumnRendererRegistry] Type and name are required fields');
|
|
15050
|
+
}
|
|
15051
|
+
if (this.registry.has(definition.type)) {
|
|
15052
|
+
console.warn("[ColumnRendererRegistry] Type '" + definition.type + "' is already registered. Overwriting...");
|
|
15053
|
+
}
|
|
15054
|
+
this.registry.set(definition.type, definition);
|
|
15055
|
+
};
|
|
15056
|
+
return ColumnRendererRegistryService;
|
|
15057
|
+
}());
|
|
15058
|
+
ColumnRendererRegistryService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ColumnRendererRegistryService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
15059
|
+
ColumnRendererRegistryService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ColumnRendererRegistryService, providedIn: 'root' });
|
|
15060
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ColumnRendererRegistryService, decorators: [{
|
|
15061
|
+
type: i0.Injectable,
|
|
15062
|
+
args: [{ providedIn: 'root' }]
|
|
15063
|
+
}] });
|
|
15064
|
+
|
|
14849
15065
|
var DynamicColumnComponent = /** @class */ (function () {
|
|
14850
|
-
function DynamicColumnComponent(extensions, componentFactoryResolver, cdr) {
|
|
15066
|
+
function DynamicColumnComponent(extensions, _columnRegister, componentFactoryResolver, cdr) {
|
|
14851
15067
|
this.extensions = extensions;
|
|
15068
|
+
this._columnRegister = _columnRegister;
|
|
14852
15069
|
this.componentFactoryResolver = componentFactoryResolver;
|
|
14853
15070
|
this.cdr = cdr;
|
|
14854
15071
|
}
|
|
14855
15072
|
DynamicColumnComponent.prototype.ngOnInit = function () {
|
|
14856
|
-
var
|
|
15073
|
+
var isInRenderer = this._columnRegister.has(this.id);
|
|
15074
|
+
var componentType = isInRenderer
|
|
15075
|
+
? this._columnRegister.getComponent(this.id)
|
|
15076
|
+
: this.extensions.getComponentById(this.id);
|
|
14857
15077
|
if (componentType) {
|
|
14858
15078
|
var factory = this.componentFactoryResolver.resolveComponentFactory(componentType);
|
|
14859
15079
|
if (factory) {
|
|
@@ -14883,7 +15103,7 @@
|
|
|
14883
15103
|
};
|
|
14884
15104
|
return DynamicColumnComponent;
|
|
14885
15105
|
}());
|
|
14886
|
-
DynamicColumnComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: DynamicColumnComponent, deps: [{ token: ExtensionService }, { token: i0__namespace.ComponentFactoryResolver }, { token: i0__namespace.ChangeDetectorRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
15106
|
+
DynamicColumnComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: DynamicColumnComponent, deps: [{ token: ExtensionService }, { token: ColumnRendererRegistryService }, { token: i0__namespace.ComponentFactoryResolver }, { token: i0__namespace.ChangeDetectorRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
14887
15107
|
DynamicColumnComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: DynamicColumnComponent, selector: "cts-dynamic-column", inputs: { id: "id", context: "context", column: "column" }, host: { classAttribute: "cts-dynamic-column" }, viewQueries: [{ propertyName: "content", first: true, predicate: ["content"], descendants: true, read: i0.ViewContainerRef, static: true }], usesOnChanges: true, ngImport: i0__namespace, template: " <ng-container #content></ng-container> ", isInline: true, styles: ["\n\t\t\t.cts-dynamic-column {\n\t\t\t\tdisplay: flex;\n\t\t\t\talign-items: center;\n\t\t\t}\n\t\t"], encapsulation: i0__namespace.ViewEncapsulation.None });
|
|
14888
15108
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: DynamicColumnComponent, decorators: [{
|
|
14889
15109
|
type: i0.Component,
|
|
@@ -14896,7 +15116,7 @@
|
|
|
14896
15116
|
"\n\t\t\t.cts-dynamic-column {\n\t\t\t\tdisplay: flex;\n\t\t\t\talign-items: center;\n\t\t\t}\n\t\t"
|
|
14897
15117
|
]
|
|
14898
15118
|
}]
|
|
14899
|
-
}], ctorParameters: function () { return [{ type: ExtensionService }, { type: i0__namespace.ComponentFactoryResolver }, { type: i0__namespace.ChangeDetectorRef }]; }, propDecorators: { content: [{
|
|
15119
|
+
}], ctorParameters: function () { return [{ type: ExtensionService }, { type: ColumnRendererRegistryService }, { type: i0__namespace.ComponentFactoryResolver }, { type: i0__namespace.ChangeDetectorRef }]; }, propDecorators: { content: [{
|
|
14900
15120
|
type: i0.ViewChild,
|
|
14901
15121
|
args: ['content', { read: i0.ViewContainerRef, static: true }]
|
|
14902
15122
|
}], id: [{
|
|
@@ -14908,12 +15128,16 @@
|
|
|
14908
15128
|
}] } });
|
|
14909
15129
|
|
|
14910
15130
|
var DynamicCustomComponent = /** @class */ (function () {
|
|
14911
|
-
function DynamicCustomComponent(_extensions, _factoryResolver) {
|
|
15131
|
+
function DynamicCustomComponent(_extensions, _columnRegister, _factoryResolver) {
|
|
14912
15132
|
this._extensions = _extensions;
|
|
15133
|
+
this._columnRegister = _columnRegister;
|
|
14913
15134
|
this._factoryResolver = _factoryResolver;
|
|
14914
15135
|
}
|
|
14915
15136
|
DynamicCustomComponent.prototype.ngOnInit = function () {
|
|
14916
|
-
var
|
|
15137
|
+
var isInRenderer = this._columnRegister.has(this.componentName);
|
|
15138
|
+
var componentType = isInRenderer
|
|
15139
|
+
? this._columnRegister.getComponent(this.componentName)
|
|
15140
|
+
: this._extensions.getComponentById(this.componentName);
|
|
14917
15141
|
if (componentType) {
|
|
14918
15142
|
var factory = this._factoryResolver.resolveComponentFactory(componentType);
|
|
14919
15143
|
if (factory) {
|
|
@@ -14941,7 +15165,7 @@
|
|
|
14941
15165
|
};
|
|
14942
15166
|
return DynamicCustomComponent;
|
|
14943
15167
|
}());
|
|
14944
|
-
DynamicCustomComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: DynamicCustomComponent, deps: [{ token: ExtensionService }, { token: i0__namespace.ComponentFactoryResolver }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
15168
|
+
DynamicCustomComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: DynamicCustomComponent, deps: [{ token: ExtensionService }, { token: ColumnRendererRegistryService }, { token: i0__namespace.ComponentFactoryResolver }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
14945
15169
|
DynamicCustomComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: DynamicCustomComponent, selector: "app-dynamic-component", inputs: { componentName: "componentName", row: "row", rowAction: "rowAction", onClick: "onClick" }, host: { classAttribute: "dynamic-component" }, viewQueries: [{ propertyName: "_vcr", first: true, predicate: ["container"], descendants: true, read: i0.ViewContainerRef, static: true }], usesOnChanges: true, ngImport: i0__namespace, template: " <ng-container #container></ng-container> ", isInline: true, encapsulation: i0__namespace.ViewEncapsulation.None });
|
|
14946
15170
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: DynamicCustomComponent, decorators: [{
|
|
14947
15171
|
type: i0.Component,
|
|
@@ -14951,7 +15175,7 @@
|
|
|
14951
15175
|
encapsulation: i0.ViewEncapsulation.None,
|
|
14952
15176
|
host: { class: 'dynamic-component' }
|
|
14953
15177
|
}]
|
|
14954
|
-
}], ctorParameters: function () { return [{ type: ExtensionService }, { type: i0__namespace.ComponentFactoryResolver }]; }, propDecorators: { _vcr: [{
|
|
15178
|
+
}], ctorParameters: function () { return [{ type: ExtensionService }, { type: ColumnRendererRegistryService }, { type: i0__namespace.ComponentFactoryResolver }]; }, propDecorators: { _vcr: [{
|
|
14955
15179
|
type: i0.ViewChild,
|
|
14956
15180
|
args: ['container', { read: i0.ViewContainerRef, static: true }]
|
|
14957
15181
|
}], componentName: [{
|
|
@@ -15030,89 +15254,6 @@
|
|
|
15030
15254
|
type: i0.Output
|
|
15031
15255
|
}] } });
|
|
15032
15256
|
|
|
15033
|
-
var NdfTransformService = /** @class */ (function () {
|
|
15034
|
-
function NdfTransformService() {
|
|
15035
|
-
this._transformations = new Map();
|
|
15036
|
-
}
|
|
15037
|
-
NdfTransformService.prototype.register = function (arg1, arg2) {
|
|
15038
|
-
var _this = this;
|
|
15039
|
-
if (typeof arg1 === 'object') {
|
|
15040
|
-
Object.entries(arg1).forEach(function (_a) {
|
|
15041
|
-
var _b = __read(_a, 2), key = _b[0], fn = _b[1];
|
|
15042
|
-
return _this._transformations.set(key, fn);
|
|
15043
|
-
});
|
|
15044
|
-
return;
|
|
15045
|
-
}
|
|
15046
|
-
if (typeof arg1 === 'string' && arg2) {
|
|
15047
|
-
this._transformations.set(arg1, arg2);
|
|
15048
|
-
}
|
|
15049
|
-
};
|
|
15050
|
-
/**
|
|
15051
|
-
* Retrieves a transformer function by its key.
|
|
15052
|
-
*
|
|
15053
|
-
* @param {string} key - The key of the transformer function.
|
|
15054
|
-
* @returns {NdfTransformerFunction | undefined} - The transformer function or undefined if not found.
|
|
15055
|
-
*/
|
|
15056
|
-
NdfTransformService.prototype.get = function (key) {
|
|
15057
|
-
return this._transformations.get(key);
|
|
15058
|
-
};
|
|
15059
|
-
/**
|
|
15060
|
-
* Retrieves all registered transformer functions.
|
|
15061
|
-
*
|
|
15062
|
-
* @returns {Map<string, NdfTransformerFunction>} - A map of all transformer functions.
|
|
15063
|
-
*/
|
|
15064
|
-
NdfTransformService.prototype.getAll = function () {
|
|
15065
|
-
return this._transformations;
|
|
15066
|
-
};
|
|
15067
|
-
/**
|
|
15068
|
-
* Clears all registered transformer functions.
|
|
15069
|
-
*/
|
|
15070
|
-
NdfTransformService.prototype.clear = function () {
|
|
15071
|
-
this._transformations.clear();
|
|
15072
|
-
};
|
|
15073
|
-
/**
|
|
15074
|
-
* Checks if a transformer function is registered for a specific key.
|
|
15075
|
-
*
|
|
15076
|
-
* @param {string} key - The key to check.
|
|
15077
|
-
* @returns {boolean} - True if the key exists, false otherwise.
|
|
15078
|
-
*/
|
|
15079
|
-
NdfTransformService.prototype.has = function (key) {
|
|
15080
|
-
return this._transformations.has(key);
|
|
15081
|
-
};
|
|
15082
|
-
/**
|
|
15083
|
-
* Removes a transformer function by its key.
|
|
15084
|
-
*
|
|
15085
|
-
* @param {string} key - The key of the transformer function to remove.
|
|
15086
|
-
*/
|
|
15087
|
-
NdfTransformService.prototype.remove = function (key) {
|
|
15088
|
-
this._transformations.delete(key);
|
|
15089
|
-
};
|
|
15090
|
-
/**
|
|
15091
|
-
* Executes a transformer function for a specific key with the provided input keys.
|
|
15092
|
-
*
|
|
15093
|
-
* @param {string} key - The key of the transformer function to execute.
|
|
15094
|
-
* @param {string[]} keys - The input keys to pass to the transformer function.
|
|
15095
|
-
* @throws {Error} - If no transformer function is registered for the key.
|
|
15096
|
-
* @returns {Observable<NdfTransformerDataModel[]>} - The result of the transformer function.
|
|
15097
|
-
*/
|
|
15098
|
-
NdfTransformService.prototype.transform = function (key, keys) {
|
|
15099
|
-
var fn = this.get(key);
|
|
15100
|
-
if (!fn) {
|
|
15101
|
-
throw new Error("No transformer registered for key: " + key);
|
|
15102
|
-
}
|
|
15103
|
-
return fn(keys);
|
|
15104
|
-
};
|
|
15105
|
-
return NdfTransformService;
|
|
15106
|
-
}());
|
|
15107
|
-
NdfTransformService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NdfTransformService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
15108
|
-
NdfTransformService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NdfTransformService, providedIn: 'root' });
|
|
15109
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NdfTransformService, decorators: [{
|
|
15110
|
-
type: i0.Injectable,
|
|
15111
|
-
args: [{
|
|
15112
|
-
providedIn: 'root'
|
|
15113
|
-
}]
|
|
15114
|
-
}] });
|
|
15115
|
-
|
|
15116
15257
|
var _TableComponent_resizeObserver;
|
|
15117
15258
|
var TABLE_MODE = {
|
|
15118
15259
|
list: 'list',
|
|
@@ -43474,6 +43615,12 @@
|
|
|
43474
43615
|
gradient.addColorStop(0, colors === null || colors === void 0 ? void 0 : colors.startColor);
|
|
43475
43616
|
gradient.addColorStop(1, colors === null || colors === void 0 ? void 0 : colors.endColor);
|
|
43476
43617
|
return gradient;
|
|
43618
|
+
}
|
|
43619
|
+
// Check if the string is a valid CSS color
|
|
43620
|
+
function isColor(str) {
|
|
43621
|
+
var s = new Option().style;
|
|
43622
|
+
s.color = str;
|
|
43623
|
+
return s.color !== '';
|
|
43477
43624
|
}
|
|
43478
43625
|
|
|
43479
43626
|
function flatArray(data) {
|
|
@@ -43590,6 +43737,36 @@
|
|
|
43590
43737
|
var luminance = 0.2126 * r + 0.7152 * g + 0.0722 * b;
|
|
43591
43738
|
return luminance > 0.6 ? darkColor : lightColor;
|
|
43592
43739
|
}
|
|
43740
|
+
function getCssColors(colors) {
|
|
43741
|
+
var _colors = (colors || []).map(function (color) {
|
|
43742
|
+
var str = "" + color;
|
|
43743
|
+
if (isCssVar(str)) {
|
|
43744
|
+
var _var = extractCssVar(str);
|
|
43745
|
+
return getColor(_var);
|
|
43746
|
+
}
|
|
43747
|
+
return str;
|
|
43748
|
+
});
|
|
43749
|
+
return __spreadArray([], __read(_colors));
|
|
43750
|
+
}
|
|
43751
|
+
function isCssVar(value) {
|
|
43752
|
+
return typeof value === 'string' && (value.startsWith('var') || value.startsWith('--'));
|
|
43753
|
+
}
|
|
43754
|
+
function extractCssVar(data) {
|
|
43755
|
+
var match = data.match(/var\((--[^)]+)\)/);
|
|
43756
|
+
return match ? match[1] : data;
|
|
43757
|
+
}
|
|
43758
|
+
function resolveColor(value, cssVar, fallback) {
|
|
43759
|
+
if (!value && !cssVar) {
|
|
43760
|
+
return fallback;
|
|
43761
|
+
}
|
|
43762
|
+
if (isCssVar(value)) {
|
|
43763
|
+
return getColor(extractCssVar(value), fallback);
|
|
43764
|
+
}
|
|
43765
|
+
if (isColor(value)) {
|
|
43766
|
+
return value;
|
|
43767
|
+
}
|
|
43768
|
+
return getColor(cssVar, fallback);
|
|
43769
|
+
}
|
|
43593
43770
|
/*
|
|
43594
43771
|
* Converts a hexadecimal color code to an RGB array.
|
|
43595
43772
|
*
|
|
@@ -43627,6 +43804,7 @@
|
|
|
43627
43804
|
createShade: createShade,
|
|
43628
43805
|
createColorVariants: createColorVariants,
|
|
43629
43806
|
createConicGradient: createConicGradient,
|
|
43807
|
+
isColor: isColor,
|
|
43630
43808
|
flatArray: flatArray,
|
|
43631
43809
|
isObject: isObject,
|
|
43632
43810
|
getCssVariable: getCssVariable,
|
|
@@ -43634,7 +43812,11 @@
|
|
|
43634
43812
|
getGridColor: getGridColor,
|
|
43635
43813
|
getTicksColor: getTicksColor,
|
|
43636
43814
|
getColors: getColors,
|
|
43637
|
-
getTextColor: getTextColor
|
|
43815
|
+
getTextColor: getTextColor,
|
|
43816
|
+
getCssColors: getCssColors,
|
|
43817
|
+
isCssVar: isCssVar,
|
|
43818
|
+
extractCssVar: extractCssVar,
|
|
43819
|
+
resolveColor: resolveColor
|
|
43638
43820
|
});
|
|
43639
43821
|
|
|
43640
43822
|
var StatisticService = /** @class */ (function (_super) {
|
|
@@ -45445,10 +45627,8 @@
|
|
|
45445
45627
|
// Keep the original replaceColors for processing individual values
|
|
45446
45628
|
function replaceColors(data) {
|
|
45447
45629
|
var e_2, _a;
|
|
45448
|
-
if (
|
|
45449
|
-
|
|
45450
|
-
var value = match ? match[1] : data;
|
|
45451
|
-
return getColor(value);
|
|
45630
|
+
if (isCssVar(data)) {
|
|
45631
|
+
return getColor(extractCssVar(data));
|
|
45452
45632
|
}
|
|
45453
45633
|
if (data === null || typeof data !== 'object') {
|
|
45454
45634
|
return data;
|
|
@@ -45554,14 +45734,7 @@
|
|
|
45554
45734
|
return ((_a = _optionsMap[key]) === null || _a === void 0 ? void 0 : _a.call(_optionsMap, options)) || {};
|
|
45555
45735
|
};
|
|
45556
45736
|
ReportConfigMapperService.prototype._prepareColors = function (colors) {
|
|
45557
|
-
var _colors = (colors || [])
|
|
45558
|
-
var str = "" + color;
|
|
45559
|
-
if (str.startsWith('var(')) {
|
|
45560
|
-
var match = str.match(/^var\((--[^)]+)\)/);
|
|
45561
|
-
return match ? getColor(match[1]) : str;
|
|
45562
|
-
}
|
|
45563
|
-
return str.startsWith('--') ? getColor(str) : str;
|
|
45564
|
-
});
|
|
45737
|
+
var _colors = getCssColors(colors || []);
|
|
45565
45738
|
return __spreadArray(__spreadArray([], __read(_colors)), __read(getColors()));
|
|
45566
45739
|
};
|
|
45567
45740
|
return ReportConfigMapperService;
|
|
@@ -46062,6 +46235,31 @@
|
|
|
46062
46235
|
direction: this.direction
|
|
46063
46236
|
});
|
|
46064
46237
|
};
|
|
46238
|
+
BaseGraphReport.prototype.ngAfterViewInit = function () {
|
|
46239
|
+
this._setupThemeWatcher();
|
|
46240
|
+
};
|
|
46241
|
+
BaseGraphReport.prototype.ngOnDestroy = function () {
|
|
46242
|
+
_super.prototype.ngOnDestroy.call(this);
|
|
46243
|
+
this._chartThemeService.destroy();
|
|
46244
|
+
};
|
|
46245
|
+
BaseGraphReport.prototype._setupThemeWatcher = function () {
|
|
46246
|
+
var _this = this;
|
|
46247
|
+
this._chartThemeService.theme$
|
|
46248
|
+
.pipe(operators.filter(function (value) { return value !== _this._initialTheme && !!_this._definition; }), operators.takeUntil(this.destroy$))
|
|
46249
|
+
.subscribe(function (theme) {
|
|
46250
|
+
_this._initialTheme = theme;
|
|
46251
|
+
var _a = _this._configSub.getValue(), chart = _a.chart, config = __rest(_a, ["chart"]);
|
|
46252
|
+
var data = ___default["default"].merge({}, _this._definition, {
|
|
46253
|
+
chart: {
|
|
46254
|
+
type: chart.type
|
|
46255
|
+
}
|
|
46256
|
+
});
|
|
46257
|
+
_this._configSub.next(_this._prepareConfig(data));
|
|
46258
|
+
Chart__default["default"].defaults.color = getColor('--chart-default-color', '#666');
|
|
46259
|
+
Chart__default["default"].defaults.backgroundColor = getColor('--chart-default-background-color', 'rgba(0, 0, 0, 0.1)');
|
|
46260
|
+
Chart__default["default"].defaults.borderColor = getColor('--chart-default-border-color', 'rgba(0, 0, 0, 0.1)');
|
|
46261
|
+
});
|
|
46262
|
+
};
|
|
46065
46263
|
return BaseGraphReport;
|
|
46066
46264
|
}(BaseReport));
|
|
46067
46265
|
BaseGraphReport.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: BaseGraphReport, deps: null, target: i0__namespace.ɵɵFactoryTarget.Directive });
|
|
@@ -46453,13 +46651,6 @@
|
|
|
46453
46651
|
}));
|
|
46454
46652
|
return _this;
|
|
46455
46653
|
}
|
|
46456
|
-
GraphReportComponent.prototype.ngAfterViewInit = function () {
|
|
46457
|
-
this._setupThemeWatcher();
|
|
46458
|
-
};
|
|
46459
|
-
GraphReportComponent.prototype.ngOnDestroy = function () {
|
|
46460
|
-
_super.prototype.ngOnDestroy.call(this);
|
|
46461
|
-
this._chartThemeService.destroy();
|
|
46462
|
-
};
|
|
46463
46654
|
GraphReportComponent.prototype.changeChartType = function (type) {
|
|
46464
46655
|
var _d;
|
|
46465
46656
|
var _a, _b;
|
|
@@ -46480,21 +46671,6 @@
|
|
|
46480
46671
|
this.graphChartComponent.printChart();
|
|
46481
46672
|
}
|
|
46482
46673
|
};
|
|
46483
|
-
GraphReportComponent.prototype._setupThemeWatcher = function () {
|
|
46484
|
-
var _this = this;
|
|
46485
|
-
this._chartThemeService.theme$
|
|
46486
|
-
.pipe(operators.filter(function (value) { return value !== _this._initialTheme && !!_this._definition; }), operators.takeUntil(this.destroy$))
|
|
46487
|
-
.subscribe(function (theme) {
|
|
46488
|
-
_this._initialTheme = theme;
|
|
46489
|
-
var _a = _this._configSub.getValue(), chart = _a.chart, config = __rest(_a, ["chart"]);
|
|
46490
|
-
var data = ___default["default"].merge({}, _this._definition, {
|
|
46491
|
-
chart: {
|
|
46492
|
-
type: chart.type
|
|
46493
|
-
}
|
|
46494
|
-
});
|
|
46495
|
-
_this._configSub.next(_this._prepareConfig(data));
|
|
46496
|
-
});
|
|
46497
|
-
};
|
|
46498
46674
|
return GraphReportComponent;
|
|
46499
46675
|
}(BaseGraphReport));
|
|
46500
46676
|
GraphReportComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: GraphReportComponent, deps: null, target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
@@ -46711,21 +46887,14 @@
|
|
|
46711
46887
|
_this._timelineService = _this.injector.get(DynamicTimelineReportService);
|
|
46712
46888
|
_this._criteria$ = _this.criteria$.pipe(operators.distinctUntilChanged(function (a, b) { return ___default["default"].isEqual(a, b); }));
|
|
46713
46889
|
_this.selectedGroup$ = _this._timelineService.selectedGroup$;
|
|
46714
|
-
_this.filterCriteria$ = rxjs.combineLatest([_this._criteria$, _this._timelineService.selectedGroup$]).pipe(operators.map(function (
|
|
46715
|
-
var
|
|
46890
|
+
_this.filterCriteria$ = rxjs.combineLatest([_this._criteria$, _this._timelineService.selectedGroup$]).pipe(operators.map(function (_a) {
|
|
46891
|
+
var _b = __read(_a, 1), criteria = _b[0];
|
|
46716
46892
|
return ___default["default"].cloneDeep(___default["default"].merge(criteria || {}, _this._timelineService.prepareSelectedGroups(_this.config)));
|
|
46717
46893
|
}));
|
|
46718
46894
|
_this.report$ = rxjs.combineLatest([_this.config$, _this._criteria$, _this._timelineService.rebuild$]).pipe(_this._timelineService.prepareData());
|
|
46719
46895
|
_this._subscribeToLanguage();
|
|
46720
46896
|
return _this;
|
|
46721
46897
|
}
|
|
46722
|
-
DynamicTimelineReportComponent.prototype.ngAfterViewInit = function () {
|
|
46723
|
-
this._setupThemeWatcher();
|
|
46724
|
-
};
|
|
46725
|
-
DynamicTimelineReportComponent.prototype.ngOnDestroy = function () {
|
|
46726
|
-
_super.prototype.ngOnDestroy.call(this);
|
|
46727
|
-
this._chartThemeService.destroy();
|
|
46728
|
-
};
|
|
46729
46898
|
DynamicTimelineReportComponent.prototype._subscribeToLanguage = function () {
|
|
46730
46899
|
var _this = this;
|
|
46731
46900
|
this._translateService.onLangChange
|
|
@@ -46748,21 +46917,6 @@
|
|
|
46748
46917
|
DynamicTimelineReportComponent.prototype.openDetails = function () {
|
|
46749
46918
|
this.onOpen.emit(this._timelineService.payload);
|
|
46750
46919
|
};
|
|
46751
|
-
DynamicTimelineReportComponent.prototype._setupThemeWatcher = function () {
|
|
46752
|
-
var _this = this;
|
|
46753
|
-
this._chartThemeService.theme$
|
|
46754
|
-
.pipe(operators.filter(function (value) { return value !== _this._initialTheme && !!_this._definition; }), operators.takeUntil(this.destroy$))
|
|
46755
|
-
.subscribe(function (theme) {
|
|
46756
|
-
_this._initialTheme = theme;
|
|
46757
|
-
var _a = _this._configSub.getValue(), chart = _a.chart, config = __rest(_a, ["chart"]);
|
|
46758
|
-
var data = ___default["default"].merge({}, _this._definition, {
|
|
46759
|
-
chart: {
|
|
46760
|
-
type: chart.type
|
|
46761
|
-
}
|
|
46762
|
-
});
|
|
46763
|
-
_this._configSub.next(_this._prepareConfig(data));
|
|
46764
|
-
});
|
|
46765
|
-
};
|
|
46766
46920
|
return DynamicTimelineReportComponent;
|
|
46767
46921
|
}(BaseGraphReport));
|
|
46768
46922
|
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 });
|
|
@@ -48214,6 +48368,7 @@
|
|
|
48214
48368
|
exports.CircleNodeComponent = CircleNodeComponent;
|
|
48215
48369
|
exports.ClickOutsideDirective = ClickOutsideDirective;
|
|
48216
48370
|
exports.ClipboardComponent = ClipboardComponent;
|
|
48371
|
+
exports.ColumnRendererRegistryService = ColumnRendererRegistryService;
|
|
48217
48372
|
exports.CommentApiService = CommentApiService;
|
|
48218
48373
|
exports.CommentsDashletComponent = CommentsDashletComponent;
|
|
48219
48374
|
exports.CommentsModule = CommentsModule;
|