diff --git a/projects/valtimo/components/src/lib/components/stepper/stepper-footer-step/stepper-footer-step.component.html b/projects/valtimo/components/src/lib/components/stepper/stepper-footer-step/stepper-footer-step.component.html index f8fc15f30..03ebf9c74 100644 --- a/projects/valtimo/components/src/lib/components/stepper/stepper-footer-step/stepper-footer-step.component.html +++ b/projects/valtimo/components/src/lib/components/stepper/stepper-footer-step/stepper-footer-step.component.html @@ -33,36 +33,31 @@ - {{ - cancelButtonTranslationKey - ? (cancelButtonTranslationKey | translate) - : ('stepper.cancelButtonText' | translate) - }} + + {{ + cancelButtonTranslationKey + ? (cancelButtonTranslationKey | translate) + : ('stepper.cancelButtonText' | translate) + }} + - {{ + + {{ nextButtonTranslationKey ? (nextButtonTranslationKey | translate) : ('stepper.nextButtonText' | translate) - }} + }} + - {{ + + {{ completeButtonTranslationKey ? (completeButtonTranslationKey | translate) : ('stepper.completeButtonText' | translate) - }} + }} + diff --git a/projects/valtimo/components/src/lib/components/stepper/stepper.module.ts b/projects/valtimo/components/src/lib/components/stepper/stepper.module.ts index 7e1f60653..4a89efc53 100644 --- a/projects/valtimo/components/src/lib/components/stepper/stepper.module.ts +++ b/projects/valtimo/components/src/lib/components/stepper/stepper.module.ts @@ -24,6 +24,7 @@ import {StepperStepComponent} from './stepper-step/stepper-step.component'; import {TranslateModule} from '@ngx-translate/core'; import {StepperFooterStepComponent} from './stepper-footer-step/stepper-footer-step.component'; import {ButtonModule} from '../button/button.module'; +import {ButtonModule as CarbonButtonModule} from 'carbon-components-angular'; /** * @deprecated Migrate old design to Carbon @@ -37,7 +38,12 @@ import {ButtonModule} from '../button/button.module'; StepperStepComponent, StepperFooterStepComponent, ], - imports: [CommonModule, TranslateModule, ButtonModule], + imports: [ + CommonModule, + TranslateModule, + ButtonModule, + CarbonButtonModule + ], exports: [ StepperContainerComponent, StepperContentComponent, diff --git a/projects/valtimo/plugin-management/src/lib/components/plugin-add-modal/plugin-add-modal.component.html b/projects/valtimo/plugin-management/src/lib/components/plugin-add-modal/plugin-add-modal.component.html index 9907db0a6..05f8c61fe 100644 --- a/projects/valtimo/plugin-management/src/lib/components/plugin-add-modal/plugin-add-modal.component.html +++ b/projects/valtimo/plugin-management/src/lib/components/plugin-add-modal/plugin-add-modal.component.html @@ -20,11 +20,11 @@ [disabled]="inputDisabled$ | async" [returnToFirstStepSubject$]="returnToFirstStepSubject$" > - - + + - - + + @@ -36,9 +36,9 @@ > - - - + + + - - + + diff --git a/projects/valtimo/plugin-management/src/lib/components/plugin-add-modal/plugin-add-modal.component.scss b/projects/valtimo/plugin-management/src/lib/components/plugin-add-modal/plugin-add-modal.component.scss index c53d3159a..ea9f945cd 100644 --- a/projects/valtimo/plugin-management/src/lib/components/plugin-add-modal/plugin-add-modal.component.scss +++ b/projects/valtimo/plugin-management/src/lib/components/plugin-add-modal/plugin-add-modal.component.scss @@ -13,3 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + +.stepper-footer { + width: 100%; +} diff --git a/projects/valtimo/plugin-management/src/lib/components/plugin-add-modal/plugin-add-modal.component.ts b/projects/valtimo/plugin-management/src/lib/components/plugin-add-modal/plugin-add-modal.component.ts index 1c3ce6076..30abca603 100644 --- a/projects/valtimo/plugin-management/src/lib/components/plugin-add-modal/plugin-add-modal.component.ts +++ b/projects/valtimo/plugin-management/src/lib/components/plugin-add-modal/plugin-add-modal.component.ts @@ -14,11 +14,10 @@ * limitations under the License. */ -import {Component, OnInit, ViewChild} from '@angular/core'; +import {Component, EventEmitter, Input, Output} from '@angular/core'; import {PluginManagementStateService} from '../../services'; import {take} from 'rxjs/operators'; -import {VModalComponent, ModalService} from '@valtimo/components'; -import {BehaviorSubject, Subject, Subscription} from 'rxjs'; +import {BehaviorSubject, Subject} from 'rxjs'; import {PluginConfigurationData, PluginManagementService} from '@valtimo/plugin'; import {NGXLogger} from 'ngx-logger'; @@ -27,29 +26,22 @@ import {NGXLogger} from 'ngx-logger'; templateUrl: './plugin-add-modal.component.html', styleUrls: ['./plugin-add-modal.component.scss'], }) -export class PluginAddModalComponent implements OnInit { - @ViewChild('pluginAddModal') pluginAddModal: VModalComponent; +export class PluginAddModalComponent { + @Input() open = false; + + @Output() closeModal: EventEmitter = new EventEmitter(); readonly inputDisabled$ = this.stateService.inputDisabled$; readonly selectedPluginDefinition$ = this.stateService.selectedPluginDefinition$; readonly configurationValid$ = new BehaviorSubject(false); readonly returnToFirstStepSubject$ = new Subject(); - private showSubscription!: Subscription; - private hideSubscription!: Subscription; - constructor( private readonly stateService: PluginManagementStateService, - private readonly modalService: ModalService, private readonly pluginManagementService: PluginManagementService, private readonly logger: NGXLogger ) {} - ngOnInit(): void { - this.openShowSubscription(); - this.openHideSubscription(); - } - complete(): void { this.stateService.save(); } @@ -59,12 +51,10 @@ export class PluginAddModalComponent implements OnInit { } hide(): void { - this.stateService.disableInput(); - this.modalService.closeModal(() => { - this.returnToFirstStep(); - this.stateService.enableInput(); - this.stateService.clear(); - }); + this.closeModal.emit(); + this.returnToFirstStep(); + this.stateService.enableInput(); + this.stateService.clear(); } onValid(valid: boolean): void { @@ -98,25 +88,7 @@ export class PluginAddModalComponent implements OnInit { }); } - private openShowSubscription(): void { - this.showSubscription = this.stateService.showModal$.subscribe(modalType => { - if (modalType === 'add') { - this.show(); - } - }); - } - - private openHideSubscription(): void { - this.hideSubscription = this.stateService.hideModal$.subscribe(() => { - this.hide(); - }); - } - private returnToFirstStep(): void { this.returnToFirstStepSubject$.next(true); } - - private show(): void { - this.modalService.openModal(this.pluginAddModal); - } } diff --git a/projects/valtimo/plugin-management/src/lib/components/plugin-edit-modal/plugin-edit-modal.component.html b/projects/valtimo/plugin-management/src/lib/components/plugin-edit-modal/plugin-edit-modal.component.html index 02790bf60..997efebe5 100644 --- a/projects/valtimo/plugin-management/src/lib/components/plugin-edit-modal/plugin-edit-modal.component.html +++ b/projects/valtimo/plugin-management/src/lib/components/plugin-edit-modal/plugin-edit-modal.component.html @@ -14,42 +14,39 @@ ~ limitations under the License. --> - - - - {{ - obs.selectedConfiguration?.title + - ' - ' + - ('title' | pluginTranslate: obs.selectedConfiguration?.pluginDefinition?.key | async) - }} - - - + + {{ + obs.selectedConfiguration?.title + + ' - ' + + ('title' | pluginTranslate: obs.selectedConfiguration?.pluginDefinition?.key | async) + }} + + - - - - {{ 'pluginManagement.remove' | translate }} - {{ 'pluginManagement.save' | translate }} - - - + + + + {{ 'pluginManagement.remove' | translate }} + + + {{ 'pluginManagement.save' | translate }} + + + diff --git a/projects/valtimo/plugin-management/src/lib/components/plugin-edit-modal/plugin-edit-modal.component.scss b/projects/valtimo/plugin-management/src/lib/components/plugin-edit-modal/plugin-edit-modal.component.scss index 3782e72d6..c53d3159a 100644 --- a/projects/valtimo/plugin-management/src/lib/components/plugin-edit-modal/plugin-edit-modal.component.scss +++ b/projects/valtimo/plugin-management/src/lib/components/plugin-edit-modal/plugin-edit-modal.component.scss @@ -13,15 +13,3 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - -.edit-plugin-buttons { - display: flex; - width: 100%; - justify-content: space-between; -} - -.edit-configuration-title { - display: flex; - width: 100%; - justify-content: center; -} diff --git a/projects/valtimo/plugin-management/src/lib/components/plugin-edit-modal/plugin-edit-modal.component.ts b/projects/valtimo/plugin-management/src/lib/components/plugin-edit-modal/plugin-edit-modal.component.ts index 3ce3e0d13..7965ae805 100644 --- a/projects/valtimo/plugin-management/src/lib/components/plugin-edit-modal/plugin-edit-modal.component.ts +++ b/projects/valtimo/plugin-management/src/lib/components/plugin-edit-modal/plugin-edit-modal.component.ts @@ -14,11 +14,10 @@ * limitations under the License. */ -import {Component, OnInit, ViewChild} from '@angular/core'; +import {Component, EventEmitter, Input, Output} from '@angular/core'; import {PluginManagementStateService} from '../../services'; import {take} from 'rxjs/operators'; -import {VModalComponent, ModalService} from '@valtimo/components'; -import {BehaviorSubject, Observable, Subject, Subscription} from 'rxjs'; +import {BehaviorSubject, Observable} from 'rxjs'; import { PluginConfigurationData, PluginConfiguration, @@ -31,29 +30,22 @@ import {NGXLogger} from 'ngx-logger'; templateUrl: './plugin-edit-modal.component.html', styleUrls: ['./plugin-edit-modal.component.scss'], }) -export class PluginEditModalComponent implements OnInit { - @ViewChild('pluginEditModal') pluginEditModal: VModalComponent; +export class PluginEditModalComponent { + @Input() open = false; + + @Output() closeModal: EventEmitter = new EventEmitter(); readonly inputDisabled$ = this.stateService.inputDisabled$; readonly selectedPluginConfiguration$: Observable = this.stateService.selectedPluginConfiguration$; readonly configurationValid$ = new BehaviorSubject(false); - private showSubscription!: Subscription; - private hideSubscription!: Subscription; - constructor( private readonly stateService: PluginManagementStateService, - private readonly modalService: ModalService, private readonly pluginManagementService: PluginManagementService, private readonly logger: NGXLogger ) {} - ngOnInit(): void { - this.openShowSubscription(); - this.openHideSubscription(); - } - save(): void { this.stateService.saveEdit(); } @@ -79,18 +71,16 @@ export class PluginEditModalComponent implements OnInit { }); } - hide(): void { - this.modalService.closeModal(() => { - this.stateService.enableInput(); - this.stateService.clear(); - }); + public hide(): void { + this.closeModal.emit(); + this.stateService.enableInput(); } - onPluginValid(valid: boolean): void { + public onPluginValid(valid: boolean): void { this.configurationValid$.next(valid); } - onPluginConfiguration(configuration: PluginConfigurationData): void { + public onPluginConfiguration(configuration: PluginConfigurationData): void { this.stateService.disableInput(); this.stateService.selectedPluginConfiguration$ @@ -120,22 +110,4 @@ export class PluginEditModalComponent implements OnInit { ); }); } - - private openShowSubscription(): void { - this.showSubscription = this.stateService.showModal$.subscribe(modalType => { - if (modalType === 'edit') { - this.show(); - } - }); - } - - private openHideSubscription(): void { - this.hideSubscription = this.stateService.hideModal$.subscribe(() => { - this.hide(); - }); - } - - private show(): void { - this.modalService.openModal(this.pluginEditModal); - } } diff --git a/projects/valtimo/plugin-management/src/lib/components/plugin-management/plugin-management.component.html b/projects/valtimo/plugin-management/src/lib/components/plugin-management/plugin-management.component.html index b5b3a85e4..c8428e9a5 100644 --- a/projects/valtimo/plugin-management/src/lib/components/plugin-management/plugin-management.component.html +++ b/projects/valtimo/plugin-management/src/lib/components/plugin-management/plugin-management.component.html @@ -44,6 +44,12 @@ - + - + diff --git a/projects/valtimo/plugin-management/src/lib/components/plugin-management/plugin-management.component.ts b/projects/valtimo/plugin-management/src/lib/components/plugin-management/plugin-management.component.ts index d062bfee0..10ceecdf9 100644 --- a/projects/valtimo/plugin-management/src/lib/components/plugin-management/plugin-management.component.ts +++ b/projects/valtimo/plugin-management/src/lib/components/plugin-management/plugin-management.component.ts @@ -62,6 +62,8 @@ export class PluginManagementComponent { ]; public readonly loading$ = new BehaviorSubject(true); + public readonly showEditModal$ = new BehaviorSubject(false); + public readonly showAddModal$ = new BehaviorSubject(false); public readonly pluginConfigurations$ = this.stateService.refresh$.pipe( switchMap(() => combineLatest([ @@ -93,12 +95,12 @@ export class PluginManagementComponent { ) {} public showAddModal(): void { - this.stateService.showModal('add'); + this.showAddModal$.next(true); } public editConfiguration(configuration: PluginConfiguration): void { + this.showEditModal$.next(true); this.stateService.selectPluginConfiguration(configuration); - this.stateService.showModal('edit'); } public deleteConfiguration(configuration: PluginConfiguration): void { @@ -118,4 +120,12 @@ export class PluginManagementComponent { }, }); } + + public closeEditModal(): void { + this.showEditModal$.next(false); + } + + public closeAddModal(): void { + this.showAddModal$.next(false); + } } diff --git a/projects/valtimo/plugin-management/src/lib/plugin-management.module.ts b/projects/valtimo/plugin-management/src/lib/plugin-management.module.ts index 32555b551..5e7a3414c 100644 --- a/projects/valtimo/plugin-management/src/lib/plugin-management.module.ts +++ b/projects/valtimo/plugin-management/src/lib/plugin-management.module.ts @@ -37,7 +37,11 @@ import { TitleModule, CarbonListModule, } from '@valtimo/components'; -import {IconModule, ButtonModule as CarbonButtonModule} from 'carbon-components-angular'; +import { + IconModule, + ButtonModule as CarbonButtonModule, + ModalModule as CarbonModalModule, +} from 'carbon-components-angular'; @NgModule({ providers: [PluginManagementStateService], @@ -65,6 +69,7 @@ import {IconModule, ButtonModule as CarbonButtonModule} from 'carbon-components- PluginConfigurationContainerModule, CarbonButtonModule, CarbonListModule, + CarbonModalModule, IconModule, ], exports: [ diff --git a/projects/valtimo/plugin/src/lib/components/default-plugin-configuration/default-plugin-configuration.component.html b/projects/valtimo/plugin/src/lib/components/default-plugin-configuration/default-plugin-configuration.component.html index f3aa797b5..5d3579532 100644 --- a/projects/valtimo/plugin/src/lib/components/default-plugin-configuration/default-plugin-configuration.component.html +++ b/projects/valtimo/plugin/src/lib/components/default-plugin-configuration/default-plugin-configuration.component.html @@ -29,7 +29,6 @@ [defaultValue]="obs.prefill?.configurationId" [required]="false" [tooltip]="'plugin.configurationIdTooltip' | translate" - [widthPx]="350" placeholder="00000000-0000-0000-0000-000000000000" > diff --git a/projects/valtimo/plugin/src/lib/plugins/besluiten-api/components/besluiten-api-configuration/besluiten-api-configuration.component.html b/projects/valtimo/plugin/src/lib/plugins/besluiten-api/components/besluiten-api-configuration/besluiten-api-configuration.component.html index 01e245819..c4f6418bb 100644 --- a/projects/valtimo/plugin/src/lib/plugins/besluiten-api/components/besluiten-api-configuration/besluiten-api-configuration.component.html +++ b/projects/valtimo/plugin/src/lib/plugins/besluiten-api/components/besluiten-api-configuration/besluiten-api-configuration.component.html @@ -29,7 +29,6 @@ [defaultValue]="obs.prefill?.configurationTitle" [required]="true" [tooltip]="'configurationTitleTooltip' | pluginTranslate: pluginId | async" - [widthPx]="350" placeholder="Besluiten API Plugin" > @@ -41,14 +40,12 @@ [defaultValue]="obs.prefill?.rsin" [required]="true" [tooltip]="'rsinTooltip' | pluginTranslate: pluginId | async" - [widthPx]="350" placeholder="123456789" > @@ -65,7 +62,6 @@ [loading]="!authObs.authenticationPluginSelectItems" [items]="authObs.authenticationPluginSelectItems" [margin]="true" - [widthInPx]="350" name="authenticationPluginConfiguration" [title]="'authenticationPluginConfiguration' | pluginTranslate: pluginId | async" [disabled]="obs.disabled" @@ -79,7 +75,6 @@ [loading]="!pObs.apiVersionItems" [items]="pObs.apiVersionItems" [margin]="true" - [widthInPx]="350" name="apiVersion" [title]="'apiVersion' | pluginTranslate: pluginId | async" [disabled]="obs.disabled" diff --git a/projects/valtimo/plugin/src/lib/plugins/exact/components/exact-plugin-configuration/exact-plugin-configuration.component.html b/projects/valtimo/plugin/src/lib/plugins/exact/components/exact-plugin-configuration/exact-plugin-configuration.component.html index 94b1b04c7..2f9ec31ba 100644 --- a/projects/valtimo/plugin/src/lib/plugins/exact/components/exact-plugin-configuration/exact-plugin-configuration.component.html +++ b/projects/valtimo/plugin/src/lib/plugins/exact/components/exact-plugin-configuration/exact-plugin-configuration.component.html @@ -29,7 +29,6 @@ [defaultValue]="obs.prefill?.configurationTitle" [required]="true" [tooltip]="'configurationTitleTooltip' | pluginTranslate: pluginId | async" - [widthPx]="350" > diff --git a/projects/valtimo/plugin/src/lib/plugins/notificaties-api/components/notificaties-api-configuration/notificaties-api-configuration.component.html b/projects/valtimo/plugin/src/lib/plugins/notificaties-api/components/notificaties-api-configuration/notificaties-api-configuration.component.html index 52b9b806e..39829e17d 100644 --- a/projects/valtimo/plugin/src/lib/plugins/notificaties-api/components/notificaties-api-configuration/notificaties-api-configuration.component.html +++ b/projects/valtimo/plugin/src/lib/plugins/notificaties-api/components/notificaties-api-configuration/notificaties-api-configuration.component.html @@ -29,14 +29,12 @@ [defaultValue]="obs.prefill?.configurationTitle" [required]="true" [tooltip]="'configurationTitleTooltip' | pluginTranslate: pluginId | async" - [widthPx]="350" placeholder="Notificaties API Plugin" > diff --git a/projects/valtimo/plugin/src/lib/plugins/objecten-api/components/objecten-api-configuration/objecten-api-configuration.component.html b/projects/valtimo/plugin/src/lib/plugins/objecten-api/components/objecten-api-configuration/objecten-api-configuration.component.html index 9c64fac5b..fcf4ee671 100644 --- a/projects/valtimo/plugin/src/lib/plugins/objecten-api/components/objecten-api-configuration/objecten-api-configuration.component.html +++ b/projects/valtimo/plugin/src/lib/plugins/objecten-api/components/objecten-api-configuration/objecten-api-configuration.component.html @@ -29,14 +29,12 @@ [defaultValue]="obs.prefill?.configurationTitle" [required]="true" [tooltip]="'configurationTitleTooltip' | pluginTranslate: pluginId | async" - [widthPx]="350" placeholder="Objecten API Plugin" > diff --git a/projects/valtimo/plugin/src/lib/plugins/portaaltaak/components/portaaltaak-configuration/portaaltaak-configuration.component.html b/projects/valtimo/plugin/src/lib/plugins/portaaltaak/components/portaaltaak-configuration/portaaltaak-configuration.component.html index 0d0c23987..b05090b5c 100644 --- a/projects/valtimo/plugin/src/lib/plugins/portaaltaak/components/portaaltaak-configuration/portaaltaak-configuration.component.html +++ b/projects/valtimo/plugin/src/lib/plugins/portaaltaak/components/portaaltaak-configuration/portaaltaak-configuration.component.html @@ -29,7 +29,6 @@ [defaultValue]="obs.prefill?.configurationTitle" [required]="true" [tooltip]="'configurationTitleTooltip' | pluginTranslate: pluginId | async" - [widthPx]="350" placeholder="Portaaltaak Plugin" > @@ -39,7 +38,6 @@ @@ -36,7 +35,6 @@ @@ -63,7 +60,6 @@ [disabled]="obs.disabled" [defaultValue]="obs.prefill?.password" [required]="true" - [widthPx]="350" > diff --git a/projects/valtimo/plugin/src/lib/plugins/verzoek/components/verzoek-configuration/verzoek-configuration.component.html b/projects/valtimo/plugin/src/lib/plugins/verzoek/components/verzoek-configuration/verzoek-configuration.component.html index 35868f0f5..28d9e1d7f 100644 --- a/projects/valtimo/plugin/src/lib/plugins/verzoek/components/verzoek-configuration/verzoek-configuration.component.html +++ b/projects/valtimo/plugin/src/lib/plugins/verzoek/components/verzoek-configuration/verzoek-configuration.component.html @@ -29,7 +29,6 @@ [defaultValue]="obs.prefill?.configurationTitle" [required]="true" [tooltip]="'configurationTitleTooltip' | pluginTranslate: pluginId | async" - [widthPx]="350" placeholder="Verzoek Plugin" > @@ -39,7 +38,6 @@ @@ -111,7 +107,6 @@ [defaultValue]="prefill?.type" [required]="true" [tooltip]="'typeTooltip' | pluginTranslate: pluginId | async" - [widthPx]="350" [smallMargin]="true" placeholder="" > @@ -120,7 +115,6 @@ @@ -177,7 +168,6 @@ {{ 'setMapping' | pluginTranslate: pluginId | async }} [defaultValues]="mappings[uuid] || prefill?.mapping" [valueColumnTitle]="'target' | pluginTranslate: pluginId | async" [keyColumnTitle]="'source' | pluginTranslate: pluginId | async" - [fullWidth]="true" > diff --git a/projects/valtimo/plugin/src/lib/plugins/zaken-api/components/zaken-api-configuration/zaken-api-configuration.component.html b/projects/valtimo/plugin/src/lib/plugins/zaken-api/components/zaken-api-configuration/zaken-api-configuration.component.html index d907f994f..78e18651e 100644 --- a/projects/valtimo/plugin/src/lib/plugins/zaken-api/components/zaken-api-configuration/zaken-api-configuration.component.html +++ b/projects/valtimo/plugin/src/lib/plugins/zaken-api/components/zaken-api-configuration/zaken-api-configuration.component.html @@ -29,14 +29,12 @@ [defaultValue]="obs.prefill?.configurationTitle" [required]="true" [tooltip]="'configurationTitleTooltip' | pluginTranslate: pluginId | async" - [widthPx]="350" placeholder="Zaken API Plugin" >