PageSourceSearch

https://diariodecuba.net/cp/javascript/components/pages/ProtectedDirectoryUserListPage.js?2940c2e118fdb618c69d

js diariodecuba.net collected 2026-10-03 22:39:35 UTC 6,408 bytes, 2 lines download raw bytes

1(globalThis.webpackChunkPlesk=globalThis.webpackChunkPlesk||[]).push([["components/pages/ProtectedDirectoryUserListPage"],{2957(e,t,i){"use strict";i.r(t),i.d(t,{default:()=>D});var n=i(396),r=i(787),o=i.n(r),s=i(715),a=i(810),d=i(95),c=i(397),l=i(1241),u=i(785),p=i(663),m=i(1540),y=i(1305),f=i.n(y),h=i(2958),v=i.n(h);const k=d.Locale.getSection("components.lists.ProtectedDirectoryUser"),g=d.Locale.getTranslate("components.lists.ProtectedDirectoryUser"),x=d.Locale.getTranslate("components.buttons"),b=({directoryId:e,protectedDirectory:t,listKey:i,userCreationLink:r,emptyListViewAddon:o=null,toolbarAddon:d=null})=>{const y=(0,s.useLocation)(),h=btoa(`ProtectedDirectory:${e}`),[b,D]=(0,n.useState)([]),[j,T]=(0,n.useState)([]),{queryResult:{refetch:L},listData:S,listProps:w,listInput:P}=(0,l.useGraphQlList)({key:i,onListInputChange:()=>D([]),query:f(),variables:{id:h},extractList:e=>e.protectedDirectory.users}),[E]=(0,a.useMutation)(v(),{refetchQueries:[f()],update:e=>(0,m.evictEntitiesCache)({cache:e,typename:"ProtectedDirectory",ids:[h],fields:["users"]}),awaitRefetchQueries:!0,onCompleted(){(0,p.addToast)({intent:"success",message:k.lmsg("removeSuccess")})},onError({message:e}){(0,p.addToast)({intent:"danger",message:e}),L()}}),N=(0,n.jsx)(c.Button,{icon:"plus",intent:"primary",component:s.Link,to:r,tooltip:(0,n.jsx)(g,{content:"addTooltip",params:{directory:`/${t.path}`}}),"data-type":"protected-directory-user-add",children:(0,n.jsx)(g,{content:"add"})}),R=!!P.searchFilters?.login;return(0,n.jsx)(l.GraphQlList,{"data-id":"protected-directory-users-list",rowKey:"id",filtered:R,loadingRows:j,selection:b,onSelectionChange:D,columns:[{key:"login",title:(0,n.jsx)(g,{content:"login"}),sortable:!0,type:"title"},{key:"actions",type:"actions",render:({id:e})=>(0,n.jsx)(c.ListActions,{children:(0,n.jsx)(c.ListAction,{primary:!0,icon:"key",component:s.Link,to:{...y,pathname:`${(0,u.getId)(e)}/password`},tooltipAsLabel:!0,children:k.lmsg("changePassword")})})}],toolbar:(0,n.jsxs)(c.Toolbar,{children:[(0,n.jsx)(c.ToolbarGroup,{title:"",children:N}),(0,n.jsx)(c.ToolbarGroup,{title:"",children:(0,n.jsx)(c.ListOperation,{critical:!0,noSelectionText:k.lmsg("noSelectionText"),confirmationText:()=>k.formatMessage("removeConfirmation",{login:(0,n.jsx)("b",{children:S.nodes.find(({id:e})=>b[0]===e).login}),count:b.length}),actionButtonText:(0,n.jsx)(x,{content:"yesRemove"}),cancelButtonText:(0,n.jsx)(x,{content:"cancel"}),children:(0,n.jsx)(c.Button,{"data-type":"protected-directory-user-remove",onClick:async()=>{T(b),await E({variables:{ids:b}}),T([])},tooltip:(0,n.jsx)(g,{content:"removeTooltip"}),children:(0,n.jsx)(g,{content:"remove"})})})}),d,(0,n.jsx)(c.ToolbarExpander,{}),(0,n.jsx)(c.ToolbarGroup,{groupable:!1,title:"",children:(0,n.jsx)(l.GraphQlList.SearchBar,{name:"login"})})]}),emptyView:(0,n.jsxs)(n.Fragment,{children:[o,(0,n.jsx)(c.ListEmptyView,{title:(0,n.jsx)(g,{content:"emptyViewTitle"}),actions:N})]}),...w})};b.propTypes={directoryId:o().string.isRequired,protectedDirectory:o().shape({path:o().string.isRequired}).isRequired,listKey:o().string.isRequired,userCreationLink:o().oneOfType([o().string,o().object]).isRequired,toolbarAddon:o().node,emptyListViewAddon:o().node};const D=b},2956(e,t,i){"use strict";i.r(t),i.d(t,{default:()=>n.default});var n=i(2957)},2955(e,t,i){"use strict";i.r(t),i.d(t,{default:()=>c});var n=i(787),r=i.n(n),o=i(715),s=i(2956),a=i(396);const d=({params:{directoryId:e},protectedDirectory:t})=>(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(o.Outlet,{}),(0,a.jsx)(s.default,{directoryId:e,protectedDirectory:t,listKey:`ProtectedDirectoryUserListPage${e}`,userCreationLink:"./add"})]});d.propTypes={params:r().shape({directoryId:r().string.isRequired}).isRequired,protectedDirectory:r().shape({path:r().string.isRequired}).isRequired};const c=d},2954(e,t,i){"use strict";i.r(t),i.d(t,{default:()=>n.default});var n=i(2955)},1540(e,t,i){"use strict";i.r(t),i.d(t,{evictEntitiesCache:()=>n});const n=({cache:e,typename:t,ids:i=[],fields:n=[]})=>{Object.values(e.extract()).filter(({__typename:e,id:n})=>
1e===t&&(0===i.length||i.includes(n))).forEach(t=>{n.forEach(i=>e.evict({id:e.identify(t),fieldName:i}))})}},2958(e){var t={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"DeleteProtectedDirectoryUser"},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:"deleteProtectedDirectoryUser"},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:131}};t.loc.source={body:"mutation DeleteProtectedDirectoryUser($ids: [ID!]!) {\n    deleteProtectedDirectoryUser(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 r(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.DeleteProtectedDirectoryUser=function(e,t){var i={kind:e.kind,definitions:[r(e,t)]};e.hasOwnProperty("loc")&&(i.loc=e.loc);var o=n[t]||new Set,s=new Set,a=new Set;for(o.forEach(function(e){a.add(e)});a.size>0;){var d=a;a=new Set,d.forEach(function(e){s.has(e)||(s.add(e),(n[e]||new Set).forEach(function(e){a.add(e)}))})}return s.forEach(function(t){var n=r(e,t);n&&i.definitions.push(n)}),i}(t,"DeleteProtectedDirectoryUser")}}]);
2//# sourceMappingURL=ProtectedDirectoryUserListPage.js.map?2940c2e118fdb618c69d

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.