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 <Johnny.Mariethoz@rero.ch>
Co-Authored-by: Bertrand Zuchuat <bertrand.zuchuat@rero.ch>
  • Loading branch information
jma and Garfield-fr committed Nov 28, 2024
1 parent 322eb21 commit 7f5dccb
Show file tree
Hide file tree
Showing 120 changed files with 1,680 additions and 2,085 deletions.
76 changes: 32 additions & 44 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,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/admin/src/app/scss/styles.scss",
"projects/shared/src/scss/styles.scss"
"projects/admin/src/app/scss/styles.scss"
],
"scripts": [],
"vendorChunk": true,
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,15 +162,15 @@
}
],
"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": []
"scripts": [],
"vendorChunk": true,
"extractLicenses": false,
"buildOptimizer": false,
"sourceMap": true,
"optimization": false,
"namedChunks": true
},
"configurations": {
"production": {
Expand Down Expand Up @@ -277,11 +270,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 +288,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 +397,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 +545,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,13 +657,15 @@
}
],
"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": []
"scripts": [],
"vendorChunk": true,
"extractLicenses": false,
"buildOptimizer": false,
"sourceMap": true,
"optimization": false,
"namedChunks": true
},
"configurations": {
"production": {
Expand Down Expand Up @@ -781,13 +767,15 @@
}
],
"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": []
"scripts": [],
"vendorChunk": true,
"extractLicenses": false,
"buildOptimizer": false,
"sourceMap": true,
"optimization": false,
"namedChunks": true
},
"configurations": {
"production": {
Expand Down
18 changes: 9 additions & 9 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": "^17.3.0",
"@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
16 changes: 1 addition & 15 deletions projects/admin/src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,7 @@ import { MenuDashboardComponent } from './menu/menu-dashboard/menu-dashboard.com
import { MenuDisplayComponent } from './menu/menu-display/menu-display.component';
import { MenuUserComponent } from './menu/menu-user/menu-user.component';
import { CountryCodeTranslatePipe } from './pipe/country-code-translate.pipe';
import { DocumentProvisionActivityPipe } from './pipe/document-provision-activity.pipe';
import { ItemInCollectionPipe } from './pipe/item-in-collection.pipe';
import { MainTitleRelationPipe } from './pipe/main-title-relation.pipe';
import { MarcPipe } from './pipe/marc.pipe';
import { NotesFormatPipe } from './pipe/notes-format.pipe';
import { PatronNamePipe } from './pipe/patron-name.pipe';
Expand Down Expand Up @@ -99,13 +97,6 @@ import { CircPolicyDetailViewComponent } from './record/detail-view/circ-policy-
import { CollectionDetailViewComponent } from './record/detail-view/collection-detail-view/collection-detail-view.component';
import { CollectionItemsComponent } from './record/detail-view/collection-detail-view/collection-items/collection-items.component';
import { DialogImportComponent } from './record/detail-view/document-detail-view/dialog-import/dialog-import.component';
import { DescriptionZoneComponent } from './record/detail-view/document-detail-view/document-description/description-zone/description-zone.component';
import {
DocumentDescriptionComponent
} from './record/detail-view/document-detail-view/document-description/document-description.component';
import {
OtherEditionComponent
} from './record/detail-view/document-detail-view/document-description/other-edition/other-edition.component';
import { DocumentDetailViewComponent } from './record/detail-view/document-detail-view/document-detail-view.component';
import { DocumentDetailComponent } from './record/detail-view/document-detail-view/document-detail/document-detail.component';
import { EntitiesRelatedComponent } from './record/detail-view/document-detail-view/entities-related/entities-related.component';
Expand Down Expand Up @@ -203,9 +194,9 @@ import { CurrentLibraryPermissionValidator } from './utils/permissions';
import { CustomShortcutHelpComponent } from './widgets/custom-shortcut-help/custom-shortcut-help.component';
import { FrontpageComponent } from './widgets/frontpage/frontpage.component';

import { HotkeysShortcutPipe } from '@ngneat/hotkeys';
import { EntityAutocompleteComponent } from './record/editor/formly/primeng/entity-autocomplete/entity-autocomplete.component';
import { RemoteAutocompleteService as UiRemoteAutocompleteService } from './record/editor/formly/primeng/remote-autocomplete/remote-autocomplete.service';
import { HotkeysShortcutPipe } from '@ngneat/hotkeys';

/** Init application factory */
export function appInitFactory(appInitializerService: AppInitializerService): () => Observable<any> {
Expand Down Expand Up @@ -292,11 +283,6 @@ export function appInitFactory(appInitializerService: AppInitializerService): ()
CirculationLogComponent,
ItemInCollectionPipe,
CountryCodeTranslatePipe,
DocumentDescriptionComponent,
OtherEditionComponent,
DescriptionZoneComponent,
DocumentProvisionActivityPipe,
MainTitleRelationPipe,
HoldingOrganisationComponent,
ExpectedIssueComponent,
ReceivedIssueComponent,
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
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ <h3 id="{{ 'doc-altgr-title-' + i }}">{{ altgr_title }}</h3>
<ng-template pTemplate="header">
<i class="fa fa-bars mr-1"></i> {{ "Description" | translate }}
</ng-template>
<admin-document-description [record]="record" />
<shared-document-description [record]="record" />
</p-tabPanel>

<!-- ENTITIES RELATED -->
Expand Down
Loading

0 comments on commit 7f5dccb

Please sign in to comment.