diff --git a/projects/frontend/data-pipelines/gui/projects/data-pipelines/src/lib/components/data-job/pages/details/data-job-details-page.component.spec.ts b/projects/frontend/data-pipelines/gui/projects/data-pipelines/src/lib/components/data-job/pages/details/data-job-details-page.component.spec.ts index 167cef3e86..ab7c9f0741 100644 --- a/projects/frontend/data-pipelines/gui/projects/data-pipelines/src/lib/components/data-job/pages/details/data-job-details-page.component.spec.ts +++ b/projects/frontend/data-pipelines/gui/projects/data-pipelines/src/lib/components/data-job/pages/details/data-job-details-page.component.spec.ts @@ -11,7 +11,7 @@ import { RouterTestingModule } from '@angular/router/testing'; import { BehaviorSubject, of, Subject } from 'rxjs'; -import { FORM_STATE, VMWFormState } from '@versatiledatakit/shared'; +import { FORM_STATE, VdkFormState } from '@versatiledatakit/shared'; import { ComponentModel, @@ -307,7 +307,7 @@ describe('DataJobsDetailsModalComponent', () => { describe('sectionStateChange', () => { it('makes expected calls for FORM_STATE.SUBMIT', () => { - const vMWFormStateStub = {} as VMWFormState; + const vMWFormStateStub = {} as VdkFormState; vMWFormStateStub.state = FORM_STATE.SUBMIT; spyOn(component, 'submitForm').and.callThrough(); @@ -318,7 +318,7 @@ describe('DataJobsDetailsModalComponent', () => { describe('sectionStateChange', () => { it('makes expected calls for FORM_STATE.CAN_EDIT', () => { - const vMWFormStateStub = {} as VMWFormState; + const vMWFormStateStub = {} as VdkFormState; vMWFormStateStub.state = FORM_STATE.CAN_EDIT; component.sectionStateChange(vMWFormStateStub); expect(component.canEditSection).toBeTrue(); @@ -327,7 +327,7 @@ describe('DataJobsDetailsModalComponent', () => { describe('sectionStateChange', () => { it('makes expected calls for FORM_STATE.EDIT', () => { - const vMWFormStateStub = {} as VMWFormState; + const vMWFormStateStub = {} as VdkFormState; vMWFormStateStub.state = FORM_STATE.EDIT; component.sectionStateChange(vMWFormStateStub); @@ -337,7 +337,7 @@ describe('DataJobsDetailsModalComponent', () => { describe('doSubmit', () => { it('makes expected calls for emittingSection description', () => { - const vMWFormStateStub = {} as VMWFormState; + const vMWFormStateStub = {} as VdkFormState; vMWFormStateStub.emittingSection = 'description'; spyOn(component, 'isDescriptionSubmitEnabled').and.callThrough(); @@ -346,7 +346,7 @@ describe('DataJobsDetailsModalComponent', () => { }); it('makes expected calls for emittingSection status', () => { - const vMWFormStateStub = {} as VMWFormState; + const vMWFormStateStub = {} as VdkFormState; vMWFormStateStub.emittingSection = 'status'; spyOn(component, 'isStatusSubmitEnabled').and.callThrough(); diff --git a/projects/frontend/data-pipelines/gui/projects/data-pipelines/src/lib/components/data-job/pages/details/data-job-details-page.component.ts b/projects/frontend/data-pipelines/gui/projects/data-pipelines/src/lib/components/data-job/pages/details/data-job-details-page.component.ts index c859f158ab..3f9c2d468f 100644 --- a/projects/frontend/data-pipelines/gui/projects/data-pipelines/src/lib/components/data-job/pages/details/data-job-details-page.component.ts +++ b/projects/frontend/data-pipelines/gui/projects/data-pipelines/src/lib/components/data-job/pages/details/data-job-details-page.component.ts @@ -11,7 +11,7 @@ import { take } from 'rxjs/operators'; import { FORM_STATE, - VMWFormState, + VdkFormState, VmwToastType, } from '@versatiledatakit/shared'; @@ -113,9 +113,9 @@ export class DataJobDetailsPageComponent allowExecutionsByDeployment = false; tmForm: FormGroup; - formState: VMWFormState; - readFormState: VMWFormState; - editableFormState: VMWFormState; + formState: VdkFormState; + readFormState: VdkFormState; + editableFormState: VdkFormState; canEditSection = true; @@ -161,9 +161,9 @@ export class DataJobDetailsPageComponent ) { super(componentService, navigationService, activatedRoute); - this.formState = new VMWFormState(FORM_STATE.VIEW); - this.readFormState = new VMWFormState(FORM_STATE.VIEW); - this.editableFormState = new VMWFormState(FORM_STATE.CAN_EDIT); + this.formState = new VdkFormState(FORM_STATE.VIEW); + this.readFormState = new VdkFormState(FORM_STATE.VIEW); + this.editableFormState = new VdkFormState(FORM_STATE.CAN_EDIT); this.confirmationOptions = new ConfirmationModalOptions(); this.deleteOptions = new DeleteModalOptions(); @@ -195,7 +195,7 @@ export class DataJobDetailsPageComponent return !notifications || notifications.length < 1; } - sectionStateChange(sectionState: VMWFormState) { + sectionStateChange(sectionState: VdkFormState) { if (sectionState.state === FORM_STATE.CAN_EDIT) { switch (sectionState.emittingSection) { case 'status': @@ -219,7 +219,7 @@ export class DataJobDetailsPageComponent } } - submitForm(event: VMWFormState) { + submitForm(event: VdkFormState) { if ( event.emittingSection === 'description' && this.isDescriptionSubmitEnabled() @@ -236,7 +236,7 @@ export class DataJobDetailsPageComponent } editOperationEnded() { - this.formState = new VMWFormState(FORM_STATE.CAN_EDIT); + this.formState = new VdkFormState(FORM_STATE.CAN_EDIT); this.canEditSection = true; } diff --git a/projects/frontend/data-pipelines/gui/projects/data-pipelines/src/lib/data-pipelines.module.ts b/projects/frontend/data-pipelines/gui/projects/data-pipelines/src/lib/data-pipelines.module.ts index 3c29b054dd..4bab8fecdb 100644 --- a/projects/frontend/data-pipelines/gui/projects/data-pipelines/src/lib/data-pipelines.module.ts +++ b/projects/frontend/data-pipelines/gui/projects/data-pipelines/src/lib/data-pipelines.module.ts @@ -23,7 +23,7 @@ import { ClrSpinnerModule, } from '@clr/angular'; -import { VmwComponentsModule } from '@versatiledatakit/shared'; +import { VdkComponentsModule } from '@versatiledatakit/shared'; import { TaurusSharedNgRxModule } from '@versatiledatakit/shared'; @@ -102,7 +102,7 @@ const routes: Routes = []; imports: [ CommonModule, RouterModule.forChild(routes), - VmwComponentsModule.forRoot(), + VdkComponentsModule.forRoot(), ClrDatagridModule, ClrSpinnerModule, ClarityModule, diff --git a/projects/frontend/data-pipelines/gui/projects/ui/src/app/app.module.ts b/projects/frontend/data-pipelines/gui/projects/ui/src/app/app.module.ts index 4d58c52e7a..6567c44fa7 100644 --- a/projects/frontend/data-pipelines/gui/projects/ui/src/app/app.module.ts +++ b/projects/frontend/data-pipelines/gui/projects/ui/src/app/app.module.ts @@ -17,7 +17,7 @@ import { ApolloModule } from 'apollo-angular'; import { ClarityModule } from '@clr/angular'; -import { VmwComponentsModule } from '@versatiledatakit/shared'; +import { VdkComponentsModule } from '@versatiledatakit/shared'; import { TaurusSharedCoreModule, @@ -51,7 +51,7 @@ export function lottiePlayerLoader() { TaurusSharedNgRxModule.forRootWithDevtools(), TimeagoModule.forRoot(), LottieModule.forRoot({ player: lottiePlayerLoader }), - VmwComponentsModule.forRoot(), + VdkComponentsModule.forRoot(), DataPipelinesModule.forRoot({ defaultOwnerTeamName: 'taurus', manageConfig: { diff --git a/projects/frontend/shared-components/gui/projects/shared/src/lib/commons/ngx-components/form-section-container/form-section-container.component.spec.ts b/projects/frontend/shared-components/gui/projects/shared/src/lib/commons/ngx-components/form-section-container/form-section-container.component.spec.ts index 8048c18179..bb82227899 100644 --- a/projects/frontend/shared-components/gui/projects/shared/src/lib/commons/ngx-components/form-section-container/form-section-container.component.spec.ts +++ b/projects/frontend/shared-components/gui/projects/shared/src/lib/commons/ngx-components/form-section-container/form-section-container.component.spec.ts @@ -17,7 +17,7 @@ import { By } from '@angular/platform-browser'; import { ClarityModule } from '@clr/angular'; -import { FORM_STATE, VDKFormState } from './form-section-container.component'; +import { FORM_STATE, VdkFormState } from './form-section-container.component'; import { VdkFormSectionComponent } from '../form-section'; import { VdkSimpleTranslateModule, @@ -108,7 +108,7 @@ class PageObject { class TestHostComponent { @ViewChild(VdkFormSectionContainerComponent, { static: false }) child: VdkFormSectionContainerComponent; - formState: VDKFormState; + formState: VdkFormState; editProfileForm = new FormGroup({ firstName: new FormControl() @@ -228,7 +228,7 @@ describe('Form Section Container Component', () => { fixture.detectChanges(); expect(saveButton.disabled).toEqual(true, 'Save to be disabled'); - hostComp.formState = new VDKFormState(FORM_STATE.CAN_EDIT); + hostComp.formState = new VdkFormState(FORM_STATE.CAN_EDIT); fixture.detectChanges(); expect(page.getReadOnlySectionElements().length).toBe( diff --git a/projects/frontend/shared-components/gui/projects/shared/src/lib/commons/ngx-components/form-section-container/form-section-container.component.ts b/projects/frontend/shared-components/gui/projects/shared/src/lib/commons/ngx-components/form-section-container/form-section-container.component.ts index 5d1577c7b1..eb8f99b34d 100644 --- a/projects/frontend/shared-components/gui/projects/shared/src/lib/commons/ngx-components/form-section-container/form-section-container.component.ts +++ b/projects/frontend/shared-components/gui/projects/shared/src/lib/commons/ngx-components/form-section-container/form-section-container.component.ts @@ -25,7 +25,7 @@ export enum FORM_STATE { ERROR, SUBMIT } -export class VDKFormState { +export class VdkFormState { state: FORM_STATE; /** @@ -73,7 +73,7 @@ export class VdkFormSectionContainerComponent { @Input() cancelBtnAriaLabel = 'Cancel'; //Cancel button text @Input() saveBtnAriaLabel = 'Save'; //Save button text - @Input('formState') set formState(_formState: VDKFormState) { + @Input('formState') set formState(_formState: VdkFormState) { if (!_formState) { return; } @@ -133,7 +133,7 @@ export class VdkFormSectionContainerComponent { clickEdit() { this.formStateChange.emit( - new VDKFormState(FORM_STATE.CAN_EDIT, [], this.sectionName) + new VdkFormState(FORM_STATE.CAN_EDIT, [], this.sectionName) ); if (this.cspForm) { this.cspForm.form.enable(); @@ -150,7 +150,7 @@ export class VdkFormSectionContainerComponent { // @ts-ignore clickSave(): boolean { this.formStateChange.emit( - new VDKFormState(FORM_STATE.VIEW, [], this.sectionName) + new VdkFormState(FORM_STATE.VIEW, [], this.sectionName) ); this.changeSectionState(FORM_STATE.SUBMIT); if (this.cspForm) { @@ -169,7 +169,7 @@ export class VdkFormSectionContainerComponent { changeSectionState(_sectionState: FORM_STATE) { if (_sectionState !== this._sectionState) { this.sectionStateChange.emit( - new VDKFormState(_sectionState, [], this.sectionName) + new VdkFormState(_sectionState, [], this.sectionName) ); this._sectionState = _sectionState; }