UNPKG

ngx-mat-lib

Version:

A bunch of utilities and components to use in your Angular 7+ apps!

427 lines (418 loc) 312 kB
import { _MAT_INK_BAR_POSITIONER } from '@angular/material/tabs'; import { ViewportRuler as ViewportRuler$1 } from '@angular/cdk/overlay'; import { Directionality } from '@angular/cdk/bidi'; import { ViewportRuler } from '@angular/cdk/scrolling'; import { END, ENTER, HOME, SPACE, hasModifierKey } from '@angular/cdk/keycodes'; import { Platform, normalizePassiveListenerOptions } from '@angular/cdk/platform'; import { ANIMATION_MODULE_TYPE } from '@angular/platform-browser/animations'; import { BrowserModule } from '@angular/platform-browser'; import { MediaObserver, BreakPointRegistry, ɵMatchMedia, PrintHook, FlexLayoutModule } from '@angular/flex-layout'; import { CommonModule } from '@angular/common'; import { FormBuilder, NG_VALIDATORS, NG_VALUE_ACCESSOR, Validators, ControlContainer, FormsModule, ReactiveFormsModule, FormControl, NgControl } from '@angular/forms'; import { mixinDisableRipple, MAT_RIPPLE_GLOBAL_OPTIONS, RippleRenderer, mixinTabIndex, mixinDisabled, MatCommonModule } from '@angular/material/core'; import { FocusKeyManager, FocusMonitor, AriaDescriber, A11yModule } from '@angular/cdk/a11y'; import { coerceBooleanProperty, coerceNumberProperty } from '@angular/cdk/coercion'; import { convertToParamMap } from '@angular/router'; import { parseZone } from 'moment'; import { mixinColor, MatExpansionModule, MatCardModule, MatDialogRef, MAT_DIALOG_DATA, MatDialogModule, MatButtonModule, MatDatepickerModule, MatFormFieldModule, MatIconModule, MatProgressSpinnerModule, MatChipsModule, MatTabsModule, MatRippleModule, MatTableModule, MatSnackBarRef, MAT_SNACK_BAR_DATA, MatSnackBarModule, MatSpinner, MatFormFieldControl, MatDialog, MatDialogConfig, MatSnackBar, MatSnackBarConfig, NativeDateAdapter } from '@angular/material'; import { HttpParams, HttpResponse, HttpEventType, HttpClient } from '@angular/common/http'; import { Subject, merge as merge$1, of, timer, fromEvent, Observable, forkJoin } from 'rxjs'; import { delay, takeUntil, startWith, map as map$1, tap, switchMap } from 'rxjs/operators'; import { Component, ElementRef, Input, Output, ViewEncapsulation, EventEmitter, NgModule, ViewChild, ComponentFactoryResolver, Inject, ViewContainerRef, ChangeDetectionStrategy, Injectable, Directive, NgZone, ChangeDetectorRef, Optional, ContentChildren, forwardRef, Attribute, HostBinding, Host, SkipSelf, ContentChild, Renderer2, Pipe } from '@angular/core'; import { merge, each, map, orderBy, chunk, forEach, includes, extend, indexOf, sumBy } from 'lodash'; /** * @fileoverview added by tsickle * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc */ /** @type {?} */ const DEFAULT_COLOR = "accent"; /** @type {?} */ const transcludedHeaderSelector = ".xmat-accordion-examples-title"; /** @type {?} */ const headerSelector = "mat-expansion-panel-header"; class XmatAccordionBase { /** * @param {?} _elementRef */ constructor(_elementRef) { this._elementRef = _elementRef; } } /** @type {?} */ const _XmatAccordionMixinBase = mixinColor(XmatAccordionBase); class XmatAccordionComponent extends _XmatAccordionMixinBase { /** * @param {?} elementRef */ constructor(elementRef) { super(elementRef); this.expandedChange = new EventEmitter(); this._expanded = false; this.color = DEFAULT_COLOR; } /** * @param {?} value * @return {?} */ set expanded(value) { this._expanded = coerceBooleanProperty(value); this.expandedChange.emit(this._expanded); } /** * @return {?} */ get expanded() { return this._expanded; } /** * @param {?} value * @return {?} */ set collapsedHeight(value) { this._collapsedHeight = value; } /** * @return {?} */ get collapsedHeight() { return this._collapsedHeight; } /** * @param {?} value * @return {?} */ set expandedHeight(value) { this._expandedHeight = value; } /** * @return {?} */ get expandedHeight() { return this._expandedHeight; } /** * @return {?} */ ngAfterViewInit() { /** @type {?} */ const $header = this._elementRef.nativeElement.querySelector(headerSelector); if (!!$header) { /** @type {?} */ const $panel = $header.parentElement; if ($header.querySelectorAll(transcludedHeaderSelector).length === 0) { $panel.removeChild($header); $panel.classList.add("xmat-accordion-examples-no-header"); } } } } XmatAccordionComponent.decorators = [ { type: Component, args: [{ selector: "xmat-accordion", host: { "[attr.disabled]": "disabled || null", "class": "xmat-accordion-examples", "[class.mat-primary]": "color == 'primary'", "[class.mat-accent]": "color == 'accent'", "[class.mat-warn]": "color == 'warn'" }, template: " <mat-accordion>\n <mat-expansion-panel [disabled]=\"disabled\"\n [(expanded)]=\"expanded\">\n <mat-expansion-panel-header>\n <mat-panel-title>\n <ng-content select=\".xmat-accordion-title\"></ng-content>\n </mat-panel-title>\n <mat-panel-description>\n <ng-content select=\".xmat-accordion-desc\"></ng-content>\n </mat-panel-description>\n </mat-expansion-panel-header>\n <ng-content select=\".xmat-accordion-content\"></ng-content>\n </mat-expansion-panel>\n</mat-accordion>\n", encapsulation: ViewEncapsulation.None, styles: ["@-webkit-keyframes cdk-text-field-autofill-start{/*!*/}@-webkit-keyframes cdk-text-field-autofill-end{/*!*/}.mat-badge-content{font-weight:600;font-size:12px;font-family:Roboto,\"Helvetica Neue\",sans-serif}.mat-badge-small .mat-badge-content{font-size:6px}.mat-badge-large .mat-badge-content{font-size:24px}.mat-h1,.mat-headline,.mat-typography h1{font:400 24px/32px Roboto,\"Helvetica Neue\",sans-serif;margin:0 0 16px}.mat-h2,.mat-title,.mat-typography h2{font:500 20px/32px Roboto,\"Helvetica Neue\",sans-serif;margin:0 0 16px}.mat-h3,.mat-subheading-2,.mat-typography h3{font:400 16px/28px Roboto,\"Helvetica Neue\",sans-serif;margin:0 0 16px}.mat-h4,.mat-subheading-1,.mat-typography h4{font:400 15px/24px Roboto,\"Helvetica Neue\",sans-serif;margin:0 0 16px}.mat-h5,.mat-typography h5{font:400 11.62px/20px Roboto,\"Helvetica Neue\",sans-serif;margin:0 0 12px}.mat-h6,.mat-typography h6{font:400 9.38px/20px Roboto,\"Helvetica Neue\",sans-serif;margin:0 0 12px}.mat-body-2,.mat-body-strong{font:500 14px/24px Roboto,\"Helvetica Neue\",sans-serif}.mat-body,.mat-body-1,.mat-typography{font:400 14px/20px Roboto,\"Helvetica Neue\",sans-serif}.mat-body p,.mat-body-1 p,.mat-typography p{margin:0 0 12px}.mat-caption,.mat-small{font:400 12px/20px Roboto,\"Helvetica Neue\",sans-serif}.mat-display-4,.mat-typography .mat-display-4{font:300 112px/112px Roboto,\"Helvetica Neue\",sans-serif;margin:0 0 56px;letter-spacing:-.05em}.mat-display-3,.mat-typography .mat-display-3{font:400 56px/56px Roboto,\"Helvetica Neue\",sans-serif;margin:0 0 64px;letter-spacing:-.02em}.mat-display-2,.mat-typography .mat-display-2{font:400 45px/48px Roboto,\"Helvetica Neue\",sans-serif;margin:0 0 64px;letter-spacing:-.005em}.mat-display-1,.mat-typography .mat-display-1{font:400 34px/40px Roboto,\"Helvetica Neue\",sans-serif;margin:0 0 64px}.mat-bottom-sheet-container{font:400 14px/20px Roboto,\"Helvetica Neue\",sans-serif}.mat-button,.mat-fab,.mat-flat-button,.mat-icon-button,.mat-mini-fab,.mat-raised-button,.mat-stroked-button{font-family:Roboto,\"Helvetica Neue\",sans-serif;font-size:14px;font-weight:500}.mat-button-toggle,.mat-card{font-family:Roboto,\"Helvetica Neue\",sans-serif}.mat-card-title{font-size:24px;font-weight:500}.mat-card-header .mat-card-title{font-size:20px}.mat-card-content,.mat-card-subtitle{font-size:14px}.mat-checkbox{font-family:Roboto,\"Helvetica Neue\",sans-serif}.mat-checkbox-layout .mat-checkbox-label{line-height:24px}.mat-chip{font-size:14px;font-weight:500}.mat-chip .mat-chip-remove.mat-icon,.mat-chip .mat-chip-trailing-icon.mat-icon{font-size:18px}.mat-table{font-family:Roboto,\"Helvetica Neue\",sans-serif}.mat-header-cell{font-size:12px;font-weight:500}.mat-cell,.mat-footer-cell{font-size:14px}.mat-calendar{font-family:Roboto,\"Helvetica Neue\",sans-serif}.mat-calendar-body{font-size:13px}.mat-calendar-body-label,.mat-calendar-period-button{font-size:14px;font-weight:500}.mat-calendar-table-header th{font-size:11px;font-weight:400}.mat-dialog-title{font:500 20px/32px Roboto,\"Helvetica Neue\",sans-serif}.mat-expansion-panel-header{font-family:Roboto,\"Helvetica Neue\",sans-serif;font-size:15px;font-weight:400}.mat-expansion-panel-content{font:400 14px/20px Roboto,\"Helvetica Neue\",sans-serif}.mat-form-field{font-size:inherit;font-weight:400;line-height:1.125;font-family:Roboto,\"Helvetica Neue\",sans-serif}.mat-form-field-wrapper{padding-bottom:1.34375em}.mat-form-field-prefix .mat-icon,.mat-form-field-suffix .mat-icon{font-size:150%;line-height:1.125}.mat-form-field-prefix .mat-icon-button,.mat-form-field-suffix .mat-icon-button{height:1.5em;width:1.5em}.mat-form-field-prefix .mat-icon-button .mat-icon,.mat-form-field-suffix .mat-icon-button .mat-icon{height:1.125em;line-height:1.125}.mat-form-field-infix{padding:.5em 0;border-top:.84375em solid transparent}.mat-form-field-can-float .mat-input-server:focus+.mat-form-field-label-wrapper .mat-form-field-label,.mat-form-field-can-float.mat-form-field-should-float .mat-form-field-label{-webkit-transform:translateY(-1.34375em) scale(.75);transform:translateY(-1.34375em) scale(.75);width:133.33333%}.mat-form-field-can-float .mat-input-server[label]:not(:label-shown)+.mat-form-field-label-wrapper .mat-form-field-label{-webkit-transform:translateY(-1.34374em) scale(.75);transform:translateY(-1.34374em) scale(.75);width:133.33334%}.mat-form-field-label-wrapper{top:-.84375em;padding-top:.84375em}.mat-form-field-label{top:1.34375em}.mat-form-field-underline{bottom:1.34375em}.mat-form-field-subscript-wrapper{font-size:75%;margin-top:.66667em;top:calc(100% - 1.79167em)}.mat-form-field-appearance-legacy .mat-form-field-wrapper{padding-bottom:1.25em}.mat-form-field-appearance-legacy .mat-form-field-infix{padding:.4375em 0}.mat-form-field-appearance-legacy.mat-form-field-can-float .mat-input-server:focus+.mat-form-field-label-wrapper .mat-form-field-label,.mat-form-field-appearance-legacy.mat-form-field-can-float.mat-form-field-should-float .mat-form-field-label{-webkit-transform:translateY(-1.28125em) scale(.75) perspective(100px) translateZ(.001px);transform:translateY(-1.28125em) scale(.75) perspective(100px) translateZ(.001px);-ms-transform:translateY(-1.28125em) scale(.75);width:133.33333%}.mat-form-field-appearance-legacy.mat-form-field-can-float .mat-form-field-autofill-control:-webkit-autofill+.mat-form-field-label-wrapper .mat-form-field-label{-webkit-transform:translateY(-1.28125em) scale(.75) perspective(100px) translateZ(.00101px);transform:translateY(-1.28125em) scale(.75) perspective(100px) translateZ(.00101px);-ms-transform:translateY(-1.28124em) scale(.75);width:133.33334%}.mat-form-field-appearance-legacy.mat-form-field-can-float .mat-input-server[label]:not(:label-shown)+.mat-form-field-label-wrapper .mat-form-field-label{-webkit-transform:translateY(-1.28125em) scale(.75) perspective(100px) translateZ(.00102px);transform:translateY(-1.28125em) scale(.75) perspective(100px) translateZ(.00102px);-ms-transform:translateY(-1.28123em) scale(.75);width:133.33335%}.mat-form-field-appearance-legacy .mat-form-field-label{top:1.28125em}.mat-form-field-appearance-legacy .mat-form-field-underline{bottom:1.25em}.mat-form-field-appearance-legacy .mat-form-field-subscript-wrapper{margin-top:.54167em;top:calc(100% - 1.66667em)}@media print{.mat-form-field-appearance-legacy.mat-form-field-can-float .mat-input-server:focus+.mat-form-field-label-wrapper .mat-form-field-label,.mat-form-field-appearance-legacy.mat-form-field-can-float.mat-form-field-should-float .mat-form-field-label{-webkit-transform:translateY(-1.28122em) scale(.75);transform:translateY(-1.28122em) scale(.75)}.mat-form-field-appearance-legacy.mat-form-field-can-float .mat-form-field-autofill-control:-webkit-autofill+.mat-form-field-label-wrapper .mat-form-field-label{-webkit-transform:translateY(-1.28121em) scale(.75);transform:translateY(-1.28121em) scale(.75)}.mat-form-field-appearance-legacy.mat-form-field-can-float .mat-input-server[label]:not(:label-shown)+.mat-form-field-label-wrapper .mat-form-field-label{-webkit-transform:translateY(-1.2812em) scale(.75);transform:translateY(-1.2812em) scale(.75)}}.mat-form-field-appearance-fill .mat-form-field-infix{padding:.25em 0 .75em}.mat-form-field-appearance-fill .mat-form-field-label{top:1.09375em;margin-top:-.5em}.mat-form-field-appearance-fill.mat-form-field-can-float .mat-input-server:focus+.mat-form-field-label-wrapper .mat-form-field-label,.mat-form-field-appearance-fill.mat-form-field-can-float.mat-form-field-should-float .mat-form-field-label{-webkit-transform:translateY(-.59375em) scale(.75);transform:translateY(-.59375em) scale(.75);width:133.33333%}.mat-form-field-appearance-fill.mat-form-field-can-float .mat-input-server[label]:not(:label-shown)+.mat-form-field-label-wrapper .mat-form-field-label{-webkit-transform:translateY(-.59374em) scale(.75);transform:translateY(-.59374em) scale(.75);width:133.33334%}.mat-form-field-appearance-outline .mat-form-field-infix{padding:1em 0}.mat-form-field-appearance-outline .mat-form-field-label{top:1.84375em;margin-top:-.25em}.mat-form-field-appearance-outline.mat-form-field-can-float .mat-input-server:focus+.mat-form-field-label-wrapper .mat-form-field-label,.mat-form-field-appearance-outline.mat-form-field-can-float.mat-form-field-should-float .mat-form-field-label{-webkit-transform:translateY(-1.59375em) scale(.75);transform:translateY(-1.59375em) scale(.75);width:133.33333%}.mat-form-field-appearance-outline.mat-form-field-can-float .mat-input-server[label]:not(:label-shown)+.mat-form-field-label-wrapper .mat-form-field-label{-webkit-transform:translateY(-1.59374em) scale(.75);transform:translateY(-1.59374em) scale(.75);width:133.33334%}.mat-grid-tile-footer,.mat-grid-tile-header{font-size:14px}.mat-grid-tile-footer .mat-line,.mat-grid-tile-header .mat-line{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;box-sizing:border-box}.mat-grid-tile-footer .mat-line:nth-child(n+2),.mat-grid-tile-header .mat-line:nth-child(n+2){font-size:12px}input.mat-input-element{margin-top:-.0625em}.mat-menu-item{font-family:Roboto,\"Helvetica Neue\",sans-serif;font-size:14px;font-weight:400}.mat-paginator,.mat-paginator-page-size .mat-select-trigger{font-family:Roboto,\"Helvetica Neue\",sans-serif;font-size:12px}.mat-radio-button,.mat-select{font-family:Roboto,\"Helvetica Neue\",sans-serif}.mat-select-trigger{height:1.125em}.mat-slide-toggle-content{font-family:Roboto,\"Helvetica Neue\",sans-serif}.mat-slider-thumb-label-text{font-family:Roboto,\"Helvetica Neue\",sans-serif;font-size:12px;font-weight:500}.mat-stepper-horizontal,.mat-stepper-vertical{font-family:Roboto,\"Helvetica Neue\",sans-serif}.mat-step-label{font-size:14px;font-weight:400}.mat-step-sub-label-error{font-weight:400}.mat-step-label-error{font-size:14px}.mat-step-label-selected{font-size:14px;font-weight:500}.mat-tab-group{font-family:Roboto,\"Helvetica Neue\",sans-serif}.mat-tab-label,.mat-tab-link{font-family:Roboto,\"Helvetica Neue\",sans-serif;font-size:14px;font-weight:500}.mat-toolbar,.mat-toolbar h1,.mat-toolbar h2,.mat-toolbar h3,.mat-toolbar h4,.mat-toolbar h5,.mat-toolbar h6{font:500 20px/32px Roboto,\"Helvetica Neue\",sans-serif;margin:0}.mat-tooltip{font-family:Roboto,\"Helvetica Neue\",sans-serif;font-size:10px;padding-top:6px;padding-bottom:6px}.mat-tooltip-handset{font-size:14px;padding-top:8px;padding-bottom:8px}.mat-list-item,.mat-list-option{font-family:Roboto,\"Helvetica Neue\",sans-serif}.mat-list-base .mat-list-item{font-size:16px}.mat-list-base .mat-list-item .mat-line{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;box-sizing:border-box}.mat-list-base .mat-list-item .mat-line:nth-child(n+2){font-size:14px}.mat-list-base .mat-list-option{font-size:16px}.mat-list-base .mat-list-option .mat-line{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;box-sizing:border-box}.mat-list-base .mat-list-option .mat-line:nth-child(n+2){font-size:14px}.mat-list-base .mat-subheader{font-family:Roboto,\"Helvetica Neue\",sans-serif;font-size:14px;font-weight:500}.mat-list-base[dense] .mat-list-item{font-size:12px}.mat-list-base[dense] .mat-list-item .mat-line{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;box-sizing:border-box}.mat-list-base[dense] .mat-list-item .mat-line:nth-child(n+2),.mat-list-base[dense] .mat-list-option{font-size:12px}.mat-list-base[dense] .mat-list-option .mat-line{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;box-sizing:border-box}.mat-list-base[dense] .mat-list-option .mat-line:nth-child(n+2){font-size:12px}.mat-list-base[dense] .mat-subheader{font-family:Roboto,\"Helvetica Neue\",sans-serif;font-size:12px;font-weight:500}.mat-option{font-family:Roboto,\"Helvetica Neue\",sans-serif;font-size:16px}.mat-optgroup-label{font:500 14px/24px Roboto,\"Helvetica Neue\",sans-serif}.mat-simple-snackbar{font-family:Roboto,\"Helvetica Neue\",sans-serif;font-size:14px}.mat-simple-snackbar-action{line-height:1;font-family:inherit;font-size:inherit;font-weight:500}.mat-tree{font-family:Roboto,\"Helvetica Neue\",sans-serif}.mat-nested-tree-node,.mat-tree-node{font-weight:400;font-size:14px}.mat-ripple{overflow:hidden;position:relative}.mat-ripple.mat-ripple-unbounded{overflow:visible}.mat-ripple-element{position:absolute;border-radius:50%;pointer-events:none;-webkit-transition:opacity,-webkit-transform cubic-bezier(0,0,.2,1);transition:opacity,transform cubic-bezier(0,0,.2,1),-webkit-transform cubic-bezier(0,0,.2,1);-webkit-transform:scale(0);transform:scale(0)}@media (-ms-high-contrast:active){.mat-ripple-element{display:none}}.cdk-visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;outline:0;-webkit-appearance:none;-moz-appearance:none}.cdk-global-overlay-wrapper,.cdk-overlay-container{pointer-events:none;top:0;left:0;height:100%;width:100%}.cdk-overlay-container{position:fixed;z-index:1000}.cdk-overlay-container:empty{display:none}.cdk-global-overlay-wrapper{display:-webkit-box;display:flex;position:absolute;z-index:1000}.cdk-overlay-pane{position:absolute;pointer-events:auto;box-sizing:border-box;z-index:1000;display:-webkit-box;display:flex;max-width:100%;max-height:100%}.cdk-overlay-backdrop{position:absolute;top:0;bottom:0;left:0;right:0;z-index:1000;pointer-events:auto;-webkit-tap-highlight-color:transparent;-webkit-transition:opacity .4s cubic-bezier(.25,.8,.25,1);transition:opacity .4s cubic-bezier(.25,.8,.25,1);opacity:0}.cdk-overlay-backdrop.cdk-overlay-backdrop-showing{opacity:1}@media screen and (-ms-high-contrast:active){.cdk-overlay-backdrop.cdk-overlay-backdrop-showing{opacity:.6}}.cdk-overlay-dark-backdrop{background:rgba(0,0,0,.32)}.cdk-overlay-transparent-backdrop,.cdk-overlay-transparent-backdrop.cdk-overlay-backdrop-showing{opacity:0}.cdk-overlay-connected-position-bounding-box{position:absolute;z-index:1000;display:-webkit-box;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column;min-width:1px;min-height:1px}.cdk-global-scrollblock{position:fixed;width:100%;overflow-y:scroll}@keyframes cdk-text-field-autofill-start{/*!*/}@keyframes cdk-text-field-autofill-end{/*!*/}.cdk-text-field-autofill-monitored:-webkit-autofill{-webkit-animation-name:cdk-text-field-autofill-start;animation-name:cdk-text-field-autofill-start}.cdk-text-field-autofill-monitored:not(:-webkit-autofill){-webkit-animation-name:cdk-text-field-autofill-end;animation-name:cdk-text-field-autofill-end}textarea.cdk-textarea-autosize{resize:none}textarea.cdk-textarea-autosize-measuring{height:auto!important;overflow:hidden!important;padding:2px 0!important;box-sizing:content-box!important}.xmat-accordion.mat-primary mat-expansion-panel.mat-expansion-panel{background-color:#2d6da3}.xmat-accordion.mat-accent mat-expansion-panel.mat-expansion-panel{background-color:#f2f9fc}.xmat-accordion.mat-warn mat-expansion-panel.mat-expansion-panel{background-color:#f44336}.xmat-accordion mat-expansion-panel.mat-expansion-panel .mat-expansion-panel-content .mat-expansion-panel-body{padding-top:24px;padding-left:16px;padding-right:16px;box-shadow:0 -5px 5px -5px #e2e2e2 inset 0 0 0 #444}.xmat-accordion mat-expansion-panel.mat-expansion-panel.xmat-accordion-no-header .mat-expansion-panel-content .mat-expansion-panel-body{padding-top:8px}.xmat-accordion.xmat-accordion-no-top-padding mat-expansion-panel.mat-expansion-panel .mat-expansion-panel-content .mat-expansion-panel-body{padding-top:0}"] }] } ]; /** @nocollapse */ XmatAccordionComponent.ctorParameters = () => [ { type: ElementRef } ]; XmatAccordionComponent.propDecorators = { expandedChange: [{ type: Output }], color: [{ type: Input }], disabled: [{ type: Input }], expanded: [{ type: Input }], collapsedHeight: [{ type: Input }], expandedHeight: [{ type: Input }] }; /** * @fileoverview added by tsickle * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc */ class XmatAccordionModule { } XmatAccordionModule.decorators = [ { type: NgModule, args: [{ imports: [ MatExpansionModule ], declarations: [ XmatAccordionComponent ], exports: [ XmatAccordionComponent ] },] } ]; /** * @fileoverview added by tsickle * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc */ /** @enum {number} */ var XmatAlertTypes = { success: 0, error: 1, question: 2, info: 3, warning: 4, disabled: 5, }; XmatAlertTypes[XmatAlertTypes.success] = 'success'; XmatAlertTypes[XmatAlertTypes.error] = 'error'; XmatAlertTypes[XmatAlertTypes.question] = 'question'; XmatAlertTypes[XmatAlertTypes.info] = 'info'; XmatAlertTypes[XmatAlertTypes.warning] = 'warning'; XmatAlertTypes[XmatAlertTypes.disabled] = 'disabled'; /** * @fileoverview added by tsickle * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc */ class XmatAlertBoxComponent { constructor() { this.id = XmatAlertBoxComponent.nextId++; } /** * @param {?} newValue * @return {?} */ set xmatAlertType(newValue) { this._xmatAlertType = newValue !== void 0 ? newValue : XmatAlertTypes.info; this.xmatAlertTypeKlass = `xmat-alert-box-${XmatAlertTypes[this.xmatAlertType]}`; } /** * @return {?} */ get xmatAlertType() { return this._xmatAlertType; } } XmatAlertBoxComponent.nextId = 0; XmatAlertBoxComponent.decorators = [ { type: Component, args: [{ selector: "xmat-alert-box", template: "<mat-card class=\"xmat-alert-box\" [ngClass]=\"xmatAlertTypeKlass\">\n <ng-content></ng-content>\n</mat-card>\n", encapsulation: ViewEncapsulation.None, host: { "[id]": "id" }, styles: ["@-webkit-keyframes cdk-text-field-autofill-start{/*!*/}@-webkit-keyframes cdk-text-field-autofill-end{/*!*/}.mat-badge-content{font-weight:600;font-size:12px;font-family:Roboto,\"Helvetica Neue\",sans-serif}.mat-badge-small .mat-badge-content{font-size:6px}.mat-badge-large .mat-badge-content{font-size:24px}.mat-h1,.mat-headline,.mat-typography h1{font:400 24px/32px Roboto,\"Helvetica Neue\",sans-serif;margin:0 0 16px}.mat-h2,.mat-title,.mat-typography h2{font:500 20px/32px Roboto,\"Helvetica Neue\",sans-serif;margin:0 0 16px}.mat-h3,.mat-subheading-2,.mat-typography h3{font:400 16px/28px Roboto,\"Helvetica Neue\",sans-serif;margin:0 0 16px}.mat-h4,.mat-subheading-1,.mat-typography h4{font:400 15px/24px Roboto,\"Helvetica Neue\",sans-serif;margin:0 0 16px}.mat-h5,.mat-typography h5{font:400 11.62px/20px Roboto,\"Helvetica Neue\",sans-serif;margin:0 0 12px}.mat-h6,.mat-typography h6{font:400 9.38px/20px Roboto,\"Helvetica Neue\",sans-serif;margin:0 0 12px}.mat-body-2,.mat-body-strong{font:500 14px/24px Roboto,\"Helvetica Neue\",sans-serif}.mat-body,.mat-body-1,.mat-typography{font:400 14px/20px Roboto,\"Helvetica Neue\",sans-serif}.mat-body p,.mat-body-1 p,.mat-typography p{margin:0 0 12px}.mat-caption,.mat-small{font:400 12px/20px Roboto,\"Helvetica Neue\",sans-serif}.mat-display-4,.mat-typography .mat-display-4{font:300 112px/112px Roboto,\"Helvetica Neue\",sans-serif;margin:0 0 56px;letter-spacing:-.05em}.mat-display-3,.mat-typography .mat-display-3{font:400 56px/56px Roboto,\"Helvetica Neue\",sans-serif;margin:0 0 64px;letter-spacing:-.02em}.mat-display-2,.mat-typography .mat-display-2{font:400 45px/48px Roboto,\"Helvetica Neue\",sans-serif;margin:0 0 64px;letter-spacing:-.005em}.mat-display-1,.mat-typography .mat-display-1{font:400 34px/40px Roboto,\"Helvetica Neue\",sans-serif;margin:0 0 64px}.mat-bottom-sheet-container{font:400 14px/20px Roboto,\"Helvetica Neue\",sans-serif}.mat-button,.mat-fab,.mat-flat-button,.mat-icon-button,.mat-mini-fab,.mat-raised-button,.mat-stroked-button{font-family:Roboto,\"Helvetica Neue\",sans-serif;font-size:14px;font-weight:500}.mat-button-toggle,.mat-card{font-family:Roboto,\"Helvetica Neue\",sans-serif}.mat-card-title{font-size:24px;font-weight:500}.mat-card-header .mat-card-title{font-size:20px}.mat-card-content,.mat-card-subtitle{font-size:14px}.mat-checkbox{font-family:Roboto,\"Helvetica Neue\",sans-serif}.mat-checkbox-layout .mat-checkbox-label{line-height:24px}.mat-chip{font-size:14px;font-weight:500}.mat-chip .mat-chip-remove.mat-icon,.mat-chip .mat-chip-trailing-icon.mat-icon{font-size:18px}.mat-table{font-family:Roboto,\"Helvetica Neue\",sans-serif}.mat-header-cell{font-size:12px;font-weight:500}.mat-cell,.mat-footer-cell{font-size:14px}.mat-calendar{font-family:Roboto,\"Helvetica Neue\",sans-serif}.mat-calendar-body{font-size:13px}.mat-calendar-body-label,.mat-calendar-period-button{font-size:14px;font-weight:500}.mat-calendar-table-header th{font-size:11px;font-weight:400}.mat-dialog-title{font:500 20px/32px Roboto,\"Helvetica Neue\",sans-serif}.mat-expansion-panel-header{font-family:Roboto,\"Helvetica Neue\",sans-serif;font-size:15px;font-weight:400}.mat-expansion-panel-content{font:400 14px/20px Roboto,\"Helvetica Neue\",sans-serif}.mat-form-field{font-size:inherit;font-weight:400;line-height:1.125;font-family:Roboto,\"Helvetica Neue\",sans-serif}.mat-form-field-wrapper{padding-bottom:1.34375em}.mat-form-field-prefix .mat-icon,.mat-form-field-suffix .mat-icon{font-size:150%;line-height:1.125}.mat-form-field-prefix .mat-icon-button,.mat-form-field-suffix .mat-icon-button{height:1.5em;width:1.5em}.mat-form-field-prefix .mat-icon-button .mat-icon,.mat-form-field-suffix .mat-icon-button .mat-icon{height:1.125em;line-height:1.125}.mat-form-field-infix{padding:.5em 0;border-top:.84375em solid transparent}.mat-form-field-can-float .mat-input-server:focus+.mat-form-field-label-wrapper .mat-form-field-label,.mat-form-field-can-float.mat-form-field-should-float .mat-form-field-label{-webkit-transform:translateY(-1.34375em) scale(.75);transform:translateY(-1.34375em) scale(.75);width:133.33333%}.mat-form-field-can-float .mat-input-server[label]:not(:label-shown)+.mat-form-field-label-wrapper .mat-form-field-label{-webkit-transform:translateY(-1.34374em) scale(.75);transform:translateY(-1.34374em) scale(.75);width:133.33334%}.mat-form-field-label-wrapper{top:-.84375em;padding-top:.84375em}.mat-form-field-label{top:1.34375em}.mat-form-field-underline{bottom:1.34375em}.mat-form-field-subscript-wrapper{font-size:75%;margin-top:.66667em;top:calc(100% - 1.79167em)}.mat-form-field-appearance-legacy .mat-form-field-wrapper{padding-bottom:1.25em}.mat-form-field-appearance-legacy .mat-form-field-infix{padding:.4375em 0}.mat-form-field-appearance-legacy.mat-form-field-can-float .mat-input-server:focus+.mat-form-field-label-wrapper .mat-form-field-label,.mat-form-field-appearance-legacy.mat-form-field-can-float.mat-form-field-should-float .mat-form-field-label{-webkit-transform:translateY(-1.28125em) scale(.75) perspective(100px) translateZ(.001px);transform:translateY(-1.28125em) scale(.75) perspective(100px) translateZ(.001px);-ms-transform:translateY(-1.28125em) scale(.75);width:133.33333%}.mat-form-field-appearance-legacy.mat-form-field-can-float .mat-form-field-autofill-control:-webkit-autofill+.mat-form-field-label-wrapper .mat-form-field-label{-webkit-transform:translateY(-1.28125em) scale(.75) perspective(100px) translateZ(.00101px);transform:translateY(-1.28125em) scale(.75) perspective(100px) translateZ(.00101px);-ms-transform:translateY(-1.28124em) scale(.75);width:133.33334%}.mat-form-field-appearance-legacy.mat-form-field-can-float .mat-input-server[label]:not(:label-shown)+.mat-form-field-label-wrapper .mat-form-field-label{-webkit-transform:translateY(-1.28125em) scale(.75) perspective(100px) translateZ(.00102px);transform:translateY(-1.28125em) scale(.75) perspective(100px) translateZ(.00102px);-ms-transform:translateY(-1.28123em) scale(.75);width:133.33335%}.mat-form-field-appearance-legacy .mat-form-field-label{top:1.28125em}.mat-form-field-appearance-legacy .mat-form-field-underline{bottom:1.25em}.mat-form-field-appearance-legacy .mat-form-field-subscript-wrapper{margin-top:.54167em;top:calc(100% - 1.66667em)}@media print{.mat-form-field-appearance-legacy.mat-form-field-can-float .mat-input-server:focus+.mat-form-field-label-wrapper .mat-form-field-label,.mat-form-field-appearance-legacy.mat-form-field-can-float.mat-form-field-should-float .mat-form-field-label{-webkit-transform:translateY(-1.28122em) scale(.75);transform:translateY(-1.28122em) scale(.75)}.mat-form-field-appearance-legacy.mat-form-field-can-float .mat-form-field-autofill-control:-webkit-autofill+.mat-form-field-label-wrapper .mat-form-field-label{-webkit-transform:translateY(-1.28121em) scale(.75);transform:translateY(-1.28121em) scale(.75)}.mat-form-field-appearance-legacy.mat-form-field-can-float .mat-input-server[label]:not(:label-shown)+.mat-form-field-label-wrapper .mat-form-field-label{-webkit-transform:translateY(-1.2812em) scale(.75);transform:translateY(-1.2812em) scale(.75)}}.mat-form-field-appearance-fill .mat-form-field-infix{padding:.25em 0 .75em}.mat-form-field-appearance-fill .mat-form-field-label{top:1.09375em;margin-top:-.5em}.mat-form-field-appearance-fill.mat-form-field-can-float .mat-input-server:focus+.mat-form-field-label-wrapper .mat-form-field-label,.mat-form-field-appearance-fill.mat-form-field-can-float.mat-form-field-should-float .mat-form-field-label{-webkit-transform:translateY(-.59375em) scale(.75);transform:translateY(-.59375em) scale(.75);width:133.33333%}.mat-form-field-appearance-fill.mat-form-field-can-float .mat-input-server[label]:not(:label-shown)+.mat-form-field-label-wrapper .mat-form-field-label{-webkit-transform:translateY(-.59374em) scale(.75);transform:translateY(-.59374em) scale(.75);width:133.33334%}.mat-form-field-appearance-outline .mat-form-field-infix{padding:1em 0}.mat-form-field-appearance-outline .mat-form-field-label{top:1.84375em;margin-top:-.25em}.mat-form-field-appearance-outline.mat-form-field-can-float .mat-input-server:focus+.mat-form-field-label-wrapper .mat-form-field-label,.mat-form-field-appearance-outline.mat-form-field-can-float.mat-form-field-should-float .mat-form-field-label{-webkit-transform:translateY(-1.59375em) scale(.75);transform:translateY(-1.59375em) scale(.75);width:133.33333%}.mat-form-field-appearance-outline.mat-form-field-can-float .mat-input-server[label]:not(:label-shown)+.mat-form-field-label-wrapper .mat-form-field-label{-webkit-transform:translateY(-1.59374em) scale(.75);transform:translateY(-1.59374em) scale(.75);width:133.33334%}.mat-grid-tile-footer,.mat-grid-tile-header{font-size:14px}.mat-grid-tile-footer .mat-line,.mat-grid-tile-header .mat-line{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;box-sizing:border-box}.mat-grid-tile-footer .mat-line:nth-child(n+2),.mat-grid-tile-header .mat-line:nth-child(n+2){font-size:12px}input.mat-input-element{margin-top:-.0625em}.mat-menu-item{font-family:Roboto,\"Helvetica Neue\",sans-serif;font-size:14px;font-weight:400}.mat-paginator,.mat-paginator-page-size .mat-select-trigger{font-family:Roboto,\"Helvetica Neue\",sans-serif;font-size:12px}.mat-radio-button,.mat-select{font-family:Roboto,\"Helvetica Neue\",sans-serif}.mat-select-trigger{height:1.125em}.mat-slide-toggle-content{font-family:Roboto,\"Helvetica Neue\",sans-serif}.mat-slider-thumb-label-text{font-family:Roboto,\"Helvetica Neue\",sans-serif;font-size:12px;font-weight:500}.mat-stepper-horizontal,.mat-stepper-vertical{font-family:Roboto,\"Helvetica Neue\",sans-serif}.mat-step-label{font-size:14px;font-weight:400}.mat-step-sub-label-error{font-weight:400}.mat-step-label-error{font-size:14px}.mat-step-label-selected{font-size:14px;font-weight:500}.mat-tab-group{font-family:Roboto,\"Helvetica Neue\",sans-serif}.mat-tab-label,.mat-tab-link{font-family:Roboto,\"Helvetica Neue\",sans-serif;font-size:14px;font-weight:500}.mat-toolbar,.mat-toolbar h1,.mat-toolbar h2,.mat-toolbar h3,.mat-toolbar h4,.mat-toolbar h5,.mat-toolbar h6{font:500 20px/32px Roboto,\"Helvetica Neue\",sans-serif;margin:0}.mat-tooltip{font-family:Roboto,\"Helvetica Neue\",sans-serif;font-size:10px;padding-top:6px;padding-bottom:6px}.mat-tooltip-handset{font-size:14px;padding-top:8px;padding-bottom:8px}.mat-list-item,.mat-list-option{font-family:Roboto,\"Helvetica Neue\",sans-serif}.mat-list-base .mat-list-item{font-size:16px}.mat-list-base .mat-list-item .mat-line{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;box-sizing:border-box}.mat-list-base .mat-list-item .mat-line:nth-child(n+2){font-size:14px}.mat-list-base .mat-list-option{font-size:16px}.mat-list-base .mat-list-option .mat-line{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;box-sizing:border-box}.mat-list-base .mat-list-option .mat-line:nth-child(n+2){font-size:14px}.mat-list-base .mat-subheader{font-family:Roboto,\"Helvetica Neue\",sans-serif;font-size:14px;font-weight:500}.mat-list-base[dense] .mat-list-item{font-size:12px}.mat-list-base[dense] .mat-list-item .mat-line{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;box-sizing:border-box}.mat-list-base[dense] .mat-list-item .mat-line:nth-child(n+2),.mat-list-base[dense] .mat-list-option{font-size:12px}.mat-list-base[dense] .mat-list-option .mat-line{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;box-sizing:border-box}.mat-list-base[dense] .mat-list-option .mat-line:nth-child(n+2){font-size:12px}.mat-list-base[dense] .mat-subheader{font-family:Roboto,\"Helvetica Neue\",sans-serif;font-size:12px;font-weight:500}.mat-option{font-family:Roboto,\"Helvetica Neue\",sans-serif;font-size:16px}.mat-optgroup-label{font:500 14px/24px Roboto,\"Helvetica Neue\",sans-serif}.mat-simple-snackbar{font-family:Roboto,\"Helvetica Neue\",sans-serif;font-size:14px}.mat-simple-snackbar-action{line-height:1;font-family:inherit;font-size:inherit;font-weight:500}.mat-tree{font-family:Roboto,\"Helvetica Neue\",sans-serif}.mat-nested-tree-node,.mat-tree-node{font-weight:400;font-size:14px}.mat-ripple{overflow:hidden;position:relative}.mat-ripple.mat-ripple-unbounded{overflow:visible}.mat-ripple-element{position:absolute;border-radius:50%;pointer-events:none;-webkit-transition:opacity,-webkit-transform cubic-bezier(0,0,.2,1);transition:opacity,transform cubic-bezier(0,0,.2,1),-webkit-transform cubic-bezier(0,0,.2,1);-webkit-transform:scale(0);transform:scale(0)}@media (-ms-high-contrast:active){.mat-ripple-element{display:none}}.cdk-visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;outline:0;-webkit-appearance:none;-moz-appearance:none}.cdk-global-overlay-wrapper,.cdk-overlay-container{pointer-events:none;top:0;left:0;height:100%;width:100%}.cdk-overlay-container{position:fixed;z-index:1000}.cdk-overlay-container:empty{display:none}.cdk-global-overlay-wrapper{display:-webkit-box;display:flex;position:absolute;z-index:1000}.cdk-overlay-pane{position:absolute;pointer-events:auto;box-sizing:border-box;z-index:1000;display:-webkit-box;display:flex;max-width:100%;max-height:100%}.cdk-overlay-backdrop{position:absolute;top:0;bottom:0;left:0;right:0;z-index:1000;pointer-events:auto;-webkit-tap-highlight-color:transparent;-webkit-transition:opacity .4s cubic-bezier(.25,.8,.25,1);transition:opacity .4s cubic-bezier(.25,.8,.25,1);opacity:0}.cdk-overlay-backdrop.cdk-overlay-backdrop-showing{opacity:1}@media screen and (-ms-high-contrast:active){.cdk-overlay-backdrop.cdk-overlay-backdrop-showing{opacity:.6}}.cdk-overlay-dark-backdrop{background:rgba(0,0,0,.32)}.cdk-overlay-transparent-backdrop,.cdk-overlay-transparent-backdrop.cdk-overlay-backdrop-showing{opacity:0}.cdk-overlay-connected-position-bounding-box{position:absolute;z-index:1000;display:-webkit-box;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column;min-width:1px;min-height:1px}.cdk-global-scrollblock{position:fixed;width:100%;overflow-y:scroll}@keyframes cdk-text-field-autofill-start{/*!*/}@keyframes cdk-text-field-autofill-end{/*!*/}.cdk-text-field-autofill-monitored:-webkit-autofill{-webkit-animation-name:cdk-text-field-autofill-start;animation-name:cdk-text-field-autofill-start}.cdk-text-field-autofill-monitored:not(:-webkit-autofill){-webkit-animation-name:cdk-text-field-autofill-end;animation-name:cdk-text-field-autofill-end}textarea.cdk-textarea-autosize{resize:none}textarea.cdk-textarea-autosize-measuring{height:auto!important;overflow:hidden!important;padding:2px 0!important;box-sizing:content-box!important}xmat-alert-box{padding:2px 0;display:block;overflow:hidden;font-size:14px}xmat-alert-box mat-card.xmat-alert-box.xmat-alert-box-primary{background-color:#2d6da3;color:#fff}xmat-alert-box mat-card.xmat-alert-box.xmat-alert-box-accent{background-color:#daeeff;color:rgba(0,0,0,.87)}xmat-alert-box mat-card.xmat-alert-box.xmat-alert-box-warn{background-color:#f44336;color:rgba(0,0,0,.87)}xmat-alert-box mat-card.xmat-alert-box.xmat-alert-box-success{background-color:#d4edda;color:#155724}xmat-alert-box mat-card.xmat-alert-box.xmat-alert-box-fade.xmat-alert-box-success{background-color:rgba(212,237,218,.5);color:rgba(21,87,36,.5)}xmat-alert-box mat-card.xmat-alert-box.xmat-alert-box-info{background-color:#cce5ff;color:#004085}xmat-alert-box mat-card.xmat-alert-box.xmat-alert-box-fade.xmat-alert-box-info{background-color:rgba(204,229,255,.5);color:rgba(0,64,133,.5)}xmat-alert-box mat-card.xmat-alert-box.xmat-alert-box-warning{background-color:#fff3cd;color:#856404}xmat-alert-box mat-card.xmat-alert-box.xmat-alert-box-fade.xmat-alert-box-warning{background-color:rgba(255,243,205,.5);color:rgba(133,100,4,.5)}xmat-alert-box mat-card.xmat-alert-box.xmat-alert-box-error{background-color:#f8d7da;color:#721c24}xmat-alert-box mat-card.xmat-alert-box.xmat-alert-box-fade.xmat-alert-box-error{background-color:rgba(248,215,218,.5);color:rgba(114,28,36,.5)}xmat-alert-box mat-card.xmat-alert-box.xmat-alert-box-question{background-color:#d1ecf1;color:#0c5460}xmat-alert-box mat-card.xmat-alert-box.xmat-alert-box-fade.xmat-alert-box-question{background-color:rgba(209,236,241,.5);color:rgba(12,84,96,.5)}xmat-alert-box mat-card.xmat-alert-box.xmat-alert-box-disabled{background-color:#aaa;color:#777}xmat-alert-box mat-card.xmat-alert-box.xmat-alert-box-fade.xmat-alert-box-disabled{background-color:rgba(170,170,170,.5);color:rgba(119,119,119,.5)}xmat-alert-box.xmat-alert-box-fade mat-card.xmat-alert-box.xmat-alert-box-primary{background-color:rgba(45,109,163,.5);color:#fff}xmat-alert-box.xmat-alert-box-fade mat-card.xmat-alert-box.xmat-alert-box-accent{background-color:rgba(218,238,255,.5);color:rgba(0,0,0,.87)}xmat-alert-box.xmat-alert-box-fade mat-card.xmat-alert-box.xmat-alert-box-warn{background-color:rgba(244,67,54,.5);color:rgba(0,0,0,.87)}xmat-alert-box.xmat-alert-box-fade mat-card.xmat-alert-box.xmat-alert-box-success{background-color:rgba(212,237,218,.5);color:rgba(21,87,36,.5)}xmat-alert-box.xmat-alert-box-fade mat-card.xmat-alert-box.xmat-alert-box-info{background-color:rgba(204,229,255,.5);color:rgba(0,64,133,.5)}xmat-alert-box.xmat-alert-box-fade mat-card.xmat-alert-box.xmat-alert-box-warning{background-color:rgba(255,243,205,.5);color:rgba(133,100,4,.5)}xmat-alert-box.xmat-alert-box-fade mat-card.xmat-alert-box.xmat-alert-box-error{background-color:rgba(248,215,218,.5);color:rgba(114,28,36,.5)}xmat-alert-box.xmat-alert-box-fade mat-card.xmat-alert-box.xmat-alert-box-question{background-color:rgba(209,236,241,.5);color:rgba(12,84,96,.5)}xmat-alert-box.xmat-alert-box-fade mat-card.xmat-alert-box.xmat-alert-box-disabled{background-color:rgba(170,170,170,.5);color:rgba(119,119,119,.5)}"] }] } ]; /** @nocollapse */ XmatAlertBoxComponent.ctorParameters = () => []; XmatAlertBoxComponent.propDecorators = { xmatAlertType: [{ type: Input }] }; /** * @fileoverview added by tsickle * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc */ class XmatAlertBoxModule { } XmatAlertBoxModule.decorators = [ { type: NgModule, args: [{ imports: [ CommonModule, MatCardModule ], declarations: [ XmatAlertBoxComponent ], exports: [ XmatAlertBoxComponent ] },] } ]; /** * @fileoverview added by tsickle * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc */ class XmatDialogContentComponent { } XmatDialogContentComponent.decorators = [ { type: Component, args: [{ selector: "xmat-dialog-content", template: "<ng-template #xMatDialogContent>\n <div *ngIf=\"!!content\"\n [innerHTML]=\"content\">\n </div>\n <ng-content></ng-content>\n</ng-template>", encapsulation: ViewEncapsulation.None }] } ]; XmatDialogContentComponent.propDecorators = { xMatDialogContent: [{ type: ViewChild, args: ["xMatDialogContent",] }] }; /** * @fileoverview added by tsickle * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc */ class XmatConfirmDialogComponent { /** * @param {?} _dialogRef * @param {?} _resolver * @param {?} _viewContainerRef * @param {?} data */ constructor(_dialogRef, _resolver, _viewContainerRef, data) { this._dialogRef = _dialogRef; this._resolver = _resolver; this._viewContainerRef = _viewContainerRef; this.data = data; this._dialogContentClass = XmatDialogContentComponent; } /** * @return {?} */ ngOnInit() { if (!this.data.dialogContent) { this.data.dialogContent = ""; } if (typeof this.data.dialogContent === "string") { /** @type {?} */ const tmpCompInstance = this._constructContent(); tmpCompInstance.content = this.data.dialogContent; this.dialogContentOutlet = tmpCompInstance; } else if (this.data.dialogContent instanceof XmatDialogContentComponent) { // Valid // this._xmatFunctions.logWithStyle("XmatDialog", "Was Instance Content", "#336699", this.data.dialogContent); this.dialogContentOutlet = this.data.dialogContent; } else { // this._xmatFunctions.logWithStyle("XmatDialog", "Was INVALID Content", "#CC0000", this.data.dialogContent); console.error(`xmat-confirm-dialog error: invalid content for dialogContent. Expected string|XmatDialogContentComponent, found '${typeof this.data.dialogContent}'`, this.data.dialogContent); } } /** * @return {?} */ onNoClick() { this._dialogRef.close(false); } /** * @return {?} */ onYesClick() { this._dialogRef.close(true); } /** * @return {?} */ _constructContent() { /** @type {?} */ const factory = this._resolver.resolveComponentFactory(this._dialogContentClass); this._dialogContentRef = this._viewContainerRef.createComponent(factory); return /** @type {?} */ (this._dialogContentRef.instance); } } XmatConfirmDialogComponent.decorators = [ { type: Component, args: [{ selector: "xmat-confirm-dialog", template: "<h1 mat-dialog-title>{{data.title}}</h1>\n<div mat-dialog-content\n [ngClass]=\"{'xmat-margin-bottom-0': data.hideActions}\">\n <ng-container *ngTemplateOutlet=\"dialogContentOutlet.xMatDialogContent\">\n\n </ng-container>\n</div>\n<div mat-dialog-actions\n *ngIf=\"!data.hideActions\">\n <button mat-button\n mat-raised-button\n *ngIf=\"!data.hideCancelButton\"\n cdkFocusInitial\n (click)=\"onNoClick()\">\n {{data.cancelText}}\n </button>\n <button mat-button\n mat-raised-button\n [disabled]=\"data.additionalForm?.invalid\"\n [color]=\"data.confirmColor || 'warn'\"\n (click)=\"onYesClick()\">\n {{data.confirmText}}\n </button>\n</div>", styles: ["div[mat-dialog-actions]{-webkit-box-pack:justify;justify-content:space-between;display:-webkit-box;display:flex}div[mat-dialog-actions]>button:only-child{margin:auto}div[mat-dialog-content]:not([class*=xmat-margin-bottom]){margin-bottom:24px}"] }] } ]; /** @nocollapse */ XmatConfirmDialogComponent.ctorParameters = () => [ { type: MatDialogRef }, { type: ComponentFactoryResolver }, { type: ViewContainerRef }, { type: undefined, decorators: [{ type: Inject, args: [MAT_DIALOG_DATA,] }] } ]; /** * @fileoverview added by tsickle * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc */ /** @enum {number} */ var XmatAlertDialogActions = { confirm: 0, cancel: 1, close: 2, }; XmatAlertDialogActions[XmatAlertDialogActions.confirm] = 'confirm'; XmatAlertDialogActions[XmatAlertDialogActions.cancel] = 'cancel'; XmatAlertDialogActions[XmatAlertDialogActions.close] = 'close'; /** * @fileoverview added by tsickle * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc */ /** @type {?} */ const bgColorKeyKebab = "background-color"; /** @type {?} */ const bgColorKeyCamel = "backgroundColor"; /** @type {?} */ const dash = "-"; /** @type {?} */ const typePlaceHolder = "%type%"; /** @type {?} */ const classNamePre = "swal2"; /** @type {?} */ const classNameAnimate = [classNamePre, "animate", typePlaceHolder, "icon"].join(dash); /** @type {?} */ const classNameJustifyCenter = "xmat-justify-center"; /** @type {?} */ const classNameJustifyBetween = "xmat-justify-between"; /** * TODO: check in ngx-popper how to pass tplRef content */ class XmatAlertDialogComponent { /** * TODO: add dynamic template binding, that would be really cool and reusable * @param {?} _dialogRef * @param {?} data */ constructor(_dialogRef, data) { this._dialogRef = _dialogRef; this.data = data; this.md = { actions: XmatAlertDialogActions, actionsCtClassNames: classNameJustifyCenter, iconClassNames: "", types: XmatAlertTypes, inner: { [XmatAlertTypes[XmatAlertTypes.success]]: "", [XmatAlertTypes[XmatAlertTypes.error]]: "", [XmatAlertTypes[XmatAlertTypes.warning]]: "!", [XmatAlertTypes[XmatAlertTypes.question]]: "?", [XmatAlertTypes[XmatAlertTypes.info]]: "i", }, type: "", styles: { cancel: {}, confirm: {} } }; } /** * @return {?} */ ngOnInit() { if (this.data.type !== 0 && !this.data.type) { this.data.type = XmatAlertTypes.info; } if (!this.data.hideCancelButton && !this.data.hideConfirmButton) { this.md.actionsCtClassNames = classNameJustifyBetween; } this.md.type = XmatAlertTypes[this.data.type]; this.md.iconClassNames = [ [classNamePre, this.md.type].join(dash), classNameAnimate.replace(typePlaceHolder, this.md.type) ]; } /** * @return {?} */ ngAfterViewInit() { // Apply primary bg if color is not set if (!!this._confirmStyles) { merge(this.md.styles.confirm, this._confirmStyles); } /** @type {?} */ const hasDefaultColor = !!this.md.styles.confirm[bgColorKeyKebab] || !!this.md.styles.confirm[bgColorKeyCamel]; if (!hasDefaultColor && !!this.