davidcanonieto b0a46f7eac
[ADF-5219] Refactor Document list Filters (#6092)
* First commit

* Second commit

* Commit 4

* Add unit tests

* Fix unit tests

* Add documentation for breaking change

* Fix rebase

* Fix unit test
2020-09-25 10:08:15 +01:00

722 lines
34 KiB
HTML

<div class="app-container">
<mat-accordion *ngIf="showRecentFiles" class="app-container-recent">
<mat-expansion-panel hideToggle="true">
<mat-expansion-panel-header>
<mat-panel-title>
{{ 'DOCUMENT_LIST.RECENT.TITLE' | translate }}
<mat-icon>history</mat-icon>
</mat-panel-title>
</mat-expansion-panel-header>
<adf-document-list
[currentFolderId]="'-recent-'"
locationFormat="/files"
[display]="'gallery'"
[preselectNodes]="selectedNodes"
[showHeader]="false"
[maxItems]="5"
(preview)="showFile($event)"
selectionMode="null">
<adf-custom-empty-content-template>
<div class="app-empty-list__block">
<mat-icon>history</mat-icon>
<p class="app-empty-list__title">{{ 'DOCUMENT_LIST.RECENT.EMPTY_STATE.TITLE' | translate}}</p>
</div>
</adf-custom-empty-content-template>
</adf-document-list>
</mat-expansion-panel>
</mat-accordion>
<div *ngIf="showSitePicker" class="app-site-container-style" id="site-container">
<adf-sites-dropdown (change)="onSiteChange($event)" [hideMyFiles]="false" [relations]="'members'">
</adf-sites-dropdown>
</div>
<div id="document-list-container" class="app-document-list-container" fxLayout="row" fxLayoutAlign="start stretch"
fxLayoutGap="16px">
<adf-upload-drag-area fxFlex="1 1 auto"
[disabled]="disableDragArea"
[acceptedFilesType]="getFileFiltering()"
[rootFolderId]="currentFolderId"
[versioning]="versioning"
[adf-check-allowable-operation]="'create'"
[adf-nodes]="disableDragArea ? getCurrentDocumentListNode() : []"
(beginUpload)="onBeginUpload($event)"
(updateFileVersion)="onUploadNewVersion($event)">
<div *ngIf="errorMessage" class="app-error-message">
<button (click)="resetError()" mat-icon-button>
<mat-icon>highlight_off</mat-icon>
</button>
<span class="app-error-message--text">{{errorMessage}}</span>
</div>
<adf-toolbar *ngIf="!disableDragArea" [color]="toolbarColor" class="app-files-toolbar">
<adf-toolbar-title fxFlex="0 1 auto">
<adf-breadcrumb fxShow fxHide.lt-sm="true"
class="app-files-breadcrumb"
root="APP.PERSONAL-FILES"
[target]="documentList">
</adf-breadcrumb>
<adf-dropdown-breadcrumb fxHide fxShow.lt-sm="true"
class="app-files-breadcrumb"
[target]="documentList">
</adf-dropdown-breadcrumb>
</adf-toolbar-title>
<adf-toolbar-divider fxFlex="0 0 auto"></adf-toolbar-divider>
<div fxFlex="0 0 auto" class="app-document-action-buttons" fxShow fxHide.lt-sm="true">
<button
mat-icon-button
data-automation-id="document-list-grid-view"
title="{{ 'DOCUMENT_LIST.TOOLBAR.CARDVIEW' | translate }}"
(click)="toggleGalleryView()">
<mat-icon *ngIf="displayMode === 'list'"
matTooltip="{{ 'DOCUMENT_LIST.TOOLBAR.CARDVIEW' | translate }}">view_comfy
</mat-icon>
<mat-icon *ngIf="displayMode === 'gallery'"
matTooltip="{{ 'DOCUMENT_LIST.TOOLBAR.LISTVIEW' | translate }}">list
</mat-icon>
</button>
<button
data-automation-id="create-new-folder"
mat-icon-button
[disabled]="!canCreateContent(documentList.folderNode)"
title="{{ 'DOCUMENT_LIST.TOOLBAR.NEW_FOLDER' | translate }}"
(error)="openSnackMessage($event)"
(success)="documentList.reload()"
[adf-create-folder]="currentFolderId"
matTooltip="{{ 'DOCUMENT_LIST.TOOLBAR.NEW_FOLDER' | translate }}">
<mat-icon>create_new_folder</mat-icon>
</button>
<button
mat-icon-button
matTooltip="{{ 'DOCUMENT_LIST.TOOLBAR.CREATE_LIBRARY' | translate }}"
data-automation-id="create-new-library"
(click)="createLibrary()">
<mat-icon>library_add</mat-icon>
</button>
<button
data-automation-id="edit-folder"
mat-icon-button
[disabled]="!canEditFolder(documentList.selection)"
title="{{ 'DOCUMENT_LIST.TOOLBAR.EDIT_FOLDER' | translate }}"
(error)="openSnackMessage($event)"
[adf-edit-folder]="documentList.selection[0]?.entry"
(success)="documentList.reload()"
matTooltip="{{ 'DOCUMENT_LIST.TOOLBAR.EDIT_FOLDER' | translate }}">
<mat-icon>create</mat-icon>
</button>
<button mat-icon-button
[disabled]="!hasSelection(documentList.selection)"
title="{{ 'DOCUMENT_LIST.TOOLBAR.DOWNLOAD' | translate }}"
[adfNodeDownload]="documentList.selection"
matTooltip="{{ 'DOCUMENT_LIST.TOOLBAR.DOWNLOAD' | translate }}">
<mat-icon>get_app</mat-icon>
</button>
<button mat-icon-button
data-automation-id="delete-toolbar-button"
adf-check-allowable-operation="delete"
permanent=true
[adf-nodes]="documentList.selection"
title="{{ 'DOCUMENT_LIST.TOOLBAR.DELETE' | translate }}"
(delete)="onDeleteActionSuccess($event)"
[adf-delete]="documentList.selection"
matTooltip="{{ 'DOCUMENT_LIST.TOOLBAR.DELETE' | translate }}">
<mat-icon>delete</mat-icon>
</button>
<button
data-automation-id="favorite"
mat-icon-button
[disabled]="!documentList.selection.length"
#favorite="adfFavorite"
[adf-node-favorite]="documentList.selection"
matTooltip="{{ 'DOCUMENT_LIST.TOOLBAR.FAVORITES' | translate }}">
<mat-icon>
{{ favorite.hasFavorites() ? 'star' :'star_border' }}
</mat-icon>
</button>
<button mat-icon-button
[disabled]="documentList.selection.length && !shareRef.isFile"
[baseShareUrl]="baseShareUrl"
#shareRef="adfShare"
[adf-share]="documentList.selection[0]"
[matTooltip]="(shareRef.isShared
? 'DOCUMENT_LIST.TOOLBAR.SHARE_EDIT'
: 'DOCUMENT_LIST.TOOLBAR.SHARE') | translate">
<mat-icon>
share
</mat-icon>
</button>
</div>
<button fxFlex="1 0 auto" mat-icon-button [matMenuTriggerFor]="themePicker"
matTooltip="{{ 'DOCUMENT_LIST.TOOLBAR.THEME' | translate }}">
<mat-icon>format_color_fill</mat-icon>
</button>
<mat-menu #themePicker="matMenu">
<button mat-menu-item (click)="toolbarColor = 'default'">Default</button>
<button mat-menu-item (click)="toolbarColor = 'primary'">Primary</button>
<button mat-menu-item (click)="toolbarColor = 'accent'">Accent</button>
<button mat-menu-item (click)="toolbarColor = 'warn'">Warn</button>
</mat-menu>
<button mat-icon-button (click)="showVersions = !showVersions" class="app-show-versions-button">
<mat-icon *ngIf="!showVersions" matTooltip="{{ 'DOCUMENT_LIST.TOOLBAR.SHOW_VERSION' | translate }}">
chevron_left
</mat-icon>
<mat-icon *ngIf="showVersions" matTooltip="{{ 'DOCUMENT_LIST.TOOLBAR.HIDE_VERSION' | translate }}">
chevron_right
</mat-icon>
</button>
<adf-toolbar-divider fxFlex="0 0 auto" fxHide fxShow.lt-sm="true"></adf-toolbar-divider>
<button fxFlex="0 0 auto" mat-icon-button [matMenuTriggerFor]="menu" fxHide fxShow.lt-sm="true">
<mat-icon>more_vert</mat-icon>
</button>
<mat-menu #menu="matMenu">
<button mat-menu-item
(click)="toggleGalleryView()">
<mat-icon *ngIf="displayMode === 'list'">view_comfy</mat-icon>
<mat-icon *ngIf="displayMode === 'gallery'">list</mat-icon>
<span>{{ 'DOCUMENT_LIST.TOOLBAR.CARDVIEW' | translate }}</span>
</button>
<button mat-menu-item
(error)="openSnackMessage($event)"
[adf-create-folder]="currentFolderId">
<mat-icon>create_new_folder</mat-icon>
<span>{{ 'DOCUMENT_LIST.TOOLBAR.NEW_FOLDER' | translate }}</span>
</button>
<button mat-menu-item
(click)="createLibrary()">
<mat-icon>library_add</mat-icon>
<span>{{ 'DOCUMENT_LIST.TOOLBAR.CREATE_LIBRARY' | translate }}</span>
</button>
<button mat-menu-item
[disabled]="!canEditFolder(documentList.selection)"
(error)="openSnackMessage($event)"
[adf-edit-folder]="documentList.selection[0]?.entry">
<mat-icon>create</mat-icon>
<span>{{ 'DOCUMENT_LIST.TOOLBAR.EDIT_FOLDER' | translate }}</span>
</button>
<button mat-menu-item
adf-check-allowable-operation="delete"
[adf-nodes]="documentList.selection"
(delete)="onDeleteActionSuccess($event)"
[adf-delete]="documentList.selection">
<mat-icon>delete</mat-icon>
<span>{{ 'DOCUMENT_LIST.TOOLBAR.DELETE' | translate }}</span>
</button>
</mat-menu>
</adf-toolbar>
<div class="app-document-list-container" [ngClass]="{'adf-sticky-document-list': stickyHeader }">
<adf-document-list
#documentList
class="app-file-list-container"
[permissionsStyle]="permissionsStyle"
[currentFolderId]="currentFolderId"
[contextMenuActions]="true"
[contentActions]="true"
[allowDropFiles]="allowDropFiles"
[selectionMode]="selectionMode"
[multiselect]="multiselect"
[display]="displayMode"
[node]="nodeResult"
[includeFields]="includeFields"
[sorting]="sorting"
[sortingMode]="sortingMode"
[showHeader]="showHeader"
[thumbnails]="thumbnails"
[stickyHeader]="stickyHeader"
[headerFilters]="headerFilters"
[filterValue]="paramValues"
(error)="onNavigationError($event)"
(success)="resetError()"
(ready)="emitReadyEvent($event)"
(preview)="showFile($event)"
(folderChange)="onFolderChange($event)"
(permissionError)="handlePermissionError($event)"
(name-click)="documentList.onNodeDblClick($event.detail?.node)"
(filterSelection)="onFilterSelected($event)">
<adf-custom-no-permission-template *ngIf="enableCustomPermissionMessage">
<h1>You don't have permissions</h1>
</adf-custom-no-permission-template>
<adf-custom-empty-content-template *ngIf="disableDragArea">
<div class="app-empty_template">
<div class="app-no-result-message">{{ 'SEARCH.NO_RESULT' | translate }}</div>
</div>
</adf-custom-empty-content-template>
<data-columns>
<data-column
key="$thumbnail"
type="image"
[sortable]="false"
class="app-image-table-cell"
[class.adf-cell-thumbnail]="thumbnails">
</data-column>
<data-column
*ngIf="showNameColumn && hyperlinkNavigation"
key="name"
sortingKey="name"
class="app-ellipsis-cell"
title="{{'DOCUMENT_LIST.COLUMNS.DISPLAY_NAME' | translate}}"
[formatTooltip]="getNodeNameTooltip">
<ng-template let-context>
<adf-name-column [context]="context"></adf-name-column>
</ng-template>
</data-column>
<data-column
*ngIf="showNameColumn && !hyperlinkNavigation"
key="name"
sortingKey="name"
title="{{'DOCUMENT_LIST.COLUMNS.DISPLAY_NAME' | translate}}"
[formatTooltip]="getNodeNameTooltip"
class="app-ellipsis-cell adf-expand-cell-5">
</data-column>
<!-- Location column demo -->
<!--
<data-column
key="path"
type="location"
format="/files"
title="Location">
</data-column>
-->
<data-column
key="content.sizeInBytes"
title="{{'DOCUMENT_LIST.COLUMNS.SIZE' | translate}}"
type="fileSize"
sortingKey="sizeInBytes"
class="app-desktop-only adf-ellipsis-cell">
</data-column>
<data-column
*ngIf="searchTerm"
key="search"
title="Search"
class="app-desktop-only adf-expand-cell-3">
<ng-template let-entry="$implicit">
<div [innerHTML]="searchResultsHighlight(entry.row.node.entry.search) | highlight:searchTerm">
</div>
</ng-template>
</data-column>
<!-- Notes: has performance overhead due to multiple files/folders causing separate HTTP calls to get tags -->
<!--
<data-column
title="{{'DOCUMENT_LIST.COLUMNS.TAG' | translate}}"
key="id"
class="app-full-width adf-ellipsis-cell">
<ng-template let-entry="$implicit">
<alfresco-tag-node-list [nodeId]="entry.data.getValue(entry.row, entry.col)"></alfresco-tag-node-list>
</ng-template>
</data-column>
-->
<data-column
class="app-full-width adf-ellipsis-cell adf-desktop-only"
title="{{'DOCUMENT_LIST.COLUMNS.NODE_ID' | translate}}"
[sortable]="false"
key="id">
</data-column>
<data-column
title="{{'DOCUMENT_LIST.COLUMNS.IS_LOCKED' | translate}}"
key="lock"
[focus]="false"
[sortable]="false"
class="app-desktop-only adf-ellipsis-cell">
<ng-template let-entry="$implicit">
<button mat-icon-button [adf-node-lock]="entry.row.node.entry" class="app-lock-button">
<mat-icon *ngIf="entry.row.getValue('isLocked')">lock</mat-icon>
<mat-icon *ngIf="!entry.row.getValue('isLocked')">lock_open</mat-icon>
</button>
</ng-template>
</data-column>
<data-column
title="{{'DOCUMENT_LIST.COLUMNS.CREATED_BY' | translate}}"
key="createdByUser.displayName"
sortingKey="createdByUser"
class="app-desktop-only adf-ellipsis-cell">
</data-column>
<data-column
title="{{'DOCUMENT_LIST.COLUMNS.CREATED' | translate}}"
key="createdAt"
sortingKey="createdAt"
type="date"
[format]="enableMediumTimeFormat ? 'medium' : 'timeAgo'"
class="app-desktop-only adf-ellipsis-cell">
</data-column>
</data-columns>
<content-actions>
<!-- Conditional actions demo -->
<content-action
target="all"
title="Action for 'custom' node"
[disabled]="isCustomActionDisabled"
(execute)="runCustomAction($event)">
</content-action>
<content-action
icon="get_app"
title="Download this file now!"
handler="download"
[visible]="canDownloadNode">
</content-action>
<content-action
icon="get_app"
title="Never see this action again"
handler="download"
[visible]="false">
</content-action>
<!-- common actions -->
<content-action
icon="get_app"
title="DOCUMENT_LIST.ACTIONS.DOWNLOAD"
handler="download">
</content-action>
<content-action
icon="content_copy"
title="DOCUMENT_LIST.ACTIONS.FOLDER.COPY"
permission="copy"
[disableWithNoPermission]="true"
(error)="onContentActionError($event)"
(success)="onContentActionSuccess($event)"
handler="copy">
</content-action>
<content-action
icon="redo"
title="DOCUMENT_LIST.ACTIONS.FOLDER.MOVE"
permission="update"
[disableWithNoPermission]="true"
(error)="onContentActionError($event)"
(success)="onContentActionSuccess($event)"
handler="move">
</content-action>
<content-action
icon="delete"
permission="delete"
[disableWithNoPermission]="true"
title="DOCUMENT_LIST.ACTIONS.FOLDER.DELETE"
(permissionEvent)="handlePermissionError($event)"
(success)="onDeleteActionSuccess($event)"
handler="delete">
</content-action>
<content-action
icon="info"
title="DOCUMENT_LIST.ACTIONS.METADATA"
(execute)="onManageMetadata($event)">
</content-action>
<content-action
icon="settings_input_component"
title="DOCUMENT_LIST.ACTIONS.PERMISSION"
permission="copy"
(error)="onContentActionError($event)"
(execute)="onPermissionRequested($event)">
</content-action>
<!-- document actions -->
<content-action
icon="storage"
target="document"
title="DOCUMENT_LIST.ACTIONS.VERSIONS"
(execute)="onManageVersions($event)">
</content-action>
<content-action
target="document"
*ngIf="authenticationService.isBpmLoggedIn()"
icon="play_arrow"
title="DOCUMENT_LIST.ACTIONS.DOCUMENT.PROCESS_ACTION"
(execute)="startProcessAction($event)">
</content-action>
<content-action
target="document"
icon="lock"
permission="lock"
handler="lock"
title="DOCUMENT_LIST.ACTIONS.LOCK">
</content-action>
</content-actions>
</adf-document-list>
</div>
<adf-pagination
#standardPagination
*ngIf="!infiniteScrolling"
class="app-documentlist-pagination"
[target]="documentList"
(changePageSize)="onChangePageSize($event)"
(changePageNumber)="onChangePageNumber($event)"
(nextPage)="onNextPage($event)"
(prevPage)="onPrevPage($event)">
</adf-pagination>
<adf-infinite-pagination
[hidden]="!infiniteScrolling"
[target]="documentList"
[loading]="documentList.loading">
{{ 'ADF-DOCUMENT-LIST.LAYOUT.LOAD_MORE' | translate }}
</adf-infinite-pagination>
</adf-upload-drag-area>
<adf-info-drawer-layout *ngIf="showVersions" class="app-manage-versions-sidebar" fxFlex="0 0 auto">
<div info-drawer-content>
<adf-info-drawer [title]="'Details'" *ngIf="documentList.selection[0]">
<adf-info-drawer-tab label="Properties">
<adf-content-metadata-card
[node]="documentList.selection[0].entry"
[displayEmpty]="displayEmptyMetadata">
</adf-content-metadata-card>
</adf-info-drawer-tab>
<adf-info-drawer-tab label="Versions">
<ng-container *ngIf="hasOneFileSelected();else choose_document_template">
<ng-container *ngIf="userHasPermissionToManageVersions(); else no_permission_to_versions">
<adf-version-manager
[node]="documentList.selection[0].entry"
[showComments]="showVersionComments"
[allowDownload]="allowVersionDownload">
</adf-version-manager>
</ng-container>
</ng-container>
<ng-template #choose_document_template>
<div class="app-manage-versions-empty">
<mat-icon class="app-manage-versions-empty-icon">face</mat-icon>
{{'VERSION.CHOOSE_FILE' | translate}}
</div>
</ng-template>
<ng-template #no_permission_to_versions>
<div class="app-manage-versions-no-permission">
<mat-icon class="app-manage-versions-no-permission-icon">warning</mat-icon>
{{'VERSION.NO_PERMISSION' | translate}}
</div>
</ng-template>
</adf-info-drawer-tab>
</adf-info-drawer>
</div>
</adf-info-drawer-layout>
</div>
</div>
<adf-context-menu-holder></adf-context-menu-holder>
<div *ngIf="processId">
<adf-start-process
[values]="formValues"
[appId]="processId"
(start)="closeStartProcess()"
(cancel)="closeStartProcess()">
</adf-start-process>
</div>
<div *ngIf="showSettingsPanel" class="app-content-service-settings">
<p>Current folder ID: {{ documentList.currentFolderId }}</p>
<div class="app-p-10">
Selected Nodes:
<ul>
<li *ngFor="let node of documentList.selection">
{{ node.entry.name }}
</li>
</ul>
</div>
<div class="app-container">
<section>
<mat-slide-toggle color="primary" [(ngModel)]="showNameColumn">
Show Name Column
</mat-slide-toggle>
</section>
<section>
<mat-slide-toggle [(ngModel)]="hyperlinkNavigation">
Hyperlink navigation
</mat-slide-toggle>
</section>
<section>
<mat-slide-toggle data-automation-id="multiSelectToggle" [color]="'primary'" [(ngModel)]="multiselect">
{{'DOCUMENT_LIST.MULTISELECT_CHECKBOXES' | translate}}
</mat-slide-toggle>
</section>
<section>
<mat-slide-toggle id="adf-multiple-upload-switch" [color]="'primary'" (change)="onMultipleFilesUpload()" [(ngModel)]="multipleFileUpload" >
{{'DOCUMENT_LIST.MULTIPLE_FILE_UPLOAD' | translate}}
</mat-slide-toggle>
</section>
<section>
<mat-slide-toggle id="adf-folder-upload-switch" [color]="'primary'" [(ngModel)]="folderUpload">
{{'DOCUMENT_LIST.FOLDER_UPLOAD' | translate}}
</mat-slide-toggle>
</section>
<section>
<mat-slide-toggle id="adf-extension-filter-upload-switch" [color]="'primary'"
[(ngModel)]="acceptedFilesTypeShow">
{{'DOCUMENT_LIST.CUSTOM_FILTER' | translate}}
</mat-slide-toggle>
</section>
<section>
<mat-slide-toggle id="adf-max-size-filter-upload-switch" [color]="'primary'" [(ngModel)]="maxSizeShow">
{{'DOCUMENT_LIST.MAX_SIZE' | translate}}
</mat-slide-toggle>
</section>
<section>
<mat-slide-toggle id="adf-thumbnails-upload-switch" [color]="'primary'" (click)="toggleThumbnails()">
{{'DOCUMENT_LIST.THUMBNAILS' | translate}}
</mat-slide-toggle>
</section>
<section>
<mat-slide-toggle id="adf-document-list-enable-drop-files" [color]="'primary'" [checked]="allowDropFiles"
(change)="toggleAllowDropFiles()">
{{'DOCUMENT_LIST.ALLOW_DROP_FILES' | translate}}
</mat-slide-toggle>
</section>
<section>
<mat-slide-toggle id="adf-version-upload-switch" [color]="'primary'" [(ngModel)]="versioning">
{{'DOCUMENT_LIST.ENABLE_VERSIONING' | translate}}
</mat-slide-toggle>
</section>
<section>
<mat-slide-toggle color="primary" (click)="onInfiniteScrolling()">
{{'DOCUMENT_LIST.ENABLE_INFINITE_SCROLL' | translate}}
</mat-slide-toggle>
</section>
<section>
<mat-slide-toggle color="primary" [(ngModel)]="showVersionComments">
{{'APP.ADF_VERSION_MANAGER.SHOW_COMMENTS' | translate}}
</mat-slide-toggle>
</section>
<section>
<mat-slide-toggle color="primary" [(ngModel)]="allowVersionDownload">
{{'APP.ADF_VERSION_MANAGER.ALLOW_DOWNLOAD' | translate}}
</mat-slide-toggle>
</section>
<section>
<mat-slide-toggle color="primary" [(ngModel)]="warnOnMultipleUploads">
{{'APP.WARN-MULTIPLE-UPLOADS' | translate}}
</mat-slide-toggle>
</section>
<section>
<mat-slide-toggle color="primary" [(ngModel)]="enableCustomPermissionMessage">
{{'APP.CUSTOM-PERMISSION-MESSAGE' | translate}}
</mat-slide-toggle>
</section>
<section>
<mat-slide-toggle color="primary" [(ngModel)]="enableMediumTimeFormat" id="enableMediumTimeFormat">
{{'APP.MEDIUM-TIME-FORMAT' | translate}}
</mat-slide-toggle>
</section>
<section>
<mat-slide-toggle
color="primary" [(ngModel)]="displayEmptyMetadata" id="displayEmptyMetadata">
Display Empty Metadata
</mat-slide-toggle>
</section>
<section>
<mat-slide-toggle
color="primary" [(ngModel)]="stickyHeader" id="stickyHeader">
Sticky Header
</mat-slide-toggle>
</section>
<section>
<mat-slide-toggle
color="primary" [(ngModel)]="preselectNodes" id="preselectNodes">
Preselect Nodes
</mat-slide-toggle>
</section>
<form class="example-form">
<mat-form-field *ngIf="preselectNodes" class="adf-preselect-nodes-input">
<input matInput
(input)="setPreselectNodes($event.target?.value)"
placeholder="NodeEntry[] => [{ entry: { isFile: true, id: 'node-id' }}, { entry: { isFile: true, id: 'node-id' }} ]">
</mat-form-field>
</form>
<h5>Upload</h5>
<section *ngIf="acceptedFilesTypeShow">
<mat-form-field floatPlaceholder="float">
<input matInput
placeholder="Extension accepted"
[(ngModel)]="acceptedFilesType"
data-automation-id="accepted-files-type">
</mat-form-field>
</section>
<section *ngIf="maxSizeShow">
<mat-form-field>
<input matInput type="number" placeholder="Max file size" [(ngModel)]="maxFilesSize"
data-automation-id="max-files-size">
</mat-form-field>
</section>
<div *ngIf="!acceptedFilesTypeShow">
<adf-upload-button
#uploadButton
tooltip="Custom tooltip"
[disabled]="!enableUpload"
[rootFolderId]="documentList.currentFolderId"
[multipleFiles]="multipleFileUpload"
[uploadFolders]="folderUpload"
[maxFilesSize]="maxSizeShow ? maxFilesSize : null"
(error)="openSnackMessage($event)"
[versioning]="versioning"
[adf-check-allowable-operation]="'create'"
[adf-nodes]="enableUpload ? getCurrentDocumentListNode() : []"
(permissionEvent)="handlePermissionError($event)"
(beginUpload)="onBeginUpload($event)">
</adf-upload-button>
</div>
<div *ngIf="acceptedFilesTypeShow">
<adf-upload-button
#uploadButton
tooltip="Custom tooltip"
[disabled]="!enableUpload"
[rootFolderId]="documentList.currentFolderId"
[acceptedFilesType]="acceptedFilesType"
[multipleFiles]="multipleFileUpload"
[uploadFolders]="folderUpload"
[versioning]="versioning"
(error)="openSnackMessage($event)"
[adf-check-allowable-operation]="'create'"
[adf-nodes]="enableUpload ? getCurrentDocumentListNode() : []"
(permissionEvent)="handlePermissionError($event)">
</adf-upload-button>
</div>
<section>
<mat-checkbox id="adf-disable-upload" [(ngModel)]="enableUpload">
{{'DOCUMENT_LIST.DESCRIPTION_UPLOAD' | translate}}
</mat-checkbox>
</section>
</div>
<div class="app-p-10">
<p>
{{'DOCUMENT_LIST.MULTISELECT_DESCRIPTION' | translate}}
</p>
<mat-form-field>
<mat-select placeholder="Selection Mode" [(ngModel)]="selectionMode" name="food">
<mat-option *ngFor="let mode of selectionModes" [value]="mode.value">
{{mode.viewValue}}
</mat-option>
</mat-select>
</mat-form-field>
</div>
</div>
<adf-file-uploading-dialog #fileDialog (error)="openSnackMessage($event)"></adf-file-uploading-dialog>