p3x-redis-ui-material
Version:
💿 P3X Redis UI triple frontend — Angular + React/MUI + Vue/Vuetify with 54 languages, 7 themes, Socket.IO, desktop notifications, and full feature parity
1 lines • 2.98 kB
JavaScript
import {X as Xe,d1 as Ue,cV as z,K as op,L as uc,_ as _e,m as mb,aJ as jn,cj as He,bd as On,d3 as ot,be as tn,cW as zt,cX as jt,cY as Vt,cZ as Nt,bc as Ut,ba as qe,cp as q,d4 as xt,ck as Ve,cl as Be,e as aY,aK as iY,g as _A,y as yt,w as wt,d as ae,s as se,i as Qt,j as gt,x as YT,B as Ba,I as IS,v as vf,k as bv,cr as Lv,bj as Mx,n as no,aY as rS,c as In,R as Rv,cs as Fv,bk as Nx,r as ro,p as pv,z as fm,cu as AS,A as pm,J as JT,t as If}from'./chunk-BwlFOdbx.js';import {Q}from'./chunk-BnyV8OX_.js';import'./main-HNF44SV3.js';function rt(o,at){if(o&1&&(Ba(0,"mat-error"),IS(1),vf()),o&2){let a=JT();In(),If("",a.data.placeholder," is required");}}function lt(o,at){if(o&1&&(Ba(0,"span"),IS(1),vf()),o&2){let a=JT();In(),Rv(a.data.okButton);}}var Bt=(()=>{class o{data;dialogRef;breakpointObserver;cdr;value;isWide=true;constructor(a,l,t,m){this.data=a,this.dialogRef=l,this.breakpointObserver=t,this.cdr=m,this.value=a.initialValue||"",this.breakpointObserver.observe("(min-width: 600px)").subscribe(d=>{this.isWide=d.matches,this.cdr.markForCheck();});}onOk(){this.value?.trim()&&this.dialogRef.close(this.value);}onCancel(){this.dialogRef.close(void 0);}static \u0275fac=function(l){return new(l||o)(Xe(Ue),Xe(z),Xe(op),Xe(uc))};static \u0275cmp=_e({type:o,selectors:[["p3xr-prompt-dialog"]],decls:19,vars:9,consts:[["inputField","ngModel"],[1,"p3xr-dialog-toolbar","p3xr-mat-layout-strong"],["mat-dialog-title","",1,"p3xr-dialog-title"],["mat-icon-button","","type","button",3,"click"],[1,"p3xr-dialog-content"],[1,"full-width"],["matInput","","required","",3,"ngModelChange","keydown.enter","ngModel"],[1,"p3xr-dialog-actions"],[3,"cancel","label"],["mat-raised-button","","type","button",1,"btn-primary",3,"click","disabled","matTooltip","matTooltipDisabled"]],template:function(l,t){if(l&1){let m=YT();Ba(0,"mat-toolbar",1)(1,"span",2),IS(2),vf(),Ba(3,"button",3),bv("click",function(){return t.onCancel()}),Ba(4,"mat-icon"),IS(5,"close"),vf()()(),Ba(6,"mat-dialog-content",4)(7,"mat-form-field",5)(8,"mat-label"),IS(9),vf(),Ba(10,"input",6,0),Lv("ngModelChange",function(u){return fm(m),AS(t.value,u)||(t.value=u),pm(u)}),bv("keydown.enter",function(){return t.onOk()}),vf(),Mx(),no(12,rt,2,1,"mat-error"),vf()(),Ba(13,"mat-dialog-actions",7)(14,"p3xr-dialog-cancel",8),bv("cancel",function(){return t.onCancel()}),vf(),Ba(15,"button",9),bv("click",function(){return t.onOk()}),Ba(16,"mat-icon"),IS(17,"done"),vf(),no(18,lt,2,1,"span"),vf()();}if(l&2){let m=rS(11);In(2),Rv(t.data.title),In(7),Rv(t.data.placeholder),In(),Fv("ngModel",t.value),Nx(),In(2),ro(m.invalid&&m.touched?12:-1),In(2),pv("label",t.data.cancelButton),In(),pv("disabled",!t.value?.trim())("matTooltip",t.data.okButton)("matTooltipDisabled",t.isWide),In(3),ro(t.isWide?18:-1);}},dependencies:[mb,jn,He,On,ot,tn,zt,jt,Vt,Nt,Ut,qe,q,xt,Ve,Be,aY,iY,_A,yt,wt,ae,se,Qt,gt,Q],styles:[".full-width[_ngcontent-%COMP%]{width:100%;min-width:0}"],changeDetection:1})}return o})();export{Bt as PromptDialogComponent};