PageSourceSearch

https://pmmlarchives.in/4204.e13c480ea1769854.js

js pmmlarchives.in collected 2026-10-02 00:38:21 UTC 11,597 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkdspace_angular=self.webpackChunkdspace_angular||[]).push([[4204],{64204:(Q,m,o)=>{o.r(m),o.d(m,{DsDynamicLookupRelationSearchTabComponent:()=>$});var e=o(94650),v=o(14292),b=o(36872),E=(o(33609),o(61135)),f=o(4177),x=o(5164),O=o(51117),y=o(24702),d=o(95698),C=o(54004),g=o(18505),T=o(63900),S=o(69718),p=o(68285),I=o(8041),R=o(45715),P=o(77467),L=o(88002),D=(o(87917),o(36895)),M=o(30236),h=o(9769),j=o(98605),A=o(89383);function k(i,l){if(1&i){const t=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"input",14),e.\u0275\u0275listener("change",function(){e.\u0275\u0275restoreView(t);const n=e.\u0275\u0275nextContext(3);return e.\u0275\u0275resetView(n.selectAll())}),e.\u0275\u0275elementEnd()}2&i&&e.\u0275\u0275property("indeterminate",!1)}function B(i,l){if(1&i){const t=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"input",14),e.\u0275\u0275listener("change",function(){e.\u0275\u0275restoreView(t);const n=e.\u0275\u0275nextContext(3);return e.\u0275\u0275resetView(n.deselectAll())}),e.\u0275\u0275elementEnd()}2&i&&e.\u0275\u0275property("indeterminate",!0)}function V(i,l){if(1&i){const t=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"input",15),e.\u0275\u0275listener("change",function(){e.\u0275\u0275restoreView(t);const n=e.\u0275\u0275nextContext(3);return e.\u0275\u0275resetView(n.deselectAll())}),e.\u0275\u0275elementEnd()}2&i&&e.\u0275\u0275property("checked",!0)}function w(i,l){1&i&&(e.\u0275\u0275elementStart(0,"button",16),e.\u0275\u0275element(1,"span",17),e.\u0275\u0275elementStart(2,"span",12),e.\u0275\u0275text(3),e.\u0275\u0275pipe(4,"translate"),e.\u0275\u0275elementEnd()()),2&i&&(e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(4,1,"submission.sections.describe.relationship-lookup.search-tab.loading")))}function U(i,l){if(1&i){const t=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"div",18)(1,"button",19),e.\u0275\u0275listener("click",function(){const a=e.\u0275\u0275restoreView(t).ngVar,r=e.\u0275\u0275nextContext(3);return e.\u0275\u0275resetView(r.selectPage(null==a?null:a.page))}),e.\u0275\u0275text(2),e.\u0275\u0275pipe(3,"translate"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(4,"button",19),e.\u0275\u0275listener("click",function(){const a=e.\u0275\u0275restoreView(t).ngVar,r=e.\u0275\u0275nextContext(3);return e.\u0275\u0275resetView(r.deselectPage(null==a?null:a.page))}),e.\u0275\u0275text(5),e.\u0275\u0275pipe(6,"translate"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(7,"button",19),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(t);const n=e.\u0275\u0275nextContext(3);return e.\u0275\u0275resetView(n.selectAll())}),e.\u0275\u0275text(8),e.\u0275\u0275pipe(9,"translate"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(10,"button",19),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(t);const n=e.\u0275\u0275nextContext(3);return e.\u0275\u0275resetView(n.deselectAll())}),e.\u0275\u0275text(11),e.\u0275\u0275pipe(12,"translate"),e.\u0275\u0275elementEnd()()}2&i&&(e.\u0275\u0275advance(2),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(3,4,"submission.sections.describe.relationship-lookup.search-tab.select-page")),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(6,6,"submission.sections.describe.relationship-lookup.search-tab.deselect-page")),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(9,8,"submission.sections.describe.relationship-lookup.search-tab.select-all")),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(12,10,"submission.sections.describe.relationship-lookup.search-tab.deselect-all")))}function K(i,l){if(1&i&&(e.\u0275\u0275elementStart(0,"div",3)(1,"div",4)(2,"div",5)(3,"div",6),e.\u0275\u0275template(4,k,1,1,"input",7),e.\u0275\u0275pipe(5,"async"),e.\u0275\u0275template(6,B,1,1,"input",7),e.\u0275\u0275pipe(7,"async"),e.\u0275\u0275template(8,V,1,1,"input",8),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(9,"div",9),e.\u0275\u0275template(10,w,5,3,"button",10),e.\u0275\u0275elementStart(11,"button",11)(12,"span",12),e.\u0275\u0275text(13),e.\u0275\u0275pipe(14,"translate"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275template(15,U,13,12,"div",13),e.\u0275\u0275pipe(16,"async"),e.\u0275\u0275elementEnd()()()),2&i){const t=e.\u0275\u0275nextContext(2);e.\u0275\u0275advance(4),e.\u0275\u0275property("ngIf",!t.allSelected&&!e.\u0275\u0275pipeBind1(5,7,t.someSelected$)),e.\u0275\u0275advance(2),e.\u0275\u0275property("ngIf",!t.allSelected&&e.\u0275\u0275pipeBind1(7,9,t.someSelected$)),e.\u0275\u0275advance(2),e.\u0275\u0275property("ngIf",t.allSelected),e.\u0275\u0275advance(2),e.\u0275\u0275property("ngIf",t.selectAllLoading),e.\u0275\u0275advance(1),e.\u0275\u0275property("hidden",t.selectAllLoading),e.\u0275\u0275advance(2),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(14,11,"submission.sections.describe.relationship-lookup.toggle-dropdown")),e.\u0275\u0275advance(2),e.\u0275\u0275property("ngVar",e.\u0275\u0275pipeBind1(16,13,t.resultsRD$))}}const W=function(i,l){return{repeatable:i,listId:l}};function F(i,l){if(1&i){const t=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"ds-themed-search",1),e.\u0275\u0275listener("resultFound",function(n){e.\u0275\u0275restoreView(t);const a=e.\u0275\u0275nextContext();
1return e.\u0275\u0275resetView(a.onResultFound(n))})("deselectObject",function(n){e.\u0275\u0275restoreView(t);const a=e.\u0275\u0275nextContext();return e.\u0275\u0275resetView(a.deselectObject.emit(n))})("selectObject",function(n){e.\u0275\u0275restoreView(t);const a=e.\u0275\u0275nextContext();return e.\u0275\u0275resetView(a.selectObject.emit(n))}),e.\u0275\u0275template(1,K,17,15,"div",2),e.\u0275\u0275elementEnd()}if(2&i){const t=e.\u0275\u0275nextContext();e.\u0275\u0275property("configuration",t.relationship.searchConfiguration)("context",t.context)("fixedFilterQuery",t.relationship.filter)("inPlaceSearch",!0)("linkType",t.linkTypes.ExternalLink)("searchFormPlaceholder","submission.sections.describe.relationship-lookup.search-tab.search-form.placeholder")("selectable",!0)("selectionConfig",e.\u0275\u0275pureFunction2(12,W,t.repeatable,t.listId))("showScopeSelector",!1)("showViewModes",!1)("query",t.query),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",t.repeatable)}}let $=(()=>{class i{constructor(t,s,n,a,r,c){this.searchService=t,this.selectableListService=s,this.searchConfigService=n,this.lookupRelationService=a,this.relationshipService=r,this.paginationService=c,this.deselectObject=new e.EventEmitter,this.selectObject=new e.EventEmitter,this.resultsRD$=new E.X(null),this.initialPagination={page:1,pageSize:5},this.linkTypes=I.m,this.resultFound=new e.EventEmitter}ngOnInit(){this.resetRoute()}resetRoute(){this.paginationService.updateRoute(this.searchConfigService.paginationID,this.initialPagination)}selectPage(t){this.selection$.pipe((0,d.q)(1)).subscribe(s=>{const n=t.filter(a=>s.findIndex(r=>r.equals(a))<0);this.selectObject.emit(...n)}),this.selectableListService.select(this.listId,t)}deselectPage(t){this.allSelected=!1,this.selection$.pipe((0,d.q)(1)).subscribe(s=>{const n=t.filter(a=>s.findIndex(r=>r.equals(a))>=0);this.deselectObject.emit(...n)}),this.selectableListService.deselect(this.listId,t)}selectAll(){this.allSelected=!0,this.selectAllLoading=!0;const t=Object.assign(new f.r,{currentPage:1,pageSize:9999}),s=Object.assign(this.lookupRelationService.searchConfig,{pagination:t});this.searchService.search(s).pipe((0,p.xw)(),(0,C.U)(a=>a.payload.page),(0,g.b)(()=>this.selectAllLoading=!1),(0,T.w)(a=>this.selection$.pipe((0,d.q)(1),(0,g.b)(r=>{const c=a.filter(_=>r.findIndex(u=>u.equals(_))<0);this.selectObject.emit(...c)}),(0,S.h)(a)))).subscribe(a=>{this.selectableListService.select(this.listId,a)})}setSelectedIds(t,s){let n=this.relationshipType.rightwardType;this.isLeft&&(n=this.relationshipType.leftwardType),this.relationshipService.searchByItemsAndType(this.relationshipType.id,this.item.uuid,n,t).pipe((0,p.xw)(),(0,p.xe)()).subscribe(a=>{let r=a.page.map(c=>{let _=[];return _=this.isLeft?c._links.rightItem.href.split("/"):c._links.leftItem.href.split("/"),this.getRelatedItem(_[_.length-1],s)});r=r.filter(c=>!this.getIfInRemove(c.indexableObject.uuid)),r.length>0&&this.selectableListService.select(this.listId,r)})}deselectAll(){this.allSelected=!1,this.selection$.pipe((0,d.q)(1)).subscribe(t=>this.deselectObject.emit(...t)),this.selectableListService.deselectAll(this.listId)}getRelatedItem(t,s){return s.find(n=>n.indexableObject.uuid===t)}getIfInRemove(t){return!!this.toRemove.find(s=>s.indexableObject.uuid===t)}ngOnDestroy(){(0,y.Uh)(this.subscription)&&this.subscription.unsubscribe()}onResultFound(t){if(this.resultsRD$.next(t),this.resultFound.emit(t),this.isEditRelationship){const s=t.page.map(n=>n.indexableObject.uuid);this.setSelectedIds(s,t.page)}}}return i.\u0275fac=function(t){return new(t||i)(e.\u0275\u0275directiveInject(x.o),e.\u0275\u0275directiveInject(O.w),e.\u0275\u0275directiveInject(b.U),e.\u0275\u0275directiveInject(R.P),e.\u0275\u0275directiveInject(L.U),e.\u0275\u0275directiveInject(P.N))},i.\u0275cmp=e.\u0275\u0275defineComponent({type:i,selectors:[["ds-dynamic-lookup-relation-search-tab"]],inputs:{relationship:"relationship",listId:"listId",query:"query",repeatable:"repeatable",selection$:"selection$",context:"context",relationshipType:"relationshipType",item:"item",isLeft:"isLeft",toRemove:"toRemove",isEditRelationship:"isEditRelationship"},outputs:{deselectObject:"deselectObject",selectObject:"selectObject",resultFound:"resultFound"},features:[e.\u0275\u0275ProvidersFeature([{provide:v.SEARCH_CONFIG_SERVICE,useClass:b.U}])],decls:1,vars:1,consts:[[3,"configuration","context","fixedFilterQuery","inPlaceSearch","linkType","searchFormPlaceholder","selectable","selectionConfig","showScopeSelector","showViewModes","query","resultFound","deselectObject","selectObject",4,"ngIf"],[3,"configuration","context","fixedFilterQuery","inPlaceSearch","linkType","searchFormPlaceholder","selectable","selectionConfig","showScopeSelector","showViewModes","query","resultFound","deselectObject","selectObject"],["additionalSearchOptions","","class","position-absolute",4,"ngIf"],["additionalSearchOptions","",1,"position-absolute"],[1,"input-group","mb-3"],[1,"input-group-prepend"],[1,"input-group-text"],["type","checkbox",3,"indeterminate","change",4,"ngIf"],["type","checkbox",3,"checked","change",4,"ngIf"],["ngbDropdown","",1,"input-group-append"],["type","button","class","btn btn-outline-secondary rounded-right",4,"ngIf"],["id","resultdropdown","type","button","ngbDropdownToggle","","data-toggle","dropdown","aria-haspopup","true","aria-expanded","fal
1se",1,"btn","btn-outline-secondary","dropdown-toggle-split",3,"hidden"],[1,"sr-only"],["ngbDropdownMenu","","aria-labelledby","resultdropdown",4,"ngVar"],["type","checkbox",3,"indeterminate","change"],["type","checkbox",3,"checked","change"],["type","button",1,"btn","btn-outline-secondary","rounded-right"],["role","status","aria-hidden","true",1,"spinner-border","spinner-border-sm"],["ngbDropdownMenu","","aria-labelledby","resultdropdown"],[1,"dropdown-item",3,"click"]],template:function(t,s){1&t&&e.\u0275\u0275template(0,F,2,15,"ds-themed-search",0),2&t&&e.\u0275\u0275property("ngIf",s.relationship.searchConfiguration&&s.context)},dependencies:[D.O5,M.l,h.jt,h.iD,h.Vi,j.g,D.Ov,A.X$],styles:[".position-absolute[_ngcontent-%COMP%]{right:var(--bs-spacer)}"]}),i})()}}]);

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.