LP#1775466 ng-lint updates / trailing whitespace
authorBill Erickson <berickxx@gmail.com>
Fri, 18 May 2018 14:47:09 +0000 (10:47 -0400)
committerBill Erickson <berickxx@gmail.com>
Wed, 6 Jun 2018 20:59:40 +0000 (16:59 -0400)
Signed-off-by: Bill Erickson <berickxx@gmail.com>
55 files changed:
Open-ILS/src/eg2/src/app/core/event.spec.ts
Open-ILS/src/eg2/src/app/share/accesskey/accesskey.directive.ts
Open-ILS/src/eg2/src/app/share/accesskey/accesskey.service.ts
Open-ILS/src/eg2/src/app/share/catalog/catalog-url.service.ts
Open-ILS/src/eg2/src/app/share/catalog/catalog.service.ts
Open-ILS/src/eg2/src/app/share/catalog/search-context.ts
Open-ILS/src/eg2/src/app/share/date-select/date-select.component.ts
Open-ILS/src/eg2/src/app/share/dialog/dialog.component.ts
Open-ILS/src/eg2/src/app/share/dialog/progress.component.ts
Open-ILS/src/eg2/src/app/share/fm-editor/fm-editor.component.ts
Open-ILS/src/eg2/src/app/share/grid/grid-column-width.component.ts
Open-ILS/src/eg2/src/app/share/grid/grid-column.component.ts
Open-ILS/src/eg2/src/app/share/grid/grid-header.component.ts
Open-ILS/src/eg2/src/app/share/grid/grid-toolbar.component.ts
Open-ILS/src/eg2/src/app/share/grid/grid.component.ts
Open-ILS/src/eg2/src/app/share/grid/grid.ts
Open-ILS/src/eg2/src/app/share/org-select/org-select.component.ts
Open-ILS/src/eg2/src/app/share/string/string.component.ts
Open-ILS/src/eg2/src/app/share/string/string.service.ts
Open-ILS/src/eg2/src/app/share/toast/toast.component.ts
Open-ILS/src/eg2/src/app/share/toast/toast.service.ts
Open-ILS/src/eg2/src/app/staff/admin/routing.module.ts
Open-ILS/src/eg2/src/app/staff/admin/server/admin-server-splash.component.ts
Open-ILS/src/eg2/src/app/staff/admin/server/admin-server.module.ts
Open-ILS/src/eg2/src/app/staff/admin/server/config/billing_type.component.ts
Open-ILS/src/eg2/src/app/staff/admin/server/config/config.module.ts
Open-ILS/src/eg2/src/app/staff/admin/server/config/hard_due_date.component.ts
Open-ILS/src/eg2/src/app/staff/admin/server/config/routing.module.ts
Open-ILS/src/eg2/src/app/staff/admin/workstation/workstations/workstations.component.ts
Open-ILS/src/eg2/src/app/staff/catalog/catalog.module.ts
Open-ILS/src/eg2/src/app/staff/catalog/catalog.service.ts
Open-ILS/src/eg2/src/app/staff/catalog/record/copies.component.ts
Open-ILS/src/eg2/src/app/staff/catalog/record/pagination.component.ts
Open-ILS/src/eg2/src/app/staff/catalog/record/record.component.ts
Open-ILS/src/eg2/src/app/staff/catalog/resolver.service.ts
Open-ILS/src/eg2/src/app/staff/catalog/result/facets.component.ts
Open-ILS/src/eg2/src/app/staff/catalog/result/pagination.component.ts
Open-ILS/src/eg2/src/app/staff/catalog/result/record.component.ts
Open-ILS/src/eg2/src/app/staff/catalog/result/results.component.ts
Open-ILS/src/eg2/src/app/staff/catalog/routing.module.ts
Open-ILS/src/eg2/src/app/staff/catalog/search-form.component.ts
Open-ILS/src/eg2/src/app/staff/common.module.ts
Open-ILS/src/eg2/src/app/staff/login.component.ts
Open-ILS/src/eg2/src/app/staff/nav.component.ts
Open-ILS/src/eg2/src/app/staff/resolver.service.ts
Open-ILS/src/eg2/src/app/staff/routing.module.ts
Open-ILS/src/eg2/src/app/staff/sandbox/routing.module.ts
Open-ILS/src/eg2/src/app/staff/sandbox/sandbox.component.ts
Open-ILS/src/eg2/src/app/staff/sandbox/sandbox.module.ts
Open-ILS/src/eg2/src/app/staff/share/bib-summary/bib-summary.component.ts
Open-ILS/src/eg2/src/app/staff/share/link-table/link-table.component.ts
Open-ILS/src/eg2/src/app/staff/share/op-change/op-change.component.ts
Open-ILS/src/eg2/src/app/staff/share/staff-banner.component.ts
Open-ILS/src/eg2/src/app/staff/splash.component.ts
Open-ILS/src/eg2/src/app/staff/staff.component.ts

index acafe60..a0e67ba 100644 (file)
@@ -5,12 +5,12 @@ describe('EgEventService', () => {
     beforeEach(() => {service = new EgEventService();});
 
     const evt = {
-        ilsevent: "12345",                                                         
-        pid: "12345",                                                             
+        ilsevent: "12345",
+        pid: "12345",
         desc: "Test Event Description",
-        payload: {test : 'xyz'},                                                             
+        payload: {test : 'xyz'},
         textcode: "TEST_EVENT",
-        servertime: "Wed Nov 6 16:05:50 2013"                                     
+        servertime: "Wed Nov 6 16:05:50 2013"
     };
 
     it('should parse an event object', () => {
index bb1fada..064e200 100644 (file)
@@ -4,11 +4,11 @@
  * Access key action is peformed via .click(). hrefs, routerLinks,
  * and (click) actions are all supported.
  *
- *   <a 
- *     routerLink="/staff/splash"                                           
- *     egAccessKey 
+ *   <a
+ *     routerLink="/staff/splash"
+ *     egAccessKey
  *     keySpec="alt+h" i18n-keySpec
- *     keyDesc="My Description" 18n-keyDesc              
+ *     keyDesc="My Description" 18n-keyDesc
  *   >
  */
 import {Directive, ElementRef, Input, OnInit} from '@angular/core';
@@ -29,7 +29,7 @@ export class EgAccessKeyDirective implements OnInit {
     // Context info to display in the accesskey info dialog
     // E.g. "navbar"
     @Input() keyCtx: string;
-    
+
        constructor(
         private elm: ElementRef,
         private keyService: EgAccessKeyService
@@ -44,7 +44,7 @@ export class EgAccessKeyDirective implements OnInit {
 
         this.keySpec.split(/ /).forEach(keySpec => {
             this.keyService.assign({
-                key: keySpec, 
+                key: keySpec,
                 desc: this.keyDesc,
                 ctx: this.keyCtx,
                 action: () => {this.elm.nativeElement.click()}
index 1a3dab3..3c51963 100644 (file)
@@ -3,7 +3,7 @@ import {Injectable, EventEmitter, HostListener} from '@angular/core';
 export interface EgAccessKeyAssignment {
     key: string,     // keyboard command
     desc: string,    // human-friendly description
-    ctx: string,     // template context 
+    ctx: string,     // template context
     action: Function // handler function
 };
 
@@ -21,7 +21,7 @@ export class EgAccessKeyService {
     }
 
     /**
-     * Compress a set of single-fire keyboard events into single 
+     * Compress a set of single-fire keyboard events into single
      * string.  For example:  Control and 't' becomes 'ctrl+t'.
      */
     compressKeys(evt: KeyboardEvent): string {
@@ -54,7 +54,7 @@ export class EgAccessKeyService {
 
     /**
      * Returns a simplified key assignment list containing just
-     * the key spec and the description.  Useful for inspecting 
+     * the key spec and the description.  Useful for inspecting
      * without exposing the actions.
      */
     infoIze(): any[] {
index 707d44f..a71b874 100644 (file)
@@ -12,11 +12,11 @@ export class EgCatalogUrlService {
     constructor(private org: EgOrgService) { }
 
     /**
-     * Returns a URL query structure suitable for using with 
-     * router.navigate(..., {queryParams:...}).  
+     * Returns a URL query structure suitable for using with
+     * router.navigate(..., {queryParams:...}).
      * No navigation is performed within.
      */
-    toUrlParams(context: CatalogSearchContext): 
+    toUrlParams(context: CatalogSearchContext):
             {[key: string]: string | string[]} {
 
         let params = {
@@ -45,7 +45,7 @@ export class EgCatalogUrlService {
 
         context.query.forEach((q, idx) => {
             ['query', 'fieldClass','joinOp','matchOp'].forEach(field => {
-                // Propagate all array-based fields regardless of 
+                // Propagate all array-based fields regardless of
                 // whether a value is applied to ensure correct
                 // correlation between values.
                 params[field][idx] = context[field][idx];
@@ -54,13 +54,13 @@ export class EgCatalogUrlService {
 
         // CCVM filters are encoded as comma-separated lists
         Object.keys(context.ccvmFilters).forEach(code => {
-            if (context.ccvmFilters[code] && 
+            if (context.ccvmFilters[code] &&
                 context.ccvmFilters[code][0] != '') {
                 params[code] = context.ccvmFilters[code].join(',');
             }
         });
 
-        // Each facet is a JSON encoded blob of class, name, and value         
+        // Each facet is a JSON encoded blob of class, name, and value
         context.facetFilters.forEach(facet => {
             params.facets.push(JSON.stringify({
                 c : facet.facetClass,
index 8b0483f..f5f69e4 100644 (file)
@@ -71,7 +71,7 @@ export class EgCatalogService {
         return new Promise((resolve, reject) => {
             this.net.request(
                 'open-ils.search', method, {
-                    limit : ctx.pager.limit + 1, 
+                    limit : ctx.pager.limit + 1,
                     offset : ctx.pager.offset
                 }, fullQuery, true
             ).subscribe(result => {
@@ -97,7 +97,7 @@ export class EgCatalogService {
 
     fetchBibSummaries(ctx: CatalogSearchContext): Promise<any> {
         let promises = [];
-        let depth = ctx.global ? 
+        let depth = ctx.global ?
             ctx.org.root().ou_type().depth() :
             ctx.searchOrg.ou_type().depth();
 
@@ -125,7 +125,7 @@ export class EgCatalogService {
         }
 
         return new Promise((resolve, reject) => {
-            this.net.request('open-ils.search', 
+            this.net.request('open-ils.search',
                 'open-ils.search.facet_cache.retrieve',
                 ctx.result.facet_key
             ).subscribe(facets => {
@@ -163,12 +163,12 @@ export class EgCatalogService {
 
     fetchCcvms(): Promise<void> {
 
-        if (Object.keys(this.ccvmMap).length) 
+        if (Object.keys(this.ccvmMap).length)
             return Promise.resolve();
 
         return new Promise((resolve, reject) => {
-            this.pcrud.search('ccvm', 
-                {ctype : CATALOG_CCVM_FILTERS}, {}, 
+            this.pcrud.search('ccvm',
+                {ctype : CATALOG_CCVM_FILTERS}, {},
                 {atomic: true, anonymous: true}
             ).subscribe(list => {
                 this.compileCcvms(list);
@@ -185,7 +185,7 @@ export class EgCatalogService {
         });
 
         Object.keys(this.ccvmMap).forEach(cType => {
-            this.ccvmMap[cType] = 
+            this.ccvmMap[cType] =
                 this.ccvmMap[cType].sort((a, b) => {
                     return a.value() < b.value() ? -1 : 1;
                 });
@@ -195,11 +195,11 @@ export class EgCatalogService {
 
     fetchCmfs(): Promise<void> {
         // At the moment, we only need facet CMFs.
-        if (Object.keys(this.cmfMap).length) 
+        if (Object.keys(this.cmfMap).length)
             return Promise.resolve();
 
         return new Promise((resolve, reject) => {
-            this.pcrud.search('cmf', 
+            this.pcrud.search('cmf',
                 {facet_field : 't'}, {}, {atomic: true, anonymous: true}
             ).subscribe(
                 cmfs => {
@@ -218,10 +218,10 @@ export class EgCatalogService {
     getBibSummary(bibId: number, orgId?: number, depth?: number): Promise<any> {
         return new Promise((resolve, reject) => {
             this.unapi.getAsXmlDocument({
-                target: 'bre', 
-                id: bibId, 
-                extras: '{bre.extern,holdings_xml,mra}', 
-                format: 'mods32', 
+                target: 'bre',
+                id: bibId,
+                extras: '{bre.extern,holdings_xml,mra}',
+                format: 'mods32',
                 orgId: orgId,
                 depth: depth
             }).then(xmlDoc => {
@@ -235,7 +235,7 @@ export class EgCatalogService {
     /**
      * Probably don't want to require navigating the bare UNAPI
      * blob in the template, plus that's quite a lot of stuff
-     * to sit in the scope / watch for changes.  Translate the 
+     * to sit in the scope / watch for changes.  Translate the
      * UNAPI content into a more digestable form.
      * TODO: Add display field support
      */
@@ -251,14 +251,14 @@ export class EgCatalogService {
         };
 
         Object.keys(MODS_XPATH_AUTO).forEach(key => {
-            let result = xmlDoc.evaluate(MODS_XPATH_AUTO[key], xmlDoc, 
+            let result = xmlDoc.evaluate(MODS_XPATH_AUTO[key], xmlDoc,
                 resolver, XPathResult.FIRST_ORDERED_NODE_TYPE, null);
 
             let node = result.singleNodeValue;
             if (node) response[key] = node.textContent;
         });
 
-        let result = xmlDoc.evaluate(MODS_XPATH.extern, xmlDoc, 
+        let result = xmlDoc.evaluate(MODS_XPATH.extern, xmlDoc,
             resolver, XPathResult.FIRST_ORDERED_NODE_TYPE, null);
 
         let node:any = result.singleNodeValue;
@@ -269,7 +269,7 @@ export class EgCatalogService {
             }
         }
 
-        result = xmlDoc.evaluate(MODS_XPATH.attributes, xmlDoc, 
+        result = xmlDoc.evaluate(MODS_XPATH.attributes, xmlDoc,
             resolver, XPathResult.ANY_TYPE, null);
 
         while(node = result.iterateNext()) {
@@ -279,12 +279,12 @@ export class EgCatalogService {
             }
         }
 
-        result = xmlDoc.evaluate(MODS_XPATH.copyCounts, xmlDoc, 
+        result = xmlDoc.evaluate(MODS_XPATH.copyCounts, xmlDoc,
             resolver, XPathResult.ANY_TYPE, null);
 
         while(node = result.iterateNext()) {
             let counts = {};
-            ['type', 'depth', 'org_unit', 'transcendant', 
+            ['type', 'depth', 'org_unit', 'transcendant',
                 'available', 'count', 'unshadow'].forEach(field => {
                 counts[field] = node.getAttribute(field);
             });
index 54224ff..d263fcf 100644 (file)
@@ -68,8 +68,8 @@ export class CatalogSearchContext {
         let ids = [];
         for (
             let idx = this.pager.offset;
-            idx < Math.min( 
-                this.pager.offset + this.pager.limit, 
+            idx < Math.min(
+                this.pager.offset + this.pager.limit,
                 this.pager.resultCount
             );
             idx++
@@ -98,7 +98,7 @@ export class CatalogSearchContext {
     /**
      * Return search context to its default state, resetting search
      * parameters and clearing any cached result data.
-     * This does not reset global filters like limit-to-available 
+     * This does not reset global filters like limit-to-available
      * search-global, or search-org.
      */
     reset(): void {
@@ -117,7 +117,7 @@ export class CatalogSearchContext {
     }
 
     isSearchable(): boolean {
-        return this.query.length 
+        return this.query.length
             && this.query[0] != ''
             && this.searchOrg != null;
     }
@@ -172,11 +172,11 @@ export class CatalogSearchContext {
     }
 
     stripQuotes(query: string): string {
-        return query.replace(/"/g, ''); 
+        return query.replace(/"/g, '');
     }
 
     stripAnchors(query: string): string {
-        return query.replace(/[\^\$]/g, ''); 
+        return query.replace(/[\^\$]/g, '');
     }
 
     addQuotes(query: string): string {
@@ -210,7 +210,7 @@ export class CatalogSearchContext {
                 query = '^' + this.stripAnchors(query) + '$';
                 break;
             case 'starts':
-                query = this.addQuotes('^' + 
+                query = this.addQuotes('^' +
                     this.stripAnchors(this.stripQuotes(query)));
                 break;
         }
index f203a5b..67db0af 100644 (file)
@@ -30,7 +30,7 @@ export class EgDateSelectComponent implements OnInit {
         this.onChangeAsIso = new EventEmitter<string>();
         this.onChangeAsYmd = new EventEmitter<string>();
     }
-    
+
     ngOnInit() {
 
         if (this.initialYmd) {
@@ -44,8 +44,8 @@ export class EgDateSelectComponent implements OnInit {
             this.initialDate = new Date();
 
         this.current = {
-            year: this.initialDate.getFullYear(), 
-            month: this.initialDate.getMonth() + 1, 
+            year: this.initialDate.getFullYear(),
+            month: this.initialDate.getMonth() + 1,
             day: this.initialDate.getDate()
         };
     }
@@ -62,7 +62,7 @@ export class EgDateSelectComponent implements OnInit {
     // Create a date in the local time zone with selected YMD values.
     // TODO: Consider moving this to a date service...
     localDateFromYmd(ymd: string): Date {
-        var parts = ymd.split('-');                                            
+        var parts = ymd.split('-');
         return new Date(
             Number(parts[0]), Number(parts[1]) - 1, Number(parts[2]));
     }
index e1b3e42..19374a9 100644 (file)
@@ -1,11 +1,11 @@
 import {Component, Input, OnInit, ViewChild, TemplateRef, EventEmitter} from '@angular/core';
 import {NgbModal, NgbModalRef, NgbModalOptions} from '@ng-bootstrap/ng-bootstrap';
 
-/** 
- * Dialog base class.  Handles the ngbModal logic. 
- * Sub-classed component templates must have a #dialogContent selector 
+/**
+ * Dialog base class.  Handles the ngbModal logic.
+ * Sub-classed component templates must have a #dialogContent selector
  * at the root of the template (see EgConfirmDialogComponent).
- */ 
+ */
 
 @Component({
     selector: 'eg-dialog',
@@ -17,11 +17,11 @@ export class EgDialogComponent implements OnInit {
     @Input() public dialogTitle: string;
 
     // Pointer to the dialog content template.
-    @ViewChild('dialogContent') 
+    @ViewChild('dialogContent')
     private dialogContent: TemplateRef<any>;
 
     // Emitted after open() is called on the ngbModal.
-    // Note when overriding open(), this will not fire unless also 
+    // Note when overriding open(), this will not fire unless also
     // called in the overridding method.
     onOpen$ = new EventEmitter<any>();
 
index 33f8099..d9cc60a 100644 (file)
@@ -8,7 +8,7 @@ import {EgDialogComponent} from '@eg/share/dialog/dialog.component';
 })
 
 /**
- * Progress Dialog. 
+ * Progress Dialog.
  *
  * // assuming a template reference...
  * @ViewChild('progressDialog')
@@ -21,7 +21,7 @@ import {EgDialogComponent} from '@eg/share/dialog/dialog.component';
  * dialog.close();
  *
  * Each dialog has 2 numbers, 'max' and 'value'.
- * The content of these values determines how the dialog displays.  
+ * The content of these values determines how the dialog displays.
  *
  * There are 3 flavors:
  *
@@ -38,11 +38,11 @@ import {EgDialogComponent} from '@eg/share/dialog/dialog.component';
  * is happening, but we don't know when it will end.
  *
  * -- value is unset
- * indeterminate: shows a generic value-less <progress/> with no 
+ * indeterminate: shows a generic value-less <progress/> with no
  * clear indication of progress.
  */
 export class EgProgressDialogComponent extends EgDialogComponent {
-        
+
     max: number;
     value: number;
 
@@ -60,8 +60,8 @@ export class EgProgressDialogComponent extends EgDialogComponent {
     }
 
     percent(): number {
-        if (this.hasValue()  && 
-            this.hasMax()    && 
+        if (this.hasValue()  &&
+            this.hasMax()    &&
             this.max > 0     &&
             this.value <= this.max)
             return Math.floor((this.value / this.max) * 100);
@@ -70,9 +70,9 @@ export class EgProgressDialogComponent extends EgDialogComponent {
 
     // Set the current state of the progress bar.
     update(args: {[key:string] : number}) {
-        if (args.max != undefined) 
+        if (args.max != undefined)
             this.max = args.max;
-        if (args.value != undefined) 
+        if (args.value != undefined)
             this.value = args.value;
     }
 
index 3942bd5..6e696d2 100644 (file)
@@ -1,4 +1,4 @@
-import {Component, OnInit, Input, 
+import {Component, OnInit, Input,
     Output, EventEmitter, TemplateRef} from '@angular/core';
 import {EgIdlService, EgIdlObject} from '@eg/core/idl.service';
 import {EgAuthService} from '@eg/core/auth.service';
@@ -8,9 +8,9 @@ import {NgbModal, NgbModalOptions} from '@ng-bootstrap/ng-bootstrap';
 
 interface CustomFieldTemplate {
     template: TemplateRef<any>,
-    
-    // Allow the caller to pass in a free-form context blob to 
-    // be addedto the caller's custom template context, along 
+
+    // Allow the caller to pass in a free-form context blob to
+    // be addedto the caller's custom template context, along
     // with our stock context.
     context?: {[fields: string]: any}
 }
@@ -20,7 +20,7 @@ interface CustomFieldContext {
     record: EgIdlObject,
 
     // IDL field definition blob
-    field: any, 
+    field: any,
 
     // additional context values passed via CustomFieldTemplate
     [fields: string]: any;
@@ -30,7 +30,7 @@ interface CustomFieldContext {
   selector: 'fm-record-editor',
   templateUrl: './fm-editor.component.html'
 })
-export class FmRecordEditorComponent 
+export class FmRecordEditorComponent
     extends EgDialogComponent implements OnInit {
 
     // IDL class hint (e.g. "aou")
@@ -55,7 +55,7 @@ export class FmRecordEditorComponent
     // TODO: allow this to be update in real time by the caller?
     record: EgIdlObject;
 
-    @Input() customFieldTemplates: 
+    @Input() customFieldTemplates:
         {[fieldName:string] : CustomFieldTemplate} = {};
 
     // list of fields that should not be displayed
@@ -69,7 +69,7 @@ export class FmRecordEditorComponent
     // list of required fields; this supplements what the IDL considers
     // required
     @Input() requiredFieldsList: string[] = [];
-    @Input() requiredFields: string; // comma-separated string version 
+    @Input() requiredFields: string; // comma-separated string version
 
     // list of org_unit fields where a default value may be applied by
     // the org-select if no value is present.
@@ -81,7 +81,7 @@ export class FmRecordEditorComponent
     // name and the record and should return a boolean value. This
     // supports cases where whether a field is required or not depends
     // on the current value of another field.
-    @Input() isRequiredOverride: 
+    @Input() isRequiredOverride:
         {[field: string] : (field: string, record: EgIdlObject) => boolean};
 
     // IDL record display label.  Defaults to the IDL label.
@@ -110,10 +110,10 @@ export class FmRecordEditorComponent
       private modal: NgbModal, // required for passing to parent
       private idl: EgIdlService,
       private auth: EgAuthService,
-      private pcrud: EgPcrudService) { 
-      super(modal) 
+      private pcrud: EgPcrudService) {
+      super(modal)
     }
-    
+
     // Avoid fetching data on init since that may lead to unnecessary
     // data retrieval.
     ngOnInit() {
@@ -150,7 +150,7 @@ export class FmRecordEditorComponent
             .toPromise().then(rec => {
 
                 if (!rec) {
-                    return Promise.reject(`No '${this.idlClass}' 
+                    return Promise.reject(`No '${this.idlClass}'
                         record found with id ${this.recId}`);
                 }
 
@@ -158,7 +158,7 @@ export class FmRecordEditorComponent
                 this.convertDatatypesToJs();
                 return this.getFieldList();
             });
-        } 
+        }
 
         // create a new record from scratch
         this.pkeyIsEditable = !('pkey_sequence' in this.idlDef);
@@ -204,7 +204,7 @@ export class FmRecordEditorComponent
 
     private flattenLinkedValues(cls: string, list: EgIdlObject[]): any[] {
         let idField = this.idl.classes[cls].pkey;
-        let selector = 
+        let selector =
             this.idl.classes[cls].field_map[idField].selector || idField;
 
         return list.map(item => {
@@ -214,25 +214,25 @@ export class FmRecordEditorComponent
 
     private getFieldList(): Promise<any> {
 
-        this.fields = this.idlDef.fields.filter(f => 
-            f.virtual != 'true' && 
+        this.fields = this.idlDef.fields.filter(f =>
+            f.virtual != 'true' &&
             !this.hiddenFieldsList.includes(f.name)
         );
 
         let promises = [];
 
         this.fields.forEach(field => {
-            field.readOnly = this.mode == 'view' 
+            field.readOnly = this.mode == 'view'
                 || this.readonlyFieldsList.includes(field.name);
 
-            if (this.isRequiredOverride && 
+            if (this.isRequiredOverride &&
                 field.name in this.isRequiredOverride) {
                 field.isRequired = () => {
                     return this.isRequiredOverride[field.name](field.name, this.record);
                 }
             } else {
                 field.isRequired = () => {
-                    return field.required || 
+                    return field.required ||
                         this.requiredFieldsList.includes(field.name);
                 }
             }
@@ -241,12 +241,12 @@ export class FmRecordEditorComponent
                 promises.push(
                     this.pcrud.retrieveAll(field.class, {}, {atomic : true})
                     .toPromise().then(list => {
-                        field.linkedValues = 
+                        field.linkedValues =
                             this.flattenLinkedValues(field.class, list);
                     })
                 );
             } else if (field.datatype == 'org_unit') {
-                field.orgDefaultAllowed = 
+                field.orgDefaultAllowed =
                     this.orgDefaultAllowedList.includes(field.name);
             }
 
@@ -261,7 +261,7 @@ export class FmRecordEditorComponent
         return Promise.all(promises);
     }
 
-    // Returns a context object to be inserted into a custom 
+    // Returns a context object to be inserted into a custom
     // field template.
     customTemplateFieldContext(fieldDef: any): CustomFieldContext {
         return Object.assign(
index e09c86a..36ffa13 100644 (file)
@@ -1,5 +1,5 @@
 import {Component, Input, OnInit, Host} from '@angular/core';
-import {EgGridContext, EgGridColumn, EgGridColumnSet, 
+import {EgGridContext, EgGridColumn, EgGridColumnSet,
     EgGridDataSource} from './grid';
 
 @Component({
index 89b0c41..3c7101b 100644 (file)
@@ -15,7 +15,7 @@ export class EgGridColumnComponent implements OnInit {
     @Input() label: string;
     @Input() flex: number;
     // is this the index field?
-    @Input() index: boolean; 
+    @Input() index: boolean;
     @Input() visible: boolean;
     @Input() hidden: boolean;
     @Input() sortable: boolean;
index 6cb3a8a..3d5cd8c 100644 (file)
@@ -1,5 +1,5 @@
 import {Component, Input, OnInit} from '@angular/core';
-import {EgGridContext, EgGridColumn, EgGridRowSelector, 
+import {EgGridContext, EgGridColumn, EgGridRowSelector,
     EgGridColumnSet, EgGridDataSource} from './grid';
 
 @Component({
@@ -44,7 +44,7 @@ export class EgGridHeaderComponent implements OnInit {
         this.gridContext.reload();
     }
 
-    // Returns true if the provided column is sorting in the 
+    // Returns true if the provided column is sorting in the
     // specified direction.
     isColumnSorting(col: EgGridColumn, dir: string): boolean {
         let sort = this.gridContext.dataSource.sort.filter(c => c.name == col.name)[0];
index d32fee6..68cbd3b 100644 (file)
@@ -1,7 +1,7 @@
 import {Component, Input, OnInit, Host} from '@angular/core';
 import {DomSanitizer, SafeUrl} from '@angular/platform-browser';
 import {Pager} from '@eg/share/util/pager';
-import {EgGridColumn, EgGridColumnSet, EgGridToolbarButton, 
+import {EgGridColumn, EgGridColumnSet, EgGridToolbarButton,
     EgGridToolbarAction, EgGridContext, EgGridDataSource} from '@eg/share/grid/grid';
 import {EgGridColumnWidthComponent} from './grid-column-width.component';
 
@@ -47,19 +47,19 @@ export class EgGridToolbarComponent implements OnInit {
             // the CSV download attributes / state.
             setTimeout(() => {
                 this.csvExportUrl = null;
-                this.csvExportFileName = ''; 
+                this.csvExportFileName = '';
                 this.csvExportInProgress = false;
                }, 500
             );
             return;
-        } 
+        }
 
         this.csvExportInProgress = true;
 
         // let the file name describe the grid
         this.csvExportFileName = (
-            this.gridContext.mainLabel || 
-            this.gridContext.persistKey || 
+            this.gridContext.mainLabel ||
+            this.gridContext.persistKey ||
             'eg_grid_data'
         ).replace(/\s+/g, '_') + '.csv';
 
@@ -70,7 +70,7 @@ export class EgGridToolbarComponent implements OnInit {
             this.csvExportUrl = this.sanitizer.bypassSecurityTrustUrl(
                 (win.URL || win.webkitURL).createObjectURL(blob)
             );
-            
+
             // Fire the 2nd click event now that the browser has
             // information on how to download the CSV file.
             setTimeout(() => $event.target.click());
index f2949b3..26fc21d 100644 (file)
@@ -28,14 +28,14 @@ export class EgGridComponent implements OnInit, AfterViewInit, OnDestroy {
     context: EgGridContext;
     onRowActivate$: EventEmitter<any>;
     onRowClick$: EventEmitter<any>;
-    
+
     constructor(
         private idl: EgIdlService,
         private org: EgOrgService,
         private store: EgStoreService,
         private format: EgFormatService
     ) {
-        this.context = 
+        this.context =
             new EgGridContext(this.idl, this.org, this.store, this.format);
         this.onRowActivate$ = new EventEmitter<any>();
         this.onRowClick$ = new EventEmitter<any>();
@@ -60,7 +60,7 @@ export class EgGridComponent implements OnInit, AfterViewInit, OnDestroy {
         this.context.destroy();
     }
 
-    // Not using @HostListener because it only works globally.  
+    // Not using @HostListener because it only works globally.
     onGridKeyDown(evt: KeyboardEvent) {
         switch(evt.key) {
             case 'ArrowUp':
@@ -103,7 +103,7 @@ export class EgGridComponent implements OnInit, AfterViewInit, OnDestroy {
         if (this.context.disableMultiSelect) {
             this.context.selectOneRow(index);
         } else if ($event.ctrlKey || $event.metaKey /* mac command */) {
-            if (this.context.toggleSelectOneRow(index)) 
+            if (this.context.toggleSelectOneRow(index))
                 this.context.lastSelectedIndex = index;
 
         } else if ($event.shiftKey) {
index e863c8a..232ad32 100644 (file)
@@ -38,7 +38,7 @@ export class EgGridContext {
     constructor(
         idl: EgIdlService, org: EgOrgService,
         store: EgStoreService, format: EgFormatService) {
-    
+
         this.idl = idl;
         this.org = org;
         this.store = store;
@@ -95,24 +95,24 @@ export class EgGridContext {
         return this.getRowColumnValue(row, col);
     }
 
-    // Returns the array position of the row-by-index in the 
+    // Returns the array position of the row-by-index in the
     // dataSource array.
     getRowPosition(index: any): number {
         // for-loop for early exit
-        for (let idx = 0; idx < this.dataSource.data.length; idx++) { 
+        for (let idx = 0; idx < this.dataSource.data.length; idx++) {
             if (index == this.getRowIndex(this.dataSource.data[idx]))
                 return idx;
         }
     }
 
     getRowByIndex(index: any): any {
-        for (let idx = 0; idx < this.dataSource.data.length; idx++) { 
+        for (let idx = 0; idx < this.dataSource.data.length; idx++) {
             if (index == this.getRowIndex(this.dataSource.data[idx]))
                 return this.dataSource.data[idx];
         }
     }
 
-    // Returns all selected rows, regardless of whether they are 
+    // Returns all selected rows, regardless of whether they are
     // currently visible in the grid display.
     getSelectedRows(): any[] {
         let selected = [];
@@ -153,7 +153,7 @@ export class EgGridContext {
         if (this.rowSelector.contains(index)) {
             this.rowSelector.deselect(index);
             return false;
-        } 
+        }
 
         this.rowSelector.select(index);
         return true;
@@ -221,7 +221,7 @@ export class EgGridContext {
     getRowAsFlatText(row: any): any {
         let flatRow = {};
         this.columnSet.displayColumns().forEach(col => {
-            flatRow[col.name] = 
+            flatRow[col.name] =
                 this.getColumnTextContent(row, col);
         });
         return flatRow;
@@ -273,10 +273,10 @@ export class EgGridContext {
         str = ''+str;
         if (!str) return '';
         str = str.replace(/\n/g, '');
-        if (str.match(/\,/) || str.match(/"/)) {                                     
+        if (str.match(/\,/) || str.match(/"/)) {
             str = str.replace(/"/g, '""');
-            str = '"' + str + '"';                                           
-        } 
+            str = '"' + str + '"';
+        }
         return str;
     }
 
@@ -430,7 +430,7 @@ export class EgGridColumnSet {
         var srcIdx, targetIdx;
 
         this.columns.forEach((c, i) => {
-          if (c.name == col.name) srcIdx = i 
+          if (c.name == col.name) srcIdx = i
         });
 
         targetIdx = srcIdx + diff;
@@ -446,7 +446,7 @@ export class EgGridColumnSet {
             // When moving a column (down) causes one or more
             // visible columns to shuffle forward, our column
             // moves into the slot of the last visible column.
-            // Otherwise, put it into the slot directly following 
+            // Otherwise, put it into the slot directly following
             // the last visible column.
             targetIdx = srcIdx <= lastVisible ? lastVisible : lastVisible + 1;
         }
@@ -489,8 +489,8 @@ export class EgGridColumnSet {
                 newCols.push(col);
         });
 
-        // columns which are not expressed within the saved 
-        // configuration are marked as non-visible and 
+        // columns which are not expressed within the saved
+        // configuration are marked as non-visible and
         // appended to the end of the new list of columns.
         this.columns.forEach(c => {
             if (conf.filter(cf => cf.name == c.name).length == 0) {
@@ -527,7 +527,7 @@ export class EgGridRowSelector {
         let indexes = [].concat(index);
         for (let i = 0; i < indexes.length; i++) { // early exit
             if (!this.indexes[indexes[i]])
-                return false; 
+                return false;
         }
         return true;
     }
@@ -543,7 +543,7 @@ export class EgGridRowSelector {
     }
 
     // Returns the list of selected index values.
-    // in some contexts (template checkboxes) the value for an index is 
+    // in some contexts (template checkboxes) the value for an index is
     // set to false to deselect instead of having it removed (via deselect()).
     selected() {
         return Object.keys(this.indexes).filter(
index ddb5f9d..76a8655 100644 (file)
@@ -5,17 +5,17 @@ import {debounceTime} from 'rxjs/operators/debounceTime';
 import {distinctUntilChanged} from 'rxjs/operators/distinctUntilChanged';
 import {merge} from 'rxjs/operators/merge';
 import {filter} from 'rxjs/operators/filter';
-import {Subject} from 'rxjs/Subject'; 
+import {Subject} from 'rxjs/Subject';
 import {EgAuthService} from '@eg/core/auth.service';
 import {EgStoreService} from '@eg/core/store.service';
 import {EgOrgService} from '@eg/core/org.service';
 import {EgIdlObject} from '@eg/core/idl.service';
-import {NgbTypeahead, NgbTypeaheadSelectItemEvent} 
+import {NgbTypeahead, NgbTypeaheadSelectItemEvent}
     from '@ng-bootstrap/ng-bootstrap';
 
-// Use a unicode char for spacing instead of ASCII=32 so the browser 
+// Use a unicode char for spacing instead of ASCII=32 so the browser
 // won't collapse the nested display entries down to a single space.
-const PAD_SPACE: string = ' '; // U+2007 
+const PAD_SPACE: string = ' '; // U+2007
 
 interface OrgDisplay {
   id: number;
@@ -59,13 +59,13 @@ export class EgOrgSelectComponent implements OnInit {
         if (ids) this.disabled = ids;
     }
 
-    // Apply an org unit value at load time.  
+    // Apply an org unit value at load time.
     // This will NOT result in an onChange event.
     @Input() set initialOrg(org: EgIdlObject) {
         if (org) this.startOrg = org;
     }
 
-    // Apply an org unit value by ID at load time.  
+    // Apply an org unit value by ID at load time.
     // This will NOT result in an onChange event.
     @Input() set initialOrgId(id: number) {
         if (id) this.startOrg = this.org.get(id);
@@ -90,9 +90,9 @@ export class EgOrgSelectComponent implements OnInit {
     constructor(
       private auth: EgAuthService,
       private store: EgStoreService,
-      private org: EgOrgService 
+      private org: EgOrgService
     ) {}
-    
+
     ngOnInit() {
 
         // Apply a default org unit if desired and possible.
@@ -117,7 +117,7 @@ export class EgOrgSelectComponent implements OnInit {
     formatForDisplay(org: EgIdlObject): OrgDisplay {
         return {
             id : org.id(),
-            label : PAD_SPACE.repeat(org.ou_type().depth()) 
+            label : PAD_SPACE.repeat(org.ou_type().depth())
               + org[this.displayField](),
             disabled : false
         };
index f6a858a..ef34f16 100644 (file)
@@ -35,14 +35,14 @@ export class EgStringComponent implements OnInit {
         // that does not need interpolation.
         if (this.key) {
             this.strings.register({
-                key: this.key, 
+                key: this.key,
                 resolver: (ctx:any) => this.current(ctx)
             });
         }
     }
 
 
-    // Apply the new context if provided, give our container a 
+    // Apply the new context if provided, give our container a
     // chance to update, then resolve with the current string.
     // NOTE: talking to the native DOM element is not so great, but
     // hopefully we can retire the EgString* code entirely once
index 1af8083..3d9eed5 100644 (file)
@@ -17,11 +17,11 @@ export class EgStringService {
     }
 
     interpolate(key: string, ctx?: any): Promise<string> {
-        if (!this.strings[key]) 
+        if (!this.strings[key])
             return Promise.reject('No Such String');
         return this.strings[key].resolver(ctx);
     }
 
 }
 
+
index eebe625..bb9cab7 100644 (file)
@@ -26,7 +26,7 @@ export class EgToastComponent implements OnInit {
         this.dismiss(this.message);
         this.message = msg;
         this.timeout = setTimeout(
-            () => this.dismiss(this.message), 
+            () => this.dismiss(this.message),
             EG_TOAST_TIMEOUT
         );
     }
index 9692c13..6c2f9e3 100644 (file)
@@ -2,7 +2,7 @@ import {Injectable, EventEmitter} from '@angular/core';
 
 export interface EgToastMessage {
     text: string,
-    style: string 
+    style: string
 };
 
 @Injectable()
index 69c6f96..a73f4f3 100644 (file)
@@ -1,7 +1,7 @@
 import {NgModule} from '@angular/core';
 import {RouterModule, Routes} from '@angular/router';
 
-const routes: Routes = [{ 
+const routes: Routes = [{
   path: '',
   children : [
   { path: 'workstation',
index 21d5d45..9debf57 100644 (file)
@@ -1,4 +1,4 @@
-import {Component, Input, ViewChildren, 
+import {Component, Input, ViewChildren,
     AfterViewInit, QueryList} from '@angular/core';
 
 @Component({
index 8abab50..4628b33 100644 (file)
@@ -15,7 +15,7 @@ import {AdminServerSplashComponent} from './admin-server-splash.component';
   ]
 })
 
-export class EgAdminServerModule { 
+export class EgAdminServerModule {
 }
 
 
index c529db7..00f2011 100644 (file)
@@ -46,11 +46,11 @@ export class BillingTypeComponent implements OnInit {
             let searchOrgs = this.org.fullPath(this.contextOrg, true);
 
             let orderBy = {};
-            if (sort.length) 
+            if (sort.length)
                 orderBy = {cbt: sort[0].name + ' ' + sort[0].dir};
 
             return this.pcrud.search('cbt', {owner : searchOrgs}, {
-                offset: pager.offset, 
+                offset: pager.offset,
                 limit: pager.limit,
                 order_by: orderBy
             });
index dcc6ef0..0a2b455 100644 (file)
@@ -19,7 +19,7 @@ import {HardDueDateComponent} from './hard_due_date.component';
   ]
 })
 
-export class EgAdminServerConfigModule { 
+export class EgAdminServerConfigModule {
 }
 
 
index d2d73f8..fdbf781 100644 (file)
@@ -46,11 +46,11 @@ export class HardDueDateComponent implements OnInit {
             let searchOrgs = this.org.fullPath(this.contextOrg, true);
 
             let orderBy = {};
-            if (sort.length) 
+            if (sort.length)
                 orderBy = {chdd: sort[0].name + ' ' + sort[0].dir};
 
             return this.pcrud.search('chdd', {owner : searchOrgs}, {
-                offset: pager.offset, 
+                offset: pager.offset,
                 limit: pager.limit,
                 order_by: orderBy
             });
index d79bb9a..23e485e 100644 (file)
@@ -3,12 +3,12 @@ import {RouterModule, Routes} from '@angular/router';
 import {BillingTypeComponent} from './billing_type.component';
 import {HardDueDateComponent} from './hard_due_date.component';
 
-const routes: Routes = [{ 
+const routes: Routes = [{
   path: 'billing_type',
-  component: BillingTypeComponent 
+  component: BillingTypeComponent
 }, {
   path: 'hard_due_date',
-  component: HardDueDateComponent 
+  component: HardDueDateComponent
 }];
 
 @NgModule({
index d1ae7f2..391e01c 100644 (file)
@@ -55,7 +55,7 @@ export class WorkstationsComponent implements OnInit {
         .then(noop => this.store.getItem('eg.workstation.default'))
         .then(defWs => {
             this.defaultName = defWs;
-            this.selectedName = this.auth.workstation() || defWs 
+            this.selectedName = this.auth.workstation() || defWs
         })
         .then(noop => {
             let rm = this.route.snapshot.paramMap.get('remove');
@@ -66,7 +66,7 @@ export class WorkstationsComponent implements OnInit {
         .then(perms => {
             // Disable org units that cannot have users and any
             // that this user does not have work perms for.
-            this.disableOrgs = 
+            this.disableOrgs =
                 this.org.filterList({canHaveUsers : false}, true)
                 .concat(this.org.filterList(
                     {notInList : perms.REGISTER_WORKSTATION}, true));
@@ -80,7 +80,7 @@ export class WorkstationsComponent implements OnInit {
 
     useNow(): void {
         if (!this.selected()) return;
-        this.router.navigate(['/staff/login'], 
+        this.router.navigate(['/staff/login'],
           {queryParams: {workstation: this.selected().name}});
     }
 
@@ -101,7 +101,7 @@ export class WorkstationsComponent implements OnInit {
             this.store.removeItem('eg.workstation.default');
         }
     }
-    
+
     canDeleteSelected(): boolean {
         return true;
     }
@@ -143,7 +143,7 @@ export class WorkstationsComponent implements OnInit {
                 'open-ils.actor', method,
                 this.auth.token(), this.newName, this.newOwner.id()
             ).subscribe(wsId => {
-                let evt = this.evt.parse(wsId);  
+                let evt = this.evt.parse(wsId);
                 if (evt) {
                     if (evt.textcode == 'WORKSTATION_NAME_EXISTS') {
                         this.handleCollision().then(
@@ -155,7 +155,7 @@ export class WorkstationsComponent implements OnInit {
                         reject();
                     }
                 } else {
-                   resolve(wsId); 
+                   resolve(wsId);
                 }
             });
         });
index 635eec1..3d3d313 100644 (file)
@@ -41,6 +41,6 @@ import {RecordPaginationComponent} from './record/pagination.component';
   ]
 })
 
-export class EgCatalogModule { 
+export class EgCatalogModule {
 
 }
index 6cfc715..8420457 100644 (file)
@@ -19,7 +19,7 @@ export class StaffCatalogService {
     defaultSearchLimit: number;
 
     // TODO: does unapi support pref-lib for result-page copy counts?
-    prefOrg: EgIdlObject; 
+    prefOrg: EgIdlObject;
 
     constructor(
         private router: Router,
@@ -34,7 +34,7 @@ export class StaffCatalogService {
         // Do this here so the search form and other context data are
         // applied on every page, not just the search results page.  The
         // search results pages will handle running the actual search.
-        this.searchContext = 
+        this.searchContext =
             this.catUrl.fromUrlParams(this.route.snapshot.queryParamMap);
 
         this.searchContext.org = this.org; // service, not searchOrg
@@ -44,7 +44,7 @@ export class StaffCatalogService {
 
     applySearchDefaults(): void {
         if (!this.searchContext.searchOrg) {
-            this.searchContext.searchOrg = 
+            this.searchContext.searchOrg =
                 this.defaultSearchOrg || this.org.root();
         }
 
@@ -62,7 +62,7 @@ export class StaffCatalogService {
         if (!this.searchContext.isSearchable()) return;
 
         let params = this.catUrl.toUrlParams(this.searchContext);
-        
+
         // Force a new search every time this method is called, even if
         // it's the same as the active search.  Since router navigation
         // exits early when the route + params is identical, add a
index d4b6957..a39095c 100644 (file)
@@ -28,7 +28,7 @@ export class CopiesComponent implements OnInit {
         private staffCat: StaffCatalogService,
     ) {}
 
-    ngOnInit() { 
+    ngOnInit() {
         this.initDone = true;
         this.collectData();
     }
@@ -51,7 +51,7 @@ export class CopiesComponent implements OnInit {
         // copies from all branches, sorted by search/pref libs.
         let copy_depth = this.staffCat.searchContext.global ?
             this.org.root().ou_type().depth() :
-            this.staffCat.searchContext.searchOrg.ou_type().depth(); 
+            this.staffCat.searchContext.searchOrg.ou_type().depth();
 
         this.net.request(
             'open-ils.search',
@@ -61,15 +61,15 @@ export class CopiesComponent implements OnInit {
             copy_depth,
             this.pager.limit,
             this.pager.offset,
-            this.staffCat.prefOrg ? this.staffCat.prefOrg.id() : null 
+            this.staffCat.prefOrg ? this.staffCat.prefOrg.id() : null
         ).subscribe(copy => {
             this.copies.push(copy);
         });
     }
 
     holdable(copy: any): boolean {
-        return copy.holdable == 't' 
-            && copy.location_holdable == 't' 
+        return copy.holdable == 't'
+            && copy.location_holdable == 't'
             && copy.status_holdable == 't';
     }
 
index 31fee2c..9eba7d7 100644 (file)
@@ -31,7 +31,7 @@ export class RecordPaginationComponent implements OnInit {
         private staffCat: StaffCatalogService,
     ) {}
 
-    ngOnInit() { 
+    ngOnInit() {
         this.initDone = true;
         this.setIndex();
     }
@@ -103,7 +103,7 @@ export class RecordPaginationComponent implements OnInit {
     findRecordAtIndex(index: number): Promise<number> {
 
         // First see if the selected record sits in the current page
-        // of search results.  
+        // of search results.
         return new Promise((resolve, reject) => {
             let id = this.searchContext.resultIdAt(index);
             if (id) return resolve(id);
@@ -111,7 +111,7 @@ export class RecordPaginationComponent implements OnInit {
             console.debug(
                 'Record paginator unable to find record at index ' + index);
 
-            // If we have to re-run the search to find the record, 
+            // If we have to re-run the search to find the record,
             // expand the search limit out just enough to find the
             // requested record plus one more.
             return this.refreshSearch(index + 2).then(
index ec9a302..b25f1e7 100644 (file)
@@ -2,7 +2,7 @@ import {Component, OnInit, Input} from '@angular/core';
 import {ActivatedRoute, ParamMap} from '@angular/router';
 import {EgPcrudService} from '@eg/core/pcrud.service';
 import {EgIdlObject} from '@eg/core/idl.service';
-import {CatalogSearchContext, CatalogSearchState} 
+import {CatalogSearchContext, CatalogSearchState}
   from '@eg/share/catalog/search-context';
 import {EgCatalogService} from '@eg/share/catalog/catalog.service';
 import {StaffCatalogService} from '../catalog.service';
@@ -25,7 +25,7 @@ export class RecordComponent implements OnInit {
         private staffCat: StaffCatalogService
     ) {}
 
-    ngOnInit() { 
+    ngOnInit() {
         this.searchContext = this.staffCat.searchContext;
 
         // Watch for URL record ID changes
@@ -35,17 +35,17 @@ export class RecordComponent implements OnInit {
         })
     }
 
-    loadRecord(): void { 
+    loadRecord(): void {
         this.searchContext = this.staffCat.searchContext;
 
         // If a search is encoded in the URL, be sure we have the
-        // relevant search 
+        // relevant search
 
         this.cat.getBibSummary(
             this.recordId,
-            this.searchContext.searchOrg.id(), 
+            this.searchContext.searchOrg.id(),
             this.searchContext.searchOrg.ou_type().depth()
-        ).then(summary => { 
+        ).then(summary => {
             this.bibSummary = summary;
             this.pcrud.search('au', {id: [summary.creator, summary.editor]})
             .subscribe(user => {
index 854b937..8f1830d 100644 (file)
@@ -15,7 +15,7 @@ import {StaffCatalogService} from './catalog.service';
 export class EgCatalogResolver implements Resolve<Promise<any[]>> {
 
     constructor(
-        private router: Router, 
+        private router: Router,
         private store: EgStoreService,
         private org: EgOrgService,
         private net: EgNetService,
@@ -25,7 +25,7 @@ export class EgCatalogResolver implements Resolve<Promise<any[]>> {
     ) {}
 
     resolve(
-        route: ActivatedRouteSnapshot, 
+        route: ActivatedRouteSnapshot,
         state: RouterStateSnapshot): Promise<any[]> {
 
         console.debug('EgCatalogResolver:resolve()');
index be68968..e07c409 100644 (file)
@@ -30,7 +30,7 @@ export class ResultFacetsComponent implements OnInit {
         this.facetConfig = FACET_CONFIG;
     }
 
-    ngOnInit() { 
+    ngOnInit() {
         this.searchContext = this.staffCat.searchContext;
     }
 
index 189fbce..88afc30 100644 (file)
@@ -17,7 +17,7 @@ export class ResultPaginationComponent implements OnInit {
         private staffCat: StaffCatalogService
     ) {}
 
-    ngOnInit() { 
+    ngOnInit() {
         this.searchContext = this.staffCat.searchContext;
     }
 
index 14f33e2..8abfbaf 100644 (file)
@@ -26,7 +26,7 @@ export class ResultRecordComponent implements OnInit {
         private staffCat: StaffCatalogService
     ) {}
 
-    ngOnInit() { 
+    ngOnInit() {
         this.searchContext = this.staffCat.searchContext;
         this.fleshHoldCount();
     }
index 1f29e85..f16d5b4 100644 (file)
@@ -18,7 +18,7 @@ export class ResultsComponent implements OnInit {
 
     searchContext: CatalogSearchContext;
 
-    // Cache record creator/editor since this will likely be a 
+    // Cache record creator/editor since this will likely be a
     // reasonably small set of data w/ lots of repitition.
     userCache: {[id:number] : EgIdlObject} = {};
 
@@ -30,15 +30,15 @@ export class ResultsComponent implements OnInit {
         private staffCat: StaffCatalogService
     ) {}
 
-    ngOnInit() { 
+    ngOnInit() {
         this.searchContext = this.staffCat.searchContext;
 
         // Our search context is initialized on page load.  Once
         // ResultsComponent is active, it will not be reinitialized,
         // even if the route parameters changes (unless we change the
         // route reuse policy).  Watch for changes here to pick up new
-        // searches.  
-        // 
+        // searches.
+        //
         // This will also fire on page load.
         this.route.queryParamMap.subscribe((params: ParamMap) => {
 
index 2376f80..068d033 100644 (file)
@@ -5,7 +5,7 @@ import {ResultsComponent} from './result/results.component';
 import {RecordComponent} from './record/record.component';
 import {EgCatalogResolver} from './resolver.service';
 
-const routes: Routes = [{ 
+const routes: Routes = [{
   path: '',
   component: EgCatalogComponent,
   resolve: {catResolver : EgCatalogResolver},
index d5f5e7b..7081eea 100644 (file)
@@ -2,7 +2,7 @@ import {Component, OnInit, AfterViewInit, Renderer2} from '@angular/core';
 import {EgIdlObject} from '@eg/core/idl.service';
 import {EgOrgService} from '@eg/core/org.service';
 import {EgCatalogService,} from '@eg/share/catalog/catalog.service';
-import {CatalogSearchContext, CatalogSearchState} 
+import {CatalogSearchContext, CatalogSearchState}
   from '@eg/share/catalog/search-context';
 import {StaffCatalogService} from './catalog.service';
 
@@ -25,12 +25,12 @@ export class SearchFormComponent implements OnInit, AfterViewInit {
         private staffCat: StaffCatalogService
     ) {}
 
-    ngOnInit() { 
+    ngOnInit() {
         this.ccvmMap = this.cat.ccvmMap;
         this.cmfMap = this.cat.cmfMap;
         this.searchContext = this.staffCat.searchContext;
 
-        // Start with advanced search options open 
+        // Start with advanced search options open
         // if any filters are active.
         this.showAdvancedSearch = this.hasAdvancedOptions();
 
index e7e8b29..86c61ae 100644 (file)
@@ -16,12 +16,12 @@ import {EgStringComponent} from '@eg/share/string/string.component';
 import {EgStringService} from '@eg/share/string/string.service';
 import {FmRecordEditorComponent} from '@eg/share/fm-editor/fm-editor.component';
 import {EgDateSelectComponent} from '@eg/share/date-select/date-select.component';
-import {EgLinkTableComponent, EgLinkTableLinkComponent} 
+import {EgLinkTableComponent, EgLinkTableLinkComponent}
     from '@eg/staff/share/link-table/link-table.component';
 
 /**
  * Imports the EG common modules and adds modules common to all staff UI's.
- */ 
+ */
 
 @NgModule({
   declarations: [
@@ -38,7 +38,7 @@ import {EgLinkTableComponent, EgLinkTableLinkComponent}
     EgOpChangeComponent,
     FmRecordEditorComponent,
     EgDateSelectComponent,
-    EgLinkTableComponent, 
+    EgLinkTableComponent,
     EgLinkTableLinkComponent
   ],
   imports: [
@@ -59,7 +59,7 @@ import {EgLinkTableComponent, EgLinkTableLinkComponent}
     EgOpChangeComponent,
     FmRecordEditorComponent,
     EgDateSelectComponent,
-    EgLinkTableComponent, 
+    EgLinkTableComponent,
     EgLinkTableLinkComponent
   ]
 })
index c3a62f4..86df59f 100644 (file)
@@ -25,7 +25,7 @@ export class EgStaffLoginComponent implements OnInit {
       private ngLocation: Location,
       private renderer: Renderer2,
       private auth: EgAuthService,
-      private store: EgStoreService 
+      private store: EgStoreService
     ) {}
 
     ngOnInit() {
@@ -73,9 +73,9 @@ export class EgStaffLoginComponent implements OnInit {
                         [`/staff/admin/workstation/workstations/remove/${workstation}`]);
                 } else {
                     // Force reload of the app after a successful login.
-                    // This allows the route resolver to re-run with a 
+                    // This allows the route resolver to re-run with a
                     // valid auth token and workstation.
-                    window.location.href = 
+                    window.location.href =
                         this.ngLocation.prepareExternalUrl(url);
                 }
             },
index 14db1d8..d36a17a 100644 (file)
@@ -31,7 +31,7 @@ export class EgStaffNavComponent implements OnInit {
     }
 
     // Broadcast to all tabs that we're logging out.
-    // Redirect to the login page, which performs the remaining 
+    // Redirect to the login page, which performs the remaining
     // logout duties.
     logout(): void {
         this.auth.broadcastLogout();
index 1746e4a..8598de5 100644 (file)
@@ -25,8 +25,8 @@ export class EgStaffResolver implements Resolve<Observable<any>> {
     observer: Observer<any>;
 
     constructor(
-        private router: Router, 
-        private route: ActivatedRoute, 
+        private router: Router,
+        private route: ActivatedRoute,
         private ngLocation: Location,
         private store: EgStoreService,
         private org: EgOrgService,
@@ -37,7 +37,7 @@ export class EgStaffResolver implements Resolve<Observable<any>> {
     ) {}
 
     resolve(
-        route: ActivatedRouteSnapshot, 
+        route: ActivatedRouteSnapshot,
         state: RouterStateSnapshot): Observable<any> {
 
         console.debug('EgStaffResolver:resolve()');
@@ -52,7 +52,7 @@ export class EgStaffResolver implements Resolve<Observable<any>> {
         let path = state.url.split('?')[0]
         if (path == '/staff/login') return Observable.of(true);
 
-        let observable: Observable<any> 
+        let observable: Observable<any>
             = Observable.create(o => this.observer = o);
 
         this.auth.testAuthToken().then(
@@ -67,13 +67,13 @@ export class EgStaffResolver implements Resolve<Observable<any>> {
                             },
                             wsNotOk => this.handleInvalidWorkstation(path)
                         );
-                    }, 
+                    },
                     hasNotPerms => {
                         this.observer.error(
                             'User does not have staff permissions');
                     }
                 );
-            }, 
+            },
             tokenNotOk => this.handleInvalidToken(state)
         );
 
@@ -99,9 +99,9 @@ export class EgStaffResolver implements Resolve<Observable<any>> {
             );
         });
     }
-    
 
-    // A page that's not the login page was requested without a 
+
+    // A page that's not the login page was requested without a
     // valid auth token.  Send the caller back to the login page.
     handleInvalidToken(state: RouterStateSnapshot): void {
         console.debug('EgStaffResolver: authtoken is not valid');
@@ -117,7 +117,7 @@ export class EgStaffResolver implements Resolve<Observable<any>> {
             this.observer.complete();
         } else {
             this.router.navigate([WS_MANAGE_PATH]);
-            this.observer.error(`Auth session linked to no 
+            this.observer.error(`Auth session linked to no
                 workstation or a workstation unknown to this browser`);
         }
     }
index 134140a..92f3d0a 100644 (file)
@@ -6,7 +6,7 @@ import {EgStaffLoginComponent} from './login.component';
 import {EgStaffSplashComponent} from './splash.component';
 
 // Not using 'canActivate' because it's called before all resolvers,
-// even the parent resolver, but the resolvers parse the IDL, load settings, 
+// even the parent resolver, but the resolvers parse the IDL, load settings,
 // etc.  Chicken, meet egg.
 
 const routes: Routes = [{
index 0fa4d3e..6d04a39 100644 (file)
@@ -2,7 +2,7 @@ import {NgModule} from '@angular/core';
 import {RouterModule, Routes} from '@angular/router';
 import {EgSandboxComponent} from './sandbox.component';
 
-const routes: Routes = [{ 
+const routes: Routes = [{
   path: '',
   component: EgSandboxComponent
 }];
index e7addc5..05943e4 100644 (file)
@@ -61,7 +61,7 @@ export class EgSandboxComponent implements OnInit {
 
         this.btSource.getRows = (pager: Pager) => {
             return this.pcrud.retrieveAll('cbt', {
-                offset: pager.offset, 
+                offset: pager.offset,
                 limit: pager.limit,
                 order_by: {cbt: 'name'}
             });
@@ -86,7 +86,7 @@ export class EgSandboxComponent implements OnInit {
 
         // every 250ms emit x*10 for 0-10
         Observable.timer(0, 250).pipe(
-            map(x => x * 10), 
+            map(x => x * 10),
             take(11)
         ).subscribe(
             val => this.progressDialog.update({value: val, max: 100}),
index ddfae2c..ea1d539 100644 (file)
@@ -17,6 +17,6 @@ import {EgGridModule} from '@eg/share/grid/grid.module';
   ]
 })
 
-export class EgSandboxModule { 
+export class EgSandboxModule {
 
 }
index c672add..ef64617 100644 (file)
@@ -29,7 +29,7 @@ export class EgBibSummaryComponent implements OnInit {
         private pcrud: EgPcrudService
     ) {}
 
-    ngOnInit() { 
+    ngOnInit() {
         this.initDone = true;
         if (this.summary) {
             this.fetchBibCallNumber();
@@ -39,10 +39,10 @@ export class EgBibSummaryComponent implements OnInit {
     }
 
     loadSummary(): void {
-        this.cat.getBibSummary(this.recordId).then(summary => { 
+        this.cat.getBibSummary(this.recordId).then(summary => {
             this.summary = summary;
             this.fetchBibCallNumber();
-            
+
             // Flesh the user data
             this.pcrud.search('au', {id: [summary.creator, summary.editor]})
             .subscribe(user => {
index f106b50..e290786 100644 (file)
@@ -25,7 +25,7 @@ export class EgLinkTableComponent implements AfterViewInit {
     }
 
     ngAfterViewInit() {
-        // table-ize the links 
+        // table-ize the links
         let rowCount = Math.ceil(this.links.length / this.columnCount);
         this.colWidth = Math.floor(12 / this.columnCount); // Bootstrap 12-grid
 
index 5d0b112..c4fccb7 100644 (file)
@@ -1,5 +1,5 @@
 import {Component, OnInit, Input, Renderer2} from '@angular/core';
-import {EgToastService} from '@eg/share/toast/toast.service';               
+import {EgToastService} from '@eg/share/toast/toast.service';
 import {EgAuthService} from '@eg/core/auth.service';
 import {EgDialogComponent} from '@eg/share/dialog/dialog.component';
 import {NgbModal} from '@ng-bootstrap/ng-bootstrap';
@@ -9,7 +9,7 @@ import {NgbModal} from '@ng-bootstrap/ng-bootstrap';
   templateUrl: 'op-change.component.html'
 })
 
-export class EgOpChangeComponent 
+export class EgOpChangeComponent
     extends EgDialogComponent implements OnInit {
 
     @Input() username: string;
@@ -36,12 +36,12 @@ export class EgOpChangeComponent
     }
 
     login(): Promise<any> {
-        if (!(this.username && this.password)) 
+        if (!(this.username && this.password))
             return Promise.reject('Missing Params');
-        
+
         return this.auth.login(
-            {   username    : this.username, 
-                password    : this.password, 
+            {   username    : this.username,
+                password    : this.password,
                 workstation : this.auth.workstation(),
                 type        : this.loginType
             },  true        // isOpChange
@@ -65,7 +65,7 @@ export class EgOpChangeComponent
         );
     }
 
-    restore(): Promise<any> { 
+    restore(): Promise<any> {
         return this.auth.undoOpChange().then(
             ok => this.toast.success(this.successMessage),
             err => this.toast.danger(this.failMessage)
index 3d22b88..28fb84f 100644 (file)
@@ -2,7 +2,7 @@ import {Component, OnInit, Input} from '@angular/core';
 
 @Component({
   selector: 'eg-staff-banner',
-  template: 
+  template:
     '<div class="lead alert alert-primary text-center pt-1 pb-1" role="alert">' +
       '<span>{{bannerText}}</span>' +
     '</div>'
index 190d8c7..0fdb4e7 100644 (file)
@@ -24,7 +24,7 @@ export class EgStaffSplashComponent implements OnInit {
         if (!this.catSearchQuery) return;
 
         this.router.navigate(
-            ['/staff/catalog/search'], 
+            ['/staff/catalog/search'],
             {queryParams: {query : this.catSearchQuery}}
         );
     }
index c8daf73..da270e5 100644 (file)
@@ -3,7 +3,7 @@ import {Router, ActivatedRoute, NavigationEnd} from '@angular/router';
 import {EgAuthService, EgAuthWsState} from '@eg/core/auth.service';
 import {EgNetService} from '@eg/core/net.service';
 import {EgAccessKeyService} from '@eg/share/accesskey/accesskey.service';
-import {EgAccessKeyInfoComponent} 
+import {EgAccessKeyInfoComponent}
     from '@eg/share/accesskey/accesskey-info.component';
 
 const LOGIN_PATH = '/staff/login';
@@ -41,7 +41,7 @@ export class EgStaffComponent implements OnInit {
         // Redirect to the login page on any auth timeout events.
         this.net.authExpired$.subscribe(expireEvent => {
 
-            // If the expired authtoken was identified locally (i.e. 
+            // If the expired authtoken was identified locally (i.e.
             // in this browser tab) notify all tabs of imminent logout.
             if (!expireEvent.viaExternal) this.auth.broadcastLogout();
 
@@ -73,7 +73,7 @@ export class EgStaffComponent implements OnInit {
      * Prevent the user from leaving the workstation admin page when
      * they don't have a valid workstation.
      *
-     * This does not verify auth tokens with the server on every route, 
+     * This does not verify auth tokens with the server on every route,
      * because that would be overkill.  This is only here to keep
      * people boxed in with their authenication state was already
      * known to be less then 100%.
@@ -84,7 +84,7 @@ export class EgStaffComponent implements OnInit {
         if (url.startsWith(LOGIN_PATH)) return;
 
         // We lost our authtoken, go back to the login page.
-        if (!this.auth.token()) 
+        if (!this.auth.token())
             this.router.navigate([LOGIN_PATH]);
 
         // No workstation checks needed for workstation admin page.
@@ -103,7 +103,7 @@ export class EgStaffComponent implements OnInit {
     }
 
     /*
-    @ViewChild('egAccessKeyInfo') 
+    @ViewChild('egAccessKeyInfo')
     private keyComponent: EgAccessKeyInfoComponent;
     */