ACS-8630: remove Angular upgrade hacks from Attach Widget (#10111)

This commit is contained in:
Denys Vuika
2024-08-21 08:00:06 -04:00
committed by GitHub
parent 291d5c826b
commit 8d7ea71711
11 changed files with 81 additions and 82 deletions

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" x="0" y="0" viewBox="17.2 134.6 562 573.1"><path fill="#FFF" d="M298.2,421.3L219,340.4l-2.9-2.9c-45.4-46.5-119.5-46.5-164.7-0.2c-45.6,46.3-45.6,121.5,0,167.8 c45.2,46.4,119,46.4,164.4,0L298.2,421.3z"/><path fill="#FFF" d="M298.2,421.2v114.3l0.2,4.2c0,65.5-52.2,119-116.5,119c-64.3,0-116.5-53.1-116.5-118.6 c0-65.6,52.4-118.8,116.5-118.8H298.2z"/><path fill="#FFF" d="M298.2,421.2v114.3l0.2,4.2c0,65.5-52.2,119-116.5,119c-64.3,0-116.5-53.1-116.5-118.6 c0-65.6,52.4-118.8,116.5-118.8H298.2z"/><path fill="#FFF" d="M298.2,421.2v114.3l0.2,4.2c0,65.5-52.2,119-116.5,119c-64.3,0-116.5-53.1-116.5-118.6 c0-7.3,0.8-14.4,2-21.2c45.4,32.2,108.2,27.7,148.6-13.7l82.4-83.8V421.2z"/><path fill="#8ABF42" d="M181.9,436.1c-56.1,0-101.6,46.5-101.6,103.8c0,57.1,45.6,103.5,101.6,103.5c56.2,0,101.7-46.4,101.7-103.5 v-4.5v-99.3H182.1H181.9z"/><path fill="#FFF" d="M298.2,421.2l79.2,80.8l3.3,2.9c45.2,46.4,45.5,121.8,0,168.1c-45.6,46.3-119.2,46.3-164.8,0 c-45.4-46.3-45.4-121.5,0-168L298.2,421.2z"/><path fill="#8ABF42" d="M226.5,515.6c-39.8,40.5-39.8,106.2,0,146.6c39.6,40.5,104,40.5,143.8,0c39.6-40.4,39.6-106.1,0-146.6 l-3.3-3l-68.7-70.2l-71.7,73.1V515.6z"/><path fill="#FFF" d="M298.2,421.2h112.2l4.1-0.2c64.4,0,116.5,53.2,116.5,118.8c0,65.6-52,118.6-116.3,118.6 c-64.3,0-116.5-53.1-116.5-118.6V421.2z"/><path fill="#8ABF42" d="M313.1,539.8c0,57.3,45.4,103.7,101.6,103.7c56,0,101.4-46.4,101.4-103.7c0-57.3-45.4-103.6-101.4-103.6 h-4.3h-97.4v103.3V539.8z"/><path fill="#FFF" d="M298.2,421.2l79.2-80.9l3.1-3.1c45.4-46.3,119.2-46.5,164.6-0.2c45.4,46.4,45.4,121.5,0,167.9 c-45.4,46.4-119.2,46.4-164.6,0L298.2,421.2z"/><path fill="#8ABF42" d="M391.1,494.3c39.4,40.6,103.8,40.6,143.6,0c39.8-40.4,39.8-106,0-146.5c-39.8-40.5-104.1-40.5-143.6,0 l-3.3,3.2l-68.6,70.3l71.5,73L391.1,494.3z"/><path fill="#FFF" d="M298.2,421.2V306.8v-4.3c0-65.5,51.9-118.8,116.5-118.8c64.2,0,116.1,52.9,116.1,118.6 c0,65.6-52,118.8-116.1,118.8H298.2z"/><path fill="#F89F31" d="M414.7,406.1c56,0,101.4-46.4,101.4-103.7c0-57.1-45.4-103.6-101.4-103.6c-56.3,0-101.8,46.5-101.8,103.6 l0.2,4.4v99.3h101.1H414.7z"/><path fill="#FFF" d="M298.2,421.2L219,340.3l-3.1-2.9c-45.4-46.5-45.4-121.8,0-168.1c45.2-46.4,119.1-46.4,164.6,0 c45.4,46.3,45.4,121.6,0,167.9L298.2,421.2z"/><path fill="#0080C5" d="M370.1,327.6c39.6-40.5,39.6-106.2,0-146.6c-39.8-40.5-104-40.5-143.7,0c-39.8,40.4-39.8,106.1,0,146.6 l2.9,3.1l69,70.1l71.6-73L370.1,327.6z"/><path fill="#FFF" d="M298.2,422.1H186.1l-4.2,0.1c-64.1,0-116.5-53.2-116.5-118.8c0-65.5,52.2-118.7,116.3-118.7 c64.3,0,116.6,53.2,116.6,118.8V422.1z"/><path fill="#0080C5" d="M283.5,303.5c0-57.3-45.4-103.6-101.8-103.6c-56,0-101.6,46.3-101.6,103.5c0,57.2,45.6,103.7,101.6,103.7 l4.4-0.1h97.4V303.8V303.5z"/><path fill="#FFF" d="M298.2,422.1l-281,0.1c0-30.4,11.2-60.8,34.2-84c45.2-46.3,119-46.3,164.4,0L298.2,422.1z"/><path fill="#0080C5" d="M205.4,348.9l71.9,73.3h-95.5c-51.6,0-95.5,34.3-110.7,81.9c-3.1-2.7-6.4-5.5-9.3-8.7 c-39.8-40.5-39.8-106,0-146.5C101.3,308.4,165.8,308.4,205.4,348.9"/><path fill="#005DA9" d="M205.6,349l56.9,58l-80.9,0.2c-46.6,0-85.8-31.9-97.8-75.5c38.6-22.1,89.2-16.8,121.6,17.1L205.6,349z"/><path fill="#005DA9" d="M283.5,303.7l-0.1,82.1l-57.1-58.2c-32.9-33.6-38.7-84.4-17-123.8c42.7,12.2,74.2,52.2,74.2,99.8V303.7z"/><path fill="#005DA9" d="M312.6,386v-82.4c0-47.5,31.5-87.5,74.2-99.8c21.6,39.5,17.6,89-16.4,123.3L312.6,386z"/><path fill="#FFDE4F" d="M333.9,406.1l57.1-58.3c32.9-33.6,82.8-39.3,121.4-17.2c-12.2,43.5-49.4,74.8-95.3,75.6L333.9,406.1z"/><path fill="#48A64A" d="M333.8,436.1h80.8c46.6,0,85.8,31.7,97.8,75.4c-38.9,22.2-88.7,16.3-121.8-17.2L333.8,436.1z"/><path fill="#48A64A" d="M313.1,539.2v-82l57.2,58.2c32.9,33.7,38.5,84.7,16.8,124.1c-42.7-12.2-74-52.4-74-99.9V539.2z"/><path fill="#48A64A" d="M226.6,515.4l56.9-58l0.1,82.4c0,47.5-31.3,87.4-74,99.7c-21.6-39.5-15.8-90.4,17-123.9V515.4z"/><path fill="#48A64A" d="M182.4,436.1h80.4l-57,58.2c-32.8,33.5-83.1,39.3-121.7,17.3c12.1-43.7,51.4-75.5,98-75.5H182.4z"/></svg>

After

Width:  |  Height:  |  Size: 3.9 KiB

View File

@@ -0,0 +1,25 @@
/*!
* @license
* Copyright © 2005-2024 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 { Component } from '@angular/core';
@Component({
selector: 'adf-alfresco-icon',
standalone: true,
templateUrl: './alfresco-icon-component.svg'
})
export class AlfrescoIconComponent {}

View File

@@ -45,6 +45,7 @@ import { NodeCommentsComponent } from './node-comments';
import { AlfrescoViewerComponent } from './viewer';
import { ContentTypeDialogComponent } from './content-type';
import { MaterialModule } from './material.module';
import { AlfrescoIconComponent } from './alfresco-icon/alfresco-icon.component';
@NgModule({
imports: [
@@ -72,7 +73,8 @@ import { MaterialModule } from './material.module';
TreeComponent,
AlfrescoViewerComponent,
CategoriesManagementComponent,
NewVersionUploaderDialogComponent
NewVersionUploaderDialogComponent,
AlfrescoIconComponent
],
providers: [provideTranslations('adf-content-services', 'assets/adf-content-services')],
exports: [
@@ -98,7 +100,8 @@ import { MaterialModule } from './material.module';
TreeComponent,
AlfrescoViewerComponent,
CategoriesManagementComponent,
NewVersionUploaderDialogComponent
NewVersionUploaderDialogComponent,
AlfrescoIconComponent
]
})
export class ContentModule {

View File

@@ -15,6 +15,7 @@
* limitations under the License.
*/
export * from './lib/alfresco-icon/alfresco-icon.component';
export * from './lib/directives/index';
export * from './lib/tag/index';
export * from './lib/document-list/index';

View File

@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="Слой_1" x="0" y="0" enable-background="new 17.2 134.6 562 573.1" version="1.1" viewBox="17.2 134.6 562 573.1" xml:space="preserve"><path fill="#FFF" d="M298.2,421.3L219,340.4l-2.9-2.9c-45.4-46.5-119.5-46.5-164.7-0.2c-45.6,46.3-45.6,121.5,0,167.8 c45.2,46.4,119,46.4,164.4,0L298.2,421.3z"/><path fill="#FFF" d="M298.2,421.2v114.3l0.2,4.2c0,65.5-52.2,119-116.5,119c-64.3,0-116.5-53.1-116.5-118.6 c0-65.6,52.4-118.8,116.5-118.8H298.2z"/><path fill="#FFF" d="M298.2,421.2v114.3l0.2,4.2c0,65.5-52.2,119-116.5,119c-64.3,0-116.5-53.1-116.5-118.6 c0-65.6,52.4-118.8,116.5-118.8H298.2z"/><path fill="#FFF" d="M298.2,421.2v114.3l0.2,4.2c0,65.5-52.2,119-116.5,119c-64.3,0-116.5-53.1-116.5-118.6 c0-7.3,0.8-14.4,2-21.2c45.4,32.2,108.2,27.7,148.6-13.7l82.4-83.8V421.2z"/><path fill="#8ABF42" d="M181.9,436.1c-56.1,0-101.6,46.5-101.6,103.8c0,57.1,45.6,103.5,101.6,103.5c56.2,0,101.7-46.4,101.7-103.5 v-4.5v-99.3H182.1H181.9z"/><path fill="#FFF" d="M298.2,421.2l79.2,80.8l3.3,2.9c45.2,46.4,45.5,121.8,0,168.1c-45.6,46.3-119.2,46.3-164.8,0 c-45.4-46.3-45.4-121.5,0-168L298.2,421.2z"/><path fill="#8ABF42" d="M226.5,515.6c-39.8,40.5-39.8,106.2,0,146.6c39.6,40.5,104,40.5,143.8,0c39.6-40.4,39.6-106.1,0-146.6 l-3.3-3l-68.7-70.2l-71.7,73.1V515.6z"/><path fill="#FFF" d="M298.2,421.2h112.2l4.1-0.2c64.4,0,116.5,53.2,116.5,118.8c0,65.6-52,118.6-116.3,118.6 c-64.3,0-116.5-53.1-116.5-118.6V421.2z"/><path fill="#8ABF42" d="M313.1,539.8c0,57.3,45.4,103.7,101.6,103.7c56,0,101.4-46.4,101.4-103.7c0-57.3-45.4-103.6-101.4-103.6 h-4.3h-97.4v103.3V539.8z"/><path fill="#FFF" d="M298.2,421.2l79.2-80.9l3.1-3.1c45.4-46.3,119.2-46.5,164.6-0.2c45.4,46.4,45.4,121.5,0,167.9 c-45.4,46.4-119.2,46.4-164.6,0L298.2,421.2z"/><path fill="#8ABF42" d="M391.1,494.3c39.4,40.6,103.8,40.6,143.6,0c39.8-40.4,39.8-106,0-146.5c-39.8-40.5-104.1-40.5-143.6,0 l-3.3,3.2l-68.6,70.3l71.5,73L391.1,494.3z"/><path fill="#FFF" d="M298.2,421.2V306.8v-4.3c0-65.5,51.9-118.8,116.5-118.8c64.2,0,116.1,52.9,116.1,118.6 c0,65.6-52,118.8-116.1,118.8H298.2z"/><path fill="#F89F31" d="M414.7,406.1c56,0,101.4-46.4,101.4-103.7c0-57.1-45.4-103.6-101.4-103.6c-56.3,0-101.8,46.5-101.8,103.6 l0.2,4.4v99.3h101.1H414.7z"/><path fill="#FFF" d="M298.2,421.2L219,340.3l-3.1-2.9c-45.4-46.5-45.4-121.8,0-168.1c45.2-46.4,119.1-46.4,164.6,0 c45.4,46.3,45.4,121.6,0,167.9L298.2,421.2z"/><path fill="#0080C5" d="M370.1,327.6c39.6-40.5,39.6-106.2,0-146.6c-39.8-40.5-104-40.5-143.7,0c-39.8,40.4-39.8,106.1,0,146.6 l2.9,3.1l69,70.1l71.6-73L370.1,327.6z"/><path fill="#FFF" d="M298.2,422.1H186.1l-4.2,0.1c-64.1,0-116.5-53.2-116.5-118.8c0-65.5,52.2-118.7,116.3-118.7 c64.3,0,116.6,53.2,116.6,118.8V422.1z"/><path fill="#0080C5" d="M283.5,303.5c0-57.3-45.4-103.6-101.8-103.6c-56,0-101.6,46.3-101.6,103.5c0,57.2,45.6,103.7,101.6,103.7 l4.4-0.1h97.4V303.8V303.5z"/><path fill="#FFF" d="M298.2,422.1l-281,0.1c0-30.4,11.2-60.8,34.2-84c45.2-46.3,119-46.3,164.4,0L298.2,422.1z"/><path fill="#0080C5" d="M205.4,348.9l71.9,73.3h-95.5c-51.6,0-95.5,34.3-110.7,81.9c-3.1-2.7-6.4-5.5-9.3-8.7 c-39.8-40.5-39.8-106,0-146.5C101.3,308.4,165.8,308.4,205.4,348.9"/><path fill="#005DA9" d="M205.6,349l56.9,58l-80.9,0.2c-46.6,0-85.8-31.9-97.8-75.5c38.6-22.1,89.2-16.8,121.6,17.1L205.6,349z"/><path fill="#005DA9" d="M283.5,303.7l-0.1,82.1l-57.1-58.2c-32.9-33.6-38.7-84.4-17-123.8c42.7,12.2,74.2,52.2,74.2,99.8V303.7z"/><path fill="#005DA9" d="M312.6,386v-82.4c0-47.5,31.5-87.5,74.2-99.8c21.6,39.5,17.6,89-16.4,123.3L312.6,386z"/><path fill="#FFDE4F" d="M333.9,406.1l57.1-58.3c32.9-33.6,82.8-39.3,121.4-17.2c-12.2,43.5-49.4,74.8-95.3,75.6L333.9,406.1z"/><path fill="#48A64A" d="M333.8,436.1h80.8c46.6,0,85.8,31.7,97.8,75.4c-38.9,22.2-88.7,16.3-121.8-17.2L333.8,436.1z"/><path fill="#48A64A" d="M313.1,539.2v-82l57.2,58.2c32.9,33.7,38.5,84.7,16.8,124.1c-42.7-12.2-74-52.4-74-99.9V539.2z"/><path fill="#48A64A" d="M226.6,515.4l56.9-58l0.1,82.4c0,47.5-31.3,87.4-74,99.7c-21.6-39.5-15.8-90.4,17-123.9V515.4z"/><path fill="#48A64A" d="M182.4,436.1h80.4l-57,58.2c-32.8,33.5-83.1,39.3-121.7,17.3c12.1-43.7,51.4-75.5,98-75.5H182.4z"/></svg>

Before

Width:  |  Height:  |  Size: 4.0 KiB

View File

@@ -70,7 +70,7 @@
<span>{{ 'ADF_CLOUD_FORM_COMPONENT.RETRIEVE_METADATA' | translate }}</span>
</button>
<button *ngIf="!field.readOnly && displayMenuOption('remove')"
id="{{'file-'+element?.id+'-remove-file'}}" mat-menu-item
mat-menu-item
[id]="'file-'+element?.id+'-remove'"
(click)="onRemoveAttachFile(element);" (keyup.enter)="onRemoveAttachFile(element);">
<mat-icon class="mat-24">highlight_off</mat-icon>

View File

@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="Слой_1" x="0" y="0" enable-background="new 17.2 134.6 562 573.1" version="1.1" viewBox="17.2 134.6 562 573.1" xml:space="preserve"><path fill="#FFF" d="M298.2,421.3L219,340.4l-2.9-2.9c-45.4-46.5-119.5-46.5-164.7-0.2c-45.6,46.3-45.6,121.5,0,167.8 c45.2,46.4,119,46.4,164.4,0L298.2,421.3z"/><path fill="#FFF" d="M298.2,421.2v114.3l0.2,4.2c0,65.5-52.2,119-116.5,119c-64.3,0-116.5-53.1-116.5-118.6 c0-65.6,52.4-118.8,116.5-118.8H298.2z"/><path fill="#FFF" d="M298.2,421.2v114.3l0.2,4.2c0,65.5-52.2,119-116.5,119c-64.3,0-116.5-53.1-116.5-118.6 c0-65.6,52.4-118.8,116.5-118.8H298.2z"/><path fill="#FFF" d="M298.2,421.2v114.3l0.2,4.2c0,65.5-52.2,119-116.5,119c-64.3,0-116.5-53.1-116.5-118.6 c0-7.3,0.8-14.4,2-21.2c45.4,32.2,108.2,27.7,148.6-13.7l82.4-83.8V421.2z"/><path fill="#8ABF42" d="M181.9,436.1c-56.1,0-101.6,46.5-101.6,103.8c0,57.1,45.6,103.5,101.6,103.5c56.2,0,101.7-46.4,101.7-103.5 v-4.5v-99.3H182.1H181.9z"/><path fill="#FFF" d="M298.2,421.2l79.2,80.8l3.3,2.9c45.2,46.4,45.5,121.8,0,168.1c-45.6,46.3-119.2,46.3-164.8,0 c-45.4-46.3-45.4-121.5,0-168L298.2,421.2z"/><path fill="#8ABF42" d="M226.5,515.6c-39.8,40.5-39.8,106.2,0,146.6c39.6,40.5,104,40.5,143.8,0c39.6-40.4,39.6-106.1,0-146.6 l-3.3-3l-68.7-70.2l-71.7,73.1V515.6z"/><path fill="#FFF" d="M298.2,421.2h112.2l4.1-0.2c64.4,0,116.5,53.2,116.5,118.8c0,65.6-52,118.6-116.3,118.6 c-64.3,0-116.5-53.1-116.5-118.6V421.2z"/><path fill="#8ABF42" d="M313.1,539.8c0,57.3,45.4,103.7,101.6,103.7c56,0,101.4-46.4,101.4-103.7c0-57.3-45.4-103.6-101.4-103.6 h-4.3h-97.4v103.3V539.8z"/><path fill="#FFF" d="M298.2,421.2l79.2-80.9l3.1-3.1c45.4-46.3,119.2-46.5,164.6-0.2c45.4,46.4,45.4,121.5,0,167.9 c-45.4,46.4-119.2,46.4-164.6,0L298.2,421.2z"/><path fill="#8ABF42" d="M391.1,494.3c39.4,40.6,103.8,40.6,143.6,0c39.8-40.4,39.8-106,0-146.5c-39.8-40.5-104.1-40.5-143.6,0 l-3.3,3.2l-68.6,70.3l71.5,73L391.1,494.3z"/><path fill="#FFF" d="M298.2,421.2V306.8v-4.3c0-65.5,51.9-118.8,116.5-118.8c64.2,0,116.1,52.9,116.1,118.6 c0,65.6-52,118.8-116.1,118.8H298.2z"/><path fill="#F89F31" d="M414.7,406.1c56,0,101.4-46.4,101.4-103.7c0-57.1-45.4-103.6-101.4-103.6c-56.3,0-101.8,46.5-101.8,103.6 l0.2,4.4v99.3h101.1H414.7z"/><path fill="#FFF" d="M298.2,421.2L219,340.3l-3.1-2.9c-45.4-46.5-45.4-121.8,0-168.1c45.2-46.4,119.1-46.4,164.6,0 c45.4,46.3,45.4,121.6,0,167.9L298.2,421.2z"/><path fill="#0080C5" d="M370.1,327.6c39.6-40.5,39.6-106.2,0-146.6c-39.8-40.5-104-40.5-143.7,0c-39.8,40.4-39.8,106.1,0,146.6 l2.9,3.1l69,70.1l71.6-73L370.1,327.6z"/><path fill="#FFF" d="M298.2,422.1H186.1l-4.2,0.1c-64.1,0-116.5-53.2-116.5-118.8c0-65.5,52.2-118.7,116.3-118.7 c64.3,0,116.6,53.2,116.6,118.8V422.1z"/><path fill="#0080C5" d="M283.5,303.5c0-57.3-45.4-103.6-101.8-103.6c-56,0-101.6,46.3-101.6,103.5c0,57.2,45.6,103.7,101.6,103.7 l4.4-0.1h97.4V303.8V303.5z"/><path fill="#FFF" d="M298.2,422.1l-281,0.1c0-30.4,11.2-60.8,34.2-84c45.2-46.3,119-46.3,164.4,0L298.2,422.1z"/><path fill="#0080C5" d="M205.4,348.9l71.9,73.3h-95.5c-51.6,0-95.5,34.3-110.7,81.9c-3.1-2.7-6.4-5.5-9.3-8.7 c-39.8-40.5-39.8-106,0-146.5C101.3,308.4,165.8,308.4,205.4,348.9"/><path fill="#005DA9" d="M205.6,349l56.9,58l-80.9,0.2c-46.6,0-85.8-31.9-97.8-75.5c38.6-22.1,89.2-16.8,121.6,17.1L205.6,349z"/><path fill="#005DA9" d="M283.5,303.7l-0.1,82.1l-57.1-58.2c-32.9-33.6-38.7-84.4-17-123.8c42.7,12.2,74.2,52.2,74.2,99.8V303.7z"/><path fill="#005DA9" d="M312.6,386v-82.4c0-47.5,31.5-87.5,74.2-99.8c21.6,39.5,17.6,89-16.4,123.3L312.6,386z"/><path fill="#FFDE4F" d="M333.9,406.1l57.1-58.3c32.9-33.6,82.8-39.3,121.4-17.2c-12.2,43.5-49.4,74.8-95.3,75.6L333.9,406.1z"/><path fill="#48A64A" d="M333.8,436.1h80.8c46.6,0,85.8,31.7,97.8,75.4c-38.9,22.2-88.7,16.3-121.8-17.2L333.8,436.1z"/><path fill="#48A64A" d="M313.1,539.2v-82l57.2,58.2c32.9,33.7,38.5,84.7,16.8,124.1c-42.7-12.2-74-52.4-74-99.9V539.2z"/><path fill="#48A64A" d="M226.6,515.4l56.9-58l0.1,82.4c0,47.5-31.3,87.4-74,99.7c-21.6-39.5-15.8-90.4,17-123.9V515.4z"/><path fill="#48A64A" d="M182.4,436.1h80.4l-57,58.2c-32.8,33.5-83.1,39.3-121.7,17.3c12.1-43.7,51.4-75.5,98-75.5H182.4z"/></svg>

Before

Width:  |  Height:  |  Size: 4.0 KiB

View File

@@ -12,9 +12,9 @@
</a>
</div>
<div class="adf-attach-widget__menu-upload" (focusout)="markAsTouched()" *ngIf="isUploadButtonVisible() && isMultipleSourceUpload()">
<button mat-raised-button color="primary" [matMenuTriggerFor]="menu" [id]="field.id" class="adf-attach-widget__menu-trigger">
{{ 'FORM.FIELD.UPLOAD' | translate }}
<button mat-raised-button color="primary" [matMenuTriggerFor]="menu" [id]="field.id">
<mat-icon>attach_file</mat-icon>
{{ 'FORM.FIELD.UPLOAD' | translate }}
</button>
<mat-menu #menu="matMenu" class="adf-attach-widget__menu-content">
<button mat-menu-item (click)="uploadFile.click()" id="attach-local-file" *ngIf="isAllFileSourceSelected()">
@@ -35,17 +35,17 @@
id="attach-{{ field.params?.fileSource?.name }}"
(click)="openSelectDialogFromFileSource()"
>
{{ field.params?.fileSource?.name }}
<mat-icon>
<img alt="alfresco" class="adf-attach-widget__image-logo" src="../../../assets/images/alfresco-flower.svg" />
<adf-alfresco-icon></adf-alfresco-icon>
</mat-icon>
{{ field.params?.fileSource?.name }}
</button>
<div *ngIf="!isDefinedSourceFolder()">
<button mat-menu-item *ngFor="let repo of repositoryList" id="attach-{{ repo?.name }}" (click)="openSelectDialog(repo)">
{{ repo.name }}
<mat-icon>
<img alt="alfresco" class="adf-attach-widget__image-logo" src="../../../assets/images/alfresco-flower.svg" />
<adf-alfresco-icon></adf-alfresco-icon>
</mat-icon>
{{ repo.name }}
</button>
</div>
</mat-menu>
@@ -56,7 +56,8 @@
<div data-automation-id="adf-attach-widget-readonly-list">
<mat-list *ngIf="hasFile">
<mat-list-item class="adf-attach-files-row" *ngFor="let file of field.value; index as i">
<img matListItemLine class="adf-attach-widget__icon"
<mat-icon matListItemIcon>
<img class="adf-attach-widget__icon"
[id]="'file-'+file.id+'-icon'"
[src]="file.content ? getIcon(file.content.mimeType) : getIcon(file.mimeType)"
[alt]="mimeTypeIcon"
@@ -64,12 +65,21 @@
(keyup.enter)="onAttachFileClicked(file)"
[attr.aria-label]="file.name"
[tabindex]="i"/>
<span matLine id="{{'file-'+file.id}}" (click)="onAttachFileClicked(file)" [title]="file.name" (keyup.enter)="onAttachFileClicked(file)"
[tabindex]="i" class="adf-file">{{file.name}}</span>
</mat-icon>
<div matListItemLine class="adf-attach-widget__label">
<span id="{{'file-'+file.id}}"
(click)="onAttachFileClicked(file)"
[title]="file.name"
(keyup.enter)="onAttachFileClicked(file)"
[tabindex]="i" class="adf-file">
{{file.name}}
</span>
<button id="{{'file-'+file.id+'-option-menu'}}" mat-icon-button [matMenuTriggerFor]="fileActionMenu"
[attr.aria-label]="'ADF_PROCESS_LIST.DETAILS.BUTTON.FILE_OPTION_MENU' | translate">
<mat-icon>more_vert</mat-icon>
</button>
</div>
<mat-menu #fileActionMenu="matMenu" xPosition="before">
<button
id="{{ 'file-' + file.id + '-show-file' }}"
@@ -91,7 +101,6 @@
</button>
<button
*ngIf="!field.readOnly"
id="{{ 'file-' + file.id + '-remove-file' }}"
mat-menu-item
[id]="'file-' + file.id + '-remove'"
(click)="onRemoveAttachFile(file)"

View File

@@ -1,6 +1,3 @@
@import 'styles/flex';
@import 'styles/mat-selectors';
.adf {
&-attach-widget-container {
margin-bottom: 15px;
@@ -19,21 +16,6 @@
}
}
&-attach-widget__menu-upload {
display: flex;
align-items: center;
}
&-attach-widget__menu-trigger {
display: flex;
flex-direction: row-reverse;
#{$mat-icon} {
margin-left: 4px;
margin-right: 0;
}
}
&-attach-widget__input-type {
width: 0.1px;
height: 0.1px;
@@ -43,22 +25,6 @@
z-index: -1;
}
&-attach-widget__image-logo {
padding-left: 5px;
}
&-attach-widget-repo-button {
padding-left: 10px;
#{$mat-button-label} {
display: inline;
}
#{$mat-mini-fab}#{$mat-accent} {
background-color: inherit;
}
}
&-attach-widget {
width: 100%;
word-break: break-all;
@@ -67,28 +33,16 @@
}
&-attach-widget__icon {
padding: 17px 6px;
float: left;
cursor: pointer;
}
&-attach-widget__reset {
margin-top: -2px;
}
&-attach-widget__label {
display: flex;
align-items: center;
cursor: pointer;
&-attach-files-row {
#{$mat-line} {
margin-bottom: 0;
}
#{$mat-list-item-primary-text} {
max-width: 200px;
}
@include layout-bp(lt-md) {
#{$mat-list-item-primary-text} {
max-width: 150px;
}
&:hover {
text-decoration: underline;
}
}
}

View File

@@ -19,7 +19,7 @@
import { Component, isDevMode, OnDestroy, OnInit, ViewEncapsulation } from '@angular/core';
import { AppConfigService, AppConfigValues, DownloadService, ErrorWidgetComponent, FormService, ThumbnailService } from '@alfresco/adf-core';
import { ContentNodeDialogService, ContentService } from '@alfresco/adf-content-services';
import { AlfrescoIconComponent, ContentNodeDialogService, ContentService } from '@alfresco/adf-content-services';
import { AlfrescoEndpointRepresentation, Node, NodeChildAssociation, RelatedContentRepresentation } from '@alfresco/js-api';
import { from, of, Subject, zip } from 'rxjs';
import { mergeMap, takeUntil } from 'rxjs/operators';
@@ -37,7 +37,16 @@ import { MatListModule } from '@angular/material/list';
@Component({
selector: 'attach-widget',
standalone: true,
imports: [CommonModule, TranslateModule, MatIconModule, MatButtonModule, MatMenuModule, MatListModule, ErrorWidgetComponent],
imports: [
CommonModule,
TranslateModule,
MatIconModule,
MatButtonModule,
MatMenuModule,
MatListModule,
ErrorWidgetComponent,
AlfrescoIconComponent
],
templateUrl: './attach-file-widget.component.html',
styleUrls: ['./attach-file-widget.component.scss'],
host: {

View File

@@ -22,7 +22,6 @@ import { TestElement } from '../../../test-element';
import { materialLocators } from '../../public-api';
export class AttachFileWidgetPage {
formFields = new FormFields();
alfrescoTypeUploadLocator = 'button[id="attachfile"]';
localStorageButton = $('input[id="attachfile"]');
@@ -165,6 +164,6 @@ export class AttachFileWidgetPage {
private async getFileAttachedNotAttachedLocator(fieldId: string, name: string) {
const widget = await this.formFields.getWidget(fieldId);
return widget.$(this.filesListLocator).element(by.cssContainingText(`${materialLocators.List.item.root} span span span`, name));
return widget.$(this.filesListLocator).element(by.cssContainingText(`.adf-attach-widget__label span`, name));
}
}