UNPKG

@alfresco/adf-content-services

Version:
125 lines (124 loc) 5.29 kB
/*! * @license * Copyright © 2005-2025 Hyland Software, Inc. and its affiliates. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import { MatDialog } from '@angular/material/dialog'; import { EventEmitter } from '@angular/core'; import { ThumbnailService, TranslationService } from '@alfresco/adf-core'; import { Subject, Observable } from 'rxjs'; import { ContentService } from '../common/services/content.service'; import { Node } from '@alfresco/js-api'; import { DocumentListService } from '../document-list/services/document-list.service'; import { NodeAction } from '../document-list/models/node-action.enum'; import { SitesService } from '../common/services/sites.service'; import * as i0 from "@angular/core"; export declare class ContentNodeDialogService { private dialog; private contentService; private documentListService; private siteService; private translation; private thumbnailService; static nonDocumentSiteContent: string[]; /** Emitted when an error occurs. */ error: EventEmitter<any>; constructor(dialog: MatDialog, contentService: ContentService, documentListService: DocumentListService, siteService: SitesService, translation: TranslationService, thumbnailService: ThumbnailService); /** * Opens a file browser at a chosen folder location. * shows files and folders in the dialog search result. * * @param folderNodeId ID of the folder to use * @returns Information about the selected file(s) */ openFileBrowseDialogByFolderId(folderNodeId: string): Observable<Node[]>; /** * Opens a lock node dialog. * * @param contentEntry Node to lock * @returns Error/status message (if any) */ openLockNodeDialog(contentEntry: Node): Subject<string>; /** * Opens a file browser at a chosen site location. * shows files and folders in the dialog search result. * * @returns Information about the selected file(s) */ openFileBrowseDialogBySite(): Observable<Node[]>; /** * Opens a file browser at a default myFile location. * shows files and folders in the dialog search result. * * @returns Information about the selected file(s) */ openFileBrowseDialogByDefaultLocation(): Observable<Node[]>; /** * Opens a folder browser at a chosen site location. * * @returns Information about the selected folder(s) */ openFolderBrowseDialogBySite(): Observable<Node[]>; /** * Opens a folder browser at a chosen folder location. * * @param folderNodeId ID of the folder to use * @returns Information about the selected folder(s) */ openFolderBrowseDialogByFolderId(folderNodeId: string): Observable<Node[]>; /** * Opens a dialog to copy or move an item to a new location. * * @param action Name of the action (eg, "Copy" or "Move") to show in the title * @param contentEntry Item to be copied or moved * @param permission Permission for the operation * @param excludeSiteContent The site content that should be filtered out * @returns Information about files that were copied/moved */ openCopyMoveDialog(action: NodeAction, contentEntry: Node, permission?: string, excludeSiteContent?: string[]): Observable<Node[]>; /** * Gets the translation of the dialog title. * * @param action Name of the action to display in the dialog title * @param name Name of the item on which the action is being performed * @returns Translated version of the title */ getTitleTranslation(action: string, name: string): string; /** * Opens a dialog to choose folders to upload. * * @param action Name of the action to show in the title * @param contentEntry Item to upload * @returns Information about the chosen folder(s) */ openUploadFolderDialog(action: NodeAction, contentEntry: Node): Observable<Node[]>; /** * Opens a dialog to choose a file to upload. * * @param action Name of the action to show in the title * @param contentEntry Item to upload * @param showFilesInResult Show files in dialog search result * @returns Information about the chosen file(s) */ openUploadFileDialog(action: NodeAction, contentEntry: Node, showFilesInResult?: boolean): Observable<Node[]>; private openContentNodeDialog; private imageResolver; private hasAllowableOperationsOnNodeFolder; private isNodeFolder; private isCopyMoveSelectionValid; private hasEntityCreatePermission; private isSite; static ɵfac: i0.ɵɵFactoryDeclaration<ContentNodeDialogService, never>; static ɵprov: i0.ɵɵInjectableDeclaration<ContentNodeDialogService>; }