UNPKG

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 • 3.23 kB
import"./main-OCJB5534.js";import{Bi as ym,Di as wf,Dn as _y,Dr as lo,Dt as Qe,F as HY,Gn as dT,In as by,It as Sn,Lt as Sy,P as HT,Pi as xf,Pn as bm,Rn as co,T as Ee,_ as Cf,er as gT,in as Wa,k as G0,mn as YQ,pt as Nf,t as $Y,vr as jy,w as Eb,wr as lc}from"./chunk-CHqDEyfr.js";import"./chunk-CPClUPec.js";import{a as jt,i as Vt,o as z$1,r as Ue,s as zt,t as Bt}from"./chunk-CyaMV1f5.js";import{a as se,n as ae,r as gt,t as Qt}from"./chunk-CNSP-oVC.js";import{n as wt,r as yt}from"./chunk-CGgWGJ3E.js";import{t as Wt}from"./chunk-DvzfNneG.js";function L(i,w){if(i&1){let t=dT();Wa(0,`button`,7),Sy(`click`,function(){ym(t);return bm(gT().expandAll())}),Wa(1,`mat-icon`),HT(2,`keyboard_arrow_down`),wf()(),Wa(3,`button`,7),Sy(`click`,function(){ym(t);return bm(gT().collapseAll())}),Wa(4,`mat-icon`),HT(5,`keyboard_arrow_up`),wf()()}if(i&2){let t=gT();by(`matTooltip`,t.strings().page?.treeControls?.expandAll),Sn(3),by(`matTooltip`,t.strings().page?.treeControls?.collapseAll)}}function z(i,w){if(i&1&&_y(0,`p3xr-json-tree`,4),i&2){let t=gT();by(`data`,t.obj)(`label`,t.strings().label?.tree)(`expanded`,t.treeExpanded)}}function H(i,w){if(i&1&&(Wa(0,`div`),HT(1),wf()),i&2){let t=gT();Sn(),jy(t.strings().label?.jsonViewNotParsable)}}var rt=(()=>{class i{dialogRef;data;i18n;jsonTree;obj;isJson=!1;treeExpanded=!0;strings;constructor(t,n,e){this.dialogRef=t,this.data=n,this.i18n=e,this.strings=this.i18n.strings}ngOnInit(){try{this.obj=JSON.parse(this.data.value),this.isJson=!0}catch(t){this.obj=void 0,this.isJson=!1}}expandAll(){this.jsonTree?.treeControl.expandAll()}collapseAll(){this.jsonTree?.treeControl.collapseAll();let t=this.jsonTree?.treeControl.dataNodes?.[0];t&&this.jsonTree.treeControl.expand(t)}close(){this.dialogRef.close()}static ɵfac=function(n){return new(n||i)(Qe(z$1),Qe(Ue),Qe(YQ))};static ɵcmp=Ee({type:i,selectors:[[`p3xr-json-view-dialog`]],viewQuery:function(n,e){if(n&1&&lc(Wt,5),n&2){let m;Cf(m=xf())&&(e.jsonTree=m.first)}},decls:18,vars:4,consts:[[1,`p3xr-dialog-toolbar`,`p3xr-mat-layout-strong`],[`mat-dialog-title`,``,1,`p3xr-dialog-title`,`p3xr-dialog-title-with-icon`],[`mat-icon-button`,``,3,`click`],[1,`p3xr-dialog-content`,`p3xr-dialog-content-mono`,`p3xr-json-view-content`],[3,`data`,`label`,`expanded`],[1,`p3xr-dialog-actions`],[`mat-raised-button`,``,`type`,`button`,1,`btn-accent`,3,`click`],[`mat-icon-button`,``,3,`click`,`matTooltip`]],template:function(n,e){n&1&&(Wa(0,`mat-toolbar`,0)(1,`span`,1)(2,`mat-icon`),HT(3,`account_tree`),wf(),Wa(4,`span`),HT(5),wf()(),co(6,L,6,2),Wa(7,`button`,2),Sy(`click`,function(){return e.close()}),Wa(8,`mat-icon`),HT(9,`close`),wf()()(),Wa(10,`mat-dialog-content`,3),co(11,z,1,3,`p3xr-json-tree`,4)(12,H,2,1,`div`),wf(),Wa(13,`mat-dialog-actions`,5)(14,`button`,6),Sy(`click`,function(){return e.close()}),Wa(15,`mat-icon`),HT(16,`close`),wf(),HT(17),wf()()),n&2&&(Sn(5),jy(e.strings().intention?.jsonViewShow),Sn(),lo(e.isJson?6:-1),Sn(5),lo(e.isJson?11:12),Sn(6),Nf(` `,e.strings().intention?.close,` `))},dependencies:[Eb,zt,Bt,Vt,jt,$Y,HY,G0,yt,wt,ae,se,Qt,gt,Wt],styles:[`.p3xr-json-view-content[_ngcontent-%COMP%]{min-height:200px;max-height:70vh;overflow:auto}`],changeDetection:1})}return i})();export{rt as JsonViewDialogComponent};