PageSourceSearch

https://app.gdprregister.eu/build/assets/Index-CiOndh6p.js

js gdprregister.eu collected 2026-09-24 19:33:48 UTC 9,590 bytes, 1 lines download raw bytes

1import{b as H,r as p,j as o,a as L}from"./app-1vgDEoGC.js";import{H as D}from"./HistoryDrawer-CXPbIx6v.js";import{P as C}from"./Pill-DosfGYhZ.js";import{C as z}from"./Callout-Ddx612Hx.js";import{u as G,S as O,B as $,a as q,b as Y}from"./SettingsPage-B3LufV0W.js";import{r as V,b as X}from"./useCatalogue-DmakCucm.js";import{w as J}from"./origin-DwUwa3i8.js";import{C as K}from"./CountryFlag-B-KYeC--.js";import{E as k}from"./EmptyState-BcOEBujR.js";import{B as j}from"./Button-C1UBfgUD.js";import{P as _}from"./PlusIcon-BoV2LIzJ.js";import{D as Q}from"./DataTable-CPR8XibB.js";import{R as U}from"./RowMenu-AMwbdSlG.js";import{T as W}from"./Tooltip-BHql35ey.js";import{C as y}from"./tokens-B37dFduH.js";import{u as Z}from"./useTranslate-BHVuDmqB.js";import{S as ee}from"./SettingsLayout-D5VQhpLC.js";import{s as v,C as ne}from"./CompanyDrawer-3i4th4TZ.js";import"./preload-helper-I4rgV-VL.js";import"./merge-WwJn_B7a.js";import"./_commonjsHelpers-Cpj98o6Y.js";import"./Drawer-CCrORZwR.js";import"./ConfirmDialog-EbcbS2sJ.js";import"./Modal-hoqpFf51.js";import"./HistoryIcon-ClX5BXp1.js";import"./AuditTimeline-skguTjXr.js";import"./countLabel-LvdBppA9.js";import"./Avatar-D8GC2Sii.js";import"./SearchSelect-9NMbOYPQ.js";import"./ChevronDownIcon-DIcq07J4.js";import"./SearchIcon-kBxLXvqZ.js";import"./ChipsInput-C-TZBE_e.js";import"./AlertIcon-C51GveBo.js";import"./Breadcrumb-BBub18Pd.js";import"./ChevronRightIcon-CBtU0BC-.js";import"./toastBus-9iO4cE5G.js";import"./form.module-DRFqX35K.js";import"./SearchInput-CaQKKPMx.js";import"./ChevronLeftIcon-CsJ3sA3N.js";import"./Checkbox-BlIsyWBV.js";import"./AppLayout-DaqEkbg4.js";import"./nav.module-CPSaaDRT.js";import"./Toaster-APP9jgKp.js";import"./EditableLabel-CxmEKnoO.js";import"./Field-D4EcR6vh.js";import"./InfoHint-Cheg-sCt.js";import"./TextInput-DRsNYNVU.js";import"./Textarea-48tAO1Jv.js";import"./useDescribe-CPeum1-R.js";import"./DateInput-DOKY-lW1.js";import"./SpinnerIcon-idox9C1S.js";import"./Switch-BAKt-sxX.js";import"./ClockIcon-Cx8ji1wJ.js";import"./TableSkeleton-Dl7JBm-h.js";import"./types-D4p4HVx-.js";import"./TasksIcon-DDMwJ8By.js";import"./Radio-Cqt3xPS2.js";import"./ReadOnlyNotice-CPctqiDl.js";import"./LockIcon-DLQ7bVB5.js";import"./FileDropInput-BcK8QCCY.js";import"./Tabs-Dt2Anl3X.js";function oe(r){return r.flatMap(s=>s.kind==="company"?[s.company]:[])}function R(r,s){const u=new Set(r.map(i=>i.id)),n=r.filter(i=>i.parent_id===null||!u.has(i.parent_id)),m=new Set(n.map(i=>i.id)),l=s.flatMap(i=>[i,...i.children??[]]).filter(i=>m.has(i.id)||i.parent_id!==null&&m.has(i.parent_id)),d=n.reduce((i,h)=>i+h.subsidiary_count,0);return{subsidiaries:d,hidden:Math.max(0,d-l.filter(i=>i.parent_id!==null&&m.has(i.parent_id)).length),ids:new Set(l.map(i=>i.id)),names:l.map(i=>i.name)}}const w=p.createContext({edit:()=>{},history:()=>{},remove:()=>{},t:(r,s)=>s??r});function ae({company:r}){const{edit:s,history:u,remove:n,t:m}=p.useContext(w),l=[];r.canManage&&l.push({label:m("general.edit","Edit"),onClick:()=>s(r)}),l.push({label:m("audit.history","History"),onClick:()=>u(r)}),r.canManage&&l.push({label:m("general.remove","Remove"),onClick:()=>n(r),danger:!0});const d=r.canManage?l:J(l,m("company.read_only_admin_short","Only an Admin can change a company’s details."),m);return o.jsx("div",{style:X,children:o.jsx(U,{items:d,label:`${m("general.actions","Actions")} — ${r.name}`,elevated:!0})})}function te({parent:r,t:s}){const u=s("company.add_child_company","Add subsidiary");return r.subsidiaryLimitReached?o.jsx(W,{content:s("company.contracted_number_of_subsidiaries_reached","The contracted number of subsidiaries has been reached."),children:o.jsxs("button",{type:"button",className:v.addRowOff,"aria-disabled":"true",children:[o.jsx(_,{size:13}),u]})}):o.jsxs("button",{type:"button",className:v.addRow,children:[o.jsx(_,{size:13}),u]})}function ie({companyTree:r,gates:s,options:u}){const n=Z(),m=H().props.activeCompany?.id??null,[l,d]=p.useState(null),[i,h]=p.useState(null),g=p.useMemo(()=>r.flatMap(e=>[e,...e.children??[]]),[r]),S=g.some(e=>e.canManage),b=G({url:"/company/manage/bulk_delete",onRemoved:e=>{d(null);const a=R(g.filter(t=>e.includes(t.id)),r);if(e.length>0&&g.every(t=>a.ids.has(t.id))){window.location.assign("/company");return}L.reload()}}),f=b.request,M=p.useCallback(e=>{if(e.kind==="add"){e.parent.subsidiaryLimitReached||d({mode:"create",parent:e.parent});return}d(e.company.canManage?{mode:"edit",company:e.company}:{mode:"view",company:e.company})},[]),A=p.useMemo(()=>({edit:e=>d({mode:"edit",company:e}),history:h,remove:e=>f([e],()=>{}),t:n}),[f,n]),P=p.useMemo(()=>r.map(e=>{const a=(e.children??[]).map(t=>({kind:"company",id:String(t.id),company:t}));return e.canManage&&e.canAddSubsidiary&&a.push({kind:"add",id:`add-${e.id}`,parent:e}),{kind:"company",id:String(e.id),company:e,children:a}}),[r]),T=p.useMemo(()=>{const e={enableColumnFilter:!1};return[{...e,id:"name",header:n("company.company_name","Company name"),accessorFn:a=>a.kind==="company"?a.company.name:"",cell:({row:a})=>{const t=a.original;return t.kind==="add"?o.jsx(te,{parent:t.parent,t:n}):o.jsx("span",{style:t.company.parent_id===null?V:{color:y.text},children:t.company.name})}},{...e,id:"reg_nr",header:n("company.reg_nr","Registration number"),accessorFn:a=>a.kind==="company"?a.company.reg_nr??"":"",cell:({row:a})=>{const t=a.original;return t.kind==="company"?o.jsx("span",{style:{color:y.text},children:t.company.reg_nr||"—"}):null}},{...e,id:"country",header:n("company.country","Country"),accessorFn:a=>a.kind==="company"?a.company.country_name??"":"",cell:({row:a})=>{const t=a.original;return t.kind!=="company"?null:o.jsxs("span",{className:v.country,children:[t.company.country_code?o.jsx(K,{code:t.company.country_code}):null,t.company.country_name||"—"]})}},{...e,id:"plan",header:n("company.plan","Plan"),accessorFn:a=>a.kind==="company"?a.company.plan_label??"":"",cell:({row:a})=>{const t=a.original;return t.kind!=="company"||!t.company.plan_label?null:t.company.unsubscribed?o.jsx(C,{color:y.warnText,bg:y.warnBg,children:t.company.plan_label}):o.jsx(C,{color:y.infoText,bg:y.infoBg,children:t.company.plan_label})}},{...e,id:"actions",header:"",enableSorting:!1,enableHiding:!1,enableGlobalFilter:!1,cell:({row:a})=>{const t=a.original;return t.kind==="company"?o.jsx(ae,{company:t.company}):null}}]},[n]),N=p.useMemo(()=>({name:n("company.company_name","Company name"),reg_nr:n("company.reg_nr","Registration number"),country:n("company.country","Country"),plan:n("company.plan","Plan")}),[n]),B=s.canAddCompany?o.jsxs(j,{onClick:()=>d({mode:"create",parent:null}),children:[o.jsx(_,{size:13}),n("company.add_company","Add company")]}):void 0,c=b.pending?R(b.pending,r):null,x=c!==null&&g.every(e=>c.ids.has(e.id)),F=c!==null&&m!==null&&c.ids.has(m),E=c===null||c.subsidiaries===0?n("general.confirm_delete","Are you sure you want to delete this? This action cannot be undone."):c.subsidiaries===1?n("company.confirm_remove_cascade_one","This al
1so removes 1 subsidiary and everything recorded under it. This action cannot be undone."):n("company.confirm_remove_cascade_many","This also removes :count subsidiaries and everything recorded under them. This action cannot be undone.").replace(":count",String(c.subsidiaries)),I=c===null?void 0:c.hidden>0?[...c.names,n("company.confirm_remove_not_member",":count more you are not a member of").replace(":count",String(c.hidden))]:c.names;return o.jsxs(O,{wide:!0,title:n("company.manage_companies","Manage companies"),subtitle:n("company.page_subtitle","Your organisation, its subsidiaries and their subscription."),actions:B,children:[o.jsx($,{bulk:b,title:n("company.confirm_remove","Remove this company?"),titlePlural:n("company.confirm_remove_bulk","Remove the selected companies?"),names:I,message:o.jsxs(o.Fragment,{children:[E,x||F?o.jsx("div",{style:{marginTop:12},children:o.jsx(z,{tone:"warn",children:x?n("company.confirm_remove_last","This removes every company you belong to. You will be signed out and won’t have access to any company afterwards."):n("company.confirm_remove_active","This includes the company you are working in. Removing it switches you to another of your companies.")})}):null]})}),o.jsx(w.Provider,{value:A,children:o.jsx(Q,{data:P,columns:T,columnLabels:N,getSubRows:e=>e.kind==="company"?e.children:void 0,getRowId:e=>e.id,ghostRow:e=>e.kind==="add",nameColumnId:"name",pinnedLeft:["name"],pinnedRight:["actions"],onRowClick:M,selectable:S,selectableRow:e=>e.kind==="company"&&e.company.canManage,renderBulkActions:({selected:e,clear:a})=>o.jsx(Y,{onClick:()=>f(oe(e),a)}),searchable:!0,searchPlaceholder:n("general.search","Search"),countNoun:n("company.count_one","company"),countNounPlural:n("company.count_many","companies"),exportable:!0,exportFileName:"companies",exportSheetName:n("company.manage_companies","Manage companies"),paginated:!1,maxHeight:q,emptyState:({filtered:e,clearFilters:a})=>e?o.jsx(k,{title:n("general.no_results","No results"),action:o.jsx(j,{size:"sm",variant:"secondary",onClick:a,children:n("general.clear_filters","Clear filters")})}):o.jsx(k,{title:n("company.no_companies","No companies"),description:n("company.no_companies_help","Add your organisation to start building its GDPR register.")})})}),l?o.jsx(ne,{target:l,options:u,onClose:()=>d(null)}):null,o.jsx(D,{open:i!==null,onClose:()=>h(null),endpoint:i?`/company/${i.id}/audit`:"",subtitle:i?.name,emptyDescription:n("company.history_empty","Changes to this company will appear here as they happen.")})]})}ie.layout=r=>o.jsx(ee,{active:"company",children:r});export{ie as default};

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.