Skip to content

Commit

Permalink
Merge branch 'nacsis-cat-ill'
Browse files Browse the repository at this point in the history
  • Loading branch information
Shay Hadar authored and Shay Hadar committed Dec 12, 2021
2 parents d7af6ef + c0213bd commit 7da3330
Show file tree
Hide file tree
Showing 61 changed files with 4,335 additions and 1,275 deletions.
7 changes: 6 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@
],
"url": "/node_modules/@exlibris/exl-cloudapp-base/manifest.schema.json"
}
]
],
"workbench.colorCustomizations": {
"activityBar.background": "#4E0E59",
"titleBar.activeBackground": "#6D147D",
"titleBar.activeForeground": "#FEFCFE"
}

}
4 changes: 3 additions & 1 deletion cloudapp/jsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"compilerOptions": {
"experimentalDecorators": true,
"target": "es5"
"target": "es5",

"resolveJsonModule": true
}
}
14 changes: 9 additions & 5 deletions cloudapp/src/app/app-routing.module.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,23 @@
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { MainComponent } from './main/main.component';
import { HoldingsComponent } from './holdings/holdings.component';
import { FormComponent } from './form/form.component';
import { MainComponent } from './holdings/main/main.component';
import { HoldingsComponent } from './holdings/viewHoldings/viewHoldings.component';
import { FormComponent } from './holdings/form/form.component';
import { ConfigurationComponent } from './configuration/configuration.component';
import { HelpComponent } from './help/help.component';
import { HelpComponent } from './holdings/help/help.component';
import { MainMenuComponent } from './main-menu/main-menu.component';
import { CatalogMainComponent } from './catalog/main/main.component';

const routes: Routes = [
{ path: '', component: MainComponent },
{ path: '', component: MainMenuComponent },
{ path: 'holdings', component: MainComponent },
{ path: 'configuration', component: ConfigurationComponent },
{ path: 'holdings/:mmsId/:mmsTitle', component: HoldingsComponent },
{ path: 'holdings/:mmsId/edit/:holdingId/:mmsTitle', component: FormComponent },
{ path: 'holdings/:mmsId/new/:mmsTitle', component: FormComponent },
{ path: 'holdings/:mmsId/view/:holdingId/:mmsTitle', component: FormComponent },
{ path: 'help', component: HelpComponent },
{ path: 'catalog', component: CatalogMainComponent }
];

@NgModule({
Expand Down
2 changes: 1 addition & 1 deletion cloudapp/src/app/app.component.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Component } from '@angular/core';
import { AppService } from './app.service';
import { AppService } from './service/app.service';

@Component({
selector: 'app-root',
Expand Down
37 changes: 27 additions & 10 deletions cloudapp/src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,36 @@ import { NgModule } from '@angular/core';
import { HttpClientModule } from '@angular/common/http';
import { BrowserModule } from '@angular/platform-browser';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { MaterialModule, getTranslateModule, AlertModule } from '@exlibris/exl-cloudapp-angular-lib';
import { MaterialModule, getTranslateModule, AlertModule, MenuModule } from '@exlibris/exl-cloudapp-angular-lib';
import { ToastrModule } from 'ngx-toastr';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { FlexLayoutModule } from '@angular/flex-layout';
import { MatDialogModule } from '@angular/material/dialog';

import { AppComponent } from './app.component';
import { AppRoutingModule } from './app-routing.module';
import { MainComponent } from './main/main.component';
import { FooterComponent } from './footer/footer.component';
import { HoldingsComponent } from './holdings/holdings.component';
import { FormComponent } from './form/form.component';
import { FormComponent } from './holdings/form/form.component';
import { ConfigurationComponent } from './configuration/configuration.component';
import {ConfirmationDialog} from './dialog/confirmation-dialog.component';
import { MainMenuComponent } from './main-menu/main-menu.component';

// Holding
import { MainComponent } from './holdings/main/main.component';
import { HoldingsComponent } from './holdings/viewHoldings/viewHoldings.component';
import { HelpComponent } from './holdings/help/help.component';

// Catalog
import { CatalogMainComponent } from './catalog/main/main.component';
import { FullviewDisplayComponent } from './catalog/full-view-display/full-view-display.component';

// User Controls
import { SearchFormComponent } from './user-controls/search-form/search-form.component';
import { ResultsListComponent } from './user-controls/results-list/results-list.component';
import { ResultCardComponent } from './user-controls/result-card/result-card.component';

import { FlexLayoutModule } from '@angular/flex-layout';

import {MatDialogModule} from '@angular/material/dialog';
import {ConfirmationDialog} from './dialog/confirmation-dialog.component';

import {ErrorMessageComponent} from './error-message/error-message.component';
import { HelpComponent } from './help/help.component';

export function getToastrModule() {
return ToastrModule.forRoot({
Expand All @@ -38,8 +49,13 @@ export function getToastrModule() {
FormComponent,
ConfigurationComponent,
ConfirmationDialog,
ErrorMessageComponent,
HelpComponent,
MainMenuComponent,
CatalogMainComponent,
SearchFormComponent,
ResultsListComponent,
ResultCardComponent,
FullviewDisplayComponent,
],
entryComponents: [ConfirmationDialog],
imports: [
Expand All @@ -55,6 +71,7 @@ export function getToastrModule() {
getToastrModule(),
FlexLayoutModule,
AlertModule,
MenuModule,
],
providers: [],
bootstrap: [
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<div class="full-view-record">
<div *ngFor="let line of resultFullDisplay;index as i" class="full-view-line {{isEvenRow(i)}}">
<div class="full-view-line-header">
{{line.getHeaderLabel()}}
</div>
<div class="full-view-line-content">
<div class="full-view-line-field" *ngFor="let field of line.getContent()">
<div class="full-view-line-field-label" *ngIf="field.hasLabel()">
{{field.getLabel()}}
</div>
<a *ngIf="field.isLinkable() else noLink" (click)="onFullViewLink(field.getLink(), field.getContent())">
{{field.getContent()}}
</a>
<ng-template #noLink>
{{field.getContent()}}
</ng-template>
</div>
</div>
</div>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
.full-view-line {
display: grid;
grid-template-columns: 100px auto;
padding-top: 0.5em;
padding-bottom: 0.5em;
&:first-child {
padding-right: 12px;
}
}

.even {
background-color: whitesmoke;
}

.full-view-line-header {
font-weight: bold;
padding-right: 15px;
padding-left: 5px;
}

.full-view-line-content {
display: flex;
flex-wrap: wrap;
}

.full-view-line-field {
display: flex;
padding-right: 10px;
}

.full-view-line-field-label {
font-weight: bold;
padding-right: 5px;
}

a,
a label {
cursor: pointer;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import { Component, Input, Output, EventEmitter } from '@angular/core';
import { SearchType } from '../../user-controls/search-form/search-form-utils';


@Component({
selector: 'full-view-display',
templateUrl: './full-view-display.component.html',
styleUrls: ['./full-view-display.component.scss']
})

export class FullviewDisplayComponent {

@Input() resultFullDisplay;
@Output() onFullViewLinkSelected = new EventEmitter<FullViewLink>();


constructor() { }

onFullViewLink(searchType: SearchType, linkID: string) {
this.onFullViewLinkSelected.emit(new FullViewLink(searchType, linkID));
}

isEvenRow(i: number) {
if (i % 2 == 0) {
return "even";
}
}

}


export class FullViewLink {
constructor (
public searchType: SearchType,
public linkID: string
) { }
}
91 changes: 91 additions & 0 deletions cloudapp/src/app/catalog/main/main.component.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
<div class="align-space-between" fxLayout="row">
<button mat-flat-button color="secondary" [routerLink]="['']">
<mat-icon>arrow_back_ios</mat-icon>
{{ 'General.BackToMenu' | translate }}
</button>
<div class="align-to-right" fxLayout="row">
<button style="margin-right: 15px" mat-flat-button color="secondary" (click)="clear()">
{{ 'General.Clear' | translate }}
</button>
<button mat-flat-button color="primary" type="submit" (click)="search()">
{{ 'General.Search' | translate }}
</button>
</div>
</div>
<br>

<p> {{'Catalog.Form.MainTitle' | translate}} </p>

<mat-tab-group (selectedTabChange)="onTabChange($event)">
<mat-tab *ngFor="let searchType of getSearchTypesLabels()" label="{{ searchType | translate }}">
<mat-accordion>
<mat-expansion-panel (opened)="panelOpenState()" (closed)="panelCloseState()" [expanded]="panelState">
<mat-expansion-panel-header>
<mat-panel-title *ngIf="!panelState">{{ 'Catalog.Form.RefineSearch' | translate }}</mat-panel-title>
</mat-expansion-panel-header>
<search-form [databasesList]="getCurrentDatabases()" [fieldsList]="getSearchFields()"
(selectedDatabase)="setCurrentDatabase($event)">
</search-form>
<br>
</mat-expansion-panel>
</mat-accordion>
</mat-tab>
</mat-tab-group>
<br><br>

<ng-container *ngTemplateOutlet="currentResulsTmpl"></ng-container>

<div class="loading-shade" *ngIf="loading">
<mat-progress-spinner mode="indeterminate" diameter="50">
</mat-progress-spinner>
</div>

<br><br><br>


<ng-template #searchResults>
<results-list [numOfResults]="numOfResults" [pageIndex]="pageIndex" [pageSize]="pageSize"
[resultsSummaryDisplay]="resultsSummaryDisplay" [resultActionList]="getActionMenu()"
(onActionSelected)="onActionsClick($event)" (onTitleSelected)="onTitleClick($event)"
(onPageSelected)="onPageAction($event)">
</results-list>
</ng-template>


<ng-template #noResults>
<div class="noResults">
<span class="uxf-icon uxf-list" style="font-size: 3em;"></span>
<h2>{{'Catalog.Results.NoRecordsExist' | translate}}</h2>
</div>
<br><br><br>
</ng-template>


<ng-template #notSearched>
<div class="notSearched"></div>
</ng-template>


<ng-template #fullRecord>
<button mat-flat-button color="secondary" (click)="onBackFromFullView()">
<mat-icon>arrow_back_ios</mat-icon>
{{'General.Back' | translate}}
</button>
<br><br><br>
<div class="full-view">
<div class="full-view-left-table" *ngIf="!(isColapsedMode && isRightTableOpen)">
<full-view-display [resultFullDisplay]="resultFullDisplay" (onFullViewLinkSelected)="onFullViewLink($event)">
</full-view-display>
</div>
<div class="full-view-right-table" (window:resize)="onResize($event)" *ngIf="isRightTableOpen">
<button class="close-button" (click)="onFullViewLinkClose()">
<i class="uxf-icon uxf-close eca-button" aria-label="Delete" (click)="delete(i)"></i>
</button>
<div *ngIf="resultFullLinkDisplay != null else noResults">
<full-view-display [resultFullDisplay]="resultFullLinkDisplay">
</full-view-display>
</div>
</div>
</div>

</ng-template>
58 changes: 58 additions & 0 deletions cloudapp/src/app/catalog/main/main.component.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
p {
margin-bottom: 0px;
}

.align-to-left {
justify-content: flex-start;
margin-bottom: 15px;
}

.align-to-right {
justify-content: flex-end;
}

.align-space-between {
justify-content: space-between;
margin-bottom: 20px;
}

.noResults{
text-align: center;
height: fit-content;
margin-top: 40px;
}


.full-view {
display: flex;
flex-direction: row;

}

.full-view-left-table {
flex: 1;
margin-right: 8px;
}

.full-view-right-table {
position: relative;
flex: 1;
}

a,
a label {
cursor: pointer;
}


.close-button {
background: transparent;
border: none;
position: absolute;
right: 2px;
top: 2px;
i {
font-size: 12px;
}
}

Loading

0 comments on commit 7da3330

Please sign in to comment.