PageSourceSearch

https://www.julkari.fi/4416.f5ef839e1f3d2326.js

js julkari.fi collected 2026-10-02 03:14:58 UTC 14,952 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkdspace_angular=self.webpackChunkdspace_angular||[]).push([[4416],{64416(Q,E,n){n.d(E,{ROUTES:()=>H});var T=n(70379),m=n(41780),h=n(4856),f=n(80183),v=n(39806),S=n(26479),u=n(60177),t=n(54438),c=n(1473),D=n(88280),$=n(760),p=n(70334),I=n(82777),j=n(13143),b=n(7901);function M(r,d){if(1&r){const a=t.RV6();t.j41(0,"ds-form",1),t.bIt("submitForm",function(){t.eBV(a);const i=t.XpG();return t.Njj(i.onSubmit())})("cancel",function(){t.eBV(a);const i=t.XpG();return t.Njj(i.onCancel())}),t.k0s()}if(2&r){const a=t.XpG();t.Y8G("formId","comcol-form-id")("formModel",a.formModel)}}let B=(()=>{class r{constructor(a){this.router=a,this.bitstreamFormat=new $.v,this.updatedFormat=new t.bkB,this.supportLevelOptions=[{label:p.c.Known,value:p.c.Known},{label:p.c.Unknown,value:p.c.Unknown},{label:p.c.Supported,value:p.c.Supported}],this.arrayElementLayout={grid:{group:"form-row"}},this.arrayInputElementLayout={grid:{host:"col"}},this.formModel=[new c.rA_({id:"shortDescription",name:"shortDescription",label:"admin.registries.bitstream-formats.edit.shortDe
1scription.label",hint:"admin.registries.bitstream-formats.edit.shortDescription.hint",required:!0,validators:{required:null},errorMessages:{required:"Please enter a name for this bitstream format"}}),new c.rA_({id:"mimetype",name:"mimetype",label:"admin.registries.bitstream-formats.edit.mimetype.label",hint:"admin.registries.bitstream-formats.edit.mimetype.hint"}),new c.Zex({id:"description",name:"description",label:"admin.registries.bitstream-formats.edit.description.label",hint:"admin.registries.bitstream-formats.edit.description.hint",spellCheck:D.c.form.spellCheck}),new c.z4z({id:"supportLevel",name:"supportLevel",options:this.supportLevelOptions,label:"admin.registries.bitstream-formats.edit.supportLevel.label",hint:"admin.registries.bitstream-formats.edit.supportLevel.hint",value:this.supportLevelOptions[0].value}),new c.M7d({id:"internal",name:"internal",label:"Internal",hint:"admin.registries.bitstream-formats.edit.internal.hint"}),new c.UqU({id:"extensions",name:"extensions",label:"admin.registries.bitstream-formats.edit.extensions.label",groupFactory:()=>[new c.rA_({id:"extension",placeholder:"admin.registries.bitstream-formats.edit.extensions.placeholder"},this.arrayInputElementLayout)]},this.arrayElementLayout)]}ngOnInit(){this.initValues()}initValues(){this.formModel.forEach(a=>{if("extensions"===a.name){if((0,I.a4)(this.bitstreamFormat.extensions)){const e=this.bitstreamFormat.extensions,i=a;for(let s=0;s<e.length;s++)i.insertGroup(s).group[0]=new c.rA_({id:`extension-${s}`,value:e[s]},this.arrayInputElementLayout)}}else(0,I.a4)(this.bitstreamFormat[a.name])&&(a.value=this.bitstreamFormat[a.name])})}onSubmit(){const a=Object.assign(new $.v,{id:this.bitstreamFormat.id});this.formModel.forEach(e=>{if("extensions"===e.name){const i=e,s=[];for(let o=0;o<i.groups.length;o++){const l=i.get(o).get(0).value;(0,I.Im)(l)||s.push(i.get(o).get(0).value)}a.extensions=s}else a[e.name]=e.value}),this.updatedFormat.emit(a)}onCancel(){this.router.navigate([(0,S.J)()])}static{this.\u0275fac=function(e){return new(e||r)(t.rXU(b.Ix))}}static{this.\u0275cmp=t.VBU({type:r,selectors:[["ds-bitstream-format-form"]],inputs:{bitstreamFormat:"bitstreamFormat"},outputs:{updatedFormat:"updatedFormat"},standalone:!0,features:[t.aNF],decls:1,vars:1,consts:[[3,"formId","formModel","submitForm","cancel",4,"ngIf"],[3,"submitForm","cancel","formId","formModel"]],template:function(e,i){1&e&&t.DNE(0,M,1,2,"ds-form",0),2&e&&t.Y8G("ngIf",i.formModel)},dependencies:[j.s,u.bT],encapsulation:2})}}return r})(),C=(()=>{class r{constructor(a,e,i,s){this.router=a,this.notificationService=e,this.translateService=i,this.bitstreamFormatDataService=s}createBitstreamFormat(a){this.bitstreamFormatDataService.createBitstreamFormat(a).pipe((0,f.qD)()).subscribe(e=>{e.hasSucceeded?(this.notificationService.success(this.translateService.get("admin.registries.bitstream-formats.create.success.head"),this.translateService.get("admin.registries.bitstream-formats.create.success.content")),this.router.navigate([(0,S.J)()]),this.bitstreamFormatDataService.clearBitStreamFormatRequests().subscribe()):this.notificationService.error(this.translateService.get("admin.registries.bitstream-formats.create.failure.head"),this.translateService.get("admin.registries.bitstream-formats.create.failure.content"))})}static{this.\u0275fac=function(e){return new(e||r)(t.rXU(b.Ix),t.rXU(v.I),t.rXU(m.c$),t.rXU(h.BitstreamFormatDataService))}}static{this.\u0275cmp=t.VBU({type:r,selectors:[["ds-add-bitstream-format"]],standalone:!0,features:[t.aNF],decls:7,vars:3,consts:[[1,"container"],[1,"row"],[1,"col-12","mb-4"],["id","sub-header",1,"border-bottom","pb-2"],[3,"updatedFormat"]],template:function(e,i){1&e&&(t.j41(0,"div",0)(1,"div",1)(2,"div",2)(3,"h1",3),t.EFF(4),t.nI1(5,"translate"),t.k0s(),t.j41(6,"ds-bitstream-format-form",4),t.bIt("updatedFormat",function(o){return i.createBitstreamFormat(o)}),t.k0s()()()()),2&e&&(t.R7$(4),t.JRh(t.bMT(5,1,"admin.registries.bitstream-formats.create.new")))},dependencies:[B,m.h,m.D9],encapsulation:2})}}return r})();var k=n(96697),_=n(73028),y=n(96354),x=n(56594),G=n(25558),U=n(22978),X=n(5682),L=n(23401);const F=r=>["/admin/registries/bitstream-formats",r,"edit"];function A(r,d){1&r&&(t.j41(0,"span"),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&r&&(t.R7$(),t.SpI("(",t.bMT(2,1,"admin.registries.bitstream-formats.table.internal"),")"))}function J(r,d){if(1&r){const a=t.RV6();t.j41(0,"tr")(1,"td")(2,"input",17),t.nI1(3,"async"),t.nI1(4,"translate"),t.bIt("change",function(i){const s=t.eBV(a).$implicit,o=t.XpG(2);return t.Njj(o.selectBitStreamFormat(s,i))}),t.k0s(),t.j41(5,"span",15),t.EFF(6),t.nI1(7,"translate"),t.k0s()(),t.j41(8,"td")(9,"a",18),t.EFF(10),t.k0s()(),t.j41(11,"td")(12,"a",18),t.EFF(13),t.k0s()(),t.j41(14,"td")(15,"a",18),t.EFF(16),t.DNE(17,A,3,3,"span",19),t.k0s()(),t.j41(18,"td")(19,"a",18),t.EFF(20),t.nI1(21,"translate"),t.k0s()()()}if(2&r){let a;const e=d.$implicit,i=t.XpG(2);
1t.R7$(2),t.Y8G("title",e.shortDescription)("checked",null==(a=t.bMT(3,13,i.selectedBitstreamFormatIDs$))?null:a.includes(e.id)),t.BMQ("aria-label",t.bMT(4,15,"admin.registries.bitstream-formats.select")),t.R7$(4),t.SpI("",t.bMT(7,17,"admin.registries.bitstream-formats.select"),"}"),t.R7$(3),t.Y8G("routerLink",t.eq3(21,F,e.id)),t.R7$(),t.JRh(e.id),t.R7$(2),t.Y8G("routerLink",t.eq3(23,F,e.id)),t.R7$(),t.JRh(e.shortDescription),t.R7$(2),t.Y8G("routerLink",t.eq3(25,F,e.id)),t.R7$(),t.SpI("",e.mimetype," "),t.R7$(),t.Y8G("ngIf",e.internal),t.R7$(2),t.Y8G("routerLink",t.eq3(27,F,e.id)),t.R7$(),t.JRh(t.bMT(21,19,"admin.registries.bitstream-formats.table.supportLevel."+e.supportLevel))}}function O(r,d){if(1&r&&(t.j41(0,"ds-pagination",11),t.nI1(1,"async"),t.j41(2,"div",12)(3,"table",13)(4,"thead")(5,"tr")(6,"th",14)(7,"span",15),t.EFF(8),t.nI1(9,"translate"),t.k0s()(),t.j41(10,"th",14),t.EFF(11),t.nI1(12,"translate"),t.k0s(),t.j41(13,"th",14),t.EFF(14),t.nI1(15,"translate"),t.k0s(),t.j41(16,"th",14),t.EFF(17),t.nI1(18,"translate"),t.k0s(),t.j41(19,"th",14),t.EFF(20),t.nI1(21,"translate"),t.k0s()()(),t.j41(22,"tbody"),t.DNE(23,J,22,29,"tr",16),t.nI1(24,"async"),t.k0s()()()()),2&r){let a,e;const i=t.XpG();t.Y8G("paginationOptions",i.pageConfig)("collectionSize",null==(a=t.bMT(1,10,i.bitstreamFormats$))||null==a.payload?null:a.payload.totalElements)("hideGear",!1)("hidePagerWhenSinglePage",!0),t.R7$(8),t.JRh(t.bMT(9,12,"admin.registries.bitstream-formats.table.selected")),t.R7$(3),t.JRh(t.bMT(12,14,"admin.registries.bitstream-formats.table.id")),t.R7$(3),t.JRh(t.bMT(15,16,"admin.registries.bitstream-formats.table.name")),t.R7$(3),t.JRh(t.bMT(18,18,"admin.registries.bitstream-formats.table.mimetype")),t.R7$(3),t.JRh(t.bMT(21,20,"admin.registries.bitstream-formats.table.supportLevel.head")),t.R7$(3),t.Y8G("ngForOf",null==(e=t.bMT(24,22,i.bitstreamFormats$))||null==e.payload?null:e.payload.page)}}function N(r,d){1&r&&(t.j41(0,"div",20),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&r&&(t.R7$(),t.SpI(" ",t.bMT(2,1,"admin.registries.bitstream-formats.no-items")," "))}function Y(r,d){if(1&r){const a=t.RV6();t.j41(0,"button",21),t.bIt("click",function(){t.eBV(a);const i=t.XpG();return t.Njj(i.deselectAll())}),t.EFF(1),t.nI1(2,"translate"),t.k0s()}2&r&&(t.R7$(),t.JRh(t.bMT(2,1,"admin.registries.bitstream-formats.table.deselect-all")))}function V(r,d){if(1&r){const a=t.RV6();t.j41(0,"button",22),t.bIt("click",function(){t.eBV(a);const i=t.XpG();return t.Njj(i.deleteFormats())}),t.EFF(1),t.nI1(2,"translate"),t.k0s()}2&r&&(t.R7$(),t.JRh(t.bMT(2,1,"admin.registries.bitstream-formats.table.delete")))}const z=r=>({format:r}),R=[],H=[{path:"",providers:R,component:(()=>{class r{constructor(a,e,i,s){this.notificationsService=a,this.translateService=e,this.bitstreamFormatService=i,this.paginationService=s,this.pageConfig=Object.assign(new L.W,{id:"rbp",pageSize:20,pageSizeOptions:[20,40,60,80,100]})}deleteFormats(){this.bitstreamFormatService.clearBitStreamFormatRequests(),this.bitstreamFormatService.getSelectedBitstreamFormats().pipe((0,k.s)(1),(0,_.Z)(a=>a),(0,_.Z)(a=>this.bitstreamFormatService.delete(a.id).pipe((0,f.qD)(),(0,y.T)(e=>e.hasSucceeded))),(0,x.$)()).subscribe(a=>{const e=a.filter(s=>s),i=a.filter(s=>!s);e.length>0&&this.showNotification(!0,e.length),i.length>0&&this.showNotification(!1,i.length),this.deselectAll(),this.paginationService.resetPage(this.pageConfig.id)})}deselectAll(){this.bitstreamFormatService.deselectAllBitstreamFormats()}selectedBitstreamFormatIDs(){return this.bitstreamFormatService.getSelectedBitstreamFormats().pipe((0,y.T)(a=>a.map(e=>e.id)))}selectBitStreamFormat(a,e){e.target.checked?this.bitstreamFormatService.selectBitstreamFormat(a):this.bitstreamFormatService.deselectBitstreamFormat(a)}showNotification(a,e){const i="admin.registries.bitstream-formats.delete",s=a?"success":"failure",o=this.translateService.instant(`${i}.${s}.head`),l=this.translateService.instant(`${i}.${s}.amount`,{amount:e});a?this.notificationsService.success(o,l):this.notificationsService.error(o,l)}ngOnInit(){this.bitstreamFormats$=this.paginationService.getFindListOptions(this.pageConfig.id,this.pageConfig).pipe((0,G.n)(a=>this.bitstreamFormatService.findAll(a))),this.selectedBitstreamFormatIDs$=this.selectedBitstreamFormatIDs()}ngOnDestroy(){this.paginationService.clearPagination(this.pageConfig.id)}static{this.\u0275fac=function(e){return new(e||r)(t.rXU(v.I),t.rXU(m.c$),t.rXU(h.BitstreamFormatDataService),t.rXU(U.m))}}static{this.\u0275cmp=t.VBU({type:r,selectors:[["ds-bitstream-formats"]],standalone:!0,features:[t.aNF],decls:22,vars:22,consts:[[1,"container"],[1,"bitstream-formats","row"],[1,"col-12"],["id","header",1,"border-bottom","pb-2"],["id","description"],["id","create-new",1,"mb-2"],[1,"btn","btn-success",3,"routerLink"],[3,"paginationOptions","collectionSize","hideGear","hidePagerWhenSinglePage",4,"ngIf"],["class","alert alert-info","role","alert",4,"ngIf"],["class","btn btn-primary deselect",3,"click",4,"ngIf"],["type","submit","class","btn btn-danger float-right",3,"click",4,"ngIf"],[3,"paginationOptions","collectionSize","hideGear","hidePagerWhenSinglePage"],[1,"table-responsive"],["id","formats",1,"table","table-striped","table-hover"],["scope","col"],[1,"sr-only"],[4,"ngFor","ngForOf"],["type","checkbox",3,"change","title","checked"],[3,"routerLink"],[4,"ngIf"],["role","alert",1,"alert","alert-info"],[1,"btn","btn-primary","de
1select",3,"click"],["type","submit",1,"btn","btn-danger","float-right",3,"click"]],template:function(e,i){if(1&e&&(t.j41(0,"div",0)(1,"div",1)(2,"div",2)(3,"h1",3),t.EFF(4),t.nI1(5,"translate"),t.k0s(),t.j41(6,"p",4),t.EFF(7),t.nI1(8,"translate"),t.k0s(),t.j41(9,"p",5)(10,"a",6),t.EFF(11),t.nI1(12,"translate"),t.k0s()(),t.DNE(13,O,25,24,"ds-pagination",7),t.nI1(14,"async"),t.DNE(15,N,3,3,"div",8),t.nI1(16,"async"),t.j41(17,"div"),t.DNE(18,Y,3,3,"button",9),t.nI1(19,"async"),t.DNE(20,V,3,3,"button",10),t.nI1(21,"async"),t.k0s()()()()),2&e){let s,o,l,g;t.R7$(4),t.JRh(t.bMT(5,8,"admin.registries.bitstream-formats.head")),t.R7$(3),t.JRh(t.bMT(8,10,"admin.registries.bitstream-formats.description")),t.R7$(3),t.Y8G("routerLink","add"),t.R7$(),t.JRh(t.bMT(12,12,"admin.registries.bitstream-formats.create.new")),t.R7$(2),t.Y8G("ngIf",(null==(s=t.bMT(14,14,i.bitstreamFormats$))||null==s.payload?null:s.payload.totalElements)>0),t.R7$(2),t.Y8G("ngIf",0===(null==(o=t.bMT(16,16,i.bitstreamFormats$))||null==o.payload?null:o.payload.totalElements)),t.R7$(3),t.Y8G("ngIf",(null==(l=t.bMT(19,18,i.bitstreamFormats$))||null==l.payload||null==l.payload.page?null:l.payload.page.length)>0),t.R7$(2),t.Y8G("ngIf",(null==(g=t.bMT(21,20,i.bitstreamFormats$))||null==g.payload||null==g.payload.page?null:g.payload.page.length)>0)}},dependencies:[u.bT,u.Jj,b.Wk,m.h,m.D9,X.e,u.Sq],encapsulation:2})}}return r})()},{path:"add",resolve:{breadcrumb:T.S},providers:R,component:C,data:{breadcrumbKey:"admin.registries.bitstream-formats.create"}},{path:":id/edit",providers:R,component:(()=>{class r{constructor(a,e,i,s,o){this.route=a,this.router=e,this.notificationService=i,this.translateService=s,this.bitstreamFormatDataService=o}ngOnInit(){this.bitstreamFormatRD$=this.route.data.pipe((0,y.T)(a=>a.bitstreamFormat))}updateFormat(a){this.bitstreamFormatDataService.updateBitstreamFormat(a).pipe((0,f.qD)()).subscribe(e=>{e.hasSucceeded?(this.notificationService.success(this.translateService.get("admin.registries.bitstream-formats.edit.success.head"),this.translateService.get("admin.registries.bitstream-formats.edit.success.content")),this.router.navigate([(0,S.J)()])):this.notificationService.error("admin.registries.bitstream-formats.edit.failure.head","admin.registries.bitstream-formats.create.edit.content")})}static{this.\u0275fac=function(e){return new(e||r)(t.rXU(b.nX),t.rXU(b.Ix),t.rXU(v.I),t.rXU(m.c$),t.rXU(h.BitstreamFormatDataService))}}static{this.\u0275cmp=t.VBU({type:r,selectors:[["ds-edit-bitstream-format"]],standalone:!0,features:[t.aNF],decls:9,vars:11,consts:[[1,"container"],[1,"row"],[1,"col-12","mb-4"],["id","sub-header",1,"border-bottom","pb-2"],[3,"updatedFormat","bitstreamFormat"]],template:function(e,i){if(1&e&&(t.j41(0,"div",0)(1,"div",1)(2,"div",2)(3,"h1",3),t.EFF(4),t.nI1(5,"async"),t.nI1(6,"translate"),t.k0s(),t.j41(7,"ds-bitstream-format-form",4),t.nI1(8,"async"),t.bIt("updatedFormat",function(o){return i.updateFormat(o)}),t.k0s()()()()),2&e){let s,o;t.R7$(4),t.JRh(t.i5U(6,4,"admin.registries.bitstream-formats.edit.head",t.eq3(9,z,null==(s=t.bMT(5,2,i.bitstreamFormatRD$))?null:s.payload.shortDescription))),t.R7$(3),t.Y8G("bitstreamFormat",null==(o=t.bMT(8,7,i.bitstreamFormatRD$))?null:o.payload)}},dependencies:[B,m.h,m.D9,u.Jj],encapsulation:2})}}return r})(),resolve:{bitstreamFormat:(r,d,a=(0,t.WQX)(h.BitstreamFormatDataService))=>a.findById(r.params.id).pipe((0,f.qD)()),breadcrumb:T.S},data:{breadcrumbKey:"admin.registries.bitstream-formats.edit"}}]}}]);

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.