diff --git a/dist/5036.7005e959b2f3fa80.js b/dist/5036.7005e959b2f3fa80.js new file mode 100644 index 00000000..e789fe3d --- /dev/null +++ b/dist/5036.7005e959b2f3fa80.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdf_admin_interface=self.webpackChunkdf_admin_interface||[]).push([[5036],{75036:(Xt,z,c)=>{c.r(z),c.d(z,{DfDataExplorerComponent:()=>St});var f=c(18331),y=c(74312),B=c(83545),_=c(7263),u=c(69069),d=c(31147),T=c(89115),M=c(73907),v=c(54342),e=c(1843),P=c(85784),g=c(68660),h=c(98337),x=c(94093);function J(i,a){if(1&i&&(e.j41(0,"div",10),e.nrm(1,"mat-spinner",11),e.j41(2,"span"),e.EFF(3),e.k0s()()),2&i){const t=e.XpG().$implicit;e.R7$(3),e.JRh(t("dataExplorer.loading"))}}function H(i,a){if(1&i){const t=e.RV6();e.j41(0,"div",12)(1,"mat-icon",13),e.EFF(2,"error_outline"),e.k0s(),e.j41(3,"span"),e.EFF(4),e.nI1(5,"transloco"),e.k0s(),e.j41(6,"button",14),e.bIt("click",function(){e.eBV(t);const o=e.XpG(2);return e.Njj(o.retry.emit())}),e.EFF(7),e.k0s()()}if(2&i){const t=e.XpG().$implicit,n=e.XpG();e.R7$(4),e.JRh(e.bMT(5,2,n.error)),e.R7$(3),e.SpI(" ",t("dataExplorer.retry")," ")}}function Q(i,a){if(1&i&&(e.j41(0,"div",15)(1,"mat-icon"),e.EFF(2,"info_outline"),e.k0s(),e.j41(3,"span"),e.EFF(4),e.k0s(),e.j41(5,"small"),e.EFF(6),e.k0s()()),2&i){const t=e.XpG().$implicit;e.R7$(4),e.JRh(t("dataExplorer.noDatabases")),e.R7$(2),e.JRh(t("dataExplorer.noDatabasesHint"))}}function K(i,a){if(1&i){const t=e.RV6();e.j41(0,"div",16)(1,"mat-icon",17),e.EFF(2,"search"),e.k0s(),e.j41(3,"input",18),e.bIt("input",function(o){e.eBV(t);const r=e.XpG(2);return e.Njj(r.onSearch(o))}),e.k0s()()}if(2&i){const t=e.XpG().$implicit;e.R7$(3),e.Y8G("placeholder",t("dataExplorer.searchDatabases")),e.BMQ("aria-label",t("dataExplorer.searchDatabases"))}}function W(i,a){if(1&i){const t=e.RV6();e.j41(0,"a",22),e.bIt("click",function(){const r=e.eBV(t).$implicit,l=e.XpG(3);return e.Njj(l.databaseSelected.emit(r))})("keyup.enter",function(){const r=e.eBV(t).$implicit,l=e.XpG(3);return e.Njj(l.databaseSelected.emit(r))}),e.nrm(1,"fa-icon",23),e.j41(2,"div",24)(3,"span",25),e.EFF(4),e.k0s(),e.j41(5,"span",26),e.EFF(6),e.k0s()(),e.j41(7,"mat-icon",27),e.EFF(8,"chevron_right"),e.k0s()()}if(2&i){const t=a.$implicit,n=e.XpG(3);e.Y8G("matTooltip",n.tooltipFor(t)),e.R7$(1),e.Y8G("icon",n.faDatabase),e.R7$(3),e.JRh(t.name),e.R7$(2),e.JRh(t.typeLabel||t.type)}}function q(i,a){if(1&i&&(e.j41(0,"div",28),e.EFF(1),e.k0s()),2&i){const t=e.XpG(2).$implicit;e.R7$(1),e.SpI(" ",t("dataExplorer.noMatches")," ")}}function Z(i,a){if(1&i&&(e.j41(0,"mat-nav-list",19),e.DNE(1,W,9,4,"a",20),e.DNE(2,q,2,1,"div",21),e.k0s()),2&i){const t=e.XpG(2);e.R7$(1),e.Y8G("ngForOf",t.filtered)("ngForTrackBy",t.trackByDbName),e.R7$(1),e.Y8G("ngIf",0===t.filtered.length)}}function ee(i,a){if(1&i&&(e.j41(0,"div",1)(1,"div",2)(2,"mat-icon",3),e.EFF(3,"storage"),e.k0s(),e.j41(4,"span",4),e.EFF(5),e.k0s()(),e.DNE(6,J,4,1,"div",5),e.DNE(7,H,8,4,"div",6),e.DNE(8,Q,7,2,"div",7),e.DNE(9,K,4,2,"div",8),e.DNE(10,Z,3,3,"mat-nav-list",9),e.k0s()),2&i){const t=a.$implicit,n=e.XpG();e.R7$(5),e.JRh(t("dataExplorer.database")),e.R7$(1),e.Y8G("ngIf",n.loading),e.R7$(1),e.Y8G("ngIf",n.error&&!n.loading),e.R7$(1),e.Y8G("ngIf",!n.loading&&!n.error&&0===n.databases.length),e.R7$(1),e.Y8G("ngIf",!n.loading&&!n.error&&n.databases.length>n.searchThreshold),e.R7$(1),e.Y8G("ngIf",!n.loading&&!n.error&&n.databases.length>0)}}let te=(()=>{class i{constructor(){this.databases=[],this.loading=!1,this.error=null,this.databaseSelected=new e.bkB,this.retry=new e.bkB,this.faDatabase=x.hem,this.searchThreshold=8,this.query=""}get filtered(){const t=this.query.trim().toLowerCase();return t?this.databases.filter(n=>[n.name,n.label,n.typeLabel,n.type].some(o=>(o??"").toLowerCase().includes(t))):this.databases}onSearch(t){this.query=t.target.value}tooltipFor(t){return t.description?t.description:t.label&&t.label!==t.name?t.label:t.name}trackByDbName(t,n){return n.name}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=e.VBU({type:i,selectors:[["df-db-selector"]],inputs:{databases:"databases",loading:"loading",error:"error"},outputs:{databaseSelected:"databaseSelected",retry:"retry"},standalone:!0,features:[e.aNF],decls:1,vars:1,consts:[["class","db-selector",4,"transloco","translocoScope"],[1,"db-selector"],[1,"panel-header"],[1,"header-icon"],[1,"header-title"],["class","loading-state",4,"ngIf"],["class","error-state",4,"ngIf"],["class","empty-state",4,"ngIf"],["class","db-search",4,"ngIf"],["class","db-list",4,"ngIf"],[1,"loading-state"],["diameter","32"],[1,"error-state"],["color","warn"],["mat-stroked-button","","color","primary",3,"click"],[1,"empty-state"],[1,"db-search"],[1,"db-search-icon"],["type","search",3,"placeholder","input"],[1,"db-list"],["mat-list-item","","tabindex","0","matTooltipPosition","right","class","db-item",3,"matTooltip","click","keyup.enter",4,"ngFor","ngForOf","ngForTrackBy"],["class","no-matches",4,"ngIf"],["mat-list-item","","tabindex","0","matTooltipPosition","right",1,"db-item",3,"matTooltip","click","keyup.enter"],[1,"db-icon",3,"icon"],[1,"db-info"],[1,"db-name"],[1,"db-type"],[1,"chevron"],[1,"no-matches"]],template:function(n,o){1&n&&e.DNE(0,ee,11,6,"div",0),2&n&&e.Y8G("translocoScope","dataExplorer")},dependencies:[f.bT,f.pM,P.Fg,P._L,P.YE,_.m_,_.An,g.Hl,g.$z,u.D6,u.LG,h.uc,h.oV,d.Q8,d.bA,d.Kj,v.dX,v.aY],styles:[".db-selector[_ngcontent-%COMP%]{height:100%;display:flex;flex-direction:column}.panel-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;padding:0 16px;height:49px;box-sizing:border-box;border-bottom:1px solid var(--df-border);font-weight:600;font-size:1.4rem;letter-spacing:-.01em;color:var(--df-text)}.panel-header[_ngcontent-%COMP%] .header-icon[_ngcontent-%COMP%]{font-size:20px;width:20px;height:20px;color:var(--df-accent)}.loading-state[_ngcontent-%COMP%], .error-state[_ngcontent-%COMP%], .empty-state[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:12px;padding:32px 16px;text-align:center;color:var(--df-text-muted);font-size:1.3rem}.db-search[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;padding:8px 16px;border-bottom:1px solid var(--df-border)}.db-search[_ngcontent-%COMP%] .db-search-icon[_ngcontent-%COMP%]{font-size:18px;width:18px;height:18px;color:var(--df-text-muted)}.db-search[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{flex:1;min-width:0;border:0;background:transparent;color:var(--df-text);font:inherit;font-size:1.3rem;outline:none}.db-search[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::placeholder{color:var(--df-text-muted)}.db-list[_ngcontent-%COMP%]{flex:1;overflow-y:auto;padding-top:4px}.no-matches[_ngcontent-%COMP%]{padding:24px 16px;text-align:center;color:var(--df-text-muted);font-size:1.3rem}.db-item[_ngcontent-%COMP%]{height:56px!important;padding:0 16px!important;cursor:pointer}.db-item[_ngcontent-%COMP%] .mdc-list-item__primary-text{display:flex!important;align-items:center;gap:12px;width:100%}.db-item[_ngcontent-%COMP%] .db-icon[_ngcontent-%COMP%]{color:var(--df-accent);font-size:16px;flex-shrink:0;pointer-events:none}.db-item[_ngcontent-%COMP%] .db-info[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;min-width:0;pointer-events:none}.db-item[_ngcontent-%COMP%] .db-info[_ngcontent-%COMP%] .db-name[_ngcontent-%COMP%]{font-size:1.4rem;font-weight:500;color:var(--df-text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.db-item[_ngcontent-%COMP%] .db-info[_ngcontent-%COMP%] .db-type[_ngcontent-%COMP%]{font-size:11px;color:var(--df-text-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.db-item[_ngcontent-%COMP%] .chevron[_ngcontent-%COMP%]{color:var(--df-text-faint);flex-shrink:0;pointer-events:none}.db-item[_ngcontent-%COMP%]:hover{background:var(--df-hover)}"]})}}return i})();var C=c(78227),w=c(54688),$=c(453);function ne(i,a){if(1&i){const t=e.RV6();e.j41(0,"div",12)(1,"mat-form-field",13)(2,"mat-icon",14),e.EFF(3,"search"),e.k0s(),e.j41(4,"input",15),e.bIt("ngModelChange",function(o){e.eBV(t);const r=e.XpG(2);return e.Njj(r.searchQuery=o)})("ngModelChange",function(){e.eBV(t);const o=e.XpG(2);return e.Njj(o.filterTables())}),e.k0s()()()}if(2&i){const t=e.XpG().$implicit,n=e.XpG();e.R7$(4),e.Y8G("placeholder",t("dataExplorer.searchTables"))("ngModel",n.searchQuery)}}function ie(i,a){if(1&i&&(e.j41(0,"div",16)(1,"span",17),e.EFF(2),e.k0s(),e.j41(3,"span",18),e.EFF(4),e.k0s()()),2&i){const t=e.XpG().$implicit,n=e.XpG();e.R7$(2),e.JRh(t("dataExplorer.tables")),e.R7$(2),e.JRh(n.filteredTables.length)}}function oe(i,a){if(1&i&&(e.j41(0,"div",19),e.nrm(1,"mat-spinner",20),e.j41(2,"span"),e.EFF(3),e.k0s()()),2&i){const t=e.XpG().$implicit;e.R7$(3),e.JRh(t("dataExplorer.loadingSchema"))}}function ae(i,a){if(1&i){const t=e.RV6();e.j41(0,"div",21)(1,"mat-icon",22),e.EFF(2,"error_outline"),e.k0s(),e.j41(3,"span"),e.EFF(4),e.nI1(5,"transloco"),e.k0s(),e.j41(6,"button",23),e.bIt("click",function(){e.eBV(t);const o=e.XpG(2);return e.Njj(o.retry.emit())}),e.EFF(7),e.k0s()()}if(2&i){const t=e.XpG().$implicit,n=e.XpG();e.R7$(4),e.JRh(e.bMT(5,2,n.error)),e.R7$(3),e.SpI(" ",t("dataExplorer.retry")," ")}}function re(i,a){if(1&i&&(e.j41(0,"div",24)(1,"mat-icon"),e.EFF(2,"info_outline"),e.k0s(),e.j41(3,"span"),e.EFF(4),e.k0s(),e.j41(5,"small"),e.EFF(6),e.k0s()()),2&i){const t=e.XpG().$implicit;e.R7$(4),e.JRh(t("dataExplorer.noTables")),e.R7$(2),e.JRh(t("dataExplorer.noTablesHint"))}}function le(i,a){if(1&i){const t=e.RV6();e.j41(0,"a",27),e.bIt("click",function(){const r=e.eBV(t).$implicit,l=e.XpG(3);return e.Njj(l.tableSelected.emit(r))}),e.nrm(1,"fa-icon",28),e.j41(2,"span",29),e.EFF(3),e.k0s()()}if(2&i){const t=a.$implicit,n=e.XpG(3);e.AVh("selected",(null==n.selectedTable?null:n.selectedTable.name)===t.name),e.R7$(1),e.Y8G("icon",n.faTable),e.R7$(2),e.JRh(t.name)}}function ce(i,a){if(1&i&&(e.j41(0,"mat-nav-list",25),e.DNE(1,le,4,4,"a",26),e.k0s()),2&i){const t=e.XpG(2);e.R7$(1),e.Y8G("ngForOf",t.filteredTables)("ngForTrackBy",t.trackByTableName)}}function se(i,a){if(1&i){const t=e.RV6();e.j41(0,"div",1)(1,"div",2)(2,"button",3),e.bIt("click",function(){e.eBV(t);const o=e.XpG();return e.Njj(o.backClicked.emit())}),e.j41(3,"mat-icon"),e.EFF(4,"arrow_back"),e.k0s()(),e.nrm(5,"fa-icon",4),e.j41(6,"span",5),e.EFF(7),e.k0s()(),e.DNE(8,ne,5,2,"div",6),e.DNE(9,ie,5,2,"div",7),e.DNE(10,oe,4,1,"div",8),e.DNE(11,ae,8,4,"div",9),e.DNE(12,re,7,2,"div",10),e.DNE(13,ce,2,2,"mat-nav-list",11),e.k0s()}if(2&i){const t=e.XpG();e.R7$(5),e.Y8G("icon",t.faDatabase),e.R7$(1),e.Y8G("matTooltip",t.serviceLabel),e.R7$(1),e.JRh(t.serviceLabel),e.R7$(1),e.Y8G("ngIf",!t.loading&&!t.error&&t.tables.length>0),e.R7$(1),e.Y8G("ngIf",!t.loading&&!t.error&&t.tables.length>0),e.R7$(1),e.Y8G("ngIf",t.loading),e.R7$(1),e.Y8G("ngIf",t.error&&!t.loading),e.R7$(1),e.Y8G("ngIf",!t.loading&&!t.error&&0===t.tables.length),e.R7$(1),e.Y8G("ngIf",!t.loading&&!t.error&&t.filteredTables.length>0)}}let de=(()=>{class i{constructor(){this.serviceName="",this.serviceLabel="",this.tables=[],this.loading=!1,this.error=null,this.selectedTable=null,this.tableSelected=new e.bkB,this.backClicked=new e.bkB,this.retry=new e.bkB,this.faTable=x.w97,this.faDatabase=x.hem,this.searchQuery="",this.filteredTables=[]}ngOnChanges(t){t.tables&&this.filterTables()}trackByTableName(t,n){return n.name}filterTables(){if(this.searchQuery){const t=this.searchQuery.toLowerCase();this.filteredTables=this.tables.filter(n=>n.name.toLowerCase().includes(t))}else this.filteredTables=this.tables}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=e.VBU({type:i,selectors:[["df-schema-tree"]],inputs:{serviceName:"serviceName",serviceLabel:"serviceLabel",tables:"tables",loading:"loading",error:"error",selectedTable:"selectedTable"},outputs:{tableSelected:"tableSelected",backClicked:"backClicked",retry:"retry"},standalone:!0,features:[e.OA$,e.aNF],decls:1,vars:1,consts:[["class","schema-tree",4,"transloco","translocoScope"],[1,"schema-tree"],[1,"panel-header"],["mat-icon-button","",1,"back-btn",3,"click"],[1,"header-icon",3,"icon"],[1,"header-title",3,"matTooltip"],["class","search-box",4,"ngIf"],["class","tables-header",4,"ngIf"],["class","loading-state",4,"ngIf"],["class","error-state",4,"ngIf"],["class","empty-state",4,"ngIf"],["class","table-list",4,"ngIf"],[1,"search-box"],["appearance","outline",1,"search-field"],["matPrefix",""],["matInput","",3,"placeholder","ngModel","ngModelChange"],[1,"tables-header"],[1,"tables-label"],[1,"tables-count"],[1,"loading-state"],["diameter","32"],[1,"error-state"],["color","warn"],["mat-stroked-button","","color","primary",3,"click"],[1,"empty-state"],[1,"table-list"],["mat-list-item","","class","table-item",3,"selected","click",4,"ngFor","ngForOf","ngForTrackBy"],["mat-list-item","",1,"table-item",3,"click"],[1,"table-icon",3,"icon"],[1,"table-name"]],template:function(n,o){1&n&&e.DNE(0,se,14,9,"div",0),2&n&&e.Y8G("translocoScope","dataExplorer")},dependencies:[f.bT,f.pM,C.YN,C.me,C.BC,C.vS,P.Fg,P._L,P.YE,_.m_,_.An,g.Hl,g.$z,g.iY,u.D6,u.LG,w.RG,w.rl,w.JW,$.fS,$.fg,h.uc,h.oV,d.Q8,d.bA,d.Kj,v.dX,v.aY],styles:[".schema-tree[_ngcontent-%COMP%]{height:100%;display:flex;flex-direction:column}.panel-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;padding:0 12px 0 8px;height:49px;box-sizing:border-box;border-bottom:1px solid var(--df-border);font-weight:600;font-size:1.4rem;letter-spacing:-.01em;color:var(--df-text)}.panel-header[_ngcontent-%COMP%] .back-btn[_ngcontent-%COMP%]{flex-shrink:0;width:36px;height:36px;display:flex;align-items:center;justify-content:center}.panel-header[_ngcontent-%COMP%] .back-btn[_ngcontent-%COMP%] .mat-mdc-button-touch-target{width:36px;height:36px}.panel-header[_ngcontent-%COMP%] .back-btn[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:20px;width:20px;height:20px}.panel-header[_ngcontent-%COMP%] .header-icon[_ngcontent-%COMP%]{color:var(--df-accent);font-size:16px;flex-shrink:0}.panel-header[_ngcontent-%COMP%] .header-title[_ngcontent-%COMP%]{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1;min-width:0}.search-box[_ngcontent-%COMP%]{padding:12px 12px 0}.search-box[_ngcontent-%COMP%] .search-field[_ngcontent-%COMP%]{width:100%}.search-box[_ngcontent-%COMP%] .search-field[_ngcontent-%COMP%] .mat-mdc-form-field-infix{min-height:44px;padding:8px 0!important;display:flex;align-items:center}.search-box[_ngcontent-%COMP%] .search-field[_ngcontent-%COMP%] .mat-mdc-text-field-wrapper{padding:0 12px}.search-box[_ngcontent-%COMP%] .search-field[_ngcontent-%COMP%] .mat-mdc-form-field-icon-prefix{padding:0 8px 0 0;display:flex;align-items:center}.search-box[_ngcontent-%COMP%] .search-field[_ngcontent-%COMP%] input.mat-mdc-input-element{font-size:14px;line-height:1.4;height:auto}.search-box[_ngcontent-%COMP%] .search-field[_ngcontent-%COMP%] .mat-mdc-form-field-subscript-wrapper{display:none}.tables-header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:8px 16px 4px;font-size:11px;text-transform:uppercase;letter-spacing:.06em;color:var(--df-text-muted);font-weight:600}.tables-header[_ngcontent-%COMP%] .tables-count[_ngcontent-%COMP%]{background:var(--df-surface-2);border:1px solid var(--df-border-2);border-radius:10px;padding:1px 8px;font-size:11px;font-weight:500;color:var(--df-text-muted)}.loading-state[_ngcontent-%COMP%], .error-state[_ngcontent-%COMP%], .empty-state[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:12px;padding:32px 16px;text-align:center;color:var(--df-text-muted);font-size:1.3rem}.table-list[_ngcontent-%COMP%]{flex:1;overflow-y:auto;padding-top:0}.table-item[_ngcontent-%COMP%]{height:40px!important;padding:0 16px!important;font-size:1.3rem;cursor:pointer}.table-item[_ngcontent-%COMP%] .mdc-list-item__primary-text{display:flex!important;align-items:center;width:100%}.table-item[_ngcontent-%COMP%] .table-icon[_ngcontent-%COMP%]{color:var(--df-accent);font-size:13px;margin-right:10px;flex-shrink:0;pointer-events:none}.table-item[_ngcontent-%COMP%] .table-name[_ngcontent-%COMP%]{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;pointer-events:none}.table-item[_ngcontent-%COMP%]:hover{background:var(--df-hover)}.table-item.selected[_ngcontent-%COMP%]{background:var(--df-accent-soft);font-weight:500}"]})}}return i})();var m=c(58497),V=c(1929),G=c(82180),b=c(33329),E=c(42250),j=c(83607),Y=c(8275);let pe=0;const fe=(0,E.Ob)(class{}),L="mat-badge-content";let _e=(()=>{class i extends fe{get color(){return this._color}set color(t){this._setColor(t),this._color=t}get overlap(){return this._overlap}set overlap(t){this._overlap=(0,Y.he)(t)}get content(){return this._content}set content(t){this._updateRenderedContent(t)}get description(){return this._description}set description(t){this._updateDescription(t)}get hidden(){return this._hidden}set hidden(t){this._hidden=(0,Y.he)(t)}constructor(t,n,o,r,l){super(),this._ngZone=t,this._elementRef=n,this._ariaDescriber=o,this._renderer=r,this._animationMode=l,this._color="primary",this._overlap=!0,this.position="above after",this.size="medium",this._id=pe++,this._isInitialized=!1,this._interactivityChecker=(0,e.WQX)(j.Z7),this._document=(0,e.WQX)(f.qQ)}isAbove(){return-1===this.position.indexOf("below")}isAfter(){return-1===this.position.indexOf("before")}getBadgeElement(){return this._badgeElement}ngOnInit(){this._clearExistingBadges(),this.content&&!this._badgeElement&&(this._badgeElement=this._createBadgeElement(),this._updateRenderedContent(this.content)),this._isInitialized=!0}ngOnDestroy(){this._renderer.destroyNode&&(this._renderer.destroyNode(this._badgeElement),this._inlineBadgeDescription?.remove()),this._ariaDescriber.removeDescription(this._elementRef.nativeElement,this.description)}_isHostInteractive(){return this._interactivityChecker.isFocusable(this._elementRef.nativeElement,{ignoreVisibility:!0})}_createBadgeElement(){const t=this._renderer.createElement("span"),n="mat-badge-active";return t.setAttribute("id",`mat-badge-content-${this._id}`),t.setAttribute("aria-hidden","true"),t.classList.add(L),"NoopAnimations"===this._animationMode&&t.classList.add("_mat-animation-noopable"),this._elementRef.nativeElement.appendChild(t),"function"==typeof requestAnimationFrame&&"NoopAnimations"!==this._animationMode?this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>{t.classList.add(n)})}):t.classList.add(n),t}_updateRenderedContent(t){const n=`${t??""}`.trim();this._isInitialized&&n&&!this._badgeElement&&(this._badgeElement=this._createBadgeElement()),this._badgeElement&&(this._badgeElement.textContent=n),this._content=n}_updateDescription(t){this._ariaDescriber.removeDescription(this._elementRef.nativeElement,this.description),(!t||this._isHostInteractive())&&this._removeInlineDescription(),this._description=t,this._isHostInteractive()?this._ariaDescriber.describe(this._elementRef.nativeElement,t):this._updateInlineDescription()}_updateInlineDescription(){this._inlineBadgeDescription||(this._inlineBadgeDescription=this._document.createElement("span"),this._inlineBadgeDescription.classList.add("cdk-visually-hidden")),this._inlineBadgeDescription.textContent=this.description,this._badgeElement?.appendChild(this._inlineBadgeDescription)}_removeInlineDescription(){this._inlineBadgeDescription?.remove(),this._inlineBadgeDescription=void 0}_setColor(t){const n=this._elementRef.nativeElement.classList;n.remove(`mat-badge-${this._color}`),t&&n.add(`mat-badge-${t}`)}_clearExistingBadges(){const t=this._elementRef.nativeElement.querySelectorAll(`:scope > .${L}`);for(const n of Array.from(t))n!==this._badgeElement&&n.remove()}static{this.\u0275fac=function(n){return new(n||i)(e.rXU(e.SKi),e.rXU(e.aKT),e.rXU(j.vr),e.rXU(e.sFG),e.rXU(e.bc$,8))}}static{this.\u0275dir=e.FsC({type:i,selectors:[["","matBadge",""]],hostAttrs:[1,"mat-badge"],hostVars:20,hostBindings:function(n,o){2&n&&e.AVh("mat-badge-overlap",o.overlap)("mat-badge-above",o.isAbove())("mat-badge-below",!o.isAbove())("mat-badge-before",!o.isAfter())("mat-badge-after",o.isAfter())("mat-badge-small","small"===o.size)("mat-badge-medium","medium"===o.size)("mat-badge-large","large"===o.size)("mat-badge-hidden",o.hidden||!o.content)("mat-badge-disabled",o.disabled)},inputs:{disabled:["matBadgeDisabled","disabled"],color:["matBadgeColor","color"],overlap:["matBadgeOverlap","overlap"],position:["matBadgePosition","position"],content:["matBadge","content"],description:["matBadgeDescription","description"],size:["matBadgeSize","size"],hidden:["matBadgeHidden","hidden"]},features:[e.Vt3]})}}return i})(),ge=(()=>{class i{static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275mod=e.$C({type:i})}static{this.\u0275inj=e.G2t({imports:[j.Pd,E.yE,E.yE]})}}return i})();var I=c(87621),A=c(29167),me=c(91900),he=c(45318),R=c(56579),ue=c(62572),be=c(86606),ve=c(23135),S=c(12324),xe=c(57588),D=c(68686),k=c(48444);const Ce=["Database","Big Data"];let N=(()=>{class i{constructor(){this.http=(0,e.WQX)(ue.Qq)}getDatabaseServices(){const t=Ce.map(n=>this.http.get(`${D.C}/system/service_type`,{params:{fields:"name,label",group:n},headers:{"show-loading":"","Cache-Control":"no-cache, private"},context:(0,k.PH)()}));return(0,be.p)(t).pipe((0,S.T)(n=>n.flatMap(o=>o.resource||[])),(0,xe.n)(n=>{if(0===n.length)return new ve.c(l=>{l.next([]),l.complete()});const o=new Map(n.map(l=>[l.name,l.label])),r=`(type in ("${n.map(l=>l.name).join('","')}"))`;return this.http.get(`${D.C}/system/service`,{params:{filter:r,fields:"id,name,label,description,type,is_active",sort:"name"},headers:{"show-loading":"","Cache-Control":"no-cache, private"},context:(0,k.PH)()}).pipe((0,S.T)(l=>(l.resource||[]).filter(s=>!1!==s.isActive).map(s=>({...s,typeLabel:o.get(s.type)}))))}))}getSchema(t){return this.http.get(`${D.C}/${t}/_schema`,{headers:{"show-loading":""},context:(0,k.PH)()}).pipe((0,S.T)(n=>(n.resource||[]).sort((o,r)=>o.name.localeCompare(r.name))))}getTableSchema(t,n){return this.http.get(`${D.C}/${t}/_schema/${n}`,{params:{refresh:"true"},headers:{"show-loading":""},context:(0,k.PH)()})}getTableData(t,n,o=50,r=0,l,s){const p={limit:o.toString(),offset:r.toString(),include_count:"true"};return l&&(p.order=l),s&&(p.filter=s),this.http.get(`${D.C}/${t}/_table/${n}`,{params:p,headers:{"show-loading":""},context:(0,k.PH)()})}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275prov=e.jDH({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();function Oe(i,a){1&i&&(e.j41(0,"div",8),e.nrm(1,"mat-spinner",9),e.k0s())}function Me(i,a){if(1&i&&(e.j41(0,"div",10)(1,"mat-icon",11),e.EFF(2,"error_outline"),e.k0s(),e.j41(3,"span"),e.EFF(4),e.nI1(5,"transloco"),e.k0s()()),2&i){const t=e.XpG(2);e.R7$(4),e.JRh(e.bMT(5,1,t.error))}}function Pe(i,a){1&i&&(e.j41(0,"mat-chip",28),e.EFF(1,"PK"),e.k0s())}function De(i,a){if(1&i&&(e.j41(0,"mat-chip",29),e.EFF(1,"FK"),e.k0s()),2&i){const t=e.XpG().$implicit;e.Y8G("matTooltip",t.refTable+"."+t.refField)}}function ke(i,a){1&i&&(e.j41(0,"mat-chip",30),e.EFF(1,"UQ"),e.k0s())}function Fe(i,a){1&i&&(e.j41(0,"span",31),e.EFF(1,"NOT NULL"),e.k0s())}function ye(i,a){1&i&&(e.j41(0,"span",32),e.EFF(1,"AUTO"),e.k0s())}function Te(i,a){if(1&i){const t=e.RV6();e.j41(0,"div",33)(1,"mat-icon",34),e.EFF(2,"subdirectory_arrow_right"),e.k0s(),e.j41(3,"a",35),e.bIt("click",function(){e.eBV(t);const o=e.XpG().$implicit,r=e.XpG(3);return e.Njj(r.navigateToTable.emit(o.refTable))}),e.EFF(4),e.k0s()()}if(2&i){const t=e.XpG().$implicit;e.R7$(4),e.Lme(" ",t.refTable,".",t.refField," ")}}function we(i,a){if(1&i&&(e.j41(0,"div",17)(1,"div",18)(2,"span"),e.EFF(3),e.k0s(),e.j41(4,"mat-chip-set",19),e.DNE(5,Pe,2,0,"mat-chip",20),e.DNE(6,De,2,1,"mat-chip",21),e.DNE(7,ke,2,0,"mat-chip",22),e.k0s()(),e.j41(8,"div",23),e.EFF(9),e.k0s(),e.j41(10,"div",24),e.DNE(11,Fe,2,0,"span",25),e.DNE(12,ye,2,0,"span",26),e.k0s(),e.DNE(13,Te,5,2,"div",27),e.k0s()),2&i){const t=a.$implicit;e.R7$(3),e.JRh(t.name),e.R7$(2),e.Y8G("ngIf",t.isPrimaryKey),e.R7$(1),e.Y8G("ngIf",t.isForeignKey),e.R7$(1),e.Y8G("ngIf",t.isUnique&&!t.isPrimaryKey),e.R7$(2),e.JRh(t.dbType),e.R7$(2),e.Y8G("ngIf",!t.allowNull),e.R7$(1),e.Y8G("ngIf",t.autoIncrement),e.R7$(1),e.Y8G("ngIf",t.isForeignKey&&t.refTable)}}function Ge(i,a){if(1&i){const t=e.RV6();e.j41(0,"div",38)(1,"mat-icon",39),e.EFF(2),e.k0s(),e.j41(3,"div",40)(4,"span",41),e.EFF(5),e.k0s(),e.j41(6,"a",35),e.bIt("click",function(){const r=e.eBV(t).$implicit,l=e.XpG(4);return e.Njj(l.navigateToTable.emit(r.refTable))}),e.EFF(7),e.k0s(),e.j41(8,"span",42),e.EFF(9),e.k0s()()()}if(2&i){const t=a.$implicit;e.R7$(2),e.JRh("belongs_to"===t.type?"arrow_back":"arrow_forward"),e.R7$(3),e.JRh(t.type),e.R7$(2),e.JRh(t.refTable),e.R7$(2),e.Lme("",t.field," \u2192 ",t.refField,"")}}function Re(i,a){if(1&i&&(e.j41(0,"div")(1,"div",13),e.EFF(2),e.k0s(),e.j41(3,"div",36),e.DNE(4,Ge,10,5,"div",37),e.k0s()()),2&i){const t=e.XpG(2).$implicit,n=e.XpG();e.R7$(2),e.Lme(" ",t("dataExplorer.relationships")," (",n.schema.related.length,") "),e.R7$(2),e.Y8G("ngForOf",n.schema.related)("ngForTrackBy",n.trackByRelName)}}function $e(i,a){if(1&i&&(e.j41(0,"div",12)(1,"div",13),e.EFF(2),e.k0s(),e.j41(3,"div",14),e.DNE(4,we,14,8,"div",15),e.k0s(),e.DNE(5,Re,5,4,"div",16),e.k0s()),2&i){const t=e.XpG().$implicit,n=e.XpG();e.R7$(2),e.Lme(" ",t("dataExplorer.columns")," (",n.schema.field.length,") "),e.R7$(2),e.Y8G("ngForOf",n.schema.field)("ngForTrackBy",n.trackByFieldName),e.R7$(1),e.Y8G("ngIf",n.schema.related&&n.schema.related.length>0)}}function Ee(i,a){if(1&i){const t=e.RV6();e.j41(0,"div",1)(1,"div",2)(2,"span",3),e.EFF(3),e.k0s(),e.j41(4,"button",4),e.bIt("click",function(){e.eBV(t);const o=e.XpG();return e.Njj(o.closeClicked.emit())}),e.j41(5,"mat-icon"),e.EFF(6,"close"),e.k0s()()(),e.DNE(7,Oe,2,0,"div",5),e.DNE(8,Me,6,3,"div",6),e.DNE(9,$e,6,5,"div",7),e.k0s()}if(2&i){const t=a.$implicit,n=e.XpG();e.R7$(3),e.JRh(t("dataExplorer.schemaInfo")),e.R7$(4),e.Y8G("ngIf",n.loading),e.R7$(1),e.Y8G("ngIf",n.error&&!n.loading),e.R7$(1),e.Y8G("ngIf",n.schema&&!n.loading&&!n.error)}}let U=(()=>{class i{constructor(t){this.dataExplorerService=t,this.serviceName="",this.tableName="",this.closeClicked=new e.bkB,this.navigateToTable=new e.bkB,this.schema=null,this.loading=!1,this.error=null,this.cache=new Map,this.destroy$=new T.B}ngOnChanges(t){(t.tableName||t.serviceName)&&this.loadSchema()}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}trackByFieldName(t,n){return n.name}trackByRelName(t,n){return n.name}loadSchema(){if(!this.serviceName||!this.tableName)return;const t=`${this.serviceName}:${this.tableName}`;this.cache.has(t)?this.schema=this.cache.get(t):(this.loading=!0,this.error=null,this.dataExplorerService.getTableSchema(this.serviceName,this.tableName).pipe((0,M.Q)(this.destroy$)).subscribe({next:n=>{this.schema=n,this.cache.set(t,n),this.loading=!1},error:n=>{this.error=(0,R.cQ)(n).message,this.loading=!1}}))}getSchema(){return this.schema}getCachedSchema(t,n){return this.cache.get(`${t}:${n}`)||null}static{this.\u0275fac=function(n){return new(n||i)(e.rXU(N))}}static{this.\u0275cmp=e.VBU({type:i,selectors:[["df-schema-info"]],inputs:{serviceName:"serviceName",tableName:"tableName"},outputs:{closeClicked:"closeClicked",navigateToTable:"navigateToTable"},standalone:!0,features:[e.OA$,e.aNF],decls:1,vars:1,consts:[["class","schema-info-panel",4,"transloco","translocoScope"],[1,"schema-info-panel"],[1,"schema-header"],[1,"schema-title"],["mat-icon-button","",1,"close-btn",3,"click"],["class","schema-loading",4,"ngIf"],["class","schema-error",4,"ngIf"],["class","schema-body",4,"ngIf"],[1,"schema-loading"],["diameter","24"],[1,"schema-error"],["color","warn"],[1,"schema-body"],[1,"section-header"],[1,"field-list"],["class","field-row",4,"ngFor","ngForOf","ngForTrackBy"],[4,"ngIf"],[1,"field-row"],[1,"field-name"],[1,"field-badges"],["class","badge-pk","disabled","",4,"ngIf"],["class","badge-fk","disabled","",3,"matTooltip",4,"ngIf"],["class","badge-uq","disabled","",4,"ngIf"],[1,"field-type"],[1,"field-meta"],["class","not-null",4,"ngIf"],["class","auto-inc",4,"ngIf"],["class","field-ref",4,"ngIf"],["disabled","",1,"badge-pk"],["disabled","",1,"badge-fk",3,"matTooltip"],["disabled","",1,"badge-uq"],[1,"not-null"],[1,"auto-inc"],[1,"field-ref"],[1,"ref-icon"],[1,"ref-link",3,"click"],[1,"rel-list"],["class","rel-row",4,"ngFor","ngForOf","ngForTrackBy"],[1,"rel-row"],[1,"rel-icon"],[1,"rel-info"],[1,"rel-type"],[1,"rel-field"]],template:function(n,o){1&n&&e.DNE(0,Ee,10,4,"div",0),2&n&&e.Y8G("translocoScope","dataExplorer")},dependencies:[f.bT,f.pM,_.m_,_.An,g.Hl,g.iY,b.YN,b.Jl,b.Jo,u.D6,u.LG,h.uc,h.oV,d.Q8,d.bA,d.Kj],styles:[".schema-info-panel[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%;border-left:1px solid var(--df-border);background:var(--df-bg);width:320px;overflow:hidden}.schema-header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:8px 12px;border-bottom:1px solid var(--df-border);background:var(--df-surface-2)}.schema-header[_ngcontent-%COMP%] .schema-title[_ngcontent-%COMP%]{font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:var(--df-text-muted)}.schema-header[_ngcontent-%COMP%] .close-btn[_ngcontent-%COMP%]{width:28px;height:28px;line-height:28px}.schema-loading[_ngcontent-%COMP%]{display:flex;justify-content:center;padding:24px}.schema-error[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;padding:12px;font-size:1.3rem;color:var(--df-danger)}.schema-body[_ngcontent-%COMP%]{flex:1;overflow-y:auto;padding:0}.section-header[_ngcontent-%COMP%]{font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:var(--df-text-muted);padding:12px 12px 6px;border-bottom:1px solid var(--df-border-2)}.field-list[_ngcontent-%COMP%] .field-row[_ngcontent-%COMP%]{padding:6px 12px;border-bottom:1px solid var(--df-border-2);font-size:12px}.field-list[_ngcontent-%COMP%] .field-row[_ngcontent-%COMP%] .field-name[_ngcontent-%COMP%]{display:flex;align-items:center;gap:6px;font-weight:500;color:var(--df-text);font-family:SFMono-Regular,Menlo,Consolas,monospace}.field-list[_ngcontent-%COMP%] .field-row[_ngcontent-%COMP%] .field-badges[_ngcontent-%COMP%]{display:inline-flex;gap:4px}.field-list[_ngcontent-%COMP%] .field-row[_ngcontent-%COMP%] .field-badges[_ngcontent-%COMP%] mat-chip[_ngcontent-%COMP%]{font-size:9px;min-height:18px;padding:0 6px}.field-list[_ngcontent-%COMP%] .field-row[_ngcontent-%COMP%] .field-badges[_ngcontent-%COMP%] .badge-pk[_ngcontent-%COMP%]{--mdc-chip-elevated-container-color: var(--df-accent);--mdc-chip-label-text-color: var(--df-accent-contrast)}.field-list[_ngcontent-%COMP%] .field-row[_ngcontent-%COMP%] .field-badges[_ngcontent-%COMP%] .badge-fk[_ngcontent-%COMP%]{--mdc-chip-elevated-container-color: var(--df-accent-soft);--mdc-chip-label-text-color: var(--df-accent-strong)}.field-list[_ngcontent-%COMP%] .field-row[_ngcontent-%COMP%] .field-badges[_ngcontent-%COMP%] .badge-uq[_ngcontent-%COMP%]{--mdc-chip-elevated-container-color: var(--df-surface-2);--mdc-chip-label-text-color: var(--df-text-2)}.field-list[_ngcontent-%COMP%] .field-row[_ngcontent-%COMP%] .field-type[_ngcontent-%COMP%]{font-size:11px;color:var(--df-text-muted);margin-top:2px;font-family:SFMono-Regular,Menlo,Consolas,monospace}.field-list[_ngcontent-%COMP%] .field-row[_ngcontent-%COMP%] .field-meta[_ngcontent-%COMP%]{display:flex;gap:8px;margin-top:2px}.field-list[_ngcontent-%COMP%] .field-row[_ngcontent-%COMP%] .field-meta[_ngcontent-%COMP%] .not-null[_ngcontent-%COMP%], .field-list[_ngcontent-%COMP%] .field-row[_ngcontent-%COMP%] .field-meta[_ngcontent-%COMP%] .auto-inc[_ngcontent-%COMP%]{font-size:10px;color:var(--df-text-faint);text-transform:uppercase}.field-list[_ngcontent-%COMP%] .field-row[_ngcontent-%COMP%] .field-ref[_ngcontent-%COMP%]{display:flex;align-items:center;gap:4px;margin-top:2px}.field-list[_ngcontent-%COMP%] .field-row[_ngcontent-%COMP%] .field-ref[_ngcontent-%COMP%] .ref-icon[_ngcontent-%COMP%]{font-size:14px;width:14px;height:14px;color:var(--df-text-faint)}.ref-link[_ngcontent-%COMP%]{color:var(--df-accent);cursor:pointer;font-size:11px;text-decoration:none}.ref-link[_ngcontent-%COMP%]:hover{color:var(--df-accent-strong);text-decoration:underline}.rel-list[_ngcontent-%COMP%] .rel-row[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:8px;padding:6px 12px;border-bottom:1px solid var(--df-border-2)}.rel-list[_ngcontent-%COMP%] .rel-row[_ngcontent-%COMP%] .rel-icon[_ngcontent-%COMP%]{font-size:16px;width:16px;height:16px;color:var(--df-accent);margin-top:2px}.rel-list[_ngcontent-%COMP%] .rel-row[_ngcontent-%COMP%] .rel-info[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2px}.rel-list[_ngcontent-%COMP%] .rel-row[_ngcontent-%COMP%] .rel-info[_ngcontent-%COMP%] .rel-type[_ngcontent-%COMP%]{font-size:10px;text-transform:uppercase;color:var(--df-text-faint);letter-spacing:.06em}.rel-list[_ngcontent-%COMP%] .rel-row[_ngcontent-%COMP%] .rel-info[_ngcontent-%COMP%] .rel-field[_ngcontent-%COMP%]{font-size:11px;color:var(--df-text-muted);font-family:SFMono-Regular,Menlo,Consolas,monospace}"]})}}return i})();function je(i,a){if(1&i&&(e.j41(0,"span",16),e.EFF(1),e.k0s()),2&i){const t=a.ngIf;e.R7$(1),e.JRh(t.dbType)}}function Ie(i,a){1&i&&(e.j41(0,"mat-chip",20),e.EFF(1,"PK"),e.k0s())}function Se(i,a){if(1&i&&(e.j41(0,"mat-chip",21),e.EFF(1,"FK"),e.k0s()),2&i){const t=e.XpG().ngIf;e.Y8G("matTooltip",t.refTable+"."+t.refField)}}function Ne(i,a){if(1&i&&(e.j41(0,"mat-chip-set",17),e.DNE(1,Ie,2,0,"mat-chip",18),e.DNE(2,Se,2,1,"mat-chip",19),e.k0s()),2&i){const t=a.ngIf;e.R7$(1),e.Y8G("ngIf",t.isPrimaryKey),e.R7$(1),e.Y8G("ngIf",t.isForeignKey)}}function Xe(i,a){if(1&i&&(e.qex(0),e.j41(1,"span",22),e.EFF(2),e.k0s(),e.bVm()),2&i){const t=e.XpG(3).$implicit;e.R7$(2),e.JRh(t("dataExplorer.nullValue"))}}function ze(i,a){if(1&i&&(e.j41(0,"pre",25),e.EFF(1),e.nI1(2,"json"),e.k0s()),2&i){const t=e.XpG(2).$implicit,n=e.XpG(3);e.R7$(1),e.JRh(e.bMT(2,1,n.row[t]))}}function Be(i,a){if(1&i&&(e.j41(0,"span",26),e.EFF(1),e.k0s()),2&i){const t=e.XpG(2).$implicit,n=e.XpG(3);e.R7$(1),e.JRh(n.row[t])}}function Ve(i,a){if(1&i&&(e.qex(0),e.DNE(1,ze,3,3,"pre",23),e.DNE(2,Be,2,1,"span",24),e.bVm()),2&i){const t=e.XpG().$implicit,n=e.XpG(3);e.R7$(1),e.Y8G("ngIf",n.isObject(n.row[t])),e.R7$(1),e.Y8G("ngIf",!n.isObject(n.row[t]))}}function Ye(i,a){if(1&i){const t=e.RV6();e.j41(0,"div",27)(1,"mat-icon",28),e.EFF(2,"link"),e.k0s(),e.j41(3,"a",29),e.bIt("click",function(){e.eBV(t);const o=e.XpG().$implicit,r=e.XpG(3);return e.Njj(r.navigateToTable.emit(r.getFieldInfo(o).refTable))}),e.EFF(4),e.k0s()()}if(2&i){const t=e.XpG().$implicit,n=e.XpG(3);e.R7$(4),e.Lme(" ",n.getFieldInfo(t).refTable,".",n.getFieldInfo(t).refField," ")}}function Le(i,a){if(1&i&&(e.j41(0,"div",8)(1,"div",9)(2,"span",10),e.EFF(3),e.k0s(),e.DNE(4,je,2,1,"span",11),e.DNE(5,Ne,3,2,"mat-chip-set",12),e.k0s(),e.j41(6,"div",13),e.DNE(7,Xe,3,1,"ng-container",14),e.DNE(8,Ve,3,2,"ng-container",14),e.k0s(),e.DNE(9,Ye,5,2,"div",15),e.k0s()),2&i){const t=a.$implicit,n=e.XpG(3);let o;e.R7$(3),e.JRh(t),e.R7$(1),e.Y8G("ngIf",n.getFieldInfo(t)),e.R7$(1),e.Y8G("ngIf",n.getFieldInfo(t)),e.R7$(1),e.AVh("null-value",null==n.row[t]),e.R7$(1),e.Y8G("ngIf",null==n.row[t]),e.R7$(1),e.Y8G("ngIf",null!=n.row[t]),e.R7$(1),e.Y8G("ngIf",(null==(o=n.getFieldInfo(t))?null:o.isForeignKey)&&(null==(o=n.getFieldInfo(t))?null:o.refTable))}}function Ae(i,a){if(1&i&&(e.j41(0,"div",6),e.DNE(1,Le,10,8,"div",7),e.k0s()),2&i){const t=e.XpG(2);e.R7$(1),e.Y8G("ngForOf",t.objectKeys(t.row))}}function Ue(i,a){if(1&i){const t=e.RV6();e.j41(0,"div",1)(1,"div",2)(2,"span",3),e.EFF(3),e.k0s(),e.j41(4,"button",4),e.bIt("click",function(){e.eBV(t);const o=e.XpG();return e.Njj(o.closeClicked.emit())}),e.j41(5,"mat-icon"),e.EFF(6,"close"),e.k0s()()(),e.DNE(7,Ae,2,1,"div",5),e.k0s()}if(2&i){const t=a.$implicit,n=e.XpG();e.R7$(3),e.JRh(t("dataExplorer.recordDetail")),e.R7$(4),e.Y8G("ngIf",n.row)}}let Je=(()=>{class i{constructor(){this.row=null,this.schema=null,this.closeClicked=new e.bkB,this.navigateToTable=new e.bkB,this.objectKeys=Object.keys}isObject(t){return null!==t&&"object"==typeof t}getFieldInfo(t){return this.schema?.field&&this.schema.field.find(n=>n.name===t)||null}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=e.VBU({type:i,selectors:[["df-row-detail"]],inputs:{row:"row",schema:"schema"},outputs:{closeClicked:"closeClicked",navigateToTable:"navigateToTable"},standalone:!0,features:[e.aNF],decls:1,vars:1,consts:[["class","row-detail-panel",4,"transloco","translocoScope"],[1,"row-detail-panel"],[1,"detail-header"],[1,"detail-title"],["mat-icon-button","",1,"close-btn",3,"click"],["class","detail-body",4,"ngIf"],[1,"detail-body"],["class","field-entry",4,"ngFor","ngForOf"],[1,"field-entry"],[1,"field-label"],[1,"field-key"],["class","field-type-badge",4,"ngIf"],["class","field-badges",4,"ngIf"],[1,"field-value"],[4,"ngIf"],["class","field-ref",4,"ngIf"],[1,"field-type-badge"],[1,"field-badges"],["class","badge-pk","disabled","",4,"ngIf"],["class","badge-fk","disabled","",3,"matTooltip",4,"ngIf"],["disabled","",1,"badge-pk"],["disabled","",1,"badge-fk",3,"matTooltip"],[1,"null-badge"],["class","json-value",4,"ngIf"],["class","text-value",4,"ngIf"],[1,"json-value"],[1,"text-value"],[1,"field-ref"],[1,"ref-icon"],[1,"ref-link",3,"click"]],template:function(n,o){1&n&&e.DNE(0,Ue,8,2,"div",0),2&n&&e.Y8G("translocoScope","dataExplorer")},dependencies:[f.bT,f.pM,f.TG,_.m_,_.An,g.Hl,g.iY,b.YN,b.Jl,b.Jo,h.uc,h.oV,d.Q8,d.bA],styles:[".row-detail-panel[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%;width:380px;border-left:1px solid var(--df-border);background:var(--df-bg);overflow:hidden}.detail-header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:8px 12px;border-bottom:1px solid var(--df-border);background:var(--df-surface-2)}.detail-header[_ngcontent-%COMP%] .detail-title[_ngcontent-%COMP%]{font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:var(--df-text-muted)}.detail-header[_ngcontent-%COMP%] .close-btn[_ngcontent-%COMP%]{width:28px;height:28px;line-height:28px}.detail-body[_ngcontent-%COMP%]{flex:1;overflow-y:auto;padding:0}.field-entry[_ngcontent-%COMP%]{padding:8px 12px;border-bottom:1px solid var(--df-border-2)}.field-entry[_ngcontent-%COMP%] .field-label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:6px;margin-bottom:4px}.field-entry[_ngcontent-%COMP%] .field-label[_ngcontent-%COMP%] .field-key[_ngcontent-%COMP%]{font-size:12px;font-weight:600;color:var(--df-text);font-family:SFMono-Regular,Menlo,Consolas,monospace}.field-entry[_ngcontent-%COMP%] .field-label[_ngcontent-%COMP%] .field-type-badge[_ngcontent-%COMP%]{font-size:10px;color:var(--df-text-faint);font-family:SFMono-Regular,Menlo,Consolas,monospace}.field-entry[_ngcontent-%COMP%] .field-label[_ngcontent-%COMP%] .field-badges[_ngcontent-%COMP%]{display:inline-flex;gap:4px}.field-entry[_ngcontent-%COMP%] .field-label[_ngcontent-%COMP%] .field-badges[_ngcontent-%COMP%] mat-chip[_ngcontent-%COMP%]{font-size:9px;min-height:18px;padding:0 6px}.field-entry[_ngcontent-%COMP%] .field-label[_ngcontent-%COMP%] .field-badges[_ngcontent-%COMP%] .badge-pk[_ngcontent-%COMP%]{--mdc-chip-elevated-container-color: var(--df-accent);--mdc-chip-label-text-color: var(--df-accent-contrast)}.field-entry[_ngcontent-%COMP%] .field-label[_ngcontent-%COMP%] .field-badges[_ngcontent-%COMP%] .badge-fk[_ngcontent-%COMP%]{--mdc-chip-elevated-container-color: var(--df-accent-soft);--mdc-chip-label-text-color: var(--df-accent-strong)}.field-entry[_ngcontent-%COMP%] .field-value[_ngcontent-%COMP%]{font-size:1.3rem;color:var(--df-text);word-break:break-word}.field-entry[_ngcontent-%COMP%] .field-value[_ngcontent-%COMP%] .null-badge[_ngcontent-%COMP%]{display:inline-block;font-size:11px;padding:1px 8px;border-radius:var(--df-radius-sm);background:var(--df-surface-2);color:var(--df-text-faint);font-style:italic}.field-entry[_ngcontent-%COMP%] .field-value[_ngcontent-%COMP%] .json-value[_ngcontent-%COMP%]{font-size:12px;font-family:SFMono-Regular,Menlo,Consolas,monospace;background:var(--df-surface-2);border:1px solid var(--df-border);border-radius:var(--df-radius-sm);padding:8px;margin:4px 0 0;overflow-x:auto;max-height:200px;white-space:pre-wrap}.field-entry[_ngcontent-%COMP%] .field-value[_ngcontent-%COMP%] .text-value[_ngcontent-%COMP%]{white-space:pre-wrap}.field-entry.null-value[_ngcontent-%COMP%] .field-value[_ngcontent-%COMP%]{color:var(--df-text-faint)}.field-entry[_ngcontent-%COMP%] .field-ref[_ngcontent-%COMP%]{display:flex;align-items:center;gap:4px;margin-top:4px}.field-entry[_ngcontent-%COMP%] .field-ref[_ngcontent-%COMP%] .ref-icon[_ngcontent-%COMP%]{font-size:14px;width:14px;height:14px;color:var(--df-text-faint)}.ref-link[_ngcontent-%COMP%]{color:var(--df-accent);cursor:pointer;font-size:11px;text-decoration:none}.ref-link[_ngcontent-%COMP%]:hover{color:var(--df-accent-strong);text-decoration:underline}"]})}}return i})();function He(i,a){if(1&i){const t=e.RV6();e.j41(0,"button",33),e.bIt("click",function(){e.eBV(t);const o=e.XpG(3);return e.Njj(o.clearQuickSearch())}),e.j41(1,"mat-icon"),e.EFF(2,"close"),e.k0s()()}}function Qe(i,a){if(1&i){const t=e.RV6();e.j41(0,"div",29)(1,"mat-icon",30),e.EFF(2,"search"),e.k0s(),e.j41(3,"input",31),e.bIt("input",function(o){e.eBV(t);const r=e.XpG(2);return e.Njj(r.onQuickSearch(o))}),e.k0s(),e.DNE(4,He,3,0,"button",32),e.k0s()}if(2&i){const t=e.XpG().$implicit,n=e.XpG();e.R7$(3),e.Y8G("placeholder",t("dataExplorer.quickSearch"))("value",n.quickSearchTerm),e.R7$(1),e.Y8G("ngIf",n.quickSearchTerm)}}function Ke(i,a){if(1&i){const t=e.RV6();e.j41(0,"button",34),e.bIt("click",function(){e.eBV(t);const o=e.XpG(2);return e.Njj(o.clearAllFilters())}),e.j41(1,"mat-icon",35),e.EFF(2,"filter_list_off"),e.k0s()()}if(2&i){const t=e.XpG().$implicit,n=e.XpG();e.Y8G("matTooltip",t("dataExplorer.clearFilters")),e.R7$(1),e.Y8G("matBadge",n.activeFilterCount)}}function We(i,a){if(1&i){const t=e.RV6();e.j41(0,"div",36),e.bIt("click",function(o){return o.stopPropagation()}),e.j41(1,"mat-checkbox",37),e.bIt("change",function(){const r=e.eBV(t).$implicit,l=e.XpG(2);return e.Njj(l.toggleColumn(r))}),e.EFF(2),e.k0s()()}if(2&i){const t=a.$implicit,n=e.XpG(2);e.R7$(1),e.Y8G("checked",!n.hiddenColumns.has(t)),e.R7$(1),e.SpI(" ",t," ")}}function qe(i,a){if(1&i){const t=e.RV6();e.j41(0,"div",38)(1,"mat-icon",39),e.EFF(2,"link"),e.k0s(),e.j41(3,"span",40),e.EFF(4,"Filtered via foreign key: "),e.j41(5,"code"),e.EFF(6),e.k0s()(),e.j41(7,"button",41),e.bIt("click",function(){e.eBV(t);const o=e.XpG(2);return e.Njj(o.clearNavigationFilter())}),e.j41(8,"mat-icon"),e.EFF(9,"close"),e.k0s()()()}if(2&i){const t=e.XpG(2);e.R7$(6),e.JRh(t.navigationFilter)}}function Ze(i,a){if(1&i&&(e.j41(0,"span",55),e.EFF(1),e.k0s()),2&i){const t=e.XpG(3);e.yjJ("matTooltip","Records ",t.currentOffset+1," through ",t.currentOffset+t.dataSource.data.length," out of ",t.totalRecords," total. Use the per-column filters below the headers for server-side filtering."),e.R7$(1),e.E5c(" ",t.currentOffset+1,"\u2013",t.currentOffset+t.dataSource.data.length," of ",t.totalRecords," records ")}}function et(i,a){if(1&i&&(e.j41(0,"option",56),e.EFF(1),e.k0s()),2&i){const t=a.$implicit;e.Y8G("value",t),e.R7$(1),e.SpI(" ",t," ")}}function tt(i,a){if(1&i){const t=e.RV6();e.j41(0,"div",42)(1,"div",43),e.DNE(2,Ze,2,6,"span",44),e.k0s(),e.j41(3,"div",45)(4,"label",46),e.EFF(5,"Rows: "),e.j41(6,"select",47),e.bIt("change",function(o){e.eBV(t);const r=e.XpG(2);return e.Njj(r.onPageSizeChange(o))}),e.DNE(7,et,2,2,"option",48),e.k0s()(),e.j41(8,"div",49)(9,"button",50),e.bIt("click",function(){e.eBV(t);const o=e.XpG(2);return e.Njj(o.goToFirstPage())}),e.j41(10,"mat-icon"),e.EFF(11,"first_page"),e.k0s()(),e.j41(12,"button",51),e.bIt("click",function(){e.eBV(t);const o=e.XpG(2);return e.Njj(o.goToPrevPage())}),e.j41(13,"mat-icon"),e.EFF(14,"chevron_left"),e.k0s()(),e.j41(15,"span",52),e.EFF(16),e.k0s(),e.j41(17,"button",53),e.bIt("click",function(){e.eBV(t);const o=e.XpG(2);return e.Njj(o.goToNextPage())}),e.j41(18,"mat-icon"),e.EFF(19,"chevron_right"),e.k0s()(),e.j41(20,"button",54),e.bIt("click",function(){e.eBV(t);const o=e.XpG(2);return e.Njj(o.goToLastPage())}),e.j41(21,"mat-icon"),e.EFF(22,"last_page"),e.k0s()()()()()}if(2&i){const t=e.XpG(2);e.R7$(2),e.Y8G("ngIf",t.totalRecords>0),e.R7$(4),e.Y8G("value",t.pageSize),e.R7$(1),e.Y8G("ngForOf",t.pageSizeOptions),e.R7$(2),e.Y8G("disabled",0===t.pageIndex),e.R7$(3),e.Y8G("disabled",0===t.pageIndex),e.R7$(4),e.Lme("",t.pageIndex+1," / ",t.totalPages,""),e.R7$(1),e.Y8G("disabled",t.isLastPage()),e.R7$(3),e.Y8G("disabled",t.isLastPage())}}function nt(i,a){if(1&i){const t=e.RV6();e.j41(0,"label",65)(1,"input",66),e.bIt("change",function(){const r=e.eBV(t).$implicit,l=e.XpG(4);return e.Njj(l.toggleApiRelated(r.name))}),e.k0s(),e.EFF(2),e.k0s()}if(2&i){const t=a.$implicit,n=e.XpG(4);e.Y8G("matTooltip",t.type+": Include "+t.refTable+" records linked via "+t.field+" \u2192 "+t.refField),e.R7$(1),e.Y8G("checked",n.apiSelectedRelated[t.name]),e.R7$(1),e.SpI(" ",t.name," ")}}function it(i,a){if(1&i&&(e.j41(0,"div",69)(1,"span",64),e.EFF(2,"Related:"),e.k0s(),e.DNE(3,nt,3,3,"label",70),e.k0s()),2&i){const t=e.XpG(3);e.R7$(3),e.Y8G("ngForOf",t.cachedSchema.related)("ngForTrackBy",t.trackByRelName)}}function ot(i,a){if(1&i){const t=e.RV6();e.j41(0,"div",57)(1,"div",58),e.EFF(2," This is the DreamFactory REST API call equivalent to your current view. Any sorting or column filters you apply will update the URL in real time. Click the URL or the copy button to copy it to your clipboard. "),e.k0s(),e.j41(3,"div",59)(4,"span",60),e.EFF(5,"GET"),e.k0s(),e.j41(6,"code",61),e.bIt("click",function(){e.eBV(t);const o=e.XpG(2);return e.Njj(o.copyApiUrl())}),e.EFF(7),e.k0s(),e.j41(8,"button",62),e.bIt("click",function(){e.eBV(t);const o=e.XpG(2);return e.Njj(o.copyApiUrl())}),e.j41(9,"mat-icon"),e.EFF(10),e.k0s()()(),e.j41(11,"div",63)(12,"span",64),e.EFF(13,"Include:"),e.k0s(),e.j41(14,"label",65)(15,"input",66),e.bIt("change",function(){e.eBV(t);const o=e.XpG(2);return e.Njj(o.apiIncludeLimit=!o.apiIncludeLimit)}),e.k0s(),e.EFF(16," limit "),e.k0s(),e.j41(17,"label",65)(18,"input",66),e.bIt("change",function(){e.eBV(t);const o=e.XpG(2);return e.Njj(o.apiIncludeOffset=!o.apiIncludeOffset)}),e.k0s(),e.EFF(19," offset "),e.k0s(),e.j41(20,"label",67)(21,"input",66),e.bIt("change",function(){e.eBV(t);const o=e.XpG(2);return e.Njj(o.apiIncludeCount=!o.apiIncludeCount)}),e.k0s(),e.EFF(22," include_count "),e.k0s()(),e.DNE(23,it,4,2,"div",68),e.k0s()}if(2&i){const t=e.XpG(2);e.R7$(7),e.JRh(t.buildApiUrl()),e.R7$(3),e.JRh(t.apiCopied?"check":"content_copy"),e.R7$(4),e.Mz_("matTooltip","limit: Maximum number of records to return per request (currently ",t.pageSize,")"),e.R7$(1),e.Y8G("checked",t.apiIncludeLimit),e.R7$(2),e.Mz_("matTooltip","offset: Number of records to skip, used for pagination (currently ",t.currentOffset,")"),e.R7$(1),e.Y8G("checked",t.apiIncludeOffset),e.R7$(3),e.Y8G("checked",t.apiIncludeCount),e.R7$(2),e.Y8G("ngIf",null==t.cachedSchema||null==t.cachedSchema.related?null:t.cachedSchema.related.length)}}function at(i,a){if(1&i&&(e.j41(0,"div",71),e.nrm(1,"mat-spinner",72),e.j41(2,"span"),e.EFF(3),e.k0s()()),2&i){const t=e.XpG().$implicit;e.R7$(3),e.JRh(t("dataExplorer.loadingData"))}}function rt(i,a){if(1&i){const t=e.RV6();e.j41(0,"div",73)(1,"mat-icon",74),e.EFF(2,"error_outline"),e.k0s(),e.j41(3,"span"),e.EFF(4),e.nI1(5,"transloco"),e.k0s(),e.j41(6,"button",75),e.bIt("click",function(){e.eBV(t);const o=e.XpG(2);return e.Njj(o.loadData())}),e.EFF(7),e.k0s()()}if(2&i){const t=e.XpG().$implicit,n=e.XpG();e.R7$(4),e.JRh(e.bMT(5,2,n.error)),e.R7$(3),e.SpI(" ",t("dataExplorer.retry")," ")}}function lt(i,a){if(1&i&&(e.j41(0,"div",76)(1,"mat-icon"),e.EFF(2,"inbox"),e.k0s(),e.j41(3,"span"),e.EFF(4),e.k0s(),e.j41(5,"small"),e.EFF(6),e.k0s()()),2&i){const t=e.XpG().$implicit;e.R7$(4),e.JRh(t("dataExplorer.noData")),e.R7$(2),e.JRh(t("dataExplorer.noDataHint"))}}function ct(i,a){1&i&&(e.j41(0,"mat-icon",90),e.EFF(1,"vpn_key"),e.k0s())}function st(i,a){if(1&i){const t=e.RV6();e.j41(0,"th",87),e.DNE(1,ct,2,0,"mat-icon",88),e.EFF(2),e.j41(3,"span",89),e.bIt("mousedown",function(o){e.eBV(t);const r=e.XpG().$implicit,l=e.XpG(3);return e.Njj(l.onResizeStart(o,r))}),e.k0s()()}if(2&i){const t=e.XpG().$implicit,n=e.XpG(3);e.xc7("width",n.columnWidths[t],"px")("min-width",n.columnWidths[t],"px")("max-width",n.columnWidths[t],"px"),e.R7$(1),e.Y8G("ngIf",n.isPrimaryKey(t)),e.R7$(1),e.SpI(" ",t," ")}}function dt(i,a){if(1&i){const t=e.RV6();e.j41(0,"span",94),e.bIt("click",function(o){e.eBV(t);const r=e.XpG().$implicit,l=e.XpG().$implicit,s=e.XpG(3);return e.Njj(s.onFkClick(o,l,r[l]))}),e.EFF(1),e.j41(2,"mat-icon",95),e.EFF(3,"open_in_new"),e.k0s()()}if(2&i){const t=e.XpG().$implicit,n=e.XpG().$implicit,o=e.XpG(3);e.Y8G("matTooltip","Go to "+o.getFkRefTable(n)),e.R7$(1),e.SpI(" ",o.formatCellValue(t[n])," ")}}function pt(i,a){if(1&i&&(e.qex(0),e.EFF(1),e.bVm()),2&i){const t=e.XpG().$implicit,n=e.XpG().$implicit,o=e.XpG(3);e.R7$(1),e.SpI(" ",o.formatCellValue(t[n])," ")}}function ft(i,a){if(1&i&&(e.j41(0,"td",91),e.DNE(1,dt,4,2,"span",92),e.DNE(2,pt,2,1,"ng-container",93),e.k0s()),2&i){const t=a.$implicit,n=e.XpG().$implicit,o=e.XpG(3);e.xc7("width",o.columnWidths[n],"px")("min-width",o.columnWidths[n],"px")("max-width",o.columnWidths[n],"px"),e.AVh("null-cell",null==t[n])("fk-cell",o.isForeignKey(n)&&null!=t[n]),e.R7$(1),e.Y8G("ngIf",o.isForeignKey(n)&&null!=t[n]),e.R7$(1),e.Y8G("ngIf",!(o.isForeignKey(n)&&null!=t[n]))}}function _t(i,a){1&i&&(e.qex(0,84),e.DNE(1,st,4,8,"th",85),e.DNE(2,ft,3,12,"td",86),e.bVm()),2&i&&e.Y8G("matColumnDef",a.$implicit)}function gt(i,a){if(1&i&&(e.j41(0,"option",56),e.EFF(1),e.k0s()),2&i){const t=a.$implicit;e.Y8G("value",t.value),e.R7$(1),e.SpI(" ",t.label," ")}}function mt(i,a){if(1&i){const t=e.RV6();e.j41(0,"input",101),e.bIt("input",function(o){e.eBV(t);const r=e.XpG(2).$implicit,l=e.XpG(3);return e.Njj(l.onFilterInput(r,o))}),e.k0s()}if(2&i){const t=e.XpG(2).$implicit,n=e.XpG(2).$implicit,o=e.XpG();e.Y8G("placeholder",n("dataExplorer.filterPlaceholder"))("value",o.getFilterValue(t))}}function ht(i,a){if(1&i){const t=e.RV6();e.j41(0,"th",97)(1,"div",98)(2,"select",99),e.bIt("change",function(o){e.eBV(t);const r=e.XpG().$implicit,l=e.XpG(3);return e.Njj(l.onFilterOpChange(r,o))}),e.DNE(3,gt,2,2,"option",48),e.k0s(),e.DNE(4,mt,1,2,"input",100),e.k0s()()}if(2&i){const t=e.XpG().$implicit,n=e.XpG(3);e.xc7("width",n.columnWidths[t],"px")("min-width",n.columnWidths[t],"px")("max-width",n.columnWidths[t],"px"),e.R7$(2),e.Y8G("value",n.getFilterOp(t)),e.R7$(1),e.Y8G("ngForOf",n.getOperatorsForColumn(t)),e.R7$(1),e.Y8G("ngIf",!n.isNullOp(n.getFilterOp(t)))}}function ut(i,a){1&i&&(e.qex(0,84),e.DNE(1,ht,5,9,"th",96),e.bVm()),2&i&&e.Y8G("matColumnDef","filter_"+a.$implicit)}function bt(i,a){1&i&&e.nrm(0,"tr",102)}function vt(i,a){1&i&&e.nrm(0,"tr",103)}function xt(i,a){if(1&i){const t=e.RV6();e.j41(0,"tr",104),e.bIt("click",function(){const r=e.eBV(t).$implicit,l=e.XpG(3);return e.Njj(l.onRowClick(r))}),e.k0s()}if(2&i){const t=a.$implicit,n=e.XpG(3);e.AVh("selected-row",t===n.selectedRow),e.Y8G("matTooltipShowDelay",800)}}function Ct(i,a){if(1&i){const t=e.RV6();e.j41(0,"div",77)(1,"div",78)(2,"table",79),e.bIt("matSortChange",function(o){e.eBV(t);const r=e.XpG(2);return e.Njj(r.onSortChange(o))}),e.DNE(3,_t,3,1,"ng-container",80),e.DNE(4,ut,2,1,"ng-container",80),e.DNE(5,bt,1,0,"tr",81),e.DNE(6,vt,1,0,"tr",82),e.DNE(7,xt,1,3,"tr",83),e.k0s()()()}if(2&i){const t=e.XpG(2);e.AVh("is-loading",t.loading),e.R7$(2),e.Y8G("dataSource",t.dataSource),e.R7$(1),e.Y8G("ngForOf",t.columns),e.R7$(1),e.Y8G("ngForOf",t.columns),e.R7$(1),e.Y8G("matHeaderRowDef",t.columns)("matHeaderRowDefSticky",!0),e.R7$(1),e.Y8G("matHeaderRowDef",t.filterColumns)("matHeaderRowDefSticky",!0),e.R7$(1),e.Y8G("matRowDefColumns",t.columns)}}function Ot(i,a){1&i&&(e.qex(0),e.EFF(1," (filtered)"),e.bVm())}function Mt(i,a){if(1&i&&(e.j41(0,"span",112),e.EFF(1),e.k0s()),2&i){const t=e.XpG(3);e.R7$(1),e.Lme(" Page ",t.pageIndex+1," of ",t.totalPages," ")}}function Pt(i,a){if(1&i){const t=e.RV6();e.j41(0,"div",105)(1,"span",106),e.EFF(2),e.DNE(3,Ot,2,0,"ng-container",93),e.k0s(),e.j41(4,"span",107),e.EFF(5),e.k0s(),e.j41(6,"div",108),e.DNE(7,Mt,2,2,"span",109),e.j41(8,"div",110)(9,"button",111),e.bIt("click",function(){e.eBV(t);const o=e.XpG(2);return e.Njj(o.goToFirstPage())}),e.j41(10,"mat-icon"),e.EFF(11,"first_page"),e.k0s()(),e.j41(12,"button",111),e.bIt("click",function(){e.eBV(t);const o=e.XpG(2);return e.Njj(o.goToPrevPage())}),e.j41(13,"mat-icon"),e.EFF(14,"chevron_left"),e.k0s()(),e.j41(15,"button",111),e.bIt("click",function(){e.eBV(t);const o=e.XpG(2);return e.Njj(o.goToNextPage())}),e.j41(16,"mat-icon"),e.EFF(17,"chevron_right"),e.k0s()(),e.j41(18,"button",111),e.bIt("click",function(){e.eBV(t);const o=e.XpG(2);return e.Njj(o.goToLastPage())}),e.j41(19,"mat-icon"),e.EFF(20,"last_page"),e.k0s()()()()()}if(2&i){const t=e.XpG(2);e.R7$(2),e.SpI(" ",t.totalRecords," records "),e.R7$(1),e.Y8G("ngIf",t.activeFilterCount>0),e.R7$(2),e.Lme("",t.columns.length," of ",t.allColumns.length," columns"),e.R7$(2),e.Y8G("ngIf",t.totalRecords>0),e.R7$(2),e.Y8G("disabled",0===t.pageIndex),e.R7$(3),e.Y8G("disabled",0===t.pageIndex),e.R7$(3),e.Y8G("disabled",t.isLastPage()),e.R7$(3),e.Y8G("disabled",t.isLastPage())}}function Dt(i,a){if(1&i){const t=e.RV6();e.j41(0,"df-schema-info",113),e.bIt("closeClicked",function(){e.eBV(t);const o=e.XpG(2);return e.Njj(o.showSchemaPanel=!1)})("navigateToTable",function(o){e.eBV(t);const r=e.XpG(2);return e.Njj(r.tableNavigated.emit({tableName:o}))}),e.k0s()}if(2&i){const t=e.XpG(2);e.Y8G("serviceName",t.serviceName)("tableName",t.tableName)}}function kt(i,a){if(1&i){const t=e.RV6();e.j41(0,"df-row-detail",114),e.bIt("closeClicked",function(){e.eBV(t);const o=e.XpG(2);return e.Njj(o.selectedRow=null)})("navigateToTable",function(o){e.eBV(t);const r=e.XpG(2);return e.Njj(r.tableNavigated.emit({tableName:o}))}),e.k0s()}if(2&i){const t=e.XpG(2);e.Y8G("row",t.selectedRow)("schema",t.cachedSchema)}}function Ft(i,a){if(1&i){const t=e.RV6();e.j41(0,"div",1)(1,"div",2)(2,"div",3)(3,"div",4),e.nrm(4,"fa-icon",5),e.j41(5,"span",6),e.EFF(6),e.k0s(),e.j41(7,"mat-chip-set",7)(8,"mat-chip",8),e.nrm(9,"fa-icon",9),e.EFF(10),e.k0s()()(),e.j41(11,"div",10),e.DNE(12,Qe,5,3,"div",11),e.DNE(13,Ke,3,2,"button",12),e.j41(14,"button",13),e.bIt("click",function(){e.eBV(t);const o=e.XpG();return e.Njj(o.showApiCall=!o.showApiCall)}),e.j41(15,"mat-icon"),e.EFF(16,"code"),e.k0s()(),e.j41(17,"button",14)(18,"mat-icon"),e.EFF(19,"view_column"),e.k0s()(),e.j41(20,"mat-menu",15,16),e.DNE(22,We,3,2,"div",17),e.k0s(),e.j41(23,"button",18),e.bIt("click",function(){e.eBV(t);const o=e.XpG();return e.Njj(o.toggleSchemaPanel())}),e.j41(24,"mat-icon"),e.EFF(25,"info_outline"),e.k0s()()()(),e.DNE(26,qe,10,1,"div",19),e.DNE(27,tt,23,9,"div",20),e.DNE(28,ot,24,8,"div",21),e.DNE(29,at,4,1,"div",22),e.DNE(30,rt,8,4,"div",23),e.DNE(31,lt,7,2,"div",24),e.DNE(32,Ct,8,10,"div",25),e.DNE(33,Pt,21,9,"div",26),e.k0s(),e.DNE(34,Dt,1,2,"df-schema-info",27),e.DNE(35,kt,1,2,"df-row-detail",28),e.k0s()}if(2&i){const t=a.$implicit,n=e.sdS(21),o=e.XpG();e.R7$(4),e.Y8G("icon",o.faTable),e.R7$(2),e.JRh(o.tableName),e.R7$(3),e.Y8G("icon",o.faLock),e.R7$(1),e.SpI(" ",t("dataExplorer.readOnly")," "),e.R7$(2),e.Y8G("ngIf",!o.initialLoading&&o.columns.length>0),e.R7$(1),e.Y8G("ngIf",o.activeFilterCount>0),e.R7$(1),e.AVh("active",o.showApiCall),e.R7$(3),e.Y8G("matMenuTriggerFor",n),e.R7$(5),e.Y8G("ngForOf",o.allColumns),e.R7$(1),e.AVh("active",o.showSchemaPanel),e.R7$(3),e.Y8G("ngIf",o.navigationFilter),e.R7$(1),e.Y8G("ngIf",!o.initialLoading&&!o.error&&o.columns.length>0),e.R7$(1),e.Y8G("ngIf",o.showApiCall&&!o.initialLoading&&o.columns.length>0),e.R7$(1),e.Y8G("ngIf",o.initialLoading),e.R7$(1),e.Y8G("ngIf",o.error&&!o.initialLoading),e.R7$(1),e.Y8G("ngIf",!o.initialLoading&&!o.error&&0===o.dataSource.data.length&&0===o.allColumns.length),e.R7$(1),e.Y8G("ngIf",!o.initialLoading&&!o.error&&o.columns.length>0),e.R7$(1),e.Y8G("ngIf",!o.initialLoading&&!o.error&&o.columns.length>0),e.R7$(1),e.Y8G("ngIf",o.showSchemaPanel),e.R7$(1),e.Y8G("ngIf",o.selectedRow)}}let yt=(()=>{class i{constructor(t,n,o){this.dataExplorerService=t,this.cdr=n,this.ngZone=o,this.serviceName="",this.tableName="",this.tableNavigated=new e.bkB,this.dataSource=new m.I6([]),this.allColumns=[],this.columns=[],this.filterColumns=[],this.hiddenColumns=new Set,this.totalRecords=0,this.pageSize=50,this.pageSizeOptions=[25,50,100,250,500],this.pageIndex=0,this.currentOffset=0,this.loading=!1,this.initialLoading=!1,this.error=null,this.columnFilters={},this.activeFilterCount=0,this.filterSubject$=new T.B,this.columnWidths={},this.resizeRafId=0,this.showSchemaPanel=!1,this.showApiCall=!1,this.apiCopied=!1,this.apiIncludeLimit=!0,this.apiIncludeOffset=!0,this.apiIncludeCount=!0,this.apiSelectedRelated={},this.selectedRow=null,this.cachedSchema=null,this.navigationFilter=null,this.quickSearchTerm="",this.faTable=x.w97,this.faLock=x.DW4,this.faFilter=x.mRM,this.faCode=x.jTw,this.destroy$=new T.B,this.textOperators=[{value:"contains",label:"contains"},{value:"eq",label:"="},{value:"neq",label:"\u2260"},{value:"starts",label:"starts with"},{value:"ends",label:"ends with"},{value:"is_null",label:"is null"},{value:"is_not_null",label:"is not null"}],this.numericOperators=[{value:"eq",label:"="},{value:"neq",label:"\u2260"},{value:"gt",label:">"},{value:"lt",label:"<"},{value:"gte",label:"\u2265"},{value:"lte",label:"\u2264"},{value:"is_null",label:"is null"},{value:"is_not_null",label:"is not null"}],this.dateOperators=[{value:"eq",label:"="},{value:"neq",label:"\u2260"},{value:"gt",label:"after"},{value:"lt",label:"before"},{value:"gte",label:"on/after"},{value:"lte",label:"on/before"},{value:"is_null",label:"is null"},{value:"is_not_null",label:"is not null"}],this.booleanOperators=[{value:"eq",label:"="},{value:"is_null",label:"is null"},{value:"is_not_null",label:"is not null"}],this.fieldInfoCache=new Map,this.fieldInfoCacheSchema=null,this.apiStateVersion=0,this.apiUrlCacheKey="",this.apiUrlCache="",this.filterSubject$.pipe((0,he.B)(500),(0,M.Q)(this.destroy$)).subscribe(()=>{this.pageIndex=0,this.currentOffset=0,this.loadData()})}ngAfterViewInit(){}ngOnChanges(t){(t.tableName||t.serviceName)&&this.resetAndLoad()}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete(),cancelAnimationFrame(this.resizeRafId)}get totalPages(){return Math.max(1,Math.ceil(this.totalRecords/this.pageSize))}resetAndLoad(){this.allColumns=[],this.columns=[],this.filterColumns=[],this.hiddenColumns=new Set,this.dataSource.data=[],this.totalRecords=0,this.pageIndex=0,this.currentOffset=0,this.currentSort=void 0,this.columnFilters={},this.apiStateVersion++,this.activeFilterCount=0,this.selectedRow=null,this.cachedSchema=null,this.columnWidths={},this.navigationFilter=this.initialFilter||null,this.initialLoading=!0,this.loadData(),this.loadSchemaForTable()}loadSchemaForTable(){!this.serviceName||!this.tableName||this.dataExplorerService.getTableSchema(this.serviceName,this.tableName).pipe((0,M.Q)(this.destroy$)).subscribe({next:t=>{this.cachedSchema=t,this.apiSelectedRelated={},this.apiStateVersion++,this.dataSource.data=[...this.dataSource.data],this.cdr.detectChanges()},error:()=>{}})}loadData(){if(!this.serviceName||!this.tableName)return;this.loading=!0,this.error=null;const t=this.buildFilterString(),o=[this.navigationFilter,t].filter(Boolean).join(" AND ")||void 0;this.dataExplorerService.getTableData(this.serviceName,this.tableName,this.pageSize,this.currentOffset,this.currentSort,o).pipe((0,M.Q)(this.destroy$)).subscribe({next:r=>{const l=r.resource||[];if(l.length>0&&0===this.allColumns.length){this.allColumns=Object.keys(l[0]),this.updateVisibleColumns();for(const s of this.allColumns)this.columnWidths[s]=150}this.dataSource.data=l,this.totalRecords=r.meta?.count??l.length,this.loading=!1,this.initialLoading=!1},error:r=>{this.error=(0,R.cQ)(r).message,this.loading=!1,this.initialLoading=!1}})}toggleColumn(t){this.hiddenColumns.has(t)?this.hiddenColumns.delete(t):this.columns.length>1&&this.hiddenColumns.add(t),this.updateVisibleColumns()}updateVisibleColumns(){this.columns=this.allColumns.filter(t=>!this.hiddenColumns.has(t)),this.filterColumns=this.columns.map(t=>"filter_"+t)}onPageChange(t){this.pageSize=t.pageSize,this.pageIndex=t.pageIndex,this.currentOffset=t.pageIndex*t.pageSize,this.loadData()}onPageSizeChange(t){this.pageSize=Number(t.target.value),this.pageIndex=0,this.currentOffset=0,this.loadData()}goToFirstPage(){this.pageIndex=0,this.currentOffset=0,this.loadData()}goToPrevPage(){this.pageIndex>0&&(this.pageIndex--,this.currentOffset=this.pageIndex*this.pageSize,this.loadData())}goToNextPage(){this.isLastPage()||(this.pageIndex++,this.currentOffset=this.pageIndex*this.pageSize,this.loadData())}goToLastPage(){this.pageIndex=Math.max(0,Math.ceil(this.totalRecords/this.pageSize)-1),this.currentOffset=this.pageIndex*this.pageSize,this.loadData()}isLastPage(){return this.currentOffset+this.pageSize>=this.totalRecords}onSortChange(t){if(t.direction){const n=this.getDbColumnName(t.active);this.currentSort=`${n} ${t.direction.toUpperCase()}`}else this.currentSort=void 0;this.pageIndex=0,this.currentOffset=0,this.loadData()}getFieldInfo(t){if(!this.cachedSchema?.field)return null;this.fieldInfoCacheSchema!==this.cachedSchema&&(this.fieldInfoCacheSchema=this.cachedSchema,this.fieldInfoCache.clear());const n=this.fieldInfoCache.get(t);if(void 0!==n)return n;const o=this.cachedSchema.field.find(s=>s.name===t),r=t.toLowerCase(),l=o||this.cachedSchema.field.find(s=>s.name.toLowerCase().replace(/_/g,"")===r)||null;return this.fieldInfoCache.set(t,l),l}getDbColumnName(t){return this.getFieldInfo(t)?.name??t}onResizeStart(t,n){t.stopPropagation(),t.preventDefault();const o=t.pageX,r=this.columnWidths[n]||150;document.body.style.cursor="col-resize",document.body.style.userSelect="none";const l=p=>{cancelAnimationFrame(this.resizeRafId),this.resizeRafId=requestAnimationFrame(()=>{this.columnWidths[n]=Math.max(60,r+(p.pageX-o)),this.cdr.detectChanges()})},s=()=>{cancelAnimationFrame(this.resizeRafId),document.body.style.cursor="",document.body.style.userSelect="",document.removeEventListener("mousemove",l),document.removeEventListener("mouseup",s),this.cdr.detectChanges()};this.ngZone.runOutsideAngular(()=>{document.addEventListener("mousemove",l),document.addEventListener("mouseup",s)})}getOperatorsForColumn(t){const n=this.getFieldInfo(t);if(!n)return this.textOperators;const o=(n.type||n.dbType).toLowerCase();return this.isNumericType(o)?this.numericOperators:this.isDateType(o)?this.dateOperators:this.isBooleanType(o)?this.booleanOperators:this.textOperators}getFilterOp(t){return this.columnFilters[t]?.op||this.getDefaultOp(t)}getFilterValue(t){return this.columnFilters[t]?.value||""}getDefaultOp(t){return this.getOperatorsForColumn(t)[0].value}isNullOp(t){return"is_null"===t||"is_not_null"===t}onFilterOpChange(t,n){const o=n.target.value,r=this.columnFilters[t]?.value||"";this.columnFilters[t]={op:o,value:r},this.isNullOp(o)?(this.columnFilters[t]={op:o,value:""},this.updateActiveFilterCount(),this.filterSubject$.next()):r?(this.updateActiveFilterCount(),this.filterSubject$.next()):this.updateActiveFilterCount()}onFilterInput(t,n){const o=n.target.value,r=this.columnFilters[t]?.op||this.getDefaultOp(t);this.columnFilters[t]=o?{op:r,value:o}:{op:r,value:""},this.updateActiveFilterCount(),this.filterSubject$.next()}clearAllFilters(){this.columnFilters={},this.apiStateVersion++,this.activeFilterCount=0,this.pageIndex=0,this.currentOffset=0,this.loadData()}updateActiveFilterCount(){this.apiStateVersion++,this.activeFilterCount=Object.keys(this.columnFilters).filter(t=>{const n=this.columnFilters[t];return n.value||this.isNullOp(n.op)}).length}buildFilterString(){const t=[];for(const[n,o]of Object.entries(this.columnFilters)){const{op:r,value:l}=o;if(!l&&!this.isNullOp(r))continue;const s=this.getDbColumnName(n);if("is_null"!==r)if("is_not_null"!==r){if(l)if("contains"===r){const p=l.replace(/'/g,"''");t.push(`(${s} like '%${p}%')`)}else if("starts"===r){const p=l.replace(/'/g,"''");t.push(`(${s} like '${p}%')`)}else if("ends"===r){const p=l.replace(/'/g,"''");t.push(`(${s} like '%${p}')`)}else{const O={eq:"=",neq:"!=",gt:">",lt:"<",gte:">=",lte:"<="}[r]||"=",F=this.getFieldInfo(n),X=(F?.type||F?.dbType||"").toLowerCase();if(this.isNumericType(X)&&!isNaN(Number(l)))t.push(`(${s} ${O} ${l})`);else{const Nt=l.replace(/'/g,"''");t.push(`(${s} ${O} '${Nt}')`)}}}else t.push(`(${s} IS NOT NULL)`);else t.push(`(${s} IS NULL)`)}return t.join(" AND ")}isNumericType(t){return["integer","int","smallint","bigint","tinyint","float","double","decimal","numeric","real","serial","bigserial","int2","int4","int8","float4","float8","money"].some(o=>t.toLowerCase().includes(o))}isDateType(t){return["date","datetime","timestamp","time","timestamptz","timetz"].some(o=>t.toLowerCase().includes(o))}isBooleanType(t){return["boolean","bool","bit"].some(o=>t.toLowerCase().includes(o))}onRowClick(t){this.selectedRow=this.selectedRow===t?null:t}toggleSchemaPanel(){this.showSchemaPanel=!this.showSchemaPanel}isPrimaryKey(t){return this.getFieldInfo(t)?.isPrimaryKey??!1}isForeignKey(t){return this.getFieldInfo(t)?.isForeignKey??!1}getFkRefTable(t){return this.getFieldInfo(t)?.refTable||""}onFkClick(t,n,o){t.stopPropagation();const r=this.getFieldInfo(n);if(!r?.refTable||!r?.refField)return;const s=this.isNumericType((r.type||r.dbType).toLowerCase())?`(${r.refField} = ${o})`:`(${r.refField} = '${String(o).replace(/'/g,"''")}')`;this.tableNavigated.emit({tableName:r.refTable,filter:s})}clearNavigationFilter(){this.navigationFilter=null,this.pageIndex=0,this.currentOffset=0,this.loadData()}buildApiUrl(){const t=`${this.serviceName}|${this.tableName}|${this.apiIncludeLimit}|${this.apiIncludeOffset}|${this.apiIncludeCount}|${this.pageSize}|${this.currentOffset}|${this.currentSort}|${this.navigationFilter}|${this.apiStateVersion}`;if(t===this.apiUrlCacheKey)return this.apiUrlCache;const n=`${window.location.origin}/api/v2/${this.serviceName}/_table/${this.tableName}`,o=new URLSearchParams;this.apiIncludeLimit&&o.set("limit",this.pageSize.toString()),this.apiIncludeOffset&&o.set("offset",this.currentOffset.toString()),this.apiIncludeCount&&o.set("include_count","true"),this.currentSort&&o.set("order",this.currentSort);const r=this.buildFilterString(),s=[this.navigationFilter,r].filter(Boolean).join(" AND ");s&&o.set("filter",s);const p=Object.entries(this.apiSelectedRelated).filter(([F,X])=>X).map(([F])=>F);p.length>0&&o.set("related",p.join(","));const O=o.toString();return this.apiUrlCacheKey=t,this.apiUrlCache=O?`${n}?${O}`:n,this.apiUrlCache}toggleApiRelated(t){this.apiSelectedRelated[t]=!this.apiSelectedRelated[t],this.apiStateVersion++}trackByRelName(t,n){return n.name}copyApiUrl(){const t=this.buildApiUrl();navigator.clipboard.writeText(t).then(()=>{this.apiCopied=!0,setTimeout(()=>this.apiCopied=!1,2e3)})}onQuickSearch(t){this.quickSearchTerm=t.target.value,this.applyQuickSearch()}clearQuickSearch(){this.quickSearchTerm="",this.applyQuickSearch()}applyQuickSearch(){this.dataSource.filter=this.quickSearchTerm?this.quickSearchTerm.trim().toLowerCase():"",this.dataSource.filterPredicate=(t,n)=>this.columns.some(o=>{const r=t[o];return null!=r&&String(r).toLowerCase().includes(n)})}formatCellValue(t){if(null==t)return"NULL";if("object"==typeof t)return JSON.stringify(t);if("boolean"==typeof t)return t?"true":"false";const n=String(t);return n.length>200?n.substring(0,200)+"...":n}static{this.\u0275fac=function(n){return new(n||i)(e.rXU(N),e.rXU(e.gRc),e.rXU(e.SKi))}}static{this.\u0275cmp=e.VBU({type:i,selectors:[["df-data-grid"]],viewQuery:function(n,o){if(1&n&&(e.GBs(V.iy,5),e.GBs(G.B4,5),e.GBs(U,5)),2&n){let r;e.mGM(r=e.lsd())&&(o.paginator=r.first),e.mGM(r=e.lsd())&&(o.sort=r.first),e.mGM(r=e.lsd())&&(o.schemaInfoComponent=r.first)}},inputs:{serviceName:"serviceName",tableName:"tableName",initialFilter:"initialFilter"},outputs:{tableNavigated:"tableNavigated"},standalone:!0,features:[e.OA$,e.aNF],decls:1,vars:1,consts:[["class","data-grid-container",4,"transloco","translocoScope"],[1,"data-grid-container"],[1,"grid-main"],[1,"grid-toolbar"],[1,"toolbar-left"],[1,"toolbar-icon",3,"icon"],[1,"table-title"],[1,"readonly-chip"],["disabled","","matTooltip","Data Explorer is currently read-only. Use the API call to build write operations."],[1,"lock-icon",3,"icon"],[1,"toolbar-right"],["class","quick-search","matTooltip","Search within the current page of results. Filters rows client-side across all visible columns.",4,"ngIf"],["mat-icon-button","","class","clear-filters-btn",3,"matTooltip","click",4,"ngIf"],["mat-icon-button","","matTooltip","Show the DreamFactory REST API call that matches your current view. Copy it to use in your own apps.",3,"click"],["mat-icon-button","","matTooltip","Show or hide columns in the grid",3,"matMenuTriggerFor"],[1,"column-menu"],["columnMenu","matMenu"],["class","column-menu-item",3,"click",4,"ngFor","ngForOf"],["mat-icon-button","","matTooltip","View column types, primary keys, foreign keys, and table relationships",3,"click"],["class","nav-filter-bar",4,"ngIf"],["class","top-pagination",4,"ngIf"],["class","api-call-bar",4,"ngIf"],["class","loading-state",4,"ngIf"],["class","error-state",4,"ngIf"],["class","empty-state",4,"ngIf"],["class","table-wrapper",3,"is-loading",4,"ngIf"],["class","grid-footer",4,"ngIf"],[3,"serviceName","tableName","closeClicked","navigateToTable",4,"ngIf"],[3,"row","schema","closeClicked","navigateToTable",4,"ngIf"],["matTooltip","Search within the current page of results. Filters rows client-side across all visible columns.",1,"quick-search"],[1,"search-icon"],[1,"search-input",3,"placeholder","value","input"],["class","search-clear",3,"click",4,"ngIf"],[1,"search-clear",3,"click"],["mat-icon-button","",1,"clear-filters-btn",3,"matTooltip","click"],["matBadgeColor","accent","matBadgeSize","small",3,"matBadge"],[1,"column-menu-item",3,"click"],[3,"checked","change"],[1,"nav-filter-bar"],[1,"nav-filter-icon"],[1,"nav-filter-text"],["mat-icon-button","","matTooltip","Remove navigation filter and show all records",1,"nav-filter-clear",3,"click"],[1,"top-pagination"],[1,"top-pagination-left"],["class","page-info",3,"matTooltip",4,"ngIf"],[1,"top-pagination-right"],[1,"page-size-label"],[1,"page-size-select",3,"value","change"],[3,"value",4,"ngFor","ngForOf"],[1,"page-nav"],["mat-icon-button","","matTooltip","First page",3,"disabled","click"],["mat-icon-button","","matTooltip","Previous page",3,"disabled","click"],[1,"page-label"],["mat-icon-button","","matTooltip","Next page",3,"disabled","click"],["mat-icon-button","","matTooltip","Last page",3,"disabled","click"],[1,"page-info",3,"matTooltip"],[3,"value"],[1,"api-call-bar"],[1,"api-call-desc"],[1,"api-call-top"],["matTooltip","HTTP method: GET retrieves records without modifying data",1,"api-method"],["matTooltip","Click to copy this URL",1,"api-url",3,"click"],["mat-icon-button","","matTooltip","Copy URL to clipboard",1,"copy-btn",3,"click"],[1,"api-call-options"],[1,"options-label"],[1,"api-option",3,"matTooltip"],["type","checkbox",3,"checked","change"],["matTooltip","include_count: Returns total record count in the response metadata",1,"api-option"],["class","api-call-related",4,"ngIf"],[1,"api-call-related"],["class","api-option",3,"matTooltip",4,"ngFor","ngForOf","ngForTrackBy"],[1,"loading-state"],["diameter","40"],[1,"error-state"],["color","warn"],["mat-stroked-button","","color","primary",3,"click"],[1,"empty-state"],[1,"table-wrapper"],[1,"table-scroll"],["mat-table","","matSort","",1,"data-table",3,"dataSource","matSortChange"],[3,"matColumnDef",4,"ngFor","ngForOf"],["mat-header-row","",4,"matHeaderRowDef","matHeaderRowDefSticky"],["mat-header-row","","class","filter-row",4,"matHeaderRowDef","matHeaderRowDefSticky"],["mat-row","","class","clickable-row","matTooltip","Click to view full record details",3,"selected-row","matTooltipShowDelay","click",4,"matRowDef","matRowDefColumns"],[3,"matColumnDef"],["mat-header-cell","","mat-sort-header","","class","header-cell",3,"width","min-width","max-width",4,"matHeaderCellDef"],["mat-cell","","class","data-cell",3,"width","min-width","max-width","null-cell","fk-cell",4,"matCellDef"],["mat-header-cell","","mat-sort-header","",1,"header-cell"],["class","pk-icon","matTooltip","Primary Key",4,"ngIf"],[1,"resize-handle",3,"mousedown"],["matTooltip","Primary Key",1,"pk-icon"],["mat-cell","",1,"data-cell"],["class","fk-link",3,"matTooltip","click",4,"ngIf"],[4,"ngIf"],[1,"fk-link",3,"matTooltip","click"],[1,"fk-nav-icon"],["mat-header-cell","","class","filter-cell",3,"width","min-width","max-width",4,"matHeaderCellDef"],["mat-header-cell","",1,"filter-cell"],[1,"filter-group"],[1,"filter-op",3,"value","change"],["class","filter-input",3,"placeholder","value","input",4,"ngIf"],[1,"filter-input",3,"placeholder","value","input"],["mat-header-row",""],["mat-header-row","",1,"filter-row"],["mat-row","","matTooltip","Click to view full record details",1,"clickable-row",3,"matTooltipShowDelay","click"],[1,"grid-footer"],["matTooltip","Total records matching current server-side filters",1,"footer-info"],["matTooltip","Use the column visibility button to show/hide columns",1,"footer-info"],[1,"footer-right"],["class","page-info-footer",4,"ngIf"],[1,"page-nav-footer"],["mat-icon-button","",1,"footer-btn",3,"disabled","click"],[1,"page-info-footer"],[3,"serviceName","tableName","closeClicked","navigateToTable"],[3,"row","schema","closeClicked","navigateToTable"]],template:function(n,o){1&n&&e.DNE(0,Ft,36,22,"div",0),2&n&&e.Y8G("translocoScope","dataExplorer")},dependencies:[f.bT,f.pM,C.YN,C.xH,C.y7,m.tP,m.Zl,m.tL,m.ji,m.cC,m.YV,m.iL,m.KS,m.$R,m.YZ,m.NB,V.Ou,G.NQ,G.B4,G.aE,u.D6,u.LG,_.m_,_.An,g.Hl,g.$z,g.iY,B.s5,b.YN,b.Jl,b.Jo,w.RG,$.fS,h.uc,h.oV,ge,_e,I.Cn,I.kk,I.Cp,A.g7,A.So,me.Ve,d.Q8,d.bA,d.Kj,v.dX,v.aY,U,Je],styles:['[_nghost-%COMP%]{position:absolute;inset:0;display:flex;flex-direction:column;overflow:hidden}.data-grid-container[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:row;overflow:hidden}.grid-main[_ngcontent-%COMP%]{flex:1;min-width:0;display:flex;flex-direction:column;overflow:hidden}.grid-toolbar[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:0 12px;height:49px;box-sizing:border-box;border-bottom:1px solid var(--df-border);background:var(--df-surface-2);flex-shrink:0}.grid-toolbar[_ngcontent-%COMP%] .toolbar-left[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px}.grid-toolbar[_ngcontent-%COMP%] .toolbar-left[_ngcontent-%COMP%] .toolbar-icon[_ngcontent-%COMP%]{color:var(--df-accent);font-size:16px}.grid-toolbar[_ngcontent-%COMP%] .toolbar-left[_ngcontent-%COMP%] .table-title[_ngcontent-%COMP%]{font-size:1.5rem;font-weight:600;letter-spacing:-.01em;color:var(--df-text)}.grid-toolbar[_ngcontent-%COMP%] .toolbar-left[_ngcontent-%COMP%] .readonly-chip[_ngcontent-%COMP%] .lock-icon[_ngcontent-%COMP%]{font-size:11px;margin-right:4px}.grid-toolbar[_ngcontent-%COMP%] .toolbar-right[_ngcontent-%COMP%]{display:flex;align-items:center;gap:2px}.grid-toolbar[_ngcontent-%COMP%] .toolbar-right[_ngcontent-%COMP%] button.active[_ngcontent-%COMP%]{color:var(--df-accent)}.grid-toolbar[_ngcontent-%COMP%] .toolbar-right[_ngcontent-%COMP%] .clear-filters-btn[_ngcontent-%COMP%]{color:var(--df-warning, var(--df-accent))}.column-menu-item[_ngcontent-%COMP%]{padding:4px 16px;font-size:13px}.top-pagination[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:2px 12px;border-bottom:1px solid var(--df-border);background:var(--df-surface-2);flex-shrink:0;font-size:12px;color:var(--df-text-muted)}.top-pagination[_ngcontent-%COMP%] .top-pagination-left[_ngcontent-%COMP%] .page-info[_ngcontent-%COMP%]{white-space:nowrap}.top-pagination[_ngcontent-%COMP%] .top-pagination-right[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px}.top-pagination[_ngcontent-%COMP%] .top-pagination-right[_ngcontent-%COMP%] .page-size-label[_ngcontent-%COMP%]{font-size:12px;display:flex;align-items:center;gap:4px}.top-pagination[_ngcontent-%COMP%] .top-pagination-right[_ngcontent-%COMP%] .page-size-label[_ngcontent-%COMP%] .page-size-select[_ngcontent-%COMP%]{border:1px solid var(--df-border);border-radius:var(--df-radius-sm);padding:2px 4px;font-size:12px;background:var(--df-surface);color:var(--df-text);outline:none;cursor:pointer}.top-pagination[_ngcontent-%COMP%] .top-pagination-right[_ngcontent-%COMP%] .page-nav[_ngcontent-%COMP%]{display:flex;align-items:center;gap:0}.top-pagination[_ngcontent-%COMP%] .top-pagination-right[_ngcontent-%COMP%] .page-nav[_ngcontent-%COMP%] .page-label[_ngcontent-%COMP%]{font-size:12px;padding:0 6px;white-space:nowrap}.top-pagination[_ngcontent-%COMP%] .top-pagination-right[_ngcontent-%COMP%] .page-nav[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{width:28px;height:28px;line-height:28px}.top-pagination[_ngcontent-%COMP%] .top-pagination-right[_ngcontent-%COMP%] .page-nav[_ngcontent-%COMP%] button[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:18px}.loading-state[_ngcontent-%COMP%], .error-state[_ngcontent-%COMP%], .empty-state[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px;padding:48px 24px;color:var(--df-text-muted);font-size:14px;flex:1}.table-wrapper[_ngcontent-%COMP%]{flex:1;min-height:0;overflow:hidden;position:relative}.table-wrapper.is-loading[_ngcontent-%COMP%]:after{content:"";position:absolute;top:0;left:0;right:0;height:3px;background:linear-gradient(90deg,transparent,var(--df-accent),transparent);animation:_ngcontent-%COMP%_loading-bar 1s infinite;z-index:10}@keyframes _ngcontent-%COMP%_loading-bar{0%{transform:translate(-100%)}to{transform:translate(100%)}}.table-scroll[_ngcontent-%COMP%]{height:100%;overflow:scroll;scrollbar-width:auto;scrollbar-color:var(--df-text-faint) var(--df-surface-2)}.table-scroll[_ngcontent-%COMP%]::-webkit-scrollbar{width:14px;height:14px}.table-scroll[_ngcontent-%COMP%]::-webkit-scrollbar-track{background:var(--df-surface-2)}.table-scroll[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background:var(--df-text-faint);border-radius:7px;border:3px solid var(--df-surface)}.table-scroll[_ngcontent-%COMP%]::-webkit-scrollbar-thumb:hover{background:var(--df-text-muted)}.table-scroll[_ngcontent-%COMP%]::-webkit-scrollbar-thumb:active{background:var(--df-text-2)}.table-scroll[_ngcontent-%COMP%]::-webkit-scrollbar-corner{background:var(--df-surface-2)}.data-table[_ngcontent-%COMP%]{width:max-content;min-width:100%}.data-table[_ngcontent-%COMP%] .header-cell[_ngcontent-%COMP%]{position:relative;flex:none;font-weight:600;font-size:11px;text-transform:uppercase;letter-spacing:.06em;color:var(--df-text-muted);background-color:var(--df-surface);background-image:linear-gradient(var(--df-surface-2),var(--df-surface-2));white-space:nowrap;padding:0 16px;border-right:1px solid var(--df-border);box-sizing:border-box}.data-table[_ngcontent-%COMP%] .header-cell[_ngcontent-%COMP%] .resize-handle[_ngcontent-%COMP%]{position:absolute;right:-7px;top:0;bottom:0;width:13px;cursor:col-resize;z-index:10}.data-table[_ngcontent-%COMP%] .header-cell[_ngcontent-%COMP%] .resize-handle[_ngcontent-%COMP%]:after{content:"";position:absolute;left:50%;transform:translate(-50%);top:20%;bottom:20%;width:2px;border-radius:1px;background:transparent;transition:background .15s}.data-table[_ngcontent-%COMP%] .header-cell[_ngcontent-%COMP%] .resize-handle[_ngcontent-%COMP%]:hover:after{background:var(--df-accent)}.data-table[_ngcontent-%COMP%] .header-cell[_ngcontent-%COMP%] .resize-handle[_ngcontent-%COMP%]:hover{background:var(--df-accent-soft)}.data-table[_ngcontent-%COMP%] .filter-cell[_ngcontent-%COMP%]{flex:none;padding:4px 8px;background-color:var(--df-surface);background-image:linear-gradient(var(--df-surface-2),var(--df-surface-2));border-right:1px solid var(--df-border);overflow:hidden;box-sizing:border-box}.data-table[_ngcontent-%COMP%] .filter-cell[_ngcontent-%COMP%] .filter-group[_ngcontent-%COMP%]{display:flex;gap:4px;align-items:center}.data-table[_ngcontent-%COMP%] .filter-cell[_ngcontent-%COMP%] .filter-op[_ngcontent-%COMP%]{flex-shrink:0;border:1px solid var(--df-border);border-radius:var(--df-radius-sm);padding:3px 4px;font-size:11px;background:var(--df-surface);color:var(--df-text);outline:none;cursor:pointer;max-width:90px}.data-table[_ngcontent-%COMP%] .filter-cell[_ngcontent-%COMP%] .filter-op[_ngcontent-%COMP%]:focus{border-color:var(--df-accent)}.data-table[_ngcontent-%COMP%] .filter-cell[_ngcontent-%COMP%] .filter-input[_ngcontent-%COMP%]{flex:1;min-width:0;border:1px solid var(--df-border);border-radius:var(--df-radius-sm);padding:4px 8px;font-size:12px;background:var(--df-surface);color:var(--df-text);outline:none;box-sizing:border-box}.data-table[_ngcontent-%COMP%] .filter-cell[_ngcontent-%COMP%] .filter-input[_ngcontent-%COMP%]:focus{border-color:var(--df-accent)}.data-table[_ngcontent-%COMP%] .filter-cell[_ngcontent-%COMP%] .filter-input[_ngcontent-%COMP%]::placeholder{color:var(--df-text-faint);font-style:italic}.data-table[_ngcontent-%COMP%] .data-cell[_ngcontent-%COMP%]{flex:none;font-size:1.3rem;padding:0 16px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;border-right:1px solid var(--df-border-2);color:var(--df-text);font-family:SFMono-Regular,Menlo,Consolas,monospace;box-sizing:border-box}.data-table[_ngcontent-%COMP%] .data-cell.null-cell[_ngcontent-%COMP%]{color:var(--df-text-faint);font-style:italic}.data-table[_ngcontent-%COMP%] tr.mat-mdc-row[_ngcontent-%COMP%]:hover{background:var(--df-hover)}.data-table[_ngcontent-%COMP%] tr.mat-mdc-row[_ngcontent-%COMP%]{height:44px}.data-table[_ngcontent-%COMP%] tr.clickable-row[_ngcontent-%COMP%]{cursor:pointer}.data-table[_ngcontent-%COMP%] tr.selected-row[_ngcontent-%COMP%]{background:var(--df-accent-soft)!important}.data-table[_ngcontent-%COMP%] tr.mat-mdc-header-row[_ngcontent-%COMP%]{height:40px}.data-table[_ngcontent-%COMP%] tr.filter-row[_ngcontent-%COMP%]{height:36px}.grid-footer[_ngcontent-%COMP%]{display:flex;align-items:center;gap:16px;padding:4px 12px;border-top:1px solid var(--df-border);background:var(--df-surface-2);flex-shrink:0;font-size:12px;color:var(--df-text-muted)}.grid-footer[_ngcontent-%COMP%] .footer-info[_ngcontent-%COMP%]{white-space:nowrap}.grid-footer[_ngcontent-%COMP%] .footer-right[_ngcontent-%COMP%]{margin-left:auto;display:flex;align-items:center;gap:8px}.grid-footer[_ngcontent-%COMP%] .footer-right[_ngcontent-%COMP%] .page-info-footer[_ngcontent-%COMP%]{white-space:nowrap}.grid-footer[_ngcontent-%COMP%] .footer-right[_ngcontent-%COMP%] .page-nav-footer[_ngcontent-%COMP%]{display:flex;align-items:center;gap:0}.grid-footer[_ngcontent-%COMP%] .footer-right[_ngcontent-%COMP%] .page-nav-footer[_ngcontent-%COMP%] .footer-btn[_ngcontent-%COMP%]{width:26px;height:26px;line-height:26px}.grid-footer[_ngcontent-%COMP%] .footer-right[_ngcontent-%COMP%] .page-nav-footer[_ngcontent-%COMP%] .footer-btn[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:18px}.quick-search[_ngcontent-%COMP%]{display:flex;align-items:center;background:var(--df-surface);border:1px solid var(--df-border);border-radius:var(--df-radius-sm);padding:0 6px;height:28px;gap:4px}.quick-search[_ngcontent-%COMP%] .search-icon[_ngcontent-%COMP%]{font-size:16px;width:16px;height:16px;color:var(--df-text-faint)}.quick-search[_ngcontent-%COMP%] .search-input[_ngcontent-%COMP%]{border:none;outline:none;background:transparent;font-size:12px;width:140px;color:var(--df-text)}.quick-search[_ngcontent-%COMP%] .search-input[_ngcontent-%COMP%]::placeholder{color:var(--df-text-faint)}.quick-search[_ngcontent-%COMP%] .search-clear[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;border:none;background:none;cursor:pointer;padding:0;color:var(--df-text-faint)}.quick-search[_ngcontent-%COMP%] .search-clear[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:14px;width:14px;height:14px}.quick-search[_ngcontent-%COMP%] .search-clear[_ngcontent-%COMP%]:hover{color:var(--df-text-2)}.api-call-bar[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:4px 12px;border-bottom:1px solid var(--df-border);background:var(--df-surface-2);flex-shrink:0;font-size:12px;overflow:hidden;gap:2px}.api-call-bar[_ngcontent-%COMP%] .api-call-desc[_ngcontent-%COMP%]{font-size:11px;color:var(--df-text-muted);line-height:1.4;padding:2px 0}.api-call-bar[_ngcontent-%COMP%] .api-call-top[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px}.api-call-bar[_ngcontent-%COMP%] .api-method[_ngcontent-%COMP%]{flex-shrink:0;font-weight:700;font-size:11px;color:var(--df-success);background:var(--df-success-soft);border:1px solid var(--df-success-border);padding:1px 6px;border-radius:var(--df-radius-sm);font-family:SFMono-Regular,Menlo,Consolas,monospace}.api-call-bar[_ngcontent-%COMP%] .api-url[_ngcontent-%COMP%]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:SFMono-Regular,Menlo,Consolas,monospace;font-size:12px;color:var(--df-text-2);cursor:pointer}.api-call-bar[_ngcontent-%COMP%] .api-url[_ngcontent-%COMP%]:hover{color:var(--df-accent-strong)}.api-call-bar[_ngcontent-%COMP%] .copy-btn[_ngcontent-%COMP%]{flex-shrink:0;width:24px;height:24px;line-height:24px}.api-call-bar[_ngcontent-%COMP%] .copy-btn[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:16px}.api-call-bar[_ngcontent-%COMP%] .api-call-options[_ngcontent-%COMP%], .api-call-bar[_ngcontent-%COMP%] .api-call-related[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:12px;padding-left:2px}.api-call-bar[_ngcontent-%COMP%] .api-call-options[_ngcontent-%COMP%] .options-label[_ngcontent-%COMP%], .api-call-bar[_ngcontent-%COMP%] .api-call-related[_ngcontent-%COMP%] .options-label[_ngcontent-%COMP%]{font-size:11px;color:var(--df-text-faint);font-weight:500}.api-call-bar[_ngcontent-%COMP%] .api-call-options[_ngcontent-%COMP%] .api-option[_ngcontent-%COMP%], .api-call-bar[_ngcontent-%COMP%] .api-call-related[_ngcontent-%COMP%] .api-option[_ngcontent-%COMP%]{display:flex;align-items:center;gap:4px;font-size:11px;color:var(--df-text-muted);font-family:SFMono-Regular,Menlo,Consolas,monospace;cursor:pointer;white-space:nowrap}.api-call-bar[_ngcontent-%COMP%] .api-call-options[_ngcontent-%COMP%] .api-option[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%], .api-call-bar[_ngcontent-%COMP%] .api-call-related[_ngcontent-%COMP%] .api-option[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]{width:12px;height:12px;margin:0;cursor:pointer;accent-color:var(--df-accent)}.pk-icon[_ngcontent-%COMP%]{font-size:14px;width:14px;height:14px;color:var(--df-accent);margin-right:2px;vertical-align:middle}.fk-cell[_ngcontent-%COMP%]{cursor:pointer!important}.fk-link[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:3px;color:var(--df-accent);text-decoration:none;cursor:pointer;transition:color .15s}.fk-link[_ngcontent-%COMP%]:hover{color:var(--df-accent-strong);text-decoration:underline}.fk-link[_ngcontent-%COMP%] .fk-nav-icon[_ngcontent-%COMP%]{font-size:12px;width:12px;height:12px;opacity:0;transition:opacity .15s}.fk-link[_ngcontent-%COMP%]:hover .fk-nav-icon[_ngcontent-%COMP%]{opacity:.7}.nav-filter-bar[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;padding:4px 12px;border-bottom:1px solid var(--df-border);background:var(--df-accent-soft);flex-shrink:0;font-size:12px;color:var(--df-text-2)}.nav-filter-bar[_ngcontent-%COMP%] .nav-filter-icon[_ngcontent-%COMP%]{font-size:16px;width:16px;height:16px;color:var(--df-accent)}.nav-filter-bar[_ngcontent-%COMP%] .nav-filter-text[_ngcontent-%COMP%]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.nav-filter-bar[_ngcontent-%COMP%] .nav-filter-text[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{font-family:SFMono-Regular,Menlo,Consolas,monospace;font-size:11px;background:var(--df-surface);border:1px solid var(--df-border-2);padding:1px 4px;border-radius:4px}.nav-filter-bar[_ngcontent-%COMP%] .nav-filter-clear[_ngcontent-%COMP%]{flex-shrink:0;width:24px;height:24px;line-height:24px;color:var(--df-accent)}.nav-filter-bar[_ngcontent-%COMP%] .nav-filter-clear[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:16px}.search-no-match[_ngcontent-%COMP%]{display:none!important}']})}}return i})();var Tt=c(19206);function wt(i,a){if(1&i){const t=e.RV6();e.qex(0),e.j41(1,"df-db-selector",7),e.bIt("databaseSelected",function(o){e.eBV(t);const r=e.XpG(2);return e.Njj(r.onDatabaseSelected(o))})("retry",function(){e.eBV(t);const o=e.XpG(2);return e.Njj(o.loadDatabases())}),e.k0s(),e.bVm()}if(2&i){const t=e.XpG(2);e.R7$(1),e.Y8G("databases",t.databases)("loading",t.loadingDbs)("error",t.errorDbs)}}function Gt(i,a){if(1&i){const t=e.RV6();e.qex(0),e.j41(1,"df-schema-tree",8),e.bIt("tableSelected",function(o){e.eBV(t);const r=e.XpG(2);return e.Njj(r.onTableSelected(o))})("backClicked",function(){e.eBV(t);const o=e.XpG(2);return e.Njj(o.onBackToDatabases())})("retry",function(){e.eBV(t);const o=e.XpG(2);return e.Njj(o.loadSchema(o.selectedDb.name))}),e.k0s(),e.bVm()}if(2&i){const t=e.XpG(2);e.R7$(1),e.Y8G("serviceName",t.selectedDb.name)("serviceLabel",t.selectedDb.name)("tables",t.tables)("loading",t.loadingSchema)("error",t.errorSchema)("selectedTable",t.selectedTable)}}function Rt(i,a){if(1&i&&(e.j41(0,"p"),e.EFF(1),e.k0s()),2&i){const t=e.XpG(2).$implicit;e.R7$(1),e.JRh(t("dataExplorer.selectDatabase"))}}function $t(i,a){if(1&i&&(e.j41(0,"p"),e.EFF(1),e.k0s()),2&i){const t=e.XpG(2).$implicit;e.R7$(1),e.JRh(t("dataExplorer.selectTable"))}}function Et(i,a){if(1&i&&(e.qex(0),e.j41(1,"div",9)(2,"mat-icon",10),e.EFF(3,"storage"),e.k0s(),e.j41(4,"h2"),e.EFF(5),e.k0s(),e.DNE(6,Rt,2,1,"p",5),e.DNE(7,$t,2,1,"p",5),e.k0s(),e.bVm()),2&i){const t=e.XpG().$implicit,n=e.XpG();e.R7$(5),e.JRh(t("dataExplorer.title")),e.R7$(1),e.Y8G("ngIf",!n.selectedDb),e.R7$(1),e.Y8G("ngIf",n.selectedDb)}}function jt(i,a){if(1&i){const t=e.RV6();e.qex(0),e.j41(1,"df-data-grid",11),e.bIt("tableNavigated",function(o){e.eBV(t);const r=e.XpG(2);return e.Njj(r.onTableNavigated(o))}),e.k0s(),e.bVm()}if(2&i){const t=e.XpG(2);e.R7$(1),e.Y8G("serviceName",t.selectedDb.name)("tableName",t.selectedTable.name)("initialFilter",t.pendingFilter)}}function It(i,a){if(1&i&&(e.j41(0,"div",1)(1,"mat-sidenav-container",2)(2,"mat-sidenav",3)(3,"div",4),e.DNE(4,wt,2,3,"ng-container",5),e.DNE(5,Gt,2,6,"ng-container",5),e.k0s()(),e.j41(6,"mat-sidenav-content",6),e.DNE(7,Et,8,3,"ng-container",5),e.DNE(8,jt,2,3,"ng-container",5),e.k0s()()()),2&i){const t=e.XpG();e.R7$(2),e.Y8G("fixedInViewport",!1),e.R7$(2),e.Y8G("ngIf",!t.selectedDb),e.R7$(1),e.Y8G("ngIf",t.selectedDb),e.R7$(2),e.Y8G("ngIf",!t.selectedTable),e.R7$(1),e.Y8G("ngIf",t.selectedTable&&t.selectedDb)}}let St=(()=>{class i{constructor(t,n,o,r){this.dataExplorerService=t,this.themeService=n,this.elementRef=o,this.ngZone=r,this.hostHeight=null,this.databases=[],this.tables=[],this.selectedDb=null,this.selectedTable=null,this.loadingDbs=!1,this.loadingSchema=!1,this.errorDbs=null,this.errorSchema=null,this.isDarkMode$=this.themeService.darkMode$,this.destroy$=new T.B,this.resizeObserver=null,this.resizeListener=()=>this.calculateHeight()}ngOnInit(){this.loadDatabases()}ngAfterViewInit(){this.calculateHeight(),window.addEventListener("resize",this.resizeListener),this.ngZone.runOutsideAngular(()=>{this.resizeObserver=new ResizeObserver(()=>{this.ngZone.run(()=>this.calculateHeight())});const t=this.elementRef.nativeElement.parentElement;t&&this.resizeObserver.observe(t)})}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete(),window.removeEventListener("resize",this.resizeListener),this.resizeObserver?.disconnect()}calculateHeight(){const n=this.elementRef.nativeElement.getBoundingClientRect();this.hostHeight=Math.floor(window.innerHeight-n.top)}loadDatabases(){this.loadingDbs=!0,this.errorDbs=null,this.dataExplorerService.getDatabaseServices().pipe((0,M.Q)(this.destroy$)).subscribe({next:t=>{this.databases=t,this.loadingDbs=!1},error:t=>{this.errorDbs=(0,R.cQ)(t).message,this.loadingDbs=!1}})}onDatabaseSelected(t){this.selectedDb=t,this.selectedTable=null,this.tables=[],this.loadSchema(t.name)}loadSchema(t){this.loadingSchema=!0,this.errorSchema=null,this.dataExplorerService.getSchema(t).pipe((0,M.Q)(this.destroy$)).subscribe({next:n=>{this.tables=n,this.loadingSchema=!1},error:n=>{this.errorSchema=(0,R.cQ)(n).message,this.loadingSchema=!1}})}onTableSelected(t){this.pendingFilter=void 0,this.selectedTable=t}onTableNavigated(t){const n=this.tables.find(o=>o.name===t.tableName);n&&(this.pendingFilter=t.filter,this.selectedTable?.name===n.name?(this.selectedTable=null,setTimeout(()=>this.selectedTable=n)):this.selectedTable=n)}onBackToDatabases(){this.selectedDb=null,this.selectedTable=null,this.pendingFilter=void 0,this.tables=[]}static{this.\u0275fac=function(n){return new(n||i)(e.rXU(N),e.rXU(Tt.n),e.rXU(e.aKT),e.rXU(e.SKi))}}static{this.\u0275cmp=e.VBU({type:i,selectors:[["df-data-explorer"]],hostVars:2,hostBindings:function(n,o){2&n&&e.xc7("height",o.hostHeight,"px")},standalone:!0,features:[e.aNF],decls:1,vars:1,consts:[["class","data-explorer-container",4,"transloco","translocoScope"],[1,"data-explorer-container"],[1,"explorer-sidenav-container"],["mode","side","opened","",1,"explorer-sidenav",3,"fixedInViewport"],[1,"sidenav-content"],[4,"ngIf"],[1,"explorer-content"],[3,"databases","loading","error","databaseSelected","retry"],[3,"serviceName","serviceLabel","tables","loading","error","selectedTable","tableSelected","backClicked","retry"],[1,"empty-state"],[1,"empty-icon"],[3,"serviceName","tableName","initialFilter","tableNavigated"]],template:function(n,o){1&n&&e.DNE(0,It,9,5,"div",0),2&n&&e.Y8G("translocoScope","dataExplorer")},dependencies:[f.bT,y.vg,y.LG,y.US,y.El,B.s5,_.m_,_.An,u.D6,d.Q8,d.bA,v.dX,te,de,yt],styles:["[_nghost-%COMP%]{display:block;overflow:hidden}.data-explorer-container[_ngcontent-%COMP%]{height:100%;display:flex;flex-direction:column;overflow:hidden}.explorer-sidenav-container[_ngcontent-%COMP%]{height:100%!important;min-height:0!important;max-height:100%!important;overflow:hidden!important} mat-sidenav-container.explorer-sidenav-container{height:100%!important;min-height:0!important;max-height:100%!important}.explorer-sidenav[_ngcontent-%COMP%]{width:280px;border-right:1px solid var(--df-border);background:var(--df-bg)}.sidenav-content[_ngcontent-%COMP%]{height:100%;overflow-y:auto}.explorer-content[_ngcontent-%COMP%]{background:var(--df-surface)} .mat-sidenav-content, .mat-drawer-content{height:100%!important;overflow:hidden!important;position:relative!important}.empty-state[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;color:var(--df-text-muted);text-align:center;padding:24px}.empty-state[_ngcontent-%COMP%] .empty-icon[_ngcontent-%COMP%]{font-size:64px;width:64px;height:64px;color:var(--df-text-faint);margin-bottom:16px}.empty-state[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{margin:0 0 8px;font-size:1.8rem;font-weight:600;letter-spacing:-.01em;color:var(--df-text)}.empty-state[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;font-size:1.4rem}"]})}}return i})()}}]); \ No newline at end of file diff --git a/dist/assets/i18n/dataExplorer/en.json b/dist/assets/i18n/dataExplorer/en.json index c08b23c0..919d727f 100644 --- a/dist/assets/i18n/dataExplorer/en.json +++ b/dist/assets/i18n/dataExplorer/en.json @@ -30,5 +30,7 @@ "recordDetail": "Record Detail", "nullValue": "NULL", "showApiCall": "Show API Call", - "quickSearch": "Search rows..." + "quickSearch": "Search rows...", + "searchDatabases": "Search databases", + "noMatches": "No databases match" } diff --git a/dist/index.html b/dist/index.html index c2f368f9..74e09017 100644 --- a/dist/index.html +++ b/dist/index.html @@ -10,5 +10,5 @@