PageSourceSearch

https://my.sera.ag/static/js/9380.cf726586.chunk.js

js sera.ag collected 2026-10-09 02:48:04 UTC 13,758 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunksera_manager=self.webpackChunksera_manager||[]).push([[9380,3952],{64156:(e,t,l)=>{l.d(t,{_:()=>o});var a=l(17772),s=l(64168),n=l(83068),i=l(87668);const o=e=>{let{pagedData:t,getEntityId:l,getEntityTags:o=(e=>e.entity_tags),entityType:d,refetch:c}=e;const{saveEntityTags:r,deleteEntityTags:u}=(0,s.c)(),{notifyError:p}=(0,n.c)(),v=(0,i.c)({terms:["Some tags could not be removed as they are set by the system"]});return async e=>{let{addedTags:s,removedTags:n}=e;const i=null===n||void 0===n?void 0:n.filter((e=>!t.find((t=>{var s;return l(t)===e.entityId&&(null===(s=o(t))||void 0===s?void 0:s.find((t=>{var l;return(null===t||void 0===t||null===(l=t.tag)||void 0===l?void 0:l.tag_id)===e.tagId&&t.scope===a.kp.System})))}))));null!==s&&void 0!==s&&s.length&&await r({entityTags:s.map((e=>({entity_id:e.entityId,entity_type:d,tag_id:e.tagId})))}),null!==i&&void 0!==i&&i.length&&await u({entityTags:i.map((e=>({entity_id:e.entityId,entity_type:d,tag_id:e.tagId}))),disableNotifications:Boolean(null===s||void 0===s?void 0:s.length)}),(null===i||void 0===i?void 0:i.length)!==(null===n||void 0===n?void 0:n.length)&&p({message:v["Some tags could not be removed as they are set by the system"]}),c&&c()}}},65052:(e,t,l)=>{l.d(t,{u:()=>s});var a=l(17772);const s=(e,t)=>void 0!==e[t]?e[t]?a.QT$.Ascending:a.QT$.Descending:void 0},66536:(e,t,l)=>{l.r(t),l.d(t,{default:()=>$});var a=l(34764),s=l(52645);const n={pageTitle:"style_pageTitle__QGG4w",severityLabel:"style_severityLabel__Okq7n",severityIcon:"style_severityIcon__wCPCf",colorDot:"style_colorDot__Mrpew"};var i=l(41544),o=l(87668),d=l(34360),c=l(40139),r=l(99584),u=l(66900),p=l(80790),v=l(66352),y=l(57232),g=l(17772),h=l(75868),m=l(86716),_=l(31228),T=l(76996),f=l(3352),b=l(52396),S=l(71992),w=l(97884);const x=e=>{let{eventTypes:t,currentRows:l,selectedRows:a,setSelectedRows:s,tuples:i,applyFilterCallback:o,scrollContainerRef:d}=e;const[c,u]=(0,r.useState)(),[p,v]=(0,r.useState)(),{selectedFilterTagIds:y,handleTableTagClick:g}=(0,b.c)({tuples:i,key:"tags",applyFilterCallback:o}),{selectedFilterTagIds:x,handleTableTagClick:C}=(0,b.c)({tuples:i,key:"type",applyFilterCallback:o});(0,r.useEffect)((()=>{const e=e=>{e.target.closest(".".concat(f.Oy))||e.target.closest(".".concat(f.Mh))||(u(void 0),v(void 0))};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)})),(0,r.useEffect)((()=>{u(void 0),v(void 0)}),[null===y||void 0===y?void 0:y.length]);const k=e=>{let{row:t}=e;s((e=>Boolean(e.find((e=>e.fe_type_id===t.fe_type_id)))?e.filter((e=>e.fe_type_id!==t.fe_type_id)):[...e,t]))},E=a.length>0&&a.length<l.length,I=r.useCallback((e=>{const t=Boolean(a.find((t=>t.fe_type_id===e.fe_type_id)));return(0,w.jsx)(m.c,{checked:t,onChange:()=>{k({row:e})}})}),[a,k]),R=[{key:"checkRow",dataIndex:"checkRow",customStyles:{borderLeft:"none",width:"40px",minWidth:"40px",maxWidth:"40px"},className:n.columnCheckbox,renderHead:(0,w.jsx)(m.c,{indeterminate:E,onChange:()=>{s((e=>e.length===l.length?[]:l))},checked:l.length===a.length}),render:I},{title:"Event type",dataIndex:"name",key:"name",customStyles:{minWidth:"350px",borderLeft:"none"},sortable:!0,render:e=>{var t,l;return(0,w.jsxs)("div",{className:"displayFlex flexAlignCenter gapSM",children:[(0,w.jsx)("div",{className:n.colorDot,style:{background:null===e||void 0===e?void 0:e.color}}),(0,w.jsx)("span",{className:"truncateByRow1",children:(0,w.jsx)(T.c,{title:null!==(t=null===e||void 0===e?void 0:e.name)&&void 0!==t?t:"",children:null!==(l=null===e||void 0===e?void 0:e.name)&&void 0!==l?l:""})})]})}},{title:"Tags",dataIndex:"tags",key:"tags",customStyles:{minWidth:"350px"},render:e=>(0,w.jsx)(f.cp,{rowId:e.id,tags:e.tags,currentExpandedTagsRow:c,setCurrentExpandedTagsRow:u,currentExpandedTagsCellPos:p,setCurrentExpandedTagsCellPos:v,selectedFilterTagIds:y,handleTableTagClick:g,tableRef:d})},{title:"Description",dataIndex:"description",key:"description",customStyles:{minWidth:"300px"},render:e=>{var t,l;return(0,w.jsx)("span",{className:"truncateByRow1",children:(0,w.jsx)(T.c,{title:null!==(t=null===e||void 0===e?void 0:e.description)&&void 0!==t?t:"",children:null!==(l=null===e||void 0===e?void 0:e.description)&&void 0!==l?l:""})})}},{title:"Type",dataIndex:"type",key:"type",customStyles:{minWidth:"180px"},sortable:!0,render:e=>(0,w.jsx)(f.cp,{rowId:"".concat(e.id,"-type"),tags:[{tag_id:e.type,label:e.type}],currentExpandedTagsRow:c,setCurrentExpandedTagsRow:u,currentExpandedTagsCellPos:p,setCurrentExpandedTagsCellPos:v,selectedFilterTagIds:x,handleTableTagClick:C,isSingleTag:!0})},{title:"Event type ID",dataIndex:"id",key:"id",customStyles:{minWidth:"180px"},render:e=>(0,w.jsx)(S.c,{rightAlignIcon:!0,value:e.id,valueClassName:"textStyleBodyAlternateImportant"})}];return{dataSource:null===t||void 0===t?void 0:t.map((e=>{var t,l,a,s,n;return{...e,id:null!==(t=e.fe_type_id)&&void 0!==t?t:"",key:null!==(l=e.fe_type_id)&&void 0!==l?l:"",name:null!==(a=e.name)&&void 0!==a?a:"",description:null!==(s=e.description)&&void 0!==s?s:"",type:e.account_id===_.Qp?"System":"Custom",tags:null===(n=e.entity_tags)||void 0===n?void 0:n.map((e=>null===e||void 0===e?void 0:e.tag))}})),columns:R,keysWithTypes:[{label:"content",type:h.op.SEARCH},{label:"tags",type:h.op.OPTIONS},{label:"type",type:h.op.OPTIONS}]}};var C=l(27120),k=l(89372),E=l(36632),I=l(29684),R=l(85800),j=l(72924),N=l(21224),F=l(41500),O=l(92796),A=l(42924),B=l(34159),P=l(85856),D=l(62272),V=l(78103),L=l(11012),W=l(72956),M=l(64156),G=l(10284),H=l(64968),Q=l(88008),q=l(67428);const z=e=>{let{eventTypes:t,refetch:l,loading:m,isResponseReady:T,sortBy:f,setSortBy:b}=e;const{hasEditPermissions:S}=(0,Q.c)(),z=(0,o.c)({terms:["Event types","New event type","No Event Types","There are no event types in the system.","Download as CSV","Edit","Assign tags","Are you sure you want to delete this event type?","The operation cannot be undone and all associated data will be deleted."]}),{disabledTooltipStr:U}
1=(0,o.k)(),{savedViewsActionsBar:Y,saveNewViewButton:K}=(0,W.c)({className:i.c.settingsViewsBar}),{deleteBatchEventTypes:$}=(0,j.A)(),[J,X]=(0,r.useState)(null),[Z,ee]=(0,r.useState)(!1),[te,le]=(0,r.useState)(!1),[ae,se]=(0,r.useState)(t),[ne,ie]=(0,r.useState)([]),[oe,de]=(0,r.useState)(100),{get:ce,getSelected:re}=(0,A.c)(),ue={tags:[{label:"",value:""}],type:[{value:g.kp.System,label:g.kp.System},{value:g.kp.Account,label:g.kp.Account}]},{tuples:pe,reduceFiltersForAll:ve,updateSearchParams:ye}=(0,y.iY)(ue,["content","tags"],!0),ge=e=>{ye(e)},he=(0,r.useRef)(null),{dataSource:me,keysWithTypes:_e,columns:Te}=x({eventTypes:t,currentRows:ae,selectedRows:ne,setSelectedRows:ie,tuples:pe,applyFilterCallback:ge,scrollContainerRef:he});(0,r.useEffect)((()=>{ie([])}),[ae]);const fe=()=>ve({dataSource:me}),[be,Se]=(0,r.useState)(_e),[we,xe]=(0,r.useState)(!1),[Ce,ke]=(0,r.useState)(1),[Ee,Ie]=(0,r.useState)(void 0),[Re,je]=(0,r.useState)(!1),[Ne,Fe]=(0,r.useState)(!1),[Oe,Ae]=(0,r.useState)(),[Be,Pe]=(0,r.useState)(),[De,Ve]=(0,r.useState)(q.w.CACHE_FIRST),Le=async e=>{if(Oe&&Oe.type===h.op.OPTIONS){var t,l,a;xe(!0);const c=null!==(t=null===(l=pe.find((e=>{let[t]=e;return t.label===Oe.label})))||void 0===l||null===(a=l[2])||void 0===a?void 0:a.map((e=>{let{value:t}=e;return t})))&&void 0!==t?t:[];let r;if("tags"===Oe.label){var s,n,i,o,d;Fe(!0);const t=await re({tagIds:c}),l=await ce({limit:10,lastEvaluatedKey:null===e||e?e:Ee,search:Be},De),a=null===(s=l.data)||void 0===s||null===(n=s.getTagsV2)||void 0===n?void 0:n.last_evaluated_key;Ie(a);const u=null!==(i=null===(o=l.data)||void 0===o||null===(d=o.getTagsV2)||void 0===d?void 0:d.tags)&&void 0!==i?i:[];a||je(!0);r=(1===Ce?[...t,...u.filter((e=>!c.includes(e.value)))]:u.filter((e=>!c.includes(e.value)))).map((e=>{var t,l,a,s;return{type:h.op.OPTIONS,label:null!==(t=null===e||void 0===e?void 0:e.label)&&void 0!==t?t:"",value:null!==(l=null===e||void 0===e?void 0:e.value)&&void 0!==l?l:"",multiSelect:!0,isSelected:c.includes(null!==(a=null===e||void 0===e?void 0:e.value)&&void 0!==a?a:""),isTag:!0,color:null!==(s=null===e||void 0===e?void 0:e.color)&&void 0!==s?s:""}})),Ce>1&&(r=[...be,...r])}else r=Object.keys(ue).includes(Oe.label)?ue[Oe.label].map((e=>({type:h.op.OPTIONS,label:e.value,multiSelect:!0,isSelected:c.includes(e.value)}))):(0,O.QF)(me,Oe.label).map((e=>({type:h.op.OPTIONS,label:e.label,value:e.label,multiSelect:!0,isSelected:c.includes(e.label)})));Se(r),xe(!1)}};(0,r.useEffect)((()=>{Le()}),[Ce,JSON.stringify(Oe)]),(0,r.useEffect)((()=>{Oe&&We(Oe,Be),Le(null)}),[Be]);const We=async(e,t)=>{ke(1),Ie(void 0),Pe(null!==t&&void 0!==t?t:void 0),Fe(!1),je(!1),Ae(e)},Me=(0,M._)({pagedData:ne,getEntityId:e=>e.fe_type_id,refetch:l,entityType:g.iMY.FlowEventType});return(0,w.jsxs)(w.Fragment,{children:[Z&&(0,w.jsx)(C.c,{isOpen:Z,setIsOpen:ee,eventType:J,setEventType:X,refetch:l}),te&&(0,w.jsx)(G.c,{icon:(0,w.jsx)(H.c,{}),title:z["Are you sure you want to delete this event type?"],content:z["The operation cannot be undone and all associated data will be deleted."],visible:te,setVisible:()=>{le(!1)},onOk:async()=>{await $({flow_event_types:ne.map((e=>({fe_type_id:e.fe_type_id})))}),ie([]),l()}}),(0,w.jsxs)(a.c,{fullHeight:!0,children:[(0,w.jsxs)(s.c,{className:i.c.settingsTitleBar,children:[(0,w.jsx)("h1",{className:n.pageTitle,children:(0,w.jsx)("span",{children:z["Event types"]})}),(0,w.jsx)(d.c,{onClick:()=>ee(!0),icon:(0,w.jsx)(c.c,{width:14,height:14}),type:"secondary",disabled:!S,disabledTooltip:U,children:z["New event type"]})]}),Y,(0,w.jsxs)(F.c,{className:i.c.settingsFiltersContainer,children:[(0,w.jsx)(N.c,{selectedFilters:pe,addNewFilterCallback:()=>{Se(_e)},options:be,updateOptionsCallback:We,applyFilterCallback:ge,loadingDropdown:we,keysWithTypes:_e,onGetMoreOptions:Ne?()=>{Ve(q.w.NO_CACHE),ke((e=>e+1))}:void 0,onSearchChange:Pe,disableLoadMore:Re,onCloseFilters:()=>{Ae(void 0),Fe(!1),Ve(q.w.CACHE_FIRST)},getLabel:{tags:async e=>{var t,l;const a=await re({tagIds:[e.value]});return null!==(t=null===a||void 0===a||null===(l=a[0])||void 0===l?void 0:l.label)&&void 0!==t?t:void 0}},disableRootSearch:!0}),K]}),(0,w.jsx)(V.c,{loadingCondition:m,loadingComponent:(0,w.jsx)(L.c,{centered:!0,size:"large"}),children:(0,w.jsxs)(w.Fragment,{children:[ae.length?(0,w.jsx)(u.o,{testId:"event-types",rows:ae,selectedRows:ne.map((e=>{var t;return null!==(t=e.fe_type_id)&&void 0!==t?t:""}
1)),columns:Te,sortBy:f,setSortBy:b,scrollContainerRef:he}):T&&(0,w.jsx)(v.c,{title:z["No Event Types"],description:z["There are no event types in the system."]}),(0,w.jsx)(p.c,{rowsPerPage:oe,setRowsPerPage:de,rows:fe(),setCurrentRows:se,className:ae.length?void 0:"displayNone",canFetchMore:!1,rowsAreFEFiltered:!1,allRows:me}),Boolean(ne.length)&&(0,w.jsx)(k.c,{items:[{label:ne.length.toString(),callback:()=>ie([]),type:E.c.SELECTED},{type:E.c.SEPARATOR},...1===ne.length&&ne[0].account_id!==_.Qp?[{icon:(0,w.jsx)(I.c,{}),label:z.Edit,callback:()=>{const e=ae.find((e=>e.fe_type_id===ne[0].fe_type_id));X(null!==e&&void 0!==e?e:null),ee(!0)},disabled:!S,disabledTooltip:U,type:E.c.REGULAR}]:[],{label:z["Assign tags"],type:E.c.ASSIGN_TAGS,assignTagsProps:{selectedTagIdsPerRow:ne.map((e=>{var t,l,a;let{fe_type_id:s}=e;return{entityId:null!==s&&void 0!==s?s:"",selectedTagIds:null!==(t=null===(l=ae.find((e=>s===e.fe_type_id)))||void 0===l||null===(a=l.entity_tags)||void 0===a?void 0:a.map((e=>{var t,l;return null!==(t=null===e||void 0===e||null===(l=e.tag)||void 0===l?void 0:l.tag_id)&&void 0!==t?t:""})))&&void 0!==t?t:[]}})),applyCallback:Me},disabled:!S,disabledTooltip:U},{type:E.c.REGULAR,children:(0,w.jsx)(P.c,{data:(()=>{const e=fe().filter((e=>ne.map((e=>{var t;return null!==(t=e.fe_type_id)&&void 0!==t?t:""})).includes(e.fe_type_id)));return(0,B.Y)({filteredData:e,excludeKeys:["checkRow"],columns:Te})})(),filename:"event_types.csv",children:(0,w.jsx)(d.c,{className:n.downloadCsvButton,icon:(0,w.jsx)(D.c,{width:14,height:14}),type:"secondary",children:z["Download as CSV"]})},"csv-download")},...ne.find((e=>e.account_id===_.Qp))?[]:[{icon:(0,w.jsx)(R.c,{}),callback:()=>le(!0),disabled:!S,disabledTooltip:U,type:E.c.DELETE}]]})]})})]})]})};var U=l(79312),Y=l(65052),K=l(83344);const $=()=>{const[e,t]=(0,r.useState)({}),{tuples:l}=(0,y.iY)({},void 0,!0),{search:a,searchOperator:s}=(0,y.yq)(l),n=(0,U.getUniqueValuesFromTuple)(l,["tags"]),i=(0,U.getUniqueValuesFromTuple)(l,["category"]),{loading:o,data:d,refetch:c,isResponseReady:u}=(0,j.c)({tagIds:n,categoryIds:i,search:a,searchOperator:s,sortName:(0,Y.u)(e,"name"),sortScope:(0,Y.u)(e,"type")});return(0,r.useEffect)((()=>{(0,K.we)({feature:"settings",action:"view",entity_type:"event_type"})}),[]),(0,w.jsx)(z,{eventTypes:d,refetch:c,loading:o,isResponseReady:u,sortBy:e,setSortBy:t})}},31228:(e,t,l)=>{l.d(t,{CG:()=>n,Qp:()=>a,c1:()=>s});const a="a-000000001",s="new",n="latest"},3952:(e,t,l)=>{l.d(t,{c:()=>d});var a=l(45072),s=l(99584);const n={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M696 480H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"plus-circle",theme:"outlined"};var i=l(47164),o=function(e,t){return s.createElement(i.c,(0,a.c)({},e,{ref:t,icon:n}))};const d=s.forwardRef(o)},41544:(e,t,l)=>{l.d(t,{c:()=>a});const a={settingsContainer:"style_settingsContainer__CWm0x",contentContainer:"style_contentContainer__jV2qN",settingsTitleBar:"style_settingsTitleBar__fMVvC"}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.