All Downloads are FREE. Search and download functionalities are using the official Maven repository.

assets.2149.dc0f7cc6f9af6c7de535.js Maven / Gradle / Ivy

There is a newer version: 1.6.1
Show newest version
"use strict";(self.webpackChunkopen_metadata=self.webpackChunkopen_metadata||[]).push([[2149,2709,7505,908,6146,4477],{42709:function(e,t,n){n.r(t),n.d(t,{ReactComponent:function(){return o}});var a,i,l,r=n(67294);function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t-1?t(n.filter((function(e){return e!==i}))):t((0,a.ev)((0,a.ev)([],(0,a.CR)(n)),[i])),o()};return s.createElement(i.Z,{items:null==u?void 0:u.map((function(e){return{key:e.value,label:s.createElement(l.default,{checked:n.indexOf(e.value)>-1,value:e.value,onChange:c},(0,r.startCase)(e.text))}}))})}},61289:function(e,t,n){var a=n(19650),i=n(67294),l=n(68432),r=n(38780),s=n(24135),o=n(62761),u=n(58369),c=n(81787);t.Z=function(e){var t=e.index,n=e.columnData,d=e.entityFqn,m=e.isReadOnly,p=e.onClick,M=e.entityType,g=e.hasEditPermission,y=e.onThreadLinkSelect,E=(0,l.$)().t;return i.createElement(a.Z,{className:"hover-icon-group","data-testid":"description",direction:"vertical",id:"field-description-"+t},n.field?i.createElement(s.Z,{markdown:n.field}):i.createElement("span",{className:"text-grey-muted"},E("label.no-entity",{entity:E("label.description")})),m?null:i.createElement(a.Z,{align:"baseline",size:"middle"},g&&i.createElement(r.ReactComponent,{className:"cursor-pointer hover-cell-icon","data-testid":"edit-button",height:14,name:E("label.edit"),style:{color:o.MJ},width:14,onClick:p}),i.createElement(c.Z,{data:n,entityFqn:d,entityTaskType:u.Sn.DESCRIPTION,entityType:M,onThreadLinkSelect:y})))}},55608:function(e,t,n){var a=n(70655),i=n(94184),l=n.n(i),r=n(96486),s=n(67294),o=n(24854),u=n(58369),c=n(81787);t.Z=function(e){var t,n,i=e.tags,d=e.record,m=e.index,p=e.type,M=e.entityFqn,g=e.isReadOnly,y=e.hasTagEditAccess,E=e.showInlineEditTagButton,f=e.onThreadLinkSelect,N=e.handleTagSelection,v=e.entityType;return s.createElement("div",{className:"hover-icon-group","data-testid":(0,r.lowerCase)(p)+"-tags-"+m},s.createElement("div",{className:l()("d-flex justify-content flex-col items-start"),"data-testid":"tags-wrapper"},s.createElement(o.Z,{showBottomEditButton:!0,permission:y&&!g,selectedTags:i,showHeader:!1,showInlineEditButton:E,tagType:p,onSelectionChange:function(e){return(0,a.mG)(void 0,void 0,void 0,(function(){return(0,a.Jh)(this,(function(t){switch(t.label){case 0:return[4,N(e,d)];case 1:return t.sent(),[2]}}))}))}},s.createElement(s.Fragment,null,!g&&s.createElement(c.Z,{data:{fqn:null!==(t=d.fullyQualifiedName)&&void 0!==t?t:"",field:null!==(n=d.tags)&&void 0!==n?n:[]},entityFqn:M,entityTaskType:u.Sn.TAGS,entityType:v,tagSource:p,onThreadLinkSelect:f})))))}},42290:function(e,t,n){var a=n(70655),i=n(56256),l=n(67294),r=n(68432),s=n(24854),o=n(78754),u=n(90058),c=n(73553);t.Z=function(e){var t=e.tags,n=void 0===t?[]:t,d=e.editable,m=e.onTagsUpdate,p=e.isVersionView,M=(0,r.$)().t;return l.createElement("div",{className:"tags-input-container","data-testid":"tags-input-container"},p?l.createElement(l.Fragment,null,l.createElement("div",null,l.createElement(i.Z.Text,{className:"right-panel-label"},M("label.tag-plural"))),l.createElement(o.Z,{sizeCap:-1,tags:n})):l.createElement(s.Z,{permission:d,selectedTags:n?(0,a.ev)([],(0,a.CR)(n.map((function(e){return(0,a.pi)((0,a.pi)({},e),{isRemovable:!1})})))):[],showTaskHandler:!1,tagType:u.c6.Classification,onSelectionChange:function(e){return(0,a.mG)(void 0,void 0,void 0,(function(){var t;return(0,a.Jh)(this,(function(n){switch(n.label){case 0:return t=(0,c.eY)(e),m?[4,m(t)]:[3,2];case 1:n.sent(),n.label=2;case 2:return[2]}}))}))}}))}},43633:function(e,t,n){var a=n(70655),i=n(71577),l=n(94199),r=n(19650),s=n(56256),o=n(23031),u=n(96486),c=n(67294),d=n(15137),m=n(96605),p=n(90386),M=n(38780),g=n(7873),y=n(99886),E=n(62761),f=n(58369),N=n(31615),v=n(93895),h=n(24671),I=n(86385),L=n(46321),b=n(59136),S=n(24135);t.Z=function(e){var t=e.className,n=e.header,T=e.hasEditAccess,j=e.onDescriptionEdit,C=e.description,A=void 0===C?"":C,D=e.isEdit,w=e.onCancel,Z=e.onDescriptionUpdate,x=e.isReadOnly,O=void 0!==x&&x,z=e.removeBlur,R=void 0!==z&&z,k=e.entityName,U=e.entityFieldThreads,Y=e.onThreadLinkSelect,P=e.entityType,Q=e.entityFqn,G=e.entityFieldTasks,V=e.reduceDescription,B=(0,d.k6)(),H=null==U?void 0:U[0],F=null==G?void 0:G[0],W=function(){B.push((0,I.Ub)(P,Q))},J=function(){B.push((0,I.L6)(P,Q))},_=function(){j&&j()},q=function(){var e=Boolean(A.trim());return I.GZ.includes(P)?c.createElement(i.Z,{className:"w-7 h-7 p-0 flex-center","data-testid":"request-entity-description",type:"text",onClick:e?J:W},c.createElement(l.Z,{placement:"right",title:e?(0,o.t)("message.request-update-description"):(0,o.t)("message.request-description")},c.createElement(g.ReactComponent,(0,a.pi)({name:(0,o.t)("message.request-description")},E.K$)))):null},X=function(e){var t=e.descriptionThread;return(0,u.isUndefined)(t)?c.createElement(c.Fragment,null,(null==A?void 0:A.trim())&&Y?c.createElement(i.Z,{className:"w-7 h-7 link-text p-0 flex-center","data-testid":"start-description-thread",icon:c.createElement(m.ReactComponent,(0,a.pi)({},E.K$,{name:"comments"})),type:"text",onClick:function(){return null==Y?void 0:Y((0,h.ec)(P,Q,f.Sn.DESCRIPTION))}}):null):c.createElement(i.Z,{className:"w-9 h-7 p-0","data-testid":"description-thread",type:"text",onClick:function(){return null==Y?void 0:Y(t.entityLink)}},c.createElement(r.Z,{align:"center",className:"h-full",size:2},c.createElement(p.ReactComponent,(0,a.pi)({},E.K$,{name:"tasks"})),c.createElement(s.Z.Text,{"data-testid":"description-thread-count"},t.count)))};return c.createElement("div",{className:"schema-description relative "+t},c.createElement(r.Z,{align:"end",className:"description-inner-main-container",size:4},c.createElement("div",{className:"relative"},c.createElement("div",{className:"description h-full relative overflow-y-scroll","data-testid":"description",id:"center"},(null==A?void 0:A.trim())?c.createElement(S.Z,{className:V?"max-two-lines":"",enableSeeMoreVariant:!R,markdown:A}):c.createElement("span",{className:"text-grey-muted p-y-xs"},(0,o.t)("label.no-entity",{entity:(0,o.t)("label.description")})))),c.createElement((function(){return O?null:c.createElement(r.Z,{align:"end",size:0},T&&c.createElement(i.Z,{className:"w-7 h-7 p-0 flex-center","data-testid":"edit-description",icon:c.createElement(M.ReactComponent,(0,a.pi)({color:E.MJ},E.K$)),type:"text",onClick:_}),(0,v.nq)(P)?c.createElement(c.Fragment,null,c.createElement(q,null),(0,u.isUndefined)(F)?null:c.createElement(i.Z,{className:"w-9 h-7 p-0","data-testid":"description-task",type:"text",onClick:function(){return null==Y?void 0:Y(F.entityLink,N.Th.Task)}},c.createElement(r.Z,{align:"center",className:"h-full",size:2},c.createElement(y.ReactComponent,(0,a.pi)({},E.K$,{name:"tasks"})),c.createElement(s.Z.Text,{"data-testid":"description-tasks-count"},F.count)))):null,c.createElement(X,{descriptionThread:H}))}),null)),c.createElement(b.p,{header:n||(0,o.t)("label.edit-description-for",{entityName:k}),placeholder:(0,o.t)("label.enter-entity",{entity:(0,o.t)("label.description")}),value:A,visible:Boolean(D),onCancel:w,onSave:function(e){return(0,a.mG)(void 0,void 0,void 0,(function(){var t;return(0,a.Jh)(this,(function(n){switch(n.label){case 0:if(!Z||!(0,u.isFunction)(Z))return[3,4];n.label=1;case 1:return n.trys.push([1,3,,4]),[4,Z(e)];case 2:return n.sent(),w&&w(),[3,4];case 3:return t=n.sent(),(0,L.Eo)(t),[3,4];case 4:return[2]}}))}))}}))}},46600:function(e,t,n){n.d(t,{Z:function(){return D}});var a=n(91894),i=n(19650),l=n(60331),r=n(71577),s=n(94184),o=n.n(s),u=n(96486),c=n(67294),d=n(68432),m=n(51297),p=n(27914),M=n(97010),g=n(95549),y=n(93379),E=n.n(y),f=n(7795),N=n.n(f),v=n(90569),h=n.n(v),I=n(3565),L=n.n(I),b=n(19216),S=n.n(b),T=n(44589),j=n.n(T),C=n(71999),A={};A.styleTagTransform=j(),A.setAttributes=L(),A.insert=h().bind(null,"head"),A.domAPI=N(),A.insertStyleElement=S(),E()(C.Z,A),C.Z&&C.Z.locals&&C.Z.locals;var D=function(e){var t=e.title,n=e.sqlQuery,s=(0,d.$)().t,y=(0,c.useMemo)((function(){var e=(0,u.split)(n,"\n").length;return{queryLine:e+" "+s(e>1?"label.line-plural":"label.line"),lineCount:e}}),[n]),E=y.queryLine,f=y.lineCount,N=(0,M.V)(n).onCopyToClipBoard;return c.createElement(a.Z,{className:"m-md w-auto dbt-tab-container",extra:c.createElement(i.Z,{className:"m-y-xs"},c.createElement(l.Z,{className:"query-lines","data-testid":"query-line"},E),c.createElement(r.Z,{className:"flex-center button-size bg-white","data-testid":"query-entity-copy-button",icon:c.createElement(m.ReactComponent,{height:16,width:16}),onClick:N})),title:t},c.createElement(g.Z,{className:"custom-code-mirror-theme",editorClass:o()(f>4?"table-query-editor":"query-editor"),mode:{name:p.Q.SQL},options:{readOnly:!0},value:n}))}},43104:function(e,t,n){n.d(t,{j:function(){return i}});var a=n(74475),i={ADVANCE_SEARCH:{header:a.Z.t("label.advanced-search"),subHeader:a.Z.t("message.page-sub-header-for-advanced-search")},TABLE_PROFILE:{header:a.Z.t("label.table-profile"),subHeader:a.Z.t("message.page-sub-header-for-table-profile")},DATA_QUALITY:{header:a.Z.t("label.data-quality"),subHeader:a.Z.t("message.page-sub-header-for-data-quality")},COLUMN_PROFILE:{header:a.Z.t("label.column-profile"),subHeader:a.Z.t("message.page-sub-header-for-column-profile")},ADMIN:{header:a.Z.t("label.admin-plural"),subHeader:a.Z.t("message.page-sub-header-for-admins")},USERS:{header:a.Z.t("label.user-plural"),subHeader:a.Z.t("message.page-sub-header-for-users")},PERSONAS:{header:a.Z.t("label.persona-plural"),subHeader:a.Z.t("message.page-sub-header-for-persona")},TEAMS:{header:a.Z.t("label.team-plural"),subHeader:a.Z.t("message.page-sub-header-for-teams")},ROLES:{header:a.Z.t("label.role-plural"),subHeader:a.Z.t("message.page-sub-header-for-roles")},POLICIES:{header:a.Z.t("label.policy-plural"),subHeader:a.Z.t("message.page-sub-header-for-policies")},DATABASES_SERVICES:{header:a.Z.t("label.database-plural"),subHeader:a.Z.t("message.page-sub-header-for-databases")},MESSAGING_SERVICES:{header:a.Z.t("label.messaging"),subHeader:a.Z.t("message.page-sub-header-for-messagings")},DASHBOARD_SERVICES:{header:a.Z.t("label.dashboard-plural"),subHeader:a.Z.t("message.page-sub-header-for-dashboards")},PIPELINES_SERVICES:{header:a.Z.t("label.pipeline-plural"),subHeader:a.Z.t("message.page-sub-header-for-pipelines")},ML_MODELS_SERVICES:{header:a.Z.t("label.ml-model-plural"),subHeader:a.Z.t("message.page-sub-header-for-ml-models")},METADATA_SERVICES:{header:a.Z.t("label.metadata-plural"),subHeader:a.Z.t("message.page-sub-header-for-metadata")},STORAGE_SERVICES:{header:a.Z.t("label.storage-plural"),subHeader:a.Z.t("message.page-sub-header-for-storages")},SEARCH_SERVICES:{header:a.Z.t("label.search"),subHeader:a.Z.t("message.page-sub-header-for-search")},ACTIVITY_FEED:{header:a.Z.t("label.activity-feed"),subHeader:a.Z.t("message.page-sub-header-for-activity-feed")},TABLES_CUSTOM_ATTRIBUTES:{header:a.Z.t("label.table-plural"),subHeader:a.Z.t("message.define-custom-property-for-entity",{entity:a.Z.t("label.table-plural")})},TOPICS_CUSTOM_ATTRIBUTES:{header:a.Z.t("label.topic-plural"),subHeader:a.Z.t("message.define-custom-property-for-entity",{entity:a.Z.t("label.topic-plural")})},DASHBOARD_CUSTOM_ATTRIBUTES:{header:a.Z.t("label.dashboard-plural"),subHeader:a.Z.t("message.define-custom-property-for-entity",{entity:a.Z.t("label.dashboard-plural")})},PIPELINES_CUSTOM_ATTRIBUTES:{header:a.Z.t("label.pipeline-plural"),subHeader:a.Z.t("message.define-custom-property-for-entity",{entity:a.Z.t("label.pipeline-plural")})},ML_MODELS_CUSTOM_ATTRIBUTES:{header:a.Z.t("label.ml-model-plural"),subHeader:a.Z.t("message.define-custom-property-for-entity",{entity:a.Z.t("label.ml-model-plural")})},CONTAINER_CUSTOM_ATTRIBUTES:{header:a.Z.t("label.container-plural"),subHeader:a.Z.t("message.define-custom-property-for-entity",{entity:a.Z.t("label.container-plural")})},STORED_PROCEDURE_CUSTOM_ATTRIBUTES:{header:a.Z.t("label.stored-procedure-plural"),subHeader:a.Z.t("message.define-custom-property-for-entity",{entity:a.Z.t("label.stored-procedure-plural")})},SEARCH_INDEX_CUSTOM_ATTRIBUTES:{header:a.Z.t("label.search-index-plural"),subHeader:a.Z.t("message.define-custom-property-for-entity",{entity:a.Z.t("label.search-index-plural")})},GLOSSARY_TERM_CUSTOM_ATTRIBUTES:{header:a.Z.t("label.glossary-term"),subHeader:a.Z.t("message.define-custom-property-for-entity",{entity:a.Z.t("label.glossary-term")})},DATABASE_CUSTOM_ATTRIBUTES:{header:a.Z.t("label.database"),subHeader:a.Z.t("message.define-custom-property-for-entity",{entity:a.Z.t("label.database")})},DATABASE_SCHEMA_CUSTOM_ATTRIBUTES:{header:a.Z.t("label.database-schema"),subHeader:a.Z.t("message.define-custom-property-for-entity",{entity:a.Z.t("label.database-schema")})},BOTS:{header:a.Z.t("label.bot-plural"),subHeader:a.Z.t("message.page-sub-header-for-bots")},APPLICATION:{header:a.Z.t("label.extend-open-meta-data"),subHeader:a.Z.t("message.application-to-improve-data")},CUSTOM_PAGE:{header:a.Z.t("label.customize-entity",{entity:a.Z.t("label.landing-page")}),subHeader:a.Z.t("message.page-sub-header-for-customize-landing-page")}}},79317:function(e,t,n){n.d(t,{K:function(){return i},c:function(){return l}});var a=n(80307),i={x:1200},l=[a.a.ForeignKey,a.a.PrimaryKey]},36775:function(e,t,n){var a,i,l,r,s;n.d(t,{c6:function(){return l}}),function(e){e.Array="ARRAY",e.Boolean="BOOLEAN",e.Bytes="BYTES",e.Date="DATE",e.Double="DOUBLE",e.Enum="ENUM",e.Error="ERROR",e.Fixed="FIXED",e.Float="FLOAT",e.Int="INT",e.Long="LONG",e.Map="MAP",e.Null="NULL",e.Record="RECORD",e.String="STRING",e.Time="TIME",e.Timestamp="TIMESTAMP",e.Timestampz="TIMESTAMPZ",e.Union="UNION",e.Unknown="UNKNOWN"}(a||(a={})),function(e){e.Automated="Automated",e.Derived="Derived",e.Manual="Manual",e.Propagated="Propagated"}(i||(i={})),function(e){e.Classification="Classification",e.Glossary="Glossary"}(l||(l={})),function(e){e.Confirmed="Confirmed",e.Suggested="Suggested"}(r||(r={})),function(e){e.Avro="Avro",e.JSON="JSON",e.None="None",e.Other="Other",e.Protobuf="Protobuf"}(s||(s={}))},52149:function(e,t,n){n.r(t),n.d(t,{default:function(){return Kn}});var a=n(70655),i=n(71230),l=n(15746),r=n(19650),s=n(56256),o=n(25499),u=n(94184),c=n.n(u),d=n(34901),m=n(96486),p=n(67294),M=n(68432),g=n(15137),y=n(33994),E=n(75642),f=n(19521),N=n(3460),v=n(58603),h=n(76597),I=n(113),L=n(83716),b=n(46600),S=n(40040),T=n(33873),j=n(16177),C=n(69523),A=n(80646),D=n(8752),w=n(79839),Z=n(13013),x=n(94199),O=n(71577),z=n(25213),R=n(23031),k=n(8645),U=n(96071),Y=n(14128),P=n(50922),Q=n(83815),G=n(92693),V=n(32337),B=n(71225),H=n(61105),F=n(64632),W=n(68430),J=n(77427),_=n(93895),q=n(46321),X=n(50146),K=n(95549),$=n(86931),ee=n(93379),te=n.n(ee),ne=n(7795),ae=n.n(ne),ie=n(90569),le=n.n(ie),re=n(3565),se=n.n(re),oe=n(19216),ue=n.n(oe),ce=n(44589),de=n.n(ce),me=n(42635),pe={};pe.styleTagTransform=de(),pe.setAttributes=se(),pe.insert=le().bind(null,"head"),pe.domAPI=ae(),pe.insertStyleElement=ue(),te()(me.Z,pe),me.Z&&me.Z.locals&&me.Z.locals;var Me=function(e){var t=e.className,n=e.onClose,i=e.data,l=e.visible,r=(0,a.CR)((0,p.useState)(i),2),o=r[0],u=r[1];return(0,p.useEffect)((function(){u((0,m.clone)(i))}),[i,l]),p.createElement(X.Z,{centered:!0,destroyOnClose:!0,className:c()("schema-modal",t),closeIcon:p.createElement($.Z,{dataTestId:"schema-modal-close-button",handleCancel:n}),"data-testid":"schema-modal",footer:null,maskClosable:!1,open:l,title:p.createElement(s.Z.Text,{strong:!0,"data-testid":"schema-modal-header"},(0,R.t)("label.json-data")),width:800,onCancel:n},p.createElement("div",{"data-testid":"schema-modal-body"},p.createElement(K.Z,{className:"schema-editor",editorClass:"custom-entity-schema",value:o})))},ge=function(e){var t,n=e.data,i=(0,a.CR)((0,p.useState)(!1),2),l=i[0],r=i[1];return p.createElement(p.Fragment,null,n?"object"==typeof(t=n)?p.createElement("p",{className:"w-52 truncate cursor-pointer","data-testid":"json-object",onClick:function(){return r(!0)}},JSON.stringify(t)):p.createElement("p",{"data-testid":"string-data"},t.toString()):p.createElement("p",{"data-testid":"empty-data"},"--"),l&&p.createElement(Me,{data:n,visible:l,onClose:function(){return r(!1)}}))},ye=n(94542),Ee={};Ee.styleTagTransform=de(),Ee.setAttributes=se(),Ee.insert=le().bind(null,"head"),Ee.domAPI=ae(),Ee.insertStyleElement=ue(),te()(ye.Z,Ee),ye.Z&&ye.Z.locals&&ye.Z.locals;var fe=(0,W.F)((function(e){var t=e.isTableDeleted,n=e.tableId,i=e.ownerId,l=e.permissions,o=(0,Q.Fb)().isTourPage,u=(0,v.Eu)().currentUser,d=(0,a.CR)((0,p.useState)(),2),M=d[0],g=d[1],y=(0,a.CR)((0,p.useState)(!0),2),E=y[0],f=y[1],N=(0,a.CR)((0,p.useState)(!1),2),h=N[0],I=N[1],b=(0,a.CR)((0,p.useState)(H.Vu.INITIAL),2),S=b[0],T=b[1],j=(0,a.CR)((0,p.useState)(!1),2),A=j[0],D=j[1],w=(0,p.useMemo)((function(){return l.EditAll||l.EditSampleData||(null==u?void 0:u.id)===i}),[i,l,u]),W=(0,p.useCallback)((function(){return I((function(e){return!e}))}),[]),X=function(e){var t,n,a=e.sampleData,i=e.columns,l=null===(t=null==a?void 0:a.columns)||void 0===t?void 0:t.map((function(e){var t,n,a=i.find((function(t){return t.name===e}));return{name:e,dataType:null!==(t=null==a?void 0:a.dataType)&&void 0!==t?t:"",title:p.createElement(r.Z,{direction:"vertical",size:0},p.createElement(s.Z.Text,null," ",e),(null==a?void 0:a.dataType)&&p.createElement(s.Z.Text,{className:"text-grey-muted text-xs font-normal"},"("+(0,m.lowerCase)(null!==(n=null==a?void 0:a.dataType)&&void 0!==n?n:"")+")")),dataIndex:e,key:e,accessor:e,render:function(e){return p.createElement(ge,{data:e})}}})),o=(null!==(n=null==a?void 0:a.rows)&&void 0!==n?n:[]).map((function(e){var t,n={};return(null!==(t=null==a?void 0:a.columns)&&void 0!==t?t:[]).forEach((function(t,a){n[t]=e[a]})),n}));return{columns:l,rows:o}},K=function(){return(0,a.mG)(void 0,void 0,void 0,(function(){var e,t;return(0,a.Jh)(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,3,4]),[4,(0,J.aW)(n)];case 1:return e=a.sent(),g(X(e)),[3,4];case 2:return t=a.sent(),(0,q.Eo)(t),[3,4];case 3:return f(!1),[7];case 4:return[2]}}))}))},$=[{label:p.createElement(Y.v,{description:(0,R.t)("message.delete-entity-type-action-description",{entityType:(0,R.t)("label.sample-data")}),icon:p.createElement(k.ReactComponent,(0,a.pi)({className:"m-t-xss"},V.$,{name:"Delete"})),id:"delete-button",name:(0,R.t)("label.delete")}),key:"delete-button",onClick:function(e){e.domEvent.stopPropagation(),D(!1),W()}}];return(0,p.useEffect)((function(){f(!0),t||!n||o?f(!1):K(),o&&g(X({columns:B.cb.tableDetails.columns,sampleData:B.cb.sampleData}))}),[n]),E?p.createElement(C.Z,null):(0,m.isEmpty)(null==M?void 0:M.rows)&&(0,m.isEmpty)(null==M?void 0:M.columns)?p.createElement(L.Z,{className:"error-placeholder"},p.createElement(s.Z.Paragraph,null,p.createElement(_.u1,{i18nKey:"message.view-sample-data-entity",renderElement:p.createElement("a",{href:G.dF,rel:"noreferrer",style:{color:"#1890ff"},target:"_blank"}),values:{entity:(0,R.t)("label.profiler-ingestion")}}))):p.createElement("div",{className:c()("m-md",{"h-70vh overflow-hidden":o}),"data-testid":"sample-data",id:"sampleDataDetails"},p.createElement(r.Z,{className:"m-b-md justify-end w-full"},w&&p.createElement(Z.Z,{menu:{items:$},open:A,overlayClassName:"manage-dropdown-list-container",overlayStyle:{width:"350px"},placement:"bottomRight",trigger:["click"],onOpenChange:D},p.createElement(x.Z,{placement:"right"},p.createElement(O.Z,{className:"flex-center px-1.5","data-testid":"sample-data-manage-button",onClick:function(){return D(!0)}},p.createElement(U.ReactComponent,{className:"anticon self-center "}))))),p.createElement(z.Z,{bordered:!0,columns:null==M?void 0:M.columns,"data-testid":"sample-data-table",dataSource:null==M?void 0:M.rows,pagination:!1,rowKey:"name",scroll:{x:!0},size:"small"}),h&&p.createElement(P.Z,{bodyText:(0,_.fP)((0,R.t)("label.sample-data"),""),entityName:(0,R.t)("label.sample-data"),entityType:F.py.SAMPLE_DATA,loadingState:S,visible:h,onCancel:W,onConfirm:function(){return(0,a.mG)(void 0,void 0,void 0,(function(){var e;return(0,a.Jh)(this,(function(t){switch(t.label){case 0:T(H.Vu.WAITING),t.label=1;case 1:return t.trys.push([1,3,4,5]),[4,(0,J.DO)(n)];case 2:return t.sent(),W(),K(),[3,5];case 3:return e=t.sent(),(0,q.Eo)(e,(0,R.t)("server.delete-entity-error",{entity:(0,R.t)("label.sample-data")})),[3,5];case 4:return T(H.Vu.SUCCESS),[7];case 5:return[2]}}))}))}}))})),Ne=n(59817),ve=n(16165),he=n(38780),Ie=n(89368),Le=n(76974),be=n(3511),Se=n(61289),Te=n(55608),je=n(62761),Ce=n(79317),Ae=n(36775),De=n(24671),we=n(80539),Ze=n(38333),xe=n(59136),Oe=function(e){var t=e.tableColumns,n=e.searchText,i=e.onUpdate,l=e.hasDescriptionEditAccess,r=e.hasTagEditAccess,o=e.joins,u=e.isReadOnly,c=void 0!==u&&u,d=e.onThreadLinkSelect,g=e.entityFqn,y=e.tableConstraints,E=(0,M.$)().t,f=(0,a.CR)((0,p.useState)([]),2),N=f[0],v=f[1],h=(0,a.CR)((0,p.useState)([]),2),I=h[0],L=h[1],b=(0,a.CR)((0,p.useState)(),2),S=b[0],T=b[1],j=(0,a.CR)((0,p.useState)(),2),C=j[0],A=j[1],D=(0,p.useMemo)((function(){return(0,m.sortBy)(t,"ordinalPosition")}),[t]),w=p.useMemo((function(){return(0,Ze._l)(N)}),[N]),Z=function(e){var t=e.fqn,n=e.field,a=e.value,i=e.columns;null==i||i.forEach((function(e){e.fullyQualifiedName===t?(0,m.set)(e,n,a):Z({fqn:t,field:n,value:a,columns:e.children})}))},O=function(e,n){return(0,a.mG)(void 0,void 0,void 0,(function(){var l,r;return(0,a.Jh)(this,(function(a){switch(a.label){case 0:return e&&n?(l=(0,m.cloneDeep)(t),(0,Ze.OJ)(null!==(r=n.fullyQualifiedName)&&void 0!==r?r:"",e,l),[4,i(l)]):[3,2];case 1:a.sent(),a.label=2;case 2:return[2]}}))}))},R=function(e,t){return e.reduce((function(e,n){if((0,m.lowerCase)(n.name).includes(t)||(0,m.lowerCase)(n.description).includes(t)||(0,m.lowerCase)((0,Ze.j6)(n.dataType)).includes(t))return(0,a.ev)((0,a.ev)([],(0,a.CR)(e)),[n]);if(!(0,m.isUndefined)(n.children)){var i=R(n.children,t);if(i.length>0)return(0,a.ev)((0,a.ev)([],(0,a.CR)(e)),[(0,a.pi)((0,a.pi)({},n),{children:i})])}return e}),[])},k=function(e){!function(e){T(e)}(e)},U=function(e,t){var n=(0,m.isEmpty)(e)?t.dataType:e;return(0,m.isEmpty)(n)?je.lH:c||n&&n.length<25&&!c?(0,m.toLower)(n):p.createElement(x.Z,{title:(0,m.toLower)(n)},p.createElement(s.Z.Text,{ellipsis:!0,className:"cursor-pointer"},n))},Y=function(e,t,n){var a;return p.createElement(p.Fragment,null,p.createElement(Se.Z,{columnData:{fqn:null!==(a=t.fullyQualifiedName)&&void 0!==a?a:"",field:t.description},entityFqn:g,entityType:F.py.TABLE,hasEditPermission:l,index:n,isReadOnly:c,onClick:function(){return k(t)},onThreadLinkSelect:d}),(0,De.R1)(null==t?void 0:t.name,o,E("label.frequently-joined-column-plural")))},P=(0,p.useMemo)((function(){return(0,a.pi)((0,a.pi)({},(0,Ze.Bn)()),{rowExpandable:function(e){return!(0,m.isEmpty)(e.children)},expandedRowKeys:I,onExpand:function(e,t){var n;L(e?(0,a.ev)((0,a.ev)([],(0,a.CR)(I)),[null!==(n=t.fullyQualifiedName)&&void 0!==n?n:""]):I.filter((function(e){return e!==t.fullyQualifiedName})))}})}),[I]);(0,p.useEffect)((function(){if(n){var e=R(D,n);v(e)}else v(D)}),[n,D]);var Q=(0,p.useMemo)((function(){var e=(0,we.Ys)(w);return(0,m.groupBy)((0,m.uniqBy)(e,"value"),(function(e){return e.source}))}),[w]),G=(0,p.useMemo)((function(){return[{title:E("label.name"),dataIndex:"name",key:"name",accessor:"name",width:180,fixed:"left",render:function(e,t){var n=t.displayName;return p.createElement("div",{className:"d-inline-flex flex-column hover-icon-group w-full"},p.createElement("div",{className:"d-inline-flex"},(0,Ze.iq)({columnName:e,columnConstraint:t.constraint,tableConstraints:y}),p.createElement(s.Z.Text,{className:"m-b-0 d-block text-grey-muted","data-testid":"column-name"},e)),(0,m.isEmpty)(n)?null:p.createElement(s.Z.Text,{className:"m-b-0 d-block","data-testid":"column-display-name",ellipsis:{tooltip:!0}},(0,De.C_)(t)),p.createElement(ve.Z,{className:"hover-cell-icon text-left m-t-xss",component:he.ReactComponent,onClick:function(){return function(e){A(e)}(t)}}))}},{title:E("label.type"),dataIndex:"dataTypeDisplay",key:"dataTypeDisplay",accessor:"dataTypeDisplay",ellipsis:!0,width:180,render:U},{title:E("label.description"),dataIndex:"description",key:"description",accessor:"description",width:320,render:Y},{title:E("label.tag-plural"),dataIndex:"tags",key:"tags",accessor:"tags",width:250,filterIcon:(0,Ze.zT)("tag-filter"),render:function(e,t,n){return p.createElement(Te.Z,{entityFqn:g,entityType:F.py.TABLE,handleTagSelection:O,hasTagEditAccess:r,index:n,isReadOnly:c,record:t,tags:e,type:Ae.c6.Classification,onThreadLinkSelect:d})},filters:Q.Classification,filterDropdown:be.x,onFilter:we.n5},{title:E("label.glossary-term-plural"),dataIndex:"tags",key:"glossary",accessor:"tags",width:250,filterIcon:(0,Ze.zT)("glossary-filter"),render:function(e,t,n){return p.createElement(Te.Z,{entityFqn:g,entityType:F.py.TABLE,handleTagSelection:O,hasTagEditAccess:r,index:n,isReadOnly:c,record:t,tags:e,type:Ae.c6.Glossary,onThreadLinkSelect:d})},filters:Q.Glossary,filterDropdown:be.x,onFilter:we.n5}]}),[g,c,y,r,k,O,U,Y,O,d,Q]);return(0,p.useEffect)((function(){L((function(){return w.map((function(e){var t;return null!==(t=null==e?void 0:e.fullyQualifiedName)&&void 0!==t?t:""}))}))}),[w]),p.createElement(p.Fragment,null,p.createElement(z.Z,{bordered:!0,className:"m-b-sm",columns:G,"data-testid":"entity-table",dataSource:w,expandable:P,locale:{emptyText:p.createElement(Ie.Z,null)},pagination:!1,rowKey:"fullyQualifiedName",scroll:Ce.K,size:"middle"}),S&&p.createElement(xe.p,{header:E("label.edit-entity",{entity:E("label.column")})+': "'+S.name+'"',placeholder:E("message.enter-column-description"),value:S.description,visible:Boolean(S),onCancel:function(){T(void 0)},onSave:function(e){return(0,a.mG)(void 0,void 0,void 0,(function(){var n;return(0,a.Jh)(this,(function(a){switch(a.label){case 0:return(0,m.isUndefined)(S)||!S.fullyQualifiedName?[3,2]:(n=(0,m.cloneDeep)(t),Z({fqn:S.fullyQualifiedName,value:e,field:"description",columns:n}),[4,i(n)]);case 1:return a.sent(),T(void 0),[3,3];case 2:T(void 0),a.label=3;case 3:return[2]}}))}))}}),C&&p.createElement(Le.Z,{entity:C,title:E("label.edit-entity",{entity:E("label.column")})+': "'+(null==C?void 0:C.name)+'"',visible:Boolean(C),onCancel:function(){return A(void 0)},onSave:function(e){var n=e.displayName;if(!(0,m.isUndefined)(C)&&C.fullyQualifiedName){var a=(0,m.cloneDeep)(t);Z({fqn:C.fullyQualifiedName,value:(0,m.isEmpty)(n)?void 0:n,field:"displayName",columns:a}),i(a).then((function(){A(void 0)}))}else A(void 0)}}))},ze=function(e){var t=e.columns,n=e.joins,i=e.onUpdate,l=e.columnName,r=e.hasDescriptionEditAccess,s=e.hasTagEditAccess,o=e.onThreadLinkSelect,u=e.isReadOnly,c=void 0!==u&&u,d=e.entityFqn,M=e.tableConstraints,g=(0,a.CR)((0,p.useState)(""),2),y=g[0],E=g[1];return p.createElement(p.Fragment,null,p.createElement("div",{className:"w-1/2"},p.createElement(Ne.Z,{removeMargin:!0,placeholder:""+(0,R.t)("message.find-in-table"),searchValue:y,typingInterval:500,onSearch:function(e){E(e)}})),p.createElement(Oe,{columnName:l,entityFqn:d,hasDescriptionEditAccess:r,hasTagEditAccess:s,isReadOnly:c,joins:n,searchText:(0,m.lowerCase)(y),tableColumns:t,tableConstraints:M,onThreadLinkSelect:o,onUpdate:i}))},Re=n(57254),ke=n(28682),Ue=n(49409),Ye=n(34041),Pe=n(17126),Qe=n(80129),Ge=n.n(Qe),Ve=n(76),Be=n(42709),He=n(77505),Fe=n(21952),We=n(61862),Je=n(30908),_e=n(14477),qe=n(35387),Xe=n(80111),Ke=n(67167),$e=n(43104),et=n(56275),tt=n(86910),nt=n(80307),at=n(98809),it=n(99017),lt=n(78802),rt=function(e,t){switch(t){case at.M1.Success:e.success+=1;break;case at.M1.Failed:e.failed+=1;break;case at.M1.Aborted:e.aborted+=1}},st=n(96840),ot=n(40734),ut=n(84065),ct=n(29266),dt=function(e){var t=e.activeColumnFqn,n=e.columns,i=e.handleChange,l=(0,a.CR)((0,p.useState)(!1),2),o=l[0],u=l[1],c=(0,p.useMemo)((function(){return(0,m.map)(n,(function(e){return{label:p.createElement(r.Z,null,(0,De.C_)(e),p.createElement(s.Z.Text,{className:"text-xs text-grey-muted"},"("+e.dataType+")")),key:e.fullyQualifiedName||""}}))}),[n]),d=(0,p.useMemo)((function(){return(0,m.find)(n,(function(e){return e.fullyQualifiedName===t}))}),[t,n]);return p.createElement(Z.Z,{destroyPopupOnHide:!0,menu:{items:c,triggerSubMenuAction:"click",onClick:function(e){var t=e.key;i(t),u(!1)},selectedKeys:[t]},open:o,trigger:["click"],onOpenChange:function(e){return u(e)}},p.createElement(O.Z,null,p.createElement(r.Z,{align:"center",size:8},(0,De.C_)(d),p.createElement(Fe.ReactComponent,{height:14,width:14}))))},mt=n(37565),pt=n(71175),Mt={};Mt.styleTagTransform=de(),Mt.setAttributes=se(),Mt.insert=le().bind(null,"head"),Mt.domAPI=ae(),Mt.insertStyleElement=ue(),te()(pt.Z,Mt),pt.Z&&pt.Z.locals&&pt.Z.locals;var gt,yt,Et,ft,Nt,vt,ht,It,Lt,bt,St,Tt,jt=function(e){var t=e.value,n=e.type;return p.createElement(r.Z,{align:"center",className:c()("test-indicator justify-center",n.toLowerCase()),"data-testid":"test-status"},p.createElement("div",{className:"test-value","data-testid":"test-value"},t))},Ct=n(43702),At=n(49408),Dt=function(e){var t=e.columnTests,n=e.columns,i=void 0===n?[]:n,l=e.dateRangeObject,o=e.isLoading,u=(0,g.TH)(),c=(0,M.$)().t,d=(0,g.k6)(),y=(0,a.CR)((0,p.useState)(""),2),E=y[0],f=y[1],N=(0,a.CR)((0,p.useState)(i),2),v=N[0],h=N[1],I=(0,a.CR)((0,p.useState)(),2),L=I[0],b=I[1],S=(0,p.useMemo)((function(){var e=u.search;return Ge().parse(e.startsWith("?")?e.substring(1):e)}),[u.search]),T=S.activeColumnFqn,j=S.activeTab,C=(0,p.useMemo)((function(){return[{title:c("label.name"),dataIndex:"name",key:"name",width:250,fixed:"left",render:function(e,t){return p.createElement(O.Z,{className:"break-word p-0",type:"link",onClick:function(){return e=t.fullyQualifiedName||"",d.push({search:Ge().stringify({activeColumnFqn:e,activeTab:j})});var e}},e)},sorter:function(e,t){return e.name.localeCompare(t.name)}},{title:c("label.data-type"),dataIndex:"dataTypeDisplay",key:"dataType",width:150,render:function(e){return p.createElement(s.Z.Text,{className:"break-word"},e||"N/A")},sorter:function(e,t){return e.dataType.localeCompare(t.dataType)}},{title:c("label.null")+" %",dataIndex:"profile",key:"nullProportion",width:200,render:function(e){return p.createElement(Ct.Z,{strokeColor:"#351b8e",value:(null==e?void 0:e.nullProportion)||0})},sorter:function(e,t){var n,a;return((null===(n=e.profile)||void 0===n?void 0:n.nullProportion)||0)-((null===(a=t.profile)||void 0===a?void 0:a.nullProportion)||0)}},{title:c("label.unique")+" %",dataIndex:"profile",key:"uniqueProportion",width:200,render:function(e){return p.createElement(Ct.Z,{strokeColor:"#7147e8",value:(null==e?void 0:e.uniqueProportion)||0})},sorter:function(e,t){var n,a;return((null===(n=e.profile)||void 0===n?void 0:n.uniqueProportion)||0)-((null===(a=t.profile)||void 0===a?void 0:a.uniqueProportion)||0)}},{title:c("label.distinct")+" %",dataIndex:"profile",key:"distinctProportion",width:200,render:function(e){return p.createElement(Ct.Z,{strokeColor:"#4E8B9C",value:(null==e?void 0:e.distinctProportion)||0})},sorter:function(e,t){var n,a;return((null===(n=e.profile)||void 0===n?void 0:n.distinctProportion)||0)-((null===(a=t.profile)||void 0===a?void 0:a.distinctProportion)||0)}},{title:c("label.value-count"),dataIndex:"profile",key:"valuesCount",width:120,render:function(e){return(0,_.F9)((null==e?void 0:e.valuesCount)||0)},sorter:function(e,t){var n,a;return((null===(n=e.profile)||void 0===n?void 0:n.valuesCount)||0)-((null===(a=t.profile)||void 0===a?void 0:a.valuesCount)||0)}},{title:c("label.test-plural"),dataIndex:"testCount",key:"Tests",render:function(e,t){var n;return p.createElement(Ve.Link,{"data-testid":t.name+"-test-count",to:{search:Ge().stringify({activeTab:ct.O.DATA_QUALITY})}},null!==(n=t.testCount)&&void 0!==n?n:0)},sorter:function(e,t){var n,a;return(null!==(n=e.testCount)&&void 0!==n?n:0)-(null!==(a=t.testCount)&&void 0!==a?a:0)}},{title:c("label.status"),dataIndex:"dataQualityTest",key:"dataQualityTest",render:function(e,t){var n,i=null===(n=null==L?void 0:L[(0,ot.Yd)(t.fullyQualifiedName||"",!0)])||void 0===n?void 0:n.results,l=i?Object.entries(i).map((function(e){var t=(0,a.CR)(e,2),n=t[0];return{value:t[1],type:n}})):et.GR,o=l.some((function(e){return 0!==e.value}));return o?p.createElement(r.Z,{size:16},l.map((function(e,t){return p.createElement(jt,{key:t,type:e.type,value:e.value})}))):p.createElement(s.Z.Text,null," ",je.lH," ")}}]}),[i,L]);return(0,p.useEffect)((function(){if(t.length){var e=t.reduce((function(e,t){var n,i=t.entityFQN||"";return(0,m.isUndefined)(e[i])&&(e[i]={results:(0,a.pi)({},et.V),count:0}),rt(e[i].results,(null===(n=t.testCaseResult)||void 0===n?void 0:n.testCaseStatus)||""),e[i].count+=1,e}),{});h(i.map((function(t){var n;return(0,a.pi)((0,a.pi)({},t),{testCount:null===(n=null==e?void 0:e[(0,ot.Yd)(t.fullyQualifiedName||"",!0)])||void 0===n?void 0:n.count})}))),b(e)}else h(i)}),[t,i]),p.createElement("div",{"data-testid":"column-profile-table-container"},(0,m.isEmpty)(T)?p.createElement(p.Fragment,null,p.createElement("div",{className:"w-max-400"},p.createElement(Ne.Z,{placeholder:c("message.find-in-table"),searchValue:E,typingInterval:500,onSearch:function(e){f(e),h(e?i.filter((function(t){var n;return null===(n=t.name)||void 0===n?void 0:n.includes(e)})):i)}})),p.createElement(mt.Z,{bordered:!0,columns:C,dataSource:v,expandable:(0,Ze.Bn)(),loading:o,locale:{emptyText:p.createElement(Ie.Z,null)},pagination:!1,rowKey:"name",scroll:{x:!0},size:"small"})):p.createElement(At.Z,{activeColumnFqn:T,dateRangeObject:l}))},wt=n(24135),Zt=n(78754),xt=function(e){var t,n,a=e.column;return p.createElement("div",{className:"summary-card h-full"},p.createElement(r.Z,null,p.createElement(s.Z,{className:"font-medium"},(0,De.C_)(a)),p.createElement(s.Z.Text,{className:"text-xs text-grey-muted"},"("+a.dataType+")")),p.createElement(wt.Z,{className:"text-grey-muted m-t-xs",markdown:null!==(t=a.description)&&void 0!==t?t:"",maxLength:184}),(0,m.isEmpty)(a.tags)?null:p.createElement("div",{className:"m-t-xs"},p.createElement(Zt.Z,{sizeCap:3,tags:null!==(n=a.tags)&&void 0!==n?n:[]})))},Ot=n(49101),zt=n(85986),Rt=n(54680),kt=n(12028),Ut=n(4107),Yt=n(97538),Pt=n(50963),Qt=n(25834),Gt=(n(87825),n(27914));!function(e){e.Aggregatefunction="AGGREGATEFUNCTION",e.Array="ARRAY",e.Bigint="BIGINT",e.Binary="BINARY",e.Blob="BLOB",e.Boolean="BOOLEAN",e.Bytea="BYTEA",e.Byteint="BYTEINT",e.Bytes="BYTES",e.CIDR="CIDR",e.Char="CHAR",e.Clob="CLOB",e.Date="DATE",e.Datetime="DATETIME",e.Datetimerange="DATETIMERANGE",e.Decimal="DECIMAL",e.Double="DOUBLE",e.Enum="ENUM",e.Error="ERROR",e.Fixed="FIXED",e.Float="FLOAT",e.Geography="GEOGRAPHY",e.Geometry="GEOMETRY",e.Hllsketch="HLLSKETCH",e.Image="IMAGE",e.Inet="INET",e.Int="INT",e.Interval="INTERVAL",e.Ipv4="IPV4",e.Ipv6="IPV6",e.JSON="JSON",e.Long="LONG",e.Longblob="LONGBLOB",e.Lowcardinality="LOWCARDINALITY",e.Macaddr="MACADDR",e.Map="MAP",e.Mediumblob="MEDIUMBLOB",e.Mediumtext="MEDIUMTEXT",e.Ntext="NTEXT",e.Null="NULL",e.Number="NUMBER",e.Numeric="NUMERIC",e.PGLsn="PG_LSN",e.PGSnapshot="PG_SNAPSHOT",e.Point="POINT",e.Polygon="POLYGON",e.Record="RECORD",e.Rowid="ROWID",e.Set="SET",e.Smallint="SMALLINT",e.Spatial="SPATIAL",e.String="STRING",e.Struct="STRUCT",e.Super="SUPER",e.Table="TABLE",e.Text="TEXT",e.Time="TIME",e.Timestamp="TIMESTAMP",e.Timestampz="TIMESTAMPZ",e.Tinyint="TINYINT",e.Tsquery="TSQUERY",e.Tsvector="TSVECTOR",e.Tuple="TUPLE",e.TxidSnapshot="TXID_SNAPSHOT",e.UUID="UUID",e.Union="UNION",e.Unknown="UNKNOWN",e.Varbinary="VARBINARY",e.Varchar="VARCHAR",e.Variant="VARIANT",e.XML="XML",e.Year="YEAR"}(gt||(gt={})),function(e){e.NotNull="NOT_NULL",e.Null="NULL",e.PrimaryKey="PRIMARY_KEY",e.Unique="UNIQUE"}(yt||(yt={})),function(e){e.Automated="Automated",e.Derived="Derived",e.Manual="Manual",e.Propagated="Propagated"}(Et||(Et={})),function(e){e.Classification="Classification",e.Glossary="Glossary"}(ft||(ft={})),function(e){e.Confirmed="Confirmed",e.Suggested="Suggested"}(Nt||(Nt={})),function(e){e.Avro="avro",e.CSV="csv",e.JSON="json",e.JSONGz="json.gz",e.JSONZip="json.zip",e.Parquet="parquet",e.Tsv="tsv"}(vt||(vt={})),function(e){e.DistKey="DIST_KEY",e.ForeignKey="FOREIGN_KEY",e.PrimaryKey="PRIMARY_KEY",e.SortKey="SORT_KEY",e.Unique="UNIQUE"}(ht||(ht={})),function(e){e.ColumnValue="COLUMN-VALUE",e.IngestionTime="INGESTION-TIME",e.IntegerRange="INTEGER-RANGE",e.Other="OTHER",e.TimeUnit="TIME-UNIT"}(It||(It={})),function(e){e.ColumnValue="COLUMN-VALUE",e.IngestionTime="INGESTION-TIME",e.IntegerRange="INTEGER-RANGE",e.TimeUnit="TIME-UNIT"}(Lt||(Lt={})),function(e){e.Day="DAY",e.Hour="HOUR",e.Month="MONTH",e.Year="YEAR"}(bt||(bt={})),function(e){e.Percentage="PERCENTAGE",e.Rows="ROWS"}(St||(St={})),function(e){e.External="External",e.Foreign="Foreign",e.Iceberg="Iceberg",e.Local="Local",e.MaterializedView="MaterializedView",e.Partitioned="Partitioned",e.Regular="Regular",e.SecureView="SecureView",e.Transient="Transient",e.View="View"}(Tt||(Tt={}));var Vt=n(38212),Bt=n(99492),Ht=(n(66453),function(e){var t,n,i=e.tableId,l=e.columns,o=e.visible,u=e.onVisibilityChange,d=(0,M.$)().t,g=(0,a.CR)(Yt.Z.useForm(),1)[0],y=(0,a.CR)((0,p.useState)(!1),2),E=y[0],f=y[1],N=(0,p.useMemo)((function(){return{data:void 0,sqlQuery:"",profileSample:100,sampleDataCount:50,excludeCol:[],includeCol:et.US,enablePartition:!1,partitionData:void 0,selectedProfileSampleType:nt.KF.Percentage}}),[]),v=(0,a.CR)((0,p.useReducer)(_.uR,N),2),h=v[0],I=v[1],L=(0,p.useCallback)((function(e){I(e)}),[]),b=(0,p.useMemo)((function(){return l.map((function(e){var t=e.name;return{label:t,value:t}}))}),[l]),S=(0,p.useMemo)((function(){return[{title:d("label.all"),value:"all",key:"all",children:et.T3.map((function(e){return{title:(0,m.startCase)(e),value:e,key:e}}))}]}),[l]),T=Yt.Z.useWatch(["partitionIntervalType"],g),j=(0,p.useMemo)((function(){return l.reduce((function(e,t){return(T?et.RT[T]:[]).includes(t.dataType)?(0,a.ev)((0,a.ev)([],(0,a.CR)(e)),[{value:t.name,label:t.name}]):e}),[])}),[l,T]),C=function(e){var t=e.includeColumns,n=e.partitioning,i=e.profileQuery,l=e.profileSample,r=e.profileSampleType,s=e.excludeColumns,o=e.sampleDataCount;L({sqlQuery:null!=i?i:"",profileSample:l,excludeCol:null!=s?s:[],selectedProfileSampleType:null!=r?r:nt.KF.Percentage,sampleDataCount:o});var u=r===nt.KF.Percentage;if(g.setFieldsValue({profileSampleType:r,profileSamplePercentage:u&&null!=l?l:100,profileSampleRows:u?void 0:null!=l?l:100}),t&&(null==t?void 0:t.length)>0){var c=t.map((function(e){return((0,m.isUndefined)(e.metrics)||e.metrics&&0===e.metrics.length)&&(e.metrics=["all"]),e}));g.setFieldsValue({includeColumns:c}),L({includeCol:c})}n&&(L({enablePartition:n.enablePartitioning||!1}),g.setFieldsValue((0,a.pi)({},n)))},A=function(){var e=h.includeCol.filter((function(e){var t=e.columnName;return!(0,m.isUndefined)(t)}));return L({includeCol:e}),e.map((function(e){return e.metrics&&"all"===e.metrics[0]?{columnName:e.columnName}:e}))},D=(0,p.useCallback)((function(e){return(0,a.mG)(void 0,void 0,void 0,(function(){var t,n,l,r,s,o,c,p,M,g,y,E;return(0,a.Jh)(this,(function(N){switch(N.label){case 0:t=h.excludeCol,n=h.sqlQuery,l=h.includeCol,r=h.enablePartition,s=h.partitionData,f(!0),o=e.profileSamplePercentage,c=e.profileSampleRows,p=e.profileSampleType,M=e.sampleDataCount,g={excludeColumns:t.length>0?t:void 0,profileQuery:(0,m.isEmpty)(n)?void 0:n,profileSample:p===nt.KF.Percentage?o:c,profileSampleType:p,includeColumns:(0,m.isEqual)(l,et.US)?void 0:A(),partitioning:r?(0,a.pi)((0,a.pi)({},s),{partitionValues:T===Lt.ColumnValue?null===(E=null==s?void 0:s.partitionValues)||void 0===E?void 0:E.filter((function(e){return!(0,m.isEmpty)(e)})):void 0,enablePartitioning:r}):void 0,sampleDataCount:M},N.label=1;case 1:return N.trys.push([1,3,4,5]),[4,(0,J.Eg)(i,g)];case 2:if(!N.sent())throw d("server.entity-updating-error",{entity:d("label.profile-config")});return(0,q.XA)(d("server.update-entity-success",{entity:d("label.profile-config")})),u(!1),[3,5];case 3:return y=N.sent(),(0,q.Eo)(y,d("server.entity-updating-error",{entity:d("label.profile-config")})),[3,5];case 4:return f(!1),[7];case 5:return[2]}}))}))}),[h,A]),w=(0,p.useCallback)((function(){var e=h.data;e&&C(e),u(!1)}),[h]),Z=(0,p.useCallback)((function(e){return L({selectedProfileSampleType:e})}),[]),x=(0,p.useCallback)((function(e){return L({profileSample:Number(e)})}),[]),z=(0,p.useCallback)((function(e){L({sqlQuery:e})}),[]),R=(0,p.useCallback)((function(e,t){var n=e.partitionIntervalType,a=e.enablePartitioning;!n&&(0,m.isNil)(a)||g.setFieldsValue({partitionColumnName:void 0,partitionIntegerRangeStart:void 0,partitionIntegerRangeEnd:void 0,partitionIntervalUnit:void 0,partitionInterval:void 0,partitionValues:[""]}),(0,m.isNil)(a)||g.setFieldsValue({partitionIntervalType:void 0}),L({includeCol:t.includeColumns,partitionData:(0,m.pick)(t,"partitionColumnName","partitionIntegerRangeEnd","partitionIntegerRangeStart","partitionInterval","partitionIntervalType","partitionIntervalUnit","partitionValues")})}),[]),k=function(e){return function(t){var n;return L(((n={})[e]=t,n))}},U=k("excludeCol"),Y=k("enablePartition");return(0,p.useEffect)((function(){(0,a.mG)(void 0,void 0,void 0,(function(){var e,t,n;return(0,a.Jh)(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),[4,(0,J.wA)(i)];case 1:if(!(e=a.sent()))throw d("server.fetch-table-profiler-config-error");return(t=e.tableProfilerConfig)&&(L({data:t}),C(t)),[3,3];case 2:return n=a.sent(),(0,q.Eo)(n,d("server.fetch-table-profiler-config-error")),[3,3];case 3:return[2]}}))}))}),[]),p.createElement(X.Z,{centered:!0,destroyOnClose:!0,bodyStyle:{maxHeight:600,overflowY:"scroll"},cancelButtonProps:{type:"link"},closable:!1,confirmLoading:E,"data-testid":"profiler-settings-modal",maskClosable:!1,okButtonProps:{form:"profiler-setting-form",htmlType:"submit"},okText:d("label.save"),open:o,title:d("label.setting-plural"),width:630,onCancel:w},p.createElement(Qt.Row,{gutter:[16,16]},p.createElement(Qt.Col,{"data-testid":"profile-sample-container",span:24},p.createElement(Yt.Z,{"data-testid":"configure-ingestion-container",form:g,initialValues:{profileSampleType:null==h?void 0:h.selectedProfileSampleType,profileSamplePercentage:(null==h?void 0:h.profileSample)||100,sampleDataCount:h.sampleDataCount},layout:"vertical"},p.createElement(Yt.Z.Item,{label:d("label.profile-sample-type",{type:""}),name:"profileSampleType"},p.createElement(Ye.Z,{autoFocus:!0,className:"w-full","data-testid":"profile-sample",options:et.wG,onChange:Z})),(null==h?void 0:h.selectedProfileSampleType)===nt.KF.Percentage?p.createElement(Yt.Z.Item,{className:"m-b-0",label:d("label.profile-sample-type",{type:d("label.value")}),name:"profileSamplePercentage"},p.createElement(Bt.Z,{className:"p-x-xs",value:(null==h?void 0:h.profileSample)||0,onChange:x})):p.createElement(Yt.Z.Item,{className:"m-b-0",label:d("label.profile-sample-type",{type:d("label.value")}),name:"profileSampleRows"},p.createElement(zt.Z,{className:"w-full","data-testid":"metric-number-input",min:0,placeholder:d("label.please-enter-value",{name:d("label.row-count-lowercase")})})),p.createElement(Yt.Z.Item,{className:"m-b-0",label:d("label.sample-data-count"),name:"sampleDataCount"},p.createElement(zt.Z,{className:"w-full","data-testid":"sample-data-count-input",min:0,placeholder:d("label.please-enter-value",{name:d("label.sample-data-count-lowercase")})})))),p.createElement(Qt.Col,{"data-testid":"sql-editor-container",span:24},p.createElement("p",{className:"m-b-xs"},d("label.profile-sample-type",{type:d("label.query")})," "),p.createElement(K.Z,{className:"sql-editor-container custom-query-editor query-editor-h-200 custom-code-mirror-theme","data-testid":"profiler-setting-sql-editor",mode:{name:Gt.Q.SQL},options:{readOnly:!1},value:null!==(t=null==h?void 0:h.sqlQuery)&&void 0!==t?t:"",onChange:z})),p.createElement(Qt.Col,{"data-testid":"exclude-column-container",span:24},p.createElement(s.Z.Paragraph,null,d("message.enable-column-profile")),p.createElement("p",{className:"text-xs m-b-xss"},d("label.exclude"),":"),p.createElement(Ye.Z,{allowClear:!0,className:"w-full","data-testid":"exclude-column-select",mode:"tags",options:b,placeholder:d("label.select-column-plural-to-exclude"),size:"middle",value:null==h?void 0:h.excludeCol,onChange:U})),p.createElement(Qt.Col,{span:24},p.createElement(Yt.Z,{autoComplete:"off",form:g,id:"profiler-setting-form",initialValues:(0,a.pi)({includeColumns:null==h?void 0:h.includeCol,partitionData:[""]},null===(n=null==h?void 0:h.data)||void 0===n?void 0:n.partitioning),layout:"vertical",name:"includeColumnsProfiler",onFinish:D,onValuesChange:R},p.createElement(Pt.List,{name:"includeColumns"},(function(e,t){var n=t.add,i=t.remove;return p.createElement(p.Fragment,null,p.createElement("div",{className:"d-flex items-center m-b-xss"},p.createElement("p",{className:"w-form-label text-xs m-r-xs"},d("label.include")+":"),p.createElement(O.Z,{className:"include-columns-add-button",icon:p.createElement(Ot.Z,null),size:"small",type:"primary",onClick:function(){return n({metrics:["all"]})}})),p.createElement("div",{className:c()({"h-max-40 overflow-y-auto":(null==h?void 0:h.includeCol.length)>1}),"data-testid":"include-column-container"},e.map((function(e){var t=e.key,n=e.name,l=(0,a._T)(e,["key","name"]);return p.createElement(Qt.Row,{gutter:16,key:t},p.createElement(Qt.Col,{span:12},p.createElement(Yt.Z.Item,(0,a.pi)({className:"w-full m-b-md"},l,{name:[n,"columnName"]}),p.createElement(Ye.Z,{className:"w-full","data-testid":"exclude-column-select",options:b,placeholder:d("label.select-column-plural-to-include"),size:"middle"}))),p.createElement(Qt.Col,{className:"flex",span:12},p.createElement(Yt.Z.Item,(0,a.pi)({className:"w-full m-b-md"},l,{name:[n,"metrics"]}),p.createElement(Rt.Z,{treeCheckable:!0,className:"w-full",maxTagCount:2,placeholder:d("label.please-select"),showCheckedStrategy:"SHOW_PARENT",treeData:S})),p.createElement(O.Z,{icon:p.createElement(Vt.ZP,{alt:d("label.delete"),className:"w-4",icon:Vt.PJ.DELETE}),type:"text",onClick:function(){return i(n)}})))}))))})),p.createElement(Qt.Row,{gutter:[16,16]},p.createElement(Qt.Col,{span:24},p.createElement(r.Z,{align:"center",size:12},p.createElement("p",null,d("label.enable-partition")),p.createElement(Yt.Z.Item,{className:"m-b-0",name:"enablePartitioning"},p.createElement(kt.Z,{checked:null==h?void 0:h.enablePartition,"data-testid":"enable-partition-switch",onChange:Y})))),p.createElement(Qt.Col,{span:12},p.createElement(Yt.Z.Item,{className:"m-b-0",label:p.createElement("span",{className:"text-xs"},d("label.interval-type")),labelCol:et.L7,name:"partitionIntervalType",rules:[{required:null==h?void 0:h.enablePartition,message:d("message.field-text-is-required",{fieldText:d("label.interval-type")})}]},p.createElement(Ye.Z,{allowClear:!0,className:"w-full","data-testid":"interval-type",disabled:!(null==h?void 0:h.enablePartition),options:et.SX,placeholder:d("message.select-interval-type"),size:"middle"}))),p.createElement(Qt.Col,{span:12},p.createElement(Yt.Z.Item,{className:"m-b-0",label:p.createElement("span",{className:"text-xs"},d("label.column-entity",{entity:d("label.name")})),labelCol:et.L7,name:"partitionColumnName",rules:[{required:null==h?void 0:h.enablePartition,message:d("message.field-text-is-required",{fieldText:d("label.column-entity",{entity:d("label.name")})})}]},p.createElement(Ye.Z,{allowClear:!0,className:"w-full","data-testid":"column-name",disabled:!(null==h?void 0:h.enablePartition),options:j,placeholder:d("message.select-column-name"),size:"middle"}))),T&&et.t_.includes(T)?p.createElement(p.Fragment,null,p.createElement(Qt.Col,{span:12},p.createElement(Yt.Z.Item,{className:"m-b-0",label:p.createElement("span",{className:"text-xs"},d("label.interval")),labelCol:et.L7,name:"partitionInterval",rules:[{required:null==h?void 0:h.enablePartition,message:d("message.field-text-is-required",{fieldText:d("label.interval")})}]},p.createElement(zt.Z,{className:"w-full","data-testid":"interval-required",disabled:!(null==h?void 0:h.enablePartition),placeholder:d("message.enter-interval"),size:"middle"}))),p.createElement(Qt.Col,{span:12},p.createElement(Yt.Z.Item,{className:"m-b-0",label:p.createElement("span",{className:"text-xs"},d("label.interval-unit")),labelCol:et.L7,name:"partitionIntervalUnit",rules:[{required:null==h?void 0:h.enablePartition,message:d("message.field-text-is-required",{fieldText:d("label.interval-unit")})}]},p.createElement(Ye.Z,{allowClear:!0,className:"w-full","data-testid":"select-interval-unit",disabled:!(null==h?void 0:h.enablePartition),options:et.gj,placeholder:d("message.select-interval-unit"),size:"middle"})))):null,Lt.IntegerRange===T?p.createElement(p.Fragment,null,p.createElement(Qt.Col,{span:12},p.createElement(Yt.Z.Item,{className:"m-b-0",label:p.createElement("span",{className:"text-xs"},d("label.start-entity",{entity:d("label.range")})),labelCol:et.L7,name:"partitionIntegerRangeStart",rules:[{required:null==h?void 0:h.enablePartition,message:d("message.field-text-is-required",{fieldText:d("label.start-entity",{entity:d("label.range")})})}]},p.createElement(zt.Z,{className:"w-full","data-testid":"start-range",placeholder:d("message.enter-a-field",{field:d("label.start-entity",{entity:d("label.range")})}),size:"middle"}))),p.createElement(Qt.Col,{span:12},p.createElement(Yt.Z.Item,{className:"m-b-0",label:p.createElement("span",{className:"text-xs"},d("label.end-entity",{entity:d("label.range")})),labelCol:et.L7,name:"partitionIntegerRangeEnd",rules:[{required:null==h?void 0:h.enablePartition,message:d("message.field-text-is-required",{fieldText:d("label.end-entity",{entity:d("label.range")})})}]},p.createElement(zt.Z,{className:"w-full","data-testid":"end-range",placeholder:d("message.enter-a-field",{field:d("label.end-entity",{entity:d("label.range")})}),size:"middle"})))):null,Lt.ColumnValue===T?p.createElement(Qt.Col,{span:24},p.createElement(Pt.List,{name:"partitionValues"},(function(e,t){var n=t.add,i=t.remove;return p.createElement(p.Fragment,null,p.createElement("div",{className:"flex items-center m-b-xs"},p.createElement("p",{className:"w-form-label text-xs m-r-sm"},d("label.value")+":"),p.createElement(O.Z,{className:"include-columns-add-button",icon:p.createElement(Ot.Z,null),size:"small",type:"primary",onClick:function(){return n()}})),e.map((function(e){var t=e.key,n=e.name,l=(0,a._T)(e,["key","name"]);return p.createElement(Qt.Row,{gutter:16,key:t},p.createElement(Qt.Col,{className:"flex",span:24},p.createElement(Yt.Z.Item,(0,a.pi)({className:"w-full m-b-md"},l,{name:n,rules:[{required:null==h?void 0:h.enablePartition,message:d("message.field-text-is-required",{fieldText:d("label.value")})}]}),p.createElement(Ut.Z,{className:"w-full","data-testid":"partition-value",placeholder:d("message.enter-a-field",{field:d("label.value")})})),p.createElement(O.Z,{icon:p.createElement(Vt.ZP,{alt:d("label.delete"),className:"w-4",icon:Vt.PJ.DELETE}),type:"text",onClick:function(){return i(n)}})))})))}))):null)))))}),Ft=n(21487),Wt=n(79759),Jt=n(80271),_t=n(79508),qt=n(27049),Xt=n(92458),Kt=n.n(Xt),$t=n(49795),en=n(65898),tn=n(12411),nn=n(35741),an=n(55726),ln=n(72819),rn=n(19894),sn=n(97354),on=n(39117),un=n(39570),cn=function(e){var t,n,l=e.testSuite,s=(0,rn.w)(),o=s.isAirflowAvailable,u=s.isFetchingStatus,c=(0,M.$)().t,d=null!==(n=null!==(t=null==l?void 0:l.fullyQualifiedName)&&void 0!==t?t:null==l?void 0:l.name)&&void 0!==n?n:"",m=(0,D.BL)().permissions,y=(0,g.k6)(),E=(0,a.CR)((0,p.useState)(!0),2),f=E[0],N=E[1],v=(0,a.CR)((0,p.useState)([]),2),h=v[0],I=v[1],b=(0,a.CR)((0,p.useState)(""),2),S=b[0],T=b[1],j=(0,a.CR)((0,p.useState)(),2),A=j[0],Z=j[1],z=(0,a.CR)((0,p.useState)(!1),2),R=z[0],k=z[1],U=(0,a.CR)((0,p.useState)({id:"",name:"",state:""}),2),Y=U[0],Q=U[1],G=(0,a.CR)((0,p.useState)(!1),2),V=G[0],B=G[1],W=(0,a.CR)((0,p.useState)({id:"",state:""}),2),J=W[0],X=W[1],K=(0,a.CR)((0,p.useState)({id:"",state:""}),2),$=K[0],ee=K[1],te=(0,p.useMemo)((function(){return un.NE.hasViewPermissions(w.A.INGESTION_PIPELINE,m)}),[m]),ne=(0,p.useMemo)((function(){return(0,un.P_)(ln.OX.Create,w.A.INGESTION_PIPELINE,m)}),[m]),ae=(0,p.useMemo)((function(){return(0,un.P_)(ln.OX.Delete,w.A.INGESTION_PIPELINE,m)}),[m]),ie=(0,p.useMemo)((function(){return(0,un.P_)(ln.OX.EditAll,w.A.INGESTION_PIPELINE,m)}),[m]),le=function(){B(!1),Q({id:"",name:"",state:""})},re=function(){return(0,a.mG)(void 0,void 0,void 0,(function(){var e,t;return(0,a.Jh)(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,3,4]),N(!0),[4,(0,sn.Pj)({arrQueryFields:["owner","pipelineStatuses"],testSuite:d,pipelineType:[an.Hz.TestSuite]})];case 1:return e=n.sent(),I(e.data),[3,4];case 2:return t=n.sent(),(0,q.Eo)(t),[3,4];case 3:return N(!1),[7];case 4:return[2]}}))}))},se=function(e){return(0,a.mG)(void 0,void 0,void 0,(function(){var t;return(0,a.Jh)(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,(0,sn.g6)(e)];case 1:return n.sent(),re(),[3,3];case 2:return t=n.sent(),(0,q.Eo)(t,c("server.unexpected-response")),[3,3];case 3:return[2]}}))}))},oe=function(e,t){return(0,a.mG)(void 0,void 0,void 0,(function(){var n;return(0,a.Jh)(this,(function(a){switch(a.label){case 0:ee({id:e,state:"waiting"}),a.label=1;case 1:return a.trys.push([1,3,,4]),[4,(0,sn.aw)(e)];case 2:return a.sent(),ee({id:e,state:"success"}),setTimeout((function(){return ee({id:"",state:""})}),1500),(0,q.XA)(c("label.pipeline")+"  "+c(t?"label.re-deploy":"label.deployed")+"  "+c("label.successfully-lowercase")),[3,4];case 3:return n=a.sent(),ee({id:"",state:""}),(0,q.Eo)(n,c("server.ingestion-workflow-operation-error",{operation:"updating",displayName:""})),[3,4];case 4:return[2]}}))}))};(0,p.useEffect)((function(){re(),(0,a.mG)(void 0,void 0,void 0,(function(){var e;return(0,a.Jh)(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,(0,on.oQ)()];case 1:return e=t.sent(),T(e.apiEndpoint),[3,3];case 2:return t.sent(),T(""),[3,3];case 3:return[2]}}))}))}),[]);var ue=(0,p.useMemo)((function(){var e=[{title:c("label.name"),dataIndex:"name",key:"name",width:300,render:function(e,t){var n=(0,De.C_)(t);return p.createElement(x.Z,{title:te?n:c("message.no-permission-to-view")},p.createElement("a",{className:"link-text","data-testid":"airflow-tree-view",href:""+S,rel:"noopener noreferrer",target:"_blank"},p.createElement(r.Z,{align:"center"},n,p.createElement($t.ReactComponent,{className:"align-middle",width:16}))))}},{title:c("label.type"),dataIndex:"pipelineType",key:"pipelineType"},{title:c("label.schedule"),dataIndex:"airflowConfig",key:"airflowEndpoint",render:function(e,t){var n;return p.createElement(p.Fragment,null,(null==t?void 0:t.airflowConfig.scheduleInterval)?p.createElement(x.Z,{placement:"bottom",title:Kt().toString(t.airflowConfig.scheduleInterval||"",{use24HourTimeFormat:!0,verbose:!0})},p.createElement("span",null,null!==(n=t.airflowConfig.scheduleInterval)&&void 0!==n?n:"--")):p.createElement("span",null,"--"))}},{title:c("label.recent-run-plural"),dataIndex:"pipelineStatuses",key:"recentRuns",render:function(e,t){return p.createElement(i.Z,{align:"middle"},p.createElement(tn.K,{ingestion:t}))}},{title:c("label.action-plural"),dataIndex:"actions",key:"actions",render:function(e,t){var n,i;return p.createElement(p.Fragment,null,p.createElement(r.Z,{align:"start"},t.enabled?p.createElement(p.Fragment,null,(i=t).deployed?p.createElement(p.Fragment,null,p.createElement(x.Z,{title:c(ie?"label.run":"message.no-permission-for-action")},p.createElement(O.Z,{className:"p-0","data-testid":"run",disabled:!ie,size:"small",type:"link",onClick:function(){return e=i.id,t=i.name,(0,a.mG)(void 0,void 0,void 0,(function(){return(0,a.Jh)(this,(function(n){switch(n.label){case 0:X({id:e,state:"waiting"}),n.label=1;case 1:return n.trys.push([1,3,,4]),[4,(0,sn.FD)(e)];case 2:return n.sent(),X({id:e,state:"success"}),setTimeout((function(){X({id:"",state:""}),(0,q.XA)("Pipeline triggered successfully")}),1500),re(),[3,4];case 3:return n.sent(),(0,q.Eo)(c("server.ingestion-workflow-operation-error",{operation:"triggering",displayName:t})),X({id:"",state:""}),[3,4];case 4:return[2]}}))}));var e,t}},(0,_.vc)(J,i.id,c("label.run")))),p.createElement(qt.Z,{type:"vertical"}),p.createElement(x.Z,{title:c(ie?"label.re-deploy":"message.no-permission-for-action")},p.createElement(O.Z,{className:"p-0","data-testid":"re-deploy-btn",disabled:!ie,size:"small",type:"link",onClick:function(){return oe(i.id,!0)}},(0,_.vc)($,i.id,c("label.re-deploy"))))):p.createElement(x.Z,{title:c(ie?"label.deploy":"message.no-permission-for-action")},p.createElement(O.Z,{"data-testid":"deploy",disabled:!ie,type:"link",onClick:function(){return oe(i.id,!1)}},(0,_.vc)($,i.id,c("label.deploy")))),p.createElement(qt.Z,{type:"vertical"}),p.createElement(x.Z,{title:c(ie?"label.pause":"message.no-permission-for-action")},p.createElement(O.Z,{className:"p-0","data-testid":"pause",disabled:!ie,size:"small",type:"link",onClick:function(){return se(t.id||"")}},c("label.pause")))):p.createElement(x.Z,{title:c(ie?"label.unpause":"message.no-permission-for-action")},p.createElement(O.Z,{className:"p-0","data-testid":"unpause",disabled:!ie,size:"small",type:"link",onClick:function(){return se(t.id||"")}},c("label.unpause"))),p.createElement(qt.Z,{type:"vertical"}),p.createElement(x.Z,{title:c(ie?"label.edit":"message.no-permission-for-action")},p.createElement(O.Z,{className:"p-0","data-testid":"edit",disabled:!ie,size:"small",type:"link",onClick:function(){var e;y.push((0,st.nX)((0,ot.Yd)(d),(0,ot.Yd)(null!==(e=t.fullyQualifiedName)&&void 0!==e?e:"")))}},c("label.edit"))),p.createElement(qt.Z,{type:"vertical"}),p.createElement(x.Z,{title:c(ae?"label.delete":"message.no-permission-for-action")},p.createElement(O.Z,{className:"p-0","data-testid":"delete",disabled:!ae,size:"small",type:"link",onClick:function(){return e=t.id,n=t.name,Q({id:e,name:n,state:""}),void B(!0);var e,n}},Y.id===t.id?"success"===Y.state?p.createElement(_t.Z,null):p.createElement(C.Z,{size:"small",type:"default"}):c("label.delete"))),p.createElement(qt.Z,{type:"vertical"}),p.createElement(x.Z,{title:c(ie?"label.kill":"message.no-permission-for-action")},p.createElement(O.Z,{className:"p-0","data-testid":"kill",disabled:!ie,size:"small",type:"link",onClick:function(){k(!0),Z(t)}},c("label.kill"))),p.createElement(qt.Z,{type:"vertical"}),p.createElement(x.Z,{title:c(te?"label.log-plural":"message.no-permission-for-action")},p.createElement(Ve.Link,{to:(0,st.Ht)(F.py.TEST_SUITE,(null===(n=t.service)||void 0===n?void 0:n.name)||"",(0,ot.Yd)(t.fullyQualifiedName||""))},p.createElement(O.Z,{className:"p-0","data-testid":"logs",disabled:!te,size:"small",type:"link",onClick:function(){Z(t)}},c("label.log-plural"))))),R&&A&&t.id===(null==A?void 0:A.id)&&p.createElement(nn.Z,{isModalOpen:R,pipelinName:A.name,pipelineId:A.id,onClose:function(){k(!1),Z(void 0)},onIngestionWorkflowsUpdate:re}))}}];return e}),[S,R,A,$,J]),ce=(0,p.useMemo)((function(){return l?p.createElement(L.Z,{button:p.createElement(O.Z,{ghost:!0,className:"p-x-lg","data-testid":"add-placeholder-button",icon:p.createElement(Ot.Z,null),type:"primary",onClick:function(){y.push((0,st.nX)((0,ot.Yd)(d)))}},c("label.add")),heading:c("label.pipeline"),permission:ne,type:H.Wx.ASSIGN}):p.createElement(L.Z,{type:H.Wx.NO_DATA})}),[d]);return o||f||u?p.createElement("div",{className:"m-t-md"},p.createElement(mt.Z,{bordered:!0,columns:ue,dataSource:h.map((function(e){return(0,a.pi)((0,a.pi)({},e),{key:e.name})})),loading:f||u,locale:{emptyText:ce},pagination:!1,rowKey:"name",scroll:{x:1200},size:"small"}),p.createElement(P.Z,{entityName:Y.name,entityType:c("label.ingestion-lowercase"),loadingState:Y.state,visible:V,onCancel:le,onConfirm:function(){return e=Y.id,t=Y.name,(0,a.mG)(void 0,void 0,void 0,(function(){var n;return(0,a.Jh)(this,(function(a){switch(a.label){case 0:Q({id:e,name:t,state:"waiting"}),a.label=1;case 1:return a.trys.push([1,3,4,5]),[4,(0,sn.cB)(e)];case 2:return a.sent(),Q({id:e,name:t,state:"success"}),re(),[3,5];case 3:return n=a.sent(),(0,q.Eo)(n,c("server.ingestion-workflow-operation-error",{operation:"deleting",displayName:t})),[3,5];case 4:return le(),[7];case 5:return[2]}}))}));var e,t}})):p.createElement(en.Z,null)},dn=n(15689),mn=function(e){var t,n=e.isLoading,a=e.testCases,r=e.onTestCaseResultUpdate,s=e.onTestUpdate,u=e.testSuite,c=e.showTableColumn,d=e.afterDeleteAction,m=(0,M.$)().t,g=(0,p.useMemo)((function(){return[{label:m("label.test-case-plural"),key:F.M8.TEST_CASES,children:p.createElement("div",{className:"p-t-md"},p.createElement(Jt.Z,{afterDeleteAction:d,isLoading:n,showTableColumn:c,testCases:a,onTestCaseResultUpdate:r,onTestUpdate:s}))},{label:m("label.pipeline"),key:F.M8.PIPELINE,children:p.createElement(cn,{testSuite:u})}]}),[n,a,s,r]);return p.createElement(i.Z,{gutter:[0,16]},p.createElement(l.Z,{span:24},p.createElement(Wt._,{testSummary:null!==(t=null==u?void 0:u.summary)&&void 0!==t?t:dn.ep})),p.createElement(l.Z,{span:24},p.createElement(o.Z,{items:g})))},pn=function(e){var t=e.isTableDeleted,n=e.permissions,s=(0,M.$)().t,o=(0,g.k6)(),u=(0,g.TH)(),d=(0,Q.Fb)().isTourOpen,y=(0,p.useMemo)((function(){var e=u.search;return Ge().parse(e.startsWith("?")?e.substring(1):e)}),[u.search,d]),E=y.activeTab,f=void 0===E?d?ct.O.COLUMN_PROFILE:ct.O.TABLE_PROFILE:E,N=y.activeColumnFqn,v=(0,g.UO)().fqn,h=(0,a.CR)((0,p.useState)(),2),I=h[0],L=h[1],b=(0,p.useMemo)((function(){return{profile:null==I?void 0:I.profile,columns:(null==I?void 0:I.columns)||[]}}),[I]),S=b.profile,T=b.columns,j=(0,a.CR)((0,p.useState)(!1),2),C=j[0],A=j[1],D=(0,p.useRef)([]),w=(0,a.CR)((0,p.useState)([]),2),z=w[0],R=w[1],k=(0,a.CR)((0,p.useState)({tests:[],results:et.V}),2),U=k[0],Y=k[1],P=(0,a.CR)((0,p.useState)(""),2),G=P[0],V=P[1],H=(0,a.CR)((0,p.useState)(""),2),W=H[0],_=H[1],X=(0,a.CR)((0,p.useState)(!0),2),K=X[0],$=X[1],ee=(0,a.CR)((0,p.useState)(et.ve),2),te=ee[0],ne=ee[1],ae=(0,a.CR)((0,p.useState)(),2),ie=ae[0],le=ae[1],re=(0,a.CR)((0,p.useState)(!1),2),se=re[0],oe=re[1],ue=(0,a.CR)((0,p.useState)(!1),2),ce=ue[0],de=ue[1],me=f===ct.O.COLUMN_PROFILE,pe=f===ct.O.DATA_QUALITY,Me=f===ct.O.TABLE_PROFILE,ge=function(e){return o.push({search:Ge().stringify({activeTab:e})})},ye=(0,p.useMemo)((function(){var e=Object.values(at.M1).map((function(e){return{label:e,value:e}}));return e.unshift({label:s("label.all"),value:""}),e}),[]),Ee=(0,p.useMemo)((function(){return Me?$e.j.TABLE_PROFILE:pe?$e.j.DATA_QUALITY:(0,a.pi)((0,a.pi)({},$e.j.COLUMN_PROFILE),{header:(0,m.isEmpty)(N)?$e.j.COLUMN_PROFILE.header:p.createElement(O.Z,{className:"p-0 text-md font-medium",type:"link",onClick:function(){return ge(ct.O.COLUMN_PROFILE)}},p.createElement(r.Z,null,p.createElement(Fe.ReactComponent,{className:"transform-90",height:16,width:16}),$e.j.COLUMN_PROFILE.header))})}),[Me,pe,N]),fe=(0,p.useMemo)((function(){var e=(0,m.map)(it.py,(function(e,t){return{label:t,value:e}}));return e.unshift({label:s("label.all"),value:""}),e}),[]),Ne=n.ViewAll||n.ViewBasic||n.ViewTests,ve=n.ViewAll||n.ViewBasic||n.ViewDataProfile,he=n.EditAll||n.EditTests,Ie=n.EditAll||n.EditDataProfile,Le=function(e){A(e)},be=function(){var e;return(null==S?void 0:S.profileSampleType)===nt.KF.Percentage?(null!==(e=null==S?void 0:S.profileSample)&&void 0!==e?e:100)+"%":(null==S?void 0:S.profileSampleType)===nt.KF.Rows?(null==S?void 0:S.profileSample)+" "+((null==S?void 0:S.profileSampleType.toString().length)>1?s("label.row-plural"):s("label.row"))+" ":"100%"},Se=(0,p.useMemo)((function(){var e,t,n,a;return[{title:s("label.entity-count",{entity:s("label.row")}),value:null!==(e=null==S?void 0:S.rowCount)&&void 0!==e?e:0},{title:s("label.column-entity",{entity:s("label.count")}),value:null!==(n=null!==(t=null==S?void 0:S.columnCount)&&void 0!==t?t:null==I?void 0:I.columns.length)&&void 0!==n?n:0},{title:""+s("label.profile-sample-type",{type:""}),value:be()},{title:s("label.size"),value:(0,ot.RD)(null!==(a=null==S?void 0:S.sizeInByte)&&void 0!==a?a:0)},{title:s("label.created-date"),value:(null==S?void 0:S.createDateTime)?Pe.ou.fromJSDate(new Date(null==S?void 0:S.createDateTime)).toUTC().toFormat("MMM dd, yyyy HH:mm"):"--"}]}),[S]),Te=[{label:s("label.table-entity-text",{entityText:s("label.profile")}),key:ct.O.TABLE_PROFILE,disabled:!ve,icon:p.createElement(_e.ReactComponent,null)},{label:s("label.column-entity",{entity:s("label.profile")}),key:ct.O.COLUMN_PROFILE,disabled:!ve,icon:p.createElement(Be.ReactComponent,null)},{label:s("label.data-entity",{entity:s("label.quality")}),key:ct.O.DATA_QUALITY,disabled:!Ne,icon:p.createElement(He.ReactComponent,null)}],Ce=function(e){var t;o.push((0,st.OZ)(e,""+(null!==(t=(0,ot.p2)(v))&&void 0!==t?t:null==I?void 0:I.fullyQualifiedName)))},Ae=[{label:p.createElement(Ke.Z,{id:"table",name:s("label.table")}),key:"1",onClick:function(){return Ce(tt.xz.TABLE)}},{label:p.createElement(Ke.Z,{id:"column",name:s("label.column")}),key:"2",onClick:function(){return Ce(tt.xz.COLUMN)}}];(0,p.useEffect)((function(){(0,m.isUndefined)(f)&&ge(d?ct.O.COLUMN_PROFILE:ct.O.TABLE_PROFILE)}),[d]);var De=function(e){var t=[],n={tests:[],results:(0,a.pi)({},et.V)};e.forEach((function(e){var a;if(e.entityFQN===(null==I?void 0:I.fullyQualifiedName))return n.tests.push(e),void rt(n.results,(null===(a=e.testCaseResult)||void 0===a?void 0:a.testCaseStatus)||"");t.push(e)})),Y(n),R(t)},we=function(e){return(0,a.mG)(void 0,void 0,void 0,(function(){var t,n;return(0,a.Jh)(this,(function(i){switch(i.label){case 0:oe(!0),i.label=1;case 1:return i.trys.push([1,3,4,5]),[4,(0,lt.Cz)((0,a.pi)((0,a.pi)({},e),{fields:"testCaseResult, testDefinition",entityLink:(0,Ze.GJ)((0,ot.p2)(v)||""),includeAllTests:!0,limit:je.AL}))];case 2:return t=i.sent().data,D.current=t,De(t),[3,5];case 3:return n=i.sent(),(0,q.Eo)(n),[3,5];case 4:return oe(!1),[7];case 5:return[2]}}))}))},xe=(0,p.useCallback)((function(e){if(!(0,m.isUndefined)(e)){var t=D.current.map((function(t){return e.id===t.id?(0,a.pi)((0,a.pi)({},t),e):t}));De(t),D.current=t}}),[]),Oe=(0,p.useMemo)((function(){return(W===it.py.Table?U.tests:W===it.py.Column?z:(0,a.ev)((0,a.ev)([],(0,a.CR)(U.tests)),(0,a.CR)(z))).filter((function(e){var t;return""===G||(null===(t=e.testCaseResult)||void 0===t?void 0:t.testCaseStatus)===G}))}),[U,z,G]),ze=(0,p.useMemo)((function(){return(0,m.find)(T,(function(e){return e.fullyQualifiedName===N}))}),[T,N]),Qe=(0,p.useMemo)((function(){var e,t=(0,m.filter)(z,(function(e){return e.entityFQN===N}));return{statusDict:(0,a.pi)(((e={})[at.M1.Success]=[],e[at.M1.Aborted]=[],e[at.M1.Failed]=[],e),(0,m.groupBy)(t,"testCaseResult.testCaseStatus")),totalTests:t.length}}),[N,z]);return(0,p.useEffect)((function(){pe&&(0,m.isUndefined)(ie)?(0,a.mG)(void 0,void 0,void 0,(function(){var e,t;return(0,a.Jh)(this,(function(n){switch(n.label){case 0:$(!0),n.label=1;case 1:return n.trys.push([1,3,4,5]),[4,(0,J.gs)(v,F.GB.TESTSUITE)];case 2:return e=n.sent(),le(e.testSuite),[3,5];case 3:return t=n.sent(),(0,q.Eo)(t),[3,5];case 4:return $(!1),[7];case 5:return[2]}}))})):$(!1)}),[pe,ie]),(0,p.useEffect)((function(){Ne&&!d&&!Me&&(0,m.isEmpty)(D.current)&&we()}),[Ne,d,Me]),(0,p.useEffect)((function(){!t&&v&&!d&&(Me||me)&&(0,m.isUndefined)(I)?(0,a.mG)(void 0,void 0,void 0,(function(){var e,t,n;return(0,a.Jh)(this,(function(a){switch(a.label){case 0:e=decodeURIComponent(v),de(!0),a.label=1;case 1:return a.trys.push([1,3,4,5]),[4,(0,J.xp)(e)];case 2:return t=a.sent(),L(t),[3,5];case 3:return n=a.sent(),(0,q.Eo)(n),[3,5];case 4:return de(!1),[7];case 5:return[2]}}))})):$(!1),d&&L(B.cb.tableDetails)}),[v,d,Me,me]),p.createElement(i.Z,{className:"table-profiler-container h-full flex-grow","data-testid":"table-profiler-container",gutter:[16,16],id:"profilerDetails"},p.createElement(l.Z,{className:"p-t-sm data-quality-left-panel",span:4},p.createElement(ke.Z,{className:"h-full p-x-0 custom-menu","data-testid":"profiler-tab-left-panel",items:Te,mode:"inline",selectedKeys:[null!=f?f:ct.O.TABLE_PROFILE],onClick:function(e){ge(e.key)}})),p.createElement(l.Z,{className:"data-quality-content-panel",span:20},p.createElement(r.Z,{className:"w-full h-min-full p-sm",direction:"vertical",size:16},p.createElement(i.Z,null,p.createElement(l.Z,{span:10},p.createElement(ut.Z,{data:Ee})),p.createElement(l.Z,{span:14},p.createElement(r.Z,{align:"center",className:"w-full justify-end"},pe&&p.createElement(p.Fragment,null,p.createElement(Ue.Z.Item,{className:"m-0 w-40",label:s("label.type")},p.createElement(Ye.Z,{options:fe,value:W,onChange:function(e){e!==W&&_(e)}})),p.createElement(Ue.Z.Item,{className:"m-0 w-40",label:s("label.status")},p.createElement(Ye.Z,{options:ye,value:G,onChange:function(e){e!==G&&V(e)}}))),(Me||!(0,m.isEmpty)(N))&&p.createElement(Xe.Z,{showSelectedCustomRange:!0,handleDateRangeChange:function(e){(0,m.isEqual)(e,te)||ne(e)}}),!(0,m.isEmpty)(N)&&!t&&p.createElement(dt,{activeColumnFqn:N,columns:T,handleChange:function(e){return o.push({search:Ge().stringify({activeColumnFqn:e,activeTab:f})})}}),he&&!t&&p.createElement(Z.Z,{menu:{items:Ae},placement:"bottomRight",trigger:["click"]},p.createElement(O.Z,{"data-testid":"profiler-add-table-test-btn",type:"primary"},p.createElement(r.Z,null,s("label.add-entity",{entity:s("label.test")}),p.createElement(Re.Z,null)))),Ie&&!pe&&!t&&p.createElement(x.Z,{placement:"topRight",title:s("label.setting-plural")},p.createElement(O.Z,{className:"flex-center","data-testid":"profiler-setting-btn",onClick:function(){return Le(!0)}},p.createElement(We.ReactComponent,null)))))),(0,m.isUndefined)(S)&&!pe&&p.createElement("div",{className:"border d-flex items-center border-warning rounded-4 p-xs m-b-md","data-testid":"no-profiler-placeholder"},p.createElement(Je.ReactComponent,null),p.createElement("p",{className:"m-l-xs"},s("message.no-profiler-message"),p.createElement(Ve.Link,{target:"_blank",to:{pathname:"https://docs.open-metadata.org/connectors/ingestion/workflows/profiler"}},s("label.here-lowercase")+"."))),p.createElement(i.Z,{gutter:[16,16]},!(0,m.isUndefined)(ze)&&p.createElement(l.Z,{span:10},p.createElement(xt,{column:ze})),!pe&&p.createElement(l.Z,{span:ze?14:24},p.createElement(i.Z,{wrap:!0,className:c()(N?"justify-start":"justify-between"),gutter:[16,16]},Se.map((function(e){return p.createElement(l.Z,{key:e.title},p.createElement(qe.e,{className:c()(e.className,"h-full"),isLoading:K,showProgressBar:!1,title:e.title,total:0,value:e.value}))})),!(0,m.isEmpty)(N)&&(0,m.map)(Qe.statusDict,(function(e,t){return p.createElement(l.Z,{key:t},p.createElement(qe.e,{showProgressBar:!0,isLoading:K,title:t,total:Qe.totalTests,type:(0,m.toLower)(t),value:e.length}))}))))),me&&p.createElement(Dt,{columnTests:z,columns:T.map((function(e){return(0,a.pi)((0,a.pi)({},e),{key:e.name})})),dateRangeObject:te,hasEditAccess:he,isLoading:ce||K}),pe&&p.createElement(mn,{afterDeleteAction:we,isLoading:se||K,showTableColumn:!1,testCases:Oe,testSuite:ie,onTestCaseResultUpdate:function(e){Y((function(t){var n=t.tests.map((function(t){return t.fullyQualifiedName===e.fullyQualifiedName?e:t}));return(0,a.pi)((0,a.pi)({},t),{tests:n})}))},onTestUpdate:xe}),Me&&p.createElement(Ft.Z,{dateRangeObject:te}),C&&p.createElement(Ht,{columns:T,tableId:(null==I?void 0:I.id)||"",visible:C,onVisibilityChange:Le}))))},Mn=n(52114),gn=n(89434),yn=n(802),En=n(57112),fn=n(68623),Nn=n(71112),vn=n(16434),hn=n(273),In=n(6351),Ln=n(43633),bn=n(25577),Sn=n(15373),Tn=n(42290),jn=function(e){var t,n,o,u=e.query,c=e.onQueryUpdate,d=e.isLoading,m=e.permission,g=(0,M.$)().t,y=m.EditAll,E=m.EditDescription,f=m.EditOwner,N=m.EditTags,v=(0,a.CR)((0,p.useState)(!1),2),h=v[0],I=v[1];return p.createElement(hn.Z,{destroyOnClose:!0,open:!0,className:"query-right-panel",closable:!1,getContainer:!1,mask:!1,title:null,width:"100%"},d?p.createElement(C.Z,null):p.createElement(i.Z,{className:"m-y-md p-x-md",gutter:[16,40]},p.createElement(l.Z,{span:24},p.createElement(r.Z,{className:"relative",direction:"vertical",size:4},p.createElement(r.Z,{align:"center",className:"w-full",size:0},p.createElement(s.Z.Text,{className:"right-panel-label"},g("label.owner")),(y||f)&&p.createElement(Sn.C,{hasPermission:y||f,owner:u.owner,onUpdate:function(e){return(0,a.mG)(void 0,void 0,void 0,(function(){var t;return(0,a.Jh)(this,(function(n){switch(n.label){case 0:return t=(0,a.pi)((0,a.pi)({},u),{owner:e}),[4,c(t,"owner")];case 1:return n.sent(),[2]}}))}))}},p.createElement(O.Z,{className:"cursor-pointer flex-center","data-testid":"edit-owner",icon:p.createElement(he.ReactComponent,{color:je.MJ,width:"14px"}),size:"small",type:"text"}))),p.createElement("div",{"data-testid":"owner-name-container"},u.owner&&(0,De.C_)(u.owner)?p.createElement(r.Z,{className:"m-r-xss",size:4},p.createElement(bn.Z,{displayName:(0,De.C_)(u.owner),id:(null===(t=u.owner)||void 0===t?void 0:t.id)||"",name:(null===(n=u.owner)||void 0===n?void 0:n.name)||"",width:"20"}),p.createElement(Ve.Link,{"data-testid":"owner-link",to:(0,je.ZG)(null!==(o=u.owner.name)&&void 0!==o?o:"")},(0,De.C_)(u.owner))):p.createElement("span",{className:"text-grey-muted"},g("label.no-entity",{entity:g("label.owner-lowercase")}))))),p.createElement(l.Z,{span:24},p.createElement(r.Z,{direction:"vertical",size:4},p.createElement(r.Z,{align:"center",size:0},p.createElement(s.Z.Text,{className:"right-panel-label"},g("label.description")),(E||y)&&p.createElement(O.Z,{className:"flex-center p-0","data-testid":"edit-description-btn",icon:p.createElement(he.ReactComponent,{color:je.MJ,width:"14px"}),size:"small",type:"text",onClick:function(){return I(!0)}})),p.createElement(Ln.Z,{description:(null==u?void 0:u.description)||"",header:g("label.edit-entity",{entity:g("label.description")}),isEdit:h,onCancel:function(){return I(!1)},onDescriptionUpdate:function(e){return(0,a.mG)(void 0,void 0,void 0,(function(){var t;return(0,a.Jh)(this,(function(n){switch(n.label){case 0:return t=(0,a.pi)((0,a.pi)({},u),{description:e}),[4,c(t,"description")];case 1:return n.sent(),I(!1),[2]}}))}))}}))),p.createElement(l.Z,{span:24},p.createElement(Tn.Z,{editable:y||N,tags:(null==u?void 0:u.tags)||[],onTagsUpdate:function(e){return(0,a.mG)(void 0,void 0,void 0,(function(){var t;return(0,a.Jh)(this,(function(n){switch(n.label){case 0:return e?(t=(0,a.pi)((0,a.pi)({},u),{tags:e}),[4,c(t,"tags")]):[3,2];case 1:n.sent(),n.label=2;case 2:return[2]}}))}))}})),p.createElement(l.Z,{span:24},p.createElement(r.Z,{className:"m-b-md",direction:"vertical",size:4},p.createElement(s.Z.Text,{className:"right-panel-label","data-testid":"users"},g("label.user-plural")),u.users&&u.users.length?p.createElement(r.Z,{wrap:!0,size:6},u.users.map((function(e){var t;return p.createElement(r.Z,{className:"m-r-xss",key:e.id,size:4},p.createElement(bn.Z,{displayName:(0,De.C_)(e),id:e.id||"",name:e.name||"",textClass:"text-xs",width:"20"}),p.createElement(Ve.Link,{to:(0,je.ZG)(null!==(t=e.name)&&void 0!==t?t:"")},(0,De.C_)(e)))}))):p.createElement(s.Z.Paragraph,{className:"m-b-0 text-grey-muted"},g("label.no-entity",{entity:g("label.user-plural")})))),p.createElement(l.Z,{span:24},p.createElement(r.Z,{className:"m-b-md",direction:"vertical",size:4},p.createElement(s.Z.Text,{className:"right-panel-label","data-testid":"used-by"},g("label.used-by")),u.usedBy&&u.usedBy.length?p.createElement(r.Z,{wrap:!0,size:6},u.usedBy.map((function(e){return p.createElement(r.Z,{className:"m-r-xss",key:e,size:4},p.createElement(ve.Z,{component:In.ReactComponent}),e)}))):p.createElement(s.Z.Paragraph,{className:"m-b-0 text-grey-muted"},g("label.no-entity",{entity:g("label.used-by")}))))))},Cn=function(e){var t=e.isTableDeleted,n=e.tableId,o=(0,M.$)().t,u=(0,g.TH)(),c=(0,g.UO)().fqn,y=(0,g.k6)(),E=(0,p.useMemo)((function(){return(0,fn.Vj)(u.search)}),[u]),f=(0,a.CR)((0,p.useState)([]),2),N=f[0],v=f[1],h=(0,a.CR)((0,p.useState)(gn.O8),2),I=h[0],b=h[1],S=(0,a.CR)((0,p.useState)(gn.yC),2),T=S[0],j=S[1],A=(0,a.CR)((0,p.useState)(),2),Z=A[0],z=A[1],R=(0,a.CR)((0,p.useState)(un.Bd),2),k=R[0],U=R[1],Y=(0,yn.C)(),P=Y.currentPage,Q=Y.handlePageChange,V=Y.pageSize,B=Y.handlePageSizeChange,F=Y.paging,W=Y.handlePagingChange,J=Y.showPagination,_=(0,D.BL)(),X=_.getEntityPermission,K=_.permissions;(0,p.useEffect)((function(){(null==Z?void 0:Z.id)&&(0,a.mG)(void 0,void 0,void 0,(function(){var e,t;return(0,a.Jh)(this,(function(n){switch(n.label){case 0:if((0,m.isUndefined)(Z))return[2];b((function(e){return(0,a.pi)((0,a.pi)({},e),{rightPanel:!0})})),n.label=1;case 1:return n.trys.push([1,3,4,5]),[4,X(w.A.QUERY,null!==(t=Z.id)&&void 0!==t?t:"")];case 2:return e=n.sent(),U(e),[3,5];case 3:return n.sent(),(0,q.Eo)(o("server.fetch-entity-permissions-error",{entity:o("label.resource-permission-lowercase")})),[3,5];case 4:return b((function(e){return(0,a.pi)((0,a.pi)({},e),{rightPanel:!1})})),[7];case 5:return[2]}}))}))}),[Z]);var $=function(e){return(0,a.mG)(void 0,void 0,void 0,(function(){var t,n,i,l;return(0,a.Jh)(this,(function(r){switch(r.label){case 0:if((0,m.isUndefined)(Z))return[2];t=(0,d.qu)(Z,e),r.label=1;case 1:return r.trys.push([1,3,,4]),[4,(0,En.Id)(null!==(l=Z.id)&&void 0!==l?l:"",t)];case 2:return n=r.sent(),z((function(e){return e?(0,a.pi)((0,a.pi)({},e),n):n})),v((function(t){return t.map((function(t){return t.id===e.id?(0,a.pi)((0,a.pi)({},t),n):t}))})),[3,4];case 3:return i=r.sent(),(0,q.Eo)(i),[3,4];case 4:return[2]}}))}))},ee=function(e,t){return(0,a.mG)(void 0,void 0,void 0,(function(){var n,i;return(0,a.Jh)(this,(function(a){switch(a.label){case 0:return a.trys.push([0,3,,4]),[4,(0,En.gq)(null!=t?t:"",e)];case 1:return a.sent(),[4,(0,En.rc)(null!=t?t:"",{fields:"owner,votes,tags,queryUsedIn,users"})];case 2:return n=a.sent(),z(n),v((function(e){return e.map((function(e){return e.id===n.id?n:e}))})),[3,4];case 3:return i=a.sent(),(0,q.Eo)(i),[3,4];case 4:return[2]}}))}))},te=function(e,t){return(0,a.mG)(void 0,void 0,void 0,(function(){var i,l,r,s,o;return(0,a.Jh)(this,(function(u){switch(u.label){case 0:b((function(e){return(0,a.pi)((0,a.pi)({},e),{query:!0})})),u.label=1;case 1:return u.trys.push([1,3,4,5]),[4,(0,En.MR)((0,a.pi)((0,a.pi)({},e),{limit:V,entityId:n,fields:"owner,votes,tags,queryUsedIn,users"}))];case 2:return i=u.sent(),l=i.data,r=i.paging,0===l.length?j((function(e){return(0,a.pi)((0,a.pi)({},e),{page:!0})})):(v(l),s=E.query&&l.find((function(e){return e.id===E.query}))||l[0],z(s),W(r),y.push({search:(0,fn.VJ)({tableId:n,after:null==e?void 0:e.after,query:s.id,queryFrom:t})})),[3,5];case 3:return o=u.sent(),(0,q.Eo)(o),j((function(e){return(0,a.pi)((0,a.pi)({},e),{page:!0})})),[3,5];case 4:return b((function(e){return(0,a.pi)((0,a.pi)({},e),{query:!1})})),[7];case 5:return[2]}}))}))},ne=function(e){e.id!==(null==Z?void 0:Z.id)&&(b((function(e){return(0,a.pi)((0,a.pi)({},e),{rightPanel:!0})})),z(e),y.push({search:Ge().stringify((0,a.pi)((0,a.pi)({},E),{query:e.id}))}))};(0,p.useEffect)((function(){b((function(e){return(0,a.pi)((0,a.pi)({},e),{page:!0})})),n&&!t?te({after:null==E?void 0:E.after}).finally((function(){b((function(e){return(0,a.pi)((0,a.pi)({},e),{page:!1})}))})):(b((function(e){return(0,a.pi)((0,a.pi)({},e),{page:!1,query:!1})})),j(gn.yC))}),[n,V,t]);var ae=function(){y.push((0,st.$0)(c))},ie=p.createElement(x.Z,{placement:"top",title:!(null==K?void 0:K.query.Create)&&Mn.oH},p.createElement(O.Z,{"data-testid":"add-query-btn",disabled:!(null==K?void 0:K.query.Create),type:"primary",onClick:ae},o("label.add")));if(I.page)return p.createElement(C.Z,null);if(T.page)return p.createElement("div",{className:"flex-center font-medium mt-24","data-testid":"no-queries"},p.createElement(L.Z,{buttonId:"add-query-btn",doc:G.Ul,heading:o("label.query-lowercase-plural"),permission:null==K?void 0:K.query.Create,type:H.Wx.CREATE,onClick:ae}));if(t)return p.createElement("div",{className:"flex-center font-medium mt-24","data-testid":"no-queries"},p.createElement(L.Z,{type:H.Wx.CUSTOM},o("message.field-data-is-not-available-for-deleted-entities",{field:o("label.query-plural")})));var le=T.search?p.createElement(l.Z,{className:"flex-center font-medium mt-24","data-testid":"no-queries",span:24},p.createElement(L.Z,null,p.createElement(s.Z.Paragraph,null,o("message.adding-new-entity-is-easy-just-give-it-a-spin",{entity:o("label.query-lowercase-plural")})))):N.map((function(e){return p.createElement(l.Z,{"data-testid":"query-card",key:e.id,span:24},p.createElement(vn.Z,{afterDeleteAction:te,isExpanded:!1,permission:k,query:e,selectedId:null==Z?void 0:Z.id,onQuerySelection:ne,onQueryUpdate:$,onUpdateVote:ee}))}));return p.createElement(i.Z,{gutter:8,id:"tablequeries",wrap:!1},p.createElement(l.Z,{flex:"auto"},p.createElement(i.Z,{className:"p-x-md m-t-md","data-testid":"queries-container",gutter:[8,16]},p.createElement(l.Z,{span:24},p.createElement(r.Z,{className:"justify-end w-full"},ie)),I.query?p.createElement(C.Z,null):le,p.createElement(l.Z,{span:24},J&&p.createElement(Nn.Z,{currentPage:P,pageSize:V,paging:F,pagingHandler:function(e){var t,n=e.cursorType,a=e.currentPage;n&&(te(((t={})[n]=F[n],t),a),Q(a))},onShowSizeChange:B})))),p.createElement(l.Z,{flex:"400px"},Z&&p.createElement(jn,{isLoading:I.rightPanel,permission:k,query:Z,onQueryUpdate:$})))},An=n(24854),Dn=n(1727),wn=n(73213),Zn=n(31615),xn=n(90058),On=n(76373),zn=n(63406),Rn=n(73553),kn=n(41248),Un={};Un.styleTagTransform=de(),Un.setAttributes=se(),Un.insert=le().bind(null,"head"),Un.domAPI=ae(),Un.insertStyleElement=ue(),te()(kn.Z,Un),kn.Z&&kn.Z.locals&&kn.Z.locals;var Yn=function(e){var t=e.joinedTables,n=(0,M.$)().t;return p.createElement(i.Z,{className:"m-b-lg",gutter:[0,8]},p.createElement(l.Z,{className:"m-b",span:24},p.createElement(s.Z.Text,{className:"right-panel-label"},n("label.frequently-joined-table-plural"))),p.createElement(l.Z,{className:"frequently-joint-data-container",span:24},t.map((function(e){return p.createElement(r.Z,{className:"w-full frequently-joint-data","data-testid":"related-tables-data",key:e.name,size:4},p.createElement(Ve.Link,{to:(0,je.Gn)(e.fullyQualifiedName)},p.createElement(s.Z.Text,{className:"frequently-joint-name"},e.name)),(0,_.yh)(e.joinCount,"",!1))}))))},Pn=function(e){var t,n=e.tablePartition;return p.createElement(r.Z,{className:"p-b-sm",direction:"vertical"},p.createElement(s.Z.Text,{className:"right-panel-label"},(0,R.t)("label.table-partitioned")),p.createElement(s.Z.Text,null,(0,R.t)("label.interval")+" - "+n.intervalType),p.createElement(r.Z,null,(0,R.t)("label.column-plural")+" -\n        "+(null===(t=n.columns)||void 0===t?void 0:t.map((function(e){return e})))))},Qn=n(95468),Gn={};Gn.styleTagTransform=de(),Gn.setAttributes=se(),Gn.insert=le().bind(null,"head"),Gn.domAPI=ae(),Gn.insertStyleElement=ue(),te()(Qn.Z,Gn),Qn.Z&&Qn.Z.locals&&Qn.Z.locals;var Vn=n(53014),Bn=n(87208),Hn=n(66146),Fn=function(){var e=(0,M.$)().t;return p.createElement("div",{className:"constraint-foreign-key"},p.createElement("img",{className:"foreign-key-section-line",src:Hn.default,width:"100%"}),p.createElement(x.Z,{placement:"bottom",title:e("label.foreign-key"),trigger:"hover"},p.createElement(Vn.Z,{alt:"foreign-key",className:"foreign-key-icon",component:Bn.ReactComponent})))},Wn=n(93447),Jn=function(){var e=(0,M.$)().t;return p.createElement("div",{className:"constraint-primary-key"},p.createElement("img",{className:"primary-key-section-line",src:Hn.default}),p.createElement(x.Z,{placement:"bottom",title:e("label.primary-key"),trigger:"hover"},p.createElement(Vn.Z,{alt:"primary-key",className:"primary-key-icon",component:Wn.ReactComponent})))},_n=n(52058),qn={};qn.styleTagTransform=de(),qn.setAttributes=se(),qn.insert=le().bind(null,"head"),qn.domAPI=ae(),qn.insertStyleElement=ue(),te()(_n.Z,qn),_n.Z&&_n.Z.locals&&_n.Z.locals;var Xn=function(e){var t=e.constraints,n=(0,M.$)().t,a=(0,p.useMemo)((function(){var e;return null!==(e=null==t?void 0:t.filter((function(e){return Ce.c.includes(e.constraintType)})))&&void 0!==e?e:[]}),[t]);return(0,m.isEmpty)(a)?null:p.createElement(r.Z,{className:"p-b-sm",direction:"vertical"},p.createElement(s.Z.Text,{className:"right-panel-label"},n("label.table-constraints")),a.map((function(e){var t=e.constraintType,n=e.columns,a=e.referredColumns;return t===nt.a.PrimaryKey?p.createElement("div",{className:"d-flex constraint-columns"},p.createElement(r.Z,{className:"constraint-icon-container",direction:"vertical",size:0},null==n?void 0:n.map((function(e,t){var a;return p.createElement(p.Fragment,{key:e},(null!==(a=null==n?void 0:n.length)&&void 0!==a?a:0)-1!==t?p.createElement(Jn,null):null)}))),p.createElement(r.Z,{direction:"vertical",size:16},null==n?void 0:n.map((function(e){return p.createElement(s.Z.Text,{className:"w-60",ellipsis:{tooltip:!0},key:e},e)})))):t===nt.a.ForeignKey?p.createElement(r.Z,{className:"constraint-columns"},p.createElement(Fn,null),p.createElement(r.Z,{direction:"vertical",size:16},p.createElement(s.Z.Text,null,null==n?void 0:n.join(", ")),p.createElement("div",{"data-testid":"referred-column-name"},(0,m.map)(a,(function(e){return p.createElement(x.Z,{placement:"top",title:e,trigger:"hover"},p.createElement(Ve.Link,{className:"no-underline",to:(0,Ze.Ch)(F.py.TABLE,(0,_.Td)(e,[F.ih.Service,F.ih.Database,F.ih.Schema,F.ih.Table],wn.o))},p.createElement(s.Z.Text,{className:"truncate referred-column-name"},e)))}))))):null})))},Kn=(0,N.w)((function(){var e,t=(0,Q.Fb)(),n=t.isTourOpen,u=t.activeTabForTourDatasetPage,N=t.isTourPage,Z=(0,v.Eu)().currentUser,x=(0,a.CR)((0,p.useState)(),2),O=x[0],z=x[1],R=(0,g.UO)(),k=R.fqn,U=R.tab,Y=void 0===U?F.M8.SCHEMA:U,P=(0,M.$)().t,G=(0,g.k6)(),V=null!==(e=null==Z?void 0:Z.id)&&void 0!==e?e:"",W=(0,a.CR)((0,p.useState)(0),2),X=W[0],K=W[1],$=(0,a.CR)((0,p.useState)(!1),2),ee=$[0],te=$[1],ne=(0,a.CR)((0,p.useState)(""),2),ae=ne[0],ie=ne[1],le=(0,a.CR)((0,p.useState)(Zn.Th.Conversation),2),re=le[0],se=le[1],oe=(0,a.CR)((0,p.useState)(0),2),ue=oe[0],ce=oe[1],de=(0,a.CR)((0,p.useState)(!n),2),me=de[0],pe=de[1],Me=(0,a.CR)((0,p.useState)(un.Bd),2),ge=Me[0],ye=Me[1],Ee=(0,p.useMemo)((function(){return ge.ViewAll||ge.ViewUsage}),[ge]),Ne=(0,p.useMemo)((function(){return encodeURIComponent((0,_.Td)(decodeURIComponent(k),[F.ih.Service,F.ih.Database,F.ih.Schema,F.ih.Table],wn.o))}),[k]),ve=(0,p.useMemo)((function(){return(0,ot.p2)(k)}),[k]),he=function(){return(0,a.mG)(void 0,void 0,void 0,(function(){var e,t,n;return(0,a.Jh)(this,(function(a){switch(a.label){case 0:pe(!0),a.label=1;case 1:return a.trys.push([1,3,4,5]),e=zn.h,Ee&&(e+=","+F.GB.USAGE_SUMMARY),[4,(0,J.gs)(Ne,e)];case 2:return t=a.sent(),z(t),(0,_.nk)({displayName:(0,De.C_)(t),entityType:F.py.TABLE,fqn:null!==(n=t.fullyQualifiedName)&&void 0!==n?n:"",serviceType:t.serviceType,timestamp:0,id:t.id}),[3,5];case 3:return a.sent(),[3,5];case 4:return pe(!1),[7];case 5:return[2]}}))}))},Ie=function(){te(!0)},Le=function(){te(!1)},be=(0,y.$J)(),Se=be.postFeed,Te=be.deleteFeed,Ce=be.updateFeed,Ae=(0,p.useMemo)((function(){var e,t,n;if(O){var i=O.tags,l=(null!=O?O:{}).joins,r=(0,a.ev)((0,a.ev)([],(0,a.CR)(null!==(t=null===(e=null==l?void 0:l.columnJoins)||void 0===e?void 0:e.flatMap((function(e){var t,n;return null!==(n=null===(t=e.joinedWith)||void 0===t?void 0:t.map((function(e){return{fullyQualifiedName:(0,_.S8)(e.fullyQualifiedName),joinCount:e.joinCount}})))&&void 0!==n?n:[]})))&&void 0!==t?t:[])),(0,a.CR)(null!==(n=null==l?void 0:l.directTableJoins)&&void 0!==n?n:[])).reduce((function(e,t){var n,i;return(0,a.pi)((0,a.pi)({},e),((n={})[t.fullyQualifiedName]=(null!==(i=e[t.fullyQualifiedName])&&void 0!==i?i:0)+t.joinCount,n))}),{});return(0,a.pi)((0,a.pi)({},O),{tier:(0,Ze.Zk)(null!=i?i:[]),tableTags:(0,Ze.nD)(null!=i?i:[]),entityName:(0,De.C_)(O),joinedTables:Object.entries(r).map((function(e){var t=(0,a.CR)(e,2),n=t[0];return{fullyQualifiedName:n,joinCount:t[1],name:(0,_.Td)(n,[F.ih.Database,F.ih.Table],wn.o)}})).sort((function(e,t){return t.joinCount-e.joinCount}))})}return{}}),[O,null==O?void 0:O.tags]),we=Ae.tier,xe=Ae.tableTags,Oe=Ae.owner,Re=Ae.deleted,ke=Ae.version,Ue=Ae.followers,Ye=void 0===Ue?[]:Ue,Pe=Ae.description,Qe=Ae.entityName,Ge=Ae.joinedTables,Ve=void 0===Ge?[]:Ge,Be=Ae.id,He=void 0===Be?"":Be,Fe=(0,D.BL)().getEntityPermissionByFqn,We=(0,p.useCallback)((function(e){return(0,a.mG)(void 0,void 0,void 0,(function(){var t;return(0,a.Jh)(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,3,4]),[4,Fe(w.A.TABLE,e)];case 1:return t=n.sent(),ye(t),[3,4];case 2:return n.sent(),(0,q.Eo)(P("server.fetch-entity-permissions-error",{entity:P("label.resource-permission-lowercase")})),[3,4];case 3:return pe(!1),[7];case 4:return[2]}}))}))}),[Fe,ye]);(0,p.useEffect)((function(){Ne&&We(Ne)}),[Ne]);var Je=function(){(0,_.Aq)(F.py.TABLE,ve,K)},_e=(0,p.useCallback)((function(e){if(!O)return e;var t=(0,d.qu)(O,e);return(0,J.JD)(He,t)}),[O,He]),qe=function(e,t){return(0,a.mG)(void 0,void 0,void 0,(function(){var n,i;return(0,a.Jh)(this,(function(l){switch(l.label){case 0:return l.trys.push([0,2,,3]),[4,_e(e)];case 1:return n=l.sent(),z((function(e){var i,l,r;if(e){if("tags"===t)return(0,a.pi)((0,a.pi)({},e),((i={version:n.version})[t]=(0,_.ch)(null!==(r=n.tags)&&void 0!==r?r:[]),i));var s=(0,a.pi)((0,a.pi)({},e),((l={version:n.version})[t]=n[t],l));return void 0===n[t]&&delete s[t],s}})),Je(),[3,3];case 2:return i=l.sent(),(0,q.Eo)(i),[3,3];case 3:return[2]}}))}))},Xe=(0,p.useCallback)((function(e){return(0,a.mG)(void 0,void 0,void 0,(function(){var t;return(0,a.Jh)(this,(function(n){switch(n.label){case 0:return O?(t=(0,a.pi)((0,a.pi)({},O),{owner:e?(0,a.pi)((0,a.pi)({},Oe),e):void 0}),[4,qe(t,"owner")]):[2];case 1:return n.sent(),[2]}}))}))}),[Oe,O]),$e=function(e){return(0,a.mG)(void 0,void 0,void 0,(function(){var t;return(0,a.Jh)(this,(function(n){switch(n.label){case 0:return O?Pe===e?[3,2]:(t=(0,a.pi)((0,a.pi)({},O),{description:e}),[4,qe(t,"description")]):[2];case 1:return n.sent(),te(!1),[3,3];case 2:te(!1),n.label=3;case 3:return[2]}}))}))},et=function(e){return(0,a.mG)(void 0,void 0,void 0,(function(){var t;return(0,a.Jh)(this,(function(n){switch(n.label){case 0:return!O||(0,m.isEqual)(O.columns,e)?[3,2]:(t=(0,a.pi)((0,a.pi)({},O),{columns:e}),[4,qe(t,"columns")]);case 1:n.sent(),n.label=2;case 2:return[2]}}))}))},tt=function(e,t){ie(e),t&&se(t)},nt=function(e){return(0,a.mG)(void 0,void 0,void 0,(function(){var t,n;return(0,a.Jh)(this,(function(i){switch(i.label){case 0:return e&&O?(t=(0,a.ev)((0,a.ev)([],(0,a.CR)(we?[we]:[])),(0,a.CR)(e)),n=(0,a.pi)((0,a.pi)({},O),{tags:t}),[4,qe(n,"tags")]):[3,2];case 1:i.sent(),i.label=2;case 2:return[2]}}))}))},at=function(e){return(0,a.mG)(void 0,void 0,void 0,(function(){var t;return(0,a.Jh)(this,(function(n){switch(n.label){case 0:return t=(0,Rn.eY)(e),[4,nt(t)];case 1:return n.sent(),[2]}}))}))},it=function(e){return(0,a.mG)(void 0,void 0,void 0,(function(){return(0,a.Jh)(this,(function(t){switch(t.label){case 0:return O?[4,_e((0,a.pi)((0,a.pi)({},O),{extension:e.extension}))]:[3,2];case 1:t.sent(),t.label=2;case 2:return[2]}}))}))},lt=(0,p.useMemo)((function(){return{editTagsPermission:(ge.EditTags||ge.EditAll)&&!Re,editDescriptionPermission:(ge.EditDescription||ge.EditAll)&&!Re,editCustomAttributePermission:(ge.EditAll||ge.EditCustomFields)&&!Re,editAllPermission:ge.EditAll&&!Re,editLineagePermission:(ge.EditAll||ge.EditLineage)&&!Re,viewSampleDataPermission:ge.ViewAll||ge.ViewSampleData,viewQueriesPermission:ge.ViewAll||ge.ViewQueries,viewProfilerPermission:ge.ViewAll||ge.ViewDataProfile||ge.ViewTests,viewAllPermission:ge.ViewAll,viewBasicPermission:ge.ViewAll||ge.ViewBasic}}),[ge,Re]),rt=lt.editTagsPermission,st=lt.editDescriptionPermission,ut=lt.editCustomAttributePermission,ct=lt.editAllPermission,dt=lt.editLineagePermission,mt=lt.viewSampleDataPermission,pt=lt.viewQueriesPermission,Mt=lt.viewProfilerPermission,gt=lt.viewAllPermission,yt=lt.viewBasicPermission,Et=(0,p.useMemo)((function(){var e,t,n,a;return p.createElement(i.Z,{className:c()({"h-70vh overflow-hidden":N}),gutter:[0,16],id:"schemaDetails",wrap:!1},p.createElement(l.Z,{className:"p-t-sm m-l-lg tab-content-height p-r-lg",flex:"auto"},p.createElement("div",{className:"d-flex flex-col gap-4"},p.createElement(I.Z,{description:null==O?void 0:O.description,entityFqn:ve,entityName:Qe,entityType:F.py.TABLE,hasEditAccess:st,isEdit:ee,owner:null==O?void 0:O.owner,showActions:!Re,onCancel:Le,onDescriptionEdit:Ie,onDescriptionUpdate:$e,onThreadLinkSelect:tt}),p.createElement(ze,{columnName:(0,_.Td)(Ne,[F.ih.Column],wn.o),columns:null!==(e=null==O?void 0:O.columns)&&void 0!==e?e:[],entityFqn:ve,hasDescriptionEditAccess:st,hasTagEditAccess:rt,isReadOnly:Re,joins:null!==(n=null===(t=null==O?void 0:O.joins)||void 0===t?void 0:t.columnJoins)&&void 0!==n?n:[],tableConstraints:null==O?void 0:O.tableConstraints,onThreadLinkSelect:tt,onUpdate:et}))),p.createElement(l.Z,{className:"entity-tag-right-panel-container","data-testid":"entity-right-panel",flex:"320px"},(0,m.isEmpty)(Ve)?null:p.createElement(Yn,{joinedTables:Ve}),p.createElement(r.Z,{className:"w-full",direction:"vertical",size:"large"},p.createElement(T.Z,{activeDomain:null==O?void 0:O.domain,dataProducts:null!==(a=null==O?void 0:O.dataProducts)&&void 0!==a?a:[],hasPermission:!1}),p.createElement(An.Z,{displayType:Dn.F.READ_MORE,entityFqn:ve,entityType:F.py.TABLE,permission:rt,selectedTags:xe,tagType:xn.c6.Classification,onSelectionChange:at,onThreadLinkSelect:tt}),p.createElement(An.Z,{displayType:Dn.F.READ_MORE,entityFqn:ve,entityType:F.py.TABLE,permission:rt,selectedTags:xe,tagType:xn.c6.Glossary,onSelectionChange:at,onThreadLinkSelect:tt}),p.createElement(Xn,{constraints:null==O?void 0:O.tableConstraints}),(null==O?void 0:O.tablePartition)?p.createElement(Pn,{tablePartition:O.tablePartition}):null)))}),[ee,O,Ie,$e,rt,st,ct]),ft=(0,p.useMemo)((function(){var e,t,a,i,l,o,u,c,d,M,g,y,f,N;return[{label:p.createElement(Ke.Z,{id:F.M8.SCHEMA,name:P("label.schema")}),key:F.M8.SCHEMA,children:Et},{label:p.createElement(Ke.Z,{count:X,id:F.M8.ACTIVITY_FEED,isActive:Y===F.M8.ACTIVITY_FEED,name:P("label.activity-feed-and-task-plural")}),key:F.M8.ACTIVITY_FEED,children:p.createElement(E.K,{columns:null==O?void 0:O.columns,entityType:F.py.TABLE,fqn:null!==(e=null==O?void 0:O.fullyQualifiedName)&&void 0!==e?e:"",owner:null==O?void 0:O.owner,onFeedUpdate:Je,onUpdateEntityDetails:he})},{label:p.createElement(Ke.Z,{id:F.M8.SAMPLE_DATA,name:P("label.sample-data")}),key:F.M8.SAMPLE_DATA,children:n||mt?p.createElement(fe,{isTableDeleted:Re,ownerId:null!==(a=null===(t=null==O?void 0:O.owner)||void 0===t?void 0:t.id)&&void 0!==a?a:"",permissions:ge,tableId:null!==(i=null==O?void 0:O.id)&&void 0!==i?i:""}):p.createElement(L.Z,{type:H.Wx.PERMISSION})},{label:p.createElement(Ke.Z,{count:ue,id:F.M8.TABLE_QUERIES,isActive:Y===F.M8.TABLE_QUERIES,name:P("label.query-plural")}),key:F.M8.TABLE_QUERIES,children:pt?p.createElement(Cn,{isTableDeleted:Re,tableId:null!==(l=null==O?void 0:O.id)&&void 0!==l?l:""}):p.createElement(L.Z,{type:H.Wx.PERMISSION})},{label:p.createElement(Ke.Z,{id:F.M8.PROFILER,name:P("label.profiler-amp-data-quality")}),key:F.M8.PROFILER,children:n||Mt?p.createElement(pn,{isTableDeleted:Re,permissions:ge}):p.createElement(L.Z,{type:H.Wx.PERMISSION})},{label:p.createElement(Ke.Z,{id:F.M8.LINEAGE,name:P("label.lineage")}),key:F.M8.LINEAGE,children:p.createElement(j.Z,{deleted:Re,entity:O,entityType:F.py.TABLE,hasEditAccess:dt})},{label:p.createElement(Ke.Z,{id:F.M8.DBT,name:P("label.dbt-lowercase")}),isHidden:!(null!==(u=null===(o=null==O?void 0:O.dataModel)||void 0===o?void 0:o.sql)&&void 0!==u?u:null===(c=null==O?void 0:O.dataModel)||void 0===c?void 0:c.rawSql),key:F.M8.DBT,children:p.createElement(b.Z,{sqlQuery:null!==(y=null!==(M=null===(d=null==O?void 0:O.dataModel)||void 0===d?void 0:d.sql)&&void 0!==M?M:null===(g=null==O?void 0:O.dataModel)||void 0===g?void 0:g.rawSql)&&void 0!==y?y:"",title:p.createElement(r.Z,{className:"p-y-xss"},p.createElement(s.Z.Text,{className:"text-grey-muted"},P("label.path")+":"),p.createElement(s.Z.Text,null,null===(f=null==O?void 0:O.dataModel)||void 0===f?void 0:f.path))})},{label:p.createElement(Ke.Z,{id:F.M8.VIEW_DEFINITION,name:P("label.view-definition")}),isHidden:(0,m.isUndefined)(null==O?void 0:O.viewDefinition),key:F.M8.VIEW_DEFINITION,children:p.createElement(b.Z,{sqlQuery:null!==(N=null==O?void 0:O.viewDefinition)&&void 0!==N?N:""})},{label:p.createElement(Ke.Z,{id:F.M8.CUSTOM_PROPERTIES,name:P("label.custom-property-plural")}),key:F.M8.CUSTOM_PROPERTIES,children:p.createElement(h.t,{entityType:F.py.TABLE,handleExtensionUpdate:it,hasEditAccess:ut,hasPermission:gt})}].filter((function(e){return!e.isHidden}))}),[Et,ge,Y,Et,Re,O,X,Qe,it,Je,null==O?void 0:O.dataModel,gt,ut,mt,pt,Mt,dt]),Nt=(0,p.useCallback)((function(e){return(0,a.mG)(void 0,void 0,void 0,(function(){var t,n;return(0,a.Jh)(this,(function(i){switch(i.label){case 0:return O?(t=(0,Rn.Jf)(xe,e),n=(0,a.pi)((0,a.pi)({},O),{tags:t}),[4,qe(n,"tags")]):[3,2];case 1:i.sent(),i.label=2;case 2:return[2]}}))}))}),[O,qe,xe]),vt=function(){z((function(e){return e?(0,a.pi)((0,a.pi)({},e),{deleted:!(null==e?void 0:e.deleted)}):e}))},ht=(0,p.useCallback)((function(){return(0,a.mG)(void 0,void 0,void 0,(function(){var e,t,n,i;return(0,a.Jh)(this,(function(l){switch(l.label){case 0:return l.trys.push([0,2,,3]),[4,(0,J.vs)(He,V)];case 1:return e=l.sent(),t=e.changeDescription.fieldsAdded[0].newValue,n=(0,a.ev)((0,a.ev)([],(0,a.CR)(null!=Ye?Ye:[])),(0,a.CR)(t)),z((function(e){return e?(0,a.pi)((0,a.pi)({},e),{followers:n}):e})),Je(),[3,3];case 2:return i=l.sent(),(0,q.Eo)(i,P("server.entity-follow-error",{entity:(0,De.C_)(O)})),[3,3];case 3:return[2]}}))}))}),[V,He,z,Je]),It=(0,p.useCallback)((function(){return(0,a.mG)(void 0,void 0,void 0,(function(){var e,t,n;return(0,a.Jh)(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,(0,J.mM)(He,V)];case 1:return e=i.sent(),t=e.changeDescription.fieldsDeleted[0].oldValue,z((function(e){var n;return e?(0,a.pi)((0,a.pi)({},e),{followers:null===(n=e.followers)||void 0===n?void 0:n.filter((function(e){return e.id!==t[0].id}))}):e})),Je(),[3,3];case 2:return n=i.sent(),(0,q.Eo)(n,P("server.entity-unfollow-error",{entity:(0,De.C_)(O)})),[3,3];case 3:return[2]}}))}))}),[V,He,Je,z]),Lt=(0,p.useMemo)((function(){return{isFollowing:null==Ye?void 0:Ye.some((function(e){return e.id===V}))}}),[Ye,V]).isFollowing,bt=(0,p.useCallback)((function(){return(0,a.mG)(void 0,void 0,void 0,(function(){return(0,a.Jh)(this,(function(e){switch(e.label){case 0:return Lt?[4,It()]:[3,2];case 1:return e.sent(),[3,4];case 2:return[4,ht()];case 3:e.sent(),e.label=4;case 4:return[2]}}))}))}),[Lt,It,ht]),St=(0,p.useCallback)((function(){ke&&G.push((0,je.h4)(F.py.TABLE,Ne,ke+""))}),[ke]),Tt=(0,p.useCallback)((function(e){return e?vt():G.push("/")}),[]),jt=(0,p.useCallback)((function(e){var t=e;z((function(e){return(0,a.pi)((0,a.pi)({},null!=e?e:t),{version:t.version})}))}),[]);return(0,p.useEffect)((function(){n||N?z(B.cb.tableDetails):yt&&(he(),Je())}),[Ne,n,N,ge]),(0,p.useEffect)((function(){O&&(0,a.mG)(void 0,void 0,void 0,(function(){var e;return(0,a.Jh)(this,(function(t){switch(t.label){case 0:if(!(null==O?void 0:O.id))return[2];t.label=1;case 1:return t.trys.push([1,3,,4]),[4,(0,En.MR)({limit:0,entityId:O.id})];case 2:return e=t.sent(),ce(e.paging.total),[3,4];case 3:return t.sent(),ce(0),[3,4];case 4:return[2]}}))}))}),[null==O?void 0:O.fullyQualifiedName]),me?p.createElement(C.Z,null):n||N||yt?O?p.createElement(A.Z,{className:"bg-white",pageTitle:P("label.entity-detail-plural",{entity:P("label.table")}),title:"Table details"},p.createElement(i.Z,{gutter:[0,12]},p.createElement(l.Z,{className:"p-x-lg","data-testid":"entity-page-header",span:24},p.createElement(S.U$,{afterDeleteAction:Tt,afterDomainUpdateAction:jt,dataAsset:O,entityType:F.py.TABLE,permissions:ge,onDisplayNameUpdate:function(e){return(0,a.mG)(void 0,void 0,void 0,(function(){var t;return(0,a.Jh)(this,(function(n){switch(n.label){case 0:return O?(t=(0,a.pi)((0,a.pi)({},O),{displayName:e.displayName}),[4,qe(t,"displayName")]):[2];case 1:return n.sent(),[2]}}))}))},onFollowClick:bt,onOwnerUpdate:Xe,onRestoreDataAsset:function(){return(0,a.mG)(void 0,void 0,void 0,(function(){var e,t;return(0,a.Jh)(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,(0,J.z7)(null!==(t=null==O?void 0:O.id)&&void 0!==t?t:"")];case 1:return n.sent(),(0,q.XA)(P("message.restore-entities-success",{entity:P("label.table")}),2e3),vt(),[3,3];case 2:return e=n.sent(),(0,q.Eo)(e,P("message.restore-entities-error",{entity:P("label.table")})),[3,3];case 3:return[2]}}))}))},onTierUpdate:Nt,onUpdateVote:function(e,t){return(0,a.mG)(void 0,void 0,void 0,(function(){var n,i;return(0,a.Jh)(this,(function(a){switch(a.label){case 0:return a.trys.push([0,3,,4]),[4,(0,J.jN)(t,e)];case 1:return a.sent(),[4,(0,J.gs)(Ne,zn.h)];case 2:return n=a.sent(),z(n),[3,4];case 3:return i=a.sent(),(0,q.Eo)(i),[3,4];case 4:return[2]}}))}))},onVersionClick:St})),p.createElement(l.Z,{span:24},p.createElement(o.Z,{destroyInactiveTabPane:!0,activeKey:n?u:null!=Y?Y:F.M8.SCHEMA,className:"table-details-page-tabs","data-testid":"tabs",items:ft,onChange:function(e){e!==Y&&(n||G.push((0,je.DV)(Ne,e)))}})),ae?p.createElement(f.Z,{createThread:function(e){return(0,a.mG)(void 0,void 0,void 0,(function(){var t;return(0,a.Jh)(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,(0,On.Kl)(e)];case 1:return n.sent(),Je(),[3,3];case 2:return t=n.sent(),(0,q.Eo)(t,P("server.create-entity-error",{entity:P("label.conversation")})),[3,3];case 3:return[2]}}))}))},deletePostHandler:Te,open:Boolean(ae),postFeedHandler:Se,threadLink:ae,threadType:re,updateThreadHandler:Ce,onCancel:function(){ie("")}}):null)):p.createElement(L.Z,{className:"m-0"}):p.createElement(L.Z,{type:H.Wx.PERMISSION})}))},81787:function(e,t,n){n.d(t,{Z:function(){return I}});var a=n(94199),i=n(19650),l=n(96486),r=n(67294),s=n(68432),o=n(15137),u=n(7873),c=n(73213),d=n(62761),m=n(58968),p=n(58369),M=n(90058),g=n(93895),y=n(70655),E=n(23031),f=n(90386),N=n(24671),v={height:14,name:"comments",width:14,style:{color:d.MJ}},h=n(86385),I=function(e){var t=e.data,n=e.tagSource,I=e.entityFqn,L=e.entityType,b=e.entityTaskType,S=e.onThreadLinkSelect,T=(0,s.$)().t,j=(0,o.k6)(),C=(0,r.useMemo)((function(){return(0,h.AI)(L)}),[L]),A=C.fqnPart,D=C.entityField,w=(0,r.useMemo)((function(){var e,n=(0,g.Td)(null!==(e=t.fqn)&&void 0!==e?e:"",A);return n.includes(c.o)?'"'+n+'"':n}),[t.fqn]),Z=(0,r.useMemo)((function(){var e=!(0,l.isEmpty)(t.field);return r.createElement(a.Z,{destroyTooltipOnHide:!0,overlayClassName:"ant-popover-request-description",title:e?m.Hf[b].update:m.Hf[b].request},r.createElement(u.ReactComponent,{className:"hover-cell-icon cursor-pointer","data-testid":"task-element",height:14,name:T("label.request-tag-plural"),style:{color:d.MJ},width:14,onClick:function(){return function(e){b===p.Sn.DESCRIPTION?j.push((e?h.L6:h.Ub)(L,I,D,w)):j.push((e?h.Se:h.zt)(L,I,D,w))}(e)}}))}),[t.field]);return r.createElement(i.Z,{"data-testid":"entity-task",size:"middle"},n!==M.c6.Glossary&&Z,function(e,t,n,i){var l=(0,N.ec)(t,n,i);return r.createElement(a.Z,{destroyTooltipOnHide:!0,overlayClassName:"ant-popover-request-description",title:(0,E.t)("label.list-entity",{entity:(0,E.t)("label.conversation")})},r.createElement(f.ReactComponent,(0,y.pi)({},v,{className:"hover-cell-icon cursor-pointer","data-testid":"field-thread",onClick:function(t){t.preventDefault(),t.stopPropagation(),e(l)}})))}(S,L,I,w))}}}]);




© 2015 - 2025 Weber Informatics LLC | Privacy Policy