/*! * @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 { EventEmitter, OnInit } from '@angular/core'; import { DataSorting, HighlightDirective, InfinitePaginationComponent, PaginatedComponent } from '@alfresco/adf-core'; import { UntypedFormControl } from '@angular/forms'; import { Node, NodeEntry, NodePaging, Pagination, SearchRequest, SiteEntry, SitePaging } from '@alfresco/js-api'; import { DocumentListComponent } from '../../document-list/components/document-list.component'; import { RowFilter } from '../../document-list/data/row-filter.model'; import { ImageResolver } from '../../document-list/data/image-resolver.model'; import { NodeEntryEvent } from '../../document-list/components/node.event'; import * as i0 from "@angular/core"; export type ValidationFunction = (entry: Node) => boolean; export declare const defaultValidation: () => boolean; export declare class ContentNodeSelectorPanelComponent implements OnInit { private readonly customResourcesService; private readonly queryBuilderService; private readonly userPreferencesService; private readonly nodesApiService; private readonly uploadService; private readonly sitesService; private readonly contentNodeSelectorPanelService; DEFAULT_PAGINATION: Pagination; readonly disableActionFolderList: string[]; private showSiteList; private showSearchField; private showCounter; private _emptyList; /** If true will restrict the search and breadcrumbs to the currentFolderId */ restrictRootToCurrentFolderId: boolean; /** Node ID of the folder currently listed. */ currentFolderId: string; /** * Hide the "My Files" option added to the site list by default. * See the [Sites Dropdown component](sites-dropdown.component.md) * for more information. */ dropdownHideMyFiles: boolean; /** * Custom site for site dropdown. This is the same as the `siteList`. * property of the Sites Dropdown component (see its doc page * for more information). */ dropdownSiteList: SitePaging; _rowFilter: RowFilter; /** * Custom *where* filter function. See the * Document List component * for more information. */ where: string; /** * Custom row filter function. See the * [Row Filter Model](row-filter.model.md) page * for more information. */ set rowFilter(rowFilter: RowFilter); get rowFilter(): RowFilter; _excludeSiteContent: string[]; /** * Custom list of site content componentIds. * Used to filter out the corresponding items from the displayed nodes */ set excludeSiteContent(excludeSiteContent: string[]); get excludeSiteContent(): string[]; /** * Custom image resolver function. See the * [Image Resolver Model](image-resolver.model.md) page * for more information. */ imageResolver: ImageResolver; /** Number of items shown per page in the list. */ pageSize: number; /** Define the selection mode for document list. The allowed values are single or multiple */ selectionMode: 'single' | 'multiple'; /** * Function used to decide if the selected node has permission to be selected. * Default value is a function that always returns true. */ isSelectionValid: ValidationFunction; /** * Transformation to be performed on the chosen/folder node before building the * breadcrumb UI. Can be useful when custom formatting is needed for the breadcrumb. * You can change the path elements from the node that are used to build the * breadcrumb using this function. */ breadcrumbTransform: (node: any) => any; /** Toggle search input rendering */ set showSearch(value: boolean); get showSearch(): boolean; /** Toggle sites list dropdown rendering */ set showDropdownSiteList(value: boolean); get showDropdownSiteList(): boolean; /** Shows the files and folders in the search result */ set showFilesInResult(value: boolean); /** Shows the node counter in the breadcrumb */ set showNodeCounter(value: boolean); get showNodeCounter(): boolean; /** Emitted when the user has chosen an item. */ select: EventEmitter; /** Emitted when the navigation changes. */ navigationChange: EventEmitter; /** Emitted when the select site changes. */ siteChange: EventEmitter; /** Emitted when search is running. */ showingSearch: EventEmitter; /** Emitted when current folder loaded. */ currentFolder: EventEmitter; /** Emitted when folder loaded. */ folderLoaded: EventEmitter; documentList: DocumentListComponent; highlighter: HighlightDirective; nodePaging: NodePaging | null; siteId: null | string; breadcrumbRootId: null | string; searchTerm: string; showingSearchResults: boolean; loadingSearchResults: boolean; inDialog: boolean; _chosenNode: Node[]; selectionWithoutValidation: Node[]; folderIdToShow: string | null; breadcrumbFolderTitle: string | null; startSiteGuid: string | null; hasValidQuery: boolean; showHeader: "never"; infinitePaginationComponent: InfinitePaginationComponent; infiniteScroll: boolean; debounceSearch: number; searchInput: UntypedFormControl; target: PaginatedComponent; preselectedNodes: NodeEntry[]; currentUploadBatch: NodeEntry[]; sorting: string[] | DataSorting; searchPanelExpanded: boolean; private readonly destroyRef; set chosenNode(value: Node[]); get chosenNode(): Node[]; get emptyList(): boolean; getSelectedCount(): number; ngOnInit(): void; toggleSearchPanel(): void; hasCustomModels(): boolean; private onFileUploadEvent; private onFileUploadDeletedEvent; private getStartSite; private createRowFilter; private isExcludedSiteContent; /** * Updates the site attribute and starts a new search * * @param chosenSite SiteEntry to search within */ siteChanged(chosenSite: SiteEntry): void; /** * Get current breadcrumb folder node * * @returns the actually selected|entered folder node or null in case of searching for the breadcrumb */ get breadcrumbFolderNode(): Node | null; /** * Prepares the dialog for a new search * * @param searchRequest request options */ prepareDialogForNewSearch(searchRequest: SearchRequest): void; /** * Clear the search input and reset to last folder node in which search was performed */ clear(): void; /** * Resets the folder to be shown with the site selection or the initial landing folder */ resetFolderToShow(): void; /** * Clear the search input and search related data */ clearSearch(): void; private addCorrespondingNodeIdsQuery; private setSearchScopeToNodes; /** * Show the results of the search * * @param results Search results */ private showSearchResults; /** * Sets showingSearchResults state to be able to differentiate between search results or folder results * * @param $event node event */ onFolderChange($event: NodeEntryEvent): void; /** * Attempts to set the currently loaded node * * @param nodePaging pagination model */ onFolderLoaded(nodePaging: NodePaging): void; /** * Updates pagination.hasMoreItems to false after filtering only folders during 'COPY' and 'MOVE' action * * @param nodePaging pagination model */ updatePaginationAfterRowFilter(nodePaging: NodePaging): void; /** * Returns whether breadcrumb has to be shown or not * * @returns `true` if needs to show the breadcrumb, otherwise `false` */ showBreadcrumbs(): true | Node[]; /** * Loads the next batch of search results * * @param pagination Pagination object */ getNextPageOfSearch(pagination: Pagination): void; /** * Selects node as chosen if it has the right permission, clears the selection otherwise * * @param entry node entry */ private attemptNodeSelection; private isActionDisabledForFolder; /** * Clears the chosen node */ resetChosenNode(): void; /** * It filters and emit the selection coming from the document list * * @param nodesEntries selected nodes */ onCurrentSelection(nodesEntries: NodeEntry[]): void; setTitleIfCustomSite(site: SiteEntry): void; hasPreselectNodes(): boolean; isSingleSelectionMode(): boolean; getPreselectNodesBasedOnSelectionMode(): NodeEntry[]; private resetPagination; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; }