"use strict";(self.webpackChunk_infuseai_piperider_ui=self.webpackChunk_infuseai_piperider_ui||[]).push([[844],{1844:function(e,n,t){t.r(n),t.d(n,{default:function(){return C}});var l=t(1431),i=t(7615),r=t(9355),a=t(2904),o=t(1756),s=t(4657),c=t(7255),u=t(2471),d=t(7708),m=t(7437),x=t(4641),h=t(4732),b=t(962),j=t(5607),p=t(6062),f=t(2282),g=t(8685),v=t(421),S=t(3015),y=t(5887);function C(e){var n,t=e.data,C=e.columnName,w=e.tableName;(0,g.jr)("Single Report: Table Column Details"),(0,g.Lp)({eventName:g.mk.PAGE_VIEW,eventProperties:{type:g.ll,page:"column-details-page"}});var T=(0,a.TH)(),O=(0,l.Z)(T,2)[1],R=(0,o.useState)(0),P=(0,l.Z)(R,2),D=P[0],N=P[1],_=(0,s.Z)(g.gA,""),k=(0,l.Z)(_,1)[0],A=(0,o.useState)(Boolean(k)),E=(0,l.Z)(A,2),H=E[0],Z=E[1];(0,S.n)((function(e){return e.setReportRawData}))({base:t});var F=S.n.getState(),L=F.tableColumnsOnly,B=void 0===L?[]:L,I=F.assertionsOnly,K=B.find((function(e){return(0,l.Z)(e,1)[0]===w})),M=0===C.length,Q=t.tables[w],W=Q.columns[C],Y=(0,g.SR)((null===I||void 0===I||null===(n=I.base)||void 0===n?void 0:n.filter((function(e){return(null===e||void 0===e?void 0:e.table)===w})))||[]),G=Y.failed,z=Y.total,J=W||{},V=J.type,q=J.histogram,U=J.schema_type,X=(0,p.MM)(W),$=X.backgroundColor,ee=X.icon;if(!w||!Q||!K)return(0,y.jsx)(c.o,{isSingleReport:!0,children:(0,y.jsx)(j.J,{text:"No profile data found for table name: ".concat(w)})});var ne=(0,p.hG)(V);return(0,y.jsx)(c.o,{isSingleReport:!0,maxHeight:m.t4,children:(0,y.jsxs)(i.rj,{width:"inherit",templateColumns:H?m.L0:m.Lj,children:[(0,y.jsx)(i.P4,{overflowY:"scroll",maxHeight:m.t4,children:(0,y.jsx)(h._,{tableColEntryList:B,tableColEntry:K,currentTable:w,currentColumn:C,onSelect:function(e){var n=e.tableName,t=e.columnName;N(0),O("/tables/".concat(n,"/columns/").concat(t))},onNavBack:function(){O("/")},onNavToTableDetail:function(e){O("/tables/".concat(e,"/columns/"))},onToggleShowExtra:function(){return Z((function(e){return!e}))},singleOnly:!0})}),M?(0,y.jsxs)(i.P4,{maxHeight:m.t4,overflowY:"auto",p:10,children:[(0,y.jsx)(v.Q,{title:Q.name,subtitle:"Table",infoTip:Q.description,mb:5}),(0,y.jsxs)(r.mQ,{mt:3,defaultIndex:0,children:[(0,y.jsxs)(r.td,{children:[(0,y.jsx)(r.OK,{children:"Overview"}),(0,y.jsx)(r.OK,{children:"Assertions"}),(0,y.jsx)(r.OK,{children:"Schema"})]}),(0,y.jsxs)(r.nP,{children:[(0,y.jsx)(r.x4,{children:(0,y.jsx)(i.rj,{templateColumns:"1fr 1fr",gap:3,children:(0,y.jsx)(f.m,{tableDatum:Q})})}),(0,y.jsxs)(r.x4,{children:[Number(z)>0&&(0,y.jsx)(i.kC,{mb:5,children:(0,y.jsx)(g.FC,{total:z,failed:G})}),(0,y.jsx)(g.Ox,{filterString:Q.name,filterByTableOnly:!0,caseSensitiveFilter:!0,comparableAssertions:I,singleOnly:!0,tableSize:"sm"})]}),(0,y.jsx)(r.x4,{children:(0,y.jsx)(g.rH,{baseTableEntryDatum:null===K||void 0===K?void 0:K[1].base,singleOnly:!0})})]})]})]}):(0,y.jsxs)(i.rj,{templateColumns:"1fr 1fr",templateRows:"8em 1fr 1fr ".concat(ne?"1fr":""),gridAutoFlow:"column",width:"100%",pb:5,maxHeight:m.t4,overflowY:"auto",children:[(0,y.jsx)(i.P4,{colSpan:2,p:9,children:(0,y.jsx)(v.Q,{title:C,subtitle:U,infoTip:null===W||void 0===W?void 0:W.description,icon:ee,iconColor:$,mb:5})}),(0,y.jsx)(i.P4,{colSpan:1,px:10,bg:"gray.50",borderRight:m.dx,children:(0,y.jsx)(u.t,{columnDatum:W,hasAnimation:!0})}),(0,y.jsx)(i.P4,{gridRow:"auto",px:10,bg:"gray.50",borderRight:m.dx,children:(0,p.jl)(V)&&(0,y.jsx)(y.Fragment,{children:(0,y.jsx)(b.E,{columnDatum:W})})}),ne&&q&&(0,y.jsx)(i.P4,{bg:"gray.50",minWidth:"1px",borderRight:m.dx,p:10,children:(0,y.jsx)(x.M,{columnDatum:W})}),(0,y.jsx)(i.P4,{colSpan:1,rowSpan:ne?3:2,minWidth:0,px:10,bg:"gray.50",children:(0,y.jsx)(d.r,{baseColumnDatum:W,hasAnimation:!0,tabIndex:D,onSelectTab:function(e){return N(e)}})})]})]})})}}}]);
//# sourceMappingURL=844.40c357a4.chunk.js.map