From e0d7312499c19d564954e7efa2d924658cbf6304 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johnny=20Marie=CC=81thoz?= Date: Mon, 2 Dec 2024 16:34:04 +0100 Subject: [PATCH] in progress MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Johnny MarieĢthoz --- angular.json | 237 ++---------------- package.json | 4 +- .../src/app/app.module.ts | 87 ++++--- projects/public-holdings-items/src/index.html | 22 +- .../src/app/app.component.html | 20 ++ .../src/app/app.component.ts} | 16 +- .../src/app/app.module.ts | 87 ++++--- projects/public-patron-profile/src/index.html | 22 +- projects/public-search/src/app/app.module.ts | 15 +- .../document-detail-view.component.html | 13 +- .../document-detail-view.component.scss | 4 + .../document-detail-view.component.ts | 19 +- .../electronic-holdings.component.html | 4 +- .../holdings/holdings.component.html | 13 +- .../holdings/items/items.component.scss | 18 -- .../holdings/items/items.component.ts | 3 +- .../pickup-location.component.html | 6 +- .../patron-profile-loan.component.ts | 1 - .../patron-profile-password.component.ts | 10 +- ...atron-profile-personal-editor.component.ts | 10 +- .../patron-profile-personal.component.html | 4 +- .../patron-profile-request.component.ts | 1 - .../patron-profile.component.html | 1 - .../patron-profile.component.ts | 11 +- .../src/app/routes/documents-route.service.ts | 10 +- .../src/app/scss/bootstrap_styles.scss | 11 +- .../public-search/src/app/scss/styles.scss | 9 +- projects/public-search/src/index.html | 19 +- .../.browserslistrc | 18 -- .../.eslintrc.json | 37 --- .../e2e/protractor.conf.js | 37 --- .../e2e/src/app.e2e-spec.ts | 23 -- .../e2e/src/app.po.ts | 11 - .../e2e/tsconfig.json | 13 - .../public-user-password-change/karma.conf.js | 44 ---- .../src/app/app-config.service.spec.ts | 32 --- .../src/app/app-config.service.ts | 45 ---- .../src/app/app-initializer.service.spec.ts | 32 --- .../src/app/app-initializer.service.ts | 52 ---- .../src/app/app.module.ts | 75 ------ .../src/assets/.gitkeep | 0 .../src/environments/environment.prod.ts | 28 --- .../src/environments/environment.ts | 42 ---- .../src/favicon.ico | Bin 948 -> 0 bytes .../src/index.html | 54 ---- .../public-user-password-change/src/main.ts | 12 - .../src/polyfills.ts | 53 ---- .../public-user-password-change/src/test.ts | 25 -- .../tsconfig.app.json | 15 -- .../tsconfig.spec.json | 18 -- .../public-user-profile-edit/.browserslistrc | 18 -- .../public-user-profile-edit/.eslintrc.json | 37 --- .../e2e/protractor.conf.js | 37 --- .../e2e/src/app.e2e-spec.ts | 23 -- .../e2e/src/app.po.ts | 11 - .../e2e/tsconfig.json | 13 - .../public-user-profile-edit/karma.conf.js | 44 ---- .../src/app/app-config.service.spec.ts | 32 --- .../src/app/app-config.service.ts | 46 ---- .../src/app/app-initializer.service.spec.ts | 32 --- .../src/app/app-initializer.service.ts | 52 ---- .../src/app/app.module.ts | 76 ------ .../src/environments/environment.prod.ts | 28 --- .../src/environments/environment.ts | 42 ---- .../public-user-profile-edit/src/favicon.ico | Bin 948 -> 0 bytes .../public-user-profile-edit/src/index.html | 54 ---- projects/public-user-profile-edit/src/main.ts | 12 - .../public-user-profile-edit/src/polyfills.ts | 53 ---- projects/public-user-profile-edit/src/test.ts | 25 -- .../tsconfig.app.json | 14 -- .../tsconfig.spec.json | 18 -- projects/search-bar/src/index.html | 16 +- .../document-brief-view.component.html | 4 +- .../document-brief-view.component.scss | 23 -- .../document-brief-view.component.ts | 3 +- .../document-description.component.html | 2 + .../other-edition.component.html | 48 ++-- .../other-edition/other-edition.component.ts | 3 - .../documents/files/files.component.html | 2 +- .../documents/files/files.component.scss | 37 +-- .../remote-search-config.service.ts | 4 +- .../remote-search/remote-search.component.ts | 4 +- .../prime-ng-import/prime-ng-import.module.ts | 6 +- .../view/thumbnail/thumbnail.component.html | 4 +- .../view/thumbnail/thumbnail.component.scss | 2 - projects/shared/src/scss/styles.scss | 15 +- 86 files changed, 298 insertions(+), 1885 deletions(-) create mode 100644 projects/public-patron-profile/src/app/app.component.html rename projects/{public-search/src/app/patron-profile/patron-profile-personal/patron-profile-personal.component.scss => public-patron-profile/src/app/app.component.ts} (76%) create mode 100644 projects/public-search/src/app/document-detail/document-detail-view/document-detail-view.component.scss delete mode 100644 projects/public-search/src/app/document-detail/holdings/items/items.component.scss delete mode 100644 projects/public-user-password-change/.browserslistrc delete mode 100644 projects/public-user-password-change/.eslintrc.json delete mode 100644 projects/public-user-password-change/e2e/protractor.conf.js delete mode 100644 projects/public-user-password-change/e2e/src/app.e2e-spec.ts delete mode 100644 projects/public-user-password-change/e2e/src/app.po.ts delete mode 100644 projects/public-user-password-change/e2e/tsconfig.json delete mode 100644 projects/public-user-password-change/karma.conf.js delete mode 100644 projects/public-user-password-change/src/app/app-config.service.spec.ts delete mode 100644 projects/public-user-password-change/src/app/app-config.service.ts delete mode 100644 projects/public-user-password-change/src/app/app-initializer.service.spec.ts delete mode 100644 projects/public-user-password-change/src/app/app-initializer.service.ts delete mode 100644 projects/public-user-password-change/src/app/app.module.ts delete mode 100644 projects/public-user-password-change/src/assets/.gitkeep delete mode 100644 projects/public-user-password-change/src/environments/environment.prod.ts delete mode 100644 projects/public-user-password-change/src/environments/environment.ts delete mode 100644 projects/public-user-password-change/src/favicon.ico delete mode 100644 projects/public-user-password-change/src/index.html delete mode 100644 projects/public-user-password-change/src/main.ts delete mode 100644 projects/public-user-password-change/src/polyfills.ts delete mode 100644 projects/public-user-password-change/src/test.ts delete mode 100644 projects/public-user-password-change/tsconfig.app.json delete mode 100644 projects/public-user-password-change/tsconfig.spec.json delete mode 100644 projects/public-user-profile-edit/.browserslistrc delete mode 100644 projects/public-user-profile-edit/.eslintrc.json delete mode 100644 projects/public-user-profile-edit/e2e/protractor.conf.js delete mode 100644 projects/public-user-profile-edit/e2e/src/app.e2e-spec.ts delete mode 100644 projects/public-user-profile-edit/e2e/src/app.po.ts delete mode 100644 projects/public-user-profile-edit/e2e/tsconfig.json delete mode 100644 projects/public-user-profile-edit/karma.conf.js delete mode 100644 projects/public-user-profile-edit/src/app/app-config.service.spec.ts delete mode 100644 projects/public-user-profile-edit/src/app/app-config.service.ts delete mode 100644 projects/public-user-profile-edit/src/app/app-initializer.service.spec.ts delete mode 100644 projects/public-user-profile-edit/src/app/app-initializer.service.ts delete mode 100644 projects/public-user-profile-edit/src/app/app.module.ts delete mode 100644 projects/public-user-profile-edit/src/environments/environment.prod.ts delete mode 100644 projects/public-user-profile-edit/src/environments/environment.ts delete mode 100644 projects/public-user-profile-edit/src/favicon.ico delete mode 100644 projects/public-user-profile-edit/src/index.html delete mode 100644 projects/public-user-profile-edit/src/main.ts delete mode 100644 projects/public-user-profile-edit/src/polyfills.ts delete mode 100644 projects/public-user-profile-edit/src/test.ts delete mode 100644 projects/public-user-profile-edit/tsconfig.app.json delete mode 100644 projects/public-user-profile-edit/tsconfig.spec.json delete mode 100644 projects/shared/src/lib/component/documents/document-brief-view/document-brief-view.component.scss diff --git a/angular.json b/angular.json index 24d3f0227..10659eb88 100644 --- a/angular.json +++ b/angular.json @@ -162,7 +162,7 @@ } ], "styles": [ - "projects/public-search/src/app/scss/styles.scss" + "projects/public-search/src/app/scss/bootstrap_styles.scss" ], "scripts": [], "vendorChunk": true, @@ -187,6 +187,9 @@ "extractLicenses": true, "vendorChunk": false, "buildOptimizer": true, + "styles": [ + "projects/public-search/src/app/scss/styles.scss" + ], "budgets": [ { "type": "initial", @@ -397,7 +400,7 @@ } ], "styles": [ - "projects/public-search/src/app/scss/styles.scss" + "projects/public-search/src/app/scss/bootstrap_styles.scss" ], "scripts": [], "vendorChunk": true, @@ -422,6 +425,9 @@ "extractLicenses": true, "vendorChunk": false, "buildOptimizer": true, + "styles": [ + "projects/public-search/src/app/scss/styles.scss" + ], "budgets": [ { "type": "initial", @@ -520,6 +526,7 @@ "build": { "builder": "@angular-devkit/build-angular:browser", "options": { + "baseHref": "/highlands/patrons/profile", "allowedCommonJsDependencies": [ "crypto-js", "easymde", @@ -545,7 +552,7 @@ } ], "styles": [ - "projects/public-search/src/app/scss/styles.scss" + "projects/public-search/src/app/scss/bootstrap_styles.scss" ], "scripts": [], "vendorChunk": true, @@ -570,7 +577,11 @@ "extractLicenses": true, "vendorChunk": false, "buildOptimizer": true, + "styles": [ + "projects/public-search/src/app/scss/styles.scss" + ], "deployUrl": "/static/node_modules/@rero/rero-ils-ui/dist/public-patron-profile/", + "baseHref": "", "budgets": [ { "type": "initial", @@ -627,226 +638,6 @@ } } } - }, - "public-user-profile-edit": { - "projectType": "application", - "schematics": {}, - "root": "projects/public-user-profile-edit", - "sourceRoot": "projects/public-user-profile-edit/src", - "prefix": "app", - "architect": { - "build": { - "builder": "@angular-devkit/build-angular:browser", - "options": { - "allowedCommonJsDependencies": ["crypto-js", "easymde", "moment"], - "outputPath": "build/dist/public-user-profile-edit", - "index": "projects/public-user-profile-edit/src/index.html", - "main": "projects/public-user-profile-edit/src/main.ts", - "polyfills": "projects/public-user-profile-edit/src/polyfills.ts", - "tsConfig": "projects/public-user-profile-edit/tsconfig.app.json", - "assets": [ - { - "glob": "**/*.json", - "input": "projects/public-search/src/assets", - "output": "/assets/" - }, - { - "glob": "**/*.json", - "input": "projects/shared/src/assets", - "output": "/assets/" - } - ], - "styles": [ - "projects/public-search/src/app/scss/styles.scss" - ], - "scripts": [], - "vendorChunk": true, - "extractLicenses": false, - "buildOptimizer": false, - "sourceMap": true, - "optimization": false, - "namedChunks": true - }, - "configurations": { - "production": { - "fileReplacements": [ - { - "replace": "projects/public-user-profile-edit/src/environments/environment.ts", - "with": "projects/public-user-profile-edit/src/environments/environment.prod.ts" - } - ], - "optimization": true, - "outputHashing": "all", - "sourceMap": false, - "namedChunks": false, - "extractLicenses": true, - "vendorChunk": false, - "buildOptimizer": true, - "budgets": [ - { - "type": "initial", - "maximumWarning": "2mb", - "maximumError": "5mb" - }, - { - "type": "anyComponentStyle", - "maximumWarning": "6kb", - "maximumError": "10kb" - } - ] - } - } - }, - "serve": { - "builder": "@angular-devkit/build-angular:dev-server", - "options": { - "port": 4206, - "buildTarget": "public-user-profile-edit:build" - }, - "configurations": { - "production": { - "buildTarget": "public-user-profile-edit:build:production" - } - } - }, - "extract-i18n": { - "builder": "@angular-devkit/build-angular:extract-i18n", - "options": { - "buildTarget": "public-user-profile-edit:build" - } - }, - "e2e": { - "builder": "@angular-devkit/build-angular:protractor", - "options": { - "protractorConfig": "projects/public-user-profile-edit/e2e/protractor.conf.js", - "devServerTarget": "public-user-profile-edit:serve" - }, - "configurations": { - "production": { - "devServerTarget": "public-user-profile-edit:serve:production" - } - } - }, - "lint": { - "builder": "@angular-eslint/builder:lint", - "options": { - "lintFilePatterns": [ - "projects/public-user-profile-edit/src/**/*.ts", - "projects/public-user-profile-edit/src/**/*.html" - ] - } - } - } - }, - "public-user-password-change": { - "projectType": "application", - "schematics": {}, - "root": "projects/public-user-password-change", - "sourceRoot": "projects/public-user-password-change/src", - "prefix": "app", - "architect": { - "build": { - "builder": "@angular-devkit/build-angular:browser", - "options": { - "allowedCommonJsDependencies": ["crypto-js", "easymde", "moment"], - "outputPath": "build/dist/public-user-password-change", - "index": "projects/public-user-password-change/src/index.html", - "main": "projects/public-user-password-change/src/main.ts", - "polyfills": "projects/public-user-password-change/src/polyfills.ts", - "tsConfig": "projects/public-user-password-change/tsconfig.app.json", - "assets": [ - { - "glob": "**/*.json", - "input": "projects/public-search/src/assets", - "output": "/assets/" - }, - { - "glob": "**/*.json", - "input": "projects/shared/src/assets", - "output": "/assets/" - } - ], - "styles": [ - "projects/public-search/src/app/scss/styles.scss" - ], - "scripts": [], - "vendorChunk": true, - "extractLicenses": false, - "buildOptimizer": false, - "sourceMap": true, - "optimization": false, - "namedChunks": true - }, - "configurations": { - "production": { - "fileReplacements": [ - { - "replace": "projects/public-user-password-change/src/environments/environment.ts", - "with": "projects/public-user-password-change/src/environments/environment.prod.ts" - } - ], - "optimization": true, - "outputHashing": "all", - "sourceMap": false, - "namedChunks": false, - "extractLicenses": true, - "vendorChunk": false, - "buildOptimizer": true, - "budgets": [ - { - "type": "initial", - "maximumWarning": "2mb", - "maximumError": "5mb" - }, - { - "type": "anyComponentStyle", - "maximumWarning": "6kb", - "maximumError": "10kb" - } - ] - } - } - }, - "serve": { - "builder": "@angular-devkit/build-angular:dev-server", - "options": { - "port": 4205, - "buildTarget": "public-user-password-change:build" - }, - "configurations": { - "production": { - "buildTarget": "public-user-password-change:build:production" - } - } - }, - "extract-i18n": { - "builder": "@angular-devkit/build-angular:extract-i18n", - "options": { - "buildTarget": "public-user-password-change:build" - } - }, - "e2e": { - "builder": "@angular-devkit/build-angular:protractor", - "options": { - "protractorConfig": "projects/public-user-password-change/e2e/protractor.conf.js", - "devServerTarget": "public-user-password-change:serve" - }, - "configurations": { - "production": { - "devServerTarget": "public-user-password-change:serve:production" - } - } - }, - "lint": { - "builder": "@angular-eslint/builder:lint", - "options": { - "lintFilePatterns": [ - "projects/public-user-password-change/src/**/*.ts", - "projects/public-user-password-change/src/**/*.html" - ] - } - } - } } }, "cli": { diff --git a/package.json b/package.json index a8d05172d..1fd48b270 100644 --- a/package.json +++ b/package.json @@ -48,11 +48,9 @@ "start-public-patron-profile-proxy": "ng serve public-patron-profile --proxy-config proxy.conf.json", "start-public-holdings-items-proxy": "ng serve public-holdings-items --proxy-config proxy.conf.json", "start-public-search-proxy": "ng serve public-search --proxy-config proxy.conf.json", - "start-public-user-password-change-proxy": "ng serve public-user-password-change --proxy-config proxy.conf.json", - "start-public-user-profile-edit-proxy": "ng serve public-user-profile-edit --proxy-config proxy.conf.json", "start-search-bar-proxy": "ng serve search-bar --proxy-config proxy.conf.json", "build-shared": "ng build --configuration production shared", - "build": "npm run build-shared && ng build admin --configuration production && ng build public-patron-profile --configuration production && ng build public-user-password-change --configuration production && ng build public-user-profile-edit --configuration production && ng build public-search --configuration production && ng build public-holdings-items --configuration production && ng build search-bar --configuration production", + "build": "npm run build-shared && ng build admin --configuration production && ng build public-patron-profile --configuration production && ng build public-search --configuration production && ng build public-holdings-items --configuration production && ng build search-bar --configuration production", "pack": "npm run build && ./scripts/dist_pkg.js -o build && cd build && npm pack", "test": "ng test", "lint": "ng lint --cache", diff --git a/projects/public-holdings-items/src/app/app.module.ts b/projects/public-holdings-items/src/app/app.module.ts index b05a8351d..8f55c50b4 100644 --- a/projects/public-holdings-items/src/app/app.module.ts +++ b/projects/public-holdings-items/src/app/app.module.ts @@ -31,6 +31,7 @@ import { CoreConfigService, CoreModule, NgCoreTranslateService, RecordModule, Tr import { SharedModule } from '@rero/shared'; import { AccordionModule } from 'primeng/accordion'; import { DividerModule } from 'primeng/divider'; +import { MenubarModule } from 'primeng/menubar'; import { DocumentDetailViewComponent } from 'projects/public-search/src/app/document-detail/document-detail-view/document-detail-view.component'; import { ElectronicHoldingsComponent } from 'projects/public-search/src/app/document-detail/document-detail-view/holdings/electronic-holdings/electronic-holdings.component'; import { HoldingComponent } from 'projects/public-search/src/app/document-detail/holdings/holding/holding.component'; @@ -49,52 +50,50 @@ export function appInitFactory(appInitializerService: AppInitializerService): () } @NgModule({ - declarations: [ - HoldingComponent, - HoldingsComponent, - ItemComponent, - ItemsComponent, - PickupLocationComponent, - RequestComponent, - DocumentDetailViewComponent, - ElectronicHoldingsComponent - ], - imports: [ - AccordionModule, - BrowserModule, - BrowserAnimationsModule, - DividerModule, - RouterModule.forRoot([]), - HttpClientModule, - FormsModule, - FormlyModule.forRoot(), - FormlyPrimeNGModule, - CoreModule, - RecordModule, - ReactiveFormsModule, - TranslateModule.forRoot({ - loader: { - provide: BaseTranslateLoader, - useClass: TranslateLoader, - deps: [CoreConfigService, HttpClient] - }, - isolate: false - }), - SharedModule, - LoadingBarHttpClientModule, - LoadingBarModule - ], - providers: [ - { provide: TranslateService, useClass: NgCoreTranslateService }, - { provide: APP_INITIALIZER, useFactory: appInitFactory, deps: [AppInitializerService], multi: true }, - { provide: CoreConfigService, useClass: AppConfigService } - ], - schemas: [ - CUSTOM_ELEMENTS_SCHEMA - ] + declarations: [ + HoldingComponent, + HoldingsComponent, + ItemComponent, + ItemsComponent, + PickupLocationComponent, + RequestComponent, + DocumentDetailViewComponent, + ElectronicHoldingsComponent, + ], + imports: [ + AccordionModule, + MenubarModule, + BrowserModule, + BrowserAnimationsModule, + DividerModule, + RouterModule.forRoot([]), + HttpClientModule, + FormsModule, + FormlyModule.forRoot(), + FormlyPrimeNGModule, + CoreModule, + RecordModule, + ReactiveFormsModule, + TranslateModule.forRoot({ + loader: { + provide: BaseTranslateLoader, + useClass: TranslateLoader, + deps: [CoreConfigService, HttpClient], + }, + isolate: false, + }), + SharedModule, + LoadingBarHttpClientModule, + LoadingBarModule, + ], + providers: [ + { provide: TranslateService, useClass: NgCoreTranslateService }, + { provide: APP_INITIALIZER, useFactory: appInitFactory, deps: [AppInitializerService], multi: true }, + { provide: CoreConfigService, useClass: AppConfigService }, + ], + schemas: [CUSTOM_ELEMENTS_SCHEMA], }) export class AppModule implements DoBootstrap { - private injector: Injector = inject(Injector); ngDoBootstrap(): void { diff --git a/projects/public-holdings-items/src/index.html b/projects/public-holdings-items/src/index.html index ad9c950a8..662d7c6f4 100644 --- a/projects/public-holdings-items/src/index.html +++ b/projects/public-holdings-items/src/index.html @@ -23,24 +23,8 @@ - - - @@ -49,9 +33,9 @@

Document holdings items

+ documentpid="2000213" viewcode="global"> For babeltec. - +
diff --git a/projects/public-patron-profile/src/app/app.component.html b/projects/public-patron-profile/src/app/app.component.html new file mode 100644 index 000000000..fa25dd84e --- /dev/null +++ b/projects/public-patron-profile/src/app/app.component.html @@ -0,0 +1,20 @@ + + + + + diff --git a/projects/public-search/src/app/patron-profile/patron-profile-personal/patron-profile-personal.component.scss b/projects/public-patron-profile/src/app/app.component.ts similarity index 76% rename from projects/public-search/src/app/patron-profile/patron-profile-personal/patron-profile-personal.component.scss rename to projects/public-patron-profile/src/app/app.component.ts index d0fed2dba..b95c4c78c 100644 --- a/projects/public-search/src/app/patron-profile/patron-profile-personal/patron-profile-personal.component.scss +++ b/projects/public-patron-profile/src/app/app.component.ts @@ -1,6 +1,6 @@ /* * RERO ILS UI - * Copyright (C) 2021 RERO + * Copyright (C) 2021-2024 RERO * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by @@ -15,12 +15,12 @@ * along with this program. If not, see . */ +import { Component } from '@angular/core'; + +@Component({ + selector: 'public-patron-profile-app', + templateUrl: './app.component.html' +}) +export class AppComponent { -public-search-patron-profile-personal { - .p-button { - @extend .text-white, .font-bold; - &:hover { - @extend .no-underline; - } - } } diff --git a/projects/public-patron-profile/src/app/app.module.ts b/projects/public-patron-profile/src/app/app.module.ts index 90f8c9456..997f0e292 100644 --- a/projects/public-patron-profile/src/app/app.module.ts +++ b/projects/public-patron-profile/src/app/app.module.ts @@ -14,34 +14,33 @@ * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see . */ +import { APP_BASE_HREF, CommonModule, PlatformLocation } from '@angular/common'; import { HttpClient } from '@angular/common/http'; -import { APP_INITIALIZER, CUSTOM_ELEMENTS_SCHEMA, DoBootstrap, inject, Injector, NgModule } from '@angular/core'; -import { createCustomElement } from '@angular/elements'; +import { APP_INITIALIZER, CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core'; +import { ReactiveFormsModule } from '@angular/forms'; import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; -import { RouterModule } from '@angular/router'; +import { RouterLink, RouterLinkActive, RouterModule, RouterOutlet, Routes } from '@angular/router'; +import { FormlyModule } from '@ngx-formly/core'; import { LoadingBarHttpClientModule } from '@ngx-loading-bar/http-client'; import { TranslateLoader as BaseTranslateLoader, TranslateModule, TranslateService } from '@ngx-translate/core'; import { CoreConfigService, NgCoreTranslateService, RecordModule, TranslateLoader } from '@rero/ng-core'; import { SharedModule } from '@rero/shared'; import { PatronProfileDocumentComponent } from 'projects/public-search/src/app/patron-profile/patron-profile-document/patron-profile-document.component'; import { PatronProfileFeeComponent } from 'projects/public-search/src/app/patron-profile/patron-profile-fees/patron-profile-fee/patron-profile-fee.component'; -import { - PatronProfileFeesComponent -} from 'projects/public-search/src/app/patron-profile/patron-profile-fees/patron-profile-fees.component'; +import { PatronProfileFeesComponent } from 'projects/public-search/src/app/patron-profile/patron-profile-fees/patron-profile-fees.component'; import { PatronProfileHistoriesComponent } from 'projects/public-search/src/app/patron-profile/patron-profile-histories/patron-profile-histories.component'; import { PatronProfileHistoryComponent } from 'projects/public-search/src/app/patron-profile/patron-profile-histories/patron-profile-history/patron-profile-history.component'; import { PatronProfileIllRequestComponent } from 'projects/public-search/src/app/patron-profile/patron-profile-ill-requests/patron-profile-ill-request/patron-profile-ill-request.component'; import { PatronProfileIllRequestsComponent } from 'projects/public-search/src/app/patron-profile/patron-profile-ill-requests/patron-profile-ill-requests.component'; -import { - PatronProfileLoanComponent -} from 'projects/public-search/src/app/patron-profile/patron-profile-loans/patron-profile-loan/patron-profile-loan.component'; -import { - PatronProfileLoansComponent -} from 'projects/public-search/src/app/patron-profile/patron-profile-loans/patron-profile-loans.component'; -import { - PatronProfileMenuComponent -} from 'projects/public-search/src/app/patron-profile/patron-profile-menu/patron-profile-menu.component'; +import { PatronProfileLoanComponent } from 'projects/public-search/src/app/patron-profile/patron-profile-loans/patron-profile-loan/patron-profile-loan.component'; +import { PatronProfileLoansComponent } from 'projects/public-search/src/app/patron-profile/patron-profile-loans/patron-profile-loans.component'; +import { PatronProfileMenuComponent } from 'projects/public-search/src/app/patron-profile/patron-profile-menu/patron-profile-menu.component'; import { PatronProfileMessageComponent } from 'projects/public-search/src/app/patron-profile/patron-profile-message/patron-profile-message.component'; +import { + fieldPasswordMatchValidator, + PatronProfilePasswordComponent, +} from 'projects/public-search/src/app/patron-profile/patron-profile-password/patron-profile-password.component'; +import { PatronProfilePersonalEditorComponent } from 'projects/public-search/src/app/patron-profile/patron-profile-personal-editor/patron-profile-personal-editor.component'; import { PatronProfilePersonalComponent } from 'projects/public-search/src/app/patron-profile/patron-profile-personal/patron-profile-personal.component'; import { PatronProfileRequestComponent } from 'projects/public-search/src/app/patron-profile/patron-profile-requests/patron-profile-request/patron-profile-request.component'; import { PatronProfileRequestsComponent } from 'projects/public-search/src/app/patron-profile/patron-profile-requests/patron-profile-requests.component'; @@ -52,15 +51,29 @@ import { LoanStatusBadgePipe } from 'projects/public-search/src/app/pipe/loan-st import { Observable } from 'rxjs'; import { AppConfigService } from './app-config-service.service'; import { AppInitializerService } from './app-initializer.service'; +import { AppComponent } from './app.component'; /** function to instantiate the application */ export function appInitFactory(appInitializerService: AppInitializerService): () => Observable { return () => appInitializerService.load(); } +const routes: Routes = [ + { path: '', component: PatronProfileComponent }, + { + path: 'user/edit', + component: PatronProfilePersonalEditorComponent, + }, + { + path: 'password/edit', + component: PatronProfilePasswordComponent, + }, +]; + @NgModule({ declarations: [ PatronProfileComponent, + PatronProfilePasswordComponent, PatronProfileMessageComponent, PatronProfileLoansComponent, PatronProfileLoanComponent, @@ -71,46 +84,50 @@ export function appInitFactory(appInitializerService: AppInitializerService): () PatronProfileFeeComponent, PatronProfileHistoriesComponent, PatronProfileIllRequestsComponent, + PatronProfilePersonalEditorComponent, PatronProfileIllRequestComponent, ArrayTranslatePipe, PatronProfileDocumentComponent, PatronProfileHistoryComponent, PatronProfileMenuComponent, JournalVolumePipe, - LoanStatusBadgePipe + LoanStatusBadgePipe, + AppComponent, ], imports: [ BrowserAnimationsModule, + RouterOutlet, + ReactiveFormsModule, + CommonModule, RecordModule, - RouterModule.forRoot([]), + RouterLink, + RouterLinkActive, + RouterModule.forRoot(routes), TranslateModule.forRoot({ loader: { provide: BaseTranslateLoader, useClass: TranslateLoader, - deps: [CoreConfigService, HttpClient] + deps: [CoreConfigService, HttpClient], }, - isolate: false + isolate: false, + }), + FormlyModule.forRoot({ + validators: [{ name: 'passwordMatch', validation: fieldPasswordMatchValidator }], }), SharedModule, - LoadingBarHttpClientModule + LoadingBarHttpClientModule, ], providers: [ + { + provide: APP_BASE_HREF, + useFactory: (s: PlatformLocation) => s.getBaseHrefFromDOM(), + deps: [PlatformLocation], + }, { provide: TranslateService, useClass: NgCoreTranslateService }, { provide: APP_INITIALIZER, useFactory: appInitFactory, deps: [AppInitializerService], multi: true }, - { provide: CoreConfigService, useClass: AppConfigService } + { provide: CoreConfigService, useClass: AppConfigService }, ], - schemas: [ - CUSTOM_ELEMENTS_SCHEMA - ] + schemas: [CUSTOM_ELEMENTS_SCHEMA], + bootstrap: [AppComponent], }) -export class AppModule implements DoBootstrap { - - private injector: Injector = inject(Injector); - - ngDoBootstrap(): void { - if (!customElements.get('public-patron-profile')) { - const element = createCustomElement(PatronProfileComponent, { injector: this.injector }); - customElements.define('public-patron-profile', element); - } - } -} +export class AppModule {} diff --git a/projects/public-patron-profile/src/index.html b/projects/public-patron-profile/src/index.html index 47919c40f..1d178397f 100644 --- a/projects/public-patron-profile/src/index.html +++ b/projects/public-patron-profile/src/index.html @@ -23,31 +23,13 @@ - -
- +
diff --git a/projects/public-search/src/app/app.module.ts b/projects/public-search/src/app/app.module.ts index 3115623c3..891287f74 100644 --- a/projects/public-search/src/app/app.module.ts +++ b/projects/public-search/src/app/app.module.ts @@ -15,17 +15,18 @@ * along with this program. If not, see . */ -import { HTTP_INTERCEPTORS, HttpClient, HttpClientModule } from '@angular/common/http'; +import { HTTP_INTERCEPTORS, HttpClient } from '@angular/common/http'; import { APP_INITIALIZER, ApplicationRef, CUSTOM_ELEMENTS_SCHEMA, DoBootstrap, inject, Injector, LOCALE_ID, NgModule } from '@angular/core'; import { createCustomElement } from '@angular/elements'; import { BrowserModule } from '@angular/platform-browser'; import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; -import { LoadingBarModule } from '@ngx-loading-bar/core'; import { LoadingBarHttpClientModule } from '@ngx-loading-bar/http-client'; import { LoadingBarRouterModule } from '@ngx-loading-bar/router'; import { TranslateLoader as BaseTranslateLoader, TranslateModule, TranslateService } from '@ngx-translate/core'; import { BucketNameService as CoreBucketNameService, CoreConfigService, NgCoreTranslateService, RecordModule, TranslateLoader } from '@rero/ng-core'; -import { PrimeNgImportModule, RemoteSearchComponent, SharedModule, UserService } from '@rero/shared'; +import { RemoteSearchComponent, SharedModule, UserService } from '@rero/shared'; +import { DividerModule } from 'primeng/divider'; +import { Observable } from 'rxjs'; import { AppConfigService } from './app-config.service'; import { AppInitializerService } from './app-initializer.service'; import { AppRoutingModule } from './app-routing.module'; @@ -37,8 +38,6 @@ import { ErrorPageComponent } from './error/error-page.component'; import { CustomRequestInterceptor } from './interceptor/custom-request.interceptor'; import { MainComponent } from './main/main.component'; import { BucketNameService } from './service/bucket-name.service'; -import { Observable } from 'rxjs'; -import { DividerModule } from 'primeng/divider'; /** function to instantiate the application */ export function appInitFactory(appInitializerService: AppInitializerService): () => Observable { @@ -48,11 +47,11 @@ export function appInitFactory(appInitializerService: AppInitializerService): () @NgModule({ declarations: [ AppComponent, - DocumentBriefComponent, MainComponent, - CollectionBriefComponent, ErrorPageComponent, - DocumentRecordSearchComponent + DocumentRecordSearchComponent, + DocumentBriefComponent, + CollectionBriefComponent, ], imports: [ BrowserModule, diff --git a/projects/public-search/src/app/document-detail/document-detail-view/document-detail-view.component.html b/projects/public-search/src/app/document-detail/document-detail-view/document-detail-view.component.html index 55cc67052..695aaaf01 100644 --- a/projects/public-search/src/app/document-detail/document-detail-view/document-detail-view.component.html +++ b/projects/public-search/src/app/document-detail/document-detail-view/document-detail-view.component.html @@ -29,10 +29,21 @@ - @if (showinfo) { + @if (showinfo !== 'false') { } + + + + + + + + {{item.label}} + + + } diff --git a/projects/public-search/src/app/document-detail/document-detail-view/document-detail-view.component.scss b/projects/public-search/src/app/document-detail/document-detail-view/document-detail-view.component.scss new file mode 100644 index 000000000..c4be54cf9 --- /dev/null +++ b/projects/public-search/src/app/document-detail/document-detail-view/document-detail-view.component.scss @@ -0,0 +1,4 @@ + +public-search-document p-menubarsub ul { + @extend .align-items-start; +} diff --git a/projects/public-search/src/app/document-detail/document-detail-view/document-detail-view.component.ts b/projects/public-search/src/app/document-detail/document-detail-view/document-detail-view.component.ts index c37f24e9a..4027e416e 100644 --- a/projects/public-search/src/app/document-detail/document-detail-view/document-detail-view.component.ts +++ b/projects/public-search/src/app/document-detail/document-detail-view/document-detail-view.component.ts @@ -16,8 +16,10 @@ */ import { Component, inject, Input, OnInit } from '@angular/core'; +import { TranslateService } from '@ngx-translate/core'; import { RecordService } from '@rero/ng-core'; import { AppSettingsService } from '@rero/shared'; +import { MenuItem } from 'primeng/api'; @Component({ selector: 'public-search-document-detail-vew', @@ -26,16 +28,31 @@ import { AppSettingsService } from '@rero/shared'; export class DocumentDetailViewComponent implements OnInit { private appSettingsService: AppSettingsService = inject(AppSettingsService); private recordService: RecordService = inject(RecordService); + private translateService: TranslateService = inject(TranslateService); @Input() viewcode: string; @Input() documentpid: string; - @Input() showinfo = false; + @Input() showinfo = 'false'; + document = null; + exportItems: MenuItem[]; /** OnInit hook */ ngOnInit(): void { // Set view code to app settings this.appSettingsService.currentViewCode = this.viewcode; this.recordService.getRecord('documents', this.documentpid).subscribe((doc) => (this.document = doc)); + this.exportItems = [ + { + icon: "fa fa-file-code-o", + label: this.translateService.instant("JSON Data"), + url: `/api/documents/${this.documentpid}?format=json` + }, + { + icon: "fa fa-file-text-o", + label: this.translateService.instant("RIS (Zotero...)"), + url: `/api/documents/${this.documentpid}?format=ris` + } + ]; } } diff --git a/projects/public-search/src/app/document-detail/document-detail-view/holdings/electronic-holdings/electronic-holdings.component.html b/projects/public-search/src/app/document-detail/document-detail-view/holdings/electronic-holdings/electronic-holdings.component.html index 5b99fcda4..94cc2ba1d 100644 --- a/projects/public-search/src/app/document-detail/document-detail-view/holdings/electronic-holdings/electronic-holdings.component.html +++ b/projects/public-search/src/app/document-detail/document-detail-view/holdings/electronic-holdings/electronic-holdings.component.html @@ -34,8 +34,8 @@
{{location.source}}
- } diff --git a/projects/public-search/src/app/document-detail/holdings/holdings.component.html b/projects/public-search/src/app/document-detail/holdings/holdings.component.html index 50cab05af..52aa86c63 100644 --- a/projects/public-search/src/app/document-detail/holdings/holdings.component.html +++ b/projects/public-search/src/app/document-detail/holdings/holdings.component.html @@ -49,10 +49,11 @@ } - Interlibrary loan + @if(viewcode === 'global') { +  {{ 'Interlibrary loan' | translate }} + } } diff --git a/projects/public-search/src/app/document-detail/holdings/items/items.component.scss b/projects/public-search/src/app/document-detail/holdings/items/items.component.scss deleted file mode 100644 index fbdbf04b3..000000000 --- a/projects/public-search/src/app/document-detail/holdings/items/items.component.scss +++ /dev/null @@ -1,18 +0,0 @@ -/* - * RERO ILS UI - * Copyright (C) 2024 RERO - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, version 3 of the License. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - */ - -// @import 'primeflex/primeflex'; diff --git a/projects/public-search/src/app/document-detail/holdings/items/items.component.ts b/projects/public-search/src/app/document-detail/holdings/items/items.component.ts index dfd62420a..4904339e8 100644 --- a/projects/public-search/src/app/document-detail/holdings/items/items.component.ts +++ b/projects/public-search/src/app/document-detail/holdings/items/items.component.ts @@ -22,8 +22,7 @@ import { QueryResponse } from '../../../record'; @Component({ selector: 'public-search-items', - templateUrl: './items.component.html', - styleUrl: './items.component.scss' + templateUrl: './items.component.html' }) export class ItemsComponent implements OnInit { diff --git a/projects/public-search/src/app/document-detail/request/pickup-location/pickup-location.component.html b/projects/public-search/src/app/document-detail/request/pickup-location/pickup-location.component.html index 8a345c42f..9eee9e49a 100644 --- a/projects/public-search/src/app/document-detail/request/pickup-location/pickup-location.component.html +++ b/projects/public-search/src/app/document-detail/request/pickup-location/pickup-location.component.html @@ -20,12 +20,14 @@ }
- +
+ +
@if (!requestInProgress) { . */ -import { DOCUMENT } from '@angular/common'; +import { DOCUMENT, Location } from '@angular/common'; import { Component, ElementRef, inject, Input } from '@angular/core'; import { AbstractControl, UntypedFormControl, UntypedFormGroup } from '@angular/forms'; import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker'; @@ -48,11 +48,10 @@ export function fieldPasswordMatchValidator(control: AbstractControl) { }) export class PatronProfilePasswordComponent { + private location: Location = inject(Location); private translateService: TranslateService = inject(TranslateService); private userApiService: UserApiService = inject(UserApiService); - private appSettingsService: AppSettingsService = inject(AppSettingsService); private el: ElementRef = inject(ElementRef); - private document: Document = inject(DOCUMENT); private messageService: MessageService = inject(MessageService); /** Request referer */ @@ -128,7 +127,6 @@ export class PatronProfilePasswordComponent { severity: 'error', summary: this.translateService.instant('Error'), detail: this.translateService.instant('The form contains errors.'), - sticky: true, closable: true }); return; @@ -141,7 +139,7 @@ export class PatronProfilePasswordComponent { }; this.userApiService.updatePassword(data).pipe( - catchError((err: any) => of({ success: false, message: err.message, error: err.error.errors[0] })) + catchError((err: any) => of({ success: false, message: err.message, error: err.error?.errors[0] })) ).subscribe((response: IPasswordResponse) => { if (!('success' in response)) { this.messageService.add({ @@ -190,7 +188,7 @@ export class PatronProfilePasswordComponent { /** Redirect to external project */ private _redirect(): void { - this.document.location.href = this.referer || this.appSettingsService.baseUrl; + this.location.back(); } } diff --git a/projects/public-search/src/app/patron-profile/patron-profile-personal-editor/patron-profile-personal-editor.component.ts b/projects/public-search/src/app/patron-profile/patron-profile-personal-editor/patron-profile-personal-editor.component.ts index a18ad00ea..117fa8df7 100644 --- a/projects/public-search/src/app/patron-profile/patron-profile-personal-editor/patron-profile-personal-editor.component.ts +++ b/projects/public-search/src/app/patron-profile/patron-profile-personal-editor/patron-profile-personal-editor.component.ts @@ -14,7 +14,7 @@ * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see . */ -import { DOCUMENT } from '@angular/common'; +import { Location } from '@angular/common'; import { Component, Input, OnDestroy, OnInit, inject } from '@angular/core'; import { UntypedFormControl, UntypedFormGroup } from '@angular/forms'; import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker'; @@ -33,12 +33,12 @@ import { debounceTime, map, tap } from 'rxjs/operators'; }) export class PatronProfilePersonalEditorComponent implements OnInit, OnDestroy { + private location: Location = inject(Location); private recordService: RecordService = inject(RecordService); private formlyJsonschema: FormlyJsonschema = inject(FormlyJsonschema); private translateService: TranslateService = inject(TranslateService); private appSettingsService: AppSettingsService = inject(AppSettingsService); private userService: UserService = inject(UserService); - private document: Document = inject(DOCUMENT); private messageService: MessageService = inject(MessageService); // COMPONENT ATTRIBUTES ===================================================== @@ -176,7 +176,6 @@ export class PatronProfilePersonalEditorComponent implements OnInit, OnDestroy { severity: 'error', summary: this.translateService.instant('Error'), detail: this.translateService.instant('The form contains errors.'), - sticky: true, closable: true }); return; @@ -200,7 +199,6 @@ export class PatronProfilePersonalEditorComponent implements OnInit, OnDestroy { severity: 'error', summary: this.translateService.instant('Error'), detail: this.translateService.instant('An error occurred on the server: ') + error.title, - sticky: true, closable: true }); } @@ -215,9 +213,7 @@ export class PatronProfilePersonalEditorComponent implements OnInit, OnDestroy { /** Redirect to external project */ private redirect(): void { - this.document.location.href = this.referer - ? this.referer - : this.appSettingsService.baseUrl; + this.location.back(); } /** diff --git a/projects/public-search/src/app/patron-profile/patron-profile-personal/patron-profile-personal.component.html b/projects/public-search/src/app/patron-profile/patron-profile-personal/patron-profile-personal.component.html index eae12d997..aace2e551 100644 --- a/projects/public-search/src/app/patron-profile/patron-profile-personal/patron-profile-personal.component.html +++ b/projects/public-search/src/app/patron-profile/patron-profile-personal/patron-profile-personal.component.html @@ -105,8 +105,8 @@

Personal details

@if (disabledButtonOnReadyOnly) { } diff --git a/projects/public-search/src/app/patron-profile/patron-profile-requests/patron-profile-request/patron-profile-request.component.ts b/projects/public-search/src/app/patron-profile/patron-profile-requests/patron-profile-request/patron-profile-request.component.ts index 42813ff29..6d8528172 100644 --- a/projects/public-search/src/app/patron-profile/patron-profile-requests/patron-profile-request/patron-profile-request.component.ts +++ b/projects/public-search/src/app/patron-profile/patron-profile-requests/patron-profile-request/patron-profile-request.component.ts @@ -78,7 +78,6 @@ export class PatronProfileRequestComponent { severity: 'error', summary: this.translateService.instant('Error'), detail: this.translateService.instant('Error during the cancellation of the request.'), - sticky: true, closable: true }); } diff --git a/projects/public-search/src/app/patron-profile/patron-profile.component.html b/projects/public-search/src/app/patron-profile/patron-profile.component.html index df22641ea..e3ee89684 100644 --- a/projects/public-search/src/app/patron-profile/patron-profile.component.html +++ b/projects/public-search/src/app/patron-profile/patron-profile.component.html @@ -14,7 +14,6 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . --> - @if (user) { @if (user.isAuthenticated && user.isPatron) {

{{ fullname }}

diff --git a/projects/public-search/src/app/patron-profile/patron-profile.component.ts b/projects/public-search/src/app/patron-profile/patron-profile.component.ts index 18572eb99..a60821dd4 100644 --- a/projects/public-search/src/app/patron-profile/patron-profile.component.ts +++ b/projects/public-search/src/app/patron-profile/patron-profile.component.ts @@ -24,7 +24,7 @@ import { OperationLogsApiService } from '../api/operation-logs-api.service'; import { PatronTransactionApiService } from '../api/patron-transaction-api.service'; import { IMenu, PatronProfileMenuService } from './patron-profile-menu.service'; import { PatronProfileService } from './patron-profile.service'; -import { KeyValue } from '@angular/common'; +import { APP_BASE_HREF, DOCUMENT, KeyValue, Location } from '@angular/common'; import { TranslateService } from '@ngx-translate/core'; interface Tab { @@ -58,12 +58,11 @@ export class PatronProfileComponent implements OnInit, OnDestroy { private patronProfileMenuService: PatronProfileMenuService = inject(PatronProfileMenuService); private operationLogsApiService: OperationLogsApiService = inject(OperationLogsApiService); private translateService: TranslateService = inject(TranslateService); + private baseHref = inject(APP_BASE_HREF); - /** Interface language */ - @Input() language: string; /** View code */ - @Input() viewcode: string; + viewcode: string = 'global'; /** Observable subscription */ private subscription = new Subscription(); @@ -179,6 +178,10 @@ export class PatronProfileComponent implements OnInit, OnDestroy { /** OnInit hook */ ngOnInit(): void { + const pathParts = this.baseHref.split('/'); + if( pathParts.length > 1) { + this.viewcode = pathParts[1]; + } this.subscription.add( this.patronProfileService.loanFeesEvent$.subscribe((fees: number) => (this.tabs.loan.feeTotal = +fees.toFixed(2))) ); diff --git a/projects/public-search/src/app/routes/documents-route.service.ts b/projects/public-search/src/app/routes/documents-route.service.ts index 8b69947c9..2fc706a37 100644 --- a/projects/public-search/src/app/routes/documents-route.service.ts +++ b/projects/public-search/src/app/routes/documents-route.service.ts @@ -153,7 +153,7 @@ export class DocumentsRouteService extends BaseRoute implements ResourceRouteInt format: 'raw', }, { - label: 'RIS (Endnote, Zotero, ...)', + label: 'RIS (Zotero...)', format: 'ris', }, ], @@ -162,23 +162,23 @@ export class DocumentsRouteService extends BaseRoute implements ResourceRouteInt label: _('Relevance'), value: 'bestmatch', defaultQuery: true, - icon: 'fa-sort-amount-desc' + icon: 'fa fa-sort-amount-desc' }, { label: _('Date (newest)'), value: 'pub_date_new', - icon: 'fa-sort-amount-desc' + icon: 'fa fa-sort-amount-desc' }, { label: _('Date (oldest)'), value: 'pub_date_old', - icon: 'fa-sort-amount-asc' + icon: 'fa fa-sort-amount-asc' }, { label: _('Title'), value: 'title', defaultNoQuery: true, - icon: 'fa-sort-alpha-asc' + icon: 'fa fa-sort-alpha-asc' } ] }, diff --git a/projects/public-search/src/app/scss/bootstrap_styles.scss b/projects/public-search/src/app/scss/bootstrap_styles.scss index d7adaf45a..b4e276918 100644 --- a/projects/public-search/src/app/scss/bootstrap_styles.scss +++ b/projects/public-search/src/app/scss/bootstrap_styles.scss @@ -15,8 +15,17 @@ * along with this program. If not, see . */ - @layer bootstrap, rero-ils-ui, primeng, rero-ils-ui; @layer bootstrap { @import 'bootstrap/scss/bootstrap'; } @import "./styles.scss"; + @import "font-awesome/scss/font-awesome"; + + :root { + font-family: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", + Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif; + --font-family: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", + Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif; + + font-size: 1rem; + } diff --git a/projects/public-search/src/app/scss/styles.scss b/projects/public-search/src/app/scss/styles.scss index 9213da26c..32dde8b76 100644 --- a/projects/public-search/src/app/scss/styles.scss +++ b/projects/public-search/src/app/scss/styles.scss @@ -14,7 +14,10 @@ * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see . */ - - @import "../../../../shared/src/scss/styles.scss"; - @import "../../../../public-search/src/app/patron-profile/patron-profile-personal/patron-profile-personal.component.scss"; +@import "../../../../shared/src/scss/styles.scss"; +@layer rero-ils-ui { + .rero-ils-ui { @import "../../../../public-search/src/app/document-detail/holdings/holding/holding.component.scss"; + @import "../document-detail/document-detail-view/document-detail-view.component.scss"; + } +} diff --git a/projects/public-search/src/index.html b/projects/public-search/src/index.html index cbeea01e7..b84305ffc 100644 --- a/projects/public-search/src/index.html +++ b/projects/public-search/src/index.html @@ -20,26 +20,11 @@ PublicSearch - - + @layer bootstrap, primeng, rero-ils-ui; +
diff --git a/projects/public-user-password-change/.browserslistrc b/projects/public-user-password-change/.browserslistrc deleted file mode 100644 index fbec4a946..000000000 --- a/projects/public-user-password-change/.browserslistrc +++ /dev/null @@ -1,18 +0,0 @@ -# This file is used by the build system to adjust CSS and JS output to support the specified browsers below. -# For additional information regarding the format and rule options, please see: -# https://github.com/browserslist/browserslist#queries - -# For the full list of supported browsers by the Angular framework, please see: -# https://angular.io/guide/browser-support - -# You can see what browsers were selected by your queries by running: -# npx browserslist -last 2 Chrome versions -last 1 Firefox version -last 2 Edge major versions -last 2 Safari major versions -last 2 iOS major versions -Firefox ESR -not dead -> 0.2% -not IE 9-11 diff --git a/projects/public-user-password-change/.eslintrc.json b/projects/public-user-password-change/.eslintrc.json deleted file mode 100644 index 4ae84beee..000000000 --- a/projects/public-user-password-change/.eslintrc.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "extends": "../../.eslintrc.json", - "ignorePatterns": [ - "!**/*" - ], - "overrides": [ - { - "files": [ - "*.ts" - ], - "rules": { - "@angular-eslint/directive-selector": [ - "error", - { - "type": "attribute", - "prefix": "app", - "style": "camelCase" - } - ], - "@angular-eslint/component-selector": [ - "error", - { - "type": "element", - "prefix": "app", - "style": "kebab-case" - } - ] - } - }, - { - "files": [ - "*.html" - ], - "rules": {} - } - ] -} diff --git a/projects/public-user-password-change/e2e/protractor.conf.js b/projects/public-user-password-change/e2e/protractor.conf.js deleted file mode 100644 index 361e7f0cd..000000000 --- a/projects/public-user-password-change/e2e/protractor.conf.js +++ /dev/null @@ -1,37 +0,0 @@ -// @ts-check -// Protractor configuration file, see link for more information -// https://github.com/angular/protractor/blob/master/lib/config.ts - -const { SpecReporter, StacktraceOption } = require('jasmine-spec-reporter'); - -/** - * @type { import("protractor").Config } - */ -exports.config = { - allScriptsTimeout: 11000, - specs: [ - './src/**/*.e2e-spec.ts' - ], - capabilities: { - browserName: 'chrome' - }, - directConnect: true, - SELENIUM_PROMISE_MANAGER: false, - baseUrl: 'http://localhost:4200/', - framework: 'jasmine', - jasmineNodeOpts: { - showColors: true, - defaultTimeoutInterval: 30000, - print: function() {} - }, - onPrepare() { - require('ts-node').register({ - project: require('path').join(__dirname, './tsconfig.json') - }); - jasmine.getEnv().addReporter(new SpecReporter({ - spec: { - displayStacktrace: StacktraceOption.PRETTY - } - })); - } -}; \ No newline at end of file diff --git a/projects/public-user-password-change/e2e/src/app.e2e-spec.ts b/projects/public-user-password-change/e2e/src/app.e2e-spec.ts deleted file mode 100644 index 890923d97..000000000 --- a/projects/public-user-password-change/e2e/src/app.e2e-spec.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { browser, logging } from 'protractor'; -import { AppPage } from './app.po'; - -describe('workspace-project App', () => { - let page: AppPage; - - beforeEach(() => { - page = new AppPage(); - }); - - it('should display welcome message', async () => { - await page.navigateTo(); - expect(await page.getTitleText()).toEqual('public-user-password-change app is running!'); - }); - - afterEach(async () => { - // Assert that there are no errors emitted from the browser - const logs = await browser.manage().logs().get(logging.Type.BROWSER); - expect(logs).not.toContain(jasmine.objectContaining({ - level: logging.Level.SEVERE, - } as logging.Entry)); - }); -}); diff --git a/projects/public-user-password-change/e2e/src/app.po.ts b/projects/public-user-password-change/e2e/src/app.po.ts deleted file mode 100644 index c9c85ab9a..000000000 --- a/projects/public-user-password-change/e2e/src/app.po.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { browser, by, element } from 'protractor'; - -export class AppPage { - async navigateTo(): Promise { - return browser.get(browser.baseUrl); - } - - async getTitleText(): Promise { - return element(by.css('app-root .content span')).getText(); - } -} diff --git a/projects/public-user-password-change/e2e/tsconfig.json b/projects/public-user-password-change/e2e/tsconfig.json deleted file mode 100644 index 2f1343e17..000000000 --- a/projects/public-user-password-change/e2e/tsconfig.json +++ /dev/null @@ -1,13 +0,0 @@ -/* To learn more about this file see: https://angular.io/config/tsconfig. */ -{ - "extends": "../../../tsconfig.json", - "compilerOptions": { - "outDir": "../../../out-tsc/e2e", - "module": "commonjs", - "target": "es2022", - "types": [ - "jasmine", - "node" - ] - } -} diff --git a/projects/public-user-password-change/karma.conf.js b/projects/public-user-password-change/karma.conf.js deleted file mode 100644 index bea1d4431..000000000 --- a/projects/public-user-password-change/karma.conf.js +++ /dev/null @@ -1,44 +0,0 @@ -// Karma configuration file, see link for more information -// https://karma-runner.github.io/1.0/config/configuration-file.html - -module.exports = function (config) { - config.set({ - basePath: '', - frameworks: ['jasmine', '@angular-devkit/build-angular'], - plugins: [ - require('karma-jasmine'), - require('karma-chrome-launcher'), - require('karma-jasmine-html-reporter'), - require('karma-coverage'), - require('@angular-devkit/build-angular/plugins/karma') - ], - client: { - jasmine: { - // you can add configuration options for Jasmine here - // the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html - // for example, you can disable the random execution with `random: false` - // or set a specific seed with `seed: 4321` - }, - clearContext: false // leave Jasmine Spec Runner output visible in browser - }, - jasmineHtmlReporter: { - suppressAll: true // removes the duplicated traces - }, - coverageReporter: { - dir: require('path').join(__dirname, '../../coverage/public-user-password-change'), - subdir: '.', - reporters: [ - { type: 'html' }, - { type: 'text-summary' } - ] - }, - reporters: ['progress', 'kjhtml'], - port: 9876, - colors: true, - logLevel: config.LOG_INFO, - autoWatch: true, - browsers: ['Chrome'], - singleRun: false, - restartOnFileChange: true - }); -}; diff --git a/projects/public-user-password-change/src/app/app-config.service.spec.ts b/projects/public-user-password-change/src/app/app-config.service.spec.ts deleted file mode 100644 index 549c736fe..000000000 --- a/projects/public-user-password-change/src/app/app-config.service.spec.ts +++ /dev/null @@ -1,32 +0,0 @@ -/* - * RERO ILS UI - * Copyright (C) 2022 RERO - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, version 3 of the License. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - */ -import { TestBed } from '@angular/core/testing'; -import { AppConfigService } from './app-config.service'; - - -describe('AppConfigService', () => { - let service: AppConfigService; - - beforeEach(() => { - TestBed.configureTestingModule({}); - service = TestBed.inject(AppConfigService); - }); - - it('should be created', () => { - expect(service).toBeTruthy(); - }); -}); diff --git a/projects/public-user-password-change/src/app/app-config.service.ts b/projects/public-user-password-change/src/app/app-config.service.ts deleted file mode 100644 index b4a088e76..000000000 --- a/projects/public-user-password-change/src/app/app-config.service.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * RERO ILS UI - * Copyright (C) 2022 RERO - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, version 3 of the License. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - */ -import { Injectable } from '@angular/core'; -import { CoreConfigService } from '@rero/ng-core'; -import { environment } from '../environments/environment'; - - -@Injectable({ - providedIn: 'root' -}) -export class AppConfigService extends CoreConfigService { - - /** Global View Name */ - globalViewName: string; - - /** Translation urls */ - translationsURLs: string[]; - - /** - * Constructor - */ - constructor() { - super(); - this.production = environment.production; - this.apiBaseUrl = environment.apiBaseUrl; - this.$refPrefix = environment.$refPrefix; - this.languages = environment.languages; - this.globalViewName = environment.globalViewName; - this.translationsURLs = environment.translationsURLs; - } -} diff --git a/projects/public-user-password-change/src/app/app-initializer.service.spec.ts b/projects/public-user-password-change/src/app/app-initializer.service.spec.ts deleted file mode 100644 index fd72a07d7..000000000 --- a/projects/public-user-password-change/src/app/app-initializer.service.spec.ts +++ /dev/null @@ -1,32 +0,0 @@ -/* - * RERO ILS UI - * Copyright (C) 2022 RERO - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, version 3 of the License. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - */ -import { TestBed } from '@angular/core/testing'; -import { AppInitializerService } from './app-initializer.service'; - - -describe('AppInitializerService', () => { - let service: AppInitializerService; - - beforeEach(() => { - TestBed.configureTestingModule({}); - service = TestBed.inject(AppInitializerService); - }); - - it('should be created', () => { - expect(service).toBeTruthy(); - }); -}); diff --git a/projects/public-user-password-change/src/app/app-initializer.service.ts b/projects/public-user-password-change/src/app/app-initializer.service.ts deleted file mode 100644 index 6b28fd5c9..000000000 --- a/projects/public-user-password-change/src/app/app-initializer.service.ts +++ /dev/null @@ -1,52 +0,0 @@ -/* - * RERO ILS UI - * Copyright (C) 2022-2024 RERO - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, version 3 of the License. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - */ -import { inject, Injectable } from '@angular/core'; -import { TranslateService } from '@ngx-translate/core'; -import { AppSettingsService, UserService } from '@rero/shared'; -import { AppConfigService } from 'projects/admin/src/app/service/app-config.service'; -import { Observable } from 'rxjs'; -import { switchMap } from 'rxjs/operators'; - -@Injectable({ - providedIn: 'root' -}) -export class AppInitializerService { - - private userService: UserService = inject(UserService); - private translateService: TranslateService = inject(TranslateService); - private appSettingsService: AppSettingsService = inject(AppSettingsService); - private appConfigService: AppConfigService = inject(AppConfigService); - - load(): Observable { - return this.userService.load().pipe( - switchMap(() => this.initTranslateService()) - ); - } - - private initTranslateService(): Observable { - const {language} = this.appSettingsService.settings; - if (language) { - return this.translateService.use(language); - } else { - const browserLang = this.translateService.getBrowserLang(); - return this.translateService.use( - browserLang.match(this.appConfigService.languages.join('|')) ? - browserLang : this.appConfigService.defaultLanguage - ); - } - } -} diff --git a/projects/public-user-password-change/src/app/app.module.ts b/projects/public-user-password-change/src/app/app.module.ts deleted file mode 100644 index 294757546..000000000 --- a/projects/public-user-password-change/src/app/app.module.ts +++ /dev/null @@ -1,75 +0,0 @@ -/* - * RERO ILS UI - * Copyright (C) 2022-2024 RERO - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, version 3 of the License. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - */ -import { HttpClient } from '@angular/common/http'; -import { APP_INITIALIZER, DoBootstrap, inject, Injector, NgModule } from '@angular/core'; -import { createCustomElement } from '@angular/elements'; -import { ReactiveFormsModule } from '@angular/forms'; -import { BrowserModule } from '@angular/platform-browser'; -import { FormlyModule } from '@ngx-formly/core'; -import { LoadingBarHttpClientModule } from '@ngx-loading-bar/http-client'; -import { TranslateLoader as BaseTranslateLoader, TranslateModule, TranslateService } from '@ngx-translate/core'; -import { CoreConfigService, NgCoreTranslateService, RecordModule, TranslateLoader } from '@rero/ng-core'; -import { fieldPasswordMatchValidator, PatronProfilePasswordComponent } from 'projects/public-search/src/app/patron-profile/patron-profile-password/patron-profile-password.component'; -import { Observable } from 'rxjs'; -import { AppConfigService } from './app-config.service'; -import { AppInitializerService } from './app-initializer.service'; - -/** function to instantiate the application */ -export function appInitFactory(appInitializerService: AppInitializerService): () => Observable { - return () => appInitializerService.load(); -} - -@NgModule({ - declarations: [ - PatronProfilePasswordComponent - ], - imports: [ - BrowserModule, - FormlyModule.forRoot({ - validators: [ - { name: 'passwordMatch', validation: fieldPasswordMatchValidator } - ] - }), - RecordModule, - ReactiveFormsModule, - TranslateModule.forRoot({ - loader: { - provide: BaseTranslateLoader, - useClass: TranslateLoader, - deps: [CoreConfigService, HttpClient] - }, - isolate: false - }), - LoadingBarHttpClientModule - ], - providers: [ - { provide: TranslateService, useClass: NgCoreTranslateService }, - { provide: APP_INITIALIZER, useFactory: appInitFactory, deps: [AppInitializerService], multi: true }, - { provide: CoreConfigService, useClass: AppConfigService } - ] -}) -export class AppModule implements DoBootstrap { - - private injector: Injector = inject(Injector); - - ngDoBootstrap(): void { - if (!customElements.get('public-user-password-change')) { - const element = createCustomElement(PatronProfilePasswordComponent, { injector: this.injector }); - customElements.define('public-user-password-change', element); - } - } -} diff --git a/projects/public-user-password-change/src/assets/.gitkeep b/projects/public-user-password-change/src/assets/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/projects/public-user-password-change/src/environments/environment.prod.ts b/projects/public-user-password-change/src/environments/environment.prod.ts deleted file mode 100644 index 12398f72b..000000000 --- a/projects/public-user-password-change/src/environments/environment.prod.ts +++ /dev/null @@ -1,28 +0,0 @@ -/* - * RERO ILS UI - * Copyright (C) 2022 RERO - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, version 3 of the License. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - */ -export const environment = { - production: true, - apiBaseUrl: "", - $refPrefix: "https://bib.rero.ch", - languages: ["fr", "de", "it", "en"], - globalViewName: "global", - translationsURLs: [ - "/static/node_modules/@rero/rero-ils-ui/dist/public-user-password-change/assets/rero-ils-ui/shared/i18n/${lang}.json", - "/static/node_modules/@rero/rero-ils-ui/dist/public-user-password-change/assets/rero-ils-ui/public-search/i18n/${lang}.json", - "/api/translations/${lang}.json", - ], -}; diff --git a/projects/public-user-password-change/src/environments/environment.ts b/projects/public-user-password-change/src/environments/environment.ts deleted file mode 100644 index 0f0107aca..000000000 --- a/projects/public-user-password-change/src/environments/environment.ts +++ /dev/null @@ -1,42 +0,0 @@ -/* - * RERO ILS UI - * Copyright (C) 2022 RERO - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, version 3 of the License. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - */ - -// This file can be replaced during build by using the `fileReplacements` array. -// `ng build --prod` replaces `environment.ts` with `environment.prod.ts`. -// The list of file replacements can be found in `angular.json`. - -export const environment = { - production: false, - apiBaseUrl: "", - $refPrefix: "https://bib.rero.ch", - languages: ["fr", "de", "it", "en"], - globalViewName: "global", - translationsURLs: [ - "/assets/rero-ils-ui/shared/i18n/${lang}.json", - "/assets/rero-ils-ui/public-search/i18n/${lang}.json", - "/api/translations/${lang}.json", - ] -}; - -/* - * For easier debugging in development mode, you can import the following file - * to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`. - * - * This import should be commented out in production mode because it will have a negative impact - * on performance if an error is thrown. - */ -// import 'zone.js/plugins/zone-error'; // Included with Angular CLI. diff --git a/projects/public-user-password-change/src/favicon.ico b/projects/public-user-password-change/src/favicon.ico deleted file mode 100644 index 997406ad22c29aae95893fb3d666c30258a09537..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 948 zcmV;l155mgP)CBYU7IjCFmI-B}4sMJt3^s9NVg!P0 z6hDQy(L`XWMkB@zOLgN$4KYz;j0zZxq9KKdpZE#5@k0crP^5f9KO};h)ZDQ%ybhht z%t9#h|nu0K(bJ ztIkhEr!*UyrZWQ1k2+YkGqDi8Z<|mIN&$kzpKl{cNP=OQzXHz>vn+c)F)zO|Bou>E z2|-d_=qY#Y+yOu1a}XI?cU}%04)zz%anD(XZC{#~WreV!a$7k2Ug`?&CUEc0EtrkZ zL49MB)h!_K{H(*l_93D5tO0;BUnvYlo+;yss%n^&qjt6fZOa+}+FDO(~2>G z2dx@=JZ?DHP^;b7*Y1as5^uphBsh*s*z&MBd?e@I>-9kU>63PjP&^#5YTOb&x^6Cf z?674rmSHB5Fk!{Gv7rv!?qX#ei_L(XtwVqLX3L}$MI|kJ*w(rhx~tc&L&xP#?cQow zX_|gx$wMr3pRZIIr_;;O|8fAjd;1`nOeu5K(pCu7>^3E&D2OBBq?sYa(%S?GwG&_0-s%_v$L@R!5H_fc)lOb9ZoOO#p`Nn`KU z3LTTBtjwo`7(HA6 z7gmO$yTR!5L>Bsg!X8616{JUngg_@&85%>W=mChTR;x4`P=?PJ~oPuy5 zU-L`C@_!34D21{fD~Y8NVnR3t;aqZI3fIhmgmx}$oc-dKDC6Ap$Gy>a!`A*x2L1v0 WcZ@i?LyX}70000. ---> - - - - - Patron Profile - - - - - - - - - - -
-
- -
-
-
- - diff --git a/projects/public-user-password-change/src/main.ts b/projects/public-user-password-change/src/main.ts deleted file mode 100644 index c7b673cf4..000000000 --- a/projects/public-user-password-change/src/main.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { enableProdMode } from '@angular/core'; -import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; - -import { AppModule } from './app/app.module'; -import { environment } from './environments/environment'; - -if (environment.production) { - enableProdMode(); -} - -platformBrowserDynamic().bootstrapModule(AppModule) - .catch(err => console.error(err)); diff --git a/projects/public-user-password-change/src/polyfills.ts b/projects/public-user-password-change/src/polyfills.ts deleted file mode 100644 index dcd18eace..000000000 --- a/projects/public-user-password-change/src/polyfills.ts +++ /dev/null @@ -1,53 +0,0 @@ -/** - * This file includes polyfills needed by Angular and is loaded before the app. - * You can add your own extra polyfills to this file. - * - * This file is divided into 2 sections: - * 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers. - * 2. Application imports. Files imported after ZoneJS that should be loaded before your main - * file. - * - * The current setup is for so-called "evergreen" browsers; the last versions of browsers that - * automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera), - * Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile. - * - * Learn more in https://angular.io/guide/browser-support - */ - -/*************************************************************************************************** - * BROWSER POLYFILLS - */ - -/** - * By default, zone.js will patch all possible macroTask and DomEvents - * user can disable parts of macroTask/DomEvents patch by setting following flags - * because those flags need to be set before `zone.js` being loaded, and webpack - * will put import in the top of bundle, so user need to create a separate file - * in this directory (for example: zone-flags.ts), and put the following flags - * into that file, and then add the following code before importing zone.js. - * import './zone-flags'; - * - * The flags allowed in zone-flags.ts are listed here. - * - * The following flags will work for all browsers. - * - * (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame - * (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick - * (window as any).__zone_symbol__UNPATCHED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames - * - * in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js - * with the following flag, it will bypass `zone.js` patch for IE/Edge - * - * (window as any).__Zone_enable_cross_context_check = true; - * - */ - -/*************************************************************************************************** - * Zone JS is required by default for Angular itself. - */ -import 'zone.js'; // Included with Angular CLI. - - -/*************************************************************************************************** - * APPLICATION IMPORTS - */ diff --git a/projects/public-user-password-change/src/test.ts b/projects/public-user-password-change/src/test.ts deleted file mode 100644 index 204235640..000000000 --- a/projects/public-user-password-change/src/test.ts +++ /dev/null @@ -1,25 +0,0 @@ -// This file is required by karma.conf.js and loads recursively all the .spec and framework files - -import 'zone.js/testing'; -import { getTestBed } from '@angular/core/testing'; -import { - BrowserDynamicTestingModule, - platformBrowserDynamicTesting -} from '@angular/platform-browser-dynamic/testing'; - -declare const require: { - context(path: string, deep?: boolean, filter?: RegExp): { - keys(): string[]; - (id: string): T; - }; -}; - -// First, initialize the Angular testing environment. -getTestBed().initTestEnvironment( - BrowserDynamicTestingModule, - platformBrowserDynamicTesting() -); -// Then we find all the tests. -const context = require.context('./', true, /\.spec\.ts$/); -// And load the modules. -context.keys().map(context); diff --git a/projects/public-user-password-change/tsconfig.app.json b/projects/public-user-password-change/tsconfig.app.json deleted file mode 100644 index fd37f74d7..000000000 --- a/projects/public-user-password-change/tsconfig.app.json +++ /dev/null @@ -1,15 +0,0 @@ -/* To learn more about this file see: https://angular.io/config/tsconfig. */ -{ - "extends": "../../tsconfig.json", - "compilerOptions": { - "outDir": "../../out-tsc/app", - "types": [] - }, - "files": [ - "src/main.ts", - "src/polyfills.ts" - ], - "include": [ - "src/**/*.d.ts" - ] -} diff --git a/projects/public-user-password-change/tsconfig.spec.json b/projects/public-user-password-change/tsconfig.spec.json deleted file mode 100644 index b66a2f0b1..000000000 --- a/projects/public-user-password-change/tsconfig.spec.json +++ /dev/null @@ -1,18 +0,0 @@ -/* To learn more about this file see: https://angular.io/config/tsconfig. */ -{ - "extends": "../../tsconfig.json", - "compilerOptions": { - "outDir": "../../out-tsc/spec", - "types": [ - "jasmine" - ] - }, - "files": [ - "src/test.ts", - "src/polyfills.ts" - ], - "include": [ - "src/**/*.spec.ts", - "src/**/*.d.ts" - ] -} diff --git a/projects/public-user-profile-edit/.browserslistrc b/projects/public-user-profile-edit/.browserslistrc deleted file mode 100644 index fbec4a946..000000000 --- a/projects/public-user-profile-edit/.browserslistrc +++ /dev/null @@ -1,18 +0,0 @@ -# This file is used by the build system to adjust CSS and JS output to support the specified browsers below. -# For additional information regarding the format and rule options, please see: -# https://github.com/browserslist/browserslist#queries - -# For the full list of supported browsers by the Angular framework, please see: -# https://angular.io/guide/browser-support - -# You can see what browsers were selected by your queries by running: -# npx browserslist -last 2 Chrome versions -last 1 Firefox version -last 2 Edge major versions -last 2 Safari major versions -last 2 iOS major versions -Firefox ESR -not dead -> 0.2% -not IE 9-11 diff --git a/projects/public-user-profile-edit/.eslintrc.json b/projects/public-user-profile-edit/.eslintrc.json deleted file mode 100644 index 4ae84beee..000000000 --- a/projects/public-user-profile-edit/.eslintrc.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "extends": "../../.eslintrc.json", - "ignorePatterns": [ - "!**/*" - ], - "overrides": [ - { - "files": [ - "*.ts" - ], - "rules": { - "@angular-eslint/directive-selector": [ - "error", - { - "type": "attribute", - "prefix": "app", - "style": "camelCase" - } - ], - "@angular-eslint/component-selector": [ - "error", - { - "type": "element", - "prefix": "app", - "style": "kebab-case" - } - ] - } - }, - { - "files": [ - "*.html" - ], - "rules": {} - } - ] -} diff --git a/projects/public-user-profile-edit/e2e/protractor.conf.js b/projects/public-user-profile-edit/e2e/protractor.conf.js deleted file mode 100644 index 361e7f0cd..000000000 --- a/projects/public-user-profile-edit/e2e/protractor.conf.js +++ /dev/null @@ -1,37 +0,0 @@ -// @ts-check -// Protractor configuration file, see link for more information -// https://github.com/angular/protractor/blob/master/lib/config.ts - -const { SpecReporter, StacktraceOption } = require('jasmine-spec-reporter'); - -/** - * @type { import("protractor").Config } - */ -exports.config = { - allScriptsTimeout: 11000, - specs: [ - './src/**/*.e2e-spec.ts' - ], - capabilities: { - browserName: 'chrome' - }, - directConnect: true, - SELENIUM_PROMISE_MANAGER: false, - baseUrl: 'http://localhost:4200/', - framework: 'jasmine', - jasmineNodeOpts: { - showColors: true, - defaultTimeoutInterval: 30000, - print: function() {} - }, - onPrepare() { - require('ts-node').register({ - project: require('path').join(__dirname, './tsconfig.json') - }); - jasmine.getEnv().addReporter(new SpecReporter({ - spec: { - displayStacktrace: StacktraceOption.PRETTY - } - })); - } -}; \ No newline at end of file diff --git a/projects/public-user-profile-edit/e2e/src/app.e2e-spec.ts b/projects/public-user-profile-edit/e2e/src/app.e2e-spec.ts deleted file mode 100644 index 11c31a24b..000000000 --- a/projects/public-user-profile-edit/e2e/src/app.e2e-spec.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { browser, logging } from 'protractor'; -import { AppPage } from './app.po'; - -describe('workspace-project App', () => { - let page: AppPage; - - beforeEach(() => { - page = new AppPage(); - }); - - it('should display welcome message', async () => { - await page.navigateTo(); - expect(await page.getTitleText()).toEqual('public-user-profile-edit app is running!'); - }); - - afterEach(async () => { - // Assert that there are no errors emitted from the browser - const logs = await browser.manage().logs().get(logging.Type.BROWSER); - expect(logs).not.toContain(jasmine.objectContaining({ - level: logging.Level.SEVERE, - } as logging.Entry)); - }); -}); diff --git a/projects/public-user-profile-edit/e2e/src/app.po.ts b/projects/public-user-profile-edit/e2e/src/app.po.ts deleted file mode 100644 index c9c85ab9a..000000000 --- a/projects/public-user-profile-edit/e2e/src/app.po.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { browser, by, element } from 'protractor'; - -export class AppPage { - async navigateTo(): Promise { - return browser.get(browser.baseUrl); - } - - async getTitleText(): Promise { - return element(by.css('app-root .content span')).getText(); - } -} diff --git a/projects/public-user-profile-edit/e2e/tsconfig.json b/projects/public-user-profile-edit/e2e/tsconfig.json deleted file mode 100644 index 9872ecac3..000000000 --- a/projects/public-user-profile-edit/e2e/tsconfig.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "extends": "../../../tsconfig.json", - "compilerOptions": { - "outDir": "../../../out-tsc/e2e", - "module": "commonjs", - "target": "es2022", - "types": [ - "jasmine", - "jasminewd2", - "node" - ] - } -} diff --git a/projects/public-user-profile-edit/karma.conf.js b/projects/public-user-profile-edit/karma.conf.js deleted file mode 100644 index 6cf3e567e..000000000 --- a/projects/public-user-profile-edit/karma.conf.js +++ /dev/null @@ -1,44 +0,0 @@ -// Karma configuration file, see link for more information -// https://karma-runner.github.io/1.0/config/configuration-file.html - -module.exports = function (config) { - config.set({ - basePath: '', - frameworks: ['jasmine', '@angular-devkit/build-angular'], - plugins: [ - require('karma-jasmine'), - require('karma-chrome-launcher'), - require('karma-jasmine-html-reporter'), - require('karma-coverage'), - require('@angular-devkit/build-angular/plugins/karma') - ], - client: { - jasmine: { - // you can add configuration options for Jasmine here - // the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html - // for example, you can disable the random execution with `random: false` - // or set a specific seed with `seed: 4321` - }, - clearContext: false // leave Jasmine Spec Runner output visible in browser - }, - jasmineHtmlReporter: { - suppressAll: true // removes the duplicated traces - }, - coverageReporter: { - dir: require('path').join(__dirname, '../../coverage/public-user-profile-edit'), - subdir: '.', - reporters: [ - { type: 'html' }, - { type: 'text-summary' } - ] - }, - reporters: ['progress', 'kjhtml'], - port: 9876, - colors: true, - logLevel: config.LOG_INFO, - autoWatch: true, - browsers: ['Chrome'], - singleRun: false, - restartOnFileChange: true - }); -}; diff --git a/projects/public-user-profile-edit/src/app/app-config.service.spec.ts b/projects/public-user-profile-edit/src/app/app-config.service.spec.ts deleted file mode 100644 index 549c736fe..000000000 --- a/projects/public-user-profile-edit/src/app/app-config.service.spec.ts +++ /dev/null @@ -1,32 +0,0 @@ -/* - * RERO ILS UI - * Copyright (C) 2022 RERO - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, version 3 of the License. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - */ -import { TestBed } from '@angular/core/testing'; -import { AppConfigService } from './app-config.service'; - - -describe('AppConfigService', () => { - let service: AppConfigService; - - beforeEach(() => { - TestBed.configureTestingModule({}); - service = TestBed.inject(AppConfigService); - }); - - it('should be created', () => { - expect(service).toBeTruthy(); - }); -}); diff --git a/projects/public-user-profile-edit/src/app/app-config.service.ts b/projects/public-user-profile-edit/src/app/app-config.service.ts deleted file mode 100644 index 57953088c..000000000 --- a/projects/public-user-profile-edit/src/app/app-config.service.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * RERO ILS UI - * Copyright (C) 2022 RERO - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, version 3 of the License. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - */ -import { Injectable } from '@angular/core'; -import { CoreConfigService } from '@rero/ng-core'; -import { environment } from '../environments/environment'; - - -@Injectable({ - providedIn: 'root' -}) -export class AppConfigService extends CoreConfigService { - - /** Global View Name */ - globalViewName: string; - - /** Translation urls */ - translationsURLs: string[]; - - /** - * Constructor - */ - constructor() { - super(); - this.production = environment.production; - this.apiBaseUrl = environment.apiBaseUrl; - this.$refPrefix = environment.$refPrefix; - this.schemaFormEndpoint = '/schemas'; - this.languages = environment.languages; - this.globalViewName = environment.globalViewName; - this.translationsURLs = environment.translationsURLs; - } -} diff --git a/projects/public-user-profile-edit/src/app/app-initializer.service.spec.ts b/projects/public-user-profile-edit/src/app/app-initializer.service.spec.ts deleted file mode 100644 index fd72a07d7..000000000 --- a/projects/public-user-profile-edit/src/app/app-initializer.service.spec.ts +++ /dev/null @@ -1,32 +0,0 @@ -/* - * RERO ILS UI - * Copyright (C) 2022 RERO - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, version 3 of the License. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - */ -import { TestBed } from '@angular/core/testing'; -import { AppInitializerService } from './app-initializer.service'; - - -describe('AppInitializerService', () => { - let service: AppInitializerService; - - beforeEach(() => { - TestBed.configureTestingModule({}); - service = TestBed.inject(AppInitializerService); - }); - - it('should be created', () => { - expect(service).toBeTruthy(); - }); -}); diff --git a/projects/public-user-profile-edit/src/app/app-initializer.service.ts b/projects/public-user-profile-edit/src/app/app-initializer.service.ts deleted file mode 100644 index 6b28fd5c9..000000000 --- a/projects/public-user-profile-edit/src/app/app-initializer.service.ts +++ /dev/null @@ -1,52 +0,0 @@ -/* - * RERO ILS UI - * Copyright (C) 2022-2024 RERO - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, version 3 of the License. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - */ -import { inject, Injectable } from '@angular/core'; -import { TranslateService } from '@ngx-translate/core'; -import { AppSettingsService, UserService } from '@rero/shared'; -import { AppConfigService } from 'projects/admin/src/app/service/app-config.service'; -import { Observable } from 'rxjs'; -import { switchMap } from 'rxjs/operators'; - -@Injectable({ - providedIn: 'root' -}) -export class AppInitializerService { - - private userService: UserService = inject(UserService); - private translateService: TranslateService = inject(TranslateService); - private appSettingsService: AppSettingsService = inject(AppSettingsService); - private appConfigService: AppConfigService = inject(AppConfigService); - - load(): Observable { - return this.userService.load().pipe( - switchMap(() => this.initTranslateService()) - ); - } - - private initTranslateService(): Observable { - const {language} = this.appSettingsService.settings; - if (language) { - return this.translateService.use(language); - } else { - const browserLang = this.translateService.getBrowserLang(); - return this.translateService.use( - browserLang.match(this.appConfigService.languages.join('|')) ? - browserLang : this.appConfigService.defaultLanguage - ); - } - } -} diff --git a/projects/public-user-profile-edit/src/app/app.module.ts b/projects/public-user-profile-edit/src/app/app.module.ts deleted file mode 100644 index a9796c3af..000000000 --- a/projects/public-user-profile-edit/src/app/app.module.ts +++ /dev/null @@ -1,76 +0,0 @@ -/* - * RERO ILS UI - * Copyright (C) 2022-2024 RERO - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, version 3 of the License. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - */ -import { HttpClient } from '@angular/common/http'; -import { APP_INITIALIZER, CUSTOM_ELEMENTS_SCHEMA, DoBootstrap, inject, Injector, NgModule } from '@angular/core'; -import { createCustomElement } from '@angular/elements'; -import { ReactiveFormsModule } from '@angular/forms'; -import { BrowserModule } from '@angular/platform-browser'; -import { LoadingBarHttpClientModule } from '@ngx-loading-bar/http-client'; -import { TranslateLoader as BaseTranslateLoader, TranslateModule, TranslateService } from '@ngx-translate/core'; -import { CoreConfigService, NgCoreTranslateService, RecordModule, TranslateLoader } from '@rero/ng-core'; -import { PatronProfilePersonalEditorComponent } from 'projects/public-search/src/app/patron-profile/patron-profile-personal-editor/patron-profile-personal-editor.component'; -import { Observable } from 'rxjs'; -import { AppConfigService } from './app-config.service'; -import { AppInitializerService } from './app-initializer.service'; -import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; -import { MessagesModule } from 'primeng/messages'; - -/** function to instantiate the application */ -export function appInitFactory(appInitializerService: AppInitializerService): () => Observable { - return () => appInitializerService.load(); -} - -@NgModule({ - declarations: [ - PatronProfilePersonalEditorComponent - ], - imports: [ - BrowserModule, - BrowserAnimationsModule, - RecordModule, - ReactiveFormsModule, - MessagesModule, - TranslateModule.forRoot({ - loader: { - provide: BaseTranslateLoader, - useClass: TranslateLoader, - deps: [CoreConfigService, HttpClient] - }, - isolate: false - }), - LoadingBarHttpClientModule, - ], - providers: [ - { provide: TranslateService, useClass: NgCoreTranslateService }, - { provide: APP_INITIALIZER, useFactory: appInitFactory, deps: [AppInitializerService], multi: true }, - { provide: CoreConfigService, useClass: AppConfigService } - ], - schemas: [ - CUSTOM_ELEMENTS_SCHEMA - ] -}) -export class AppModule implements DoBootstrap { - - private injector: Injector = inject(Injector); - - ngDoBootstrap(): void { - if (!customElements.get('public-user-profile-edit')) { - const element = createCustomElement(PatronProfilePersonalEditorComponent, { injector: this.injector }); - customElements.define('public-user-profile-edit', element); - } - } -} diff --git a/projects/public-user-profile-edit/src/environments/environment.prod.ts b/projects/public-user-profile-edit/src/environments/environment.prod.ts deleted file mode 100644 index f8095a16d..000000000 --- a/projects/public-user-profile-edit/src/environments/environment.prod.ts +++ /dev/null @@ -1,28 +0,0 @@ -/* - * RERO ILS UI - * Copyright (C) 2022 RERO - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, version 3 of the License. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - */ -export const environment = { - production: true, - apiBaseUrl: "", - $refPrefix: "https://bib.rero.ch", - languages: ["fr", "de", "it", "en"], - globalViewName: "global", - translationsURLs: [ - "/static/node_modules/@rero/rero-ils-ui/dist/public-user-profile-edit/assets/rero-ils-ui/shared/i18n/${lang}.json", - "/static/node_modules/@rero/rero-ils-ui/dist/public-user-profile-edit/assets/rero-ils-ui/public-search/i18n/${lang}.json", - "/api/translations/${lang}.json", - ], -}; diff --git a/projects/public-user-profile-edit/src/environments/environment.ts b/projects/public-user-profile-edit/src/environments/environment.ts deleted file mode 100644 index 0f0107aca..000000000 --- a/projects/public-user-profile-edit/src/environments/environment.ts +++ /dev/null @@ -1,42 +0,0 @@ -/* - * RERO ILS UI - * Copyright (C) 2022 RERO - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, version 3 of the License. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - */ - -// This file can be replaced during build by using the `fileReplacements` array. -// `ng build --prod` replaces `environment.ts` with `environment.prod.ts`. -// The list of file replacements can be found in `angular.json`. - -export const environment = { - production: false, - apiBaseUrl: "", - $refPrefix: "https://bib.rero.ch", - languages: ["fr", "de", "it", "en"], - globalViewName: "global", - translationsURLs: [ - "/assets/rero-ils-ui/shared/i18n/${lang}.json", - "/assets/rero-ils-ui/public-search/i18n/${lang}.json", - "/api/translations/${lang}.json", - ] -}; - -/* - * For easier debugging in development mode, you can import the following file - * to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`. - * - * This import should be commented out in production mode because it will have a negative impact - * on performance if an error is thrown. - */ -// import 'zone.js/plugins/zone-error'; // Included with Angular CLI. diff --git a/projects/public-user-profile-edit/src/favicon.ico b/projects/public-user-profile-edit/src/favicon.ico deleted file mode 100644 index 997406ad22c29aae95893fb3d666c30258a09537..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 948 zcmV;l155mgP)CBYU7IjCFmI-B}4sMJt3^s9NVg!P0 z6hDQy(L`XWMkB@zOLgN$4KYz;j0zZxq9KKdpZE#5@k0crP^5f9KO};h)ZDQ%ybhht z%t9#h|nu0K(bJ ztIkhEr!*UyrZWQ1k2+YkGqDi8Z<|mIN&$kzpKl{cNP=OQzXHz>vn+c)F)zO|Bou>E z2|-d_=qY#Y+yOu1a}XI?cU}%04)zz%anD(XZC{#~WreV!a$7k2Ug`?&CUEc0EtrkZ zL49MB)h!_K{H(*l_93D5tO0;BUnvYlo+;yss%n^&qjt6fZOa+}+FDO(~2>G z2dx@=JZ?DHP^;b7*Y1as5^uphBsh*s*z&MBd?e@I>-9kU>63PjP&^#5YTOb&x^6Cf z?674rmSHB5Fk!{Gv7rv!?qX#ei_L(XtwVqLX3L}$MI|kJ*w(rhx~tc&L&xP#?cQow zX_|gx$wMr3pRZIIr_;;O|8fAjd;1`nOeu5K(pCu7>^3E&D2OBBq?sYa(%S?GwG&_0-s%_v$L@R!5H_fc)lOb9ZoOO#p`Nn`KU z3LTTBtjwo`7(HA6 z7gmO$yTR!5L>Bsg!X8616{JUngg_@&85%>W=mChTR;x4`P=?PJ~oPuy5 zU-L`C@_!34D21{fD~Y8NVnR3t;aqZI3fIhmgmx}$oc-dKDC6Ap$Gy>a!`A*x2L1v0 WcZ@i?LyX}70000. ---> - - - - - Patron Profile - - - - - - - - - - -
-
- -
-
-
- - diff --git a/projects/public-user-profile-edit/src/main.ts b/projects/public-user-profile-edit/src/main.ts deleted file mode 100644 index c7b673cf4..000000000 --- a/projects/public-user-profile-edit/src/main.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { enableProdMode } from '@angular/core'; -import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; - -import { AppModule } from './app/app.module'; -import { environment } from './environments/environment'; - -if (environment.production) { - enableProdMode(); -} - -platformBrowserDynamic().bootstrapModule(AppModule) - .catch(err => console.error(err)); diff --git a/projects/public-user-profile-edit/src/polyfills.ts b/projects/public-user-profile-edit/src/polyfills.ts deleted file mode 100644 index dcd18eace..000000000 --- a/projects/public-user-profile-edit/src/polyfills.ts +++ /dev/null @@ -1,53 +0,0 @@ -/** - * This file includes polyfills needed by Angular and is loaded before the app. - * You can add your own extra polyfills to this file. - * - * This file is divided into 2 sections: - * 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers. - * 2. Application imports. Files imported after ZoneJS that should be loaded before your main - * file. - * - * The current setup is for so-called "evergreen" browsers; the last versions of browsers that - * automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera), - * Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile. - * - * Learn more in https://angular.io/guide/browser-support - */ - -/*************************************************************************************************** - * BROWSER POLYFILLS - */ - -/** - * By default, zone.js will patch all possible macroTask and DomEvents - * user can disable parts of macroTask/DomEvents patch by setting following flags - * because those flags need to be set before `zone.js` being loaded, and webpack - * will put import in the top of bundle, so user need to create a separate file - * in this directory (for example: zone-flags.ts), and put the following flags - * into that file, and then add the following code before importing zone.js. - * import './zone-flags'; - * - * The flags allowed in zone-flags.ts are listed here. - * - * The following flags will work for all browsers. - * - * (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame - * (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick - * (window as any).__zone_symbol__UNPATCHED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames - * - * in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js - * with the following flag, it will bypass `zone.js` patch for IE/Edge - * - * (window as any).__Zone_enable_cross_context_check = true; - * - */ - -/*************************************************************************************************** - * Zone JS is required by default for Angular itself. - */ -import 'zone.js'; // Included with Angular CLI. - - -/*************************************************************************************************** - * APPLICATION IMPORTS - */ diff --git a/projects/public-user-profile-edit/src/test.ts b/projects/public-user-profile-edit/src/test.ts deleted file mode 100644 index 204235640..000000000 --- a/projects/public-user-profile-edit/src/test.ts +++ /dev/null @@ -1,25 +0,0 @@ -// This file is required by karma.conf.js and loads recursively all the .spec and framework files - -import 'zone.js/testing'; -import { getTestBed } from '@angular/core/testing'; -import { - BrowserDynamicTestingModule, - platformBrowserDynamicTesting -} from '@angular/platform-browser-dynamic/testing'; - -declare const require: { - context(path: string, deep?: boolean, filter?: RegExp): { - keys(): string[]; - (id: string): T; - }; -}; - -// First, initialize the Angular testing environment. -getTestBed().initTestEnvironment( - BrowserDynamicTestingModule, - platformBrowserDynamicTesting() -); -// Then we find all the tests. -const context = require.context('./', true, /\.spec\.ts$/); -// And load the modules. -context.keys().map(context); diff --git a/projects/public-user-profile-edit/tsconfig.app.json b/projects/public-user-profile-edit/tsconfig.app.json deleted file mode 100644 index 809c09ca7..000000000 --- a/projects/public-user-profile-edit/tsconfig.app.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compilerOptions": { - "outDir": "../../out-tsc/app", - "types": [] - }, - "files": [ - "src/main.ts", - "src/polyfills.ts" - ], - "include": [ - "src/**/*.d.ts" - ] -} diff --git a/projects/public-user-profile-edit/tsconfig.spec.json b/projects/public-user-profile-edit/tsconfig.spec.json deleted file mode 100644 index a8ce1d396..000000000 --- a/projects/public-user-profile-edit/tsconfig.spec.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compilerOptions": { - "outDir": "../../out-tsc/spec", - "types": [ - "jasmine", - "node" - ] - }, - "files": [ - "src/test.ts", - "src/polyfills.ts" - ], - "include": [ - "src/**/*.spec.ts", - "src/**/*.d.ts" - ] -} diff --git a/projects/search-bar/src/index.html b/projects/search-bar/src/index.html index c0580b3e2..88d9bc770 100644 --- a/projects/search-bar/src/index.html +++ b/projects/search-bar/src/index.html @@ -4,17 +4,9 @@ SearchBar - - - +
@@ -22,7 +14,7 @@

Search bar

- +
diff --git a/projects/shared/src/lib/component/documents/document-brief-view/document-brief-view.component.html b/projects/shared/src/lib/component/documents/document-brief-view/document-brief-view.component.html index 022c8d72a..0e2164425 100644 --- a/projects/shared/src/lib/component/documents/document-brief-view/document-brief-view.component.html +++ b/projects/shared/src/lib/component/documents/document-brief-view/document-brief-view.component.html @@ -40,13 +40,13 @@ @if (record.identifiedBy | identifiedByLabel: ['bf:Isbn', 'bf:Ean']; as identifiedBy) { -
+
ISBN: {{ identifiedBy | truncateText: 3 }}
} @if (record.identifiedBy | identifiedByLabel: ['bf:Issn']; as identifiedBy) { -
+
ISSN: {{ identifiedBy | truncateText: 3 }}
} diff --git a/projects/shared/src/lib/component/documents/document-brief-view/document-brief-view.component.scss b/projects/shared/src/lib/component/documents/document-brief-view/document-brief-view.component.scss deleted file mode 100644 index 70ad4a697..000000000 --- a/projects/shared/src/lib/component/documents/document-brief-view/document-brief-view.component.scss +++ /dev/null @@ -1,23 +0,0 @@ -/* - * RERO ILS UI - * Copyright (C) 2023 RERO - * Copyright (C) 2023 UCLouvain - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, version 3 of the License. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - */ - -@import 'primeflex/primeflex'; - -.small-content{ - @extend .text-sm, .font-bold, .text-color-secondary; -} diff --git a/projects/shared/src/lib/component/documents/document-brief-view/document-brief-view.component.ts b/projects/shared/src/lib/component/documents/document-brief-view/document-brief-view.component.ts index a80e4d184..6188dc342 100644 --- a/projects/shared/src/lib/component/documents/document-brief-view/document-brief-view.component.ts +++ b/projects/shared/src/lib/component/documents/document-brief-view/document-brief-view.component.ts @@ -20,8 +20,7 @@ import { Component, Input } from '@angular/core'; @Component({ selector: 'shared-document-brief-view', - templateUrl: './document-brief-view.component.html', - styleUrls: ['./document-brief-view.component.scss'] + templateUrl: './document-brief-view.component.html' }) export class DocumentBriefViewComponent { diff --git a/projects/shared/src/lib/component/documents/document-description/document-description.component.html b/projects/shared/src/lib/component/documents/document-description/document-description.component.html index b63ce4396..7957d82a9 100644 --- a/projects/shared/src/lib/component/documents/document-description/document-description.component.html +++ b/projects/shared/src/lib/component/documents/document-description/document-description.component.html @@ -14,6 +14,7 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . --> +
@if (record.metadata.fiction_statement) { @@ -491,3 +492,4 @@ } +
diff --git a/projects/shared/src/lib/component/documents/document-description/other-edition/other-edition.component.html b/projects/shared/src/lib/component/documents/document-description/other-edition/other-edition.component.html index 4d02771a4..9e2adec2d 100644 --- a/projects/shared/src/lib/component/documents/document-description/other-edition/other-edition.component.html +++ b/projects/shared/src/lib/component/documents/document-description/other-edition/other-edition.component.html @@ -14,37 +14,21 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . --> -@if (!header) { - - {{ fieldLabel }} - -
    - @for (edition of field; track edition) { -
  • - @if (edition.label) { - {{ edition.label }} - } @else { - @if (edition.pid | getRecord : 'documents' : 'field' : 'title' | async; as documentTitle) { - {{ $any(documentTitle) | mainTitleRelation }} - } + + {{ fieldLabel }} + +
      + @for (edition of field; track edition) { +
    • + @if (edition.label) { + {{ edition.label }} + } @else { + @if (edition.pid | getRecord : 'documents' : 'field' : 'title' | async; as documentTitle) { + {{ $any(documentTitle) | mainTitleRelation }} } -
    • - } -
    -
    -
    -} @else { -
    - {{ fieldLabel }}: - @for (edition of field; track edition; let isLast = $last) { - @if (edition.label) { - {{ edition.label }} - } @else { - @if (edition.pid | getRecord : 'documents' : 'field' : 'title' | async; as documentTitle) { - {{ $any(documentTitle) | mainTitleRelation }} - } + } +
  • } - @if (!isLast) {; } - } -
-} + + + diff --git a/projects/shared/src/lib/component/documents/document-description/other-edition/other-edition.component.ts b/projects/shared/src/lib/component/documents/document-description/other-edition/other-edition.component.ts index e37c8bd0d..66ca80b08 100644 --- a/projects/shared/src/lib/component/documents/document-description/other-edition/other-edition.component.ts +++ b/projects/shared/src/lib/component/documents/document-description/other-edition/other-edition.component.ts @@ -22,9 +22,6 @@ import { Component, Input } from '@angular/core'; }) export class OtherEditionComponent { - /** Field in header */ - @Input() header = false; - /** Field label */ @Input() fieldLabel: string; diff --git a/projects/shared/src/lib/component/documents/files/files.component.html b/projects/shared/src/lib/component/documents/files/files.component.html index b4446383d..333306b0e 100644 --- a/projects/shared/src/lib/component/documents/files/files.component.html +++ b/projects/shared/src/lib/component/documents/files/files.component.html @@ -103,7 +103,7 @@ } +[style]="{ width: '50vw' }">

{{ previewFile?.label }} diff --git a/projects/shared/src/lib/component/documents/files/files.component.scss b/projects/shared/src/lib/component/documents/files/files.component.scss index 96e499068..df65b2b54 100644 --- a/projects/shared/src/lib/component/documents/files/files.component.scss +++ b/projects/shared/src/lib/component/documents/files/files.component.scss @@ -1,22 +1,25 @@ -// /* -// * RERO ILS UI -// * Copyright (C) 2021-2024 RERO -// * -// * This program is free software: you can redistribute it and/or modify -// * it under the terms of the GNU Affero General Public License as published by -// * the Free Software Foundation, version 3 of the License. -// * -// * This program is distributed in the hope that it will be useful, -// * but WITHOUT ANY WARRANTY; without even the implied warranty of -// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// * GNU Affero General Public License for more details. -// * -// * You should have received a copy of the GNU Affero General Public License -// * along with this program. If not, see . -// */ +/* + * RERO ILS UI + * Copyright (C) 2021-2024 RERO + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, version 3 of the License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ -:host ::ng-deep { +shared-doc-files { .p-carousel-item { @extend .align-self-end; } + .p-dialog { + transform: none; + } } diff --git a/projects/shared/src/lib/component/remote-search/remote-search-config.service.ts b/projects/shared/src/lib/component/remote-search/remote-search-config.service.ts index 93362c5f0..3aa723bf7 100644 --- a/projects/shared/src/lib/component/remote-search/remote-search-config.service.ts +++ b/projects/shared/src/lib/component/remote-search/remote-search-config.service.ts @@ -45,7 +45,7 @@ export class RemoteSearchConfig { { field: 'autocomplete_title', index: 'documents', - maxSuggestions: 5, + maxSuggestions: 10, groupLabel: this.translateService.instant('documents'), preFilters: viewCode !== undefined ? { view: viewCode } : {}, processSuggestions: (documents: any, query: any) => this.processDocuments(documents, query) @@ -53,7 +53,7 @@ export class RemoteSearchConfig { { field: 'autocomplete_name', index: 'entities', - maxSuggestions: 5, + maxSuggestions: 10, groupLabel: this.translateService.instant('authors/subjects'), preFilters: viewCode !== undefined ? { view: viewCode } : {}, processSuggestions: (entities: any, query: any) => this.processEntities(entities, query) diff --git a/projects/shared/src/lib/component/remote-search/remote-search.component.ts b/projects/shared/src/lib/component/remote-search/remote-search.component.ts index 03a60099a..37f73412a 100644 --- a/projects/shared/src/lib/component/remote-search/remote-search.component.ts +++ b/projects/shared/src/lib/component/remote-search/remote-search.component.ts @@ -31,6 +31,7 @@ export class RemoteSearchComponent implements OnInit, OnDestroy { private router: Router = inject(Router); private route: ActivatedRoute = inject(ActivatedRoute); private remoteSearchBarConfig: RemoteSearchConfig = inject(RemoteSearchConfig); + private document: Document = inject(DOCUMENT); // You must use lowercase variable names for this to work in a web component. // Use @Input in this case, as the web component does not work with input (signal). @@ -41,7 +42,6 @@ export class RemoteSearchComponent implements OnInit, OnDestroy { @Input() inputstyleclass: string; @Input() internalRouting = false; - hideSearchElement: boolean = false; recordTypes: IRecordType[] = []; value: string | undefined; @@ -51,8 +51,6 @@ export class RemoteSearchComponent implements OnInit, OnDestroy { private subscription: Subscription = new Subscription(); - constructor(@Inject(DOCUMENT) private document: Document) {} - ngOnInit(): void { this.admin = this.boolean(this.admin); this.subscription.add(this.route.queryParamMap.subscribe((params: any) => {this.value = params.get('q')})); diff --git a/projects/shared/src/lib/modules/prime-ng-import/prime-ng-import.module.ts b/projects/shared/src/lib/modules/prime-ng-import/prime-ng-import.module.ts index c1f550cc3..8b186032c 100644 --- a/projects/shared/src/lib/modules/prime-ng-import/prime-ng-import.module.ts +++ b/projects/shared/src/lib/modules/prime-ng-import/prime-ng-import.module.ts @@ -25,6 +25,8 @@ import { TabViewModule } from 'primeng/tabview'; import { TagModule } from 'primeng/tag'; import { TimelineModule } from 'primeng/timeline'; import { DialogModule } from 'primeng/dialog'; +import { ToastModule } from 'primeng/toast'; +import { MessagesModule } from 'primeng/messages'; @NgModule({ @@ -36,7 +38,9 @@ import { DialogModule } from 'primeng/dialog'; TagModule, ButtonModule, PaginatorModule, - DialogModule + DialogModule, + MessagesModule, + ToastModule ] }) export class PrimeNgImportModule { } diff --git a/projects/shared/src/lib/view/thumbnail/thumbnail.component.html b/projects/shared/src/lib/view/thumbnail/thumbnail.component.html index d6f3cc15c..b6334d704 100644 --- a/projects/shared/src/lib/view/thumbnail/thumbnail.component.html +++ b/projects/shared/src/lib/view/thumbnail/thumbnail.component.html @@ -17,9 +17,9 @@ @if (record) {
- + @for (type of record.metadata.type; track type) { -
+
{{ type.subtype? (type.subtype | translate): (type.main_type | translate) }}
} diff --git a/projects/shared/src/lib/view/thumbnail/thumbnail.component.scss b/projects/shared/src/lib/view/thumbnail/thumbnail.component.scss index 44cd84100..7ff26226e 100644 --- a/projects/shared/src/lib/view/thumbnail/thumbnail.component.scss +++ b/projects/shared/src/lib/view/thumbnail/thumbnail.component.scss @@ -16,8 +16,6 @@ * along with this program. If not, see . */ -@import 'primeflex/primeflex'; - shared-thumbnail { figure.thumb-detail { @extend .h-auto, .max-h-full, .w-full; diff --git a/projects/shared/src/scss/styles.scss b/projects/shared/src/scss/styles.scss index d59c21bcb..503134e66 100644 --- a/projects/shared/src/scss/styles.scss +++ b/projects/shared/src/scss/styles.scss @@ -15,7 +15,6 @@ * along with this program. If not, see . */ -// @import "font-awesome/scss/font-awesome.scss"; @import "primeng/resources/primeng"; @import "primeicons/primeicons.css"; @import "primeng/resources/themes/aura-light-blue/theme.css"; @@ -39,14 +38,13 @@ vertical-align: top; content: " \f08e"; } + // THEME + .p-tag.p-tag-secondary { + background-color: var(--surface-300); + color: #475569; + } } } - -// THEME -.p-tag.p-tag-secondary { - background-color: var(--surface-300); - color: #475569; -} // // FIELDS FORMAT ----------------------- // ng-core-formly-field-primeng-input > input, // formly-field > input { @@ -57,6 +55,3 @@ // @extend .bg-blue-50; // } -// label { -// @extend .align-items-baseline; -// }