[AAE-19177] - Migration to NG15 - this one for real 👯 (#9088)

* Fixed linting

* Fixed storybook with migration to WP5

* Fixed core unit test and excluded instable ones

* Rebased with the latest develop

* Fixed most of unit tests failing

* Fixed prod build

* Fixed linting and js-api tests

* Fixed unit tests

* Fixed last unit tests

* Fixed js-api build

* Attempt to fix the e2e run'

* Fixing e2e part 2

* Fixing styles not migrated by material

* Fixed unit test failing

* E2E - fixing

* Fixing unit after rebase

* Fixing e2e - part III

* Rebase went little bit wrong -II

* Rebase went little bit wrong -III

* Fixing e2e - changing toggles

* Fixed code flow switch setting

* wrong xdescribe

* fixig e2es

* fixig e2es - task and version

* readded missing dep

* Fixed slider search e2es

* rebased and fixed the wrong directive for matList'

* fixed unit test problem and some other e2e

* Fixed search e2es

* Rebased to latest

* Fixed the last e2es?

* reverted broken rebase

* Fixed unit tests after rebase

* Fixed unit tests after rebase

* Honestly i'm going on just for the challenge now'

* Readded method removed

* Fixed pointless e2e

* Fixed unit test

* [AAE-18267] change unit test setup for auth service (#9216)

* [AAE-18267] change unit test setup for auth service

* [AAE-18267] remove exclude

* [AAE-18267] removed CoreTestingModule from imports

* unit test fixes for migration (#9217)

* reenabled excluded test in TagNodeList

* fixed tests for UploadApi in js-api

* Fixed a dependency problem

* remaining unit test fixes for the Angular 15 update (#9218)

* removing excludes from working tests

* test fixes for CategoriesManagementComponent

* [ci:force] reenabling tests / fixes

* fixes in process-services-cloud

* change html element type

* fix selector in StartProcessComponent

* Revert "Fixed a dependency problem"

This reverts commit 319e1830fe.

* Rebased to latest

* Fixed PR after huge rebase -_-

* Fixed lint files and exclude some needing migration

* Fixed package.json

* Fixed dependency to allow greater versions

* Rebased to the latest

* [affected:*][ci:force] Fixing rebase

* [affected:*][ci:force] Fixing rebase

* [affected:*][ci:force] Fixing rebase

* [affected:*][ci:force] Wrong setting page

* [affected:*][ci:force] Upgrading material selector class

* [affected:*][ci:force] Fixed lint

* [affected:*][ci:force] Fixed lint

* [affected:*][ci:force] Fixed e2e with new notation

* [affected:*][ci:force] Fixed e2e with new notation

* [affected:*][ci:force] Fixed e2e with new notation

* [affected:*][ci:force] [AAE-21070] Fix e2e Content: Components - C587084 - fix class selectors

* [affected:*][ci:force] Fixed lint after error on important

* Improvement/AAE-19176-reapply-selector-changes (#9424)

* AAE-19510 remove selector variable

* AAE-19510 poc for card view using variable selectors

* AAE-19176 rename mat selectors file

* AAE-19176 add missing style imports

* AAE-19176 remove remaining mat selectors

* AAE-19176 replaced todo material selectors with variables

* AAE-19176 changes made in meantime

* AAE-19176 conflict fixes

* [AAE-21083] Fix e2e Content: Metadata - C245652 - fix tab active selector

* Fix selector after merging https://github.com/Alfresco/alfresco-ng2-components/pull/9424, .mat-content-actions was replaced by .adf-start-process-content-actions

* Fix lint issue

* [AAE-21083] Fix e2e Content: Metadata - C280560 - fix slide toggle click, in v15 toggle is handled with a button instead of input

* [affected:*][ci:force] Fixed check on expansion panel filter

* [affected:*][ci:force] Fixed check on expansion panel filter

* [affected:*][ci:force] Fixed other e2es

* [affected:*][ci:force] Fixing e2e - the long painful journey

* [affected:*][ci:force] Fixing e2e - the long painful journey - part II

* [AAE-21084] Fix e2e Content: Upload and Versioning - C279992 - fix enable togle selector

* [AAE-21085] Fix e2e Search - revert to previous version, text should be written without pressing eneter to show the autocomplete list items

* [AAE-21085] Fix e2e Search - add content selector that wrap text

* [affected:*][ci:force] Fixing e2e - the lord of E2E

* [AAE-21089] Fix e2e Search - fix checkbox selector

* [affected:*][ci:force] Fixing e2e - the lord of E2E

* [affected:*][ci:force] Fixing e2e - the return of the fail

* [affected:*][ci:force] Fixing e2e - the return of the fail

* [affected:*][ci:force] Fixing e2e - the eternal fail

* [affected:*][ci:force] Remove fit

* [affected:*][ci:force] Fixing e2e - fixing the last ones

* [affected:*][ci:force] attempt to fix mat-selectors importing

* [affected:*][ci:force] Fixing the styles - check

* [affected:*][ci:force] Added pretheme for core as it is mandatory when publishing and rebuilding

* [affected:*][ci:force] - REBASED

* [ACS-7359] - Angular 15 - Edit aspects modal [ACA] (#9488)

* [affected:*][ci:force] - REBASED

* [affected:*][ci:force] - REBASED

* [affected:*][ci:force] - Rebased and added an extra fix for after

* [affected:*][ci:force] - Funny imports

* [ACS-7373] ng15 permissions page fixes

* [ACS-7373] mat-icon-buttons

* [ACS-7452] - Small screen notification banner [ACS-7418] About page (#9507)

* [ACS-7413] Dialog height and spacing issues (#9515)

* [ACS-7446] - Upload progress box issues

* [ACS-7414] - Manage versions dialog

* [ACS-7375] - Share link dialog issues

* Fixed errors on unit and lint

* Re Enabling unit test removed

* Fixing unit test after last rebase + lint

* Fixing unit test after last rebase + lint

* Fixing unit test after last rebase + lint

* [ACS-7419] Fix broken styling of notifications

* [ACS-7419] Fix broken styling of notifications, apply pr remarks

* [ACS-7419] Fix broken styling of notifications, apply pr remarks

* [ACS-7419] Fix broken styling of notifications, apply pr remarks

* Extra parentesys lint

* [ACS-7528] - Notification and user icons are a bit different (#9540)

* [ACS-7532] - Click on chip in search gives redundant icon (#9544)

* [ACS-7530] - Notifications popup looks a bit differently (#9543)

* [ACS-7414] - manage versions dialog (#9545)

* [ACS-7535][ACS-7537][ACS-7536][ACA] Move/Copy dialogs, Share dialog, Aspects dialog (#9553)

* AAE-21697 Fix people form widget style (#9555)

* [affected:*][ci:force] - Rebased

* [affected:*][ci:force] - Fixed problem after rebase

* [ACS-7519] - Login page (#9565)

* [ACS-7331] - View details sidebar (#9455)

* [ACS-7542] - Upload new version dialog (#9572)

* [ACS-7542] - Upload new version dialog

* [ACS-7542] - Upload new version dialog

* [ACS-7575] create library dialog fixes (#9574)

* [ACS-7534] create/edit folder dialog fixes (#9575)

* Rebased ADF Migration PR

* Rebased ADF Migration PR

* Sync lock

* [ACS-7681] Bell icon not aligned [ACS-7571] Comments [ACS-7563] Add permission dialog (#9594)

* [ACS-7554] Fix tags in column display (#9597)

* Fixed unit test

* AAE-21256 Fix form widget styles (#9599)

* [ACS-7555] column filters (#9576)

* Changed ng version before material migration

* migration for material'

* Upgrading NX and start fixing styles

* Make all the part build

* Fixed core unit test and excluded instable ones

* Fixed most of unit tests failing

* Fixed unit tests

* Fixed last unit tests

* fixed unit test problem and some other e2e

* Fixed unit tests after rebase

* [AAE-18267] change unit test setup for auth service (#9216)

* [AAE-18267] change unit test setup for auth service

* [AAE-18267] remove exclude

* [AAE-18267] removed CoreTestingModule from imports

* remaining unit test fixes for the Angular 15 update (#9218)

* removing excludes from working tests

* test fixes for CategoriesManagementComponent

* [ci:force] reenabling tests / fixes

* fixes in process-services-cloud

* change html element type

* fix selector in StartProcessComponent

* Fixing unit test after last rebase + lint

* ACS-7555 Fixed styles for node type filters

* ACS-7555 Removed redundant padding

* ACS-7555 Outlined input for text filter

* ACS-7555 Resolved conflicts

---------

Co-authored-by: Vito Albano <vito.albano@hyland.com>
Co-authored-by: Wojciech Duda <69160975+wojd0@users.noreply.github.com>

* AAE-21393 Fix amount form widget style (#9601)

* AAE-21392 Fix dropdown form widget style (#9605)

* [ACS-7582] Upload dialog button display fix (#9603)

* [ACS-7531] - Search page (#9606)

* rebased to last develop

* Fixed SonarCloud complaints

* Fixed SonarCloud complaints

* Fixing some sonarcloud comments

* [ACS-7572] link rules dialog fixes (#9607)

* AAE-21703 Fix group widget style (#9612)

* AAE-21703 Fix group form widget style

* AAE-21703 Improve tests

* [ACS-7533] - Advanced search chips dropdowns (#9618)

* [ACS-7560] undo deletion notification (#9632)

* ACS-7560 Fixed margin around snackbar and size of x icon

* ACS-7560 Fixed styles for info snackbar

* Rebased to the latest develop

* Rebased to the latest

* Skipped failing unit tests

* Updated today date selector

* rebased

* Fixed process unit test fail

* fix folder-edit license headers

* fix FolderEditDirective unit tests

* AAE-21937 Fix context menu list component (#9658)

* Fixed broken unit test after rebase

* ACS-7561 - permissions page (#9675)

* Trying to fix the long failing e2ea

* Missed import

* Fixed changed unit test

* Fixed property e2e

* Updated calendar selector

* [ACS-7768] unify inputs and selects across the app (#9687)

* Changed ng version before material migration

* migration for material'

* Fixed most of unit tests failing

* [affected:*][ci:force] Fixing rebase

* [affected:*][ci:force] attempt to fix mat-selectors importing

* [affected:*][ci:force] Fixing the styles - check

* AAE-21392 Fix dropdown form widget style (#9605)

* ACS-7768 Applied new styles for inputs

* ACS-7768 Align icon

* ACS-7768 Input colors based on input state

* ACS-7768 Corrected spaces

* ACS-7768 Styles for selectboxes

* ACS-7768 Fixed label jumping on hovering

* ACS-7768 Style inputs for add permission panel, user role column and comments, styles for inputs without label

* ACS-7768 Style inputs in search filters

* ACS-7768 Set appearance for inputs globally to outline

* ACS-7768 Style inputs for share dialog and login page

* ACS-7768 Style inputs in properties panel

* ACS-7768 Fixed white background when disabled field

* ACS-7768 Moved setting outline appearance for inputs to ACA, fix issue for inputs in permission container

* Revert "[affected:*][ci:force] Fixing the styles - check"

This reverts commit 80d971f7ab.

* Revert "[affected:*][ci:force] attempt to fix mat-selectors importing"

This reverts commit 821d9e1864.

* Revert "[affected:*][ci:force] Fixing rebase"

This reverts commit 378c6c2000.

* Revert "Fixed most of unit tests failing"

This reverts commit 44948e0a28.

* ACS-7768 Reverted unwanted changes

---------

Co-authored-by: Vito Albano <vito.albano@hyland.com>
Co-authored-by: Diogo Bastos <50139916+DiogoABastos@users.noreply.github.com>

* [ACS-7768] unify inputs and selects across the app - revert (#9699)

* Revert "[ACS-7768] unify inputs and selects across the app (#9687)"

This reverts commit 7cfb5ea64a.

* ACS-7768 Little correction

* [ACS-7998] - Add permissions input (#9704)

* [ACS-8004] Fix inputs for move folder (#9707)

* [ACS-7999] Fix inputs for edit and create folder (#9713)

* ACS-7999 Fix inputs for edit and create folder

* ACS-7999 Fix jumping dialog when focus field

* [ACS-7982] ACC - fix categories tree (#9715)

* Fixed after rebase

* Fixed package-lock

* Fixed after rebase

* Fixed unit test for process

* AAE-22783 Fix form elements label style (#9725)

* [ACS-8021] Inputs for comments (#9722)

* [ACS-8008] - Inputs for properties panel "General info" (#9744)

* [ACS-8052] Inputs for general info for libraries (#9745)

* [ACS-7983] Fixed security controls dialog (#9747)

* [ACS-8026] Fixed task form rendering (#9742)

* [ACS-8026] Fixed Task form rendering

* [ACS-8026] Fixed task form rendering

* [ACS-8042] Fixed styles for inputs in library creation (#9751)

* Added missing import for uppercase pipe (#9748)

* Recreated package-lock

* Fixed package and e2e with tabs that now are capital letters?

* Fixed package json

* Removed wrong version on core package

* Ehi Js-Api should be 7.8 NOT 7.9

* These dependencies will kill me

* [ACS-7981] UI fixes for create categories dialog (#9754)

* [ACS-7981] Fixed UI for create categories dialog

* [ACS-7981] Adding mat selectors for create categories dialog

* [ACS-7981] Create category dialog no longer allows ability to add existing categories

* [ACS-7974] Adding material selectors for assign security marks dialog (#9755)

* [ACS-7974] Fixed UI for assign security controls to user dialog

* [ACS-7974] Removing unneeded mat selector

* [ACS-8069] Updated error-content.component.html to be aligned with the new mat typography classes in angular material v15 (#9762)

* Added missing mat selector for mat-list-item-disabled (#9763)

* Fixed process unit test after huge rebase

* [ACS-8066] Style inputs for link rule dialog (#9773)

* Insight material module has been removed

* [ACS-7973] [ACC] header layout (#9782)

* [ACS-8096] Print button in the viewer does not open the print window (#9776) (#9778)

* [ACS-8066] Fixed unit tests (#9783)

* [ACS-8092] [ACA] testing angular 15 notifications bell is much smaller and is further from the profile page 2 (#9786)

* AAE 22837 Move confirm to core (#9750)

* confirm dialog is used in many places and should be part of the core

* fix

* Update confirm.dialog.spec.ts

* Update public-api.ts

* Fixed imports for confirm dialog unit tests

* Fixed linting for packages

* Removed -mdc as it's wrong for mat calendar

* [ACS-8098] [ACA] Testing Angular 15 - Move Popup placeholder missing (#9796)

* [ACS-7944] [ADW] Start process page (#9802)

* [ACS-8157] Used mat chip set instead of mat chip listbox for dynamic chip list to hide tick icon for chips (#9803)

* Fixed issue on focus mat calendar

* [ACS-7980] fix style (#9798)

* [ACS-7979] Fixed UI for create tags dialog (#9793)

* [ACS-7979] Fixed UI for create tags dialog. Minor UI fixes of create categories dialog as well

* [ACS-7979] Fixed unit tests

* [ACS-7979] Replaced dependency of CoreModule from tag.module.ts with TranslateModule and DynamicChipListModule

* [ACS-8158] Fixed spacing of tags in ACA (#9808)

* [ACS-8158] Fixed spacing of tags in ACA

* [ACS-8158] Fixed unit tests

* AAE-22965 fix datepicker focused element selector (#9814)

* [ACS-8212] Fixed alignment issue of filters button in sidenav (#9828)

* [ACS-8191] Added missing mat selectors for ACA. Updated mat selector name (#9809)

* [ACS-8191] Updated mat selector names

* [ACS-8191] Added missing mat selectors for ACA. Updated mat-selector names

* [ACS-8196] fix style for pagination (#9810)

* Removing implicitFlow in favor of codeFlow

* [ACS-8230] Fixed UI for snackbars with long text content and action buttons (#9830)

* [ACS-8231] [ADW] Processes button styling on hover- edit summary (#9833)

[ADW] Processes button styling on hover

* Revert "Removing implicitFlow in favor of codeFlow"

This reverts commit 58951a77b8.

* Fixed unit test after rebase

* Fixing unit test

* Disabled failing unit from content

* AAE-23287 migrate to storybook 8 (#9867)

* Fixed core unit test and excluded instable ones

* AAE-23287 migrate to storybook 8

---------

Co-authored-by: Vito Albano <vito.albano@hyland.com>

* Fixed unit and lint

* Fixing unit test and lint issues after merging with storybook latest

* Storybook still not working though

* Fixed missing locator for content e2e

* fix storybook exceeding timeout

* Fixed wrong package version

* AAE-23478 replace nav-list with action-list (#9875)

* [ACS-8272] [ADW] Testing Angular 15 - Misplaced buttons Cancel and Start process (#9869)

* [ACS-8273] [ADW] Testing Angular 15 - Process' tab names are uppercased (#9870)

* [ACS-8274] angular 15 description field in info drawer is truncated and scrollable (#9878)

* [ACS-8275] - [ACA] Testing Angular 15 - Tags are not displayed correctly (#9872)

* Fixing e2e tab label

* AAE-22858 Fix date button style (#9892)

* AAE-23556 Fix search text input component styles (#9895)

* Fixing unit test an builds

* Fixing style

* [ACS-8260] add user dialog misplaced search icon and space issue (#9897)

* [ACS-8275] [ACA] Angular 15 tags are not displayed correctly (#9896)

* [ACS-8322] Testing Angular 15 - Info Drawer - General info - Missing … (#9901)

* [ACS-8322] Testing Angular 15 - Info Drawer - General info - Missing arrow in Content type selector

* [ACS-8322] Testing Angular 15 - Info Drawer - General info - Missing arrow in Content type selector

* [AAE-23622] fixed buttons and chips (#9913)

* Aae 23572 recreate js api lib into a proper nx workspace lib bis (#9917)

* back to mocha, working in future node versions

* update package-lock

* change bundle to build

* update node to 18.20.3 [ci:force]

* fix e2es [ci:force]

* bring bundle back to fix e2e [ci:force]

* patch in legacy builds

* Updated package-lock

* Updated executor to new @nx

* Revert "Updated executor to new @nx"

This reverts commit a520ba3595.

* Improved ts config reverted changes on @nrwl

---------

Co-authored-by: Wojciech Duda <69160975+wojd0@users.noreply.github.com>

* Fixing target name for publishing js-api as it's not happening anymore

* fixed js-api publish command

* JS-api wasn't building correctly on publish

* Fixed naming for tests tab

* Fixed tabs name missed

* AAE-23704 Fixed outcome buttons text alignment (#9933)

* Thanks tooltip change

* Removing FIT :O

* Fixing build broken

* [ACS-8275] Testing Angular 15 - Tags are not displayed correctly (#9940)

* [ACS-8253] viewer file name change position on navigation (#9900)

* AAE-23783 Fixed feature flags dialog styles (#9945)

* Added styles include path to feature flags lib

* Fixed js-api version

---------

Co-authored-by: Wojciech Duda <69160975+wojd0@users.noreply.github.com>
Co-authored-by: Amedeo Lepore <amedeo.lepore85@gmail.com>
Co-authored-by: Amedeo Lepore <amedeo.lepore@hyland.com>
Co-authored-by: jacekpluta <73617938+jacekpluta@users.noreply.github.com>
Co-authored-by: Mykyta Maliarchuk <maliarchuk99@gmail.com>
Co-authored-by: tomson <tomasz.nastaly@hyland.com>
Co-authored-by: DominikIwanek <dominik.iwanek@hyland.com>
Co-authored-by: Jacek Pluta <jacek.pluta@hyland.com>
Co-authored-by: dominikiwanekhyland <141320833+dominikiwanekhyland@users.noreply.github.com>
Co-authored-by: Diogo Bastos <50139916+DiogoABastos@users.noreply.github.com>
Co-authored-by: Mykyta Maliarchuk <84377976+nikita-web-ua@users.noreply.github.com>
Co-authored-by: AleksanderSklorz <115619721+AleksanderSklorz@users.noreply.github.com>
Co-authored-by: Ehsan Rezaei <ehsan.rezaei@hyland.com>
Co-authored-by: swapnil-verma-gl <92505353+swapnil-verma-gl@users.noreply.github.com>
Co-authored-by: Eugenio Romano <eromano@users.noreply.github.com>
Co-authored-by: tamaragruszka <156320606+tamaragruszka@users.noreply.github.com>
Co-authored-by: tomasz hanaj <12088991+tomaszhanaj@users.noreply.github.com>
This commit is contained in:
Vito Albano
2024-07-19 09:27:15 +01:00
committed by GitHub
parent eda03ed525
commit 68ab2c67fd
536 changed files with 18952 additions and 32894 deletions

View File

@@ -8,7 +8,7 @@
<div *ngIf="isGrid()" class="adf-app-listgrid">
<div *ngFor="let app of appList"
class="adf-app-listgrid-item">
<mat-card tabindex="0"
<mat-card appearance="outlined" tabindex="0"
role="button"
class="adf-app-listgrid-item-card"
title="{{getAppName(app) | translate}}"

View File

@@ -1,4 +1,5 @@
@import 'styles/flex';
@import 'styles/mat-selectors';
/* stylelint-disable scss/no-global-function-names */
@mixin adf-line-clamp($line-height: 1.25, $lines: 3) {
@@ -48,7 +49,7 @@ $tile-themes: (
flex-direction: column;
height: 85vh;
.mat-spinner {
#{$mat-progress-spinner} {
margin: 0 auto;
}
}
@@ -61,7 +62,7 @@ $tile-themes: (
flex-flow: row wrap;
display: flex;
.adf-app-listgrid-item {
&-item {
outline: none;
padding: 8px;
box-sizing: border-box;
@@ -107,21 +108,21 @@ $tile-themes: (
transform: scale(1.015);
}
.adf-app-listgrid-item-card-logo {
&-logo {
position: absolute;
right: 20px;
top: 20px;
padding: 16px;
z-index: 9;
.adf-app-listgrid-item-card-logo-icon {
&-icon {
font-size: 70px;
width: 1em;
height: 1em;
}
}
.adf-app-listgrid-item-card-title {
&-title {
padding: 16px;
margin-bottom: 0;
z-index: 9999;
@@ -138,7 +139,7 @@ $tile-themes: (
}
}
.adf-app-listgrid-item-card-subtitle {
&-subtitle {
color: white;
z-index: 9999;
padding: 16px;

View File

@@ -2,8 +2,6 @@
id="add_new_process_content_button"
color="primary"
mat-button
mat-raised-button
mat-icon-button
class="adf-create-attachment"
[adf-upload]="true"
[mode]="['click']"

View File

@@ -18,7 +18,12 @@
import { SimpleChange } from '@angular/core';
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { CreateProcessAttachmentComponent } from './create-process-attachment.component';
import { ProcessTestingModule } from '../../testing/process.testing.module';
import { TranslateModule } from '@ngx-translate/core';
import { HttpClientModule } from '@angular/common/http';
import { MatButtonModule } from '@angular/material/button';
import { MatIconModule } from '@angular/material/icon';
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
import { AlfrescoApiService, AlfrescoApiServiceMock } from '@alfresco/adf-core';
declare let jasmine: any;
@@ -47,7 +52,14 @@ describe('CreateProcessAttachmentComponent', () => {
beforeEach(() => {
TestBed.configureTestingModule({
imports: [ProcessTestingModule, CreateProcessAttachmentComponent]
imports: [
TranslateModule.forRoot(),
NoopAnimationsModule,
HttpClientModule,
MatButtonModule,
MatIconModule
],
providers: [{ provide: AlfrescoApiService, useClass: AlfrescoApiServiceMock }]
});
fixture = TestBed.createComponent(CreateProcessAttachmentComponent);
component = fixture.componentInstance;

View File

@@ -1,8 +1,6 @@
<button
color="primary"
mat-button
mat-raised-button
mat-icon-button
class="adf-create-attachment"
[adf-upload]="true"
[mode]="['click']"

View File

@@ -26,6 +26,13 @@ import { ProcessContentService } from '../../form/services/process-content.servi
import { HarnessLoader } from '@angular/cdk/testing';
import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed';
import { MatMenuItemHarness } from '@angular/material/menu/testing';
import { HttpClientTestingModule } from '@angular/common/http/testing';
import { MatMenuModule } from '@angular/material/menu';
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
import { MatTooltipModule } from '@angular/material/tooltip';
import { AlfrescoApiService, AlfrescoApiServiceMock } from '@alfresco/adf-core';
import { TranslateModule } from '@ngx-translate/core';
describe('TaskAttachmentList', () => {
let component: TaskAttachmentListComponent;
@@ -40,7 +47,15 @@ describe('TaskAttachmentList', () => {
beforeEach(() => {
TestBed.configureTestingModule({
imports: [ProcessTestingModule, TaskAttachmentListComponent]
imports: [
TranslateModule.forRoot(),
HttpClientTestingModule,
MatMenuModule,
NoopAnimationsModule,
MatProgressSpinnerModule,
MatTooltipModule
],
providers: [{ provide: AlfrescoApiService, useClass: AlfrescoApiServiceMock }]
});
fixture = TestBed.createComponent(TaskAttachmentListComponent);
component = fixture.componentInstance;

View File

@@ -4,7 +4,7 @@
</div>
<div *ngIf="hasForm()" class="adf-form-container">
<mat-card>
<mat-card appearance="outlined" class="adf-form-card">
<mat-card-header>
<mat-card-title>
<h4>
@@ -29,11 +29,11 @@
</h4>
</mat-card-title>
</mat-card-header>
<mat-card-content>
<mat-card-content class="adf-form-card-content">
<adf-form-renderer [formDefinition]="form">
</adf-form-renderer>
</mat-card-content>
<mat-card-actions *ngIf="form.hasOutcomes()" class="adf-form-mat-card-actions">
<mat-card-actions *ngIf="form.hasOutcomes()" class="adf-form-mat-card-actions" align="end">
<ng-content select="adf-form-custom-outcomes"></ng-content>
<button [id]="'adf-form-'+ outcome.name | formatSpace" *ngFor="let outcome of form.outcomes"
[color]="getColorForOutcome(outcome.name)" mat-button [disabled]="!isOutcomeButtonEnabled(outcome)"

View File

@@ -0,0 +1,5 @@
.adf-form-card,
.adf-form-card-content {
height: 100%;
overflow: auto;
}

View File

@@ -52,6 +52,7 @@ import { TranslateModule } from '@ngx-translate/core';
standalone: true,
imports: [CommonModule, MatCardModule, MatButtonModule, MatIconModule, TranslateModule, FormRendererComponent, FormatSpacePipe],
templateUrl: './form.component.html',
styleUrls: ['./form.component.scss'],
encapsulation: ViewEncapsulation.None
})
export class FormComponent extends FormBaseComponent implements OnInit, OnDestroy, OnChanges {

View File

@@ -1,21 +1,23 @@
@import 'styles/mat-selectors';
.adf-form-container {
max-width: 100%;
max-height: 100%;
& .mat-card {
& #{$mat-card} {
padding: 16px 24px;
overflow: hidden;
}
& .mat-card-header-text {
& #{$mat-card-header-text} {
margin: 0;
}
& .mat-tab-body-content {
& #{$mat-tab-body-content} {
overflow: hidden;
}
& .mat-tab-label {
& #{$mat-tab-label-text} {
font-size: var(--theme-subheading-2-font-size);
line-height: var(--theme-headline-line-height);
letter-spacing: -0.4px;
@@ -24,13 +26,14 @@
text-transform: uppercase;
}
& .mat-ink-bar {
& #{$mat-tab-ink-bar} {
height: 4px;
}
& .mat-form-field-wrapper {
& #{$mat-form-field-wrapper} {
margin: 0 12px 0 0;
}
}
.adf-form-container-card {
.adf {
@@ -90,27 +93,27 @@
padding-bottom: 25px;
padding-right: 25px;
& .mat-button {
& #{$mat-button} {
height: 36px;
border-radius: 5px;
}
& .mat-button-wrapper {
width: 58px;
height: 20px;
opacity: 0.54;
font-size: var(--theme-body-2-font-size);
font-weight: bold;
}
& #{$mat-button-label} {
width: 58px;
height: 20px;
opacity: 0.54;
font-size: var(--theme-body-2-font-size);
font-weight: bold;
}
}
}
}
form-field {
width: 100%;
.mat-input-element {
#{$mat-input-element} {
font-size: var(--theme-body-2-font-size);
padding-top: 8px;
line-height: normal;

View File

@@ -287,7 +287,7 @@ describe('StartFormComponent', () => {
const formFields = component.form.getFormFields();
const labelField = formFields.find((field) => field.id === 'date');
const dateWidget = fixture.debugElement.nativeElement.querySelector('date-widget');
const dateLabelElement = fixture.debugElement.nativeElement.querySelector('#date-label');
const dateLabelElement = fixture.debugElement.nativeElement.querySelector('#data-widget .adf-label');
expect(dateWidget).toBeTruthy();
expect(labelField.type).toBe('date');
@@ -322,7 +322,7 @@ describe('StartFormComponent', () => {
const inputElement = fixture.debugElement.nativeElement.querySelector('.adf-input');
const inputLabelElement = fixture.debugElement.nativeElement.querySelector('.adf-label');
const dateElement = fixture.debugElement.nativeElement.querySelector('#billdate');
const dateLabelElement = fixture.debugElement.nativeElement.querySelector('#billdate-label');
const dateLabelElement = fixture.debugElement.nativeElement.querySelector('#data-widget .adf-label');
const selectElement = fixture.debugElement.nativeElement.querySelector('#claimtype');
const selectLabelElement = fixture.debugElement.nativeElement.querySelector('.adf-dropdown-widget > .adf-label');

View File

@@ -18,7 +18,7 @@
</adf-content-node-selector-panel>
</mat-dialog-content>
<mat-dialog-actions align="end">
<mat-dialog-actions class="adf-login-dialog-actions" align="end">
<button
mat-button
(click)="close()"

View File

@@ -1,5 +1,7 @@
@import 'styles/mat-selectors';
.adf-attach-file-widget-dialog {
.mat-dialog-actions {
#{$mat-dialog-actions} {
background-color: var(--theme-background-color);
display: flex;
justify-content: flex-end;
@@ -20,4 +22,15 @@
}
}
}
.adf-login-dialog-actions {
margin-left: -25px;
margin-right: -25px;
padding-right: 25px;
}
}
#{$mat-dialog-surface} {
overflow-x: hidden;
}

View File

@@ -7,12 +7,12 @@
<div id="adf-attach-widget-simple-upload" *ngIf="isSimpleUploadButton() && isUploadButtonVisible()">
<a mat-raised-button color="primary">
{{ 'FORM.FIELD.UPLOAD' | translate }}
<mat-icon>file_upload</mat-icon>
<mat-icon>file_upload</mat-icon>d
<input #uploadFiles [multiple]="multipleOption" type="file" [id]="field.id" (change)="onAttachFileChanged($event)" />
</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">
<button mat-raised-button color="primary" [matMenuTriggerFor]="menu" [id]="field.id" class="adf-attach-widget__menu-trigger">
{{ 'FORM.FIELD.UPLOAD' | translate }}
<mat-icon>attach_file</mat-icon>
</button>
@@ -55,36 +55,19 @@
<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">
<img
mat-list-icon
class="adf-attach-widget__icon"
[id]="'file-' + file.id + '-icon'"
[src]="file.content ? getIcon(file.content.mimeType) : getIcon(file.mimeType)"
[alt]="mimeTypeIcon"
(click)="onAttachFileClicked(file)"
(keyup.enter)="onAttachFileClicked(file)"
[attr.aria-label]="file.name"
role="button"
tabindex="0"
/>
<span
matLine
id="{{ 'file-' + file.id }}"
(click)="onAttachFileClicked(file)"
[title]="file.name"
(keyup.enter)="onAttachFileClicked(file)"
tabindex="0"
role="button"
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-list-item class="adf-attach-files-row" *ngFor="let file of field.value; index as i">
<img matListItemLine class="adf-attach-widget__icon"
[id]="'file-'+file.id+'-icon'"
[src]="file.content ? getIcon(file.content.mimeType) : getIcon(file.mimeType)"
[alt]="mimeTypeIcon"
(click)="onAttachFileClicked(file)"
(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>
<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>
<mat-menu #fileActionMenu="matMenu" xPosition="before">

View File

@@ -1,4 +1,5 @@
@import 'styles/flex';
@import 'styles/mat-selectors';
.adf {
&-attach-widget-container {
@@ -23,6 +24,16 @@
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;
@@ -39,11 +50,11 @@
&-attach-widget-repo-button {
padding-left: 10px;
.mat-button-wrapper {
#{$mat-button-label} {
display: inline;
}
.mat-mini-fab.mat-accent {
#{$mat-mini-fab}#{$mat-accent} {
background-color: inherit;
}
}
@@ -66,16 +77,16 @@
}
&-attach-files-row {
.mat-line {
#{$mat-line} {
margin-bottom: 0;
}
.mat-list-text {
#{$mat-list-item-primary-text} {
max-width: 200px;
}
@include layout-bp(lt-md) {
.mat-list-text {
#{$mat-list-item-primary-text} {
max-width: 150px;
}
}

View File

@@ -19,7 +19,8 @@
<button mat-raised-button
color="primary"
(click)="openSelectDialogFromFileSource()"
[id]="'folder-'+field?.id+'-button'">
[id]="'folder-'+field?.id+'-button'"
class="adf-attach-folder-menu-trigger">
{{ 'FORM.FIELD.UPLOAD' | translate }}
<mat-icon>cloud_upload</mat-icon>
</button>

View File

@@ -1,3 +1,5 @@
@import 'styles/mat-selectors';
.adf {
&-attach-folder-widget-container {
margin-bottom: 15px;
@@ -26,7 +28,7 @@
&-attach-folder-files-row {
padding-left: 8px;
.mat-line {
#{$mat-line} {
margin-bottom: 0;
}
}
@@ -35,4 +37,14 @@
display: flex;
align-items: center;
}
&-attach-folder-menu-trigger {
display: flex;
flex-direction: row-reverse;
#{$mat-icon} {
margin-left: 4px;
margin-right: 0;
}
}
}

View File

@@ -1,4 +1,4 @@
<mat-card class="adf-content-container" *ngIf="content">
<mat-card appearance="outlined" class="adf-content-container" *ngIf="content">
<mat-card-content *ngIf="showDocumentContent">
<div *ngIf="content.isThumbnailSupported()" >
<img id="thumbnailPreview" class="adf-img-upload-widget" [src]="content.thumbnailUrl" alt="{{content.name}}">

View File

@@ -1,3 +1,5 @@
@import 'styles/mat-selectors';
.adf {
&-dropdown-widget {
width: 100%;
@@ -7,7 +9,7 @@
width: 100%;
}
.mat-select-value-text {
#{$mat-select-value-text} {
font-size: var(--theme-body-1-font-size);
}

View File

@@ -36,19 +36,35 @@
</div>
<div *ngIf="!readOnly">
<button mat-button [disabled]="!hasSelection()" (click)="moveSelectionUp()">
<button mat-button
data-automation-id="dynamic-table-button-move-up"
[disabled]="!hasSelection()"
(click)="moveSelectionUp()">
<mat-icon>arrow_upward</mat-icon>
</button>
<button mat-button [disabled]="!hasSelection()" (click)="moveSelectionDown()">
<button mat-button
data-automation-id="dynamic-table-button-move-down"
[disabled]="!hasSelection()"
(click)="moveSelectionDown()">
<mat-icon>arrow_downward</mat-icon>
</button>
<button mat-button [disabled]="field.readOnly" id="{{content.id}}-add-row" (click)="addNewRow()">
<button mat-button
data-automation-id="dynamic-table-button-add-row"
[disabled]="field.readOnly"
id="{{content.id}}-add-row"
(click)="addNewRow()">
<mat-icon>add_circle_outline</mat-icon>
</button>
<button mat-button [disabled]="!hasSelection()" (click)="deleteSelection()">
<button mat-button
data-automation-id="dynamic-table-button-remove"
[disabled]="!hasSelection()"
(click)="deleteSelection()">
<mat-icon>remove_circle_outline</mat-icon>
</button>
<button mat-button [disabled]="!hasSelection()" (click)="editSelection()">
<button mat-button
data-automation-id="dynamic-table-button-edit"
[disabled]="!hasSelection()"
(click)="editSelection()">
<mat-icon>edit</mat-icon>
</button>
</div>

View File

@@ -17,8 +17,19 @@
import { FileViewerWidgetComponent } from './file-viewer.widget';
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { FormModel, FormService, FormFieldModel } from '@alfresco/adf-core';
import { ProcessTestingModule } from '../../../testing/process.testing.module';
import {
FormModel,
FormService,
FormFieldModel,
TranslationService,
TranslationMock,
AuthenticationService,
RedirectAuthService
} from '@alfresco/adf-core';
import { TranslateModule } from '@ngx-translate/core';
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { HttpClientTestingModule } from '@angular/common/http/testing';
import { EMPTY, of } from 'rxjs';
describe('FileViewerWidgetComponent', () => {
const fakeForm = new FormModel();
@@ -43,8 +54,14 @@ describe('FileViewerWidgetComponent', () => {
beforeEach(() => {
TestBed.configureTestingModule({
imports: [ProcessTestingModule, FileViewerWidgetComponent],
providers: [{ provide: FormService, useValue: formServiceStub }]
imports: [TranslateModule.forRoot(), FileViewerWidgetComponent, HttpClientTestingModule],
providers: [
{ provide: FormService, useValue: formServiceStub },
{ provide: TranslationService, useClass: TranslationMock },
AuthenticationService,
{ provide: RedirectAuthService, useValue: { onLogin: EMPTY, onTokenReceived: of() } }
],
schemas: [CUSTOM_ELEMENTS_SCHEMA]
});
formServiceStub = TestBed.inject(FormService);

View File

@@ -1,8 +1,10 @@
@import 'styles/mat-selectors';
.adf {
&-people-widget {
width: 100%;
.mat-form-field-label-wrapper {
#{$mat-form-field-label} {
top: 10px;
}
}

View File

@@ -15,18 +15,35 @@
* limitations under the License.
*/
import { ComponentFixture, fakeAsync, TestBed } from '@angular/core/testing';
import { ComponentFixture, fakeAsync, getTestBed } from '@angular/core/testing';
import { Observable, of } from 'rxjs';
import { FormService, ContainerModel, FormFieldTypes, FormFieldOption, FormFieldModel, FormModel, CoreTestingModule } from '@alfresco/adf-core';
import {
FormService,
ContainerModel,
FormFieldTypes,
FormFieldOption,
FormFieldModel,
FormModel,
ErrorWidgetComponent,
TranslationMock,
AlfrescoApiServiceMock,
AppConfigServiceMock,
AppConfigService,
AlfrescoApiService,
TranslationService
} from '@alfresco/adf-core';
import { RadioButtonsWidgetComponent } from './radio-buttons.widget';
import { MatIconModule } from '@angular/material/icon';
import { MatRadioModule } from '@angular/material/radio';
import { FormsModule } from '@angular/forms';
import { TranslateModule } from '@ngx-translate/core';
import { TaskFormService } from '../../services/task-form.service';
import { ProcessDefinitionService } from '../../services/process-definition.service';
import { HarnessLoader } from '@angular/cdk/testing';
import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed';
import { MatRadioButtonHarness, MatRadioGroupHarness } from '@angular/material/radio/testing';
import { MatButtonModule } from '@angular/material/button';
import { HttpClientTestingModule } from '@angular/common/http/testing';
describe('RadioButtonsWidgetComponent', () => {
let formService: FormService;
@@ -35,11 +52,25 @@ describe('RadioButtonsWidgetComponent', () => {
let processDefinitionService: ProcessDefinitionService;
beforeEach(() => {
TestBed.configureTestingModule({
imports: [CoreTestingModule, MatRadioModule, FormsModule, MatIconModule]
getTestBed().configureTestingModule({
imports: [
TranslateModule.forRoot(),
MatRadioModule,
MatButtonModule,
FormsModule,
HttpClientTestingModule,
MatIconModule,
ErrorWidgetComponent,
RadioButtonsWidgetComponent
],
providers: [
{ provide: TranslationService, useClass: TranslationMock },
{ provide: AlfrescoApiService, useClass: AlfrescoApiServiceMock },
{ provide: AppConfigService, useClass: AppConfigServiceMock }
]
});
taskFormService = TestBed.inject(TaskFormService);
processDefinitionService = TestBed.inject(ProcessDefinitionService);
taskFormService = getTestBed().inject(TaskFormService);
processDefinitionService = getTestBed().inject(ProcessDefinitionService);
formService = new FormService();
widget = new RadioButtonsWidgetComponent(formService, taskFormService, processDefinitionService);
@@ -153,7 +184,7 @@ describe('RadioButtonsWidgetComponent', () => {
];
beforeEach(() => {
fixture = TestBed.createComponent(RadioButtonsWidgetComponent);
fixture = getTestBed().createComponent(RadioButtonsWidgetComponent);
radioButtonWidget = fixture.componentInstance;
element = fixture.nativeElement;
loader = TestbedHarnessEnvironment.loader(fixture);

View File

@@ -4,34 +4,18 @@
<div>
<mat-list *ngIf="hasFile">
<mat-list-item class="adf-upload-files-row" *ngFor="let file of field.value">
<img
mat-list-icon
class="adf-upload-widget__icon"
[id]="'file-'+file.id+'-icon'"
[src]="getIcon(file.mimeType)"
[alt]="mimeTypeIcon"
(click)="fileClicked(file)"
(keyup.enter)="fileClicked(file)"
tabindex="0"
role="button"
/>
<span
matLine
id="{{'file-'+file.id}}"
(click)="fileClicked(file)"
(keyup.enter)="fileClicked(file)"
role="button"
tabindex="0"
class="adf-file"
>{{file.name}}</span
>
<button
*ngIf="!field.readOnly"
mat-icon-button
[id]="'file-'+file.id+'-remove'"
(click)="removeFile(file);"
(keyup.enter)="removeFile(file);"
>
<img matListItemLine class="adf-upload-widget__icon"
[id]="'file-'+file.id+'-icon'"
[src]="getIcon(file.mimeType)"
[alt]="mimeTypeIcon"
(click)="fileClicked(file)"
(keyup.enter)="fileClicked(file)"
role="button"
tabindex="0"/>
<span matListItemLine id="{{'file-'+file.id}}" (click)="fileClicked(file)" (keyup.enter)="fileClicked(file)"
role="button" tabindex="0" class="adf-file">{{file.name}}</span>
<button *ngIf="!field.readOnly" mat-icon-button [id]="'file-'+file.id+'-remove'"
(click)="removeFile(file);" (keyup.enter)="removeFile(file);">
<mat-icon class="mat-24">highlight_off</mat-icon>
</button>
</mat-list-item>

View File

@@ -1,3 +1,5 @@
@import 'styles/mat-selectors';
.adf {
&-upload-widget-container {
margin-bottom: 15px;
@@ -25,7 +27,7 @@
}
&-upload-files-row {
.mat-line {
#{$mat-line} {
margin-bottom: 0;
}
}

View File

@@ -39,8 +39,8 @@ describe('PeopleSearchFieldComponent', () => {
});
it('should have the proper placeholder by default', () => {
const label = element.querySelector<HTMLElement>('label[for="userSearchText"]');
expect(label.innerText).toBe('ADF_TASK_LIST.PEOPLE.SEARCH_USER');
const input = <HTMLInputElement> element.querySelector<HTMLElement>('[data-automation-id="adf-people-search-input"]');
expect(input.placeholder).toBe('ADF_TASK_LIST.PEOPLE.SEARCH_USER');
});
it('should have the overridden placeholder if set as input parameter', async () => {
@@ -49,8 +49,8 @@ describe('PeopleSearchFieldComponent', () => {
fixture.detectChanges();
await fixture.whenStable();
const label = element.querySelector<HTMLElement>('label[for="userSearchText"]');
expect(label.innerText).toBe('Arcadia Bay');
const input = <HTMLInputElement> element.querySelector<HTMLElement>('[data-automation-id="adf-people-search-input"]');
expect(input.placeholder).toBe('Arcadia Bay');
});
it('should reset the user on reset method invocation', () => {

View File

@@ -1,4 +1,4 @@
<mat-card class="adf-assignment-top-container">
<mat-card appearance="outlined" class="adf-assignment-top-container">
<div mat-card-content class="adf-assignment-top-container-content">
<div class="assignment-header">
<div *ngIf="hasPeople()" class="adf-assignment-count" id="people-title">

View File

@@ -1,3 +1,5 @@
@import 'styles/mat-selectors';
.adf-assignment-header {
border-bottom: 1px solid var(--adf-theme-foreground-divider-color);
padding: 6px 20px;
@@ -24,7 +26,7 @@
}
}
.adf-assignment-top-container.mat-card {
.adf-assignment-top-container#{$mat-card} {
border-top: 1px solid var(--adf-theme-foreground-divider-color);
margin: 0;
padding: 0;

View File

@@ -15,6 +15,7 @@ adf-process-instance-filters {
.adf-filter-action-button {
align-items: center;
height: 32px;
justify-content: flex-start;
.adf-filter-action-button__label {
padding-left: 20px;

View File

@@ -18,7 +18,7 @@
[disabled]="!isRunning()"
(click)="onShowProcessDiagram()">{{ 'ADF_PROCESS_LIST.DETAILS.BUTTON.SHOW_DIAGRAM' | translate }}</button>
<mat-card>
<mat-card appearance="outlined">
<mat-card-content>
<adf-process-instance-tasks
#processInstanceTasks
@@ -32,7 +32,7 @@
<button mat-button type="button" (click)="cancelProcess()">{{ 'ADF_PROCESS_LIST.DETAILS.BUTTON.CANCEL' | translate }}</button>
</div>
<mat-card>
<mat-card appearance="outlined">
<mat-card-content>
<adf-process-instance-comments
[readOnly]="false"

View File

@@ -1,4 +1,4 @@
<mat-card *ngIf="processInstance" class="adf-card-container">
<mat-card appearance="outlined" *ngIf="processInstance" class="adf-card-container">
<mat-card-content>
<adf-card-view [properties]="properties"></adf-card-view>
</mat-card-content>

View File

@@ -6,15 +6,15 @@
<!-- ACTIVE FORM -->
<mat-chip-list>
<mat-chip-listbox>
<span class="adf-chip-label">{{ 'ADF_PROCESS_LIST.DETAILS.LABELS.TASKS_ACTIVE'|translate }}</span>
<mat-chip class="adf-process-badge" color="accent" selected="true">{{activeTasks?.length}}</mat-chip>
</mat-chip-list>
<mat-chip-option class="adf-process-badge" color="accent" selected="true">{{activeTasks?.length}}</mat-chip-option>
</mat-chip-listbox>
<div class="menu-container" *ngIf="activeTasks?.length > 0" data-automation-id="active-tasks">
<mat-list>
<mat-list-item class="process-tasks__task-item" *ngFor="let task of activeTasks" (click)="clickTask(task)">
<mat-icon mat-list-icon>assignment</mat-icon>
<mat-icon matListItemLine>assignment</mat-icon>
<h3 matLine>{{task.name || 'Nameless task'}}</h3>
<span matLine>
{{ 'ADF_PROCESS_LIST.DETAILS.LABELS.TASK_SUBTITLE' | translate:{user: getUserFullName(task.assignee), created: getFormatDate(task.created, 'mediumDate') } }}
@@ -36,7 +36,7 @@
<div class="menu-container" data-automation-id="start-form">
<mat-list>
<mat-list-item class="process-tasks__task-item" (click)="clickStartTask()">
<mat-icon mat-list-icon>assignment</mat-icon>
<mat-icon matListItemLine>assignment</mat-icon>
<h3 matLine>{{ 'ADF_PROCESS_LIST.DETAILS.LABELS.START_FORM'|translate }}</h3>
<span matLine>
{{ 'ADF_PROCESS_LIST.DETAILS.LABELS.TASK_SUBTITLE' | translate:{user:getUserFullName(processInstanceDetails.startedBy), created: getFormatDate(processInstanceDetails.started, 'mediumDate') } }}
@@ -48,15 +48,15 @@
</div>
<!-- COMPLETED FORM -->
<mat-chip-list>
<mat-chip-listbox>
<span class="adf-chip-label">{{ 'ADF_PROCESS_LIST.DETAILS.LABELS.TASKS_COMPLETED'|translate }}</span>
<mat-chip class="adf-process-badge" color="accent" selected="true">{{completedTasks?.length}}</mat-chip>
</mat-chip-list>
<mat-chip-option class="adf-process-badge" color="accent" selected="true">{{completedTasks?.length}}</mat-chip-option>
</mat-chip-listbox>
<div class="menu-container" *ngIf="completedTasks?.length > 0" data-automation-id="completed-tasks">
<mat-list>
<mat-list-item class="process-tasks__task-item" *ngFor="let task of completedTasks" (click)="clickTask(task)">
<mat-icon mat-list-icon>assignment</mat-icon>
<mat-icon matListItemLine>assignment</mat-icon>
<h3 matLine>{{task.name || 'Nameless task'}}</h3>
<span matLine>
{{ 'ADF_PROCESS_LIST.DETAILS.LABELS.TASK_SUBTITLE' | translate:{user:getUserFullName(task.assignee), created: getFormatDate(task.created, 'mediumDate') } }}

View File

@@ -9,11 +9,13 @@
<div class="adf-title" *ngIf="title">{{ title | translate}}</div>
<div class="content">
<div class="adf-start-process-definition-container">
<mat-form-field *ngIf="showSelectApplicationDropdown" [floatLabel]="'always'" class="adf-start-process-app-list">
<mat-form-field *ngIf="showSelectApplicationDropdown" [floatLabel]="'always'" class="adf-start-process-app-list" [subscriptSizing]="'dynamic'">
<mat-label>{{ 'ADF_PROCESS_LIST.START_PROCESS.FORM.LABEL.SELECT_APPLICATION' | translate }}</mat-label>
<mat-select
placeholder="{{ 'ADF_PROCESS_LIST.START_PROCESS.FORM.LABEL.SELECT_APPLICATION' | translate }}"
(selectionChange)="onAppSelectionChange($event)"
[(ngModel)]="selectedApplication"
class="adf-start-process-definition-select"
data-automation-id="adf-start-process-apps-drop-down">
<mat-option
*ngFor="let application of applications"
@@ -24,7 +26,7 @@
</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field class="adf-process-input-container" [floatLabel]="'always'">
<mat-form-field class="adf-process-input-container" [floatLabel]="'always'" [subscriptSizing]="'dynamic'">
<mat-label>{{'ADF_PROCESS_LIST.START_PROCESS.FORM.LABEL.TYPE' | translate}}</mat-label>
<input
type="text"
@@ -60,7 +62,7 @@
</div>
</mat-form-field>
</div>
<mat-form-field class="adf-process-input-container" [floatLabel]="'always'">
<mat-form-field class="adf-process-input-container adf-process-input-container-process-name" [floatLabel]="'always'">
<mat-label>{{'ADF_PROCESS_LIST.START_PROCESS.FORM.LABEL.NAME' | translate}}</mat-label>
<input
matInput
@@ -117,7 +119,7 @@
<mat-spinner class="adf-start-process-loading"></mat-spinner>
</ng-template>
</div>
<div class="mat-content-actions" *ngIf="!hasStartForm()">
<div class="adf-start-process-content-actions" *ngIf="!hasStartForm()">
<button
class="adf-start-process-button"
mat-button

View File

@@ -1,4 +1,5 @@
@import 'styles/flex';
@import 'styles/mat-selectors';
.adf {
&-start-process {
@@ -11,13 +12,22 @@
width: 100%;
}
.mat-form-field-label {
#{$mat-form-field-label} {
color: var(--adf-theme-mat-grey-color-a200-dark);
}
.mat-content-actions {
&-content-actions {
padding-bottom: 16px;
padding-right: 16px;
text-align: right;
}
#{$mat-button} {
width: auto;
padding: 0 16px;
margin: 0 8px;
white-space: nowrap;
}
}
&-title {
@@ -28,15 +38,20 @@
mat-form-field {
width: 100%;
}
&-process-name {
margin-top: 16px
}
}
&-process-input-autocomplete {
display: flex;
padding-bottom: 2px;
button {
.adf-start-process-button {
position: absolute;
right: -14px;
top: 0;
top: 10px;
}
mat-spinner {
@@ -47,6 +62,14 @@
}
&-start-form-container {
#{$mat-card-content} {
margin-bottom: 100px;
}
#{$mat-card-header} {
display: none;
}
.adf-start-form-card:has(.adf-start-form-header) {
box-shadow: none;
padding: 0;
@@ -55,6 +78,11 @@
&-start-form-actions:has(.adf-start-form-actions-button) {
text-align: right;
padding-bottom: 16px;
button {
text-wrap: none;
}
}
&-start-process-definition-container {
@@ -62,6 +90,16 @@
flex-direction: row;
justify-content: space-around;
align-items: baseline;
.adf-start-process-definition-select {
.mat-mdc-select-arrow-wrapper {
transform: none;
svg {
fill: initial;
}
}
}
}
&-start-process-app-list {

View File

@@ -16,11 +16,19 @@
*/
import { SimpleChange } from '@angular/core';
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { AppConfigService } from '@alfresco/adf-core';
import { AppsProcessService } from '../../../services/apps-process.service';
import { ComponentFixture, getTestBed } from '@angular/core/testing';
import {
AppConfigService,
AppConfigServiceMock,
FormRenderingService,
LocalizedDatePipe,
PipeModule,
TemplateModule,
TranslationMock,
TranslationService
} from '@alfresco/adf-core';
import { of, throwError } from 'rxjs';
import { MatSelectChange } from '@angular/material/select';
import { MatSelectChange, MatSelectModule } from '@angular/material/select';
import { ProcessService } from '../../services/process.service';
import {
newProcess,
@@ -31,14 +39,24 @@ import {
testProcessDefinitions
} from '../../../testing/mock';
import { StartProcessInstanceComponent } from './start-process.component';
import { ProcessTestingModule } from '../../../testing/process.testing.module';
import { deployedApps } from '../../../testing/mock/apps-list.mock';
import { ActivitiContentService } from '../../../form/services/activiti-alfresco.service';
import { TranslateModule } from '@ngx-translate/core';
import { HarnessLoader } from '@angular/cdk/testing';
import { MatFormFieldHarness } from '@angular/material/form-field/testing';
import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed';
import { MatAutocompleteHarness } from '@angular/material/autocomplete/testing';
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { HttpClientTestingModule } from '@angular/common/http/testing';
import { MatInputModule } from '@angular/material/input';
import { MatIconModule } from '@angular/material/icon';
import { MatAutocompleteModule } from '@angular/material/autocomplete';
import { RestVariable } from '@alfresco/js-api';
import { ActivitiContentService } from '../../../form/services/activiti-alfresco.service';
import { AppsProcessService } from '../../../services/apps-process.service';
import { ProcessFormRenderingService } from '../../../form';
import { FORM_FIELD_MODEL_RENDER_MIDDLEWARE } from 'lib/core/src/lib/form/components/middlewares/middleware';
import { deployedApps } from '../../../testing/mock/apps-list.mock';
describe('StartProcessComponent', () => {
let appConfig: AppConfigService;
@@ -55,8 +73,32 @@ describe('StartProcessComponent', () => {
let getDeployedApplicationsSpy: jasmine.Spy;
beforeEach(() => {
TestBed.configureTestingModule({
imports: [ProcessTestingModule]
getTestBed().configureTestingModule({
imports: [
TranslateModule.forRoot(),
TemplateModule,
NoopAnimationsModule,
ReactiveFormsModule,
FormsModule,
HttpClientTestingModule,
MatInputModule,
MatIconModule,
MatSelectModule,
MatAutocompleteModule,
PipeModule,
StartProcessInstanceComponent
],
providers: [
LocalizedDatePipe,
ActivitiContentService,
ProcessService,
AppsProcessService,
FormRenderingService,
{ provide: FormRenderingService, useClass: ProcessFormRenderingService },
{ provide: AppConfigService, useClass: AppConfigServiceMock },
{ provide: TranslationService, useClass: TranslationMock },
{ provide: FORM_FIELD_MODEL_RENDER_MIDDLEWARE, useValue: [] }
]
});
});
@@ -81,13 +123,13 @@ describe('StartProcessComponent', () => {
}
beforeEach(() => {
appConfig = TestBed.inject(AppConfigService);
activitiContentService = TestBed.inject(ActivitiContentService);
fixture = TestBed.createComponent(StartProcessInstanceComponent);
appConfig = getTestBed().inject(AppConfigService);
activitiContentService = getTestBed().inject(ActivitiContentService);
fixture = getTestBed().createComponent(StartProcessInstanceComponent);
component = fixture.componentInstance;
loader = TestbedHarnessEnvironment.loader(fixture);
processService = TestBed.inject(ProcessService);
appsProcessService = TestBed.inject(AppsProcessService);
processService = getTestBed().inject(ProcessService);
appsProcessService = getTestBed().inject(AppsProcessService);
getDefinitionsSpy = spyOn(processService, 'getProcessDefinitions').and.returnValue(of(testMultipleProcessDefs));
startProcessSpy = spyOn(processService, 'startProcess').and.returnValue(of(newProcess));
@@ -98,7 +140,6 @@ describe('StartProcessComponent', () => {
afterEach(() => {
fixture.destroy();
TestBed.resetTestingModule();
});
describe('first step', () => {

View File

@@ -1,5 +1,5 @@
<div class="adf-attach-form">
<mat-card>
<mat-card appearance="outlined">
<mat-card-content>
<div class="adf-attache-form-message-container">
<mat-card-title class="mat-card-title">

View File

@@ -1,5 +1,7 @@
@import 'styles/mat-selectors';
.adf-attach-form {
.mat-form-field {
#{$mat-form-field} {
width: 100%;
}

View File

@@ -1,8 +1,8 @@
<div class="adf-checklist-control">
<mat-chip-list data-automation-id="checklist-label">
<mat-chip-listbox data-automation-id="checklist-label">
<span class="adf-activiti-label">{{ 'ADF_TASK_LIST.DETAILS.LABELS.CHECKLIST' | translate }}</span>
<mat-chip class="adf-process-badge" color="accent" selected="true">{{checklist?.length}}</mat-chip>
</mat-chip-list>
<mat-chip-option class="adf-process-badge" color="accent" selected="true">{{checklist?.length}}</mat-chip-option>
</mat-chip-listbox>
<button mat-icon-button *ngIf="!readOnly" title="Add a checklist"
@@ -12,14 +12,14 @@
</div>
<div class="adf-checklist-menu-container" *ngIf="checklist?.length > 0">
<mat-chip-list class="mat-chip-list-stacked">
<mat-chip id="check-{{check.id}}" class="adf-checklist-chip" *ngFor="let check of checklist"
<mat-chip-listbox class="mat-chip-list-stacked">
<mat-chip-option id="check-{{check.id}}" class="adf-checklist-chip" *ngFor="let check of checklist"
(removed)="delete(check.id)">
<span>{{check.name}}</span>
<mat-icon *ngIf="!readOnly && !check.endDate" id="remove-{{check.id}}" matChipRemove>cancel
</mat-icon>
</mat-chip>
</mat-chip-list>
</mat-chip-option>
</mat-chip-listbox>
</div>
<div *ngIf="checklist?.length === 0" id="checklist-none-message" class="adf-checklist-none-message">

View File

@@ -1,3 +1,5 @@
@import 'styles/mat-selectors';
:host {
width: 100%;
}
@@ -6,7 +8,7 @@
font-weight: bolder;
}
.mat-form-field {
#{$mat-form-field} {
width: 100%;
}

View File

@@ -1,4 +1,4 @@
<mat-card class="adf-new-task-layout-card">
<mat-card appearance="outlined" class="adf-new-task-layout-card">
<mat-card-header class="adf-new-task-heading">
<mat-card-title>{{'ADF_TASK_LIST.START_TASK.FORM.TITLE' | translate}}</mat-card-title>
</mat-card-header>
@@ -33,7 +33,7 @@
</mat-error>
</mat-form-field>
</div>
<div class="input-row">
<div class="adf-input-row">
<mat-form-field>
<input
matInput

View File

@@ -1,11 +1,12 @@
@import 'styles/flex';
@import 'styles/mat-selectors';
/* stylelint-disable no-descending-specificity */
.adf-new-task-heading {
padding-top: 12px;
border-bottom: 1px solid var(--adf-theme-foreground-divider-color);
.mat-card-title {
#{$mat-card-title} {
font-weight: bold;
font-size: var(--theme-adf-task-title-font-size);
}
@@ -20,7 +21,8 @@
flex-direction: column;
display: flex;
.adf-task-name, .adf-task-description, .input-row {
.adf-task-name,
.adf-task-description {
display: flex;
margin-bottom: 10px;
@@ -29,7 +31,7 @@
}
}
.input-row {
.adf-input-row {
@include layout-bp(lt-md) {
flex-direction: column;
}
@@ -67,20 +69,20 @@
}
adf-start-task {
.mat-button.adf-uppercase {
#{$mat-button}.adf-uppercase {
text-transform: uppercase;
}
people-widget.adf-people-widget-content {
width: 100%;
.mat-form-field-label-wrapper {
#{$mat-form-field-label} {
top: -14px;
}
}
.adf-people-widget-content {
.mat-form-field {
#{$mat-form-field} {
width: 100%;
}
@@ -94,7 +96,7 @@ adf-start-task {
}
.adf {
&-start-task-input-container .mat-form-field-wrapper {
&-start-task-input-container #{$mat-form-field-wrapper} {
padding-top: 8px;
}
@@ -134,7 +136,7 @@ adf-start-task {
border-color: var(--theme-warn-color);
}
.mat-form-field-prefix {
#{$mat-form-field-prefix} {
color: var(--theme-warn-color);
}

View File

@@ -74,7 +74,7 @@
</adf-info-drawer-tab>
<adf-info-drawer-tab label="ADF_TASK_LIST.DETAILS.LABELS.INFO_DRAWER_TAB_ACTIVITY_TITLE">
<mat-card *ngIf="showComments">
<mat-card appearance="outlined" *ngIf="showComments">
<mat-card-content>
<adf-task-comments
[readOnly]="isReadOnlyComment()"

View File

@@ -1,4 +1,5 @@
@import 'styles/flex';
@import 'styles/mat-selectors';
adf-task-details {
width: 100%;
@@ -75,7 +76,7 @@ adf-task-details {
flex-direction: column;
padding: 20px 0;
.mat-slide-toggle {
#{$mat-slide-toggle} {
margin-left: auto;
& + div {
@@ -88,7 +89,7 @@ adf-task-details {
}
}
& .mat-tab-label {
& #{$mat-tab-label-text} {
flex-grow: 1;
}
}

View File

@@ -15,6 +15,7 @@ adf-task-filters {
.adf-filter-action-button {
align-items: center;
height: 32px;
justify-content: flex-start;
.adf-filter-action-button__label {
padding-left: 20px;

View File

@@ -32,7 +32,7 @@
(showAttachForm)="onShowAttachForm()">
</adf-task-standalone>
<ng-template #emptyFormMessage>
<mat-card class="adf-task-form-container">
<mat-card appearance="outlined" class="adf-task-form-container">
<mat-card-header>
<mat-card-title>
<h4>
@@ -59,7 +59,7 @@
</adf-empty-content>
</ng-template>
</mat-card-content>
<mat-card-actions>
<mat-card-actions align="end">
<div class="adf-task-form-actions">
<ng-template [ngTemplateOutlet]="taskFormButtons"></ng-template>
<button mat-button
@@ -101,5 +101,7 @@
</ng-template>
</ng-container>
<ng-template #loadingTemplate>
<mat-spinner class="adf-task-form-spinner"></mat-spinner>
<div class="adf-task-form-spinner-container">
<mat-spinner></mat-spinner>
</div>
</ng-template>

View File

@@ -1,3 +1,5 @@
@import 'styles/mat-selectors';
.adf-task-form {
&-container {
overflow: hidden;
@@ -8,12 +10,12 @@
padding-right: 25px;
padding-bottom: 25px;
& .mat-button {
& #{$mat-button} {
height: 36px;
border-radius: 5px;
}
& .mat-button-wrapper {
& #{$mat-button-label} {
width: 58px;
height: 20px;
opacity: 0.54;
@@ -23,7 +25,13 @@
}
}
adf-task-form {
.adf-task-form-spinner-container {
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
mat-spinner {
display: flex;
max-height: 100%;

View File

@@ -1,4 +1,4 @@
<mat-card *ngIf="taskDetails" class="adf-card-container">
<mat-card appearance="outlined" *ngIf="taskDetails" class="adf-card-container">
<mat-card-content>
<adf-card-view [properties]="properties" [editable]="!isCompleted()" [displayClearAction]="displayDateClearAction"></adf-card-view>
</mat-card-content>

View File

@@ -18,17 +18,30 @@
import { Component, SimpleChange, ViewChild, OnInit, Output, EventEmitter, SimpleChanges } from '@angular/core';
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { By } from '@angular/platform-browser';
import { AppConfigService, DataRowEvent, ObjectDataRow, DataCellEvent, ObjectDataColumn } from '@alfresco/adf-core';
import {
AppConfigService,
DataRowEvent,
ObjectDataRow,
DataCellEvent,
ObjectDataColumn,
DataTableModule,
AppConfigServiceMock,
AlfrescoApiServiceMock,
AlfrescoApiService
} from '@alfresco/adf-core';
import { TaskListService } from '../../services/tasklist.service';
import { TaskListComponent } from './task-list.component';
import { ProcessTestingModule } from '../../../testing/process.testing.module';
import { fakeGlobalTask, fakeEmptyTask, paginatedTask, fakeColumnSchema, fakeCustomSchema } from '../../../testing/mock';
import { TranslateService } from '@ngx-translate/core';
import { TranslateModule, TranslateService } from '@ngx-translate/core';
import { of, Subject } from 'rxjs';
import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed';
import { HarnessLoader } from '@angular/cdk/testing';
import { MatCheckboxHarness } from '@angular/material/checkbox/testing';
import { MatMenuItemHarness } from '@angular/material/menu/testing';
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
import { HttpClientTestingModule } from '@angular/common/http/testing';
declare let jasmine: any;
@@ -93,7 +106,19 @@ describe('TaskListComponent', () => {
beforeEach(() => {
TestBed.configureTestingModule({
imports: [ProcessTestingModule, TaskListComponent]
imports: [
TranslateModule.forRoot(),
DataTableModule,
NoopAnimationsModule,
MatProgressSpinnerModule,
HttpClientTestingModule,
TaskListComponent
],
providers: [
TaskListService,
{ provide: AlfrescoApiService, useClass: AlfrescoApiServiceMock },
{ provide: AppConfigService, useClass: AppConfigServiceMock }
]
});
appConfig = TestBed.inject(AppConfigService);
appConfig.config.bpmHost = 'http://localhost:9876/bpm';
@@ -596,10 +621,9 @@ describe('TaskListComponent', () => {
const selectTask1 = await loader.getHarness(MatCheckboxHarness.with({ ancestor: '[data-automation-id="datatable-row-0"]' }));
const selectTask2 = await loader.getHarness(MatCheckboxHarness.with({ ancestor: '[data-automation-id="datatable-row-1"]' }));
await selectTask1.toggle();
await selectTask1.toggle();
await selectTask2.toggle();
expect(component.selectedInstances.length).toBe(2);
expect(component.selectedInstances.length).toBe(1);
});
it('should change selected row after clicking on different row', async () => {
@@ -779,7 +803,7 @@ describe('TaskListContextMenuComponent', () => {
beforeEach(() => {
TestBed.configureTestingModule({
imports: [ProcessTestingModule],
imports: [TranslateModule.forRoot(), MatProgressSpinnerModule, ProcessTestingModule],
declarations: [TaskListContextMenuComponent]
});
fixture = TestBed.createComponent(TaskListContextMenuComponent);

View File

@@ -1,4 +1,4 @@
<mat-card class="adf-message-card">
<mat-card appearance="outlined" class="adf-message-card">
<mat-card-content>
<div class="adf-no-form-message-container">
<div class="adf-no-form-message-list">

View File

@@ -1,3 +1,5 @@
@import 'styles/mat-selectors';
.adf-message-card {
width: 60%;
box-sizing: border-box;
@@ -41,12 +43,12 @@
display: flex;
justify-content: space-between;
& .mat-button {
& .mat-mdc-button {
text-transform: uppercase;
border-radius: 5px;
}
& .mat-button-wrapper {
& #{$mat-button-label} {
opacity: 0.54;
font-size: var(--theme-button-font-size);
font-weight: bold;

View File

@@ -18,22 +18,9 @@
import 'zone.js';
import 'zone.js/testing';
import { getTestBed } from '@angular/core/testing';
import {
BrowserDynamicTestingModule,
platformBrowserDynamicTesting
} from '@angular/platform-browser-dynamic/testing';
declare const require: any;
import { BrowserDynamicTestingModule, platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing';
// First, initialize the Angular testing environment.
getTestBed().initTestEnvironment(
BrowserDynamicTestingModule,
platformBrowserDynamicTesting(), {
getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting(), {
teardown: { destroyAfterEach: false }
}
);
// Then we find all the tests.
const context = require.context('./', true, /\.spec\.ts$/);
// And load the modules.
context.keys().map(context);
});