PageSourceSearch

https://www.surecloud.io/chunk-NEO22EVB.js

js surecloud.io collected 2026-10-04 04:30:25 UTC 34,226 bytes, 1 lines download raw bytes

1import{Za as wr,_a as Ae,aa as Nr,ca as xr,ea as Pr,ke as Ur,pc as Te,sc as jr,tc as Br,ua as Fr}from"./chunk-R76WN672.js";import{$ as P,$d as a,$e as j,$p as vr,Ab as er,B as Fe,Bb as rr,Cb as he,E as _,Fj as Sr,Gp as kr,Ha as te,Hb as le,He as nr,Hp as Er,I as we,Ke as ar,Ls as Dr,Mh as Ue,Nb as tr,Ob as or,Oe as dr,Pb as ir,Qa as fe,Sb as cr,Ta as Ie,Td as ke,Tj as hr,Ua as Se,Uf as q,Xh as B,Xs as K,Y as S,Ye as pr,Yp as Lr,Zp as Cr,_d as l,_e as ge,_p as gr,ae as Ee,aj as se,aq as Ar,ba as Q,be as sr,bq as Tr,cq as $r,di as Ge,dq as _r,dt as Or,ea as L,eq as Mr,fa as ue,fi as Rr,fq as yr,gi as ur,ha as p,id as be,if as ve,kb as W,kf as ce,kh as mr,kk as br,l as X,lb as G,le as V,m as h,ma as je,mb as Y,me as Le,mk as d,n as D,na as Be,nb as pe,ne as v,oe,pe as Ce,q as R,qe as T,re as ie,ri as fr,s as Z,se as f,si as Ir,te as w,ue as I,xb as Je,zf as lr}from"./chunk-EDVRXFUS.js";import{a as k,b as A,h as $t}from"./chunk-EDFEYHFX.js";var _t={"Read Linkable Record List":a(),"Read Linkable Record":a(),"Read Linkable Records Data Success":a(),"Read Linkable Records Data Failure":a(),"Read Linkable Records Success":a(),"Read Linkable Records Failure":a(),"Link Records":a(),"Link Records Success":a(),"Link Failure":a()},Mt=Ee({source:"Record Linkable/API",events:_t}),yt={selectLinkableRecordTab:l("[Record View Table Page] Select Linkable Record Tab",a())},M=k(k({},Mt),yt);var Dt=d.nativeEnum(fr),Ot=d.nativeEnum(Ir),Vr=d.object({value:d.string().nullable(),display:d.string().nullable()}),Kr=d.object({value:d.string(),display:d.string(),initials:d.string(),colour:d.string(),type:d.string()}),Gr=d.object({recordId:d.string().nullable(),name:d.string().nullable()}),zr=d.object({value:Gr,display:Gr}),Nt=d.object({value:d.string(),fileName:d.string(),virusScanStatus:Dt.
1nullable(),uploadStatus:Ot.nullable()}),Ve=d.object({singleAttribute:d.union([Vr,Kr,zr])}),Ke=d.object({multiAttributes:d.array(d.union([Vr,Kr,Nt,zr]))}),xt=d.object({recordId:d.string(),attributes:d.array(d.union([Ve,Ke])),viewerCanDelete:d.boolean()}),Pt=d.object({name:d.string()}),Xr=d.object({columnAttributes:d.array(Pt),records:d.array(xt),viewerCanCreate:d.boolean(),canBeMultiple:d.boolean().nullable().optional(),totalItems:d.number()}).refine(r=>r.records.find(e=>Object.keys(e.attributes).length!==r.columnAttributes.length)===void 0,{message:"Number of columnAttributeIds should match the number of records"}),Zr=r=>Xr.safeParse(r).success,Qr=r=>Xr.safeParse(r);var Ft=d.object({entityId:d.string(),tabId:d.string(),isLinked:d.boolean(),recordIds:d.array(d.string()),viewerCanCreate:d.boolean(),isEntityDirectlyLinked:d.boolean().optional()}),wt=d.object({parentId:d.string(),recordId:d.string(),attributes:d.array(d.union([Ve,Ke])),linkedViaRecordId:d.string().nullable().optional(),linkedViaRecordName:d.string().nullable().optional(),viewerCanDelete:d.boolean()}),Wr=d.object({link:Ft,tableRecords:d.array(wt)}),Yr=r=>Wr.safeParse(r).success;var qr=r=>{let e=Wr.safeParse(r);return e.success?"No errors.":br(e.error.issues)};var $e=(()=>{let e=class e{constructor(o){this.logger=o}flatten(o,t,c,i,s,b=!1){let n=i?"Linked":"Linkable",u={link:{entityId:o,tabId:t,isLinked:i,recordIds:c.map(E=>E.recordId),viewerCanCreate:s,isEntityDirectlyLinked:b},tableRecords:c.map(E=>A(k({},E),{parentId:`${t}.${i?"linked":"linkable"}.${E.recordId}`,attributes:E.attributes}))};if(!Yr(u))throw this.logger.logEvent("Record Feature",`Normalise Record ${n} List Data`,qr(u)),new Error(`The result of the normalised Record ${n} List does not match the expected format.`);return u}};e.\u0275fac=function(t){return new(t||e)(p(se))},e.\u0275prov=L({token:e,factory:e.\u0275fac,providedIn:"root"});let r=e;return r})();var jt="No link record response data from link record returned from API",Jr=(()=>{let e=class e{constructor(o,t,c){this.recordLinkMutationApiInterfaceMutationService=o,this.linkableRecordsApiInterfaceQueryService=t,this.normaliseGetLinkedRecordsService=c}read(o){return this.linkableRecordsApiInterfaceQueryService.fetch({input:o}).pipe(S(({data:t})=>t?.linkableRecords?h(this.normaliseGetLinkedRecordsService.flatten(t.linkableRecords.entityId,o.tabId,t.linkableRecords.records,!1,t.linkableRecords.viewerCanCreate)):D(()=>`No response data from get Linkable Records from Record ${o.recordId} returned from API`)))}link(o,t=null){return this.recordLinkMutationApiInterfaceMutationService.mutate({input:o},K(t)).pipe(S(({data:c})=>c?.recordLink?.record?h({recordId:c.recordLink.record.recordId}):D(()=>jt)))}};e.\u0275fac=function(t){return new(t||e)(p(vr),p(Mr),p($e))},e.\u0275prov=L({token:e,factory:e.\u0275fac,providedIn:"root"});let r=e;return r})();var et=(()=>{let e=class e{constructor(o,t){this.actions$=o,this.linkableRecordService=t,this.readRecordLinkableList$=f(()=>this.actions$.pipe(I(M.readLinkableRecordList),S(({linkableRecordInputList:c})=>X(c).pipe(Z(i=>this.linkableRecordService.read(i).pipe(R(s=>M.readLinkableRecordsDataSuccess({normalisedRecordLink:s})),_(s=>h(M.readLinkableRecordsDataFailure({error:`${s}`}))))))))),this.readLinkableRecord$=f(()=>this.actions$.pipe(I(M.readLinkableRecord),S(({linkableRecordInput:c})=>this.linkableRecordService.read(c).pipe(R(i=>M.readLinkableRecordsDataSuccess({normalisedRecordLink:i})),_(i=>h(M.readLinkableRecordsDataFailure({error:`${i}`}))))))),this.loadLinkableRecordsData$=f(()=>this.actions$.pipe(I(M.readLinkableRecordsDataSuccess),R(({normalisedRecordLink:c})=>M.readLinkableRecordsSuccess({recordLink:c.link})))),this.linkRecords$=f(()=>this.actions$.pipe(I(M.linkRecords),S(({tabId:c,linkRecords:i})=>this.linkableRecordService.link(i).pipe(R(()=>({recordsIds:i.linkedRecordIds})),R(({recordsIds:s})=>M.linkRecordsSuccess({tabId:c,recordsIds:s})),_(s=>h(M.linkFailure({error:`${s}`})))))))}};e.\u0275fac=function(t){return new(t||e)(p(w),p(Jr))},e.\u0275prov=L({token:e,factory:e.\u0275fac,providedIn:"root"});let r=e;return r})();var Ut={"Read Linked Record List":a(),"Read Linked Record":a(),"Read Linked Records Data Success":a(),"Read Linked Records Data Failure":a(),"Read Linked Records Success":a(),"Read Linked Records Failure":a(),"Unlink Records":a(),"Unlink Records Success":a(),"Unlink Records Failure":a(),"Cancel Unl
1ink Records":sr(),"Create Linked Record Success":a(),"Create Linked Record And Navigate Success":a(),"Create Linked Record Failure":a()},Gt=Ee({source:"Record Linked/API",events:Ut}),Vt={selectLinkedRecordTab:l("[Record View Table Page] Select Linked Record Tab",a()),createNewLinkedRecord:l("[Record View Table Page] Create New Linked Record",a()),reset:l("[Record/Record Linked] Reset")},g=k(k({},Gt),Vt);var rt=(()=>{let e=class e{constructor(o,t,c,i){this.recordUnlinkApiInterfaceMutationService=o,this.linkedRecordsApiInterfaceQueryService=t,this.linkedRecordCreateApiInterfaceMutationService=c,this.normaliseGetLinkedRecordsService=i}read(o){return this.linkedRecordsApiInterfaceQueryService.fetch({input:o}).pipe(S(({data:t})=>t?.linkedRecords?h(this.normaliseGetLinkedRecordsService.flatten(t.linkedRecords.entityId,o.tabId,t.linkedRecords.records,!0,t.linkedRecords.viewerCanCreate,t.linkedRecords.isEntityDirectlyLinked||!1)):D(()=>`No response data from get Linked Records from Record ${o.recordId} returned from API`)))}unlink(o,t=null){return this.recordUnlinkApiInterfaceMutationService.mutate({input:o},K(t)).pipe(S(({data:c})=>c?.recordUnlink?.record?h({recordId:c.recordUnlink.record.recordId}):D(()=>"No unlink record response data from unlink record returned from API")))}create(o,t=null){return this.linkedRecordCreateApiInterfaceMutationService.mutate({input:o},K(t)).pipe(S(({data:c})=>c?.linkedRecordCreate?.record?h({recordId:c.linkedRecordCreate.record.recordId,attributes:[],viewerCanDelete:c.linkedRecordCreate.record.viewerCanDelete}):D(()=>`No response data from Create Linked Records from Record ${o.recordId} and Link ${o.linkId} returned from API`)))}};e.\u0275fac=function(t){return new(t||e)(p(Ar),p(_r),p(Tr),p($e))},e.\u0275prov=L({token:e,factory:e.\u0275fac,providedIn:"root"});let r=e;return r})();var tt=(()=>{let e=class e{constructor(o,t,c){this.actions$=o,this.linkedRecordService=t,this.router=c,this.readRecordLinkedList$=f(()=>this.actions$.pipe(I(g.readLinkedRecordList),S(({linkedRecordInputList:i})=>X(i).pipe(Z(s=>this.linkedRecordService.read(s).pipe(R(b=>g.readLinkedRecordsDataSuccess({normalisedRecordLink:b})),_(b=>h(g.readLinkedRecordsDataFailure({error:`${b}`}))))))))),this.readLinkedRecord$=f(()=>this.actions$.pipe(I(g.readLinkedRecord),S(({linkedRecordInput:i})=>this.linkedRecordService.read(i).pipe(R(s=>g.readLinkedRecordsDataSuccess({normalisedRecordLink:s})),_(s=>h(g.readLinkedRecordsDataFailure({error:`${s}`}))))))),this.loadLinkedRecordsData$=f(()=>this.actions$.pipe(I(g.readLinkedRecordsDataSuccess),R(({normalisedRecordLink:i})=>g.readLinkedRecordsSuccess({recordLink:i.link})))),this.unlinkRecords$=f(()=>this.actions$.pipe(I(g.unlinkRecords),S(({unlinkRecords:i,tabId:s})=>this.linkedRecordService.unlink(i).pipe(R(()=>({recordsIds:i.linkedRecordIds})),R(({recordsIds:b})=>g.unlinkRecordsSuccess({recordsIds:b,tabId:s})),_(b=>h(g.unlinkRecordsFailure({error:`${b}`}))))))),this.createNewLinkedRecord$=f(()=>this.actions$.pipe(I(g.createNewLinkedRecord),S(({requestId:i,tabId:s,linkId:b,recordId:n,title:u,shouldNavigate:E})=>this.linkedRecordService.create({linkId:b,recordId:n},i).pipe(R(U=>{let F=k({recordId:U.recordId},u!==void 0&&{title:u});return E?g.createLinkedRecordAndNavigateSuccess(F):g.createLinkedRecordSuccess(F)}),_(U=>h(g.createLinkedRecordFailure({error:`${U}`}))))))),this.navigateToRecord$=f(()=>this.actions$.pipe(I(g.createLinkedRecordAndNavigateSuccess),P(({recordId:i})=>{this.router.navigate([B.RecordViewRoot,i])})),{dispatch:!1})}};e.\u0275fac=function(t){return new(t||e)(p(w),p(rt),p(ke))},e.\u0275prov=L({token:e,factory:e.\u0275fac,providedIn:"root"});let r=e;return r})();var m={previewDataEnter:l("[Preview Data Page] Enter",a()),previewDataLeave:l("[Preview Data Page] Leave"),recordListEnter:l("[Record List Page] Enter",a()),recordListLeave:l("[Record List Page] Leave"),readRecordResponse:l("[Record/API] Read Records Response",a()),readRecordResponseSuccess:l("[Record/API] Read Records success",a()),readRecordResponseFailure:l("[Record/API] Read Records Failed",a()),readRecordGridInputSuccess:l("[Record/API] Read Record Grid Input success",a()),readUserApplicationRecords:l("[User Application Feature Page] Read Records",a()),recordUpdate:l("[Preview Data Page] Update Record",a()),updateRecordSuccess:l("[Record/API] 
1Update Record Success",a()),updateRecordFailure:l("[Record/API] Update Records Failed",a()),createNewRecord:l("[Preview Data Page] Create New Record",a()),createRecord:l("[Record/API] Create Record",a()),createRecordSuccess:l("[Record/API] Create Record success",a()),createRecordFailure:l("[Record/API] Create Record Failed",a()),startDeleteRecords:l("[Preview Data Page] Start Delete Records",a()),completeDeleteRecords:l("[Preview Data Page] Complete Delete Records",a()),cancelDeleteRecords:l("[Preview Data Page] Cancel Delete Records"),deleteRecords:l("[Record/API] Delete Record",a()),deleteRecordsFailure:l("[Record/API] Delete Record Failed",a()),exportRecordsSuccess:l("[Record/API] Export Records Success",a()),exportRecordsFailure:l("[Record/API] Export Records Failed",a()),reset:l("[Record] Reset"),updateGridState:l("[Record/API] Update Grid State",a())};var H=r=>"singleAttribute"in r,ot=r=>"value"in r&&"display"in r&&typeof r.value=="string"&&typeof r.display=="string",Me=r=>"multiAttributes"in r;var ye="record",J=ce({selectId:r=>r.recordId}),it=J.getInitialState({columnAttributes:[],viewerCanCreate:!1,loaded:!1,totalItems:0}),Xt=ie(it,T(m.readRecordGridInputSuccess,(r,{recordGridInput:e})=>{let C=e.columnAttributes.map(s=>A(k({},s),{type:s.type===Ue.Owner?Ue.User:s.type})),{records:o,viewerCanCreate:t,totalItems:c}=e,i=A(k({},r),{columnAttributes:C,viewerCanCreate:t,totalItems:c});return J.setAll(o,A(k({},i),{loaded:!0}))}),T(m.readRecordResponseFailure,(r,{error:e})=>A(k({},r),{error:e})),T(m.updateRecordSuccess,(r,{recordComponentValue:e})=>J.updateOne({id:e.recordId,changes:{attributes:e.attributes}},r)),T(m.createRecordSuccess,(r,{record:e})=>J.addOne(A(k({},e),{attributes:r.columnAttributes.map(()=>({singleAttribute:{value:"",display:""}}))}),r)),T(m.completeDeleteRecords,(r,{recordIds:e})=>J.removeMany(e,A(k({},r),{totalItems:r.totalItems-e.length}))),T(m.reset,()=>it));function ct(r,e){return Xt(r,e)}var ne=oe(ye),{selectAll:Zt,selectEntities:Qt}=J.getSelectors(),Wt=v(ne,r=>Zt(r)),Yt=v(ne,r=>r.loaded),nt=v(ne,r=>r.columnAttributes),ii=v(ne,r=>Qt(r)),at=v(Wt,Yt,ne,(r,e,C)=>({columnAttributes:C.columnAttributes,records:r,viewerCanCreate:C.viewerCanCreate,totalItems:C.totalItems,loaded:e})),ci=v(ne,r=>{let e=r.columnAttributes.map(({name:C,type:o},t)=>({headerName:C||void 0,colId:`${t}`,editable:!1,type:Dr(o),valueGetter:c=>{let{colDef:i,data:s}=c;return i.colId?Me(s.attributes[i.colId])?s.attributes[i.colId].multiAttributes:s.attributes[i.colId].singleAttribute.display:""},valueSetter:c=>{let{colDef:i,data:s}=c;return i.colId&&(s.attributes[i.colId].singleAttribute.display=c.newValue),!0}}));return[{type:Ge.Select,colId:Rr},{type:Ge.Navigate,colId:ur},...e]});var ae=(()=>{let e=class e{constructor(o,t,c,i,s,b,n){this.recordCreateApiInterfaceMutationService=o,this.recordUpdateApiInterfaceMutationService=t,this.recordDeleteApiInterfaceMutationService=c,this.recordsApiInterfaceQueryService=i,this.logger=s,this.recordResultHelper=b,this.exportRecordsApiInterfaceQueryService=n}read(o){return this.recordsApiInterfaceQueryService.fetch({input:{entityId:o.entityId,pageNumber:o.pageNumber,pageSize:o.pageSize,filters:o.filters,quickFilter:o.quickFilter,sorts:o.sorts}}).pipe(S(({data:t})=>t?.records?h(this.recordResultHelper.formatRecordResult(t.records)):D(()=>
1`No response data from get Record ${o.entityId} returned from API`)),R(t=>(this.validateRecordGridInput(t.recordGridInput),t)))}create(o,t=null){return this.recordCreateApiInterfaceMutationService.mutate({entityId:o},K(t)).pipe(S(({data:c})=>c?.recordCreate?.record?h({recordId:c.recordCreate.record.recordId,viewerCanDelete:c.recordCreate.record.viewerCanDelete,attributes:[]}):D(()=>"No created record response data from create record from API")))}update(o,t,c,i=null){return this.recordUpdateApiInterfaceMutationService.mutate({recordId:o,attributeId:t,value:c},K(i)).pipe(S(({data:s})=>s?.recordUpdate?.record?.recordId?h({recordId:s.recordUpdate.record.recordId,attributeId:t,value:c}):D(()=>"No updated record response data from update record from API")))}delete(o){return this.recordDeleteApiInterfaceMutationService.mutate({recordIds:o}).pipe(S(({data:t})=>t?.recordDelete?.deletedIds?h({deletedIds:t.recordDelete.deletedIds}):D(()=>"No deleted records response data from delete record from API")))}export(o,t,c,i){return this.exportRecordsApiInterfaceQueryService.fetch({input:{entityId:o,attributeIds:t,exportName:c,recordIds:i}}).pipe(S(({data:s})=>s?.exportRecords?h(s.exportRecords.url):D(()=>`No response data from export records for ${o} returned from API`)))}validateRecordGridInput(o){if(!Zr(o))throw this.logger.logEvent("Record Feature","Normalise Record Data",Qr(o)),new Error("The result of the normalised Record does not match the expected format.");return o}};e.\u0275fac=function(t){return new(t||e)(p(Lr),p(Cr),p(gr),p($r),p(se),p(Or),p(yr))},e.\u0275prov=L({token:e,factory:e.\u0275fac,providedIn:"root"});let r=e;return r})();var dt=(()=>{let e=class e{constructor(o,t,c,i,s,b){this.actions$=o,this.logger=t,this.recordService=c,this.store=i,this.router=s,this.windowRef=b,this.initRecordsData$=f(()=>this.actions$.pipe(I(m.readUserApplicationRecords,m.previewDataEnter),Q(this.store.select(q(B.EntityId))),R(([{pagination:n},u])=>m.readRecordResponse({input:k({entityId:u,pageSize:20,pageNumber:0},n)})))),this.loadingRecordsDataReset$=f(()=>this.actions$.pipe(I(m.readUserApplicationRecords),R(()=>m.reset()))),this.loadRecordsForEntity$=f(()=>this.actions$.pipe(I(m.recordListEnter),Q(this.store.select(q(B.EntityIdForRecords))),R(([{pagination:n},u])=>m.readRecordResponse({input:k({entityId:u,pageSize:20,pageNumber:0},n)})))),this.resetRecordsData$=f(()=>this.actions$.pipe(I(m.previewDataLeave,m.recordListLeave),R(()=>m.reset()))),this.updateGridState$=f(()=>this.actions$.pipe(I(m.updateGridState),Q(this.store.select(q(B.EntityId)),this.store.select(q(B.EntityIdForRecords))),R(([n,u,E])=>m.readRecordResponse({input:{entityId:u||E,pageNumber:n.gridState.pageNumber??0,pageSize:n.gridState.pagination?.pageSize||20,filters:n.gridState.filters,quickFilter:n.gridState.quickFilter,sorts:n.gridState.sorting}})))),this.loadRecordResponse$=f(()=>this.actions$.pipe(I(m.readRecordResponse),S(({input:n})=>this.recordService.read(n).pipe(R(u=>m.readRecordResponseSuccess({recordResult:u})),_(u=>h(m.readRecordResponseFailure({error:`${u}`}))))))),this.setRecordResponse$=f(()=>this.actions$.pipe(I(m.readRecordResponseSuccess),R(({recordResult:n})=>m.readRecordGridInputSuccess({recordGridInput:n.recordGridInput})))),this.setEntityFromRecordResult$=f(()=>this.actions$.pipe(I(m.readRecordResponseSuccess),R(({recordResult:n})=>j.readAndSelectEntity({entity:n.entitySummary})))),this.updateRecord$=f(()=>this.actions$.pipe(I(m.recordUpdate,j.recordUpdate),Q(this.store.pipe(Le(nt))),R(([{recordComponentValue:n},u])=>{let{recordId:E,colId:U,attributes:F}=n,Re=Number(U),de=F[Re],Pe={recordId:E,colId:u[Re].attributeId};return H(de)&&(Pe.value=typeof de.singleAttribute.value=="string"?de.singleAttribute.value:null),Me(de)&&(Pe.values=de.multiAttributes.map(({value:He})=>typeof He=="string"?He:null)),{record:Pe,recordComponentValue:n}}),S(({record:n,recordComponentValue:u})=>n.value?this.recordService.update(n.recordId,n.colId,n.value).pipe(R(()=>m.updateRecordSuccess({recordComponentValue:u})),_(E=>h(m.updateRecordFailure({error:`${E}`})))):h(u).pipe(R(()=>m.updateRecordSuccess({recordComponentValue:u})))))),this.createNewRecordWithEntityId$=f(()=>this.actions$.pipe(I(m.createNewRecord),Q(this.store.select(q(B.EntityId))),R(([{requestId:n},u])=>
1m.createRecord({requestId:n,entityId:u})))),this.createNewRecordWithEntityIdForRecords$=f(()=>this.actions$.pipe(I(j.createNewRecordWithEntityIdForRecords),Q(this.store.select(q(B.EntityIdForRecords))),R(([{requestId:n},u])=>m.createRecord({requestId:n,entityId:u})))),this.createRecord$=f(()=>this.actions$.pipe(I(m.createRecord),S(({requestId:n,entityId:u})=>this.recordService.create(u,n).pipe(R(E=>m.createRecordSuccess({record:E})),_(E=>h(m.createRecordFailure({error:`${E}`}))))))),this.recordCreated$=f(()=>this.actions$.pipe(I(m.createRecordSuccess),P(({record:n})=>{this.router.navigate(["/",B.RecordViewRoot,n.recordId])})),{dispatch:!1}),this.showDeleteRecordsConfirmationModal$=f(()=>this.actions$.pipe(I(m.startDeleteRecords,j.startDeleteRecords),R(({recordIds:n})=>{let u=n.length,E=n.length===1?"Record":"Records",U=$localize`Confirm Delete ${E}`,F=$localize`Are you sure you want to delete ${u} ${E}?`,Re=m.deleteRecords({recordIds:n});return j.showConfirmationModal({title:U,content:F,confirmAction:Re})}))),this.leaveDeleteRecords$=f(()=>this.actions$.pipe(I(m.completeDeleteRecords),R(j.closeConfirmationModal))),this.deleteRecords$=f(()=>this.actions$.pipe(I(m.deleteRecords),S(({recordIds:n})=>this.recordService.delete(n).pipe(R(({deletedIds:u})=>m.completeDeleteRecords({recordIds:u})),_(u=>h(m.deleteRecordsFailure({error:`${u}`}))))))),this.exportRecords$=f(()=>this.actions$.pipe(I(j.exportRecords),S(({entityId:n,attributeIds:u,exportName:E,recordIds:U})=>this.recordService.export(n,u,E,U).pipe(R(F=>m.exportRecordsSuccess({url:F})),_(F=>h(m.exportRecordsFailure({error:`${F}`}))))))),this.downloadExportedRecords$=f(()=>this.actions$.pipe(I(m.exportRecordsSuccess),P(({url:n})=>{this.windowRef.open(n,"_blank")})),{dispatch:!1}),this.notifyFailure$=f(()=>this.actions$.pipe(I(m.readRecordResponseFailure,m.updateRecordFailure,m.createRecordFailure,m.deleteRecordsFailure),P(({error:n,type:u})=>this.logger.logEvent("Record",u,n))),{dispatch:!1})}};e.\u0275fac=function(t){return new(t||e)(p(w),p(se),p(ae),p(V),p(ke),p(lr))},e.\u0275prov=L({token:e,factory:e.\u0275fac,providedIn:"root"});let r=e;return r})();var y={updateTableRecord:l("[Record View Table Page] Update Table Record",a()),updateTableRecordSuccess:l("[Record/API] Update Table Record Success",a()),updateTableRecordsSuccess:l("[Record/API] Update Table Records Success",a()),updateTableRecordFailure:l("[Record/API] Update Table Records Failed",a()),addLinkedTableRecord:l("[Record View Table Page] Add Linked Table Record",a()),addLinkableTableRecord:l("[Record View Table Page] Add Linkable Table Record",a()),removeLinkedTableRecord:l("[Record View Table Page] Remove Linked Table Record",a()),removeLinkableTableRecord:l("[Record View Table Page] Remove Linkable Table Record",a()),reset:l("[Record/Table Record] Reset")};var N="linked",x="linkable";var De="tableRecord",ee=ce({selectId:r=>r.parentId}),pt=ee.getInitialState({loaded:!1}),Ht=ie(pt,T(y.updateTableRecordSuccess,(r,{record:e})=>ee.upsertOne(e,r)),T(y.updateTableRecordsSuccess,(r,{records:e})=>ee.upsertMany(e,r)),T(y.addLinkedTableRecord,y.addLinkableTableRecord,(r,{tableRecord:e})=>ee.addOne(e,r)),T(y.removeLinkedTableRecord,y.removeLinkableTableRecord,(r,{tableRecord:e})=>ee.removeOne(e.parentId,r)),T(y.reset,()=>pt));function lt(r,e){return Ht(r,e)}var Rt=oe(De),{selectAll:Jt,selectEntities:eo}=ee.getSelectors(),$i=v(Rt,r=>Jt(r)),me=v(Rt,r=>eo(r)),Ye=r=>v(me,e=>e[r]);var ft=(()=>{let e=class e{constructor(o,t,c){this.actions$=o,this.recordService=t,this.store=c,this.updateTableRecord$=f(()=>this.actions$.pipe(I(y.updateTableRecord),S(({record:i,attributeId:s,value:b,columnIndex:n})=>this.recordService.update(i.recordId,s,b).pipe(R(()=>{let{attributes:u}=i,E=u[n];return H(E)&&(E.singleAttribute.value=b),u[n]=E,A(k({},i),{attributes:u})}),R(()=>y.updateTableRecordSuccess({record:i})),_(u=>h(y.updateTableRecordFailure({error:`${u}`}))))))),this.loadLinkedRecords$=f(()=>this.actions$.pipe(I(g.readLinkedRecordsDataSuccess,M.readLinkableRecordsDataSuccess),R(({normalisedRecordLink:i})=>y.updateTableRecordsSuccess({records:i.tableRecords,tabId:i.link.tabId})))),this.swapLinkableToLinkRecords$=f(()=>this.actions$.pipe(I(M.linkRecordsSuccess),S(({tabId:i,recordsIds:s})=>X(s).pipe(Z(b=>this.store.select(Ye(`${i}.${x}.${b}`))),Fe(b=>!!b)).pipe(we(s.length))),R(i=>y.addLinkedTableRecord({tableRecord:A(k({},i),{parentId:i.parentId.replace(`.${x}.`,`.${N}.`)})})))),this.swapLinkedToLinkableRecords$=f(()=>this.actions$.pipe(I(g.unlinkRecordsSuccess),S(({tabId:i,recordsIds:s})=>X(s).pipe(Z(b=>this.store.select(Ye(`${i}.${N}.${b}`))),Fe(b=>!!b)).pipe(we(s.length))),R(i=>y.addLinkableTableRecord({tableRecord:A(k({},i),{parentId:i.parentId.replace(`.${N}.`,`.${x}.`)})})))),this.removeLinkableTableRecord$=f(()=>this.actions$.pipe(I(y.addLinkedTableRecord),R(({tableRecord:i})=>y.removeLinkableTableRecord({tableRecord:A(k({},i),{parentId:i.parentId.replace(`.${N}.`,`.${x}.`)})})))),this.removeLinkedTableRecord$=f(()=>this.actions$.pipe(I(y.addLinkableTableRecord),R(({tableRecord:i})=>y.removeLinkedTableRecord({tableRecord:A(k({},i),{parentId:i.parentId.replace(`.${x}.`,`.${N}.`)})}))))}};e.\u0275fac=function(t){return new(t||e)(p(w),p(ae),p(V))},e.\u0275prov=L({token:e,factory:e.\u0275fac,providedIn:"root"});let r=e;return r})();var Oe="recordLink",z=ce({selectId:r=>
1r.isLinked?`${r.tabId}.${N}`:`${r.tabId}.${x}`}),It=z.getInitialState({loaded:!1}),ro=ie(It,T(M.readLinkableRecordsSuccess,g.readLinkedRecordsSuccess,(r,{recordLink:e})=>z.upsertOne(e,r)),T(g.selectLinkedRecordTab,(r,{tabId:e})=>A(k({},r),{selectedId:`${e}.${N}`})),T(M.selectLinkableRecordTab,(r,{tabId:e})=>A(k({},r),{selectedId:`${e}.${x}`})),T(M.linkRecordsSuccess,(r,{tabId:e,recordsIds:C})=>{let o=r.entities[`${e}.${x}`]?.recordIds.filter(i=>!C.includes(i))||[],t=r.entities[`${e}.${N}`]?.recordIds.concat(C)||[],c=z.updateOne({id:`${e}.${x}`,changes:{recordIds:o}},r);return z.updateOne({id:`${e}.${N}`,changes:{recordIds:t}},c)}),T(g.reset,()=>It),T(g.unlinkRecordsSuccess,(r,{tabId:e,recordsIds:C})=>{let o=r.entities[`${e}.${N}`]?.recordIds.filter(i=>!C.includes(i))||[],t=r.entities[`${e}.${x}`]??{tabId:e,isLinked:!1,recordIds:[],viewerCanCreate:!1,entityId:""};t.recordIds=t.recordIds.concat(C);let c=z.upsertOne(t,r);return z.updateOne({id:`${e}.${N}`,changes:{recordIds:o}},c)}));function St(r,e){return ro(r,e)}var qi=(()=>{let e=class e{};e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=Se({type:e}),e.\u0275inj=ue({providers:[ge.provide([et,tt,dt,ft])],imports:[Ce.forFeature(Oe,St),Ce.forFeature(ye,ct),Ce.forFeature(De,lt),be]});let r=e;return r})();var oc=(()=>{let e=class e extends ve{constructor(o,t){super(o),this.store=o,this.recordService=t,this.recordResult$=this.store.pipe(Le(at)),this.recordQueryResult$=(c,i)=>this.recordService.read({entityId:i,quickFilter:c,pageNumber:0,pageSize:20}).pipe(R(s=>s.recordGridInput.records.map(b=>{let n=b.attributes.find(E=>H(E)),u=null;return n&&H(n)&&ot(n.singleAttribute)&&(u=n.singleAttribute.value||mr),{recordId:b.recordId,recordName:u}})))}};e.\u0275fac=function(t){return new(t||e)(p(V),p(ae))},e.\u0275prov=L({token:e,factory:e.\u0275fac,providedIn:"root"});let r=e;return r})();var to=r=>typeof r?.recordId=="string",cc=r=>Array.isArray(r)&&r.every(to);var Et={};$t(Et,{getLinkableRecordsForSelectedTableTab:()=>po,getRecordDataRowForTableTabWithId:()=>ao,getRecordLinkIsEntityDirectlyLinkedByTabId:()=>mo,getRecordLinkViewerCanCreateByTabId:()=>lo,getRecordLinksEntities:()=>re,getRecordLinksForTableTabWithId:()=>no,getRecordLinksList:()=>co,getRecordLinksState:()=>Ne,getSelectedId:()=>qe,getSelectedIdWithoutLabel:()=>kt,getSelectedRecordLink:()=>bt,getSelectedRecordLinkViewerCanCreate:()=>so});var Ne=oe(Oe),{selectAll:oo,selectEntities:io}=z.getSelectors(),co=v(Ne,r=>oo(r)),qe=v(Ne,r=>r.selectedId),re=v(Ne,r=>io(r)),bt=v(re,qe,(r,e)=>e?r[e]:void 0),so=v(bt,r=>r?r.viewerCanCreate:!1),no=(r,e)=>v(me,re,(C,o)=>{let t=e?`${r}.linked`:`${r}.linkable`,c=o[t]?o[t]:void 0;if(c){let{recordIds:i,viewerCanCreate:s,entityId:b}=c;return{entityId:b,tabId:r,isLinked:e,viewerCanCreate:s,tableRecords:i.map(n=>C[`${t}.${n}`]).filter(n=>!!n)}}}),ao=(r,e,C)=>v(me,re,(o,t)=>{let c=e?`${r}.linked`:`${r}.linkable`,i=t[c]?t[c]:void 0;if(i){let{recordIds:s}=i;return o[`${c}.${s[C]}`]}}),kt=v(qe,r=>{if(r){let[e]=r.split(".");return e}return r}),po=v(kt,me,re,(r,e,C)=>{if(!r)return;let o=`${r}.linkable`,t=C[o]?C[o]:void 0;if(t){let{recordIds:c,viewerCanCreate:i}=t;return{tabId:r,isLinked:!1,viewerCanCreate:i,tableRecords:c.map(s=>e[`${o}.${s}`]).filter(s=>!!s)}}}),lo=r=>v(re,e=>{let C=`${r}.linked`,o=e[C]?e[C]:void 0;return o?o.viewerCanCreate:!1}),mo=r=>v(re,e=>{let C=`${r}.linked`;return!!e[C]?.isEntityDirectlyLinked});var $={openRecordImportModal:l("[Record Import] Open Record Import Modal",a()),cancelRecordImportModal:l("[Record Import] Cancel Record Import Modal"),startImportRecords:l("[Record Import]Start Import Records",a()),importRecords:l("[Record Import] Import Records",a()),importLinkedRecords:l("[Record Import] Import Linked Records",a()),importRecordsSuccess:l("[Record Import] Import Records Success"),importRecordsFailure:l("[Record Import] Import Records Failure")};var xe=(()=>{let e=class e extends ve{constructor(o){super(o),this.store=o}};e.\u0275fac=function(t){return new(t||e)(p(V))},e.\u0275prov=L({token:e,factory:e.\u0275fac,providedIn:"root"});let r=e;return r})();var Ct=(()=>{let e=class e{constructor(o){this.recordImportFacade=o}
1close(){this.recordImportFacade.dispatch($.cancelRecordImportModal())}};e.\u0275fac=function(t){return new(t||e)(fe(xe))},e.\u0275cmp=Ie({type:e,selectors:[["record-import-success"]],standalone:!1,decls:9,vars:4,consts:()=>{let o;o=$localize`OK`;let t;t=$localize`Your files have been uploaded successfully!`;let c;return c=$localize` Please note that it may take some time for the imported records to appear on the platform.${"\uFFFD#7\uFFFD\uFFFD/#7\uFFFD"}:LINE_BREAK: You can continue browsing the platform in the meantime. `,[t,c,[1,"nimbus-flex","nimbus-align-items-center"],["key","checkmark-outline","colour","success",1,"nimbus-mr-2",3,"width","height"],[1,"nimbus-colour-text-strong","nimbus-font-normal","nimbus-ml-2"],[1,"nimbus-mb-1"],["primaryButtonTitle",o,3,"primaryClicked","secondaryButtonShow","primaryButtonSize"]]},template:function(t,c){t&1&&(G(0,"div",2),pe(1,"nimbus-icon",3),G(2,"div",4)(3,"p",5),he(4,0),Y(),G(5,"p"),er(6,1),pe(7,"br"),rr(),Y()()(),G(8,"sc-modal-buttons",6),le("primaryClicked",function(){return c.close()}),Y()),t&2&&(te(),W("width",60)("height",60),te(7),W("secondaryButtonShow",!1)("primaryButtonSize","medium"))},dependencies:[Ae,xr],encapsulation:2,changeDetection:0});let r=e;return r})();var Ro=["filePicker"],gt=(()=>{let e=class e{constructor(o){this.recordImportFacade=o,this.inputFileControl=new ar,this.ALLOWED_EXTENSIONS=[jr,Br],this.loading=!1}cancel(){this.recordImportFacade.dispatch($.cancelRecordImportModal())}import(){let o=this.inputFileControl.value[0];hr(o)&&(this.loading=!0,this.recordImportFacade.dispatch($.startImportRecords({file:o})))}};e.\u0275fac=function(t){return new(t||e)(fe(xe))},e.\u0275cmp=Ie({type:e,selectors:[["record-import"]],viewQuery:function(t,c){if(t&1&&tr(Ro,5),t&2){let i;or(i=ir())&&(c.filePicker=i.first)}},standalone:!1,decls:7,vars:7,consts:()=>{let o;o=$localize`Import`;let t;t=$localize`Select the excel document to use for data import`;let c;return c=$localize`Cancel`,[["filePicker",""],c,["label",o,"description",t,3,"formControl","multiple","allowedExtensions"],[1,"nimbus-pt-4"],[3,"align"],["size","medium","theme","primary",3,"clicked","label","disabled","step"],["nimbus-button","","size","medium","themeColour","brand","fillMode","outline",3,"click"]]},template:function(t,c){if(t&1){let i=Je();pe(0,"sc-file-picker",2,0),G(2,"div",3)(3,"nimbus-button-group",4)(4,"nimbus-spinner-button",5),le("clicked",function(){return je(i),Be(c.import())}),Y(),G(5,"button",6),le("click",function(){return je(i),Be(c.cancel())}),he(6,1),Y()()()}if(t&2){let i=cr(1);W("formControl",c.inputFileControl)("multiple",!1)("allowedExtensions",c.ALLOWED_EXTENSIONS),te(3),W("align","start"),te(),W("label","Import")("disabled",!c.inputFileControl.dirty||i.invalidFile)("step",c.loading?"loading":"await")}},dependencies:[Te,nr,dr,Nr,wr,Fr],encapsulation:2,changeDetection:0});let r=e;return r})();var vt=(()=>{let e=class e{constructor(o){this.modal=o,this.recordImportModalViewReference=null,this.modalDetails=null}openImportModal(o){this.modalDetails=o,this.recordImportModalViewReference=this.modal.open({content:gt,minHeight:380,minWidth:450,title:"Import Data"})}openSuccessModal(){this.recordImportModalViewReference=this.modal.open({content:Ct,minHeight:250,minWidth:450,title:"Success"})}};e.\u0275fac=function(t){return new(t||e)(p(Ur))},e.\u0275prov=L({token:e,factory:e.\u0275fac,providedIn:"root"});let r=e;return r})();var At=(()=>{let e=class e{constructor(o,t){this.importRecordsApiInterfaceMutationService=o,this.importLinkedRecordsApiInterfaceMutationService=t}importRecords(o){return this.importRecordsApiInterfaceMutationService.mutate({input:o}).pipe(S(({data:t})=>t?.importRecords?h(t.importRecords.success):D(()=>"No import records response data from API")))}importLinkedRecords(o){return this.importLinkedRecordsApiInterfaceMutationService.mutate({input:o}).pipe(S(({data:t})=>t?.importLinkedRecords?h(t.importLinkedRecords.success):D(()=>"No import linked records response data from API")))}};e.\u0275fac=function(t){return new(t||e)(p(kr),p(Er))},e.\u0275prov=L({token:e,factory:e.\u0275fac,providedIn:"root"});let r=e;return r})();var Tt=(()=>{let e=class e{constructor(o,t,c,i){this.actions$=o,this.recordImportModalService=t,this.recordImportService=c,this.toast=i,this.openRecordImportModal$=f(()=>this.actions$.pipe(I($.openRecordImportModal,j.importRecords),P(({modalDetails:s})=>this.recordImportModalService.openImportModal(s))),{dispatch:!1}),this.cancelRecordImportModal$=f(()=>this.actions$.pipe(I($.cancelRecordImportModal),P(()=>{this.recordImportModalService.recordImportModalViewReference&&this.recordImportModalService.recordImportModalViewReference.close()})),{dispatch:!1}),this.startImportRecords$=f(()=>this.actions$.pipe(I($.startImportRecords),R(({file:s})=>this.recordImportModalService.modalDetails?.entityId?$.importRecords({file:s}):$.importLinkedRecords({file:s})))),this.importRecord$=f(()=>this.actions$.pipe(I($.importRecords),S(({file:s})=>this.recordImportService.importRecords(A(k({}
1,this.recordImportModalService.modalDetails),{entityId:this.recordImportModalService.modalDetails?.entityId||"",file:s})).pipe(R(b=>b?$.importRecordsSuccess():$.importRecordsFailure()),_(()=>h($.importRecordsFailure())))))),this.importLinkedRecord$=f(()=>this.actions$.pipe(I($.importLinkedRecords),S(({file:s})=>this.recordImportService.importLinkedRecords({linkedEntityId:this.recordImportModalService.modalDetails?.linkedEntityId||"",linkedRecordId:this.recordImportModalService.modalDetails?.linkedRecordId||"",file:s}).pipe(R(b=>b?$.importRecordsSuccess():$.importRecordsFailure()))))),this.importRecordsSuccess$=f(()=>this.actions$.pipe(I($.importRecordsSuccess),P(()=>{this.recordImportModalService.recordImportModalViewReference&&(this.recordImportModalService.recordImportModalViewReference.close(),this.recordImportModalService.openSuccessModal())})),{dispatch:!1}),this.importRecordsFailure$=f(()=>this.actions$.pipe(I($.importRecordsFailure),P(()=>{this.recordImportModalService.recordImportModalViewReference&&this.recordImportModalService.recordImportModalViewReference.close()})),{dispatch:!1})}};e.\u0275fac=function(t){return new(t||e)(p(w),p(vt),p(At),p(Sr))},e.\u0275prov=L({token:e,factory:e.\u0275fac,providedIn:"root"});let r=e;return r})();var ps=(()=>{let e=class e{};e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=Se({type:e}),e.\u0275inj=ue({providers:[ge.provide([Tt])],imports:[be,Ae,Te,pr,Pr]});let r=e;return r})();export{M as a,g as b,m as c,y as d,oc as e,cc as f,Et as g,qi as h,$ as i,ps as j};

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.