PageSourceSearch

https://staging-blue-square-branding.up.railway.app/admin/2644.19be9200.chunk.js

js staging-blue-square-branding.up.railway.app collected 2026-10-03 12:15:34 UTC 7,978 bytes, 22 lines download raw bytes

1"use strict";(self.webpackChunkblue_square_branding_strapi=self.webpackChunkblue_square_branding_strapi||[]).push([[2644],{12644:($,m,s)=>{s.r(m),s.d(m,{default:()=>rs});var t=s(27442),e=s(17736),E=s(95604),D=s(80650),l=s(68922),L=s(38626),_=s(41521),i=s(6485),x=s(27229),d=s(52936),W=s(32743),C=s(76383),u=s(54388),S=s(88623),F=s(9596),N=s(12878),Q=s(62565),J=s(90064),R=s(34485),V=s(31175),b=s(34040),q=s(43845),ss=s(99353),ts=s(79774),k=s(56390),z=s(94470),es=s(22204),ns=s(84454),T=s(10497),as=s(40443),Ds=s(54295),Ms=s(14291),cs=s(20879),Os=s(11709),Ps=s(26148),gs=s(85565),ms=s(55628),hs=s(69825),Cs=s(89649),us=s(41855),Rs=s(91441),Ts=s(79878),Ls=s(62869),xs=s(50391),vs=s(40672),As=s(13247),Bs=s(73483),Is=s(64508),js=s(78177);const os=()=>"todo empty role",X=({id:a,name:M,description:o,usersCount:v,icons:r,rowIndex:f,canUpdate:c})=>{const{formatMessage:A}=(0,z.Z)(),[,B]=r,O=A({id:"Roles.RoleRow.user-count",defaultMessage:"{number, plural, =0 {#  user} one {#  user} other {# users}}"},{number:v});return(0,t.jsxs)(L.Tr,{"aria-rowindex":f,...c?(0,e.X7)({fn:B.onClick}):{},children:[(0,t.jsx)(_.Td,{maxWidth:(0,e.Q1)(130),children:(0,t.jsx)(i.Z,{ellipsis:!0,textColor:"neutral800",children:M})}),(0,t.jsx)(_.Td,{maxWidth:(0,e.Q1)(250),children:(0,t.jsx)(i.Z,{ellipsis:!0,textColor:"neutral800",children:o})}),(0,t.jsx)(_.Td,{children:(0,t.jsx)(i.Z,{textColor:"neutral800",children:O})}),(0,t.jsx)(_.Td,{children:(0,t.jsx)(x.k,{justifyContent:"flex-end",...e.UW,children:r.map((P,I)=>P?(0,t.jsx)(d.x,{paddingLeft:I===0?0:1,children:(0,t.jsx)(W.h,{onClick:P.onClick,label:P.label,noBorder:!0,icon:P.icon})},P.label):null)})})]},a)};X.propTypes={id:T.number.isRequired,name:T.string.isRequired,description:T.string.isRequired,usersCount:T.number.isRequired,icons:T.array.isRequired,rowIndex:T.number.isRequired,canUpdate:T.bool},X.defaultProps={canUpdate:!1};const ls={roleToDelete:null,showModalConfirmButtonLoading:!1,shouldRefetchData:!1},_s=(a,M)=>(0,as.ZP)(a,o=>{switch(M.type){case"ON_REMOVE_ROLES":{o.showModalConfirmButtonLoading=!0;break}case"ON_REMOVE_ROLES_SUCCEEDED":{o.shouldRefetchData=!0,o.roleToDelete=null;break}case"RESET_DATA_TO_DELETE":{o.shouldRefetchData=!1,o.roleToDelete=null,o.showModalConfirmButtonLoading=!1;break}case"SET_ROLE_TO_DELETE":{o.roleToDelete=M.id;break}default:return o}}),is=({canCreate:a,canDelete:M,canUpdate:o,refetchRoles:v})=>{const{formatMessage:r}=(0,z.Z)(),{formatAPIError:f}=(0,e.So)(),c=(0,e.lm)(),[A,B]=(0,l.useState)(!1),{push:O}=(0,es.k6)(),[{selectedRoles:P,showModalConfirmButtonLoading:I,roleToDelete:G},p]=(0,l.useReducer)(_s,ls),{post:H}=(0,e.tg)(),Y=async()=>{try{p({type:"ON_REMOVE_ROLES"}),await H("/admin/roles/batch-delete",{ids:[G]}),await v(),p({type:"RESET_DATA_TO_DELETE"})}catch(n){c({type:"warning",message:f(n)})}j()},U=(0,l.useCallback)(n=>{O(`/settings/roles/duplicate/${n}`)},[O]),K=()=>O("/settings/roles/new"),y=(0,l.useCallback)(n=>{p({type:"SET_ROLE_TO_DELETE",id:n}),j()},[]),j=()=>B(n=>!n),g=(0,l.useCallback)(n=>{O(`/settings/roles/${n}`)},[O]),Z=(0,l.useCallback)((n,h)=>{n.preventDefault(),n.stopPropagation(),h.usersCount?c({type:"info",message:{id:"Roles.ListPage.notification.delete-not-allowed"}}):y(h.id)},[c,y]),w=(0,l.useCallback)((n,h)=>{n.preventDefault(),n.stopPropagation(),U(h.id)},[U]),Es=(0,l.useCallback)(n=>[...a?[{onClick:h=>w(h,n),label:r({id:"app.utils.duplicate",defaultMessage:"Duplicate"}),icon:(0,t.jsx)(q.Z,{})}]:[],...o?[{onClick:()=>g(n.id),label:r({id:"app.utils.edit",defaultMessage:"Edit"}),icon:(0,t.jsx)(ss.Z,{})}]:[],...M?[{onClick:h=>Z(h,n),label:r({id:"global.delete",defaultMessage:"Delete"}),icon:(0,t.jsx)(ts.Z,{})}]:[]],[r,Z,w,g,a,o,M]);return{handleNewRoleClick:K,getIcons:Es,selectedRoles:P,isWarningDeleteAllOpened:A,showModalConfirmButtonLoading:I,handleToggleModal:j,handleDeleteData:Y}},ds=()=>{const{formatMessage:a}=(0,z.Z)();(0,e.go)();const M=(0,E.v9)(D.s),[{query:o}]=(0,e.Kx)(),{isLoading:v,allowedActions:{canCreate:r,canDelete:f,canRead:c,canUpdate:A}}=(0,e.ss)(M.settings.roles),{roles:B,isLoading:O,refetch:P}=(0,ns.u)({filters:o?._q?{name:{$containsi:o._q}}:void 0},{cacheTime:0,enabled:!v&&c}),{handleNewRoleClick:I,getIcons:G,isWarningDeleteAllOpened:p,showModalConfirmButtonLoading:H,handleToggleModal:Y,handleDeleteData:U}=is({refetchRoles:P,canCreate:r,canDelete:f,canUpdate:A}),K=B.length+1,y=6;if(v)return(0,t.jsx)(C.o,{children:(0,t.jsx)(e.dO,{})});const j=a({id:"global.roles",defaultMessage:"roles"});
1return(0,t.jsxs)(C.o,{children:[(0,t.jsx)(e.SL,{name:"Roles"}),(0,t.jsx)(u.T,{primaryAction:r?(0,t.jsx)(S.z,{onClick:I,startIcon:(0,t.jsx)(k.Z,{}),size:"S",children:a({id:"Settings.roles.list.button.add",defaultMessage:"Add new role"})}):null,title:j,subtitle:a({id:"Settings.roles.list.description",defaultMessage:"List of roles"}),as:"h2"}),c&&(0,t.jsx)(F.Z,{startActions:(0,t.jsx)(e.m,{label:a({id:"app.component.search.label",defaultMessage:"Search for {target}"},{target:j})})}),c&&(0,t.jsxs)(N.D,{children:[(0,t.jsxs)(Q.i,{colCount:y,rowCount:K,footer:r?(0,t.jsx)(J.c,{onClick:I,icon:(0,t.jsx)(k.Z,{}),children:a({id:"Settings.roles.list.button.add",defaultMessage:"Add new role"})}):null,children:[(0,t.jsx)(R.h,{children:(0,t.jsxs)(L.Tr,{"aria-rowindex":1,children:[(0,t.jsx)(_.Th,{children:(0,t.jsx)(i.Z,{variant:"sigma",textColor:"neutral600",children:a({id:"global.name",defaultMessage:"Name"})})}),(0,t.jsx)(_.Th,{children:(0,t.jsx)(i.Z,{variant:"sigma",textColor:"neutral600",children:a({id:"global.description",defaultMessage:"Description"})})}),(0,t.jsx)(_.Th,{children:(0,t.jsx)(i.Z,{variant:"sigma",textColor:"neutral600",children:a({id:"global.users",defaultMessage:"Users"})})}),(0,t.jsx)(_.Th,{children:(0,t.jsx)(V.T,{children:a({id:"global.actions",defaultMessage:"Actions"})})})]})}),(0,t.jsx)(b.p,{children:B?.map((g,Z)=>(0,t.jsx)(X,{id:g.id,name:g.name,description:g.description,usersCount:g.usersCount,icons:G(g),rowIndex:Z+2,canUpdate:A},g.id))})]}),!K&&!O&&(0,t.jsx)(os,{})]}),(0,t.jsx)(e.QH,{isOpen:p,onConfirm:U,isConfirmButtonLoading:H,onToggleDialog:Y})]})},rs=()=>{const a=(0,E.v9)(D.s);return(0,t.jsx)(e.O4,{permissions:a.settings.roles.main,children:(0,t.jsx)(ds,{})})}},84454:($,m,s)=>{s.d(m,{u:()=>l});var t=s(68922),e=s(17736),E=s(94470),D=s(54295);const l=(L={},_={})=>{const{id:i="",...x}=L,{get:d}=(0,e.kY)(),{locale:W}=(0,E.Z)(),C=(0,e.Xe)(W,{sensitivity:"base"}),{data:u,error:S,isError:F,isLoading:N,refetch:Q}=(0,D.useQuery)(["roles",i,x],async()=>{const{data:R}=await d(`/admin/roles/${i??""}`,{params:x});return R},_);return{roles:t.useMemo(()=>{let R=[];return u&&(Array.isArray(u.data)?R=u.data:R=[u.data]),[...R].sort((V,b)=>C.compare(V.name,b.name))},[u,C]),error:S,isError:F,isLoading:N,refetch:Q}}},9596:($,m,s)=>{s.d(m,{Z:()=>E});var t=s(27442),e=s(27229);const E=({startActions:D,endActions:l})=>!D&&!l?null:(0,t.jsxs)(e.k,{justifyContent:"space-between",alignItems:"flex-start",paddingBottom:4,paddingLeft:10,paddingRight:10,children:[(0,t.jsx)(e.k,{gap:2,wrap:"wrap",children:D}),(0,t.jsx)(e.k,{gap:2,shrink:0,wrap:"wrap",children:l})]})},90064:($,m,s)=>{s.d(m,{c:()=>x});var t=s(27442),e=s(6609),E=s(52936),D=s(42408),l=s(27229),L=s(6485);const _=(0,e.default)(E.x)`
2  height: ${24/16}rem;
3  width: ${24/16}rem;
4  border-radius: 50%;
5  display: flex;
6  justify-content: center;
7  align-items: center;
8
9  svg {
10    height: ${10/16}rem;
11    width: ${10/16}rem;
12  }
13
14  svg path {
15    fill: ${({theme:d})=>d.colors.primary600};
16  }
17`,i=(0,e.default)(E.x)`
18  border-radius: 0 0 ${({theme:d})=>d.borderRadius} ${({theme:d})=>d.borderRadius};
19  display: block;
20  width: 100%;
21  border: none;
22`,x=({children:d,icon:W,...C})=>(0,t.jsxs)("div",{children:[(0,t.jsx)(D.i,{}),(0,t.jsx)(i,{as:"button",background:"primary100",padding:5,...C,children:(0,t.jsxs)(l.k,{children:[(0,t.jsx)(_,{"aria-hidden":!0,background:"primary200",children:W}),(0,t.jsx)(E.x,{paddingLeft:3,children:(0,t.jsx)(L.Z,{variant:"pi",fontWeight:"bold",textColor:"primary600",children:d})})]})})]})}}]);

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.