1(self.webpackChunkPlesk=self.webpackChunkPlesk||[]).push([["components/pages/ProtectedDirectoryListPage"],{2284:(e,t,i)=>{"use strict";function n(e,t){if(e.__typename!==t)throw new Error(`GraphQL type assertion failed: expected ${t} but received ${e.__typename}`)}i.r(t),i.d(t,{assertNodeTypename:()=>n})},2740:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>n.default});var n=i(2741)},2741:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>x});var n=i(295),o=i(598),r=i(90),a=i(695),c=i(296),s=i(1169),d=i(665),l=i(545),m=i(2742),u=i(2284),p=i(1220),y=i.n(p),f=i(2748),h=i.n(f);i(2749);const D=r.Locale.getSection("components.pages.ProtectedDirectoryList"),v=r.Locale.getTranslate("components.pages.ProtectedDirectoryList"),k=r.Locale.getTranslate("components.buttons"),x=({params:{domainId:e}})=>{const[t,i]=(0,n.useState)([]),[r,p]=(0,n.useState)([]),{queryResult:{refetch:f},listData:x,listProps:g,listInput:b}=(0,s.useGraphQlList)({key:`ProtectedDirectoryListPage${e}`,onListInputChange:()=>i([]),query:y(),variables:{id:btoa(`Domain:${e}`)},extractList:e=>((0,u.assertNodeTypename)(e.domain,"Domain"),e.domain.hosting.protectedDirectories)}),[j]=(0,a.useMutation)(h(),{refetchQueries:[y()],awaitRefetchQueries:!0,onCompleted(){(0,l.addToast)({intent:"success",message:D.lmsg("removeSuccess")})},onError({message:e}){(0,l.addToast)({intent:"danger",message:e}),f()},update(t){(0,m.modifyCacheOnProtectedDirectoryAddOrDelete)(t,e)}}),T=(0,n.jsx)(c.Button,{icon:"plus",intent:"primary",component:o.Link,to:"./add",tooltip:(0,n.jsx)(v,{content:"addTooltip"}),"data-type":"protected-directory-add",children:(0,n.jsx)(v,{content:"add"})}),C=!!b.searchFilters?.path,P=(0,n.jsx)(s.GraphQlList,{rowKey:"id",filtered:C,loadingRows:r,selection:t,onSelectionChange:i,columns:[{key:"path",title:(0,n.jsx)(v,{content:"name"}),width:"50%",sortable:!0,type:"title",render:({id:e,path:t})=>(0,n.jsx)(o.Link,{className:"protected-directory-list__column-content",to:`./${(0,d.getId)(e)}/users`,children:`/${t}`})},{key:"realm",title:(0,n.jsx)(v,{content:"realmTitle"}),width:"50%",sortable:!0,type:"title",render:({id:e,realm:t})=>(0,n.jsx)(o.Link,{className:"protected-directory-list__column-content",to:`./${(0,d.getId)(e)}/users`,children:t})},{key:"actions",type:"actions",render:({id:e})=>(0,n.jsx)(c.ListActions,{children:(0,n.jsx)(c.ListAction,{primary:!0,icon:"pencil",component:o.Link,to:`${(0,d.getId)(e)}/edit`,children:(0,n.jsx)(v,{content:"edit"})})})}],toolbar:(0,n.jsxs)(c.Toolbar,{children:[(0,n.jsx)(c.ToolbarGroup,{title:"",children:T}),(0,n.jsx)(c.ToolbarGroup,{title:"",children:(0,n.jsx)(c.ListOperation,{critical:!0,noSelectionText:D.lmsg("noSelectionText"),confirmationText:()=>{const e=x?.nodes.find(({id:e})=>t[0]===e);return D.formatMessage("removeConfirmation",{name:(0,n.jsxs)("b",{children:["/",e?.path]}),count:t.length})},actionButtonText:(0,n.jsx)(k,{content:"yesRemove"}),cancelButtonText:(0,n.jsx)(k,{content:"cancel"}),children:(0,n.jsx)(c.Button,{"data-type":"protected-directory-remove",onClick:async()=>{p(t),await j({variables:{ids:t}}),p([])},icon:"lock-open-cross",tooltip:(0,n.jsx)(v,{content:"removeTooltip"}),children:(0,n.jsx)(v,{content:"remove"})})})}),(0,n.jsx)(c.ToolbarExpander,{}),(0,n.jsx)(c.ToolbarGroup,{groupable:!1,title:"",children:(0,n.jsx)(s.GraphQlList.SearchBar,{name:"path"})})]}),emptyView:(0,n.jsx)(c.ListEmptyView,{actions:T}),...g});return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(o.Outlet,{}),P]})}},2742:(e,t,i)=>{"use strict";i.r(t),i.d(t,{evictDomainHostingFieldCache:()=>n.evictDomainHostingFieldCache,evictDomainVirtualDirectoryFieldsCache:()=>o.evictDomainVirtualDirectoryFieldsCache,evictDomainVirtualDirectoryMimeTypesCache:()=>r.evictDomainVirtualDirectoryMimeTypesCache,evictDomainVirtualDirectoryProtectionCache:()=>a.evictDomainVirtualDirectoryProtectionCache,modifyCacheOnProtectedDirectoryAddOrDelete:()=>c.modifyCacheOnProtectedDirectoryAddOrDelete});var n=i(2743),o=i(2744),r=i(2745),a=i(2746),c=i(2747)},2743:(e,t,i)=>{"use strict";i.r(t),i.d(t,{evictDomainHostingFieldCache:()=>n});const n=(e,t,i)=>{e.modify({id:e.identify({__typename:"Domain",id:btoa(`Domain:${t}`)}),fields:{hosting(e){const t={};for(const n in e)n===i||n.startsWith(`${i}(`)||(t[n]=e[n]);return t}}})}},2744:(e,t,i)=>{"use strict";i.r(t),i.d(t,{evictDomainVirtualDirectoryFieldsCache:()=>n});const n=(e,{domainId:t,fields:i})=>{Object.values(e.extract()).filter(({__typename:e})=>"VirtualDirectory"===e).filter(({key:e})=>atob(e).split(":")[1]===t).forEach(t=>{const n=e.identify(t);
1i.forEach(t=>e.evict({id:n,fieldName:t}))})}},2745:(e,t,i)=>{"use strict";i.r(t),i.d(t,{evictDomainVirtualDirectoryMimeTypesCache:()=>o});var n=i(2742);const o=(e,t)=>{(0,n.evictDomainVirtualDirectoryFieldsCache)(e,{domainId:t,fields:["mimeType","mimeTypes"]})}},2746:(e,t,i)=>{"use strict";i.r(t),i.d(t,{evictDomainVirtualDirectoryProtectionCache:()=>o});var n=i(2742);const o=(e,t)=>{(0,n.evictDomainVirtualDirectoryFieldsCache)(e,{domainId:t,fields:["content","protectedDirectory"]})}},2747:(e,t,i)=>{"use strict";i.r(t),i.d(t,{modifyCacheOnProtectedDirectoryAddOrDelete:()=>o});var n=i(2742);const o=(e,t)=>{(0,n.evictDomainHostingFieldCache)(e,t,"protectedDirectories"),(0,n.evictDomainVirtualDirectoryProtectionCache)(e,t)}},2748:e=>{var t={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"DeleteProtectedDirectory"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"ids"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deleteProtectedDirectory"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"ids"},value:{kind:"Variable",name:{kind:"Name",value:"ids"}}}]}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"ids"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:123}};t.loc.source={body:"mutation DeleteProtectedDirectory($ids: [ID!]!) {\n deleteProtectedDirectory(input: { ids: $ids} ) {\n ids\n }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};function i(e,t){if("FragmentSpread"===e.kind)t.add(e.name.value);else if("VariableDefinition"===e.kind){var n=e.type;"NamedType"===n.kind&&t.add(n.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){i(e,t)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){i(e,t)}),e.definitions&&e.definitions.forEach(function(e){i(e,t)})}var n={};function o(e,t){for(var i=0;i<e.definitions.length;i++){var n=e.definitions[i];if(n.name&&n.name.value==t)return n}}t.definitions.forEach(function(e){if(e.name){var t=new Set;i(e,t),n[e.name.value]=t}}),e.exports=t,e.exports.DeleteProtectedDirectory=function(e,t){var i={kind:e.kind,definitions:[o(e,t)]};e.hasOwnProperty("loc")&&(i.loc=e.loc);var r=n[t]||new Set,a=new Set,c=new Set;for(r.forEach(function(e){c.add(e)});c.size>0;){var s=c;c=new Set,s.forEach(function(e){a.has(e)||(a.add(e),(n[e]||new Set).forEach(function(e){c.add(e)}))})}return a.forEach(function(t){var n=o(e,t);n&&i.definitions.push(n)}),i}(t,"DeleteProtectedDirectory")},2749:(e,t,i)=>{"use strict";i.r(t)}}]); 2//# sourceMappingURL=ProtectedDirectoryListPage.js.map?94c2f765eefcb68df2ee
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.