fabric8-planner
Version:
A planner front-end for Fabric8.
30 lines • 1.22 kB
JavaScript
import { Injectable } from '@angular/core';
import { Subject } from 'rxjs';
var ModalService = /** @class */ (function () {
function ModalService() {
this.clientSource = new Subject();
this.componentSource = new Subject();
this.clientSource$ = this.clientSource.asObservable();
this.componentSource$ = this.componentSource.asObservable();
}
ModalService.prototype.openModal = function (title, message, buttonText, actionKey) {
this.componentSource.next([title, message, buttonText, actionKey]);
console.log('Opened modal dialog for key ' + actionKey);
return this.clientSource$;
};
ModalService.prototype.doAction = function (actionKey) {
console.log('Received confirm action for key ' + actionKey + ', sending to clients');
this.clientSource.next(actionKey);
};
ModalService.prototype.getComponentObservable = function () {
return this.componentSource$;
};
ModalService.decorators = [
{ type: Injectable },
];
/** @nocollapse */
ModalService.ctorParameters = function () { return []; };
return ModalService;
}());
export { ModalService };
//# sourceMappingURL=modal.service.js.map