@knora/search
Version:
Knora ui module: search
15 lines (13 loc) • 63.2 kB
JavaScript
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/cdk/overlay"),require("@angular/cdk/portal"),require("@angular/core"),require("@angular/material"),require("@angular/router"),require("@knora/api"),require("@knora/core"),require("@angular/forms"),require("@angular/material/core"),require("@angular/material/datepicker"),require("jdnconvertiblecalendardateadapter"),require("@angular/material/input"),require("@angular/platform-browser/animations"),require("@angular/material/autocomplete"),require("@angular/material/button"),require("@angular/material/checkbox"),require("@angular/material/expansion"),require("@angular/material/form-field"),require("@angular/material/icon"),require("@angular/common"),require("@angular/material/list"),require("@angular/material/menu"),require("@angular/material/select"),require("@angular/material/tooltip"),require("@knora/action"),require("@knora/viewer")):"function"==typeof define&&define.amd?define("@knora/search",["exports","@angular/cdk/overlay","@angular/cdk/portal","@angular/core","@angular/material","@angular/router","@knora/api","@knora/core","@angular/forms","@angular/material/core","@angular/material/datepicker","jdnconvertiblecalendardateadapter","@angular/material/input","@angular/platform-browser/animations","@angular/material/autocomplete","@angular/material/button","@angular/material/checkbox","@angular/material/expansion","@angular/material/form-field","@angular/material/icon","@angular/common","@angular/material/list","@angular/material/menu","@angular/material/select","@angular/material/tooltip","@knora/action","@knora/viewer"],t):t(((e=e||self).knora=e.knora||{},e.knora.search={}),e.ng.cdk.overlay,e.ng.cdk.portal,e.ng.core,e.ng.material,e.ng.router,e.api,e["@knora/core"],e.ng.forms,e.ng.material.core,e.ng.material.datepicker,e.jdnconvertiblecalendardateadapter,e.ng.material.input,e.ng.platformBrowser.animations,e.ng.material.autocomplete,e.ng.material.button,e.ng.material.checkbox,e.ng.material.expansion,e.ng.material["form-field"],e.ng.material.icon,e.ng.common,e.ng.material.list,e.ng.material.menu,e.ng.material.select,e.ng.material.tooltip,e["@knora/action"],e["@knora/viewer"])}(this,(function(e,t,r,o,n,i,a,l,s,c,p,u,d,m,h,f,y,g,v,b,x,k,C,j,S,I,w){"use strict";
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */function P(e,t,r,o){var n,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var l=e.length-1;l>=0;l--)(n=e[l])&&(a=(i<3?n(a):i>3?n(t,r,a):n(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a}function V(e,t){return function(r,o){t(r,o,e)}}function F(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function O(e){var t="function"==typeof Symbol&&e[Symbol.iterator],r=0;return t?t.call(e):{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}}}var R=function(){function e(e,t,r,n){this.knoraApiConnection=e,this._overlay=t,this._router=r,this._viewContainerRef=n,this.route="/search",this.projectfilter=!1,this.showState=new o.EventEmitter,this.prevSearch=JSON.parse(localStorage.getItem("prevSearch")),this.defaultProjectLabel="All projects",this.projectLabel=this.defaultProjectLabel,this.searchPanelFocus=!1,this.doNotDisplay=[a.Constants.SystemProjectIRI,a.Constants.DefaultSharedOntologyIRI]}return e.prototype.ngOnInit=function(){this.filterbyproject&&this.getProject(this.filterbyproject),this.projectfilter&&(this.getAllProjects(),null!==localStorage.getItem("currentProject")&&this.setProject(JSON.parse(localStorage.getItem("currentProject"))))},e.prototype.openPanelWithBackdrop=function(){var e=this,o=new t.OverlayConfig({hasBackdrop:!0,backdropClass:"cdk-overlay-transparent-backdrop",positionStrategy:this.getOverlayPosition(),scrollStrategy:this._overlay.scrollStrategies.block()});this.overlayRef=this._overlay.create(o),this.overlayRef.attach(new r.TemplatePortal(this.searchMenu,this._viewContainerRef)),this.overlayRef.backdropClick().subscribe((function(){e.searchPanelFocus=!1,e.overlayRef.detach()}))},e.prototype.getOverlayPosition=function(){var e=[new t.ConnectionPositionPair({originX:"start",originY:"bottom"},{overlayX:"start",overlayY:"top"}),new t.ConnectionPositionPair({originX:"start",originY:"top"},{overlayX:"start",overlayY:"bottom"})];return this._overlay.position().flexibleConnectedTo(this.searchPanel).withPositions(e).withLockedPosition(!1)},e.prototype.getAllProjects=function(){var e=this;this.knoraApiConnection.admin.projectsEndpoint.getProjects().subscribe((function(t){e.projects=t.body.projects,null!==localStorage.getItem("currentProject")&&(e.project=JSON.parse(localStorage.getItem("currentProject")))}),(function(t){console.error(t),e.error=t}))},e.prototype.getProject=function(e){var t=this;this.knoraApiConnection.admin.projectsEndpoint.getProjectByIri(e).subscribe((function(e){t.setProject(e.body.project)}),(function(e){console.error(e)}))},e.prototype.setProject=function(e){e?(this.projectLabel=e.shortname,this.projectIri=e.id,localStorage.setItem("currentProject",JSON.stringify(e))):(this.projectLabel=this.defaultProjectLabel,this.projectIri=void 0,localStorage.removeItem("currentProject"))},e.prototype.doSearch=function(){var e,t;if(void 0!==this.searchQuery&&null!==this.searchQuery){void 0!==this.projectIri?this._router.navigate([this.route+"/fulltext/"+this.searchQuery+"/"+encodeURIComponent(this.projectIri)]):this._router.navigate([this.route+"/fulltext/"+this.searchQuery]);var r=JSON.parse(localStorage.getItem("prevSearch"));null===r&&(r=[]);var o=0;try{for(var n=O(r),i=n.next();!i.done;i=n.next()){var a=i.value;this.searchQuery===a.query&&this.projectIri===a.projectIri&&r.splice(o,1),o++}}catch(t){e={error:t}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}if(this.searchQuery.length>2){var l={query:this.searchQuery};this.projectIri&&(l={projectIri:this.projectIri,projectLabel:this.projectLabel,query:this.searchQuery}),r.push(l),localStorage.setItem("prevSearch",JSON.stringify(r))}}this.resetSearch(),this.overlayRef.detach(),this.show=!1,this.showState.emit(this.show)},e.prototype.resetSearch=function(){this.searchPanelFocus=!1,this.searchInput.nativeElement.blur(),this.overlayRef.detach()},e.prototype.setFocus=function(){this.prevSearch=JSON.parse(localStorage.getItem("prevSearch")),this.searchPanelFocus=!0,this.openPanelWithBackdrop()},e.prototype.doPrevSearch=function(e){this.searchQuery=e.query,void 0!==e.projectIri?(this.projectIri=e.projectIri,this.projectLabel=e.projectLabel,this._router.navigate([this.route+"/fulltext/"+this.searchQuery+"/"+encodeURIComponent(e.projectIri)])):(this.projectIri=void 0,this.projectLabel=this.defaultProjectLabel,this._router.navigate([this.route+"/fulltext/"+this.searchQuery])),this.resetSearch(),this.overlayRef.detach()},e.prototype.resetPrevSearch=function(e){if(e){var t=this.prevSearch.indexOf(e);this.prevSearch.splice(t,1),localStorage.setItem("prevSearch",JSON.stringify(this.prevSearch))}else localStorage.removeItem("prevSearch");this.prevSearch=JSON.parse(localStorage.getItem("prevSearch"))},e.prototype.changeFocus=function(){this.selectProject.closeMenu(),this.searchInput.nativeElement.focus(),this.setFocus()},e.ctorParameters=function(){return[{type:a.KnoraApiConnection,decorators:[{type:o.Inject,args:[l.KnoraApiConnectionToken]}]},{type:t.Overlay},{type:i.Router},{type:o.ViewContainerRef}]},P([o.Input(),F("design:type",String)],e.prototype,"route",void 0),P([o.Input(),F("design:type",Boolean)],e.prototype,"projectfilter",void 0),P([o.Input(),F("design:type",String)],e.prototype,"filterbyproject",void 0),P([o.Input(),F("design:type",Boolean)],e.prototype,"show",void 0),P([o.Output(),F("design:type",Object)],e.prototype,"showState",void 0),P([o.ViewChild("fulltextSearchPanel",{static:!1}),F("design:type",o.ElementRef)],e.prototype,"searchPanel",void 0),P([o.ViewChild("fulltextSearchInput",{static:!1}),F("design:type",o.ElementRef)],e.prototype,"searchInput",void 0),P([o.ViewChild("fulltextSearchMenu",{static:!1}),F("design:type",o.TemplateRef)],e.prototype,"searchMenu",void 0),P([o.ViewChild("btnToSelectProject",{static:!1}),F("design:type",n.MatMenuTrigger)],e.prototype,"selectProject",void 0),e=P([o.Component({selector:"kui-fulltext-search",template:'\x3c!-- full-text search panel --\x3e\n<div class="kui-fulltext-search-panel" [class.active]="searchPanelFocus" [class.with-project-filter]="projectfilter"\n #fulltextSearchPanel cdkOverlayOrigin>\n\n \x3c!-- DESKTOP / TABLET VERSION --\x3e\n <div class="kui-project-filter" *ngIf="projectfilter">\n <button mat-button class="kui-project-filter-button" [matMenuTriggerFor]="selectProject"\n #btnToSelectProject="matMenuTrigger" isIconButton>\n <p class="mat-caption placeholder">Filter by project</p>\n <p class="label">{{projectLabel}}</p>\n <mat-icon class="icon" matSuffix>keyboard_arrow_down</mat-icon>\n </button>\n <mat-menu #selectProject="matMenu">\n <div class="kui-project-filter-menu">\n <button mat-menu-item class="center"\n (click)="setProject();changeFocus()">{{defaultProjectLabel}}</button>\n <mat-divider></mat-divider>\n <span *ngFor="let project of projects | kuiSortBy: \'shortname\'">\n <button mat-menu-item *ngIf="!doNotDisplay.includes(project.id)"\n (click)="setProject(project);changeFocus()" [matTooltip]="project.longname"\n [matTooltipPosition]="\'after\'">{{project.shortname}}</button>\n </span>\n </div>\n </mat-menu>\n </div>\n\n <div class="kui-fulltext-search" [class.with-project-filter]="projectfilter">\n <div class="kui-fulltext-search-field">\n <input #fulltextSearchInput class="kui-fulltext-search-input" type="search" [(ngModel)]="searchQuery"\n name="search" minlength="3" autocomplete="off" [placeholder]="\'Search\'" (keyup.esc)="resetSearch()"\n (keyup.enter)="doSearch()" (click)="setFocus()">\n </div>\n <button class="kui-fulltext-search-button suffix" (click)="doSearch()" type="submit">\n <mat-icon>search</mat-icon>\n </button>\n </div>\n\n \x3c!-- PHONE VERSION *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** --\x3e\n <div class="kui-project-filter-mobile" *ngIf="projectfilter">\n <button mat-stroked-button class="kui-project-filter-button kui-project-filter-button-mobile"\n [matMenuTriggerFor]="selectProject" #btnToSelectProject="matMenuTrigger" isIconButton>\n <p class="mat-caption placeholder">Filter by project</p>\n <p class="label">{{projectLabel}}</p>\n <mat-icon class="icon" matSuffix>keyboard_arrow_down</mat-icon>\n </button>\n <mat-menu #selectProject="matMenu">\n <div class="kui-project-filter-menu-mobile">\n <button mat-menu-item class="center"\n (click)="setProject();changeFocus()">{{defaultProjectLabel}}</button>\n <mat-divider></mat-divider>\n <span *ngFor="let project of projects | kuiSortBy: \'shortname\'">\n <button mat-menu-item *ngIf="!doNotDisplay.includes(project.id)"\n (click)="setProject(project);changeFocus()" [matTooltip]="project.longname"\n [matTooltipPosition]="\'after\'">{{project.shortname}}</button>\n </span>\n </div>\n </mat-menu>\n \x3c!-- <mat-form-field class="kui-project-filter-select-mobile">\n <mat-select [(ngModel)]="All projects">\n <mat-option *ngFor="let project of projects | kuiSortBy: \'shortname\'" [value]="project.shortname">\n {{project.shortname}}\n </mat-option>\n </mat-select>\n </mat-form-field> --\x3e\n </div>\n\n <div class="kui-fulltext-search-mobile" [class.with-project-filter]="projectfilter">\n <div class="kui-fulltext-search-field-mobile">\n <input #fulltextSearchInput class="kui-fulltext-search-input-mobile" type="search" [(ngModel)]="searchQuery"\n name="search" minlength="3" autocomplete="off" [placeholder]="\'Search\'" (keyup.esc)="resetSearch()"\n (keyup.enter)="doSearch()" (click)="setFocus()">\n </div>\n <button mat-stroked-button class="kui-fulltext-search-button-mobile suffix-mobile" (click)="doSearch()"\n type="submit">\n Search\n </button>\n </div>\n \x3c!-- *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** --\x3e\n\n</div>\n\n\x3c!-- full-text search menu - only for desktop/tablet versions --\x3e\n<ng-template #fulltextSearchMenu>\n\n <div class="kui-search-menu" [class.with-project-filter]="projectfilter">\n <div class="kui-menu-content">\n <mat-list class="kui-previous-search-list">\n <div *ngFor="let item of prevSearch | kuiReverse; let i=index">\n <mat-list-item *ngIf="i<10">\n <h4 mat-line (click)="doPrevSearch(item)" class="kui-previous-search-item">\n <div class="kui-project-filter-label" [class.not-empty]="item.projectIri"\n *ngIf="projectfilter && !error && projects?.length > 0">\n <span *ngIf="item.projectIri">{{item.projectLabel}}</span>\n </div>\n <div class="kui-previous-search-query" [class.fix-width]="projectfilter">\n {{item.query}}\n </div>\n </h4>\n <button mat-icon-button (click)="resetPrevSearch(item)">\n <mat-icon class="mat-list-close-icon" aria-label="close">close</mat-icon>\n </button>\n </mat-list-item>\n </div>\n </mat-list>\n </div>\n\n <div class="kui-menu-action" *ngIf="prevSearch">\n <mat-divider></mat-divider>\n <button mat-button color="primary" class="center" (click)="resetPrevSearch()">Clear list\n </button>\n </div>\n </div>\n\n</ng-template>\n',styles:["input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration,input[type=search]::-webkit-search-results-button,input[type=search]::-webkit-search-results-decoration{display:none}input[type=search]{-moz-appearance:none;-webkit-appearance:none}.center{text-align:center}.kui-fulltext-search-panel{border-radius:4px;display:-webkit-box;display:flex;height:40px;position:relative;width:480px;z-index:100;background-color:#f9f9f9}.kui-fulltext-search-panel.active{box-shadow:0 1px 3px rgba(0,0,0,.5)}.kui-fulltext-search-panel.with-project-filter{width:calc(480px + 160px)}.kui-fulltext-search-panel .kui-project-filter-button{font-size:inherit;overflow:hidden;text-overflow:ellipsis;width:160px;margin:1px;border-radius:4px 0 0 4px}.kui-fulltext-search-panel .kui-fulltext-search{background-color:#f9f9f9;border-radius:4px;display:-webkit-inline-box;display:inline-flex;position:relative;z-index:10}.kui-fulltext-search-panel .kui-fulltext-search.with-project-filter{width:calc(480px + 160px);border-top-left-radius:0;border-bottom-left-radius:0}.kui-fulltext-search-panel .kui-fulltext-search .kui-fulltext-search-field{-webkit-box-flex:1;flex:1;width:calc(480px - 40px);margin:1px}.kui-fulltext-search-panel .kui-fulltext-search .kui-fulltext-search-field .kui-fulltext-search-input{border-style:none;font-size:14pt;height:38px;position:absolute;padding-left:12px;width:calc(100% - 40px)}.kui-fulltext-search-panel .kui-fulltext-search .kui-fulltext-search-field .kui-fulltext-search-input.with-project-filter{width:calc(100% - 40px - 160px)}.kui-fulltext-search-panel .kui-fulltext-search .kui-fulltext-search-field .kui-fulltext-search-input:active,.kui-fulltext-search-panel .kui-fulltext-search .kui-fulltext-search-field .kui-fulltext-search-input:focus{outline:0}.kui-fulltext-search-panel .kui-fulltext-search .kui-fulltext-search-button{background-color:#fff}.kui-fulltext-search-panel .kui-fulltext-search .suffix{margin:1px 0 1px -3px;border-radius:0 4px 4px 0}.kui-fulltext-search-panel .kui-fulltext-search .prefix{margin:1px 0 1px 3px;border-radius:4px 0 0 4px}.kui-fulltext-search-panel .kui-fulltext-search .prefix,.kui-fulltext-search-panel .kui-fulltext-search .suffix{border-style:none;color:rgba(41,41,41,.4);cursor:pointer;height:38px;outline:0;position:relative;width:39px}.kui-fulltext-search-panel .kui-fulltext-search .prefix.disabled,.kui-fulltext-search-panel .kui-fulltext-search .suffix.disabled{cursor:auto}.kui-fulltext-search-panel .kui-fulltext-search .prefix:active,.kui-fulltext-search-panel .kui-fulltext-search .suffix:active{color:#515151}.kui-search-menu{height:100%}.kui-search-menu .kui-menu-content{display:block}.kui-search-menu .kui-menu-content .mat-list{padding-bottom:8px}.kui-search-menu .kui-menu-content .mat-list .kui-previous-search-query{overflow:hidden;text-overflow:ellipsis}.kui-search-menu .kui-menu-content .mat-list .kui-previous-search-query.fix-width{width:calc(100% - 160px)}.kui-project-filter-button{height:38px!important;display:block;text-align:left}.kui-project-filter-button .placeholder{margin:0;padding:0;font-size:x-small}.kui-project-filter-button .icon,.kui-project-filter-button .label{display:inline;position:relative}.kui-project-filter-button .label{top:-12px;font-size:smaller;text-transform:capitalize}.kui-project-filter-button .icon{top:-6px;float:right}.kui-project-filter-button.kui-project-filter-button-mobile{height:100%!important}.kui-project-filter-button.kui-project-filter-button-mobile .icon,.kui-project-filter-button.kui-project-filter-button-mobile .label{top:0;font-size:inherit}@media (min-width:576px){.kui-fulltext-search-mobile,.kui-fulltext-search-mobile.with-project-filter,.kui-project-filter-mobile{display:none}}@media (max-width:576px){.kui-fulltext-search,.kui-project-filter{display:none}.kui-fulltext-search.with-project-filter{display:none!important}.kui-search-menu{display:none}.kui-search-menu.with-project-filter{display:none!important}.kui-fulltext-search-panel{height:100vh!important;background-color:rgba(220,218,218,.9);position:relative;width:100%!important;z-index:100;display:block;border-radius:0}.kui-fulltext-search-panel.with-project-filter{width:100%!important}.kui-fulltext-search-panel .kui-project-filter-mobile{height:54px;margin:0 2% 5%;padding-top:3%}.kui-fulltext-search-panel .kui-project-filter-mobile.mat-stroked-button{padding:0}.kui-fulltext-search-panel .kui-project-filter-mobile .kui-project-filter-button-mobile{width:calc(100% - 16px);margin:8px;height:100%;background-color:#b8b8b8;cursor:pointer}.kui-fulltext-search-panel .kui-project-filter-mobile .kui-project-filter-menu-mobile{width:calc(100% - 32px)!important;max-width:100%;margin:0 8px;height:100%!important}.kui-fulltext-search-panel .kui-fulltext-search-mobile{display:-webkit-box;display:flex;height:64px;margin-top:5%;margin-right:4%;margin-left:4%}.kui-fulltext-search-panel .kui-fulltext-search-mobile .kui-fulltext-search-field-mobile{width:80%;margin-right:2px}.kui-fulltext-search-panel .kui-fulltext-search-mobile .kui-fulltext-search-field-mobile .kui-fulltext-search-input-mobile{width:72%;height:64px;font-size:14pt;position:absolute;padding-left:12px;border-radius:5px;border:.6px solid #b8b8b8}.kui-fulltext-search-panel .kui-fulltext-search-mobile .kui-fulltext-search-field-mobile .kui-fulltext-search-input-mobile:active,.kui-fulltext-search-panel .kui-fulltext-search-mobile .kui-fulltext-search-field-mobile .kui-fulltext-search-input-mobile:focus{outline:0}.kui-fulltext-search-panel .kui-fulltext-search-mobile .kui-fulltext-search-button-mobile{background-color:#fff;width:20%;height:64px;padding:0;margin-left:2px;border-radius:5px;border:.8px solid #b8b8b8}.kui-fulltext-search-panel .kui-fulltext-search-mobile .suffix{margin:1px 0 1px -3px;border-radius:0 4px 4px 0}.kui-fulltext-search-panel .kui-fulltext-search-mobile .prefix,.kui-fulltext-search-panel .kui-fulltext-search-mobile .suffix{border-style:none;color:rgba(41,41,41,.4);cursor:pointer;height:100%;outline:0;position:relative;width:20%}.kui-fulltext-search-panel .kui-fulltext-search-mobile .prefix.disabled,.kui-fulltext-search-panel .kui-fulltext-search-mobile .suffix.disabled{cursor:auto}.kui-fulltext-search-panel .kui-fulltext-search-mobile .prefix:active,.kui-fulltext-search-panel .kui-fulltext-search-mobile .suffix:active{color:#515151}::ng-deep .cdk-overlay-pane .mat-menu-panel{box-shadow:none}::ng-deep .cdk-overlay-pane .mat-select-panel-wrap{margin-top:20%}::ng-deep .cdk-overlay-pane .mat-select-panel-wrap .mat-select-panel{max-height:100%!important}}"]}),V(0,o.Inject(l.KnoraApiConnectionToken)),F("design:paramtypes",[a.KnoraApiConnection,t.Overlay,i.Router,o.ViewContainerRef])],e)}(),M=function(){function e(e,t){this._overlay=e,this._viewContainerRef=t,this.route="/search",this.projectfilter=!1,this.advanced=!1,this.expert=!1}return e.prototype.openPanelWithBackdrop=function(e){var o=this;this.showAdvanced="advanced"===e;var n=new t.OverlayConfig({hasBackdrop:!0,backdropClass:"cdk-overlay-transparent-backdrop",positionStrategy:this.getOverlayPosition(),scrollStrategy:this._overlay.scrollStrategies.block()});this.overlayRef=this._overlay.create(n),this.overlayRef.attach(new r.TemplatePortal(this.searchMenu,this._viewContainerRef)),this.overlayRef.backdropClick().subscribe((function(){o.overlayRef.detach()}))},e.prototype.getOverlayPosition=function(){var e=[new t.ConnectionPositionPair({originX:"start",originY:"bottom"},{overlayX:"start",overlayY:"top"}),new t.ConnectionPositionPair({originX:"start",originY:"top"},{overlayX:"start",overlayY:"bottom"})];return this._overlay.position().flexibleConnectedTo(this.searchPanel).withPositions(e).withLockedPosition(!1)},e.prototype.closeMenu=function(){this.overlayRef.detach()},e.ctorParameters=function(){return[{type:t.Overlay},{type:o.ViewContainerRef}]},P([o.Input(),F("design:type",String)],e.prototype,"route",void 0),P([o.Input(),F("design:type",Boolean)],e.prototype,"projectfilter",void 0),P([o.Input(),F("design:type",String)],e.prototype,"filterbyproject",void 0),P([o.Input(),F("design:type",Boolean)],e.prototype,"advanced",void 0),P([o.Input(),F("design:type",Boolean)],e.prototype,"expert",void 0),P([o.ViewChild("fullSearchPanel",{static:!1}),F("design:type",o.ElementRef)],e.prototype,"searchPanel",void 0),P([o.ViewChild("searchMenu",{static:!1}),F("design:type",o.TemplateRef)],e.prototype,"searchMenu",void 0),e=P([o.Component({selector:"kui-search-panel",template:'<div class="kui-search-panel" #fullSearchPanel cdkOverlayOrigin>\n\n \x3c!-- DESKTOP VERSION --\x3e\n <kui-fulltext-search class="kui-fulltext-search" [route]="route" [projectfilter]="projectfilter"\n [filterbyproject]="filterbyproject">\n </kui-fulltext-search>\n\n \x3c!-- advanced search button: if advanced === true --\x3e\n <button mat-button *ngIf="advanced && !expert" color="primary"\n (click)="openPanelWithBackdrop(\'advanced\')">advanced</button>\n\n \x3c!-- expert search button: if expert === true --\x3e\n <button mat-button *ngIf="!advanced && expert" color="primary"\n (click)="openPanelWithBackdrop(\'expert\')">expert</button>\n\n \x3c!-- button to select advanced or expert search: if advanced AND expert === true; open menu to select --\x3e\n <button mat-button *ngIf="advanced && expert" [matMenuTriggerFor]="selectSearch">\n <mat-icon>filter_list</mat-icon>\n </button>\n <mat-menu #selectSearch="matMenu">\n <button mat-menu-item (click)="openPanelWithBackdrop(\'advanced\')">\n <span>Advanced search</span>\n </button>\n <button mat-menu-item (click)="openPanelWithBackdrop(\'expert\')">\n <span>Expert search</span>\n </button>\n </mat-menu>\n\n</div>\n\n\x3c!-- full-text search menu --\x3e\n<ng-template #searchMenu>\n <div class="kui-search-menu with-extended-search" [class.with-project-filter]="projectfilter">\n <div class="kui-menu-header">\n <span class="kui-menu-title">\n <h4 *ngIf="showAdvanced">Advanced search</h4>\n <h4 *ngIf="!showAdvanced">Expert search</h4>\n </span>\n <span class="fill-remaining-space"></span>\n <span class="kui-menu-close">\n <button mat-icon-button (click)="closeMenu()">\n <mat-icon>close</mat-icon>\n </button>\n </span>\n </div>\n <div class="kui-menu-content">\n <kui-extended-search *ngIf="showAdvanced" [route]="route" (toggleExtendedSearchForm)="closeMenu()">\n </kui-extended-search>\n <kui-expert-search *ngIf="!showAdvanced" [route]="route" (toggleExpertSearchForm)="closeMenu()">\n </kui-expert-search>\n </div>\n </div>\n</ng-template>\n',styles:[".advanced-btn{margin-left:10px}.kui-search-panel{display:-webkit-box;display:flex;position:relative;z-index:100}.extended-search-box{margin:12px}@media (max-width:576px){.kui-fulltext-search{height:100%;width:100%!important}}"]}),F("design:paramtypes",[t.Overlay,o.ViewContainerRef])],e)}(),A=Promise.resolve(null),B=function(){function e(e){this.fb=e,this.resourceClassSelectedEvent=new o.EventEmitter}return Object.defineProperty(e.prototype,"resourceClasses",{get:function(){return this._resourceClasses},set:function(e){this.resourceClassSelected=void 0,this._resourceClasses=e},enumerable:!0,configurable:!0}),e.prototype.getResourceClassSelected=function(){return void 0!==this.resourceClassSelected&&null!==this.resourceClassSelected&&this.resourceClassSelected},e.prototype.initForm=function(){var e=this;this.form=this.fb.group({resourceClass:[null]}),this.form.valueChanges.subscribe((function(t){e.resourceClassSelected=t.resourceClass,e.resourceClassSelectedEvent.emit(e.resourceClassSelected)}))},e.prototype.ngOnInit=function(){this.initForm(),this.formGroup.addControl("resourceClass",this.form)},e.prototype.ngOnChanges=function(){var e=this;void 0!==this.form&&A.then((function(){e.formGroup.removeControl("resourceClass"),e.initForm(),e.formGroup.addControl("resourceClass",e.form)}))},e.ctorParameters=function(){return[{type:s.FormBuilder,decorators:[{type:o.Inject,args:[s.FormBuilder]}]}]},P([o.Input(),F("design:type",s.FormGroup)],e.prototype,"formGroup",void 0),P([o.Input(),F("design:type",Array),F("design:paramtypes",[Array])],e.prototype,"resourceClasses",null),P([o.Output(),F("design:type",Object)],e.prototype,"resourceClassSelectedEvent",void 0),e=P([o.Component({selector:"kui-select-resource-class",template:'<mat-form-field *ngIf="resourceClasses.length > 0" class="large-field">\n <mat-select placeholder="Select a Resource Class (optional)" [formControl]="form.controls[\'resourceClass\']">\n <mat-option [value]="null">no selection</mat-option>\n \x3c!-- undo selection of a resource class --\x3e\n <mat-option *ngFor="let resourceClass of resourceClasses" [value]="resourceClass.id">{{ resourceClass.label }}\n </mat-option>\n </mat-select>\n</mat-form-field>\n',styles:[""]}),V(0,o.Inject(s.FormBuilder)),F("design:paramtypes",[s.FormBuilder])],e)}(),E=function(){function e(e,t,r,n,i,l){this.fb=e,this.knoraApiConnection=t,this._route=r,this._router=n,this._cacheService=i,this._gravSearchService=l,this.toggleExtendedSearchForm=new o.EventEmitter,this.gravsearch=new o.EventEmitter,this.ontologies=[],this.activeProperties=[],this.resourceClasses=[],this.result=[new a.ReadResource],this.formValid=!1}return e.prototype.ngOnInit=function(){var e=this;this.form=this.fb.group({}),this.form.statusChanges.subscribe((function(t){e.formValid=e.validateForm()})),this.initializeOntologies()},e.prototype.addProperty=function(){this.activeProperties.push(!0)},e.prototype.removeProperty=function(){this.activeProperties.splice(-1,1)},e.prototype.initializeOntologies=function(){var e=this;this.knoraApiConnection.v2.onto.getOntologiesMetadata().subscribe((function(t){e.ontologies=t.ontologies}),(function(e){console.error(e)}))},e.prototype.getResourceClassesAndPropertiesForOntology=function(e){var t=this;this.activeResourceClass=void 0,this.activeProperties=[],this.activeOntology=e,this._cacheService.getEntityDefinitionsForOntologies([e]).subscribe((function(e){t.resourceClasses=e.getResourceClassesAsArray(!0),t.properties=e.getProperties()}))},e.prototype.getPropertiesForResourceClass=function(e){var t=this;this.activeProperties=[],null===e?this.getResourceClassesAndPropertiesForOntology(this.activeOntology):this._cacheService.getResourceClassDefinitions([e]).subscribe((function(r){t.properties=r.getProperties(),t.activeResourceClass=r.getResourceClasses()[e]}))},e.prototype.validateForm=function(){return this.form.valid&&(this.propertyComponents.length>0||void 0!==this.resourceClassComponent&&!1!==this.resourceClassComponent.getResourceClassSelected())},e.prototype.resetForm=function(){void 0!==this.activeOntology&&this.getResourceClassesAndPropertiesForOntology(this.activeOntology)},e.prototype.submit=function(){if(this.formValid){var e,t=this.resourceClassComponent.getResourceClassSelected();!1!==t&&(e=t);var r=this.propertyComponents.map((function(e){return e.getPropertySelectedWithValue()})),o=this._gravSearchService.createGravsearchQuery(r,e,0);this.route?this._router.navigate([this.route+"/extended/",o],{relativeTo:this._route}):this.gravsearch.emit(o),this.toggleExtendedSearchForm.emit(!0)}},e.ctorParameters=function(){return[{type:s.FormBuilder,decorators:[{type:o.Inject,args:[s.FormBuilder]}]},{type:a.KnoraApiConnection,decorators:[{type:o.Inject,args:[l.KnoraApiConnectionToken]}]},{type:i.ActivatedRoute},{type:i.Router},{type:l.OntologyCacheService},{type:l.GravsearchGenerationService}]},P([o.Input(),F("design:type",Object)],e.prototype,"route",void 0),P([o.Output(),F("design:type",Object)],e.prototype,"toggleExtendedSearchForm",void 0),P([o.Output(),F("design:type",Object)],e.prototype,"gravsearch",void 0),P([o.ViewChild("resourceClass",{static:!1}),F("design:type",B)],e.prototype,"resourceClassComponent",void 0),P([o.ViewChildren("property"),F("design:type",o.QueryList)],e.prototype,"propertyComponents",void 0),e=P([o.Component({selector:"kui-extended-search",template:'<form [formGroup]="form" (ngSubmit)="submit()" class="kui-form-content">\n\n <div>\n <kui-select-ontology *ngIf="ontologies.length > 0" [formGroup]="form" [ontologies]="ontologies"\n (ontologySelected)="getResourceClassesAndPropertiesForOntology($event)"></kui-select-ontology>\n </div>\n\n <div class="select-resource-class" *ngIf="resourceClasses?.length > 0">\n <kui-select-resource-class #resourceClass [formGroup]="form" [resourceClasses]="resourceClasses"\n (resourceClassSelectedEvent)="getPropertiesForResourceClass($event)">\n </kui-select-resource-class>\n </div>\n\n <div class="select-property" *ngIf="properties !== undefined">\n <div *ngFor="let prop of activeProperties; let i = index">\n\n <kui-select-property #property [activeResourceClass]="activeResourceClass" [formGroup]="form" [index]="i"\n [properties]="properties"></kui-select-property>\n\n </div>\n </div>\n\n\n <div class="select-property buttons">\n <button mat-mini-fab class="property-button add-property-button" color="primary" type="button"\n (click)="addProperty()" [disabled]="activeOntology === undefined || activeProperties.length >= 4">\n <mat-icon aria-label="add a property">add</mat-icon>\n </button>\n\n <button mat-mini-fab class="property-button remove-property-button" color="primary" type="button"\n (click)="removeProperty()" [disabled]="activeProperties.length == 0">\n <mat-icon aria-label="remove property">remove</mat-icon>\n </button>\n </div>\n\n \x3c!-- <div>\n <button mat-icon-button type="button" (click)="resetForm()" [disabled]="this.activeOntology === undefined">\n <mat-icon aria-label="reset query form">clear</mat-icon>\n </button>\n\n <button mat-icon-button type="submit" [disabled]="!formValid">\n <mat-icon aria-label="submit query">send</mat-icon>\n </button>\n </div> --\x3e\n\n <div class="kui-form-action">\n <button class="reset" mat-button type="button" (click)="resetForm()" [disabled]="this.activeOntology === undefined">\n Reset\n </button>\n <span class="fill-remaining-space"></span>\n <button class="extended-search-button" mat-raised-button color="primary" type="submit" [disabled]="!formValid">\n Search\n </button>\n </div>\n\n</form>\n',styles:[".select-resource-class{margin-left:8px}.select-property{margin-left:16px}.select-property .property-button{margin:0 12px 64px 0}"]}),V(0,o.Inject(s.FormBuilder)),V(1,o.Inject(l.KnoraApiConnectionToken)),F("design:paramtypes",[s.FormBuilder,a.KnoraApiConnection,i.ActivatedRoute,i.Router,l.OntologyCacheService,l.GravsearchGenerationService])],e)}(),T=function(){function e(e,t,r,n,i){this.knoraApiConfig=e,this.fb=t,this._route=r,this._router=n,this._searchParamsService=i,this.gravsearch=new o.EventEmitter,this.toggleExpertSearchForm=new o.EventEmitter}return e.prototype.ngOnInit=function(){this.initForm()},e.prototype.initForm=function(){this.expertSearchForm=this.fb.group({gravquery:["\nPREFIX knora-api: <http://api.knora.org/ontology/knora-api/simple/v2#>\nPREFIX incunabula: <"+this.knoraApiConfig.apiUrl+"/ontology/0803/incunabula/simple/v2#>\n\nCONSTRUCT {\n ?book knora-api:isMainResource true .\n ?book incunabula:title ?title .\n\n} WHERE {\n ?book a incunabula:book .\n ?book incunabula:title ?title .\n}\n",s.Validators.required]})},e.prototype.submitQuery=function(){var e=this.generateGravsearch(0);this.route?this._router.navigate([this.route+"/extended/",e],{relativeTo:this._route}):this.gravsearch.emit(e),this.toggleExpertSearchForm.emit(!0)},e.prototype.generateGravsearch=function(e){void 0===e&&(e=0);var t=this.expertSearchForm.controls.gravquery.value,r="\n OFFSET "+e+"\n ";return 0===e&&this._searchParamsService.changeSearchParamsMsg(new l.ExtendedSearchParams((function(e){return t+("\n OFFSET "+e+"\n ")}))),t+r},e.prototype.resetForm=function(){this.initForm()},e.ctorParameters=function(){return[{type:a.KnoraApiConfig,decorators:[{type:o.Inject,args:[l.KnoraApiConfigToken]}]},{type:s.FormBuilder},{type:i.ActivatedRoute},{type:i.Router},{type:l.SearchParamsService}]},P([o.Input(),F("design:type",Object)],e.prototype,"route",void 0),P([o.Output(),F("design:type",Object)],e.prototype,"gravsearch",void 0),P([o.Output(),F("design:type",Object)],e.prototype,"toggleExpertSearchForm",void 0),e=P([o.Component({selector:"kui-expert-search",template:'<div class="expert-search-container">\n \x3c!-- The integration in container like the accordeon expansion panel should be handled on app side\n <mat-expansion-panel [expanded]="true">\n <mat-expansion-panel-header>\n <mat-panel-title>\n Expert search\n </mat-panel-title>\n <mat-panel-description> </mat-panel-description>\n </mat-expansion-panel-header>\n --\x3e\n <form [formGroup]="expertSearchForm" class="expert-search-form kui-form-content">\n <mat-form-field class="textarea-field large-field">\n <textarea matInput formControlName="gravquery" matTextareaAutosize matAutosizeMinRows="12" matAutosizeMaxRows="24"\n placeholder="Write your gravsearch query"></textarea>\n </mat-form-field>\n\n <div class="kui-form-action">\n <button class="reset" mat-button type="button" (click)="resetForm()">\n Reset\n </button>\n <span class="fill-remaining-space"></span>\n <button mat-raised-button color="primary" type="submit" [disabled]="!expertSearchForm.valid"\n (click)="submitQuery()">\n Search\n </button>\n </div>\n\n </form>\n\n \x3c!-- </mat-expansion-panel> --\x3e\n</div>\n',styles:['.expert-search-container .expert-search-form{min-width:150px;width:100%;margin:auto}.expert-search-container .expert-search-form .textarea-field{width:100%;display:block;margin-bottom:24px}.expert-search-container .expert-search-form .form-panel{width:100%}.mat-input-element{font-family:"Courier New",Courier,monospace}.form-content{margin:24px auto;width:472px}.form-content .large-field{min-width:472px}']}),V(0,o.Inject(l.KnoraApiConfigToken)),F("design:paramtypes",[a.KnoraApiConfig,s.FormBuilder,i.ActivatedRoute,i.Router,l.SearchParamsService])],e)}(),G=function(){function e(e){this.fb=e,this.ontologySelected=new o.EventEmitter}return e.prototype.ngOnInit=function(){var e=this;this.form=this.fb.group({ontology:[null,s.Validators.required]}),this.form.valueChanges.subscribe((function(t){e.ontologySelected.emit(t.ontology)})),this.formGroup.addControl("ontology",this.form)},e.ctorParameters=function(){return[{type:s.FormBuilder,decorators:[{type:o.Inject,args:[s.FormBuilder]}]}]},P([o.Input(),F("design:type",s.FormGroup)],e.prototype,"formGroup",void 0),P([o.Input(),F("design:type",Array)],e.prototype,"ontologies",void 0),P([o.Output(),F("design:type",Object)],e.prototype,"ontologySelected",void 0),e=P([o.Component({selector:"kui-select-ontology",template:'<mat-form-field *ngIf="ontologies.length > 0" class="large-field">\n <mat-select placeholder="Select an Ontology" [formControl]="form.controls[\'ontology\']">\n <mat-option *ngFor="let onto of ontologies" [value]="onto.id">{{ onto.label }}</mat-option>\n </mat-select>\n</mat-form-field>\n',styles:[""]}),V(0,o.Inject(s.FormBuilder)),F("design:paramtypes",[s.FormBuilder])],e)}(),_=Promise.resolve(null),q=function(){function e(e){this.fb=e,this.Constants=a.Constants,this.comparisonOperators=[]}return Object.defineProperty(e.prototype,"property",{get:function(){return this._property},set:function(e){this.comparisonOperatorSelected=void 0,this._property=e,this.resetComparisonOperators()},enumerable:!0,configurable:!0}),e.prototype.resetComparisonOperators=function(){switch(this._property.isLinkProperty?this.propertyValueType=a.Constants.Resource:this.propertyValueType=this._property.objectType,this.propertyValueType){case a.Constants.TextValue:this.comparisonOperators=[new l.Like,new l.Match,new l.Equals,new l.NotEquals,new l.Exists];break;case a.Constants.BooleanValue:case a.Constants.Resource:case a.Constants.UriValue:this.comparisonOperators=[new l.Equals,new l.NotEquals,new l.Exists];break;case a.Constants.IntValue:case a.Constants.DecimalValue:case a.Constants.DateValue:this.comparisonOperators=[new l.Equals,new l.NotEquals,new l.LessThan,new l.LessThanEquals,new l.GreaterThan,new l.GreaterThanEquals,new l.Exists];break;case a.Constants.ListValue:this.comparisonOperators=[new l.Equals,new l.NotEquals,new l.Exists];break;case a.Constants.GeomValue:case a.Constants.FileValue:case a.Constants.AudioFileValue:case a.Constants.StillImageFileValue:case a.Constants.DDDFileValue:case a.Constants.MovingImageFileValue:case a.Constants.TextFileValue:case a.Constants.ColorValue:case a.Constants.IntervalValue:this.comparisonOperators=[new l.Exists];break;default:console.log("ERROR: Unsupported value type "+this._property.objectType)}},e.prototype.ngOnChanges=function(){var e=this;this.form=this.fb.group({comparisonOperator:[null,s.Validators.required]}),this.form.valueChanges.subscribe((function(t){e.comparisonOperatorSelected=t.comparisonOperator})),_.then((function(){e.formGroup.removeControl("comparisonOperator"),e.formGroup.addControl("comparisonOperator",e.form)}))},e.prototype.getComparisonOperatorAndValueLiteralForProperty=function(){var e;return"Exists"!==this.comparisonOperatorSelected.getClassName()&&(e=this.propertyValueComponent.getValue()),new l.ComparisonOperatorAndValue(this.comparisonOperatorSelected,e)},e.ctorParameters=function(){return[{type:s.FormBuilder,decorators:[{type:o.Inject,args:[s.FormBuilder]}]}]},P([o.Input(),F("design:type",s.FormGroup)],e.prototype,"formGroup",void 0),P([o.ViewChild("propertyValue",{static:!1}),F("design:type",Object)],e.prototype,"propertyValueComponent",void 0),P([o.Input(),F("design:type",l.Property),F("design:paramtypes",[l.Property])],e.prototype,"property",null),e=P([o.Component({selector:"kui-specify-property-value",template:'<mat-form-field class="search-operator-field small-field" *ngIf="comparisonOperators?.length > 0">\n <mat-select placeholder="Comparison Operator" [formControl]="form.controls[\'comparisonOperator\']">\n <mat-option *ngFor="let compOp of comparisonOperators" [value]="compOp">{{ compOp.label }}</mat-option>\n </mat-select>\n</mat-form-field>\n\n\x3c!-- select apt component for value specification using a switch case statement--\x3e\n<span\n *ngIf="comparisonOperatorSelected !== undefined && comparisonOperatorSelected !== null && comparisonOperatorSelected.getClassName() != \'Exists\'"\n [ngSwitch]="propertyValueType">\n <boolean-value #propertyValue [formGroup]="form" *ngSwitchCase="Constants.BooleanValue"></boolean-value>\n <date-value #propertyValue [formGroup]="form" *ngSwitchCase="Constants.DateValue"></date-value>\n <decimal-value #propertyValue [formGroup]="form" *ngSwitchCase="Constants.DecimalValue"></decimal-value>\n <integer-value #propertyValue [formGroup]="form" *ngSwitchCase="Constants.IntValue"></integer-value>\n <link-value #propertyValue [formGroup]="form" [restrictResourceClass]="property.objectType"\n *ngSwitchCase="Constants.Resource"></link-value>\n <text-value #propertyValue [formGroup]="form" *ngSwitchCase="Constants.TextValue"></text-value>\n <uri-value #propertyValue [formGroup]="form" *ngSwitchCase="Constants.UriValue"></uri-value>\n <list-value #propertyValue [formGroup]="form" [property]="property" *ngSwitchCase="Constants.ListValue">\n </list-value>\n\n \x3c!-- TODO: Resource: handle linking properties with target class restriction: access property member to get objectClass via property() getter method --\x3e\n <span *ngSwitchDefault="">Not supported {{propertyValueType}}</span>\n</span>\n',styles:[".search-operator-field{margin-right:8px}"]}),V(0,o.Inject(s.FormBuilder)),F("design:paramtypes",[s.FormBuilder])],e)}(),D=Promise.resolve(null),N=function(){function e(e){this.fb=e}return Object.defineProperty(e.prototype,"properties",{get:function(){return this._properties},set:function(e){this.propertySelected=void 0,this._properties=e,this.updatePropertiesArray()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"activeResourceClass",{set:function(e){this._activeResourceClass=e},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){var e=this;this.form=this.fb.group({property:[null,s.Validators.required],isSortCriterion:[!1,s.Validators.required]}),this.form.valueChanges.subscribe((function(t){var r=t.property;e.propertySelected=e._properties[r]})),D.then((function(){e.propIndex="property"+e.index,e.formGroup.addControl(e.propIndex,e.form)}))},e.prototype.ngOnDestroy=function(){var e=this;D.then((function(){e.formGroup.removeControl(e.propIndex)}))},e.prototype.sortCriterion=function(){var e=this;return void 0!==this._activeResourceClass&&void 0!==this.propertySelected&&!this.propertySelected.isLinkProperty&&1===this._activeResourceClass.cardinalities.filter((function(t){return t.property===e.propertySelected.id&&1===t.value&&(t.occurrence===l.CardinalityOccurrence.card||t.occurrence===l.CardinalityOccurrence.maxCard)})).length},e.prototype.updatePropertiesArray=function(){var e=[];for(var t in this._properties)if(this._properties.hasOwnProperty(t)){var r=this._properties[t];r.isEditable&&!r.isLinkValueProperty&&e.push(this._properties[t])}e.sort(l.OntologyInformation.sortFunc),this.propertiesAsArray=e},e.prototype.getPropertySelectedWithValue=function(){var e=this.specifyPropertyValue.getComparisonOperatorAndValueLiteralForProperty(),t=!1;return this.propertySelected.isLinkProperty||(t=this.form.value.isSortCriterion),new l.PropertyWithValue(this.propertySelected,e,t)},e.ctorParameters=function(){return[{type:s.FormBuilder,decorators:[{type:o.Inject,args:[s.FormBuilder]}]}]},P([o.Input(),F("design:type",s.FormGroup)],e.prototype,"formGroup",void 0),P([o.Input(),F("design:type",Number)],e.prototype,"index",void 0),P([o.Input(),F("design:type",l.Properties),F("design:paramtypes",[l.Properties])],e.prototype,"properties",null),P([o.Input(),F("design:type",l.ResourceClass),F("design:paramtypes",[l.ResourceClass])],e.prototype,"activeResourceClass",null),P([o.ViewChild("specifyPropertyValue",{static:!1}),F("design:type",q)],e.prototype,"specifyPropertyValue",void 0),e=P([o.Component({selector:"kui-select-property",template:'<mat-form-field class="search-property-field medium-field" *ngIf="propertiesAsArray?.length > 0">\n <mat-select placeholder="Select Properties" [formControl]="form.controls[\'property\']">\n <mat-option *ngFor="let prop of propertiesAsArray" [value]="prop.id">{{ prop.label }}</mat-option>\n </mat-select>\n</mat-form-field>\n\n<kui-specify-property-value #specifyPropertyValue [formGroup]="form" *ngIf="propertySelected !== undefined"\n [property]="propertySelected"></kui-specify-property-value>\n\n<mat-checkbox matTooltip="Sort criterion" *ngIf="propertySelected !== undefined && sortCriterion()"\n [formControl]="form.controls[\'isSortCriterion\']"></mat-checkbox>\n',styles:[".search-property-field{margin-right:8px}"]}),V(0,o.Inject(s.FormBuilder)),F("design:paramtypes",[s.FormBuilder])],e)}(),L=Promise.resolve(null),K=function(){function e(e){this.fb=e,this.type=a.Constants.BooleanValue}return e.prototype.ngOnInit=function(){var e=this;this.form=this.fb.group({booleanValue:[!1,s.Validators.compose([s.Validators.required])]}),L.then((function(){e.formGroup.addControl("propValue",e.form)}))},e.prototype.ngOnDestroy=function(){var e=this;L.then((function(){e.formGroup.removeControl("propValue")}))},e.prototype.getValue=function(){return new l.ValueLiteral(String(this.form.value.booleanValue),a.Constants.XsdBoolean)},e.ctorParameters=function(){return[{type:s.FormBuilder,decorators:[{type:o.Inject,args:[s.FormBuilder]}]}]},P([o.Input(),F("design:type",s.FormGroup)],e.prototype,"formGroup",void 0),e=P([o.Component({selector:"boolean-value",template:"<mat-checkbox [formControl]=\"form.controls['booleanValue']\"> true</mat-checkbox>\n",styles:[""]}),V(0,o.Inject(s.FormBuilder)),F("design:paramtypes",[s.FormBuilder])],e)}(),z=function(){function e(e,t,r,o){this._calendar=e,this._dateAdapter=t,this._datepickerContent=r,this.fb=o,this.supportedCalendarFormats=["Gregorian","Julian"]}return e.prototype.ngOnInit=function(){var e=this;this._dateAdapter instanceof u.JDNConvertibleCalendarDateAdapter?this.activeFormat=this._dateAdapter.activeCalendar:console.log("date adapter is expected to be an instance of JDNConvertibleCalendarDateAdapter"),this.form=this.fb.group({calendar:[this.activeFormat,s.Validators.required]}),this.form.valueChanges.subscribe((function(t){e.convertDate(t.calendar)}))},e.prototype.convertDate=function(e){if(this._dateAdapter instanceof u.JDNConvertibleCalendarDateAdapter){var t=this._dateAdapter.convertCalendar(this._calendar.activeDate,e);this._calendar.activeDate=t,this._datepickerContent.datepicker.select(t),this._calendar.updateTodaysDate()}else console.log("date adapter is expected to be an instance of JDNConvertibleCalendarDateAdapter")},e.ctorParameters=function(){return[{type:p.MatCalendar,decorators:[{type:o.Host}]},{type:c.DateAdapter},{type:p.MatDatepickerContent},{type:s.FormBuilder,decorators:[{type:o.Inject,args:[s.FormBuilder]}]}]},e=P([o.Component({selector:"kui-calendar-header",template:'\n <mat-select placeholder="Calendar Format" class="kui-calendar-header" [formControl]="form.controls[\'calendar\']">\n <mat-option *ngFor="let cal of supportedCalendarFormats" [value]="cal">{{cal}}</mat-option>\n </mat-select>\n <mat-calendar-header></mat-calendar-header>\n ',styles:[":host .mat-select.kui-calendar-header{margin:16px 16px 0!important;width:calc(100% - 32px)!important}"]}),V(0,o.Host()),V(3,o.Inject(s.FormBuilder)),F("design:paramtypes",[p.MatCalendar,c.DateAdapter,p.MatDatepickerContent,s.FormBuilder])],e)}(),J=Promise.resolve(null),Q=function(){function e(e){this.fb=e,this.type=a.Constants.DateValue,this.headerComponent=z}return e.prototype.ngOnInit=function(){var e=this;this.form=this.fb.group({dateValue:[null,s.Validators.compose([s.Validators.r