Skip to content

Commit

Permalink
public interface: refactoring primeng
Browse files Browse the repository at this point in the history
* Refactors the shared module.
* Refactors the holding items module.
* Refactors the user password module.
* Refactors the user profile edit module.
* Refactors the search bar module.
* Refactors the patron profile module.

Co-Authored-by: Johnny Mariéthoz <[email protected]>
Co-Authored-by: Bertrand Zuchuat <[email protected]>
  • Loading branch information
jma and Garfield-fr committed Nov 20, 2024
1 parent 322eb21 commit b84475b
Show file tree
Hide file tree
Showing 98 changed files with 1,239 additions and 1,770 deletions.
50 changes: 10 additions & 40 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,6 @@
}
],
"styles": [
"node_modules/primeng/resources/themes/bootstrap4-light-blue/theme.css",
"node_modules/primeng/resources/primeng.min.css",
"node_modules/primeicons/primeicons.css",
"node_modules/primeflex/primeflex.min.css",
"node_modules/ngx-spinner/animations/ball-zig-zag.css",
"projects/admin/src/app/scss/styles.scss",
"projects/shared/src/scss/styles.scss"
],
"scripts": [],
Expand Down Expand Up @@ -77,7 +71,7 @@
{
"type": "initial",
"maximumWarning": "2.5mb",
"maximumError": "7mb"
"maximumError": "9mb"
},
{
"type": "anyComponentStyle",
Expand Down Expand Up @@ -113,7 +107,6 @@
"tsConfig": "projects/admin/tsconfig.spec.json",
"karmaConfig": "projects/admin/karma.conf.js",
"assets": [],
"styles": ["projects/admin/src/app/scss/styles.scss"],
"scripts": []
}
},
Expand Down Expand Up @@ -169,13 +162,7 @@
}
],
"styles": [
"node_modules/primeng/resources/themes/bootstrap4-light-blue/theme.css",
"node_modules/primeng/resources/primeng.min.css",
"node_modules/primeicons/primeicons.css",
"node_modules/primeflex/primeflex.min.css",
"node_modules/ngx-spinner/animations/ball-zig-zag.css",
"projects/public-search/src/app/scss/styles.scss",
"projects/shared/src/scss/styles.scss"
"projects/public-search/src/app/scss/styles.scss"
],
"scripts": []
},
Expand Down Expand Up @@ -277,11 +264,7 @@
}
],
"styles": [
"node_modules/primeng/resources/themes/bootstrap4-light-blue/theme.css",
"node_modules/primeng/resources/primeng.min.css",
"node_modules/primeicons/primeicons.css",
"node_modules/primeflex/primeflex.min.css",
"projects/shared/src/scss/styles.scss"
"projects/public-search/src/app/scss/bootstrap_styles.scss"
],
"scripts": [],
"vendorChunk": true,
Expand All @@ -299,6 +282,9 @@
"with": "projects/public-search/src/environments/environment.prod.ts"
}
],
"styles": [
"projects/public-search/src/app/scss/styles.scss"
],
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
Expand Down Expand Up @@ -405,10 +391,7 @@
}
],
"styles": [
"node_modules/primeng/resources/themes/bootstrap4-light-blue/theme.css",
"node_modules/primeng/resources/primeng.min.css",
"node_modules/primeicons/primeicons.css",
"node_modules/primeflex/primeflex.min.css"
"projects/public-search/src/app/scss/styles.scss"
],
"scripts": [],
"vendorChunk": true,
Expand Down Expand Up @@ -556,12 +539,7 @@
}
],
"styles": [
"node_modules/primeng/resources/themes/bootstrap4-light-blue/theme.css",
"node_modules/primeng/resources/primeng.min.css",
"node_modules/primeicons/primeicons.css",
"node_modules/primeflex/primeflex.min.css",
"projects/public-search/src/app/scss/styles.scss",
"projects/shared/src/scss/styles.scss"
"projects/public-search/src/app/scss/styles.scss"
],
"scripts": [],
"vendorChunk": true,
Expand Down Expand Up @@ -673,11 +651,7 @@
}
],
"styles": [
"node_modules/primeng/resources/themes/bootstrap4-light-blue/theme.css",
"node_modules/primeng/resources/primeng.min.css",
"node_modules/primeicons/primeicons.css",
"node_modules/primeflex/primeflex.min.css",
"projects/shared/src/scss/styles.scss"
"projects/public-search/src/app/scss/styles.scss"
],
"scripts": []
},
Expand Down Expand Up @@ -781,11 +755,7 @@
}
],
"styles": [
"node_modules/primeng/resources/themes/bootstrap4-light-blue/theme.css",
"node_modules/primeng/resources/primeng.min.css",
"node_modules/primeicons/primeicons.css",
"node_modules/primeflex/primeflex.min.css",
"projects/shared/src/scss/styles.scss"
"projects/public-search/src/app/scss/styles.scss"
],
"scripts": []
},
Expand Down
51 changes: 11 additions & 40 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,15 +78,15 @@
"@angular/platform-browser-dynamic": "^17.1.0",
"@angular/router": "^17.1.0",
"@biesbjerg/ngx-translate-extract-marker": "^1.0.0",
"@ngneat/hotkeys": "^4.0.0",
"@ng-bootstrap/ng-bootstrap": "^16.0.0",
"@ngneat/hotkeys": "^4.0.0",
"@ngx-formly/core": "^6.3.6",
"@ngx-formly/primeng": "^6.3.6",
"@ngx-loading-bar/core": "^6.0.0",
"@ngx-loading-bar/http-client": "^6.0.0",
"@ngx-loading-bar/router": "^6.0.0",
"@ngx-translate/core": "^15.0.0",
"@rero/ng-core": "^17.2.3",
"@rero/ng-core": "file:../ng-core/rero-ng-core-17.2.3.tgz",
"@swimlane/ngx-charts": "^20.5.0",
"@vpoppy/ngx-translate-extract": "^9.0.0",
"bootstrap": "^4.6.2",
Expand All @@ -100,8 +100,8 @@
"marked": "^10.0.0",
"ngx-spinner": "^16.0.0",
"primeflex": "^3.3.1",
"primeicons": "^6.0.1",
"primeng": "^17.14.1",
"primeicons": "^7.0.0",
"primeng": "^17.18.0",
"rxjs": "^7.8.1",
"simple-isbn": "^1.1.5",
"tslib": "^2.6.0",
Expand Down
7 changes: 5 additions & 2 deletions projects/admin/src/app/acquisition/acquisition.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,16 @@
@import 'bootstrap/scss/functions';
@import 'bootstrap/scss/variables';
@import '../scss/variables';
// @import "primeflex/primeflex";
// @import "@rero/ng-core/assets/scss/ng-core";

.account {

$DEPTH-PADDING: 50px;
$MAX-DEPTH: 10;

margin-bottom: map-get($spacers, 1);
// @extend .mb-1;


&:hover{
background-color: #F8F8F8;
Expand Down Expand Up @@ -53,7 +56,7 @@
// ===========================================================================
.receipt {
.account-number {
font-size: $small-font-size;
// @extend .text-sm;
color: $secondary;
font-weight: bold;
&:before {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ template: `
<div class="my-2">
<ng-container #fieldComponent></ng-container>
@if (showError) {
<div class="invalid-feedback d-block">
<formly-validation-message [field]="field"></formly-validation-message>
<div class="text-error my-2">
<formly-validation-message [field]="field" />
</div>
}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,18 +37,16 @@
<label for="auto-refresh" translate>Auto refresh</label>
</div>
@if (refreshInterval > 0) {
<ng-core-sort-list
<ng-core-menu-sort
class="pl-3"
[options]="refreshOptions"
[useIcon]="true"
[config]="sortingCriteria"
(selectChange)="selectingIntervalTimer($event)"
/>
}
<!-- Sorting loans -->
<ng-core-sort-list
<ng-core-menu-sort
class="pl-3"
[options]="sortingCriteria"
[useIcon]="true"
[config]="sortingCriteria"
(selectChange)="selectingSortCriteria($event)"
/>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,15 @@
<div class="col"></div>
<!-- Sorting loans -->
<div class="col-md-4 d-flex align-items-end justify-content-end">
<ng-core-sort-list
[options]="[
<ng-core-menu-sort
[config]="[
{value:'-transactiondate', label:'Transaction date (desc)' | translate, icon:'fa-sort-numeric-desc'},
{value:'transactiondate', label:'Transaction date' | translate, icon:'fa-sort-numeric-asc'},
{value:'-duedate', label:'Due date (desc)' | translate, icon:'fa-sort-numeric-desc'},
{value:'duedate', label:'Due date' | translate, icon:'fa-sort-numeric-asc'},
{value:'-location', label:'Location (desc)' | translate, icon: 'fa-sort-numeric-desc'},
{value:'location', label:'Location' | translate, icon: 'fa-sort-numeric-asc'}
]"
[useIcon]="true"
(selectChange)="selectingSortCriteria($event)"
/>
</div>
Expand Down
6 changes: 6 additions & 0 deletions projects/admin/src/app/scss/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@
@import 'font-awesome/scss/font-awesome';
@import 'variables';
@import 'bootstrap/scss/bootstrap';
@import 'bootstrap/scss/_functions';
@import 'bootstrap/scss/_mixins';
@import 'bootstrap/scss/_variables';
// @import "@rero/ng-core/assets/scss/ng-core";

// @import "primeflex/primeflex";


html [type=button] {
Expand Down
4 changes: 3 additions & 1 deletion projects/public-holdings-items/src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,16 @@ import { LoadingBarHttpClientModule } from '@ngx-loading-bar/http-client';
import { TranslateLoader as BaseTranslateLoader, TranslateModule, TranslateService } from '@ngx-translate/core';
import { CoreConfigService, CoreModule, NgCoreTranslateService, RecordModule, TranslateLoader } from '@rero/ng-core';
import { SharedModule } from '@rero/shared';
import { DividerModule } from 'primeng/divider';
import { HoldingComponent } from 'projects/public-search/src/app/document-detail/holdings/holding/holding.component';
import { HoldingsComponent } from 'projects/public-search/src/app/document-detail/holdings/holdings.component';
import { ItemsComponent } from 'projects/public-search/src/app/document-detail/holdings/items/items.component';
import { ItemComponent } from 'projects/public-search/src/app/document-detail/item/item.component';
import { PickupLocationComponent } from 'projects/public-search/src/app/document-detail/request/pickup-location/pickup-location.component';
import { RequestComponent } from 'projects/public-search/src/app/document-detail/request/request.component';
import { Observable } from 'rxjs';
import { AppConfigService } from './app-config-service.service';
import { AppInitializerService } from './app-initializer.service';
import { Observable } from 'rxjs';

/** function to instantiate the application */
export function appInitFactory(appInitializerService: AppInitializerService): () => Observable<any> {
Expand All @@ -56,6 +57,7 @@ export function appInitFactory(appInitializerService: AppInitializerService): ()
imports: [
BrowserModule,
BrowserAnimationsModule,
DividerModule,
RouterModule.forRoot([]),
HttpClientModule,
FormsModule,
Expand Down
Loading

0 comments on commit b84475b

Please sign in to comment.