PageSourceSearch

https://molly88.net/cp/javascript/components/pages/ProtectedDirectoryListPage.js?1fe6b4a78fb9769ae53f

js molly88.net collected 2026-10-05 06:51:33 UTC 7,419 bytes, 2 lines download raw bytes

1(globalThis.webpackChunkPlesk||=[]).push([["components/pages/ProtectedDirectoryListPage"],{3022(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}}})}},3023(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);i.forEach(t=>e.evict({id:n,fieldName:t}))})}},3024(e,t,i){"use strict";i.r(t),i.d(t,{evictDomainVirtualDirectoryMimeTypesCache:()=>o});var n=i(3021);const o=(e,t)=>{(0,n.evictDomainVirtualDirectoryFieldsCache)(e,{domainId:t,fields:["mimeType","mimeTypes"]})}},3025(e,t,i){"use strict";i.r(t),i.d(t,{evictDomainVirtualDirectoryProtectionCache:()=>o});var n=i(3021);const o=(e,t)=>{(0,n.evictDomainVirtualDirectoryFieldsCache)(e,{domainId:t,fields:["content","protectedDirectory"]})}},3021(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(3022),o=i(3023),r=i(3024),a=i(3025),c=i(3026)},3026(e,t,i){"use strict";i.r(t),i.d(t,{modifyCacheOnProtectedDirectoryAddOrDelete:()=>o});var n=i(3021);const o=(e,t)=>{(0,n.evictDomainHostingFieldCache)(e,t,"protectedDirectories"),(0,n.evictDomainVirtualDirectoryProtectionCache)(e,t)}},3020(e,t,i){"use strict";i.r(t),i.d(t,{default:()=>x});var n=i(341),o=i(772),r=i(95),a=i(811),c=i(342),s=i(1330),d=i(897),l=i(718),m=i(3021),u=i(2504),p=i(1387),y=i.n(p),h=i(3027),f=i.n(h);i(3028);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:h},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)}),[T]=(0,a.useMutation)(f(),{refetchQueries:[y()],awaitRefetchQueries:!0,onCompleted(){(0,l.addToast)({intent:"success",message:D.lmsg("removeSuccess")})},onError({message:e}){(0,l.addToast)({intent:"danger",message:e}),h()},update(t){(0,m.modifyCacheOnProtectedDirectoryAddOrDelete)(t,e)}}),j=(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,L=(0,n.jsx)(s.GraphQlList,{"data-id":"protected-directory-list",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})=>t?(0,n.jsx)(o.Link,{className:"protected-directory-list__column-content",to:`./${(0,d.getId)(e)}/users`,children:t}):null},{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`,tooltipAsLabel:!0,children:D.lmsg("edit")})})}],toolbar:(0,n.jsxs)(c.Toolbar,{children:[(0,n.jsx)(c.ToolbarGroup,{title:"",children:j}),(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 T({variables:{ids:t}}),p([])}
1,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:j}),...g});return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(o.Outlet,{}),L]})}},3019(e,t,i){"use strict";i.r(t),i.d(t,{default:()=>n.default});var n=i(3020)},2504(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})},3027(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"}}}}}}],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"}}}]}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"ids"}}]}}]}}],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")},3028(e,t,i){"use strict";i.r(t)}}]);
2//# sourceMappingURL=ProtectedDirectoryListPage.js.map?1fe6b4a78fb9769ae53f

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.