UNPKG

@nova-ui/dashboards

Version:

Nova Dashboards is a framework designed to provide feature developers with a common solution for presenting data coming from various sources within a single view, as well as a set of predefined widget visualizations that are 100% configuration-driven and

151 lines 5.75 kB
"use strict"; // © 2022 SolarWinds Worldwide, LLC. All rights reserved. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to // deal in the Software without restriction, including without limitation the // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or // sell copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. Object.defineProperty(exports, "__esModule", { value: true }); exports.DashwizButtonsComponent = void 0; const tslib_1 = require("tslib"); const core_1 = require("@angular/core"); let DashwizButtonsComponent = class DashwizButtonsComponent { static { this.lateLoadKey = "DashwizButtonsComponent"; } constructor(changeDetector) { this.changeDetector = changeDetector; this.busy = false; this.canFinish = false; this.canProceed = false; this.isFirstStepActive = false; this.isLastStepActive = false; this.cancel = new core_1.EventEmitter(); this.next = new core_1.EventEmitter(); this.back = new core_1.EventEmitter(); this.finish = new core_1.EventEmitter(); } onCancel() { this.cancel.emit(); } onNext() { this.next.emit(); } onBack() { this.back.emit(); } onFinish() { this.finish.emit(); } }; exports.DashwizButtonsComponent = DashwizButtonsComponent; tslib_1.__decorate([ (0, core_1.Input)(), tslib_1.__metadata("design:type", Object) ], DashwizButtonsComponent.prototype, "busy", void 0); tslib_1.__decorate([ (0, core_1.Input)(), tslib_1.__metadata("design:type", Object) ], DashwizButtonsComponent.prototype, "canFinish", void 0); tslib_1.__decorate([ (0, core_1.Input)(), tslib_1.__metadata("design:type", Object) ], DashwizButtonsComponent.prototype, "canProceed", void 0); tslib_1.__decorate([ (0, core_1.Input)(), tslib_1.__metadata("design:type", Object) ], DashwizButtonsComponent.prototype, "isFirstStepActive", void 0); tslib_1.__decorate([ (0, core_1.Input)(), tslib_1.__metadata("design:type", Object) ], DashwizButtonsComponent.prototype, "isLastStepActive", void 0); tslib_1.__decorate([ (0, core_1.Input)(), tslib_1.__metadata("design:type", String) ], DashwizButtonsComponent.prototype, "nextText", void 0); tslib_1.__decorate([ (0, core_1.Input)(), tslib_1.__metadata("design:type", String) ], DashwizButtonsComponent.prototype, "finishText", void 0); tslib_1.__decorate([ (0, core_1.Output)(), tslib_1.__metadata("design:type", Object) ], DashwizButtonsComponent.prototype, "cancel", void 0); tslib_1.__decorate([ (0, core_1.Output)(), tslib_1.__metadata("design:type", Object) ], DashwizButtonsComponent.prototype, "next", void 0); tslib_1.__decorate([ (0, core_1.Output)(), tslib_1.__metadata("design:type", Object) ], DashwizButtonsComponent.prototype, "back", void 0); tslib_1.__decorate([ (0, core_1.Output)(), tslib_1.__metadata("design:type", Object) ], DashwizButtonsComponent.prototype, "finish", void 0); exports.DashwizButtonsComponent = DashwizButtonsComponent = tslib_1.__decorate([ (0, core_1.Component)({ selector: "nui-dashwiz-buttons", template: ` <div class="d-flex justify-content-end p-4"> <button nui-button class="nui-dashwiz-buttons__cancel-button" type="button" [disabled]="busy" (click)="onCancel()" > <span i18n>Cancel</span> </button> <button *ngIf="!isFirstStepActive" class="ml-3 nui-dashwiz-buttons__back-button" nui-button icon="caret-left" type="button" [disabled]="busy" (click)="onBack()" > <span i18n>Back</span> </button> <button *ngIf="!isLastStepActive && canProceed" class="ml-3 nui-dashwiz-buttons__next-button" nui-button type="button" [displayStyle]="canFinish ? 'default' : 'primary'" [disabled]="busy" (click)="onNext()" > <span>{{ nextText }}</span> </button> <button *ngIf="canFinish || isLastStepActive" class="ml-3 nui-dashwiz-buttons__finish-button" nui-button type="button" displayStyle="primary" [isBusy]="busy" [disabled]="busy" (click)="onFinish()" > <span>{{ finishText }}</span> </button> </div> `, standalone: false, }), tslib_1.__metadata("design:paramtypes", [core_1.ChangeDetectorRef]) ], DashwizButtonsComponent); //# sourceMappingURL=dashwiz-buttons.component.js.map