/*! * @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 { CustomEmptyContentTemplateDirective, CustomLoadingContentTemplateDirective, CustomNoPermissionTemplateDirective, DataCellEvent, DataColumn, DataColumnListComponent, DataRow, DataRowActionEvent, DataSorting, DataTableComponent, DataTableSchema, PaginatedComponent, PaginationModel, RequestPaginationModel, ShowHeaderMode } from '@alfresco/adf-core'; import { Node, NodeEntry, NodePaging, NodesApi, Pagination } from '@alfresco/js-api'; import { AfterContentInit, EventEmitter, OnChanges, OnInit, SimpleChanges } from '@angular/core'; import { BehaviorSubject, Subject } from 'rxjs'; import { FilterSearch } from '../../search'; import { RowFilter } from '../data/row-filter.model'; import { ShareDataRow } from '../data/share-data-row.model'; import { ShareDataTableAdapter } from '../data/share-datatable-adapter'; import { ContentActionModel } from '../models/content-action.model'; import { PermissionStyleModel } from '../models/permissions-style.model'; import { NodeEntityEvent, NodeEntryEvent } from './node.event'; import * as i0 from "@angular/core"; export declare class DocumentListComponent extends DataTableSchema implements OnInit, OnChanges, AfterContentInit, PaginatedComponent { private readonly documentListService; private readonly elementRef; private readonly appConfig; private readonly userPreferencesService; private readonly contentService; private readonly thumbnailService; private readonly alfrescoApiService; private readonly nodeService; private readonly dataTableService; private readonly lockService; private readonly dialog; static SINGLE_CLICK_NAVIGATION: string; static DOUBLE_CLICK_NAVIGATION: string; DEFAULT_PAGINATION: Pagination; DEFAULT_SORTING: DataSorting[]; columnList: DataColumnListComponent; customLoadingContent: CustomLoadingContentTemplateDirective; customNoPermissionsTemplate: CustomNoPermissionTemplateDirective; customNoContentTemplate: CustomEmptyContentTemplateDirective; /** Include additional information about the node in the server request. For example: association, isLink, isLocked and others. */ includeFields: string[]; /** * Filters the Node list using the *where* condition of the REST API * (for example, isFolder=true). See the REST API documentation for more information. */ where: string; /** * Specifies additional filters to apply (joined with **AND**). Applied for recent files only. */ filters: string[]; /** * Define a set of CSS styles to apply depending on the permission * of the user on that node. See the Permission Style model * page for further details and examples. */ permissionsStyle: PermissionStyleModel[]; /** The default route for all the location-based columns (if declared). */ locationFormat: string; /** Toggles navigation to folder content or file preview */ navigate: boolean; /** Toggles the header */ showHeader: ShowHeaderMode; /** * User interaction for folder navigation or file preview. * Valid values are "click" and "dblclick". Default value: "dblclick" */ navigationMode: string; /** Show document thumbnails rather than icons */ thumbnails: boolean; /** * Row selection mode. Can be null, `single` or `multiple`. For `multiple` mode, * you can use Cmd (macOS) or Ctrl (Win) modifier key to toggle selection for multiple rows. */ selectionMode: string; /** Toggles multiselect mode */ multiselect: boolean; /** Toggles content actions for each row */ contentActions: boolean; /** Position of the content actions dropdown menu. Can be set to "left" or "right". */ contentActionsPosition: string; /** Toggles context menus for each row */ contextMenuActions: boolean; /** Custom image for empty folder. Default value: './assets/images/empty_doc_lib.svg' */ emptyFolderImageUrl: string; /** * When true, this enables you to drop files directly into subfolders shown * as items in the list or into another file to trigger updating it's version. * When false, the dropped file will be added to the * current folder (ie, the one containing all the items shown in the list). * See the Upload directive for further details about how the file drop is * handled. */ allowDropFiles: boolean; /** * Defines default sorting. The format is an array of 2 strings `[key, direction]` * i.e. `['name', 'desc']` or `['name', 'asc']`. Set this value only if you want to * override the default sorting detected by the component based on columns. */ sorting: string[] | DataSorting; /** * Defines default sorting. The format is an array of strings `[key direction, otherKey otherDirection]` * i.e. `['name desc', 'nodeType asc']` or `['name asc']`. Set this value if you want a base * rule to be added to the sorting apart from the one driven by the header. */ additionalSorting: DataSorting; /** * Defines sorting mode. Can be either `client` (items in the list * are sorted client-side) or `server` (the ordering supplied by the * server is used without further client-side sorting). * Note that the `server` option *does not* request the server to sort the data * before delivering it. */ sortingMode: 'server' | 'client'; /** * The inline style to apply to every row. See * the Angular NgStyle * docs for more details and usage examples. */ rowStyle: { [key: string]: any; }; /** The CSS class to apply to every row */ rowStyleClass: string; /** * Toggles the loading state and animated spinners for the component. Used in * combination with `navigate=false` to perform custom navigation and loading * state indication. */ loading: boolean; _rowFilter: RowFilter | null; /** * Custom function to choose whether to show or hide rows. * See the [Row Filter Model](row-filter.model.md) page for * more information. */ set rowFilter(rowFilter: RowFilter); get rowFilter(): RowFilter; /** * Custom function to choose image file paths to show. See the * [Image Resolver Model](image-resolver.model.md) page for * more information. */ imageResolver: any | null; /** Toggles the sticky header mode. */ stickyHeader: boolean; /** Toggles the header filters mode. */ headerFilters: boolean; /** Initial value for filter. */ filterValue: any; /** The ID of the folder node to display or a reserved string alias for special sources */ currentFolderId: string; /** * Array of nodes to be pre-selected. All nodes in the * array are pre-selected in multi selection mode, but only the first node * is pre-selected in single selection mode. */ preselectNodes: NodeEntry[]; /** The Document list will show all the nodes contained in the NodePaging entity */ node: NodePaging; /** Default value is stored in the user preference settings. Use this only if you are not using pagination. */ maxItems: number; /** Key of columns preset set in extension.json */ columnsPresetKey?: string; /** Sets columns visibility for DataTableSchema */ set setColumnsVisibility(columnsVisibility: { [columnId: string]: boolean; } | undefined); /** Sets columns width for DataTableSchema */ set setColumnsWidths(columnsWidths: { [columnId: string]: number; } | undefined); /** Sets columns order for DataTableSchema */ set setColumnsOrder(columnsOrder: string[] | undefined); /** Limit of possible visible columns, including "$thumbnail" column if provided */ maxColumnsVisible?: number; /** Enables column resizing for datatable */ isResizingEnabled: boolean; /** Enables blur when resizing datatable columns */ blurOnResize: boolean; /** Display checkboxes in datatable rows on hover only */ displayCheckboxesOnHover: boolean; /** Display drag and drop hint. */ displayDragAndDropHint: boolean; /** * Indicates if the data is provided externally. * If true the component won't fetch data itself */ isDataProvidedExternally: boolean; /** Emitted when the user clicks a list node */ nodeClick: EventEmitter; /** Emitted when the user double-clicks a list node */ nodeDblClick: EventEmitter; /** Emitted when the current display folder changes */ folderChange: EventEmitter; /** * Emitted when the user acts upon files with either single or double click * (depends on `navigation-mode`). Useful for integration with the * Viewer component. */ preview: EventEmitter; /** Emitted when the Document List has loaded all items and is ready for use */ ready: EventEmitter; /** Emitted when the API fails to get the Document List data */ error: EventEmitter; /** Emitted when the node selection change */ nodeSelected: EventEmitter; /** Emitted when a filter value is selected */ filterSelection: EventEmitter; /** Emitted when column widths change */ columnsWidthChanged: EventEmitter<{ [columnId: string]: number; }>; /** Emitted when columns visibility change */ columnsVisibilityChanged: EventEmitter<{ [columnId: string]: boolean; }>; /** Emitted when columns order change */ columnsOrderChanged: EventEmitter; /** Emitted when the selected row items count in the table changed. */ selectedItemsCountChanged: EventEmitter; dataTable: DataTableComponent; actions: ContentActionModel[]; contextActionHandler: Subject; data: ShareDataTableAdapter; noPermission: boolean; selection: NodeEntry[]; $folderNode: Subject; allowFiltering: boolean; orderBy: string[]; preselectedRows: DataRow[]; folderNode: Node; private readonly _pagination; pagination: BehaviorSubject; sortingSubject: BehaviorSubject; private rowMenuCache; private loadingTimeout; private readonly destroyRef; private _nodesApi; get nodesApi(): NodesApi; constructor(); getContextActions(node: NodeEntry): { model: ContentActionModel; node: NodeEntry; subject: Subject; }[]; private getDefaultSorting; isMobile(): boolean; isEmpty(): boolean; ngOnInit(): void; ngAfterContentInit(): void; ngOnChanges(changes: SimpleChanges): void; reload(hideLoadingSpinner?: boolean): void; reloadWithoutResettingSelection(hideLoadingSpinner?: boolean): void; contextActionCallback(action: any): void; getNodeActions(node: NodeEntry | any): ContentActionModel[]; private refreshAction; private isActionVisible; private isActionDisabled; onShowContextMenu(e?: Event): void; navigateTo(node: Node | string): boolean; private getNodeFolderDestinationId; private isLinkFolder; private updateCustomSourceData; /** * Invoked when executing content action for a document or folder. * * @param node Node to be the context of the execution. * @param action Action to be executed against the context. */ executeContentAction(node: NodeEntry, action: ContentActionModel): void; private setLoadingState; loadFolder(hideLoadingSpinner?: boolean): void; resetSelection(): void; onPageLoaded(nodePaging: NodePaging): void; onSortingChanged(event: CustomEvent): void; private buildOrderByArray; onPreviewFile(node: NodeEntry): void; onColumnsVisibilityChange(columns: DataColumn[]): void; onColumnOrderChange(columnsWithNewOrder: DataColumn[]): void; onColumnsWidthChange(columns: DataColumn[]): void; onSelectedItemsCountChanged(count: number): void; onNodeClick(nodeEntry: NodeEntry): void; onNodeDblClick(nodeEntry: NodeEntry): void; executeActionClick(nodeEntry: NodeEntry): void; onNodeSelect(event: { row: ShareDataRow; selection: Array; }): void; onNodeUnselect(event: { row: ShareDataRow; selection: Array; }): void; onShowRowContextMenu(event: DataCellEvent): void; onShowRowActionsMenu(event: DataCellEvent): void; onExecuteRowAction(event: DataRowActionEvent): void; private enforceSingleClickNavigationForMobile; canNavigateFolder(node: Node): boolean; private onDataReady; updatePagination(requestPaginationModel: RequestPaginationModel): void; private syncPagination; onFilterSelectionChange(activeFilters: FilterSearch[]): void; onFilterSearchResultsReady(nodePaging: NodePaging): void; onFiltersCleared(): void; resetNewFolderPagination(): void; private handleError; getPreselectedNodesBasedOnSelectionMode(): NodeEntry[]; getPreselectedRowsBasedOnSelectionMode(): DataRow[]; getSelectionBasedOnSelectionMode(): DataRow[]; onPreselectNodes(): void; private preserveExistingSelection; preselectRowsOfPreselectedNodes(): void; unselectRowFromNodeId(nodeId: string): void; private isSingleSelectionMode; private isMultipleSelectionMode; private hasPreselectedNodes; private hasPreselectedRows; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; }