nuxeo-development-framework 5.5.6 → 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 +236 -94
- package/bundles/nuxeo-development-framework.umd.js.map +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 +229 -90
- package/fesm2015/nuxeo-development-framework.js.map +1 -1
- 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',
|
|
@@ -48227,6 +48368,7 @@
|
|
|
48227
48368
|
exports.CircleNodeComponent = CircleNodeComponent;
|
|
48228
48369
|
exports.ClickOutsideDirective = ClickOutsideDirective;
|
|
48229
48370
|
exports.ClipboardComponent = ClipboardComponent;
|
|
48371
|
+
exports.ColumnRendererRegistryService = ColumnRendererRegistryService;
|
|
48230
48372
|
exports.CommentApiService = CommentApiService;
|
|
48231
48373
|
exports.CommentsDashletComponent = CommentsDashletComponent;
|
|
48232
48374
|
exports.CommentsModule = CommentsModule;
|