chi-app-lib
Version:
This is a custom component (input dropdown grid textarea map captcha) published to npm.
2 lines • 27.8 kB
JavaScript
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("@angular/common"),require("@angular/forms"),require("@angular/cdk/table"),require("@angular/material"),require("mapbox-gl")):"function"==typeof define&&define.amd?define("chi-app-lib",["exports","@angular/core","@angular/common","@angular/forms","@angular/cdk/table","@angular/material","mapbox-gl"],e):e((t=t||self)["chi-app-lib"]={},t.ng.core,t.ng.common,t.ng.forms,t.ng.cdk.table,t.ng.material,t.mapboxGl)}(this,function(t,e,n,i,o,r,a){"use strict";var l=function(){},s=function(){function t(){}return t.prototype.isErrorState=function(t,e){return!(!t||!t.invalid||!t.dirty&&!t.touched)},t}(),p={provide:i.NG_VALUE_ACCESSOR,useExisting:e.forwardRef(function(){return h}),multi:!0},h=function(){function t(t){this.cdRef=t,this.type="text",this.direction="rtl",this.floatLabel="auto",this.pattern="",this.petternMessage="رقم غیر صحیح!",this.showValidatorMessage=!0,this.showSuffix=!1,this.suffixIcon="close",this.suffixClicked=new e.EventEmitter,this.isValid=new e.EventEmitter,this.matcher=new s,this.id="chi-input"+this.idGenerator(),this.element=new i.FormControl(""),this.innerValue="",this.onTouchedCallback=l,this.onChangeCallback=l,this.faNumberToEn=function(t){if(!t)return t;for(var e="",n=t.toString(),i=0,o=n.length;i<o;i++)e+="0123456789"["۰۱۲۳۴۵۶۷۸۹".indexOf(n[i])]||n[i];return e},this.toPersianChar=function(t){if(!t)return t;for(var e=["ي","ك","ى"],n=["ی","ک","ی"],i=0,o=e.length;i<o;i++)t=t.replace(new RegExp(e[i],"g"),n[i]);return t}}return Object.defineProperty(t.prototype,"value",{get:function(){return this.toPersianChar(this.faNumberToEn(this.innerValue))},set:function(t){var e=this;t!==this.innerValue&&(this.innerValue=t,this.onChangeCallback(t),setTimeout(function(t){e.isValid.emit(e.element.valid)},100))},enumerable:!0,configurable:!0}),t.prototype.onBlur=function(t){this.onTouchedCallback(),this.isValid.emit(this.element.valid)},t.prototype.writeValue=function(t){var e=this;t!==this.innerValue&&(this.innerValue=t,setTimeout(function(t){e.isValid.emit(e.element.valid)},100))},t.prototype.registerOnChange=function(t){this.onChangeCallback=t},t.prototype.registerOnTouched=function(t){this.onTouchedCallback=t},t.prototype.changedInput=function(t,e){var n=this;setTimeout(function(t){n.isValid.emit(n.element.valid)},100)},t.prototype.onFocused=function(t){this.isValid.emit(this.element.valid)},t.prototype.ngOnInit=function(){this.required&&this.minLength&&this.maxLength&&this.pattern?this.element=new i.FormControl("",[i.Validators.required,i.Validators.pattern(this.pattern),i.Validators.minLength(this.minLength),i.Validators.maxLength(this.maxLength)]):!this.required||this.minLength||this.maxLength||this.pattern?this.required||this.minLength||this.maxLength||!this.pattern?this.required||!this.minLength||this.maxLength||this.pattern?this.required||this.minLength||!this.maxLength||this.pattern?!this.required&&this.minLength&&this.maxLength&&!this.pattern&&(this.element=new i.FormControl("",[i.Validators.maxLength(this.maxLength),i.Validators.minLength(this.minLength)])):this.element=new i.FormControl("",[i.Validators.maxLength(this.maxLength)]):this.element=new i.FormControl("",[i.Validators.minLength(this.minLength)]):this.element=new i.FormControl("",[i.Validators.maxLength(this.maxLength)]):this.element=new i.FormControl("",[i.Validators.required])},t.prototype.ngOnChanges=function(t){(t.isDirty||{}).currentValue&&this.element.markAsDirty({onlySelf:!0})},t.prototype.ngAfterViewInit=function(){this.focuse&&(this.inputEl.nativeElement.focus(),this.cdRef.detectChanges())},t.prototype.getErrorMessage=function(){return this.element.hasError("required")?" لا يمكن أن يكون هذا الحقل فارغًا!":this.element.hasError("pattern")?this.petternMessage:this.element.hasError("minlength")?" حداقل "+this.minLength+" کاراکتر وارد نمایید!":this.element.hasError("maxlength")?" حداکثر "+this.maxLength+" کاراکتر وارد نمایید!":""},t.prototype.suffixClick=function(t){"close"===this.suffixIcon&&(this.value=""),this.suffixClicked.emit({value:t,action:this.suffixIcon})},t.prototype.idGenerator=function(){var t=Math.random();return t.toString(36),t.toString(36).substr(2,9)},t.decorators=[{type:e.Component,args:[{selector:"lib-chi-input",template:'<div class="element-container" [ngClass]="className" dir="{{direction}}">\n <mat-form-field [hideRequiredMarker]="true" floatLabel="{{floatLabel}}">\n <input matInput\n id="{{id}}"\n #input\n placeholder="{{placeHolder}}"\n [formControl]="element"\n required="{{required}}"\n type="{{type}}"\n [readonly]="readonly"\n [(ngModel)]="value"\n [minlength]="minLength"\n [maxlength]="maxLength"\n pattern="{{pattern}}"\n (ngModelChange)="changedInput($event,element.valid)"\n (focus)="onFocused(element.valid)"\n (blur)="onBlur(element.valid)"\n [errorStateMatcher]="matcher">\n <button mat-button *ngIf="showSuffix" matSuffix mat-icon-button aria-label="Clear"\n [disabled]="!element.value"\n (click)="suffixClick(value)">\n <mat-icon>{{suffixIcon}}</mat-icon>\n </button>\n <mat-hint align="start" *ngIf="hintText"><strong>{{hintText}}</strong></mat-hint>\n <mat-error *ngIf="element.invalid&&showValidatorMessage">{{getErrorMessage()}}</mat-error>\n </mat-form-field>\n</div>\n',providers:[p],styles:[".element-container{display:flex;flex-direction:column}.element-container>*{width:100%}"]}]}],t.ctorParameters=function(){return[{type:e.ChangeDetectorRef}]},t.propDecorators={type:[{type:e.Input}],direction:[{type:e.Input}],floatLabel:[{type:e.Input}],pattern:[{type:e.Input}],petternMessage:[{type:e.Input}],className:[{type:e.Input}],readonly:[{type:e.Input}],required:[{type:e.Input}],placeHolder:[{type:e.Input}],hintText:[{type:e.Input}],minLength:[{type:e.Input}],maxLength:[{type:e.Input}],showValidatorMessage:[{type:e.Input}],showSuffix:[{type:e.Input}],suffixIcon:[{type:e.Input}],isDirty:[{type:e.Input}],focuse:[{type:e.Input}],suffixClicked:[{type:e.Output}],isValid:[{type:e.Output}],inputEl:[{type:e.ViewChild,args:["input",{static:!1}]}]},t}();var u=function(){},m=function(){function t(){}return t.prototype.isErrorState=function(t,e){return!(!t||!t.invalid||!t.dirty&&!t.touched)},t}(),c={provide:i.NG_VALUE_ACCESSOR,useExisting:e.forwardRef(function(){return d}),multi:!0},d=function(){function t(){this.type="text",this.direction="rtl",this.pattern="",this.showValidatorMessage=!0,this.isValid=new e.EventEmitter,this.matcher=new m,this.id="chi-textarea"+this.idGenerator(),this.element=new i.FormControl(""),this.innerValue="",this.onTouchedCallback=u,this.onChangeCallback=u,this.required&&this.minLength&&this.maxLength&&this.pattern?this.element=new i.FormControl("",[i.Validators.required,i.Validators.pattern(this.pattern),i.Validators.minLength(this.minLength),i.Validators.maxLength(this.maxLength)]):!this.required||this.minLength||this.maxLength||this.pattern?this.required||this.minLength||this.maxLength||!this.pattern?this.required||!this.minLength||this.maxLength||this.pattern?this.required||this.minLength||!this.maxLength||this.pattern||(this.element=new i.FormControl("",[i.Validators.maxLength(this.maxLength)])):this.element=new i.FormControl("",[i.Validators.minLength(this.minLength)]):this.element=new i.FormControl("",[i.Validators.maxLength(this.maxLength)]):this.element=new i.FormControl("",[i.Validators.required])}return Object.defineProperty(t.prototype,"value",{get:function(){return this.innerValue},set:function(t){var e=this;t!==this.innerValue&&(this.innerValue=t,this.onChangeCallback(t),setTimeout(function(t){e.isValid.emit(e.element.valid)},100))},enumerable:!0,configurable:!0}),t.prototype.onBlur=function(t){this.onTouchedCallback(),this.isValid.emit(this.element.valid)},t.prototype.writeValue=function(t){var e=this;t!==this.innerValue&&(this.innerValue=t,setTimeout(function(t){e.isValid.emit(e.element.valid)},100))},t.prototype.registerOnChange=function(t){this.onChangeCallback=t},t.prototype.registerOnTouched=function(t){this.onTouchedCallback=t},t.prototype.changedInput=function(t,e){var n=this;setTimeout(function(t){n.isValid.emit(n.element.valid)},100)},t.prototype.onFocused=function(t){this.isValid.emit(this.element.valid)},t.prototype.ngOnInit=function(){},t.prototype.ngOnChanges=function(t){(t.isDirty||{}).currentValue&&this.element.markAsDirty({onlySelf:!0})},t.prototype.getErrorMessage=function(){return this.element.hasError("required")?" لا يمكن أن يكون هذا الحقل فارغًا!":this.element.hasError("pattern")?"رقم غیر صحیح!":this.element.hasError("minlength")?" حداقل "+this.minLength+" کاراکتر وارد نمایید!":this.element.hasError("maxlength")?" حداکثر "+this.maxLength+" کاراکتر وارد نمایید!":""},t.prototype.getElement=function(t){},t.prototype.idGenerator=function(){var t=Math.random();return t.toString(36),t.toString(36).substr(2,9)},t.decorators=[{type:e.Component,args:[{selector:"lib-text-area",template:'<div class="element-container" [ngClass]="className" dir="{{direction}}">\n <mat-form-field [hideRequiredMarker]="true">\n <textarea matInput\n id="{{id}}"\n cdkTextareaAutosize\n cdkAutosizeMinRows="2"\n cdkAutosizeMaxRows="5"\n placeholder="{{placeHolder}}"\n [formControl]="element"\n required="{{required}}"\n [(ngModel)]="value"\n (input)="getElement($event)"\n [disabled]="readonly"\n [minlength]="minLength"\n [maxlength]="maxLength"\n (ngModelChange)="changedInput($event,element.valid)"\n (focus)="onFocused(element.valid)"\n (blur)="onBlur(element.valid)"\n [errorStateMatcher]="matcher">\n </textarea>\n\n <mat-hint align="end" *ngIf="showCountValue">\n {{(value || \'\').length}}/{{maxLength}}\n </mat-hint>\n\n <mat-hint align="start" *ngIf="hintText"><strong>{{hintText}}</strong></mat-hint>\n <mat-error *ngIf="element.invalid&&showValidatorMessage">{{getErrorMessage()}}</mat-error>\n </mat-form-field>\n</div>\n',providers:[c],styles:[".element-container{display:flex;flex-direction:column}.element-container>*{width:100%}"]}]}],t.ctorParameters=function(){return[]},t.propDecorators={type:[{type:e.Input}],direction:[{type:e.Input}],pattern:[{type:e.Input}],className:[{type:e.Input}],readonly:[{type:e.Input}],required:[{type:e.Input}],placeHolder:[{type:e.Input}],hintText:[{type:e.Input}],minLength:[{type:e.Input}],maxLength:[{type:e.Input}],showCountValue:[{type:e.Input}],isDirty:[{type:e.Input}],showValidatorMessage:[{type:e.Input}],isValid:[{type:e.Output}]},t}();var g=function(){function t(){this.marker=[],this.id=this.idGenerator(),this.maxZoom=18,this.minZoom=5,this.zoom=5,this.center=[51.4,35.7],this.southWest={lat:24.350969,lng:44},this.northEast={lat:39.912996,lng:63.5},this.mode="select",this.zoomControl=!0,this.dragging=!0,this.zoomMarker=17,this.showMarker=!0,this.coordinate=new e.EventEmitter,this.getMap=new e.EventEmitter}return t.prototype.ngOnChanges=function(t){t.height;var e=t.dragging;(t.resetCoordinate||{}).currentValue&&this.resetMarker(),!1!==(e||{}).currentValue&&!0!==(e||{}).currentValue||this.disabledDrag()},t.prototype.ngOnInit=function(){var t=this;setTimeout(function(e){t.initMap()},100)},t.prototype.idGenerator=function(){var t=Math.random();return t.toString(36),t.toString(36).substr(2,9)},t.prototype.disabledDrag=function(){this.map&&(this.dragging?this.map.dragPan.enable():this.map.dragPan.disable())},t.prototype.encryptTileUrl=function(t,e){if("Tile"===e&&t.match("hash")){var n=t.split("/");return{url:t=t.split("hash")[0]+"hash/"+hashThis(n[n.length-3]+"/"+n[n.length-2]+"/"+n[n.length-1],!0)}}if("Tile"===e&&t.match("google")){n=t.split("pl&")[1].split("/");var i=t.split("&");return{url:t=(i[0]+"&"+i[1]+"&x="+n[n.length-2]+"&y="+n[n.length-1]+"&z="+n[n.length-3]).replace(".jpeg","")}}return{url:t}},t.prototype.initMap=function(){var t=this;this.map=new a.Map({transformRequest:this.encryptTileUrl,container:"chi-map"+this.id,style:{version:8,sources:{"simple-tiles":{type:"raster",tiles:[this.mapUrl],tileSize:256}},layers:[{id:"simple-tiles",type:"raster",source:"simple-tiles"}]},center:this.center,zoom:this.minZoom,minZoom:this.minZoom,maxZoom:this.maxZoom,maxBounds:[[this.southWest.lng,this.southWest.lat],[this.northEast.lng,this.northEast.lat]]}),this.map.scrollZoom.setWheelZoomRate(1);var e=new a.NavigationControl({showCompass:!1,showZoom:this.zoomControl});this.map.addControl(e,"top-left"),this.map.dragRotate.disable(),this.map.touchZoomRotate.disableRotation(),this.map.dragRotate.disable(),this.zoomControl?this.map.scrollZoom.enable():this.map.scrollZoom.disable(),this.disabledDrag(),"select"===this.mode&&(this.map.on("dragstart",function(e){t.updateCoordinate()}),this.map.on("drag",function(e){t.updateCoordinate()}),this.map.on("dragend",function(e){t.updateCoordinate()}),this.map.on("zoomend",function(e){t.updateCoordinate()})),this.showMarker&&this.setMarker(),this.getMap.emit(this.map)},t.prototype.updateCoordinate=function(){var t=this.map.getCenter();this.updatePositionMarker(t.lat,t.lng),this.coordinate.emit(t)},t.prototype.setMarker=function(){var t=this,e=this.coordinateMarker||this.map.getCenter();({type:"FeatureCollection",features:[{type:"Feature",properties:{iconSize:this.markerSize},geometry:{type:"Point",coordinates:e}}]}).features.forEach(function(e){var n=document.createElement("div");n.className="marker",n.style.backgroundImage="url("+t.markerUrl+")",n.style.width=e.properties.iconSize[0]+"px",n.style.height=e.properties.iconSize[1]+"px",n.draggable=!1;var i=new a.Marker(n,{offset:t.markerAnchor}).setLngLat(e.geometry.coordinates).addTo(t.map);t.marker.push(i)}),this.paneToMarker(e.lat,e.lng||e.lon),this.coordinate.emit(e)},t.prototype.paneToMarker=function(t,e){this.map.flyTo({center:[e,t],zoom:this.zoomMarker})},t.prototype.updatePositionMarker=function(t,e){for(var n=0;n<this.marker.length;n++)this.marker[n]._lngLat={lat:t,lng:e},this.marker[n]._update()},t.prototype.resetMarker=function(){this.updatePositionMarker(this.coordinateMarker.lat,this.coordinateMarker.lng),this.paneToMarker(this.coordinateMarker.lat,this.coordinateMarker.lng||this.coordinateMarker.lon)},t.decorators=[{type:e.Component,args:[{selector:"lib-chi-map",template:'<div id="chi-map{{id}}" [ngStyle]="{\'width\': width , \'height\': height}" class="chi-map"></div>\n',styles:[".chi-map{position:relative;direction:rtl;z-index:10021;transition:height .5s ease-in-out}"]}]}],t.ctorParameters=function(){return[]},t.propDecorators={mapUrl:[{type:e.Input}],maxZoom:[{type:e.Input}],minZoom:[{type:e.Input}],zoom:[{type:e.Input}],center:[{type:e.Input}],southWest:[{type:e.Input}],northEast:[{type:e.Input}],mode:[{type:e.Input}],zoomControl:[{type:e.Input}],dragging:[{type:e.Input}],markerUrl:[{type:e.Input}],markerSize:[{type:e.Input}],markerAnchor:[{type:e.Input}],coordinateMarker:[{type:e.Input}],resetCoordinate:[{type:e.Input}],zoomMarker:[{type:e.Input}],width:[{type:e.Input}],height:[{type:e.Input}],showMarker:[{type:e.Input}],coordinate:[{type:e.Output}],getMap:[{type:e.Output}]},t}();var f=function(){function t(){this.refreshIcon="refresh",this.key=new e.EventEmitter,this.id="captcha"+this.idGenerator()}return t.prototype.ngOnInit=function(){this.createCpatcha()},t.prototype.ngOnChanges=function(t){t.isRefreshImage.currentValue&&this.createCpatcha()},t.prototype.createCpatcha=function(){var t=Math.floor(65536*(1+Math.random())).toString(16).substring(1);this.imageLink=this.imageUrl+t,this.key.emit(t),this.isRefreshImage=!1},t.prototype.idGenerator=function(){var t=Math.random();return t.toString(36),t.toString(36).substr(2,9)},t.decorators=[{type:e.Component,args:[{selector:"lib-captcha",template:'<div class="element-container" id="{{id}}" [ngClass]="className">\n <div>\n <img src="{{imageLink}}" width="100%">\n </div>\n <button mat-button mat-icon-button\n [ngClass]="iconClass"\n (click)="createCpatcha()">\n <mat-icon>{{refreshIcon}}</mat-icon>\n </button>\n</div>\n',styles:[".element-container{display:flex;flex-direction:row}.element-container>button{display:flex;place-content:center;justify-content:center}"]}]}],t.ctorParameters=function(){return[]},t.propDecorators={imageUrl:[{type:e.Input}],className:[{type:e.Input}],iconClass:[{type:e.Input}],refreshIcon:[{type:e.Input}],isRefreshImage:[{type:e.Input}],key:[{type:e.Output}]},t}();var y=function(){},C=function(){function t(){}return t.prototype.isErrorState=function(t,e){return!(!t||!t.invalid||!t.dirty&&!t.touched)},t}(),b={provide:i.NG_VALUE_ACCESSOR,useExisting:e.forwardRef(function(){return w}),multi:!0},w=function(){function t(t){this.ref=t,this.options=[],this.direction="rtl",this.floatLabel="auto",this.pattern="",this.showValidatorMessage=!0,this.isValid=new e.EventEmitter,this.valueChanged=new e.EventEmitter,this.matcher=new C,this.id="chi-input"+this.idGenerator(),this.element=new i.FormControl(""),this.innerValue="",this.onTouchedCallback=y,this.onChangeCallback=y}return Object.defineProperty(t.prototype,"value",{get:function(){return this.innerValue},set:function(t){var e=this;t!==this.innerValue&&(this.innerValue=t,this.onChangeCallback(t),setTimeout(function(t){e.isValid.emit(e.element.valid)},100))},enumerable:!0,configurable:!0}),t.prototype.onBlur=function(t){this.onTouchedCallback(),this.isValid.emit(this.element.valid)},t.prototype.writeValue=function(t){var e=this;t!==this.innerValue&&(this.innerValue=t,setTimeout(function(t){e.isValid.emit(e.element.valid)},100))},t.prototype.registerOnChange=function(t){this.onChangeCallback=t},t.prototype.registerOnTouched=function(t){this.onTouchedCallback=t},t.prototype.changedInput=function(t,e){var n=this;setTimeout(function(t){n.isValid.emit(n.element.valid),n.valueChanged.emit(n.value)},100)},t.prototype.onFocused=function(t){this.isValid.emit(this.element.valid)},t.prototype.ngOnInit=function(){},t.prototype.ngOnChanges=function(t){(t.isDirty||{}).currentValue&&(this.ref.markForCheck(),this.element.markAsDirty({onlySelf:!0}))},t.prototype.getErrorMessage=function(){return this.element.hasError("required")?" لا يمكن أن يكون هذا الحقل فارغًا!":""},t.prototype.idGenerator=function(){var t=Math.random();return t.toString(36),t.toString(36).substr(2,9)},t.decorators=[{type:e.Component,args:[{selector:"lib-dropdown",template:'<div class="element-container" [ngClass]="className" dir="{{direction}}">\n <mat-form-field [hideRequiredMarker]="true" floatLabel="{{floatLabel}}" >\n <mat-label>{{placeHolder}}</mat-label>\n <mat-select [(ngModel)]="value"\n [formControl]="element"\n [errorStateMatcher]="matcher"\n [disableOptionCentering]="true"\n #itemSelect\n required="{{required}}"\n [disabled]="readonly"\n (valueChange)="changedInput($event,element.valid)">\n <mat-option *ngFor="let item of options" [value]="item.value">\n {{item.viewValue}}\n </mat-option>\n </mat-select>\n <mat-error *ngIf="element.invalid&&showValidatorMessage">{{getErrorMessage()}}</mat-error>\n </mat-form-field>\n</div>\n',providers:[b],changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[".element-container{display:flex;flex-direction:column}.element-container>*{width:100%}"]}]}],t.ctorParameters=function(){return[{type:e.ChangeDetectorRef}]},t.propDecorators={options:[{type:e.Input}],direction:[{type:e.Input}],floatLabel:[{type:e.Input}],pattern:[{type:e.Input}],className:[{type:e.Input}],readonly:[{type:e.Input}],required:[{type:e.Input}],placeHolder:[{type:e.Input}],showValidatorMessage:[{type:e.Input}],isDirty:[{type:e.Input}],isValid:[{type:e.Output}],valueChanged:[{type:e.Output}]},t}();var x=function(){function t(){this.columns=[],this.actionsColumns=[],this.height="400px",this.openFilter=new e.EventEmitter,this.clearFilter=new e.EventEmitter,this.actionActor=new e.EventEmitter,this.createDownloadUrl=new e.EventEmitter}return t.prototype.ngOnInit=function(){},t.prototype.ngOnChanges=function(t){t.hasFilter&&(this.hasFilter=t.hasFilter.currentValue),this.displayedColumns=this.columns.map(function(t){return t.columnDef})},t.prototype.ngAfterViewInit=function(){this.displayedColumns=this.columns.map(function(t){return t.columnDef});var t=document.querySelectorAll("lib-grid .mat-cell a");t.forEach(function(e){""!==t.innerHTML&&""!==e.textContent||e.remove()})},t.prototype.selectedFilter=function(){this.openFilter.emit()},t.prototype.removeFilter=function(){this.clearFilter.emit()},t.prototype.actionColumn=function(t,e){this.actionActor.emit({actor:t,row:e})},t.prototype.onclickDownloadUrl=function(){this.createDownloadUrl.emit()},t.decorators=[{type:e.Component,args:[{selector:"lib-grid",template:'<mat-table #table [dataSource]="data">\n\n <ng-container *ngFor="let column of columns" [cdkColumnDef]="column.columnDef">\n <mat-header-cell *cdkHeaderCellDef [style.flex]="\'0 0 \' + column.width">\n <span *ngIf="column.columnDef != \'filter\' && column.columnDef != \'actions\' && column.columnDef != \'download\'">\n {{ column.header }}\n </span>\n \x3c!-- filter --\x3e\n <ng-container *ngIf="column.columnDef == \'filter\'">\n <button mat-raised-button color="primary" (click)="selectedFilter()" *ngIf="!hasFilter">\n <img [src]="filterOfSrc" *ngIf="filterOfSrc">\n <span>محدودسازی</span>\n </button>\n <button mat-raised-button color="primary" (click)="removeFilter()" *ngIf="hasFilter">\n <img [src]="filterOnSrc" *ngIf="filterOnSrc">\n <span>محدودشده</span>\n </button>\n </ng-container>\n \x3c!-- download --\x3e\n <ng-container *ngIf="column.columnDef == \'download\'">\n <a (click)="onclickDownloadUrl()" href="{{downloadUrl}}" [matTooltip]="downloadName" class="download-file">\n <img [src]="downloadOfSrc" *ngIf="downloadOfSrc" width="30px">\n </a>\n </ng-container>\n </mat-header-cell>\n\n <mat-cell *cdkCellDef="let row"\n [style.flex]="\'0 0 \' + column.width"\n dir="{{column.dir}}"\n [matTooltip]="column.cell(row).length>15 ? column.cell(row) : \'\'">\n <span *ngIf="column.type !=\'color\' && column.type !=\'link\' && column.columnDef!= \'actions\' &&\n column.columnDef!= \'download\' && column.columnDef!= \'filter\'"\n [style.fontWeight]="column.bold ? (column.bold(row) === \'true\' ? \'bold\' : \'normal\') : \'normal\'">\n <i *ngIf="column.hasIcon" class="material-icons" [style.color]="column.color">{{column.icon}}</i>\n <span *ngIf="column.type !=\'number\'">\n {{ column.cell(row)}}\n </span>\n <span *ngIf="column.type ==\'number\'">\n {{ column.cell(row) | number}}\n </span>\n\n </span>\n <i *ngIf="column.type ==\'color\'" class="material-icons" [style.color]="column.cell(row)">stop</i>\n\n <a *ngIf="column.type ==\'link\'" href="{{column.cell(row)}}" target="_blank"> {{column.cell(row)}}</a>\n\n \x3c!-- actions --\x3e\n <ng-container *ngIf="column.columnDef == \'actions\'">\n <a\n *ngFor="let actColumn of actionsColumns; let first = first; let last = last"\n (click)="actionColumn(actColumn.actor, row)">\n <span *ngIf="actColumn.show(row)">\n {{ actColumn.name }}\n \x3c!--<span *ngIf="!last" class="spliter">|</span>--\x3e\n </span>\n\n </a>\n\n </ng-container>\n\n </mat-cell>\n </ng-container>\n\n\n <mat-header-row *matHeaderRowDef="displayedColumns; sticky: true"></mat-header-row>\n <mat-row *matRowDef="let row; columns: displayedColumns;"></mat-row>\n\n</mat-table>\n<div class="no-results" [style.display]="data.length == 0 ? \'\' : \'none\'">\n موردی وجود ندارد\n</div>\n',styles:[".no-results{display:flex;height:50vh;justify-content:center;align-items:center;font-weight:700}.mat-table{width:100%;direction:rtl}.mat-table mat-footer-row,.mat-table mat-header-row,.mat-table mat-row,.mat-table td.mat-cell,.mat-table td.mat-footer-cell,.mat-table th.mat-header-cell{border-bottom-color:#ededed}.mat-table mat-footer-row,.mat-table mat-row{min-height:40px;padding-left:8px}.mat-table .mat-header-row{background-color:#d5dfe2;min-height:48px;border:0;padding-left:8px}.mat-table .mat-header-row .mat-header-cell{color:#333;font-weight:700}.mat-table .mat-header-row .mat-header-cell a.download-file{display:flex;align-items:center}.mat-table .mat-header-row .mat-header-cell button{font-size:11px;background-color:transparent;box-shadow:none;color:#a8acb0;padding:0 10px}.mat-table [dir=rtl] mat-cell:first-of-type,.mat-table [dir=rtl] mat-footer-cell:first-of-type,.mat-table [dir=rtl] mat-header-cell:first-of-type,.mat-table mat-cell:first-of-type,.mat-table mat-footer-cell:first-of-type,.mat-table mat-header-cell:first-of-type{padding-left:0;padding-right:0}.mat-table mat-cell:last-of-type,.mat-table mat-footer-cell:last-of-type,.mat-table mat-header-cell:last-of-type{padding-right:0;padding-left:0}.mat-table .mat-cell,.mat-table .mat-header-cell{justify-content:center;font-size:11px}.mat-table .mat-column-actions,.mat-table .mat-column-filter{justify-content:flex-end}.mat-table .mat-cell:empty,.mat-table .mat-header-cell:empty{display:none}.mat-table .mat-cell{color:#1d1c1c}.mat-table .mat-cell a{color:#2852a6;text-decoration:none;display:flex}.mat-table .mat-cell a:empty{display:none}.mat-table .mat-cell a:not(:empty)+a:not(:empty)::before{content:'|';padding-top:3px}.mat-table .mat-cell span{-ms-grid-row-align:center;align-self:center;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;padding:0 10px}.mat-table .mat-cell i{font-size:20px}.mat-table .mat-cell span.spliter{padding:0 3px}::ng-deep .mat-tooltip-panel .mat-tooltip{background-color:#1d3b5d;font-size:11px;line-height:24px;text-align:right;max-width:400px;direction:rtl;opacity:.9;margin-top:-10px;padding:10px}"]}]}],t.ctorParameters=function(){return[]},t.propDecorators={columns:[{type:e.Input}],actionsColumns:[{type:e.Input}],columnsToDisplay:[{type:e.Input}],data:[{type:e.Input}],height:[{type:e.Input}],hasFilter:[{type:e.Input}],filterOfSrc:[{type:e.Input}],filterOnSrc:[{type:e.Input}],downloadOfSrc:[{type:e.Input}],downloadUrl:[{type:e.Input}],downloadName:[{type:e.Input}],openFilter:[{type:e.Output}],clearFilter:[{type:e.Output}],actionActor:[{type:e.Output}],createDownloadUrl:[{type:e.Output}]},t}();var I=function(){function t(){}return t.decorators=[{type:e.NgModule,args:[{declarations:[h,d,g,f,w,x],imports:[n.CommonModule,i.FormsModule,i.ReactiveFormsModule,r.MatInputModule,r.MatButtonModule,r.MatIconModule,r.MatSelectModule,r.MatTableModule,r.MatTooltipModule,o.CdkTableModule],exports:[h,d,g,f,w,x]}]}],t}();t.CHI_INPUT_COMPONENT_CONTROL_VALUE_ACCESSOR=p,t.CaptchaComponent=f,t.ChiInputComponent=h,t.ChiLibModule=I,t.ChiMapComponent=g,t.DROPDOWN_COMPONENT_CONTROL_VALUE_ACCESSOR=b,t.DropdownComponent=w,t.DropdownErrorStateMatcher=C,t.GridComponent=x,t.MyErrorStateMatcher=s,t.TextAreaComponent=d,t.TextAreaErrorStateMatcher=m,t.Text_Area_Component_CONTROL_VALUE_ACCESSOR=c,Object.defineProperty(t,"__esModule",{value:!0})});
//# sourceMappingURL=chi-app-lib.umd.min.js.map