@pepperi/lib
Version:
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 10.0.1.
2 lines • 7.39 kB
JavaScript
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/common"),require("@angular/material/core"),require("@angular/material/button"),require("@angular/material/form-field"),require("@angular/material/icon"),require("@pepperi/lib/icon")):"function"==typeof define&&define.amd?define("@pepperi/lib/textbox-icon",["exports","@angular/core","@angular/common","@angular/material/core","@angular/material/button","@angular/material/form-field","@angular/material/icon","@pepperi/lib/icon"],t):t(((e=e||self).pepperi=e.pepperi||{},e.pepperi.lib=e.pepperi.lib||{},e.pepperi.lib["textbox-icon"]={}),e.ng.core,e.ng.common,e.ng.material.core,e.ng.material.button,e.ng.material.formField,e.ng.material.icon,e.pepperi.lib.icon)}(this,(function(e,t,n,i,o,r,a,l){"use strict";function p(e,n){1&e&&(t.ɵɵelementStart(0,"mat-icon",3),t.ɵɵelement(1,"pep-icon",4),t.ɵɵelementEnd())}function c(e,n){1&e&&(t.ɵɵelementStart(0,"mat-icon",3),t.ɵɵelement(1,"pep-icon",5),t.ɵɵelementEnd())}function m(e,n){1&e&&(t.ɵɵelementStart(0,"mat-icon",3),t.ɵɵelement(1,"pep-icon",6),t.ɵɵelementEnd())}function u(e,n){1&e&&(t.ɵɵelementStart(0,"mat-icon",3),t.ɵɵelement(1,"pep-icon",7),t.ɵɵelementEnd())}var d=function(e){return{disabled:e}};function s(e,n){if(1&e){var i=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"button",8),t.ɵɵlistener("click",(function(){return t.ɵɵrestoreView(i),t.ɵɵnextContext().iconButtonClicked()})),t.ɵɵelementStart(1,"mat-icon"),t.ɵɵelement(2,"pep-icon",9),t.ɵɵelementEnd(),t.ɵɵelementEnd()}if(2&e){var o=t.ɵɵnextContext();t.ɵɵproperty("disabled",0===o.value.length)("ngClass",t.ɵɵpureFunction1(2,d,0===o.value.length))}}function f(e,n){if(1&e){var i=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"button",8),t.ɵɵlistener("click",(function(){return t.ɵɵrestoreView(i),t.ɵɵnextContext().iconButtonClicked()})),t.ɵɵelementStart(1,"mat-icon"),t.ɵɵelement(2,"pep-icon",10),t.ɵɵelementEnd(),t.ɵɵelementEnd()}if(2&e){var o=t.ɵɵnextContext();t.ɵɵproperty("disabled",0===o.value.length)("ngClass",t.ɵɵpureFunction1(2,d,0===o.value.length))}}function b(e,n){if(1&e){var i=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"button",8),t.ɵɵlistener("click",(function(){return t.ɵɵrestoreView(i),t.ɵɵnextContext().iconButtonClicked()})),t.ɵɵelementStart(1,"mat-icon"),t.ɵɵelement(2,"pep-icon",11),t.ɵɵelementEnd(),t.ɵɵelementEnd()}if(2&e){var o=t.ɵɵnextContext();t.ɵɵproperty("disabled",0===o.value.length)("ngClass",t.ɵɵpureFunction1(2,d,0===o.value.length))}}function g(e,n){if(1&e){var i=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"button",12),t.ɵɵlistener("click",(function(){return t.ɵɵrestoreView(i),t.ɵɵnextContext().iconButtonClicked()})),t.ɵɵelementStart(1,"mat-icon"),t.ɵɵelement(2,"pep-icon",13),t.ɵɵelementEnd(),t.ɵɵelementEnd()}}function y(e,n){if(1&e){var i=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"button",12),t.ɵɵlistener("click",(function(){return t.ɵɵrestoreView(i),t.ɵɵnextContext().iconButtonClicked()})),t.ɵɵelementStart(1,"mat-icon"),t.ɵɵelement(2,"pep-icon",14),t.ɵɵelementEnd(),t.ɵɵelementEnd()}if(2&e){var o=t.ɵɵnextContext();t.ɵɵadvance(2),t.ɵɵpropertyInterpolate("name",o.disabled?"system_full_screen":"system_edit")}}function C(e,n){if(1&e){var i=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"button",12),t.ɵɵlistener("click",(function(){return t.ɵɵrestoreView(i),t.ɵɵnextContext().iconButtonClicked()})),t.ɵɵelementStart(1,"mat-icon"),t.ɵɵelement(2,"pep-icon",15),t.ɵɵelementEnd(),t.ɵɵelementEnd()}}function x(e,n){if(1&e){var i=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"button",12),t.ɵɵlistener("click",(function(){return t.ɵɵrestoreView(i),t.ɵɵnextContext().iconButtonClicked()})),t.ɵɵelementStart(1,"mat-icon"),t.ɵɵelement(2,"pep-icon",16),t.ɵɵelementEnd(),t.ɵɵelementEnd()}}var I=function(){function e(){this.test=!0,this.iconClicked=new t.EventEmitter}return e.prototype.iconButtonClicked=function(){var e=this.value;if(e.toString().trim().length>0)switch(this.type){case"email":window.open("mailto:"+e,"email");break;case"phone":window.open("tel:"+e,"tel");break;case"link":window.open(e)}this.iconClicked.emit()},e}();I.ɵfac=function(e){return new(e||I)},I.ɵcmp=t.ɵɵdefineComponent({type:I,selectors:[["pep-textbox-icon"]],inputs:{value:"value",label:"label",type:"type",disabled:"disabled"},outputs:{iconClicked:"iconClicked"},decls:11,vars:11,consts:[["class","text-icon",4,"ngIf"],["class","pepperi-button md regular","mat-button","",3,"disabled","ngClass","click",4,"ngIf"],["class","pepperi-button md regular","mat-button","",3,"click",4,"ngIf"],[1,"text-icon"],["name","number_coins"],["name","number_percent"],["name","number_number"],["name","number_decimal"],["mat-button","",1,"pepperi-button","md","regular",3,"disabled","ngClass","click"],["name","system_phone"],["name","system_email"],["name","system_link"],["mat-button","",1,"pepperi-button","md","regular",3,"click"],["name","system_full_screen"],[3,"name"],["name","time_datetime"],["name","time_cal"]],template:function(e,n){1&e&&(t.ɵɵtemplate(0,p,2,0,"mat-icon",0),t.ɵɵtemplate(1,c,2,0,"mat-icon",0),t.ɵɵtemplate(2,m,2,0,"mat-icon",0),t.ɵɵtemplate(3,u,2,0,"mat-icon",0),t.ɵɵtemplate(4,s,3,4,"button",1),t.ɵɵtemplate(5,f,3,4,"button",1),t.ɵɵtemplate(6,b,3,4,"button",1),t.ɵɵtemplate(7,g,3,0,"button",2),t.ɵɵtemplate(8,y,3,1,"button",2),t.ɵɵtemplate(9,C,3,0,"button",2),t.ɵɵtemplate(10,x,3,0,"button",2)),2&e&&(t.ɵɵproperty("ngIf",!n.disabled&&"currency"===n.type),t.ɵɵadvance(1),t.ɵɵproperty("ngIf",!n.disabled&&"percentage"===n.type),t.ɵɵadvance(1),t.ɵɵproperty("ngIf",!n.disabled&&"int"===n.type),t.ɵɵadvance(1),t.ɵɵproperty("ngIf",!n.disabled&&"real"===n.type),t.ɵɵadvance(1),t.ɵɵproperty("ngIf","phone"===n.type),t.ɵɵadvance(1),t.ɵɵproperty("ngIf","email"===n.type),t.ɵɵadvance(1),t.ɵɵproperty("ngIf","link"===n.type),t.ɵɵadvance(1),t.ɵɵproperty("ngIf","textarea"===n.type),t.ɵɵadvance(1),t.ɵɵproperty("ngIf","richhtmltextarea"===n.type),t.ɵɵadvance(1),t.ɵɵproperty("ngIf",!n.disabled&&"datetime"===n.type),t.ɵɵadvance(1),t.ɵɵproperty("ngIf",!n.disabled&&"date"===n.type))},directives:[n.NgIf,a.MatIcon,l.PepperiIconComponent,o.MatButton,n.NgClass],styles:["[_nghost-%COMP%]{display:flex}"]});var v=function(e){this.pepperiIconRegistry=e,this.pepperiIconRegistry.registerIcons([l.pepperiIconNumberCoins,l.pepperiIconNumberPercent,l.pepperiIconNumberNumber,l.pepperiIconNumberDecimal,l.pepperiIconSystemPhone,l.pepperiIconSystemEmail,l.pepperiIconSystemLink,l.pepperiIconSystemFullScreen,l.pepperiIconSystemEdit,l.pepperiIconTimeDatetime,l.pepperiIconTimeCal])};v.ɵmod=t.ɵɵdefineNgModule({type:v}),v.ɵinj=t.ɵɵdefineInjector({factory:function(e){return new(e||v)(t.ɵɵinject(l.PepperiIconRegistry))},imports:[[n.CommonModule,i.MatCommonModule,o.MatButtonModule,r.MatFormFieldModule,a.MatIconModule,l.PepperiIconModule]]}),("undefined"==typeof ngJitMode||ngJitMode)&&t.ɵɵsetNgModuleScope(v,{declarations:[I],imports:[n.CommonModule,i.MatCommonModule,o.MatButtonModule,r.MatFormFieldModule,a.MatIconModule,l.PepperiIconModule],exports:[I]}),e.PepperiTextboxIconComponent=I,e.PepperiTextboxIconModule=v,Object.defineProperty(e,"__esModule",{value:!0})}));
//# sourceMappingURL=pepperi-lib-textbox-icon.umd.min.js.map