moh-common-lib
Version:
A library of Angular components, services, and styles for B.C. Government Ministry of Health (MoH).
74 lines • 6.29 kB
JavaScript
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
import * as tslib_1 from "tslib";
import { Component, Input } from '@angular/core';
import { Base } from '../../models/base';
/** @enum {string} */
var ApiStatusCodes = {
SUCCESS: '0',
ERROR: '1',
WARNING: '2',
};
export { ApiStatusCodes };
var ConfirmTemplateComponent = /** @class */ (function (_super) {
tslib_1.__extends(ConfirmTemplateComponent, _super);
function ConfirmTemplateComponent() {
var _this = _super.call(this) || this;
_this.displayIcon = ApiStatusCodes.SUCCESS;
return _this;
}
Object.defineProperty(ConfirmTemplateComponent.prototype, "successCode", {
// Status codes
get:
// Status codes
/**
* @return {?}
*/
function () {
return ApiStatusCodes.SUCCESS;
},
enumerable: true,
configurable: true
});
Object.defineProperty(ConfirmTemplateComponent.prototype, "errorCode", {
get: /**
* @return {?}
*/
function () {
return ApiStatusCodes.ERROR;
},
enumerable: true,
configurable: true
});
Object.defineProperty(ConfirmTemplateComponent.prototype, "warningCode", {
get: /**
* @return {?}
*/
function () {
return ApiStatusCodes.WARNING;
},
enumerable: true,
configurable: true
});
ConfirmTemplateComponent.decorators = [
{ type: Component, args: [{
selector: 'common-confirm-template',
template: "<ng-content select=\"[confirmationTitle]\"></ng-content>\r\n<common-page-section layout='noTips'>\r\n\r\n <!-- Icons and confirmation messages -->\r\n <div [ngSwitch]=\"displayIcon\">\r\n <ng-container *ngSwitchCase=\"successCode\">\r\n <div class=\"message-container border-success\">\r\n <p class=\"confirm-icon--success\">\r\n <i class=\"fa fa-2x fa-check-circle text-success pr-2\" aria-label=\"success\"></i>\r\n </p>\r\n <ng-container *ngTemplateOutlet=\"message\"></ng-container>\r\n </div>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"errorCode\">\r\n <div class=\"message-container border-danger\">\r\n <p class=\"confirm-icon--error\">\r\n <i class=\"fa fa-2x fa-exclamation-triangle text-danger pr-2\" aria-label=\"error\"></i>\r\n </p>\r\n <ng-container *ngTemplateOutlet=\"message\"></ng-container>\r\n </div>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"warningCode\">\r\n <div class=\"message-container border-warning\">\r\n <p class=\"confirm-icon--warning\">\r\n <i class=\"fa fa-2x fa-exclamation-circle text-warning pr-2\" aria-label=\"warning\"></i>\r\n </p>\r\n <ng-container *ngTemplateOutlet=\"message\"></ng-container>\r\n </div>\r\n </ng-container>\r\n </div>\r\n</common-page-section>\r\n\r\n<ng-content select=\"[AdditionalInfo]\"></ng-content>\r\n\r\n<ng-template #message>\r\n <ng-content></ng-content>\r\n</ng-template>",
styles: [".message-container{display:flex;padding:1rem;min-height:50px;border-style:solid;border-width:3px!important;font-size:1.25rem}@media (max-width:767.98px){.message-container{height:auto;margin:initial}}.confirm-icon--error::after,.confirm-icon--success::after,.confirm-icon--warning::after{font-size:1.5rem;margin-left:.5rem}"]
}] }
];
/** @nocollapse */
ConfirmTemplateComponent.ctorParameters = function () { return []; };
ConfirmTemplateComponent.propDecorators = {
displayIcon: [{ type: Input }]
};
return ConfirmTemplateComponent;
}(Base));
export { ConfirmTemplateComponent };
if (false) {
/** @type {?} */
ConfirmTemplateComponent.prototype.displayIcon;
}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uZmlybS10ZW1wbGF0ZS5jb21wb25lbnQuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9tb2gtY29tbW9uLWxpYi8iLCJzb3VyY2VzIjpbImxpYi9jb21wb25lbnRzL2NvbmZpcm0tdGVtcGxhdGUvY29uZmlybS10ZW1wbGF0ZS5jb21wb25lbnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7QUFBQSxPQUFPLEVBQUUsU0FBUyxFQUFFLEtBQUssRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUNqRC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