PageSourceSearch

https://console.dialics.com/assets/ManageTcpaShield-DGlCQd0m.js

js dialics.com collected 2026-09-30 06:36:42 UTC 9,131 bytes, 2 lines download raw bytes

1import{J as L,o as T,t as k,w as p,d as b,y as K,a as c,aR as J,b as l,z as Q,x as R,A as X,ay as Y,C as Z,D as E,m as h,q as y,G as ee,an as U,b6 as N,aF as I,c as B,T as M,aG as H,k as j,ax as r,p as te,l as ae,ag as A,v as oe,R as G,g as le,bn as ie,V as se}from"./index-CgxcxX9c.js";import{_ as ne}from"./ManageLayout-BNl7P0d-.js";import{_ as re}from"./CustomTableControls-ZVNMatYV.js";import{_ as W}from"./SearchMiniIcon-DVnTahDt.js";import{_ as q}from"./ConfirmDialog-CCScX4Cr.js";import{_ as de}from"./SlidersBtn-B8-yBMWZ.js";import{u as O}from"./tcpaShieldStore-DWGtAqhf.js";import{_ as ue}from"./CustomDataTable-DkPon6Ol.js";import{_ as ce}from"./DetailAction-IUUoSxcY.js";import{_ as pe,a as me}from"./ViewCampaignsDialog-GRC4DVtG.js";import{_ as ge}from"./StatusAction-BpI7R70z.js";import"./ArrowSelect-D87KNEp8.js";import"./FormSelect-BRaLJRDD.js";import"./CrossIcon-Cfm-FAfX.js";import"./PlusIcon-CN2GTR9T.js";import"./ArrowInputIconBottom-D50zN8Wy.js";import"./PencilIcon-BY8nXHAT.js";import"./EyeIcon24x24-ySDM4T1Q.js";import"./ToggleBtn-DmzuA2UX.js";const Se={class:"flex items-center justify-end w-full gap-x-5"},fe={__name:"CreateTcpaShieldDialog",props:{modelValue:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(F,{emit:t}){const v=F,o=t,n=O(),i=E({name:{value:null,valid:!0}}),d=h(null),m=E({default:[]}),f=y({get(){return v.modelValue},set(a){o("update:modelValue",a)}});function _(){f.value=!1}async function C(){await w(),Z(i)&&P()}function w(){m.default=[a=>!!a||"This field is required"]}async function P(){const{success:a}=await n.goToCreateTcpaShield({...ee(i),type_id:d.value,credentials:x()});a&&_()}function x(){const a=n.providerTypes.find(e=>e.id===d.value);return a?a.credentials.reduce((e,u)=>(e[u]=null,e),{}):{}}
1function D(){Object.keys(i).forEach(a=>{i[a].value=null,i[a].valid=!0}),m.default=[],d.value=n.providerTypes.length?n.providerTypes[0].id:null}return L(f,a=>{a||D()}),L(()=>n.providerTypes,a=>{a.length&&(d.value=n.providerTypes[0].id)},{immediate:!0,deep:!0}),(a,e)=>(T(),k(Y,{modelValue:f.value,"onUpdate:modelValue":e[4]||(e[4]=u=>f.value=u)},{header:p(()=>[...e[5]||(e[5]=[b("div",{class:"text-lg font-medium text-gray-370 dark:text-white uppercase"}," Create Provider ",-1)])]),footer:p(()=>[b("div",Se,[c(Q,{onClick:_},{default:p(()=>[...e[8]||(e[8]=[R(" Cancel ",-1)])]),_:1}),c(X,{loading:l(n).actionLoading,onClick:C},{default:p(()=>[...e[9]||(e[9]=[R(" Create ",-1)])]),_:1},8,["loading"])])]),default:p(()=>[b("div",{class:"max-mob:px-4 px-7.5 py-5 w-99.5 max-mob:w-full",onKeyup:K(C,["enter"])},[e[6]||(e[6]=b("div",{class:"mb-3 text-gray-370 dark:text-white text-xs font-medium"}," Provider Name ",-1)),c(J,{modelValue:i.name.value,"onUpdate:modelValue":e[0]||(e[0]=u=>i.name.value=u),valid:i.name.valid,"onUpdate:valid":e[1]||(e[1]=u=>i.name.valid=u),rules:m.default,placeholder:"Type Provider Name",autoFocus:""},null,8,["modelValue","valid","rules"]),e[7]||(e[7]=b("div",{class:"pt-5 mb-3 text-gray-370 dark:text-white text-xs font-medium"}," Choose Type ",-1)),c(de,{activeTab:d.value,"onUpdate:activeTab":e[2]||(e[2]=u=>d.value=u),sipOptions:l(n).providerTypes,"onUpdate:sipOptions":e[3]||(e[3]=u=>l(n).providerTypes=u),width:"max-mob:w-full"},null,8,["activeTab","sipOptions"])],32)]),_:1},8,["modelValue"]))}},he={class:"pb-3 max-mob:pb-1.5"},ve={__name:"TcpaShieldTableControls",setup(F){const t=O(),v=U(),o=N(),n=h(!1),i=h(!1),d=y(()=>v.permissions.tcpaShield.edit),m=y(()=>v.permissions.tcpaShield.delete),f=y(()=>o.getTable(r.tcpaShield));function _(){n.value=!0}function C(){i.value=!0}async function w(){await t.goToDeleteTcpaShield(t.selected.map(e=>e.slug))&&(i.value=!1)}function P(a,e){switch(e){case"deleteAll":o.removeAllSorting(r.tcpaShield),o.sendFiltersSorting(r.tcpaShield),t.changePage(1);break;case"delete":o.changeSelectedSortingAfterDelete(a,r.tcpaShield),o.sendFiltersSorting(r.tcpaShield),t.changePage(1);break;case"update":o.sendFiltersSorting(r.tcpaShield),t.changePage(1);break;default:o.changeSelectedSortingAfterAdd(a,r.tcpaShield),o.sendFiltersSorting(r.tcpaShield),t.changePage(1)}}function x(){o.resetSortFilter(r.tcpaShield),t.changePage(1)}function D(a){o.updateSelectedFilters(a,r.tcpaShield),t.changePage(1)}return(a,e)=>{const u=I("tippy");return T(),B("div",he,[c(re,{showMultipleActions:!!l(t).selected.length,headerType:l(r).tcpaShield,controlsParams:l(o).controlParams(l(r).tcpaShield),selectedSorting:f.value.selectedSorting,selectedFilters:f.value.selectedFilters,searchValue:l(t).search,onPage:l(t).onPage,showButton:d.value,onPageConfig:{max:100,min:10,height:"h-10"},dropdownButtonConfig:{height:"h-10"},showOnPage:"",showFilter:"",showSort:"",showSearch:"",showReload:"",showSettings:"",onOnAdd:_,onOnChangeOnPage:l(t).changeOnPage,onOnSelectedSorting:P,onOnSelectedFilters:D,onClearSortFilter:x,onOnSearch:l(t).onSearch,onOnReload:l(t).goToLoadTcpaShield},{multipleActions:p(()=>[m.value?M((T(),k(W,{key:0,class:"text-gray-200 hover:text-purple transition-colors cursor-pointer",onClick:C},null,512)),[[u,l(H)("Delete")]]):j("",!0)]),dialogs:p(()=>[c(fe,{modelValue:n.value,"onUpdate:modelValue":e[0]||(e[0]=V=>n.value=V)},null,8,["modelValue"]),c(q,{modelValue:i.value,"onUpdate:modelValue":e[1]||(e[1]=V=>i.value=V),loading:l(t).actionLoading,title:"Delete Selected TCPA Shields",subTitle:"Are you sure you want to delete the selected Shields?",prop:"",confirmButtons:["Cancel","Confirm"],onSubmitForm:w},null,8,["modelValue","loading"])]),_:1},8,["showMultipleActions","headerType","controlsParams","selectedSorting","selectedFilters","searchValue","onPage","showButton","onOnChangeOnPage","onOnSearch","onOnReload"])])}}},Te={class:"pb-3 max-mob:pb-1.5"},ye={key:1},_e={class:"max-w-inherit truncate"},be={class:"flex items-center justify-center gap-x-1.5"},Ce={__name:"TcpaShieldTable",setup(F){const t=O(),v=U(),o=te(),n=ae(),i=h(!1),d=h(!1),m=h({}),f=h(""),_=h(""),C=h(""),w=y(()=>v.permissions.tcpaShield.edit),P=y(()=>v.permissions.tcpaShield.delete),x=y({get(){return t.page},set(g){t.changePage(g)}}),D=y({get(){return t.selected},set(g){t.changeSelectedItems(g)}});function a({slug:g}){o.push({name:G.detailTcpaShield,params:{workspace:n.params.workspace,slug:g}})}function e(g){i.value=!0,m.value=g}function u(g){d.value=!0,m.value=g,C.value="name",f.value="Delete T
1CPA Shield",_.value="Are you sure you want to delete this Shield?"}async function V(g){await t.goToDeleteTcpaShield([g.slug])&&(d.value=!1)}return(g,S)=>{const z=I("tippy");return T(),B("div",Te,[c(ue,{page:x.value,"onUpdate:page":S[3]||(S[3]=s=>x.value=s),selected:D.value,"onUpdate:selected":S[4]||(S[4]=s=>D.value=s),headerType:l(r).tcpaShield,items:l(t).items,loading:l(t).loading,total:l(t).total,showSelect:"",onEditAction:a},{"item.campaigns":p(({item:s})=>[s.campaigns.length?(T(),k(me,{key:0,class:"-ml-2.5",items:s.campaigns,onOnOpenDialog:$=>e(s)},null,8,["items","onOnOpenDialog"])):(T(),B("div",ye,"-//-"))]),"item.type":p(({item:s})=>[b("div",_e,oe(s.type.name),1)]),"item.status":p(({item:s})=>[c(ge,{item:s,loading:l(t).statusLoading,disabled:!w.value,onChangeStatus:$=>l(t).goToUpdateStatus(s),onClick:S[0]||(S[0]=A(()=>{},["stop"]))},null,8,["item","loading","disabled","onChangeStatus"])]),"item.actions":p(({item:s})=>[b("div",be,[c(ce,{class:"text-gray-200 hover:text-purple transition-colors cursor-pointer",edit:w.value,onClick:A($=>a(s),["stop"])},null,8,["edit","onClick"]),P.value?M((T(),k(W,{key:0,class:"text-gray-200 hover:text-purple transition-colors cursor-pointer",onClick:A($=>u(s),["stop"])},null,8,["onClick"])),[[z,l(H)("Delete")]]):j("",!0)])]),dialogs:p(()=>[c(q,{modelValue:d.value,"onUpdate:modelValue":S[1]||(S[1]=s=>d.value=s),loading:l(t).actionLoading,item:m.value,title:f.value,subTitle:_.value,confirmButtons:["Cancel","Confirm"],onSubmitForm:V},null,8,["modelValue","loading","item","title","subTitle"]),c(pe,{modelValue:i.value,"onUpdate:modelValue":S[2]||(S[2]=s=>i.value=s),items:m.value.campaigns},null,8,["modelValue","items"])]),_:1},8,["page","selected","headerType","items","loading","total"])])}}},we=[{name:"Name",value:"name",sortSettings:{key:"",sortBy:"byName"},filterSettings:{},disabled:!0,editAction:!0}
1,{name:"Campaign",value:"campaigns",minWidth:500},{name:"Type",value:"type",sortSettings:{key:"",sortBy:"byType"},filterSettings:{}},{name:"Status",value:"status",align:"center",sortSettings:{key:"",sortBy:"byStatus"},filterSettings:{},minWidth:80},{name:"Actions",value:"actions",minWidth:114,align:"center",disabled:!0}],Ge={__name:"ManageTcpaShield",setup(F){const t=N(),v=U(),o=O(),n=h("");return le(()=>{t.initializeTableSettings(r.tcpaShield),t.setHeaders(r.tcpaShield,we),t.getQueryLocalStorage(r.tcpaShield),o.getLocalStorageOnPage(),o.goToLoadTcpaShieldFiltersAndSorting(),o.goToLoadTcpaShield(),v.permissions.tcpaShield.edit&&o.goToLoadCreateDataForTcpaShield()}),ie((i,d,m)=>{n.value=i.name,m()}),se(()=>{n.value!==G.detailTcpaShield&&o.$reset(),o.clearItems(),t.removeFilter(r.tcpaShield)}),(i,d)=>(T(),k(ne,{title:"TCPA Shield"},{default:p(()=>[c(ve),c(Ce)]),_:1}))}};export{Ge as default};
2//# sourceMappingURL=ManageTcpaShield-DGlCQd0m.js.map

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.