mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-26 17:24:56 +00:00
fixes and conversion
This commit is contained in:
parent
6d9838eaf4
commit
feca05e835
@ -16,8 +16,12 @@
|
||||
*/
|
||||
|
||||
import { Component, Input } from '@angular/core';
|
||||
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
@Component({
|
||||
standalone: true,
|
||||
imports: [MatProgressSpinnerModule, TranslateModule],
|
||||
templateUrl: './form-spinner.component.html',
|
||||
styleUrls: ['./form-spinner.component.scss']
|
||||
})
|
||||
|
@ -46,7 +46,6 @@ import { RichTextEditorModule } from '../rich-text-editor';
|
||||
import { A11yModule } from '@angular/cdk/a11y';
|
||||
import { OverlayModule } from '@angular/cdk/overlay';
|
||||
import { FormSpinnerComponent } from './components/spinner/form-spinner.component';
|
||||
import { FormCloudSpinnerService } from './services/spinner/form-cloud-spinner.service';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
@ -66,7 +65,8 @@ import { FormCloudSpinnerService } from './services/spinner/form-cloud-spinner.s
|
||||
AlfrescoViewerComponent,
|
||||
...CONTENT_UPLOAD_DIRECTIVES,
|
||||
...CONTENT_METADATA_DIRECTIVES,
|
||||
FormStylePipe
|
||||
FormStylePipe,
|
||||
FormSpinnerComponent
|
||||
],
|
||||
declarations: [
|
||||
FormCloudComponent,
|
||||
@ -81,8 +81,7 @@ import { FormCloudSpinnerService } from './services/spinner/form-cloud-spinner.s
|
||||
PropertiesViewerWidgetComponent,
|
||||
FilePropertiesTableCloudComponent,
|
||||
FileViewerWidgetComponent,
|
||||
DisplayRichTextWidgetComponent,
|
||||
FormSpinnerComponent
|
||||
DisplayRichTextWidgetComponent
|
||||
],
|
||||
exports: [
|
||||
FormCloudComponent,
|
||||
@ -96,7 +95,6 @@ import { FormCloudSpinnerService } from './services/spinner/form-cloud-spinner.s
|
||||
PropertiesViewerWidgetComponent,
|
||||
FileViewerWidgetComponent,
|
||||
DisplayRichTextWidgetComponent
|
||||
],
|
||||
providers: [FormCloudSpinnerService]
|
||||
]
|
||||
})
|
||||
export class FormCloudModule {}
|
||||
|
@ -18,18 +18,17 @@
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { FormCloudSpinnerService } from './form-cloud-spinner.service';
|
||||
import { OverlayModule } from '@angular/cdk/overlay';
|
||||
import { FormService, FormSpinnerEvent } from '@alfresco/adf-core';
|
||||
import { FormService, FormSpinnerEvent, NoopTranslateModule } from '@alfresco/adf-core';
|
||||
import { Subject } from 'rxjs';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
import { Component } from '@angular/core';
|
||||
import { FormSpinnerComponent } from '../../components/spinner/form-spinner.component';
|
||||
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
||||
import { MatProgressSpinnerHarness } from '@angular/material/progress-spinner/testing';
|
||||
import { PortalModule } from '@angular/cdk/portal';
|
||||
import { HarnessLoader } from '@angular/cdk/testing';
|
||||
import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed';
|
||||
|
||||
@Component({
|
||||
standalone: true,
|
||||
selector: 'adf-cloud-overlay-test',
|
||||
template: `<div>adf-cloud-overlay-test</div>`
|
||||
})
|
||||
@ -48,17 +47,15 @@ describe('FormCloudSpinnerService', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [FormSpinnerComponent, SpinnerTestComponent],
|
||||
imports: [NoopTranslateModule, FormSpinnerComponent, SpinnerTestComponent, OverlayModule, PortalModule],
|
||||
providers: [
|
||||
FormCloudSpinnerService,
|
||||
{
|
||||
provide: FormService,
|
||||
useValue: {
|
||||
toggleFormSpinner: new Subject()
|
||||
}
|
||||
}
|
||||
],
|
||||
imports: [OverlayModule, PortalModule, MatProgressSpinnerModule, TranslateModule.forRoot()]
|
||||
]
|
||||
});
|
||||
|
||||
fixture = TestBed.createComponent(SpinnerTestComponent);
|
||||
|
@ -23,7 +23,7 @@ import { Observable } from 'rxjs';
|
||||
import { takeUntil } from 'rxjs/operators';
|
||||
import { FormSpinnerComponent } from '../../components/spinner/form-spinner.component';
|
||||
|
||||
@Injectable()
|
||||
@Injectable({ providedIn: 'root' })
|
||||
export class FormCloudSpinnerService {
|
||||
private formService = inject(FormService);
|
||||
private overlay = inject(Overlay);
|
||||
|
Loading…
x
Reference in New Issue
Block a user