angular-generics
Version:
A collection of generic controls for Angular 9+
739 lines (723 loc) • 163 kB
JavaScript
import { ɵɵdefineInjectable, ɵsetClassMetadata, Injectable, ɵɵdefineComponent, ɵɵprojectionDef, ɵɵelementStart, ɵɵprojection, ɵɵelementEnd, ɵɵproperty, ɵɵpureFunctionV, Component, ViewEncapsulation, Input, ɵɵgetCurrentView, ɵɵtext, ɵɵlistener, ɵɵrestoreView, ɵɵnextContext, ɵɵadvance, ɵɵtextInterpolate1, ɵɵdirectiveInject, ɵɵProvidersFeature, ɵɵtemplate, ɵɵdefineNgModule, ɵɵdefineInjector, ɵɵsetNgModuleScope, NgModule, ɵɵelementContainer, ɵɵtextInterpolate, ɵɵelementContainerStart, ɵɵtemplateRefExtractor, ɵɵelementContainerEnd, ɵɵreference, EventEmitter, Output, ɵɵpureFunction1, ɵɵpureFunction3, forwardRef, ɵɵstyleProp, ElementRef, ɵɵpureFunction2, ɵɵelement, ɵɵattribute, ɵɵInheritDefinitionFeature, ɵɵNgOnChangesFeature, ɵɵpureFunction0, ɵɵsanitizeUrl, ɵɵresolveDocument, ɵɵpipe, ɵɵpipeBind1, HostListener } from '@angular/core';
import { BehaviorSubject, Subject } from 'rxjs';
import { NgStyle, NgForOf, CommonModule, NgIf, NgTemplateOutlet, NgClass, DecimalPipe, NgSwitch, NgSwitchCase, AsyncPipe, NgSwitchDefault } from '@angular/common';
import { FormsModule, NG_VALUE_ACCESSOR, DefaultValueAccessor, NgControlStatus, NgModel, RequiredValidator, SelectControlValueAccessor, NgSelectOption, ɵangular_packages_forms_forms_x, CheckboxControlValueAccessor } from '@angular/forms';
import { __extends } from 'tslib';
import { RouterLinkWithHref, RouterModule } from '@angular/router';
var GenericAlertService = /** @class */ (function () {
function GenericAlertService() {
this._addAlertSource = new BehaviorSubject(null);
this.alertAdded$ = this._addAlertSource.asObservable();
this._closeAlertSource = new BehaviorSubject(null);
this.alertClosed$ = this._closeAlertSource.asObservable();
}
GenericAlertService.prototype.addAlert = function (alert) {
var _this = this;
if (alert) {
this._addAlertSource.next(alert);
if (alert.timeout > 0) {
setTimeout(function () {
_this.closeAlert(alert);
}, alert.timeout);
}
}
};
GenericAlertService.prototype.closeAlert = function (alert) {
if (alert) {
this._closeAlertSource.next(alert);
}
};
/** @nocollapse */ GenericAlertService.ɵfac = function GenericAlertService_Factory(t) { return new (t || GenericAlertService)(); };
/** @nocollapse */ GenericAlertService.ɵprov = ɵɵdefineInjectable({ token: GenericAlertService, factory: GenericAlertService.ɵfac });
return GenericAlertService;
}());
/*@__PURE__*/ (function () { ɵsetClassMetadata(GenericAlertService, [{
type: Injectable
}], function () { return []; }, null); })();
var ValueTypeHelpers = /** @class */ (function () {
function ValueTypeHelpers() {
}
ValueTypeHelpers.prototype.isNumber = function (value) {
return ((value != null) && !isNaN(Number(value.toString())));
};
return ValueTypeHelpers;
}());
var _c0 = function (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12) { return { "grid-template-columns": a0, "grid-template-rows": a1, "place-items": a2, "grid-auto-flow": a3, "height": a4, "width": a5, "gap": a6, "padding": a7, "position": a8, "top": a9, "bottom": a10, "left": a11, "right": a12 }; };
var _c1 = ["*"];
var ContentComponent = /** @class */ (function () {
function ContentComponent() {
this.typeHelper = new ValueTypeHelpers();
}
ContentComponent.prototype.isNumber = function (value) {
return this.typeHelper.isNumber(value);
};
/** @nocollapse */ ContentComponent.ɵfac = function ContentComponent_Factory(t) { return new (t || ContentComponent)(); };
/** @nocollapse */ ContentComponent.ɵcmp = ɵɵdefineComponent({ type: ContentComponent, selectors: [["agc"]], inputs: { height: "height", width: "width", gap: "gap", pad: "pad", anchor: "anchor", flow: "flow", rows: "rows", cols: "cols", forceUp: "forceUp", forceDown: "forceDown", forceLeft: "forceLeft", forceRight: "forceRight" }, ngContentSelectors: _c1, decls: 2, vars: 15, consts: [[1, "generic-element", 3, "ngStyle"]], template: function ContentComponent_Template(rf, ctx) { if (rf & 1) {
ɵɵprojectionDef();
ɵɵelementStart(0, "div", 0);
ɵɵprojection(1);
ɵɵelementEnd();
} if (rf & 2) {
ɵɵproperty("ngStyle", ɵɵpureFunctionV(1, _c0, [ctx.isNumber(ctx.cols) ? "repeat(" + ctx.cols + ", 1fr)" : ctx.cols, ctx.isNumber(ctx.rows) ? "repeat(" + ctx.rows + ", 1fr)" : ctx.rows, ctx.anchor ? ctx.anchor : null, ctx.flow ? ctx.flow : null, ctx.isNumber(ctx.height) ? ctx.height + "px" : ctx.height, ctx.isNumber(ctx.width) ? ctx.width + "px" : ctx.width, ctx.isNumber(ctx.gap) ? ctx.gap + "px" : ctx.gap, ctx.isNumber(ctx.pad) ? ctx.pad + "px" : ctx.pad, ctx.forceUp || ctx.forceLeft || ctx.forceDown || ctx.forceRight ? "relative" : null, ctx.isNumber(ctx.forceUp) ? "-" + ctx.forceUp + "px" : ctx.forceUp, ctx.isNumber(ctx.forceDown) ? "-" + ctx.forceDown + "px" : ctx.forceDown, ctx.isNumber(ctx.forceLeft) ? "-" + ctx.forceLeft + "px" : ctx.forceLeft, ctx.isNumber(ctx.forceRight) ? "-" + ctx.forceRight + "px" : ctx.forceRight]));
} }, directives: [NgStyle], styles: [":root{--inputOutlineColor:rgb(171, 192, 216);--inputOutline:1px solid var(--inputOutlineColor);--inputShadow:inset 0 0 3px 0px #f2fdff;--inputBackground:white;--inputPadding:5px 5px 2px 5px;--inputLabelColor:rgb(7, 7, 7);--inputLabelSize:20px;--disabledBackground:rgb(221, 232, 239);--disabledBorder:rgb(99, 127, 151);--sliderHeight:30px;--sliderWidth:100%;--sliderCoverWidth:75px;--sliderChangeSpeed:0.35s;--sliderRadius:10px;--sliderPadding:7px;--sliderBackgroundColor:#354558;--sliderFontSize:16px;--sliderTrueText:'Yes';--sliderFalseText:'No';--sliderTrueColor:#26ca28;--sliderFalseColor:rgb(231, 66, 44);--sliderFalseTextOffset:35px;--buttonBorderRadius:5px;--buttonPadding:5px 8px;--buttonTextShadow:0px 0px 4px rgb(34, 34, 34);--buttonBackground:linear-gradient(to bottom, #437ab1 0%, #003366 100%);--buttonBorder:1px solid #465d6c;--buttonDisabledBackground:rgb(95, 95, 95);--modalBorder:1px solid rgb(129, 129, 129)}.pointer,.pointer:hover{cursor:pointer}.no-selection{user-select:none;-webkit-user-select:none;-moz-user-select:none;-khtml-user-select:none;-ms-user-select:none}.generic-element{box-sizing:border-box;display:-ms-grid;display:grid}.generic-input input{width:inherit;height:22px;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.generic-input select{width:100%;height:31px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;padding:var(--inputPadding);border:var(--inputOutline);background:var(--inputBackground);box-shadow:var(--inputShadow)}.generic-input input,.generic-input textarea{padding:var(--inputPadding);border:var(--inputOutline);background:var(--inputBackground);box-shadow:var(--inputShadow)}.generic-input input:disabled,.generic-input textarea:disabled{background-color:var(--disabledBackground);border-color:var(--disabledBorder)}ag-check,ag-file,ag-select,ag-text{-ms-grid-row-align:end;-ms-grid-column-align:stretch;place-self:end stretch}ag-side-nav{overflow:hidden}"], encapsulation: 2 });
return ContentComponent;
}());
/*@__PURE__*/ (function () { ɵsetClassMetadata(ContentComponent, [{
type: Component,
args: [{
selector: 'agc',
templateUrl: './content.component.html',
styleUrls: ['../../../../styles/base.css'],
encapsulation: ViewEncapsulation.None
}]
}], function () { return []; }, { height: [{
type: Input
}], width: [{
type: Input
}], gap: [{
type: Input
}], pad: [{
type: Input
}], anchor: [{
type: Input
}], flow: [{
type: Input
}], rows: [{
type: Input
}], cols: [{
type: Input
}], forceUp: [{
type: Input
}], forceDown: [{
type: Input
}], forceLeft: [{
type: Input
}], forceRight: [{
type: Input
}] }); })();
function GenericAlertComponent_agc_1_Template(rf, ctx) { if (rf & 1) {
var _r177 = ɵɵgetCurrentView();
ɵɵelementStart(0, "agc", 2);
ɵɵelementStart(1, "agc", 3);
ɵɵtext(2);
ɵɵelementEnd();
ɵɵelementStart(3, "agc", 4);
ɵɵelementStart(4, "i", 5);
ɵɵlistener("click", function GenericAlertComponent_agc_1_Template_i_click_4_listener() { ɵɵrestoreView(_r177); var item_r175 = ctx.$implicit; var ctx_r176 = ɵɵnextContext(); return ctx_r176.alertClosed(item_r175); });
ɵɵelementEnd();
ɵɵelementEnd();
ɵɵelementEnd();
} if (rf & 2) {
var item_r175 = ctx.$implicit;
ɵɵproperty("cols", "1fr auto")("gap", 10)("pad", 3);
ɵɵadvance(2);
ɵɵtextInterpolate1(" ", item_r175.message, " ");
ɵɵadvance(1);
ɵɵproperty("anchor", "center");
} }
var GenericAlertComponent = /** @class */ (function () {
function GenericAlertComponent(alertService) {
var _this = this;
this.alerts = [];
alertService.alertAdded$.subscribe({
next: function (alert) { return _this.alertAdded(alert); },
});
alertService.alertClosed$.subscribe({
next: function (alert) { return _this.alertClosed(alert); },
});
}
GenericAlertComponent.prototype.alertAdded = function (alert) {
if (alert) {
this.alerts.push(alert);
}
};
GenericAlertComponent.prototype.alertClosed = function (alert) {
if (alert) {
var index = this.alerts.indexOf(alert);
if (index > -1) {
this.alerts.splice(index, 1);
}
}
};
/** @nocollapse */ GenericAlertComponent.ɵfac = function GenericAlertComponent_Factory(t) { return new (t || GenericAlertComponent)(ɵɵdirectiveInject(GenericAlertService)); };
/** @nocollapse */ GenericAlertComponent.ɵcmp = ɵɵdefineComponent({ type: GenericAlertComponent, selectors: [["ag-alert"]], features: [ɵɵProvidersFeature([GenericAlertService])], decls: 2, vars: 2, consts: [[1, "alerts", 3, "gap"], ["class", "alert", 3, "cols", "gap", "pad", 4, "ngFor", "ngForOf"], [1, "alert", 3, "cols", "gap", "pad"], [1, "alert-message"], [3, "anchor"], [1, "fas", "fa-times-circle", "pointer", 3, "click"]], template: function GenericAlertComponent_Template(rf, ctx) { if (rf & 1) {
ɵɵelementStart(0, "agc", 0);
ɵɵtemplate(1, GenericAlertComponent_agc_1_Template, 5, 5, "agc", 1);
ɵɵelementEnd();
} if (rf & 2) {
ɵɵproperty("gap", 5);
ɵɵadvance(1);
ɵɵproperty("ngForOf", ctx.alerts);
} }, directives: [ContentComponent, NgForOf], styles: [".alerts .alert{padding:5px}.alerts .close-button:active{box-shadow:inset 0 0 7px 0 #222}"], encapsulation: 2 });
return GenericAlertComponent;
}());
/*@__PURE__*/ (function () { ɵsetClassMetadata(GenericAlertComponent, [{
type: Component,
args: [{
selector: 'ag-alert',
templateUrl: './alert.component.html',
styleUrls: ['./alert.component.css'],
providers: [GenericAlertService],
encapsulation: ViewEncapsulation.None
}]
}], function () { return [{ type: GenericAlertService }]; }, null); })();
var GenericContentModule = /** @class */ (function () {
function GenericContentModule() {
}
/** @nocollapse */ GenericContentModule.ɵmod = ɵɵdefineNgModule({ type: GenericContentModule });
/** @nocollapse */ GenericContentModule.ɵinj = ɵɵdefineInjector({ factory: function GenericContentModule_Factory(t) { return new (t || GenericContentModule)(); }, imports: [[
CommonModule,
]] });
return GenericContentModule;
}());
(function () { (typeof ngJitMode === "undefined" || ngJitMode) && ɵɵsetNgModuleScope(GenericContentModule, { declarations: [ContentComponent], imports: [CommonModule], exports: [ContentComponent] }); })();
/*@__PURE__*/ (function () { ɵsetClassMetadata(GenericContentModule, [{
type: NgModule,
args: [{
declarations: [
ContentComponent
],
imports: [
CommonModule,
],
exports: [
ContentComponent
]
}]
}], null, null); })();
var GenericAlertModule = /** @class */ (function () {
function GenericAlertModule() {
}
/** @nocollapse */ GenericAlertModule.ɵmod = ɵɵdefineNgModule({ type: GenericAlertModule });
/** @nocollapse */ GenericAlertModule.ɵinj = ɵɵdefineInjector({ factory: function GenericAlertModule_Factory(t) { return new (t || GenericAlertModule)(); }, providers: [
GenericAlertService
], imports: [[
CommonModule,
GenericContentModule,
]] });
return GenericAlertModule;
}());
(function () { (typeof ngJitMode === "undefined" || ngJitMode) && ɵɵsetNgModuleScope(GenericAlertModule, { declarations: [GenericAlertComponent], imports: [CommonModule,
GenericContentModule], exports: [GenericAlertComponent] }); })();
/*@__PURE__*/ (function () { ɵsetClassMetadata(GenericAlertModule, [{
type: NgModule,
args: [{
declarations: [
GenericAlertComponent,
],
imports: [
CommonModule,
GenericContentModule,
],
providers: [
GenericAlertService
],
exports: [
GenericAlertComponent,
]
}]
}], null, null); })();
var GenericAlert = /** @class */ (function () {
function GenericAlert() {
this.timeout = 0;
}
return GenericAlert;
}());
function GenericModalComponent_ng_container_0_ng_container_4_Template(rf, ctx) { if (rf & 1) {
ɵɵelementContainer(0);
} }
function GenericModalComponent_ng_container_0_ng_container_9_Template(rf, ctx) { if (rf & 1) {
ɵɵelementContainer(0);
} }
function GenericModalComponent_ng_container_0_ng_template_10_Template(rf, ctx) { if (rf & 1) {
ɵɵelementStart(0, "h2");
ɵɵtext(1);
ɵɵelementEnd();
} if (rf & 2) {
var ctx_r182 = ɵɵnextContext(2);
ɵɵadvance(1);
ɵɵtextInterpolate(ctx_r182.title);
} }
function GenericModalComponent_ng_container_0_ng_template_12_Template(rf, ctx) { }
function GenericModalComponent_ng_container_0_Template(rf, ctx) { if (rf & 1) {
var _r186 = ɵɵgetCurrentView();
ɵɵelementContainerStart(0);
ɵɵelementStart(1, "agc", 1);
ɵɵelementStart(2, "agc", 2);
ɵɵelementStart(3, "agc", 3);
ɵɵtemplate(4, GenericModalComponent_ng_container_0_ng_container_4_Template, 1, 0, "ng-container", 4);
ɵɵelementStart(5, "i", 5);
ɵɵlistener("click", function GenericModalComponent_ng_container_0_Template_i_click_5_listener() { ɵɵrestoreView(_r186); var ctx_r185 = ɵɵnextContext(); return ctx_r185.close(); });
ɵɵelementEnd();
ɵɵelementEnd();
ɵɵelementStart(6, "agc", 6);
ɵɵprojection(7);
ɵɵelementEnd();
ɵɵelementStart(8, "agc", 7);
ɵɵtemplate(9, GenericModalComponent_ng_container_0_ng_container_9_Template, 1, 0, "ng-container", 4);
ɵɵelementEnd();
ɵɵelementEnd();
ɵɵelementEnd();
ɵɵtemplate(10, GenericModalComponent_ng_container_0_ng_template_10_Template, 2, 1, "ng-template", null, 8, ɵɵtemplateRefExtractor);
ɵɵtemplate(12, GenericModalComponent_ng_container_0_ng_template_12_Template, 0, 0, "ng-template", null, 9, ɵɵtemplateRefExtractor);
ɵɵelementContainerEnd();
} if (rf & 2) {
var _r181 = ɵɵreference(11);
var _r183 = ɵɵreference(13);
var ctx_r178 = ɵɵnextContext();
ɵɵadvance(1);
ɵɵproperty("height", "100vh")("anchor", "center center")("width", "100vw");
ɵɵadvance(1);
ɵɵproperty("gap", 10)("rows", "auto 1fr auto");
ɵɵadvance(1);
ɵɵproperty("cols", "1fr auto")("pad", "10px 10px 2px 10px");
ɵɵadvance(1);
ɵɵproperty("ngTemplateOutlet", ctx_r178.header ? ctx_r178.header : _r181);
ɵɵadvance(2);
ɵɵproperty("pad", 10)("height", "100%");
ɵɵadvance(2);
ɵɵproperty("anchor", "end")("pad", "5");
ɵɵadvance(1);
ɵɵproperty("ngTemplateOutlet", ctx_r178.footer ? ctx_r178.footer : _r183);
} }
var _c0$1 = ["*"];
var GenericModalComponent = /** @class */ (function () {
function GenericModalComponent() {
this.isOpen = false;
this.closed = new EventEmitter();
}
GenericModalComponent.prototype.open = function () {
this.isOpen = true;
};
GenericModalComponent.prototype.close = function () {
this.isOpen = false;
this.closed.emit();
};
/** @nocollapse */ GenericModalComponent.ɵfac = function GenericModalComponent_Factory(t) { return new (t || GenericModalComponent)(); };
/** @nocollapse */ GenericModalComponent.ɵcmp = ɵɵdefineComponent({ type: GenericModalComponent, selectors: [["ag-modal"]], inputs: { footer: "footer", header: "header", title: "title" }, outputs: { closed: "closed" }, ngContentSelectors: _c0$1, decls: 1, vars: 1, consts: [[4, "ngIf"], [1, "modal-cover", 3, "height", "anchor", "width"], [1, "modal-panel", 3, "gap", "rows"], [1, "modal-header", 3, "cols", "pad"], [4, "ngTemplateOutlet"], [1, "pointer", "close", "fas", "fa-window-close", 3, "click"], [1, "modal-body", 3, "pad", "height"], [1, "modal-footer", 3, "anchor", "pad"], ["defaultHeader", ""], ["defaultFooter", ""]], template: function GenericModalComponent_Template(rf, ctx) { if (rf & 1) {
ɵɵprojectionDef();
ɵɵtemplate(0, GenericModalComponent_ng_container_0_Template, 14, 13, "ng-container", 0);
} if (rf & 2) {
ɵɵproperty("ngIf", ctx.isOpen);
} }, directives: [NgIf, ContentComponent, NgTemplateOutlet], styles: [".modal-cover{position:absolute;z-index:9999;top:0;left:0;width:100%;height:100%;background-color:rgba(0,0,0,.65);overflow:hidden;padding-top:calc(100vh - (100vh * .93));box-sizing:border-box}.modal-panel{box-sizing:border-box;max-width:85%;max-height:95%;overflow:auto;-ms-grid-columns:1fr;grid-template-columns:1fr;background-color:#fefefe;border:var(--modalBorder);border-radius:5px;box-shadow:0 0 8px 2px #333;-ms-grid-row-align:start;-ms-grid-column-align:center;place-self:start center}.modal-header{box-sizing:border-box;border-bottom:var(--modalBorder);overflow:hidden}.modal-body{box-sizing:border-box;height:100%;overflow-x:hidden;overflow-y:auto}.modal-footer{box-sizing:border-box;border-top:var(--modalBorder);overflow:hidden}.close{color:#707070;font-size:24px;font-weight:700}.close:focus,.close:hover{color:#6e0000}", ":root{--inputOutlineColor:rgb(171, 192, 216);--inputOutline:1px solid var(--inputOutlineColor);--inputShadow:inset 0 0 3px 0px #f2fdff;--inputBackground:white;--inputPadding:5px 5px 2px 5px;--inputLabelColor:rgb(7, 7, 7);--inputLabelSize:20px;--disabledBackground:rgb(221, 232, 239);--disabledBorder:rgb(99, 127, 151);--sliderHeight:30px;--sliderWidth:100%;--sliderCoverWidth:75px;--sliderChangeSpeed:0.35s;--sliderRadius:10px;--sliderPadding:7px;--sliderBackgroundColor:#354558;--sliderFontSize:16px;--sliderTrueText:'Yes';--sliderFalseText:'No';--sliderTrueColor:#26ca28;--sliderFalseColor:rgb(231, 66, 44);--sliderFalseTextOffset:35px;--buttonBorderRadius:5px;--buttonPadding:5px 8px;--buttonTextShadow:0px 0px 4px rgb(34, 34, 34);--buttonBackground:linear-gradient(to bottom, #437ab1 0%, #003366 100%);--buttonBorder:1px solid #465d6c;--buttonDisabledBackground:rgb(95, 95, 95);--modalBorder:1px solid rgb(129, 129, 129)}.pointer,.pointer:hover{cursor:pointer}.no-selection{user-select:none;-webkit-user-select:none;-moz-user-select:none;-khtml-user-select:none;-ms-user-select:none}.generic-element{box-sizing:border-box;display:-ms-grid;display:grid}.generic-input input{width:inherit;height:22px;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.generic-input select{width:100%;height:31px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;padding:var(--inputPadding);border:var(--inputOutline);background:var(--inputBackground);box-shadow:var(--inputShadow)}.generic-input input,.generic-input textarea{padding:var(--inputPadding);border:var(--inputOutline);background:var(--inputBackground);box-shadow:var(--inputShadow)}.generic-input input:disabled,.generic-input textarea:disabled{background-color:var(--disabledBackground);border-color:var(--disabledBorder)}ag-check,ag-file,ag-select,ag-text{-ms-grid-row-align:end;-ms-grid-column-align:stretch;place-self:end stretch}ag-side-nav{overflow:hidden}"], encapsulation: 2 });
return GenericModalComponent;
}());
/*@__PURE__*/ (function () { ɵsetClassMetadata(GenericModalComponent, [{
type: Component,
args: [{
selector: 'ag-modal',
templateUrl: './generic-modal.component.html',
styleUrls: [
'./generic-modal.component.css',
'../../../../styles/base.css'
],
encapsulation: ViewEncapsulation.None
}]
}], function () { return []; }, { footer: [{
type: Input
}], header: [{
type: Input
}], title: [{
type: Input
}], closed: [{
type: Output
}] }); })();
var _c0$2 = function (a0) { return { "disabled": a0 }; };
var _c1$1 = function (a0, a1, a2) { return { "width": a0, "height": a1, "font-size": a2 }; };
var _c2 = ["*"];
var ButtonComponent = /** @class */ (function () {
function ButtonComponent() {
this.width = 'inherit';
this.height = 'inherit';
this.fontSize = 'inherit';
this.disableControl = false;
this.click = new EventEmitter();
this._helpers = new ValueTypeHelpers();
}
ButtonComponent.prototype.onClick = function (event) {
if (!this.disableControl) {
event.stopPropagation();
this.click.next();
}
else {
event.stopImmediatePropagation();
}
};
ButtonComponent.prototype.isNumber = function (value) {
return this._helpers.isNumber(value);
};
/** @nocollapse */ ButtonComponent.ɵfac = function ButtonComponent_Factory(t) { return new (t || ButtonComponent)(); };
/** @nocollapse */ ButtonComponent.ɵcmp = ɵɵdefineComponent({ type: ButtonComponent, selectors: [["ag-button"]], inputs: { width: "width", height: "height", fontSize: "fontSize", disableControl: ["disabled", "disableControl"] }, outputs: { click: "click" }, ngContentSelectors: _c2, decls: 2, vars: 8, consts: [[1, "generic-button", "no-selection", "pointer", 3, "ngClass", "ngStyle", "click"]], template: function ButtonComponent_Template(rf, ctx) { if (rf & 1) {
ɵɵprojectionDef();
ɵɵelementStart(0, "button", 0);
ɵɵlistener("click", function ButtonComponent_Template_button_click_0_listener($event) { return ctx.onClick($event); });
ɵɵprojection(1);
ɵɵelementEnd();
} if (rf & 2) {
ɵɵproperty("ngClass", ɵɵpureFunction1(2, _c0$2, ctx.disableControl))("ngStyle", ɵɵpureFunction3(4, _c1$1, ctx.isNumber(ctx.width) ? ctx.width + "px" : ctx.width, ctx.isNumber(ctx.height) ? ctx.height + "px" : ctx.height, ctx.isNumber(ctx.fontSize) ? ctx.fontSize + "px" : ctx.fontSize));
} }, directives: [NgClass, NgStyle], styles: [".generic-button{box-sizing:border-box;text-align:center;padding:var(--buttonPadding);border-radius:var(--buttonBorderRadius);background:var(--buttonBackground);border:var(--buttonBorder);color:#fff}.generic-button.shadows{text-shadow:var(--buttonTextShadow)}.generic-button.disabled,.generic-button.disabled:active{box-shadow:none;text-shadow:none;background:var(--buttonDisabledBackground)}.generic-button.disabled:hover{cursor:default}", ":root{--inputOutlineColor:rgb(171, 192, 216);--inputOutline:1px solid var(--inputOutlineColor);--inputShadow:inset 0 0 3px 0px #f2fdff;--inputBackground:white;--inputPadding:5px 5px 2px 5px;--inputLabelColor:rgb(7, 7, 7);--inputLabelSize:20px;--disabledBackground:rgb(221, 232, 239);--disabledBorder:rgb(99, 127, 151);--sliderHeight:30px;--sliderWidth:100%;--sliderCoverWidth:75px;--sliderChangeSpeed:0.35s;--sliderRadius:10px;--sliderPadding:7px;--sliderBackgroundColor:#354558;--sliderFontSize:16px;--sliderTrueText:'Yes';--sliderFalseText:'No';--sliderTrueColor:#26ca28;--sliderFalseColor:rgb(231, 66, 44);--sliderFalseTextOffset:35px;--buttonBorderRadius:5px;--buttonPadding:5px 8px;--buttonTextShadow:0px 0px 4px rgb(34, 34, 34);--buttonBackground:linear-gradient(to bottom, #437ab1 0%, #003366 100%);--buttonBorder:1px solid #465d6c;--buttonDisabledBackground:rgb(95, 95, 95);--modalBorder:1px solid rgb(129, 129, 129)}.pointer,.pointer:hover{cursor:pointer}.no-selection{user-select:none;-webkit-user-select:none;-moz-user-select:none;-khtml-user-select:none;-ms-user-select:none}.generic-element{box-sizing:border-box;display:-ms-grid;display:grid}.generic-input input{width:inherit;height:22px;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.generic-input select{width:100%;height:31px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;padding:var(--inputPadding);border:var(--inputOutline);background:var(--inputBackground);box-shadow:var(--inputShadow)}.generic-input input,.generic-input textarea{padding:var(--inputPadding);border:var(--inputOutline);background:var(--inputBackground);box-shadow:var(--inputShadow)}.generic-input input:disabled,.generic-input textarea:disabled{background-color:var(--disabledBackground);border-color:var(--disabledBorder)}ag-check,ag-file,ag-select,ag-text{-ms-grid-row-align:end;-ms-grid-column-align:stretch;place-self:end stretch}ag-side-nav{overflow:hidden}"], encapsulation: 2 });
return ButtonComponent;
}());
/*@__PURE__*/ (function () { ɵsetClassMetadata(ButtonComponent, [{
type: Component,
args: [{
selector: 'ag-button',
templateUrl: './button.component.html',
styleUrls: ['./button.component.css',
'../../../../styles/base.css'],
encapsulation: ViewEncapsulation.None
}]
}], function () { return []; }, { width: [{
type: Input
}], height: [{
type: Input
}], fontSize: [{
type: Input
}], disableControl: [{
type: Input,
args: ['disabled']
}], click: [{
type: Output
}] }); })();
var GenericButtonModule = /** @class */ (function () {
function GenericButtonModule() {
}
/** @nocollapse */ GenericButtonModule.ɵmod = ɵɵdefineNgModule({ type: GenericButtonModule });
/** @nocollapse */ GenericButtonModule.ɵinj = ɵɵdefineInjector({ factory: function GenericButtonModule_Factory(t) { return new (t || GenericButtonModule)(); }, imports: [[
CommonModule,
FormsModule
]] });
return GenericButtonModule;
}());
(function () { (typeof ngJitMode === "undefined" || ngJitMode) && ɵɵsetNgModuleScope(GenericButtonModule, { declarations: [ButtonComponent], imports: [CommonModule,
FormsModule], exports: [ButtonComponent] }); })();
/*@__PURE__*/ (function () { ɵsetClassMetadata(GenericButtonModule, [{
type: NgModule,
args: [{
declarations: [
ButtonComponent
],
imports: [
CommonModule,
FormsModule
],
exports: [
ButtonComponent
]
}]
}], null, null); })();
var GenericModalModule = /** @class */ (function () {
function GenericModalModule() {
}
/** @nocollapse */ GenericModalModule.ɵmod = ɵɵdefineNgModule({ type: GenericModalModule });
/** @nocollapse */ GenericModalModule.ɵinj = ɵɵdefineInjector({ factory: function GenericModalModule_Factory(t) { return new (t || GenericModalModule)(); }, imports: [[
CommonModule,
GenericButtonModule,
GenericContentModule
]] });
return GenericModalModule;
}());
(function () { (typeof ngJitMode === "undefined" || ngJitMode) && ɵɵsetNgModuleScope(GenericModalModule, { declarations: [GenericModalComponent], imports: [CommonModule,
GenericButtonModule,
GenericContentModule], exports: [GenericModalComponent] }); })();
/*@__PURE__*/ (function () { ɵsetClassMetadata(GenericModalModule, [{
type: NgModule,
args: [{
declarations: [
GenericModalComponent
],
imports: [
CommonModule,
GenericButtonModule,
GenericContentModule
],
exports: [
GenericModalComponent
]
}]
}], null, null); })();
var PAGE_STATE;
(function (PAGE_STATE) {
PAGE_STATE["CREATING"] = "creating";
PAGE_STATE["EDITING"] = "editing";
PAGE_STATE["VIEWING"] = "viewing";
PAGE_STATE["LOADING"] = "loading";
PAGE_STATE["LOADED"] = "loaded";
PAGE_STATE["SAVING"] = "saving";
PAGE_STATE["SAVED"] = "saved";
PAGE_STATE["CLOSING"] = "closing";
PAGE_STATE["CLOSED"] = "closed";
})(PAGE_STATE || (PAGE_STATE = {}));
var PageBase = /** @class */ (function () {
function PageBase() {
this.stateSubject = new Subject();
this.stateChange = this.stateSubject.asObservable();
}
Object.defineProperty(PageBase.prototype, "pageState", {
get: function () {
return this._pageState;
},
set: function (v) {
this.setState(v);
},
enumerable: true,
configurable: true
});
Object.defineProperty(PageBase.prototype, "pageData", {
get: function () {
return this._pageData;
},
set: function (v) {
this._pageData = v;
},
enumerable: true,
configurable: true
});
PageBase.prototype.create = function () {
this.setState(PAGE_STATE.CREATING);
};
PageBase.prototype.edit = function () {
this.setState(PAGE_STATE.EDITING);
};
PageBase.prototype.save = function (savePromise) {
var _this = this;
var previousState = this._pageState;
this.setState(PAGE_STATE.SAVING);
savePromise
.then(function () {
_this.setState(PAGE_STATE.SAVED);
_this.setState(PAGE_STATE.VIEWING);
})
.catch(function () {
_this.setState(previousState);
});
};
PageBase.prototype.view = function () {
this.setState(PAGE_STATE.VIEWING);
};
PageBase.prototype.back = function () {
this.cancel();
};
PageBase.prototype.cancel = function () {
if (this._pageState == PAGE_STATE.VIEWING || this._pageState == PAGE_STATE.CREATING) {
this.close();
}
else {
this.setState(PAGE_STATE.VIEWING);
}
};
PageBase.prototype.close = function () {
this.setState(PAGE_STATE.CLOSING);
this.setState(PAGE_STATE.CLOSED);
};
PageBase.prototype.setState = function (state) {
this._pageState = state;
console.log("State Change: " + state);
this.stateSubject.next(state);
};
return PageBase;
}());
function ValueAccessProvider(elemType) {
return {
provide: NG_VALUE_ACCESSOR,
useExisting: forwardRef(function () { return elemType; }),
multi: true,
};
}
var GenericInputAccessor = /** @class */ (function () {
function GenericInputAccessor() {
this.typeHelpers = new ValueTypeHelpers();
this.val = ''; // this is the updated value that the class accesses
this.onChange = function () { };
this.onTouch = function () { };
}
Object.defineProperty(GenericInputAccessor.prototype, "value", {
get: function () {
return this.val ? this.val : '';
},
set: function (v) {
this.val = v ? v : '';
this.onChange(v);
this.onTouch(v);
},
enumerable: true,
configurable: true
});
// this method sets the value programmatically
GenericInputAccessor.prototype.writeValue = function (v) {
this.value = v;
};
// upon UI element value changes, this method gets triggered
GenericInputAccessor.prototype.registerOnChange = function (fn) {
this.onChange = fn;
};
// upon touching the element, this method gets triggered
GenericInputAccessor.prototype.registerOnTouched = function (fn) {
this.onTouch = fn;
};
GenericInputAccessor.prototype.isNumber = function (v) {
return this.typeHelpers.isNumber(v);
};
return GenericInputAccessor;
}());
function InputComponent_span_2_Template(rf, ctx) { if (rf & 1) {
ɵɵelementStart(0, "span");
ɵɵtext(1, " *");
ɵɵelementEnd();
} if (rf & 2) {
ɵɵstyleProp("color", "red");
} }
function InputComponent_span_4_Template(rf, ctx) { if (rf & 1) {
ɵɵelementStart(0, "span");
ɵɵtext(1, " *");
ɵɵelementEnd();
} if (rf & 2) {
ɵɵstyleProp("color", "red");
} }
var _c0$3 = function (a0, a1) { return { "label-left": a0, "label-top": a1 }; };
var _c1$2 = ["*"];
var InputComponent = /** @class */ (function () {
function InputComponent(elementRef) {
this.elementRef = elementRef;
this.labelPos = 'top';
this.typeHelpers = new ValueTypeHelpers();
this.elementRef.nativeElement.style.setProperty('--color', 'red');
}
/** @nocollapse */ InputComponent.ɵfac = function InputComponent_Factory(t) { return new (t || InputComponent)(ɵɵdirectiveInject(ElementRef)); };
/** @nocollapse */ InputComponent.ɵcmp = ɵɵdefineComponent({ type: InputComponent, selectors: [["ag-input"]], inputs: { disabled: "disabled", required: "required", label: "label", labelPos: "labelPos" }, ngContentSelectors: _c1$2, decls: 7, vars: 10, consts: [[1, "generic-input", 3, "ngClass"], [1, "row-label", 3, "anchor", "cols", "gap"], [3, "color", 4, "ngIf"], [1, "row-content"]], template: function InputComponent_Template(rf, ctx) { if (rf & 1) {
ɵɵprojectionDef();
ɵɵelementStart(0, "agc", 0);
ɵɵelementStart(1, "agc", 1);
ɵɵtemplate(2, InputComponent_span_2_Template, 2, 2, "span", 2);
ɵɵtext(3);
ɵɵtemplate(4, InputComponent_span_4_Template, 2, 2, "span", 2);
ɵɵelementEnd();
ɵɵelementStart(5, "agc", 3);
ɵɵprojection(6, 0, ["#genericControl", ""]);
ɵɵelementEnd();
ɵɵelementEnd();
} if (rf & 2) {
ɵɵproperty("ngClass", ɵɵpureFunction2(7, _c0$3, ctx.labelPos == "left", ctx.labelPos == "top"));
ɵɵadvance(1);
ɵɵproperty("anchor", ctx.labelPos == "left" ? "end end" : "end start")("cols", ctx.labelPos == "top" ? "auto 1fr" : "1fr auto")("gap", 2);
ɵɵadvance(1);
ɵɵproperty("ngIf", ctx.required && !ctx.disabled && ctx.labelPos == "left");
ɵɵadvance(1);
ɵɵtextInterpolate1(" ", ctx.label, " ");
ɵɵadvance(1);
ɵɵproperty("ngIf", ctx.required && !ctx.disabled && ctx.labelPos == "top");
} }, directives: [ContentComponent, NgClass, NgIf], styles: [".label-left>.generic-element{gap:5px;-ms-grid-columns:4fr 5fr;grid-template-columns:4fr 5fr}.label-top>.generic-element{gap:1px;-ms-grid-rows:auto 1fr;grid-template-rows:auto 1fr}.row-content.generic-element{place-items:end start}.row-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:700}.row-label>.generic-element{height:100%}.generic-input{font-weight:700}", ":root{--inputOutlineColor:rgb(171, 192, 216);--inputOutline:1px solid var(--inputOutlineColor);--inputShadow:inset 0 0 3px 0px #f2fdff;--inputBackground:white;--inputPadding:5px 5px 2px 5px;--inputLabelColor:rgb(7, 7, 7);--inputLabelSize:20px;--disabledBackground:rgb(221, 232, 239);--disabledBorder:rgb(99, 127, 151);--sliderHeight:30px;--sliderWidth:100%;--sliderCoverWidth:75px;--sliderChangeSpeed:0.35s;--sliderRadius:10px;--sliderPadding:7px;--sliderBackgroundColor:#354558;--sliderFontSize:16px;--sliderTrueText:'Yes';--sliderFalseText:'No';--sliderTrueColor:#26ca28;--sliderFalseColor:rgb(231, 66, 44);--sliderFalseTextOffset:35px;--buttonBorderRadius:5px;--buttonPadding:5px 8px;--buttonTextShadow:0px 0px 4px rgb(34, 34, 34);--buttonBackground:linear-gradient(to bottom, #437ab1 0%, #003366 100%);--buttonBorder:1px solid #465d6c;--buttonDisabledBackground:rgb(95, 95, 95);--modalBorder:1px solid rgb(129, 129, 129)}.pointer,.pointer:hover{cursor:pointer}.no-selection{user-select:none;-webkit-user-select:none;-moz-user-select:none;-khtml-user-select:none;-ms-user-select:none}.generic-element{box-sizing:border-box;display:-ms-grid;display:grid}.generic-input input{width:inherit;height:22px;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.generic-input select{width:100%;height:31px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;padding:var(--inputPadding);border:var(--inputOutline);background:var(--inputBackground);box-shadow:var(--inputShadow)}.generic-input input,.generic-input textarea{padding:var(--inputPadding);border:var(--inputOutline);background:var(--inputBackground);box-shadow:var(--inputShadow)}.generic-input input:disabled,.generic-input textarea:disabled{background-color:var(--disabledBackground);border-color:var(--disabledBorder)}ag-check,ag-file,ag-select,ag-text{-ms-grid-row-align:end;-ms-grid-column-align:stretch;place-self:end stretch}ag-side-nav{overflow:hidden}"], encapsulation: 2 });
return InputComponent;
}());
/*@__PURE__*/ (function () { ɵsetClassMetadata(InputComponent, [{
type: Component,
args: [{
selector: 'ag-input',
templateUrl: './input.component.html',
styleUrls: ['./input.component.css',
'../../../../styles/base.css'],
encapsulation: ViewEncapsulation.None
}]
}], function () { return [{ type: ElementRef }]; }, { disabled: [{
type: Input
}], required: [{
type: Input
}], label: [{
type: Input
}], labelPos: [{
type: Input
}] }); })();
var _c0$4 = function (a0) { return { "disabled": a0 }; };
var _c1$3 = function (a0, a1) { return { "disabled": a0, "enabled": a1 }; };
function CheckComponent_ng_container_1_Template(rf, ctx) { if (rf & 1) {
var _r190 = ɵɵgetCurrentView();
ɵɵelementContainerStart(0);
ɵɵelementStart(1, "label", 2);
ɵɵelementStart(2, "span", 3);
ɵɵprojection(3);
ɵɵelementEnd();
ɵɵelementStart(4, "input", 4);
ɵɵlistener("ngModelChange", function CheckComponent_ng_container_1_Template_input_ngModelChange_4_listener($event) { ɵɵrestoreView(_r190); var ctx_r189 = ɵɵnextContext(); return ctx_r189.value = $event; });
ɵɵelementEnd();
ɵɵelement(5, "span", 5);
ɵɵelementEnd();
ɵɵelementContainerEnd();
} if (rf & 2) {
var ctx_r187 = ɵɵnextContext();
ɵɵadvance(1);
ɵɵproperty("ngClass", ɵɵpureFunction1(6, _c0$4, ctx_r187.disabled));
ɵɵadvance(3);
ɵɵproperty("ngModel", ctx_r187.value)("disabled", ctx_r187.disabled)("type", "checkbox");
ɵɵattribute("required", ctx_r187.required ? "" : null);
ɵɵadvance(1);
ɵɵproperty("ngClass", ɵɵpureFunction2(8, _c1$3, ctx_r187.disabled, !ctx_r187.disabled));
} }
function CheckComponent_ng_container_2_Template(rf, ctx) { if (rf & 1) {
var _r192 = ɵɵgetCurrentView();
ɵɵelementContainerStart(0);
ɵɵelementStart(1, "agc", 6);
ɵɵelementStart(2, "input", 7);
ɵɵlistener("ngModelChange", function CheckComponent_ng_container_2_Template_input_ngModelChange_2_listener($event) { ɵɵrestoreView(_r192); var ctx_r191 = ɵɵnextContext(); return ctx_r191.value = $event; });
ɵɵelementEnd();
ɵɵelementStart(3, "label", 8);
ɵɵlistener("click", function CheckComponent_ng_container_2_Template_label_click_3_listener() { ɵɵrestoreView(_r192); var ctx_r193 = ɵɵnextContext(); return ctx_r193.disabled ? null : ctx_r193.value = !ctx_r193.value; });
ɵɵelementEnd();
ɵɵelementEnd();
ɵɵelementContainerEnd();
} if (rf & 2) {
var ctx_r188 = ɵɵnextContext();
ɵɵadvance(1);
ɵɵproperty("ngClass", ɵɵpureFunction1(6, _c0$4, ctx_r188.disabled));
ɵɵadvance(1);
ɵɵproperty("disabled", ctx_r188.disabled)("type", "checkbox")("ngModel", ctx_r188.value);
ɵɵattribute("required", ctx_r188.required ? "" : null);
ɵɵadvance(1);
ɵɵproperty("ngClass", ɵɵpureFunction1(8, _c0$4, ctx_r188.disabled));
} }
var _c2$1 = ["*"];
var CheckComponent = /** @class */ (function (_super) {
__extends(CheckComponent, _super);
function CheckComponent(elementRef) {
var _this = _super.call(this) || this;
_this.elementRef = elementRef;
_this.labelPos = 'top';
_this.trueText = 'Yes';
_this.falseText = 'No';
return _this;
}
CheckComponent.prototype.ngOnChanges = function (changes) {
this.elementRef.nativeElement.style.setProperty('--sliderTrueText', "'" + this.trueText + "'");
this.elementRef.nativeElement.style.setProperty('--sliderFalseText', "'" + this.falseText + "'");
};
/** @nocollapse */ CheckComponent.ɵfac = function CheckComponent_Factory(t) { return new (t || CheckComponent)(ɵɵdirectiveInject(ElementRef)); };
/** @nocollapse */ CheckComponent.ɵcmp = ɵɵdefineComponent({ type: CheckComponent, selectors: [["ag-check"]], inputs: { inputType: "inputType", disabled: "disabled", required: "required", label: "label", placeholder: "placeholder", labelPos: "labelPos", trueText: "trueText", falseText: "falseText" }, features: [ɵɵProvidersFeature([ValueAccessProvider(CheckComponent)]), ɵɵInheritDefinitionFeature, ɵɵNgOnChangesFeature()], ngContentSelectors: _c2$1, decls: 3, vars: 6, consts: [[3, "label", "labelPos", "required", "disabled"], [4, "ngIf"], [1, "check-container", "no-selection", 3, "ngClass"], [1, "label-text"], [3, "ngModel", "disabled", "type", "ngModelChange"], [1, "checkmark", 3, "ngClass"], [1, "checkbox-slider", 3, "ngClass"], [3, "disabled", "type", "ngModel", "ngModelChange"], [3, "ngClass", "click"]], template: function CheckComponent_Template(rf, ctx) { if (rf & 1) {
ɵɵprojectionDef();
ɵɵelementStart(0, "ag-input", 0);
ɵɵtemplate(1, CheckComponent_ng_container_1_Template, 6, 11, "ng-container", 1);
ɵɵtemplate(2, CheckComponent_ng_container_2_Template, 4, 10, "ng-container", 1);
ɵɵelementEnd();
} if (rf & 2) {
ɵɵproperty("label", ctx.label)("labelPos", ctx.labelPos)("required", ctx.required)("disabled", ctx.disabled);
ɵɵadvance(1);
ɵɵproperty("ngIf", ctx.inputType == null || ctx.inputType == "");
ɵɵadvance(1);
ɵɵproperty("ngIf", ctx.inputType == "slide");
} }, directives: [InputComponent, NgIf, NgClass, DefaultValueAccessor, NgControlStatus, NgModel, RequiredValidator, ContentComponent], styles: [".generic-input input[type=checkbox]{box-shadow:none}.checkbox-slider input[type=checkbox]{visibility:hidden}.checkbox-slider{position:relative;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:var(--sliderWidth);height:var(--sliderHeight);background:var(--sliderBackgroundColor);border-radius:var(--sliderRadius);border:1px solid #1b1b1b}.checkbox-slider:after,.checkbox-slider:before{position:absolute;top:var(--sliderPadding);font-size:var(--sliderFontSize)}.checkbox-slider:before{content:var(--sliderTrueText);left:var(--sliderPadding);color:var(--sliderTrueColor)}.checkbox-slider:after{content:var(--sliderFalseText);left:calc((var(--sliderWidth) - var(--sliderPadding)) - var(--sliderFalseTextOffset));color:var(--sliderFalseColor)}.checkbox-slider label{position:absolute;cursor:pointer;z-index:1;-webkit-transition:all var(--sliderChangeSpeed) ease;transition:all var(--sliderChangeSpeed) ease;width:var(--sliderCoverWidth);height:calc(var(--sliderHeight) - (var(--sliderPadding)));top:calc(var(--sliderPadding)/ 2);left:calc(var(--sliderPadding)/ 1.75);border-radius:calc(var(--sliderRadius) - (var(--sliderRadius) * .25));background:var(--sliderFalseColor)}.checkbox-slider input[type=checkbox]:checked+label{left:calc((var(--sliderWidth) - var(--sliderCoverWidth)) - (var(--sliderPadding)/ 1.75));background:var(--sliderTrueColor)}.checkbox-slider.disabled{background:var(--disabledBackground);background-color:var(--disabledBackground);border-color:var(--disabledBorder)}.checkbox-slider.disabled:after,.checkbox-slider.disabled:before{color:#313131}.checkbox-slider label.disabled,.checkbox-slider.disabled input[type=checkbox]:checked+label{cursor:default;background:#6b6b6b}.checkbox-sliderinput[type=checkbox]:checked+label.disabled{left:calc((var(--sliderWidth) - var(--sliderCoverWidth)) - (var(--sliderPadding)/ 1.75));background:var(--sliderTrueColor)}.check-container{display:-ms-grid;display:grid;-ms-grid-columns:auto 1fr;grid-template-columns:auto 1fr;position:relative;padding-left:30px;font-size:var(--inputLabelSize);overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.check-container.disabled{color:#868686;cursor:default}.check-container input{position:absolute;opacity:0;cursor:pointer;height:0;width:0}.checkmark{position:absolute;height:var(--inputLabelSize);width:var(--inputLabelSize);background-color:#354558;border:var(--inputOutline);border-radius:5px}.check-container:hover input~.checkmark{background-color:#131313}.check-container input:checked~.checkmark{background-color:#354558}.check-container input:disabled~.checkmark{background-color:#a5a5a5}.checkmark:after{content:\"\";position:absolute;display:none}.check-container input:checked~.checkmark.disabled:after,.check-container input:checked~.checkmark.enabled:after{display:block}.check-container input:checked~.checkmark.enabled:after{border:solid #26ca28;border-width:0 3px 3px 0}.check-container input:checked~.checkmark.disabled:after{border:solid #4e4e4e;border-width:0 3px 3px 0}.check-container .checkmark:after{left:6px;top:2px;width:5px;height:10px;-webkit-transform:rotate(45deg);transform:rotate(45deg)}.label-text{color:var(--inputLabelColor)}", ":root{--inputOutlineColor:rgb(171, 192, 216);--inputOutline:1px solid var(--inputOutlineColor);--inputShadow:inset 0 0 3px 0px #f2fdff;--inputBackground:white;--inputPadding:5px 5px 2px 5px;--inputLabelColor:rgb(7, 7, 7);--inputLabelSize:20px;--disabledBackground:rgb(221, 232, 239);--disabledBorder:rgb(99, 127, 151);--sliderHeight:30px;--sliderWidth:100%;--sliderCoverWidth:75px;--sliderChangeSpeed:0.35s;--sliderRadius:10px;--sliderPadding:7px;--sliderBackgroundColor:#354558;--sliderFontSize:16px;--sliderTrueText:'Yes';--sliderFalseText:'No';--sliderTrueColor:#26ca28;--sliderFalseColor:rgb(231, 66, 44);--sliderFalseTextOffset:35px;--buttonBorderRadius:5px;--buttonPadding:5px 8px;--buttonTextShadow:0px 0px 4px rgb(34, 34, 34);--buttonBackground:linear-gradient(to bottom, #437ab1 0%, #003366 100%);--buttonBorder:1px solid #465d6c;--buttonDisabledBackground:rgb(95, 95, 95);--modalBorder:1px solid rgb(129, 129, 129)}.pointer,.pointer:hover{cursor:pointer}.no-selection{user-select:none;-webkit-user-select:none;-moz-user-select:none;-khtml-user-select:none;-ms-user-select:none}.generic-element{box-sizing:border-box;display:-ms-grid;display:grid}.generic-input input{width:inherit;height:22px;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.generic-input select{width:100%;height:31px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;padding:var(--inputPadding);border:var(--inputOutline);background:var(--inputBackground);box-shadow:var(--inputShadow)}.generic-input input,.generic-input textarea{padding:var(--inputPadding);border:var(--inputOutline);background:var(--inputBackground);box-shadow:var(--inputShadow)}.generic-input input:disabled,.generic-input textarea:disabled{background-color:var(--disabledBackground);border-color:var(--disabledBorder)}ag-check,ag-file,ag-select,ag-text{-ms-grid-row-align:end;-ms-grid-column-align:stretch;place-self:end stretch}ag-side-nav{overflow:hidden}"], encapsulation: 2 });
return CheckComponent;
}(GenericInputAccessor));
/*@__PURE__*/ (function () { ɵsetClassMetadata(CheckComponent, [{
type: Component,
args: [{
selector: 'ag-check',
templateUrl: './check.component.html',
styleUrls: ['./check.component.css',
'../../../../styles/base.css'],
providers: [ValueAccessProvider(CheckComponent)],
encapsulation: ViewEncapsulation.None
}]
}], function () { return [{ type: ElementRef }]; }, { inputType: [{
type: Input
}], disabled: [{
type: Input
}], required: [{
type: I