assets.9447.3217c0819080831713f0.js Maven / Gradle / Ivy
"use strict";(self.webpackChunkopen_metadata=self.webpackChunkopen_metadata||[]).push([[9447],{54955:function(e,t,n){var a=n(8081),l=n.n(a),i=n(23645),r=n.n(i)()(l());r.push([e.id,'/*\n * Copyright 2022 Collate.\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/*\n * Copyright 2022 Collate.\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/* navbar+tab_height+padding = 64+46+12 */\n.custom-dropdown-render .ant-dropdown-menu {\n box-shadow: none;\n padding: 0px;\n max-height: 200px;\n overflow-y: scroll;\n margin-bottom: 8px;\n}\n.custom-dropdown-render .ant-dropdown-menu .ant-dropdown-menu-item {\n padding: 4px 0px;\n}\n.custom-dropdown-render .dropdown-option-label {\n max-width: 65vw;\n}\n.custom-dropdown-render .update-btn {\n background-color: #efefef;\n border-color: #efefef;\n}\n.custom-dropdown-render .update-btn:hover {\n background-color: #e2e2e2;\n border-color: #e2e2e2;\n color: inherit;\n}\n.custom-dropdown-render mark {\n background-color: #ffe1a6;\n}\n.quick-filter-dropdown-trigger-btn {\n padding: 4px 8px;\n}\n.quick-filter-dropdown-trigger-btn .remove-field-icon {\n color: #bbb;\n padding-bottom: 2px;\n}\n.quick-filter-dropdown-trigger-btn .remove-field-icon:hover {\n color: #373737;\n}\n',""]),t.Z=r},99447:function(e,t,n){n.d(t,{Z:function(){return M}});var a=n(70655),l=n(71230),i=n(15746),r=n(56256),s=n(91894),o=n(19650),c=n(4107),u=n(27049),d=n(71577),p=n(13013),m=n(94199),y=n(94184),b=n.n(y),f=n(96486),g=n(67294),h=n(68432),k=n(21952),E=n(34669),v=n(53926),w=n(69523),A=n(93379),C=n.n(A),S=n(7795),N=n.n(S),R=n(90569),L=n.n(R),T=n(3565),I=n.n(T),x=n(19216),O=n.n(x),W=n(44589),D=n.n(W),Z=n(54955),_={};_.styleTagTransform=D(),_.setAttributes=I(),_.insert=L().bind(null,"head"),_.domAPI=N(),_.insertStyleElement=O(),C()(Z.Z,_),Z.Z&&Z.Z.locals&&Z.Z.locals;var M=function(e){var t=e.isSuggestionsLoading,n=e.label,y=e.options,A=e.searchKey,C=e.selectedKeys,S=e.highlight,N=void 0!==S&&S,R=e.showProfilePicture,L=void 0!==R&&R,T=e.fixedOrderOptions,I=void 0!==T&&T,x=e.onChange,O=e.onGetInitialOptions,W=e.onSearch,D=e.index,Z=(0,h.$)().t,_=(0,a.CR)((0,g.useState)(!1),2),M=_[0],P=_[1],F=(0,a.CR)((0,g.useState)(""),2),B=F[0],U=F[1],H=(0,a.CR)((0,g.useState)(C),2),q=H[0],G=H[1],j=(0,g.useMemo)((function(){var e=y.filter((function(e){return q.find((function(t){return e.key===t.key}))}));if(I)return y.map((function(t){return{key:t.key,label:(0,v.tx)(t,-1!==e.indexOf(t),N?B:"",L)}}));var t=(0,v.u6)(e,!0,N?B:"",L)||[],n=y.filter((function(e){return!q.find((function(t){return e.key===t.key}))})),l=(0,v.u6)(n,!1,N?B:"",L)||[];return(0,a.ev)((0,a.ev)([],(0,a.CR)(t)),(0,a.CR)(l))}),[y,q,I]),V=function(){G([])},Q=(0,f.debounce)((function(e){U(e),W(e,A)}),500),z=function(){P(!1)},K=function(){x(q,A),z()},Y=(0,g.useMemo)((function(){return q.length>1}),[q]);(0,g.useEffect)((function(){G(C)}),[M,C,y]);var J=(0,g.useCallback)((function(e){var n,a=D&&(null===(n=E.qJ[D])||void 0===n?void 0:n.label),s=A.startsWith("domain");return t?g.createElement(l.Z,{align:"middle",className:"p-y-sm",justify:"center"},g.createElement(i.Z,null,g.createElement(w.Z,{size:"small"}))):y.length>0||q.length>0?e:g.createElement(l.Z,{align:"middle",className:"m-y-sm",justify:"center"},g.createElement(i.Z,null,g.createElement(r.Z.Text,{className:"m-x-sm"},s&&a?Z("message.no-domain-assigned-to-entity",{entity:a}):Z("message.no-data-available"))))}),[t,y,q,D,A]),X=(0,g.useCallback)((function(e){return g.createElement(s.Z,{bodyStyle:{padding:0},className:"custom-dropdown-render","data-testid":"drop-down-menu"},g.createElement(o.Z,{direction:"vertical",size:0},g.createElement("div",{className:"p-t-sm p-x-sm"},g.createElement(c.Z,{autoFocus:!0,"data-testid":"search-input",placeholder:Z("label.search-entity",{entity:n})+"...",onChange:function(e){var t=e.target.value;Q(t)}})),Y&&g.createElement(g.Fragment,null,g.createElement(u.Z,{className:"m-t-xs m-b-0"}),g.createElement(d.Z,{className:"p-0 m-l-sm","data-testid":"clear-button",type:"link",onClick:V},Z("label.clear-entity",{entity:Z("label.all")}))),g.createElement(u.Z,{className:b()(Y?"m-y-0":"m-t-xs m-b-0")}),J(e),g.createElement(o.Z,{className:"p-sm p-t-xss"},g.createElement(d.Z,{className:"update-btn","data-testid":"update-btn",size:"small",onClick:K},Z("label.update")),g.createElement(d.Z,{"data-testid":"close-btn",size:"small",type:"link",onClick:z},Z("label.close")))))}),[n,Q,Y,V,J,K,z]);return g.createElement(p.Z,{destroyPopupOnHide:!0,"data-testid":A,dropdownRender:X,key:A,menu:{items:j,onClick:function(e){var t=e.key,n=q.find((function(e){return e.key===t})),l=y.find((function(e){return e.key===t})),i=(0,f.isUndefined)(n)?(0,a.ev)((0,a.ev)([],(0,a.CR)(q)),(0,a.CR)(l?[l]:[])):q.filter((function(e){return e.key!==t}));G(i)}},open:M,transitionName:"",trigger:["click"],onOpenChange:function(e){e&&!(0,f.isUndefined)(O)&&O(A),P(e),U("")}},g.createElement(m.Z,{mouseLeaveDelay:0,overlayClassName:(0,f.isEmpty)(C)?"d-none":"",placement:"bottom",title:(0,v.Vb)(C,!0),trigger:"hover"},g.createElement(d.Z,{className:"quick-filter-dropdown-trigger-btn"},g.createElement(o.Z,{"data-testid":"search-dropdown-"+n,size:4},g.createElement(o.Z,{size:0},g.createElement(r.Z.Text,null,n),C.length>0&&g.createElement("span",null,": ",g.createElement(r.Z.Text,{className:"text-primary font-medium"},(0,v.Vb)(C)))),g.createElement(k.ReactComponent,{className:"flex self-center",height:12,width:12})))))}},50322:function(e,t,n){n.d(t,{Bn:function(){return S},C_:function(){return Z},Gr:function(){return h},Hk:function(){return R},KC:function(){return D},LG:function(){return W},MI:function(){return b},Mu:function(){return A},Ur:function(){return N},Vq:function(){return k},Xy:function(){return E},c0:function(){return v},c8:function(){return f},hq:function(){return C},jj:function(){return g},yE:function(){return w}});var a,l,i=n(70655),r=n(23031),s=n(59684),o=n(87427),c=n(92854),u=n(22653),d=n(39117),p=n(53926),m=n(67745),y=o.Z,b=[{label:(0,r.t)("label.domain"),key:"domain.displayName.keyword"},{label:(0,r.t)("label.owner"),key:"owner.displayName.keyword"},{label:(0,r.t)("label.tag"),key:"tags.tagFQN"},{label:(0,r.t)("label.tier"),key:"tier.tagFQN"},{label:(0,r.t)("label.service"),key:"service.displayName.keyword"},{label:(0,r.t)("label.service-type"),key:"serviceType"}],f=[{label:(0,r.t)("label.database"),key:"database.displayName.keyword"},{label:(0,r.t)("label.schema"),key:"databaseSchema.displayName.keyword"},{label:(0,r.t)("label.column"),key:"columns.name.keyword"},{label:(0,r.t)("label.table-type"),key:"tableType"}],g=[{label:(0,r.t)("label.data-model"),key:"dataModels.displayName.keyword"},{label:(0,r.t)("label.chart"),key:"charts.displayName.keyword"}],h=[{label:(0,r.t)("label.data-model-type"),key:"dataModelType"},{label:(0,r.t)("label.column"),key:"columns.name.keyword"},{label:(0,r.t)("label.project"),key:"project.keyword"}],k=[{label:(0,r.t)("label.task"),key:"tasks.displayName.keyword"}],E=[{label:(0,r.t)("label.field"),key:"fields.name.keyword"}],v=[{label:(0,r.t)("label.schema-field"),key:"messageSchema.schemaFields.name"}],w=[{label:(0,r.t)("label.column"),key:"dataModel.columns.name.keyword"}],A=[{label:(0,r.t)("label.domain"),key:"domain.displayName.keyword"},{label:(0,r.t)("label.owner"),key:"owner.displayName.keyword"},{label:(0,r.t)("label.tag"),key:"tags.tagFQN"},{label:(0,r.t)("label.glossary-plural"),key:"glossary.name.keyword"}],C=[{label:(0,r.t)("label.domain"),key:"domain.displayName.keyword"},{label:(0,r.t)("label.classification"),key:"classification.name.keyword"}],S=[{label:(0,r.t)("label.domain"),key:"domain.displayName.keyword"},{label:(0,r.t)("label.owner"),key:"owner.displayName.keyword"}],N=((0,i.ev)((0,i.ev)((0,i.ev)((0,i.ev)([],(0,i.CR)(b)),(0,i.CR)(f)),(0,i.CR)(g)),(0,i.CR)(k)),{id:s.cQ.uuid(),type:"group",properties:{conjunction:"AND",not:!1},children1:(a={},a[s.cQ.uuid()]={type:"group",properties:{conjunction:"AND",not:!1},children1:(l={},l[s.cQ.uuid()]={type:"rule",properties:{field:"owner.displayName",operator:null,value:[],valueSrc:["value"]}},l)},a)}),R=function(e){var t=e.searchIndex,n=e.entityField;return function(e){return(0,d.FE)(t,n,null!=e?e:"",JSON.stringify((0,m.rO)())).then((function(e){return{values:e.data.aggregations["sterms#"+n].buckets.map((function(e){var t;return{value:e.key,title:null!==(t=e.label)&&void 0!==t?t:e.key}})),hasMore:!1}}))}},L={fullWidth:!0,valueLabel:(0,r.t)("label.criteria")+":"},T=function(e){return void 0===e&&(e=u.W.TABLE),{deleted:{label:(0,r.t)("label.deleted"),type:"boolean",defaultValue:!0},"owner.displayName":{label:(0,r.t)("label.owner"),type:"select",mainWidgetProps:L,fieldSettings:{asyncFetch:R({searchIndex:null!=e?e:[u.W.USER,u.W.TEAM],entityField:c.An.OWNER}),useAsyncSearch:!0}},"tags.tagFQN":{label:(0,r.t)("label.tag-plural"),type:"select",mainWidgetProps:L,fieldSettings:{asyncFetch:R({searchIndex:null!=e?e:[u.W.TAG,u.W.GLOSSARY],entityField:c.An.TAG}),useAsyncSearch:!0}},"tier.tagFQN":{label:(0,r.t)("label.tier"),type:"select",mainWidgetProps:L,fieldSettings:{asyncFetch:R({searchIndex:null!=e?e:[u.W.TAG],entityField:c.An.TIER}),useAsyncSearch:!0}},extension:{label:(0,r.t)("label.custom-attribute-plural"),type:"!group",mainWidgetProps:L,subfields:{}}}},I=function(e){return{"service.name":{label:(0,r.t)("label.service"),type:"select",mainWidgetProps:L,fieldSettings:{asyncFetch:R({searchIndex:e,entityField:c.An.SERVICE}),useAsyncSearch:!0}}}},x={"database.name":{label:(0,r.t)("label.database"),type:"select",mainWidgetProps:L,fieldSettings:{asyncFetch:R({searchIndex:u.W.TABLE,entityField:c.An.DATABASE}),useAsyncSearch:!0}},"databaseSchema.name":{label:(0,r.t)("label.database-schema"),type:"select",mainWidgetProps:L,fieldSettings:{asyncFetch:R({searchIndex:u.W.TABLE,entityField:c.An.DATABASE_SCHEMA}),useAsyncSearch:!0}},"columns.name":{label:(0,r.t)("label.column"),type:"select",mainWidgetProps:L,fieldSettings:{asyncFetch:R({searchIndex:u.W.TABLE,entityField:c.An.COLUMN}),useAsyncSearch:!0}}},O=function(){return(0,i.pi)((0,i.pi)({},y),{types:(0,i.pi)((0,i.pi)({},y.types),{multiselect:(0,i.pi)((0,i.pi)({},y.types.multiselect),{widgets:(0,i.pi)((0,i.pi)({},y.types.multiselect.widgets),{text:{operators:["like","not_like"]}}),excludeOperators:["is_null","is_not_null"],valueSources:["value"]}),select:(0,i.pi)((0,i.pi)({},y.types.select),{widgets:(0,i.pi)((0,i.pi)({},y.types.select.widgets),{text:{operators:["like","not_like"]}}),excludeOperators:["is_null","is_not_null"],valueSources:["value"]}),text:(0,i.pi)((0,i.pi)({},y.types.text),{valueSources:["value"]})}),widgets:(0,i.pi)((0,i.pi)({},y.widgets),{multiselect:(0,i.pi)((0,i.pi)({},y.widgets.multiselect),{showSearch:!0,showCheckboxes:!0,useAsyncSearch:!0,useLoadMore:!1}),select:(0,i.pi)((0,i.pi)({},y.widgets.select),{showSearch:!0,showCheckboxes:!0,useAsyncSearch:!0,useLoadMore:!1}),text:(0,i.pi)({},y.widgets.text)}),operators:(0,i.pi)((0,i.pi)({},y.operators),{like:(0,i.pi)((0,i.pi)({},y.operators.like),{elasticSearchQueryType:"wildcard"})}),settings:(0,i.pi)((0,i.pi)({},y.settings),{showLabels:!0,canReorder:!1,renderSize:"medium",fieldLabel:(0,r.t)("label.field-plural")+":",operatorLabel:(0,r.t)("label.condition")+":",showNot:!1,valueLabel:(0,r.t)("label.criteria")+":",renderButton:p.JZ})})},W=function(e){switch(e){case u.W.MLMODEL:return(0,i.pi)((0,i.pi)({},O()),{fields:(0,i.pi)((0,i.pi)({},T(u.W.MLMODEL)),I(u.W.MLMODEL))});case u.W.PIPELINE:return(0,i.pi)((0,i.pi)({},O()),{fields:(0,i.pi)((0,i.pi)({},T(u.W.PIPELINE)),I(u.W.PIPELINE))});case u.W.DASHBOARD:return(0,i.pi)((0,i.pi)({},O()),{fields:(0,i.pi)((0,i.pi)({},T(u.W.DASHBOARD)),I(u.W.DASHBOARD))});case u.W.TABLE:return(0,i.pi)((0,i.pi)({},O()),{fields:(0,i.pi)((0,i.pi)((0,i.pi)({},T(u.W.TABLE)),I(u.W.TABLE)),x)});case u.W.TOPIC:return(0,i.pi)((0,i.pi)({},O()),{fields:(0,i.pi)((0,i.pi)({},T(u.W.TOPIC)),I(u.W.TOPIC))});default:return(0,i.pi)((0,i.pi)({},O()),{fields:(0,i.pi)({},T())})}},D=["owner.displayName","tags.tagFQN"],Z="displayName.keyword"},92854:function(e,t,n){var a,l,i;n.d(t,{An:function(){return i}}),function(e){e.COLUMN="column_suggest",e.DATABASE="database_suggest",e.SCHEMA="schema_suggest",e.SERVICE="service_suggest",e.CHART="chart_suggest",e.DATA_MODEL="data_model_suggest",e.TASK="task_suggest",e.ROOT="suggest",e.SERVICE_TYPE="serviceType"}(a||(a={})),function(e){e.COLUMN="column_suggest",e.DATABASE="database_suggest",e.SCHEMA="schema_suggest",e.SERVICE="service_suggest",e.CHART="chart_suggest",e.DATA_MODEL="data_model_suggest",e.TASK="task_suggest",e.FIELD="field_suggest"}(l||(l={})),function(e){e.OWNER="displayName.keyword",e.TAG="tags.tagFQN",e.TIER="tier.tagFQN",e.SERVICE="service.name.keyword",e.DATABASE="database.name.keyword",e.DATABASE_SCHEMA="databaseSchema.name.keyword",e.COLUMN="columns.name.keyword",e.CHART="charts.displayName.keyword",e.TASK="tasks.displayName.keyword"}(i||(i={}))},53926:function(e,t,n){n.d(t,{JZ:function(){return E},Vb:function(){return C},j8:function(){return S},tp:function(){return k},tx:function(){return w},u6:function(){return A}});var a=n(70655),l=n(16165),i=n(73218),r=n(49101),s=n(71577),o=n(19650),c=n(9676),u=n(56256),d=n(23031),p=n(96486),m=n(67294),y=n(25577),b=n(50322),f=(n(92854),n(22653)),g=n(93895),h=(n(24671),n(38212)),k=function(e){switch(e){case f.W.TABLE:return(0,a.ev)((0,a.ev)([],(0,a.CR)(b.MI)),(0,a.CR)(b.c8));case f.W.TOPIC:return(0,a.ev)((0,a.ev)([],(0,a.CR)(b.MI)),(0,a.CR)(b.c0));case f.W.DASHBOARD:return(0,a.ev)((0,a.ev)([],(0,a.CR)(b.MI)),(0,a.CR)(b.jj));case f.W.PIPELINE:return(0,a.ev)((0,a.ev)([],(0,a.CR)(b.MI)),(0,a.CR)(b.Vq));case f.W.SEARCH_INDEX:return(0,a.ev)((0,a.ev)([],(0,a.CR)(b.MI)),(0,a.CR)(b.Xy));case f.W.MLMODEL:return(0,a.ev)([],(0,a.CR)(b.MI.filter((function(e){return"service_type"!==e.key}))));case f.W.CONTAINER:return(0,a.ev)((0,a.ev)([],(0,a.CR)(b.MI)),(0,a.CR)(b.yE));case f.W.STORED_PROCEDURE:return(0,a.ev)([],(0,a.CR)(b.MI));case f.W.DASHBOARD_DATA_MODEL:return(0,a.ev)((0,a.ev)([],(0,a.CR)(b.MI)),(0,a.CR)(b.Gr));case f.W.GLOSSARY:return(0,a.ev)([],(0,a.CR)(b.Mu));case f.W.TAG:return(0,a.ev)([],(0,a.CR)(b.hq));case f.W.DATA_PRODUCT:return(0,a.ev)([],(0,a.CR)(b.Bn));default:return[]}},E=function(e){var t=null==e?void 0:e.type;return"delRule"===t?m.createElement(l.Z,{className:"action action--DELETE",component:i.Z,onClick:null==e?void 0:e.onClick}):"addRule"===t?m.createElement(s.Z,{ghost:!0,className:"action action--ADD-RULE",icon:m.createElement(r.Z,null),type:"primary",onClick:null==e?void 0:e.onClick},d.ZP.t("label.add")):"addGroup"===t?m.createElement(s.Z,{className:"action action--ADD-GROUP",icon:m.createElement(r.Z,null),type:"primary",onClick:null==e?void 0:e.onClick},d.ZP.t("label.add")):"delGroup"===t?m.createElement(h.ZP,{alt:d.ZP.t("label.delete-entity",{entity:d.ZP.t("label.group")}),className:"action action--DELETE cursor-pointer ",height:16,icon:h.PJ.DELETE_COLORED,width:16,onClick:null==e?void 0:e.onClick}):m.createElement(m.Fragment,null)},v=function(e,t){var n=new RegExp(t,"gi");return t?e.replace(n,(function(e){return""+e+""})):e},w=function(e,t,n,a){return m.createElement("div",{className:"d-flex justify-between"},m.createElement(o.Z,{align:"center",className:"m-x-sm","data-testid":e.key,size:8},m.createElement(c.Z,{checked:t,"data-testid":e.key+"-checkbox"}),a&&m.createElement(y.Z,{displayName:e.label,id:e.key||"",name:e.label||"",textClass:"text-xs",width:"18"}),m.createElement(u.Z.Text,{ellipsis:!0,className:"dropdown-option-label",title:e.label},m.createElement("span",{dangerouslySetInnerHTML:{__html:v(e.label,n)}}))),(0,g.yh)(e.count,"m-r-sm",!1))},A=function(e,t,n,a){return void 0===n&&(n=""),void 0===a&&(a=!1),(0,p.isArray)(e)?e.sort((function(e,t){var n,a;return(null!==(n=t.count)&&void 0!==n?n:0)-(null!==(a=e.count)&&void 0!==a?a:0)})).map((function(e){return{key:e.key,label:w(e,t,n,a)}})):[]},C=function(e,t){if(void 0===t&&(t=!1),(0,p.isArray)(e)){var n=e.map((function(e){return e.label})).join(", ");return n.length<15||t?n:n.slice(0,11)+"..."}return""},S=function(e){return e?e.map((function(e){var t;return{key:e.key,label:e.key,count:null!==(t=e.doc_count)&&void 0!==t?t:0}})):[]}},67745:function(e,t,n){n.d(t,{rO:function(){return s}});var a=n(70655),l=n(96486),i=n(7502),r=function(e,t){var n=[];return t.forEach((function(t){(0,l.isUndefined)(t)||n.push.apply(n,(0,a.ev)([],(0,a.CR)(function(e,t){var n,a,l,r,s,o;switch(e){case i.w.SHOULD:return null!==(l=null===(a=null===(n=null==t?void 0:t.query)||void 0===n?void 0:n.bool)||void 0===a?void 0:a.should)&&void 0!==l?l:[];case i.w.MUST:return null!==(o=null===(s=null===(r=null==t?void 0:t.query)||void 0===r?void 0:r.bool)||void 0===s?void 0:s.must)&&void 0!==o?o:[]}}(e,t))))})),(0,l.uniqWith)(n,l.isEqual)},s=function(e,t,n){var s=r(i.w.MUST,[e,t,n]),o=r(i.w.SHOULD,[e,t,n]);return{query:{bool:(0,a.pi)((0,a.pi)({},(0,l.isEmpty)(s)?{}:{must:s}),(0,l.isEmpty)(o)?{}:{should:o})}}}}}]);
© 2015 - 2025 Weber Informatics LLC | Privacy Policy