mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
document list extensions (demo shell) (#4511)
* doclist extensibility test page * desktopOnly support * extensions category, custom column * update code * Fix styling for column templates * update package lock
This commit is contained in:
committed by
Eugenio Romano
parent
49847bf809
commit
b51fc8a7d2
@@ -20,6 +20,7 @@ import { ExtensionConfig, ExtensionRef } from '../config/extension.config';
|
||||
import { ExtensionService } from '../services/extension.service';
|
||||
import { Observable, BehaviorSubject } from 'rxjs';
|
||||
import { ViewerExtensionRef } from '../config/viewer.extensions';
|
||||
import { DocumentListPresetRef } from '../config/document-list.extensions';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
@@ -49,9 +50,22 @@ export class AppExtensionService {
|
||||
this._references.next(references);
|
||||
}
|
||||
|
||||
/**
|
||||
* Provides a collection of document list columns for the particular preset.
|
||||
* The result is filtered by the **disabled** state.
|
||||
* @param key Preset key.
|
||||
*/
|
||||
getDocumentListPreset(key: string) {
|
||||
return this.extensionService
|
||||
.getElements<DocumentListPresetRef>(
|
||||
`features.documentList.${key}`
|
||||
)
|
||||
.filter((entry) => !entry.disabled);
|
||||
}
|
||||
|
||||
/**
|
||||
* Provides a list of the Viewer content extensions,
|
||||
* filtered by disabled state and rules.
|
||||
* filtered by **disabled** state and **rules**.
|
||||
*/
|
||||
getViewerExtensions(): ViewerExtensionRef[] {
|
||||
return this.extensionService
|
||||
|
Reference in New Issue
Block a user