mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-3869] extensibility related components (#4107)
* extensions: dynamic column * content: trashcan name column * content: library status column * content: library role column * content: library name column * style fixes * content: name column * demo: use name column in DL example * fix tests * lint fixes * code fixes * update docs * add toggle to demo shell
This commit is contained in:
@@ -199,7 +199,13 @@ export class LibraryDialogComponent implements OnInit, OnDestroy {
|
||||
}
|
||||
|
||||
private async checkLibraryNameExists(libraryTitle: string) {
|
||||
const { entries } = (await this.findLibraryByTitle(libraryTitle)).list;
|
||||
let entries = [];
|
||||
|
||||
try {
|
||||
entries = (await this.findLibraryByTitle(libraryTitle)).list.entries;
|
||||
} catch {
|
||||
entries = [];
|
||||
}
|
||||
|
||||
if (entries.length) {
|
||||
this.libraryTitleExists = entries[0].entry.title.toLowerCase() === libraryTitle.toLowerCase();
|
||||
@@ -208,14 +214,13 @@ export class LibraryDialogComponent implements OnInit, OnDestroy {
|
||||
}
|
||||
}
|
||||
|
||||
private findLibraryByTitle(libraryTitle: string): Promise<SitePaging> {
|
||||
private async findLibraryByTitle(libraryTitle: string): Promise<SitePaging> {
|
||||
return this.alfrescoApiService
|
||||
.getInstance()
|
||||
.core.queriesApi.findSites(libraryTitle, {
|
||||
maxItems: 1,
|
||||
fields: ['title']
|
||||
})
|
||||
.catch(() => ({ list: { entries: [] } }));
|
||||
});
|
||||
}
|
||||
|
||||
private forbidSpecialCharacters({ value }: FormControl) {
|
||||
|
Reference in New Issue
Block a user