UNPKG

@rero/rero-ils-ui

Version:

User interface for RERO integrated library system (RERO ILS).

3 lines (2 loc) 16.1 kB
import{a as se}from"./chunk-32FZIPT5.js";import{a as _e}from"./chunk-CGU6MK6Q.js";import{R as de,S as me,T as pe,o as h,p as V,q as ce}from"./chunk-4GRLSOJZ.js";import{c as $}from"./chunk-WOV5KKTV.js";import{Ma as ae,gc as re,hc as le,wa as oe}from"./chunk-MTJX6JRK.js";import{a as ie,b as D,c as S}from"./chunk-GQ5FIRIY.js";import{k as ne}from"./chunk-4A4J5SA3.js";import{ga as ee,ka as te}from"./chunk-WKOKZ3JO.js";import{$b as g,Cc as A,Db as q,Eb as M,Fa as j,Gc as X,Hc as d,Ic as s,Jc as w,Kc as z,Sc as R,Tc as Y,Vb as m,Xb as p,Xc as G,Yb as f,Yc as U,_b as v,ac as _,bb as H,bc as n,cb as O,cc as o,dc as T,dd as u,ed as C,fd as Z,gb as i,hc as Q,ia as P,ic as J,jc as B,jd as k,kc as W,oa as b,pa as F,rc as L,sc as l,vd as E,yb as y}from"./chunk-3WD6XLXL.js";function Ee(e,a){if(e&1&&(n(0,"dt",1),d(1,"Authorized access point"),o(),n(2,"dd"),d(3),o()),e&2){let t=l();i(3),s(t.record().authorized_access_point)}}function he(e,a){if(e&1&&(n(0,"dt",1),d(1,"Birth date"),o(),n(2,"dd"),d(3),o()),e&2){let t=l();i(3),s(t.record().date_of_birth)}}function ye(e,a){if(e&1&&(n(0,"dt",1),d(1,"Death date"),o(),n(2,"dd"),d(3),o()),e&2){let t=l();i(3),s(t.record().date_of_death)}}function Se(e,a){if(e&1&&(n(0,"li"),d(1),u(2,"translate"),o()),e&2){let t=a.$implicit;i(),s(C(2,1,"lang_"+t))}}function De(e,a){if(e&1&&(n(0,"dt",1),d(1,"Language"),o(),n(2,"dd")(3,"ul",2),v(4,Se,3,3,"li",null,f),o()()),e&2){let t=l();i(4),g(t.record().language)}}function we(e,a){if(e&1&&(n(0,"dt",1),d(1,"Gender"),o(),n(2,"dd"),d(3),o()),e&2){let t=l();i(3),s(t.record().Gender)}}function Re(e,a){if(e&1&&(n(0,"dt",1),d(1,"Biographical information"),o(),T(2,"dd",3),u(3,"urlActive"),u(4,"nl2br")),e&2){let t=l();i(2),_("innerHtml",C(4,3,C(3,1,t.record().biographical_information.join(` `))),H)}}function Ve(e,a){if(e&1&&(n(0,"dt",1),d(1,"Name"),o(),n(2,"dd"),d(3),o()),e&2){let t=l();i(3),s(t.record().name)}}function Ie(e,a){if(e&1&&(n(0,"li"),d(1),o()),e&2){let t=a.$implicit;i(),s(t)}}function Be(e,a){if(e&1&&(n(0,"dt",1),d(1,"Variant name"),o(),n(2,"dd")(3,"ul",2),v(4,Ie,2,1,"li",null,f),o()()),e&2){let t=l();i(4),g(t.record().variant_access_point)}}var ue=(()=>{class e{constructor(){this.record=E(),this.source=E(),this.disabledSourceLink=["rero"]}disabledLink(t){return!this.disabledSourceLink.includes(t)}static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275cmp=y({type:e,selectors:[["admin-remote-entities-person-detail-view"]],inputs:{record:[1,"record"],source:[1,"source"]},decls:9,vars:8,consts:[[1,"metadata"],["translate",""],[1,"ui:list-none"],[3,"innerHtml"]],template:function(r,c){r&1&&(n(0,"dl",0),m(1,Ee,4,1),m(2,he,4,1),m(3,ye,4,1),m(4,De,6,0),m(5,we,4,1),m(6,Re,5,5),m(7,Ve,4,1),m(8,Be,6,0),o()),r&2&&(i(),p(c.record().authorized_access_point?1:-1),i(),p(c.record().date_of_birth?2:-1),i(),p(c.record().date_of_death?3:-1),i(),p(c.record().language?4:-1),i(),p(c.record().Gender?5:-1),i(),p(c.record().biographical_information?6:-1),i(),p(c.record().name?7:-1),i(),p(c.record().variant_access_point?8:-1))},dependencies:[D,S,oe,pe],encapsulation:2,changeDetection:0})}}return e})();function Pe(e,a){if(e&1&&(n(0,"dt",1),d(1,"Authorized access point"),o(),n(2,"dd"),d(3),o()),e&2){let t=l();i(3),s(t.record().authorized_access_point)}}function be(e,a){if(e&1&&(n(0,"dt",1),d(1,"Date of establishment"),o(),n(2,"dd"),d(3),o()),e&2){let t=l();i(3),s(t.record().date_of_establishment)}}function Fe(e,a){if(e&1&&(n(0,"dt",1),d(1,"Date of termination"),o(),n(2,"dd"),d(3),o()),e&2){let t=l();i(3),s(t.record().date_of_termination)}}function Oe(e,a){if(e&1&&(n(0,"li"),d(1),u(2,"translate"),o()),e&2){let t=a.$implicit;i(),s(C(2,1,"lang_"+t))}}function Me(e,a){if(e&1&&(n(0,"dt",1),d(1,"Language"),o(),n(2,"dd")(3,"ul",2),v(4,Oe,3,3,"li",null,f),o()()),e&2){let t=l();i(4),g(t.record().language)}}function ke(e,a){if(e&1&&(n(0,"dt",1),d(1,"Country associated"),o(),n(2,"dd"),d(3),u(4,"translate"),o()),e&2){let t=l();i(3),s(C(4,1,"country_"+t.record().country_associated))}}function $e(e,a){if(e&1&&(n(0,"li"),d(1),o()),e&2){let t=a.$implicit;i(),s(t)}}function Ne(e,a){if(e&1&&(n(0,"dt",1),d(1,"Variant name"),o(),n(2,"dd")(3,"ul",2),v(4,$e,2,1,"li",null,f),o()()),e&2){let t=l();i(4),g(t.record().variant_access_point)}}var Ce=(()=>{class e{constructor(){this.record=E(),this.source=E(),this.disabledSourceLink=["rero"]}disabledLink(t){return!this.disabledSourceLink.includes(t)}static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275cmp=y({type:e,selectors:[["admin-remote-entities-organisation-detail-view"]],inputs:{record:[1,"record"],source:[1,"source"]},decls:7,vars:6,consts:[[1,"metadata"],["translate",""],[1,"ui:list-none"]],template:function(r,c){r&1&&(n(0,"dl",0),m(1,Pe,4,1),m(2,be,4,1),m(3,Fe,4,1),m(4,Me,6,0),m(5,ke,5,3),m(6,Ne,6,0),o()),r&2&&(i(),p(c.record().authorized_access_point?1:-1),i(),p(c.record().date_of_establishment?2:-1),i(),p(c.record().date_of_termination?3:-1),i(),p(c.record().language?4:-1),i(),p(c.record().country_associated?5:-1),i(),p(c.record().variant_access_point?6:-1))},dependencies:[D,S],encapsulation:2,changeDetection:0})}}return e})();var xe=(e,a)=>({match:e,title:a}),fe=e=>({item:e});function Le(e,a){if(e&1&&(n(0,"dt",3),d(1,"Authorized access point"),o(),n(2,"dd"),d(3),o()),e&2){let t=l();i(3),s(t.record().authorized_access_point)}}function Ae(e,a){if(e&1&&(n(0,"dt",3),d(1,"Type"),o(),n(2,"dd"),d(3),o()),e&2){let t=l();i(3),s(t.record().bnf_type)}}function ze(e,a){if(e&1&&(n(0,"li"),d(1),o()),e&2){let t=a.$implicit;i(),s(t)}}function Ge(e,a){if(e&1&&(n(0,"dt",3),d(1,"Variant access point"),o(),n(2,"dd")(3,"ul",4),v(4,ze,2,1,"li",null,f),o()()),e&2){let t=l();i(4),g(t.record().variant_access_point)}}function Ue(e,a){if(e&1&&(n(0,"li"),d(1),o()),e&2){let t=a.$implicit;i(),s(t.authorized_access_point)}}function Ke(e,a){if(e&1&&(n(0,"dt",3),d(1,"Broader"),o(),n(2,"dd")(3,"ul",4),v(4,Ue,2,1,"li",null,f),o()()),e&2){let t=l();i(4),g(t.record().broader)}}function je(e,a){if(e&1&&(n(0,"li"),d(1),o()),e&2){let t=a.$implicit;i(),s(t.authorized_access_point)}}function He(e,a){if(e&1&&(n(0,"dt",3),d(1,"Narrower"),o(),n(2,"dd")(3,"ul",4),v(4,je,2,1,"li",null,f),o()()),e&2){let t=l();i(4),g(t.record().narrower)}}function qe(e,a){if(e&1&&(n(0,"li"),d(1),o()),e&2){let t=a.$implicit;i(),s(t.authorized_access_point)}}function Qe(e,a){if(e&1&&(n(0,"dt",3),d(1,"Related"),o(),n(2,"dd")(3,"ul",4),v(4,qe,2,1,"li",null,f),o()()),e&2){let t=l();i(4),g(t.record().related)}}function Je(e,a){if(e&1&&(n(0,"span"),d(1),o()),e&2){let t=l().$implicit;i(),s(t.classificationPortion)}}function We(e,a){if(e&1&&(n(0,"span"),d(1),o()),e&2){let t=l().$implicit;i(),s(t.name)}}function Xe(e,a){if(e&1&&(T(0,"p-tag",6),u(1,"translate")),e&2){let t=l().$implicit;_("value",C(1,1,t.type))}}function Ye(e,a){if(e&1&&(n(0,"li",5),m(1,Je,2,1,"span"),m(2,We,2,1,"span"),m(3,Xe,2,3,"p-tag",6),o()),e&2){let t=a.$implicit;i(),p(t.classificationPortion?1:-1),i(),p(t.name?2:-1),i(),p(t.type?3:-1)}}function Ze(e,a){if(e&1&&(n(0,"dt",3),d(1,"Classification"),o(),n(2,"dd")(3,"ul",4),v(4,Ye,4,3,"li",5,f),o()()),e&2){let t=l();i(4),g(t.record().classification)}}function et(e,a){if(e&1&&(B(0,2),u(1,"translate")),e&2){let t=l(),r=A(11);_("ngTemplateOutlet",r)("ngTemplateOutletContext",G(7,fe,U(4,xe,t.exactMatch,C(1,2,"Exact match"))))}}function tt(e,a){if(e&1&&(B(0,2),u(1,"translate")),e&2){let t=l(),r=A(11);_("ngTemplateOutlet",r)("ngTemplateOutletContext",G(7,fe,U(4,xe,t.closeMatch,C(1,2,"Close match"))))}}function it(e,a){if(e&1&&(n(0,"a",7),d(1),o()),e&2){let t=l().$implicit;_("href",R(t.uri),O)("title",R(t.uri)),i(),w(" ",t.authorized_access_point," ")}}function nt(e,a){if(e&1&&d(0),e&2){let t=l().$implicit;w(" ",t.authorized_access_point," ")}}function ot(e,a){if(e&1&&(n(0,"li"),d(1),m(2,it,2,5,"a",7)(3,nt,1,1),o()),e&2){let t=a.$implicit;i(),w(" ",t.source,": "),i(),p(t.uri?2:3)}}function at(e,a){if(e&1&&v(0,ot,4,2,"li",null,f),e&2){let t=l().item;g(t.match)}}function rt(e,a){if(e&1&&(n(0,"dt",3),d(1),o(),n(2,"dd")(3,"ul",4),m(4,at,2,0),o()()),e&2){let t=a.item;i(),s(t.title),i(3),p(t.match?4:-1)}}var ve=(()=>{class e{constructor(){this.record=E(),this.source=E(),this.exactMatch=[],this.closeMatch=[]}ngOnInit(){this.exactMatch=this.identifiedByUriFilter(this.record().exactMatch),this.closeMatch=this.identifiedByUriFilter(this.record().closeMatch)}identifiedByUriFilter(t){return t?.map(r=>{let c={authorized_access_point:r.authorized_access_point,source:r.source},x=r.identifiedBy?.filter(I=>I.type==="uri")||[];return x.length>0&&(c.uri=x.shift().value),c})}static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275cmp=y({type:e,selectors:[["admin-remote-topic-detail-view"]],inputs:{record:[1,"record"],source:[1,"source"]},decls:12,vars:9,consts:[["match",""],[1,"metadata"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],["translate",""],[1,"ui:list-none"],[1,"ui:mb-1","ui:flex","ui:gap-1","ui:items-center"],["severity","secondary",3,"value"],["target","_blank",1,"rero-ils-external-link",3,"href","title"]],template:function(r,c){r&1&&(n(0,"dl",1),m(1,Le,4,1),m(2,Ae,4,1),m(3,Ge,6,0),m(4,Ke,6,0),m(5,He,6,0),m(6,Qe,6,0),m(7,Ze,6,0),m(8,et,2,9,"ng-container",2),m(9,tt,2,9,"ng-container",2),o(),M(10,rt,5,2,"ng-template",null,0,k)),r&2&&(i(),p(c.record().authorized_access_point?1:-1),i(),p(c.record().bnf_type?2:-1),i(),p(c.record().variant_access_point?3:-1),i(),p(c.record().broader?4:-1),i(),p(c.record().narrower?5:-1),i(),p(c.record().related?6:-1),i(),p(c.record().classification?7:-1),i(),p(c.record().exactMatch?8:-1),i(),p(c.record().closeMatch?9:-1))},dependencies:[D,$,ee,S],encapsulation:2,changeDetection:0})}}return e})();function lt(e,a){if(e&1&&(n(0,"span",9),d(1),u(2,"translate"),u(3,"uppercase"),o()),e&2){let t=l().$implicit;i(),s(C(3,3,C(2,1,t)))}}function ct(e,a){if(e&1&&T(0,"admin-remote-entities-person-detail-view",6),e&2){let t=l().$implicit,r=l();_("record",r.metadata[t])("source",t)}}function dt(e,a){if(e&1&&T(0,"admin-remote-entities-organisation-detail-view",6),e&2){let t=l().$implicit,r=l();_("record",r.metadata[t])("source",t)}}function mt(e,a){if(e&1&&T(0,"admin-remote-topic-detail-view",6),e&2){let t=l().$implicit,r=l();_("record",r.metadata[t])("source",t)}}function pt(e,a){if(e&1&&T(0,"admin-remote-topic-detail-view",6),e&2){let t=l().$implicit,r=l();_("record",r.metadata[t])("source",t)}}function st(e,a){if(e&1&&T(0,"admin-remote-topic-detail-view",6),e&2){let t=l().$implicit,r=l();_("record",r.metadata[t])("source",t)}}function _t(e,a){if(e&1&&(d(0),u(1,"translate")),e&2){let t=l(2);z(" ",C(1,2,"Missing template for this entity type:")," ",t.metadata.type," ")}}function ut(e,a){if(e&1&&(n(0,"li")(1,"a",11),d(2),o()()),e&2){let t=a.$implicit;i(),_("href",R(t.value),O)("title",R(t.value)),i(),s(t.source)}}function Ct(e,a){if(e&1&&(n(0,"dl",7)(1,"dt",8),d(2,"Identified by"),o(),n(3,"dd")(4,"ul",10),v(5,ut,3,5,"li",null,f),o()()()),e&2){let t=l(2).$implicit,r=l(),c=l();i(5),g(c.identifiedByFilter(r.metadata[t].identifiedBy))}}function xt(e,a){if(e&1&&m(0,Ct,7,0,"dl",7),e&2){let t=l().$implicit,r=l(),c=l();p(c.identifiedByFilter(r.metadata[t].identifiedBy).length>0?0:-1)}}function ft(e,a){if(e&1&&(n(0,"p-panel",4),M(1,lt,4,5,"ng-template",null,0,k),n(3,"div",5),m(4,ct,1,2,"admin-remote-entities-person-detail-view",6)(5,dt,1,2,"admin-remote-entities-organisation-detail-view",6)(6,mt,1,2,"admin-remote-topic-detail-view",6)(7,pt,1,2,"admin-remote-topic-detail-view",6)(8,st,1,2,"admin-remote-topic-detail-view",6)(9,_t,2,4),m(10,xt,1,1),n(11,"dl",7)(12,"dt",8),d(13,"Id"),o(),n(14,"dd"),d(15),o()()()()),e&2){let t,r=a.$implicit,c=l(),x=l();i(4),p((t=c.metadata.type)===x.entityType.PERSON?4:t===x.entityType.ORGANISATION?5:t===x.entityType.TOPIC?6:t===x.entityType.PLACE?7:t===x.entityType.TEMPORAL?8:9),i(6),p(c.metadata[r].identifiedBy!=null&&c.metadata[r].identifiedBy.length?10:-1),i(5),s(c.metadata[r].pid)}}function vt(e,a){if(e&1&&(n(0,"h1"),T(1,"i",1),d(2),u(3,"extractSourceField"),o(),n(4,"small"),d(5),u(6,"translate"),o(),T(7,"p-tag",2),u(8,"translate"),n(9,"div",3),v(10,ft,16,3,"p-panel",4,f),o()),e&2){let t=a,r=l().icon(t.metadata.type);i(),X(Y("fa ",r.class)),_("title",r.title),i(),w(" ",Z(3,8,t.metadata,"authorized_access_point")," "),i(3),z(" ",C(6,11,"MEF ID"),": ",t.metadata.pid," "),i(2),_("value",C(8,13,"Remote")),i(3),g(t.metadata.sources.sort())}}var ge=(()=>{class e{constructor(){this.translateService=P(ie),this.record=E(),this.type=E(""),this.entityType=h}icon(t){switch(t){case h.PERSON:return{class:V.PERSON,title:this.translateService.instant(h.PERSON)};case h.ORGANISATION:return{class:V.ORGANISATION,title:this.translateService.instant(h.ORGANISATION)};case h.TOPIC:return{class:V.TOPIC,title:this.translateService.instant(h.TOPIC)};case h.PLACE:return{class:V.PLACE,title:this.translateService.instant(h.PLACE)};case h.TEMPORAL:return{class:V.TEMPORAL,title:this.translateService.instant(h.TEMPORAL)};default:return{class:"fa-question",title:this.translateService.instant("Missing type")}}}identifiedByFilter(t){return t.filter(r=>r.source!=="RERO"&&r.type==="uri")}static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275cmp=y({type:e,selectors:[["admin-remote-entities-remote-detail-view"]],inputs:{record:[1,"record"],type:[1,"type"]},decls:1,vars:1,consts:[["header",""],["aria-hidden","true",3,"title"],["severity","warn",3,"value"],[1,"ui:mt-2","ui:flex","ui:flex-col","ui:gap-2"],[1,"ui:pb-3"],[1,"ui:mt-3","ui:mx-4"],[3,"record","source"],[1,"metadata"],["translate",""],[1,"ui:font-medium","ui:text-lg"],[1,"ui:list-none"],["target","_blank",1,"rero-ils-external-link",3,"href","title"]],template:function(r,c){if(r&1&&m(0,vt,12,15),r&2){let x;p((x=c.record())?0:-1,x)}},dependencies:[$,se,ue,Ce,ve,D,te,S,me],encapsulation:2,changeDetection:0})}}return e})();function gt(e,a){if(e&1){let t=W();n(0,"ng-core-detail-button",3),L("recordEvent",function(c){b(t);let x=l();return F(x.recordEvent(c))})("deleteMessageEvent",function(c){b(t);let x=l();return F(x.showDeleteMessage(c))}),Q(1,4),n(2,"p-button",5),u(3,"translate"),L("onClick",function(){b(t);let c=l();return F(c.search(c.record()))}),o(),J(),o()}if(e&2){let t=l();_("record",t.record())("type",t.type())("adminMode",t.adminMode())("useStatus",t.useStatus())("updateStatus",t.updateStatus())("deleteStatus",t.deleteStatus()),i(2),_("label",C(3,7,"Search documents"))}}function Tt(e,a){if(e&1&&T(0,"ng-core-error",2),e&2){let t=l();_("error",t.error())}}var Te=(()=>{class e extends le{constructor(){super(...arguments),this.appStore=P(de)}search(t){let r,c,x=this.findOrderKeyByLanguage(this.translate.getCurrentLang());this.appStore.settings()?.agentLabelOrder[x].forEach(I=>{t.metadata.sources.includes(I)&&!r&&!c&&(r=I,c=t.metadata[I].pid)}),r&&c&&this.router.navigate(["/records","documents"],{queryParams:{q:ce.generateSearchQuery(t.metadata.type,r,c),simple:"0"},skipLocationChange:!0})}findOrderKeyByLanguage(t){let r=Object.keys(this.appStore.settings()?.agentLabelOrder).find(c=>c===t);return r||(r=this.appStore.settings()?.agentLabelOrder.fallback),r}static{this.\u0275fac=(()=>{let t;return function(c){return(t||(t=j(e)))(c||e)}})()}static{this.\u0275cmp=y({type:e,selectors:[["admin-remote-page-detail"]],features:[q],decls:4,vars:2,consts:[["dynamicHost",""],[3,"record","type","adminMode","useStatus","updateStatus","deleteStatus"],[3,"error"],[3,"recordEvent","deleteMessageEvent","record","type","adminMode","useStatus","updateStatus","deleteStatus"],["beforeButton",""],["outlined","","icon","fa fa-search",3,"onClick","label"]],template:function(r,c){r&1&&(m(0,gt,4,9,"ng-core-detail-button",1),m(1,Tt,1,1,"ng-core-error",2),B(2,null,0)),r&2&&(p(c.record()?0:-1),i(),p(c.error()?1:-1))},dependencies:[re,ne,ae,S],encapsulation:2,changeDetection:0})}}return e})();var di=()=>new K().getTypes(),mi=[{path:"detail/:pid",component:Te,title:"Remote entity"}],K=class extends _e{constructor(){super(...arguments),this.name="remote_entities"}getTypes(){return[{key:this.name,index:this.name,label:"Remote entities",detailComponent:ge}]}};export{di as a,mi as b};