mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2026-09-09 18:03:21 +00:00
migrate cloud components
This commit is contained in:
@@ -16,7 +16,17 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { Inject, Injectable, inject } from '@angular/core';
|
import { Inject, Injectable, inject } from '@angular/core';
|
||||||
import { AuthConfig, AUTH_CONFIG, OAuthErrorEvent, OAuthEvent, OAuthService, OAuthStorage, TokenResponse, LoginOptions, OAuthSuccessEvent } from 'angular-oauth2-oidc';
|
import {
|
||||||
|
AuthConfig,
|
||||||
|
AUTH_CONFIG,
|
||||||
|
OAuthErrorEvent,
|
||||||
|
OAuthEvent,
|
||||||
|
OAuthService,
|
||||||
|
OAuthStorage,
|
||||||
|
TokenResponse,
|
||||||
|
LoginOptions,
|
||||||
|
OAuthSuccessEvent
|
||||||
|
} from 'angular-oauth2-oidc';
|
||||||
import { JwksValidationHandler } from 'angular-oauth2-oidc-jwks';
|
import { JwksValidationHandler } from 'angular-oauth2-oidc-jwks';
|
||||||
import { from, Observable } from 'rxjs';
|
import { from, Observable } from 'rxjs';
|
||||||
import { distinctUntilChanged, filter, map, shareReplay, take } from 'rxjs/operators';
|
import { distinctUntilChanged, filter, map, shareReplay, take } from 'rxjs/operators';
|
||||||
@@ -25,9 +35,8 @@ import { AUTH_MODULE_CONFIG, AuthModuleConfig } from './auth-config';
|
|||||||
|
|
||||||
const isPromise = <T>(value: T | Promise<T>): value is Promise<T> => value && typeof (value as Promise<T>).then === 'function';
|
const isPromise = <T>(value: T | Promise<T>): value is Promise<T> => value && typeof (value as Promise<T>).then === 'function';
|
||||||
|
|
||||||
@Injectable()
|
@Injectable({ providedIn: 'root' })
|
||||||
export class RedirectAuthService extends AuthService {
|
export class RedirectAuthService extends AuthService {
|
||||||
|
|
||||||
readonly authModuleConfig: AuthModuleConfig = inject(AUTH_MODULE_CONFIG);
|
readonly authModuleConfig: AuthModuleConfig = inject(AUTH_MODULE_CONFIG);
|
||||||
|
|
||||||
onLogin: Observable<any>;
|
onLogin: Observable<any>;
|
||||||
@@ -68,11 +77,7 @@ export class RedirectAuthService extends AuthService {
|
|||||||
'session_state'
|
'session_state'
|
||||||
];
|
];
|
||||||
|
|
||||||
constructor(
|
constructor(private oauthService: OAuthService, private _oauthStorage: OAuthStorage, @Inject(AUTH_CONFIG) authConfig: AuthConfig) {
|
||||||
private oauthService: OAuthService,
|
|
||||||
private _oauthStorage: OAuthStorage,
|
|
||||||
@Inject(AUTH_CONFIG) authConfig: AuthConfig
|
|
||||||
) {
|
|
||||||
super();
|
super();
|
||||||
this.authConfig = authConfig;
|
this.authConfig = authConfig;
|
||||||
|
|
||||||
@@ -131,7 +136,6 @@ export class RedirectAuthService extends AuthService {
|
|||||||
return this._loadDiscoveryDocumentPromise;
|
return this._loadDiscoveryDocumentPromise;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
login(currentUrl?: string): void {
|
login(currentUrl?: string): void {
|
||||||
let stateKey: string | undefined;
|
let stateKey: string | undefined;
|
||||||
|
|
||||||
@@ -153,7 +157,13 @@ export class RedirectAuthService extends AuthService {
|
|||||||
const props = new Map<string, string>();
|
const props = new Map<string, string>();
|
||||||
props.set('id_token', response.id_token);
|
props.set('id_token', response.id_token);
|
||||||
// for backward compatibility we need to set the response in our storage
|
// for backward compatibility we need to set the response in our storage
|
||||||
this.oauthService['storeAccessTokenResponse'](response.access_token, response.refresh_token, response.expires_in, response.scope, props);
|
this.oauthService['storeAccessTokenResponse'](
|
||||||
|
response.access_token,
|
||||||
|
response.refresh_token,
|
||||||
|
response.expires_in,
|
||||||
|
response.scope,
|
||||||
|
props
|
||||||
|
);
|
||||||
return response;
|
return response;
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
@@ -191,10 +201,12 @@ export class RedirectAuthService extends AuthService {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
return this.ensureDiscoveryDocument().then(() => {
|
return this.ensureDiscoveryDocument()
|
||||||
|
.then(() => {
|
||||||
this.oauthService.setupAutomaticSilentRefresh();
|
this.oauthService.setupAutomaticSilentRefresh();
|
||||||
return void this.allowRefreshTokenAndSilentRefreshOnMultipleTabs();
|
return void this.allowRefreshTokenAndSilentRefreshOnMultipleTabs();
|
||||||
}).catch(() => {
|
})
|
||||||
|
.catch(() => {
|
||||||
// catch error to prevent the app from crashing when trying to access unprotected routes
|
// catch error to prevent the app from crashing when trying to access unprotected routes
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -249,5 +261,4 @@ export class RedirectAuthService extends AuthService {
|
|||||||
reloadPage() {
|
reloadPage() {
|
||||||
window.location.reload();
|
window.location.reload();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+1
@@ -19,6 +19,7 @@ import { Component } from '@angular/core';
|
|||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'adf-cloud-form-custom-outcomes',
|
selector: 'adf-cloud-form-custom-outcomes',
|
||||||
|
standalone: true,
|
||||||
template: '<ng-content></ng-content>'
|
template: '<ng-content></ng-content>'
|
||||||
})
|
})
|
||||||
export class FormCustomOutcomesComponent {}
|
export class FormCustomOutcomesComponent {}
|
||||||
|
|||||||
@@ -98,7 +98,7 @@ describe('FormCloudComponent', () => {
|
|||||||
const resolver = formRenderingService.getComponentTypeResolver(type);
|
const resolver = formRenderingService.getComponentTypeResolver(type);
|
||||||
const widgetType = resolver(null);
|
const widgetType = resolver(null);
|
||||||
|
|
||||||
const factoryResolver: ComponentFactoryResolver = TestBed.inject(ComponentFactoryResolver);
|
const factoryResolver = TestBed.inject(ComponentFactoryResolver);
|
||||||
const factory = factoryResolver.resolveComponentFactory(widgetType);
|
const factory = factoryResolver.resolveComponentFactory(widgetType);
|
||||||
const componentRef = factory.create(injector);
|
const componentRef = factory.create(injector);
|
||||||
|
|
||||||
@@ -107,7 +107,7 @@ describe('FormCloudComponent', () => {
|
|||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [ProcessServiceCloudTestingModule],
|
imports: [ProcessServiceCloudTestingModule, FormCloudComponent],
|
||||||
providers: [
|
providers: [
|
||||||
{
|
{
|
||||||
provide: VersionCompatibilityService,
|
provide: VersionCompatibilityService,
|
||||||
|
|||||||
@@ -44,7 +44,12 @@ import {
|
|||||||
ContentLinkModel,
|
ContentLinkModel,
|
||||||
UploadWidgetContentLinkModel,
|
UploadWidgetContentLinkModel,
|
||||||
FormEvent,
|
FormEvent,
|
||||||
ConfirmDialogComponent
|
ConfirmDialogComponent,
|
||||||
|
FormatSpacePipe,
|
||||||
|
FormRendererComponent,
|
||||||
|
ToolbarDividerComponent,
|
||||||
|
ToolbarComponent,
|
||||||
|
FormStylePipe
|
||||||
} from '@alfresco/adf-core';
|
} from '@alfresco/adf-core';
|
||||||
import { FormCloudService } from '../services/form-cloud.service';
|
import { FormCloudService } from '../services/form-cloud.service';
|
||||||
import { TaskVariableCloud } from '../models/task-variable-cloud.model';
|
import { TaskVariableCloud } from '../models/task-variable-cloud.model';
|
||||||
@@ -54,9 +59,29 @@ import { v4 as uuidGeneration } from 'uuid';
|
|||||||
import { FormCloudDisplayMode, FormCloudDisplayModeConfiguration } from '../../services/form-fields.interfaces';
|
import { FormCloudDisplayMode, FormCloudDisplayModeConfiguration } from '../../services/form-fields.interfaces';
|
||||||
import { FormCloudSpinnerService } from '../services/spinner/form-cloud-spinner.service';
|
import { FormCloudSpinnerService } from '../services/spinner/form-cloud-spinner.service';
|
||||||
import { DisplayModeService } from '../services/display-mode.service';
|
import { DisplayModeService } from '../services/display-mode.service';
|
||||||
|
import { CommonModule } from '@angular/common';
|
||||||
|
import { TranslateModule } from '@ngx-translate/core';
|
||||||
|
import { MatButtonModule } from '@angular/material/button';
|
||||||
|
import { MatCardModule } from '@angular/material/card';
|
||||||
|
import { MatIconModule } from '@angular/material/icon';
|
||||||
|
import { A11yModule } from '@angular/cdk/a11y';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'adf-cloud-form',
|
selector: 'adf-cloud-form',
|
||||||
|
standalone: true,
|
||||||
|
imports: [
|
||||||
|
CommonModule,
|
||||||
|
TranslateModule,
|
||||||
|
FormatSpacePipe,
|
||||||
|
MatButtonModule,
|
||||||
|
MatCardModule,
|
||||||
|
FormRendererComponent,
|
||||||
|
MatIconModule,
|
||||||
|
ToolbarDividerComponent,
|
||||||
|
ToolbarComponent,
|
||||||
|
A11yModule,
|
||||||
|
FormStylePipe
|
||||||
|
],
|
||||||
templateUrl: './form-cloud.component.html',
|
templateUrl: './form-cloud.component.html',
|
||||||
styleUrls: ['./form-cloud.component.scss']
|
styleUrls: ['./form-cloud.component.scss']
|
||||||
})
|
})
|
||||||
|
|||||||
+1
-3
@@ -17,7 +17,6 @@
|
|||||||
|
|
||||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
import { ProcessServiceCloudTestingModule } from '../../testing/process-service-cloud.testing.module';
|
import { ProcessServiceCloudTestingModule } from '../../testing/process-service-cloud.testing.module';
|
||||||
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
|
||||||
import { FormDefinitionSelectorCloudComponent } from './form-definition-selector-cloud.component';
|
import { FormDefinitionSelectorCloudComponent } from './form-definition-selector-cloud.component';
|
||||||
import { of } from 'rxjs';
|
import { of } from 'rxjs';
|
||||||
import { FormDefinitionSelectorCloudService } from '../services/form-definition-selector-cloud.service';
|
import { FormDefinitionSelectorCloudService } from '../services/form-definition-selector-cloud.service';
|
||||||
@@ -33,8 +32,7 @@ describe('FormDefinitionCloudComponent', () => {
|
|||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [ProcessServiceCloudTestingModule],
|
imports: [ProcessServiceCloudTestingModule, FormDefinitionSelectorCloudComponent]
|
||||||
schemas: [CUSTOM_ELEMENTS_SCHEMA]
|
|
||||||
});
|
});
|
||||||
fixture = TestBed.createComponent(FormDefinitionSelectorCloudComponent);
|
fixture = TestBed.createComponent(FormDefinitionSelectorCloudComponent);
|
||||||
service = TestBed.inject(FormDefinitionSelectorCloudService);
|
service = TestBed.inject(FormDefinitionSelectorCloudService);
|
||||||
|
|||||||
+8
-6
@@ -18,17 +18,21 @@
|
|||||||
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
|
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
|
||||||
import { Observable } from 'rxjs';
|
import { Observable } from 'rxjs';
|
||||||
import { FormDefinitionSelectorCloudService } from '../services/form-definition-selector-cloud.service';
|
import { FormDefinitionSelectorCloudService } from '../services/form-definition-selector-cloud.service';
|
||||||
import { MatSelectChange } from '@angular/material/select';
|
import { MatSelectChange, MatSelectModule } from '@angular/material/select';
|
||||||
import { FormRepresentation } from '../../services/form-fields.interfaces';
|
import { FormRepresentation } from '../../services/form-fields.interfaces';
|
||||||
|
import { CommonModule } from '@angular/common';
|
||||||
|
import { TranslateModule } from '@ngx-translate/core';
|
||||||
|
import { MatOptionModule } from '@angular/material/core';
|
||||||
|
import { MatFormFieldModule } from '@angular/material/form-field';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'adf-cloud-form-definition-selector',
|
selector: 'adf-cloud-form-definition-selector',
|
||||||
|
standalone: true,
|
||||||
|
imports: [CommonModule, TranslateModule, MatOptionModule, MatFormFieldModule, MatSelectModule],
|
||||||
templateUrl: './form-definition-selector-cloud.component.html',
|
templateUrl: './form-definition-selector-cloud.component.html',
|
||||||
styleUrls: ['./form-definition-selector-cloud.component.scss']
|
styleUrls: ['./form-definition-selector-cloud.component.scss']
|
||||||
})
|
})
|
||||||
|
|
||||||
export class FormDefinitionSelectorCloudComponent implements OnInit {
|
export class FormDefinitionSelectorCloudComponent implements OnInit {
|
||||||
|
|
||||||
/** Name of the application. If specified, this shows the users who have access to the app. */
|
/** Name of the application. If specified, this shows the users who have access to the app. */
|
||||||
@Input()
|
@Input()
|
||||||
appName: string = '';
|
appName: string = '';
|
||||||
@@ -39,8 +43,7 @@ export class FormDefinitionSelectorCloudComponent implements OnInit {
|
|||||||
|
|
||||||
forms$: Observable<FormRepresentation[]>;
|
forms$: Observable<FormRepresentation[]>;
|
||||||
|
|
||||||
constructor(private formDefinitionCloudService: FormDefinitionSelectorCloudService) {
|
constructor(private formDefinitionCloudService: FormDefinitionSelectorCloudService) {}
|
||||||
}
|
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
this.forms$ = this.formDefinitionCloudService.getStandAloneTaskForms(this.appName);
|
this.forms$ = this.formDefinitionCloudService.getStandAloneTaskForms(this.appName);
|
||||||
@@ -49,5 +52,4 @@ export class FormDefinitionSelectorCloudComponent implements OnInit {
|
|||||||
onSelect(event: MatSelectChange) {
|
onSelect(event: MatSelectChange) {
|
||||||
this.selectForm.emit(event.value);
|
this.selectForm.emit(event.value);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
import { FileViewerWidgetComponent } from './file-viewer.widget';
|
import { FileViewerWidgetComponent } from './file-viewer.widget';
|
||||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
import { FormModel, FormService, FormFieldModel, NoopTranslateModule } from '@alfresco/adf-core';
|
import { FormModel, FormService, FormFieldModel, NoopTranslateModule, NoopAuthModule } from '@alfresco/adf-core';
|
||||||
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
||||||
|
|
||||||
describe('FileViewerWidgetComponent', () => {
|
describe('FileViewerWidgetComponent', () => {
|
||||||
@@ -43,7 +43,7 @@ describe('FileViewerWidgetComponent', () => {
|
|||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [NoopTranslateModule, FileViewerWidgetComponent],
|
imports: [NoopTranslateModule, NoopAuthModule, FileViewerWidgetComponent],
|
||||||
providers: [{ provide: FormService, useValue: formServiceStub }],
|
providers: [{ provide: FormService, useValue: formServiceStub }],
|
||||||
schemas: [CUSTOM_ELEMENTS_SCHEMA]
|
schemas: [CUSTOM_ELEMENTS_SCHEMA]
|
||||||
});
|
});
|
||||||
|
|||||||
+1
-4
@@ -18,7 +18,6 @@
|
|||||||
import { FormFieldModel, FormFieldTypes, FormModel, IdentityUserModel } from '@alfresco/adf-core';
|
import { FormFieldModel, FormFieldTypes, FormModel, IdentityUserModel } from '@alfresco/adf-core';
|
||||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
import { PeopleCloudWidgetComponent } from './people-cloud.widget';
|
import { PeopleCloudWidgetComponent } from './people-cloud.widget';
|
||||||
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
|
||||||
import { ProcessServiceCloudTestingModule } from '../../../../testing/process-service-cloud.testing.module';
|
import { ProcessServiceCloudTestingModule } from '../../../../testing/process-service-cloud.testing.module';
|
||||||
import { IdentityUserService } from '../../../../people/services/identity-user.service';
|
import { IdentityUserService } from '../../../../people/services/identity-user.service';
|
||||||
import { mockShepherdsPie, mockYorkshirePudding } from '../../../../people/mock/people-cloud.mock';
|
import { mockShepherdsPie, mockYorkshirePudding } from '../../../../people/mock/people-cloud.mock';
|
||||||
@@ -36,9 +35,7 @@ describe('PeopleCloudWidgetComponent', () => {
|
|||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [ProcessServiceCloudTestingModule],
|
imports: [ProcessServiceCloudTestingModule, PeopleCloudWidgetComponent]
|
||||||
declarations: [PeopleCloudWidgetComponent],
|
|
||||||
schemas: [CUSTOM_ELEMENTS_SCHEMA]
|
|
||||||
});
|
});
|
||||||
identityUserService = TestBed.inject(IdentityUserService);
|
identityUserService = TestBed.inject(IdentityUserService);
|
||||||
fixture = TestBed.createComponent(PeopleCloudWidgetComponent);
|
fixture = TestBed.createComponent(PeopleCloudWidgetComponent);
|
||||||
|
|||||||
+6
-2
@@ -16,18 +16,23 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { Component, OnDestroy, OnInit, ViewEncapsulation } from '@angular/core';
|
import { Component, OnDestroy, OnInit, ViewEncapsulation } from '@angular/core';
|
||||||
import { WidgetComponent, FormService } from '@alfresco/adf-core';
|
import { WidgetComponent, FormService, ErrorWidgetComponent } from '@alfresco/adf-core';
|
||||||
import { UntypedFormControl } from '@angular/forms';
|
import { UntypedFormControl } from '@angular/forms';
|
||||||
import { filter, takeUntil } from 'rxjs/operators';
|
import { filter, takeUntil } from 'rxjs/operators';
|
||||||
import { Subject } from 'rxjs';
|
import { Subject } from 'rxjs';
|
||||||
import { ComponentSelectionMode } from '../../../../types';
|
import { ComponentSelectionMode } from '../../../../types';
|
||||||
import { IdentityUserModel } from '../../../../people/models/identity-user.model';
|
import { IdentityUserModel } from '../../../../people/models/identity-user.model';
|
||||||
import { IdentityUserService } from '../../../../people/services/identity-user.service';
|
import { IdentityUserService } from '../../../../people/services/identity-user.service';
|
||||||
|
import { CommonModule } from '@angular/common';
|
||||||
|
import { TranslateModule } from '@ngx-translate/core';
|
||||||
|
import { PeopleCloudComponent } from '../../../../people/components/people-cloud.component';
|
||||||
|
|
||||||
/* eslint-disable @angular-eslint/component-selector */
|
/* eslint-disable @angular-eslint/component-selector */
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'people-cloud-widget',
|
selector: 'people-cloud-widget',
|
||||||
|
standalone: true,
|
||||||
|
imports: [CommonModule, TranslateModule, ErrorWidgetComponent, PeopleCloudComponent],
|
||||||
templateUrl: './people-cloud.widget.html',
|
templateUrl: './people-cloud.widget.html',
|
||||||
host: {
|
host: {
|
||||||
'(click)': 'event($event)',
|
'(click)': 'event($event)',
|
||||||
@@ -43,7 +48,6 @@ import { IdentityUserService } from '../../../../people/services/identity-user.s
|
|||||||
encapsulation: ViewEncapsulation.None
|
encapsulation: ViewEncapsulation.None
|
||||||
})
|
})
|
||||||
export class PeopleCloudWidgetComponent extends WidgetComponent implements OnInit, OnDestroy {
|
export class PeopleCloudWidgetComponent extends WidgetComponent implements OnInit, OnDestroy {
|
||||||
|
|
||||||
private onDestroy$ = new Subject<boolean>();
|
private onDestroy$ = new Subject<boolean>();
|
||||||
|
|
||||||
typeId = 'PeopleCloudWidgetComponent';
|
typeId = 'PeopleCloudWidgetComponent';
|
||||||
|
|||||||
+5
-1
@@ -16,13 +16,17 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { Component, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges, ViewEncapsulation } from '@angular/core';
|
import { Component, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges, ViewEncapsulation } from '@angular/core';
|
||||||
import { PresetConfig, NodesApiService } from '@alfresco/adf-content-services';
|
import { PresetConfig, NodesApiService, ContentMetadataComponent } from '@alfresco/adf-content-services';
|
||||||
import { Node } from '@alfresco/js-api';
|
import { Node } from '@alfresco/js-api';
|
||||||
|
import { CommonModule } from '@angular/common';
|
||||||
|
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
||||||
|
|
||||||
/* eslint-disable @angular-eslint/component-selector */
|
/* eslint-disable @angular-eslint/component-selector */
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'adf-properties-viewer-wrapper',
|
selector: 'adf-properties-viewer-wrapper',
|
||||||
|
standalone: true,
|
||||||
|
imports: [CommonModule, ContentMetadataComponent, MatProgressSpinnerModule],
|
||||||
templateUrl: './properties-viewer-wrapper.component.html',
|
templateUrl: './properties-viewer-wrapper.component.html',
|
||||||
encapsulation: ViewEncapsulation.None
|
encapsulation: ViewEncapsulation.None
|
||||||
})
|
})
|
||||||
|
|||||||
+1
-1
@@ -29,7 +29,7 @@ describe('PropertiesViewerWidgetComponent', () => {
|
|||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [ProcessServiceCloudTestingModule],
|
imports: [ProcessServiceCloudTestingModule, PropertiesViewerWrapperComponent],
|
||||||
providers: [NodesApiService, { provide: BasicPropertiesService, useValue: { getProperties: () => [] } }]
|
providers: [NodesApiService, { provide: BasicPropertiesService, useValue: { getProperties: () => [] } }]
|
||||||
});
|
});
|
||||||
fixture = TestBed.createComponent(PropertiesViewerWrapperComponent);
|
fixture = TestBed.createComponent(PropertiesViewerWrapperComponent);
|
||||||
|
|||||||
+1
-2
@@ -47,8 +47,7 @@ describe('PropertiesViewerWidgetComponent', () => {
|
|||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [ProcessServiceCloudTestingModule],
|
imports: [ProcessServiceCloudTestingModule, PropertiesViewerWrapperComponent],
|
||||||
declarations: [PropertiesViewerWrapperComponent],
|
|
||||||
providers: [NodesApiService, { provide: BasicPropertiesService, useValue: { getProperties: () => [] } }]
|
providers: [NodesApiService, { provide: BasicPropertiesService, useValue: { getProperties: () => [] } }]
|
||||||
});
|
});
|
||||||
fixture = TestBed.createComponent(PropertiesViewerWidgetComponent);
|
fixture = TestBed.createComponent(PropertiesViewerWidgetComponent);
|
||||||
|
|||||||
+6
-2
@@ -16,13 +16,18 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { Component, EventEmitter, Output, ViewEncapsulation } from '@angular/core';
|
import { Component, EventEmitter, Output, ViewEncapsulation } from '@angular/core';
|
||||||
import { BaseViewerWidgetComponent, FormService } from '@alfresco/adf-core';
|
import { BaseViewerWidgetComponent, ErrorWidgetComponent, FormService } from '@alfresco/adf-core';
|
||||||
import { Node } from '@alfresco/js-api';
|
import { Node } from '@alfresco/js-api';
|
||||||
|
import { CommonModule } from '@angular/common';
|
||||||
|
import { PropertiesViewerWrapperComponent } from './properties-viewer-wrapper/properties-viewer-wrapper.component';
|
||||||
|
import { TranslateModule } from '@ngx-translate/core';
|
||||||
|
|
||||||
/* eslint-disable @angular-eslint/component-selector */
|
/* eslint-disable @angular-eslint/component-selector */
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'adf-properties-viewer-widget',
|
selector: 'adf-properties-viewer-widget',
|
||||||
|
standalone: true,
|
||||||
|
imports: [CommonModule, PropertiesViewerWrapperComponent, ErrorWidgetComponent, TranslateModule],
|
||||||
templateUrl: './properties-viewer.widget.html',
|
templateUrl: './properties-viewer.widget.html',
|
||||||
styleUrls: ['./properties-viewer.widget.scss'],
|
styleUrls: ['./properties-viewer.widget.scss'],
|
||||||
host: {
|
host: {
|
||||||
@@ -39,7 +44,6 @@ import { Node } from '@alfresco/js-api';
|
|||||||
encapsulation: ViewEncapsulation.None
|
encapsulation: ViewEncapsulation.None
|
||||||
})
|
})
|
||||||
export class PropertiesViewerWidgetComponent extends BaseViewerWidgetComponent {
|
export class PropertiesViewerWidgetComponent extends BaseViewerWidgetComponent {
|
||||||
|
|
||||||
@Output()
|
@Output()
|
||||||
nodeContentLoaded: EventEmitter<Node> = new EventEmitter();
|
nodeContentLoaded: EventEmitter<Node> = new EventEmitter();
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -44,7 +44,7 @@ describe('RadioButtonsCloudWidgetComponent', () => {
|
|||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [ProcessServiceCloudTestingModule]
|
imports: [ProcessServiceCloudTestingModule, RadioButtonsCloudWidgetComponent]
|
||||||
});
|
});
|
||||||
formCloudService = TestBed.inject(FormCloudService);
|
formCloudService = TestBed.inject(FormCloudService);
|
||||||
fixture = TestBed.createComponent(RadioButtonsCloudWidgetComponent);
|
fixture = TestBed.createComponent(RadioButtonsCloudWidgetComponent);
|
||||||
|
|||||||
+7
-2
@@ -18,14 +18,19 @@
|
|||||||
/* eslint-disable @angular-eslint/component-selector */
|
/* eslint-disable @angular-eslint/component-selector */
|
||||||
|
|
||||||
import { Component, OnInit, ViewEncapsulation } from '@angular/core';
|
import { Component, OnInit, ViewEncapsulation } from '@angular/core';
|
||||||
import { WidgetComponent, FormService, FormFieldOption, ErrorMessageModel } from '@alfresco/adf-core';
|
import { WidgetComponent, FormService, FormFieldOption, ErrorMessageModel, ErrorWidgetComponent } from '@alfresco/adf-core';
|
||||||
import { FormCloudService } from '../../../services/form-cloud.service';
|
import { FormCloudService } from '../../../services/form-cloud.service';
|
||||||
import { Subject } from 'rxjs';
|
import { Subject } from 'rxjs';
|
||||||
import { takeUntil } from 'rxjs/operators';
|
import { takeUntil } from 'rxjs/operators';
|
||||||
import { TranslateService } from '@ngx-translate/core';
|
import { TranslateModule, TranslateService } from '@ngx-translate/core';
|
||||||
|
import { CommonModule } from '@angular/common';
|
||||||
|
import { MatRadioModule } from '@angular/material/radio';
|
||||||
|
import { FormsModule } from '@angular/forms';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'radio-buttons-cloud-widget',
|
selector: 'radio-buttons-cloud-widget',
|
||||||
|
standalone: true,
|
||||||
|
imports: [CommonModule, TranslateModule, ErrorWidgetComponent, MatRadioModule, FormsModule],
|
||||||
templateUrl: './radio-buttons-cloud.widget.html',
|
templateUrl: './radio-buttons-cloud.widget.html',
|
||||||
styleUrls: ['./radio-buttons-cloud.widget.scss'],
|
styleUrls: ['./radio-buttons-cloud.widget.scss'],
|
||||||
host: {
|
host: {
|
||||||
|
|||||||
@@ -32,9 +32,7 @@ import {
|
|||||||
import { GroupCloudWidgetComponent } from './components/widgets/group/group-cloud.widget';
|
import { GroupCloudWidgetComponent } from './components/widgets/group/group-cloud.widget';
|
||||||
import { PeopleCloudWidgetComponent } from './components/widgets/people/people-cloud.widget';
|
import { PeopleCloudWidgetComponent } from './components/widgets/people/people-cloud.widget';
|
||||||
import { AttachFileCloudWidgetComponent } from './components/widgets/attach-file/attach-file-cloud-widget.component';
|
import { AttachFileCloudWidgetComponent } from './components/widgets/attach-file/attach-file-cloud-widget.component';
|
||||||
|
|
||||||
import { UploadCloudWidgetComponent } from './components/widgets/attach-file/upload-cloud.widget';
|
import { UploadCloudWidgetComponent } from './components/widgets/attach-file/upload-cloud.widget';
|
||||||
import { PeopleCloudModule } from '../people/people-cloud.module';
|
|
||||||
import { GroupCloudModule } from '../group/group-cloud.module';
|
import { GroupCloudModule } from '../group/group-cloud.module';
|
||||||
import { PropertiesViewerWidgetComponent } from './components/widgets/properties-viewer/properties-viewer.widget';
|
import { PropertiesViewerWidgetComponent } from './components/widgets/properties-viewer/properties-viewer.widget';
|
||||||
import { PropertiesViewerWrapperComponent } from './components/widgets/properties-viewer/properties-viewer-wrapper/properties-viewer-wrapper.component';
|
import { PropertiesViewerWrapperComponent } from './components/widgets/properties-viewer/properties-viewer-wrapper/properties-viewer-wrapper.component';
|
||||||
@@ -46,6 +44,7 @@ import { RichTextEditorModule } from '../rich-text-editor';
|
|||||||
import { A11yModule } from '@angular/cdk/a11y';
|
import { A11yModule } from '@angular/cdk/a11y';
|
||||||
import { OverlayModule } from '@angular/cdk/overlay';
|
import { OverlayModule } from '@angular/cdk/overlay';
|
||||||
import { FormSpinnerComponent } from './components/spinner/form-spinner.component';
|
import { FormSpinnerComponent } from './components/spinner/form-spinner.component';
|
||||||
|
import { PeopleCloudComponent } from '../people/components/people-cloud.component';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
@@ -56,7 +55,7 @@ import { FormSpinnerComponent } from './components/spinner/form-spinner.componen
|
|||||||
ReactiveFormsModule,
|
ReactiveFormsModule,
|
||||||
CoreModule,
|
CoreModule,
|
||||||
ContentNodeSelectorModule,
|
ContentNodeSelectorModule,
|
||||||
PeopleCloudModule,
|
PeopleCloudComponent,
|
||||||
GroupCloudModule,
|
GroupCloudModule,
|
||||||
RichTextEditorModule,
|
RichTextEditorModule,
|
||||||
...TOOLBAR_DIRECTIVES,
|
...TOOLBAR_DIRECTIVES,
|
||||||
@@ -72,16 +71,14 @@ import { FormSpinnerComponent } from './components/spinner/form-spinner.componen
|
|||||||
FilePropertiesTableCloudComponent,
|
FilePropertiesTableCloudComponent,
|
||||||
DisplayRichTextWidgetComponent,
|
DisplayRichTextWidgetComponent,
|
||||||
FileViewerWidgetComponent,
|
FileViewerWidgetComponent,
|
||||||
GroupCloudWidgetComponent
|
GroupCloudWidgetComponent,
|
||||||
],
|
PeopleCloudWidgetComponent,
|
||||||
declarations: [
|
|
||||||
FormCloudComponent,
|
|
||||||
FormDefinitionSelectorCloudComponent,
|
|
||||||
FormCustomOutcomesComponent,
|
FormCustomOutcomesComponent,
|
||||||
RadioButtonsCloudWidgetComponent,
|
RadioButtonsCloudWidgetComponent,
|
||||||
PeopleCloudWidgetComponent,
|
FormDefinitionSelectorCloudComponent,
|
||||||
PropertiesViewerWrapperComponent,
|
PropertiesViewerWrapperComponent,
|
||||||
PropertiesViewerWidgetComponent
|
PropertiesViewerWidgetComponent,
|
||||||
|
FormCloudComponent
|
||||||
],
|
],
|
||||||
exports: [
|
exports: [
|
||||||
FormCloudComponent,
|
FormCloudComponent,
|
||||||
|
|||||||
@@ -47,6 +47,7 @@ import { MatAutocompleteModule } from '@angular/material/autocomplete';
|
|||||||
import { MatChipsModule } from '@angular/material/chips';
|
import { MatChipsModule } from '@angular/material/chips';
|
||||||
import { MatInputModule } from '@angular/material/input';
|
import { MatInputModule } from '@angular/material/input';
|
||||||
import { MatButtonModule } from '@angular/material/button';
|
import { MatButtonModule } from '@angular/material/button';
|
||||||
|
import { InitialGroupNamePipe } from '../pipe/group-initial.pipe';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'adf-cloud-group',
|
selector: 'adf-cloud-group',
|
||||||
@@ -62,7 +63,8 @@ import { MatButtonModule } from '@angular/material/button';
|
|||||||
MatChipsModule,
|
MatChipsModule,
|
||||||
MatInputModule,
|
MatInputModule,
|
||||||
ReactiveFormsModule,
|
ReactiveFormsModule,
|
||||||
MatButtonModule
|
MatButtonModule,
|
||||||
|
InitialGroupNamePipe
|
||||||
],
|
],
|
||||||
templateUrl: './group-cloud.component.html',
|
templateUrl: './group-cloud.component.html',
|
||||||
styleUrls: ['./group-cloud.component.scss'],
|
styleUrls: ['./group-cloud.component.scss'],
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ describe('PeopleCloudComponent', () => {
|
|||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [CoreTestingModule, ProcessServiceCloudTestingModule, PeopleCloudModule]
|
imports: [CoreTestingModule, ProcessServiceCloudTestingModule, PeopleCloudModule, PeopleCloudComponent]
|
||||||
});
|
});
|
||||||
fixture = TestBed.createComponent(PeopleCloudComponent);
|
fixture = TestBed.createComponent(PeopleCloudComponent);
|
||||||
component = fixture.componentInstance;
|
component = fixture.componentInstance;
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { UntypedFormControl } from '@angular/forms';
|
import { ReactiveFormsModule, UntypedFormControl } from '@angular/forms';
|
||||||
import {
|
import {
|
||||||
Component,
|
Component,
|
||||||
OnInit,
|
OnInit,
|
||||||
@@ -33,16 +33,37 @@ import {
|
|||||||
} from '@angular/core';
|
} from '@angular/core';
|
||||||
import { BehaviorSubject, Observable, Subject } from 'rxjs';
|
import { BehaviorSubject, Observable, Subject } from 'rxjs';
|
||||||
import { switchMap, debounceTime, distinctUntilChanged, mergeMap, tap, filter, takeUntil } from 'rxjs/operators';
|
import { switchMap, debounceTime, distinctUntilChanged, mergeMap, tap, filter, takeUntil } from 'rxjs/operators';
|
||||||
import { FullNamePipe } from '@alfresco/adf-core';
|
import { FullNamePipe, InitialUsernamePipe } from '@alfresco/adf-core';
|
||||||
import { trigger, state, style, transition, animate } from '@angular/animations';
|
import { trigger, state, style, transition, animate } from '@angular/animations';
|
||||||
import { ComponentSelectionMode } from '../../types';
|
import { ComponentSelectionMode } from '../../types';
|
||||||
import { IdentityUserModel } from '../models/identity-user.model';
|
import { IdentityUserModel } from '../models/identity-user.model';
|
||||||
import { IdentityUserServiceInterface } from '../services/identity-user.service.interface';
|
import { IdentityUserServiceInterface } from '../services/identity-user.service.interface';
|
||||||
import { IDENTITY_USER_SERVICE_TOKEN } from '../services/identity-user-service.token';
|
import { IDENTITY_USER_SERVICE_TOKEN } from '../services/identity-user-service.token';
|
||||||
import { MatFormFieldAppearance, SubscriptSizing } from '@angular/material/form-field';
|
import { MatFormFieldAppearance, SubscriptSizing } from '@angular/material/form-field';
|
||||||
|
import { CommonModule } from '@angular/common';
|
||||||
|
import { TranslateModule } from '@ngx-translate/core';
|
||||||
|
import { MatIconModule } from '@angular/material/icon';
|
||||||
|
import { MatChipsModule } from '@angular/material/chips';
|
||||||
|
import { MatInputModule } from '@angular/material/input';
|
||||||
|
import { MatAutocompleteModule } from '@angular/material/autocomplete';
|
||||||
|
import { MatProgressBarModule } from '@angular/material/progress-bar';
|
||||||
|
import { IdentityUserService } from '../services/identity-user.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'adf-cloud-people',
|
selector: 'adf-cloud-people',
|
||||||
|
standalone: true,
|
||||||
|
imports: [
|
||||||
|
CommonModule,
|
||||||
|
TranslateModule,
|
||||||
|
MatIconModule,
|
||||||
|
MatChipsModule,
|
||||||
|
MatInputModule,
|
||||||
|
FullNamePipe,
|
||||||
|
ReactiveFormsModule,
|
||||||
|
MatAutocompleteModule,
|
||||||
|
InitialUsernamePipe,
|
||||||
|
MatProgressBarModule
|
||||||
|
],
|
||||||
templateUrl: './people-cloud.component.html',
|
templateUrl: './people-cloud.component.html',
|
||||||
styleUrls: ['./people-cloud.component.scss'],
|
styleUrls: ['./people-cloud.component.scss'],
|
||||||
animations: [
|
animations: [
|
||||||
@@ -51,7 +72,7 @@ import { MatFormFieldAppearance, SubscriptSizing } from '@angular/material/form-
|
|||||||
transition('void => enter', [style({ opacity: 0, transform: 'translateY(-100%)' }), animate('300ms cubic-bezier(0.55, 0, 0.55, 0.2)')])
|
transition('void => enter', [style({ opacity: 0, transform: 'translateY(-100%)' }), animate('300ms cubic-bezier(0.55, 0, 0.55, 0.2)')])
|
||||||
])
|
])
|
||||||
],
|
],
|
||||||
providers: [FullNamePipe],
|
providers: [FullNamePipe, { provide: IDENTITY_USER_SERVICE_TOKEN, useExisting: IdentityUserService }],
|
||||||
encapsulation: ViewEncapsulation.None
|
encapsulation: ViewEncapsulation.None
|
||||||
})
|
})
|
||||||
export class PeopleCloudComponent implements OnInit, OnChanges, OnDestroy, AfterViewInit {
|
export class PeopleCloudComponent implements OnInit, OnChanges, OnDestroy, AfterViewInit {
|
||||||
|
|||||||
@@ -17,17 +17,12 @@
|
|||||||
|
|
||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { PeopleCloudComponent } from './components/people-cloud.component';
|
import { PeopleCloudComponent } from './components/people-cloud.component';
|
||||||
import { CommonModule } from '@angular/common';
|
|
||||||
import { MaterialModule } from '../material.module';
|
|
||||||
import { CoreModule, FullNamePipe, InitialUsernamePipe } from '@alfresco/adf-core';
|
|
||||||
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
||||||
import { IdentityUserService } from './services/identity-user.service';
|
import { IdentityUserService } from './services/identity-user.service';
|
||||||
import { IDENTITY_USER_SERVICE_TOKEN } from './services/identity-user-service.token';
|
import { IDENTITY_USER_SERVICE_TOKEN } from './services/identity-user-service.token';
|
||||||
import { MatProgressBarModule } from '@angular/material/progress-bar';
|
|
||||||
|
|
||||||
|
/** @deprecated Use `PeopleCloudComponent` instead */
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [CommonModule, MaterialModule, FormsModule, ReactiveFormsModule, CoreModule, FullNamePipe, InitialUsernamePipe, MatProgressBarModule],
|
imports: [PeopleCloudComponent],
|
||||||
declarations: [PeopleCloudComponent],
|
|
||||||
exports: [PeopleCloudComponent],
|
exports: [PeopleCloudComponent],
|
||||||
providers: [{ provide: IDENTITY_USER_SERVICE_TOKEN, useExisting: IdentityUserService }]
|
providers: [{ provide: IDENTITY_USER_SERVICE_TOKEN, useExisting: IdentityUserService }]
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -31,11 +31,11 @@ import {
|
|||||||
PROCESS_LISTS_PREFERENCES_SERVICE_TOKEN,
|
PROCESS_LISTS_PREFERENCES_SERVICE_TOKEN,
|
||||||
TASK_LIST_PREFERENCES_SERVICE_TOKEN
|
TASK_LIST_PREFERENCES_SERVICE_TOKEN
|
||||||
} from './services/public-api';
|
} from './services/public-api';
|
||||||
import { PeopleCloudModule } from './people/people-cloud.module';
|
|
||||||
import { CloudFormRenderingService } from './form/components/cloud-form-rendering.service';
|
import { CloudFormRenderingService } from './form/components/cloud-form-rendering.service';
|
||||||
import { ApolloModule } from 'apollo-angular';
|
import { ApolloModule } from 'apollo-angular';
|
||||||
import { RichTextEditorModule } from './rich-text-editor/rich-text-editor.module';
|
import { RichTextEditorModule } from './rich-text-editor/rich-text-editor.module';
|
||||||
import { ProcessNameCloudPipe } from './pipes/process-name-cloud.pipe';
|
import { ProcessNameCloudPipe } from './pipes/process-name-cloud.pipe';
|
||||||
|
import { PeopleCloudComponent } from './people/components/people-cloud.component';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
@@ -44,7 +44,7 @@ import { ProcessNameCloudPipe } from './pipes/process-name-cloud.pipe';
|
|||||||
ProcessCloudModule,
|
ProcessCloudModule,
|
||||||
TaskCloudModule,
|
TaskCloudModule,
|
||||||
GroupCloudModule,
|
GroupCloudModule,
|
||||||
PeopleCloudModule,
|
PeopleCloudComponent,
|
||||||
FormCloudModule,
|
FormCloudModule,
|
||||||
TaskFormModule,
|
TaskFormModule,
|
||||||
ProcessNameCloudPipe,
|
ProcessNameCloudPipe,
|
||||||
@@ -59,7 +59,7 @@ import { ProcessNameCloudPipe } from './pipes/process-name-cloud.pipe';
|
|||||||
GroupCloudModule,
|
GroupCloudModule,
|
||||||
FormCloudModule,
|
FormCloudModule,
|
||||||
TaskFormModule,
|
TaskFormModule,
|
||||||
PeopleCloudModule,
|
PeopleCloudComponent,
|
||||||
ProcessNameCloudPipe,
|
ProcessNameCloudPipe,
|
||||||
RichTextEditorModule
|
RichTextEditorModule
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -23,23 +23,11 @@ import { StartTaskCloudComponent } from './components/start-task-cloud.component
|
|||||||
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
||||||
import { GroupCloudModule } from '../../group/group-cloud.module';
|
import { GroupCloudModule } from '../../group/group-cloud.module';
|
||||||
import { FormCloudModule } from '../../form/form-cloud.module';
|
import { FormCloudModule } from '../../form/form-cloud.module';
|
||||||
import { PeopleCloudModule } from '../../people/people-cloud.module';
|
import { PeopleCloudComponent } from '../../people/components/people-cloud.component';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [CommonModule, MaterialModule, FormsModule, ReactiveFormsModule, GroupCloudModule, CoreModule, FormCloudModule, PeopleCloudComponent],
|
||||||
CommonModule,
|
|
||||||
MaterialModule,
|
|
||||||
FormsModule,
|
|
||||||
ReactiveFormsModule,
|
|
||||||
GroupCloudModule,
|
|
||||||
CoreModule,
|
|
||||||
FormCloudModule,
|
|
||||||
PeopleCloudModule
|
|
||||||
],
|
|
||||||
declarations: [StartTaskCloudComponent],
|
declarations: [StartTaskCloudComponent],
|
||||||
exports: [
|
exports: [StartTaskCloudComponent]
|
||||||
StartTaskCloudComponent
|
|
||||||
]
|
|
||||||
})
|
})
|
||||||
export class StartTaskCloudModule {
|
export class StartTaskCloudModule {}
|
||||||
}
|
|
||||||
|
|||||||
@@ -23,7 +23,6 @@ import { MaterialModule } from '../../material.module';
|
|||||||
import { CoreModule } from '@alfresco/adf-core';
|
import { CoreModule } from '@alfresco/adf-core';
|
||||||
import { HttpClientModule } from '@angular/common/http';
|
import { HttpClientModule } from '@angular/common/http';
|
||||||
import { APP_LIST_CLOUD_DIRECTIVES } from './../../app/app-list-cloud.module';
|
import { APP_LIST_CLOUD_DIRECTIVES } from './../../app/app-list-cloud.module';
|
||||||
import { PeopleCloudModule } from '../../people/people-cloud.module';
|
|
||||||
import { EditServiceTaskFilterCloudComponent } from './components/edit-task-filters/edit-service-task-filter-cloud.component';
|
import { EditServiceTaskFilterCloudComponent } from './components/edit-task-filters/edit-service-task-filter-cloud.component';
|
||||||
import { EditTaskFilterCloudComponent } from './components/edit-task-filters/edit-task-filter-cloud.component';
|
import { EditTaskFilterCloudComponent } from './components/edit-task-filters/edit-task-filter-cloud.component';
|
||||||
import { TaskFilterDialogCloudComponent } from './components/task-filter-dialog/task-filter-dialog-cloud.component';
|
import { TaskFilterDialogCloudComponent } from './components/task-filter-dialog/task-filter-dialog-cloud.component';
|
||||||
@@ -32,6 +31,7 @@ import { TaskAssignmentFilterCloudComponent } from './components/task-assignment
|
|||||||
import { GroupCloudModule } from '../../group/group-cloud.module';
|
import { GroupCloudModule } from '../../group/group-cloud.module';
|
||||||
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
||||||
import { DateRangeFilterComponent } from '../../common/date-range-filter/date-range-filter.component';
|
import { DateRangeFilterComponent } from '../../common/date-range-filter/date-range-filter.component';
|
||||||
|
import { PeopleCloudComponent } from '../../people/components/people-cloud.component';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
@@ -44,7 +44,7 @@ import { DateRangeFilterComponent } from '../../common/date-range-filter/date-ra
|
|||||||
CoreModule,
|
CoreModule,
|
||||||
GroupCloudModule,
|
GroupCloudModule,
|
||||||
DateRangeFilterComponent,
|
DateRangeFilterComponent,
|
||||||
PeopleCloudModule,
|
PeopleCloudComponent,
|
||||||
MatProgressSpinnerModule
|
MatProgressSpinnerModule
|
||||||
],
|
],
|
||||||
declarations: [
|
declarations: [
|
||||||
|
|||||||
+1
-2
@@ -68,8 +68,7 @@ describe('TaskFormCloudComponent', () => {
|
|||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [ProcessServiceCloudTestingModule],
|
imports: [ProcessServiceCloudTestingModule, FormCloudComponent]
|
||||||
declarations: [FormCloudComponent]
|
|
||||||
});
|
});
|
||||||
taskDetails.status = TASK_ASSIGNED_STATE;
|
taskDetails.status = TASK_ASSIGNED_STATE;
|
||||||
taskDetails.permissions = [TASK_VIEW_PERMISSION];
|
taskDetails.permissions = [TASK_VIEW_PERMISSION];
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
import { FileViewerWidgetComponent } from './file-viewer.widget';
|
import { FileViewerWidgetComponent } from './file-viewer.widget';
|
||||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
import { FormModel, FormService, FormFieldModel, RedirectAuthService, NoopTranslateModule } from '@alfresco/adf-core';
|
import { FormModel, FormService, FormFieldModel, RedirectAuthService, NoopTranslateModule, NoopAuthModule } from '@alfresco/adf-core';
|
||||||
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
||||||
import { EMPTY, of } from 'rxjs';
|
import { EMPTY, of } from 'rxjs';
|
||||||
|
|
||||||
@@ -44,7 +44,7 @@ describe('FileViewerWidgetComponent', () => {
|
|||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [NoopTranslateModule, FileViewerWidgetComponent],
|
imports: [NoopTranslateModule, NoopAuthModule, FileViewerWidgetComponent],
|
||||||
providers: [
|
providers: [
|
||||||
{ provide: FormService, useValue: formServiceStub },
|
{ provide: FormService, useValue: formServiceStub },
|
||||||
{ provide: RedirectAuthService, useValue: { onLogin: EMPTY, onTokenReceived: of() } }
|
{ provide: RedirectAuthService, useValue: { onLogin: EMPTY, onTokenReceived: of() } }
|
||||||
|
|||||||
Reference in New Issue
Block a user