add angular18 boilerplate

This commit is contained in:
Tykayn 2025-10-15 11:17:29 +02:00 committed by tykayn
parent ab962e27d3
commit 7cebea45d8
122 changed files with 15816 additions and 0 deletions

105
angular18/README.md Normal file
View file

@ -0,0 +1,105 @@
# ▶️ EasyAngular
Welcome to the EasyAngular boilerplate! This project is designed to help you quickly start a new **Angular 18** project with **Bootstrap 5** and various useful libraries. It comes with pre-coded elements to streamline your development process.
## Getting started
### Prerequisites
Make sure you have the following installed :
- [Node.js](https://nodejs.org/) (version 20)
- [Angular CLI](https://angular.dev/) (version 18) using `npm install -g @angular/cli`
### Installation
Clone the repository :
```sh
git clone https://github.com/NicolasRoehm/angular-boilerplate.git
cd angular-boilerplate
npm install
```
### ✒️ Usage
- Rename `EasyAngular` and `easy-angular` with your project name
- Place favicon generated with [RealFavIconGenerator](https://realfavicongenerator.net/) into `src/assets/img/favicon` folder
### Development server
Run the following command for a development server. Navigate to http://localhost:4200/. The app will automatically reload if you change any of the source files.
```sh
ng-serve
```
## Boilerplate content
### 🗂️ Source code structure
<table>
<tr>
<td>
<img src="./src/assets/img/project/folder-structure.png" alt="Project Structure" width="200"/>
</td>
<td>
<ul>
<li><strong>Pages</strong>
<ul>
<li>Auth (login, forgot password, validate account) with 2 possible layouts</li>
<li>Home</li>
<li>404</li>
</ul>
</li>
<li><strong>Shared components</strong>
<ul>
<li>Blocks : toast & progress bar</li>
<li>Forms : confirm</li>
<li>Layouts : page & header</li>
<li>Modals : wrapper</li>
</ul>
</li>
<li><strong>Enums</strong> : endpoints / environments / storage keys</li>
<li><strong>Helpers</strong> : storage / string</li>
<li><strong>Services</strong> : app (for requests) / store (for state management using signals)</li>
<li><strong>i18n</strong> : en.json (for internationalization)</li>
</ul>
</td>
</tr>
</table>
### 🌐 Included packages
- [Bootstrap 5](https://getbootstrap.com/) : SCSS style & [ng-bootstrap](https://ng-bootstrap.github.io/) components
- [Axios](https://github.com/axios/axios) : HTTP client
- [ArrayTyper](https://github.com/FranzStrudel/-caliatys-array-typer) : Utility for type-safe array operations
- [angular-svg-icon](https://github.com/czeckd/angular-svg-icon) : SVG icon support
- [ngx-translate](https://github.com/ngx-translate/core) : Internationalization library
## 🛠️ Tools
- Generate models from JSON - https://app.quicktype.io/
- Generate favicon from SVG - https://realfavicongenerator.net/
## Angular CLI commands
### Code scaffolding
Generate a new component :
```sh
ng generate component component-name
```
You can also use `ng generate` for directives, pipes, services, classes, guards, interfaces, enums, and modules.
### Build
Build the project :
```sh
ng build
```
The build artifacts will be stored in the `dist/` directory.
### Running tests
#### Unit tests
Run unit tests via Karma :
```sh
ng test
```
#### End-to-End tests
Run end-to-end tests via a platform of your choice. You need to add a package that implements end-to-end testing capabilities :
```sh
ng e2e
```
## Further help
To get more help on the Angular CLI, use `ng help` or visit the [Angular CLI Overview and Command Reference](https://angular.dev/tools/cli) page.

113
angular18/angular.json Normal file
View file

@ -0,0 +1,113 @@
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"EasyAngular": {
"projectType": "application",
"schematics": {
"@schematics/angular:component": {
"style": "scss"
},
"@schematics/angular:application": {
"strict": true
}
},
"root": "",
"sourceRoot": "src",
"prefix": "app",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "dist/easy-angular",
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.app.json",
"inlineStyleLanguage": "scss",
"assets": [
"src/assets/img/favicon/favicon.ico",
"src/assets"
],
"styles": [
"src/assets/scss/styles.scss"
],
"scripts": []
},
"configurations": {
"production": {
"budgets": [
{
"type": "initial",
"maximumWarning": "500kb",
"maximumError": "1mb"
},
{
"type": "anyComponentStyle",
"maximumWarning": "2kb",
"maximumError": "4kb"
}
],
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
}
],
"outputHashing": "all"
},
"development": {
"buildOptimizer": false,
"optimization": false,
"vendorChunk": true,
"extractLicenses": false,
"sourceMap": true,
"namedChunks": true
}
},
"defaultConfiguration": "production"
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"configurations": {
"production": {
"buildTarget": "EasyAngular:build:production"
},
"development": {
"buildTarget": "EasyAngular:build:development"
}
},
"defaultConfiguration": "development"
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"buildTarget": "EasyAngular:build"
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "src/test.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.spec.json",
"karmaConfig": "karma.conf.js",
"inlineStyleLanguage": "scss",
"assets": [
"src/assets/img/favicon/favicon.ico",
"src/assets"
],
"styles": [
"src/assets/scss/styles.scss"
],
"scripts": []
}
}
}
}
},
"cli": {
"analytics": false
}
}

View file

@ -0,0 +1 @@
"use strict";(self.webpackChunkEasyAngular=self.webpackChunkEasyAngular||[]).push([[142],{3142:(h,i,a)=>{a.r(i),a.d(i,{ForgotPasswordComponent:()=>v});var l=a(467),m=a(177),r=a(9417),_=a(4550),u=a(9664),t=a(4438),d=a(1315),c=a(6825);const p=e=>({"is-invalid":e});function f(e,g){1&e&&(t.j41(0,"div",13),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&e&&(t.R7$(),t.SpI(" ",t.bMT(2,1,"FIELD_REQUIRED")," "))}function E(e,g){1&e&&(t.j41(0,"div",13),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&e&&(t.R7$(),t.SpI(" ",t.bMT(2,1,"FIELD_EMAIL")," "))}let v=(()=>{class e{constructor(o,s,n){this.router=o,this.storeService=s,this.appService=n,this.initFormGroup()}initFormGroup(){this.formGroup=new r.gE({email:new r.MJ({value:"",disabled:!1},{validators:[r.k0.required,r.k0.email],nonNullable:!0})})}onClickSubmit(){var o=this;return(0,l.A)(function*(){yield o.forgotPassword()})()}forgotPassword(){var o=this;return(0,l.A)(function*(){o.storeService.isLoading.set(!0);const s=o.formGroup.controls.email.getRawValue(),n=yield o.appService.forgotPassword(s);o.storeService.isLoading.set(!1),n&&o.router.navigate(["/auth/validate-account"])})()}static#t=this.\u0275fac=function(s){return new(s||e)(t.rXU(_.Ix),t.rXU(d.n),t.rXU(c.d))};static#r=this.\u0275cmp=t.VBU({type:e,selectors:[["app-forgot-password"]],standalone:!0,features:[t.aNF],decls:22,vars:19,consts:[[1,"text-center","text-primary","mb-4"],[1,"h2","fw-normal","mb-0"],[1,"d-flex","justify-content-center"],[1,"wrapper"],[3,"ngSubmit","formGroup"],[1,"mb-3"],["for","email",1,"form-label","text-start","w-100"],["type","email","id","email","formControlName","email",1,"form-control",3,"ngClass"],["class","invalid-feedback",4,"ngIf"],[1,"text-center"],["type","submit",1,"btn","btn-primary","px-5",3,"disabled"],[1,"text-center","my-3"],["routerLink","/auth/login"],[1,"invalid-feedback"]],template:function(s,n){1&s&&(t.j41(0,"div",0)(1,"div",1),t.EFF(2),t.nI1(3,"translate"),t.k0s()(),t.j41(4,"div",2)(5,"div",3)(6,"form",4),t.bIt("ngSubmit",function(){return n.onClickSubmit()}),t.j41(7,"div",5)(8,"label",6),t.EFF(9),t.nI1(10,"translate"),t.k0s(),t.nrm(11,"input",7),t.DNE(12,f,3,3,"div",8)(13,E,3,3,"div",8),t.k0s(),t.j41(14,"div",9)(15,"button",10),t.EFF(16),t.nI1(17,"translate"),t.k0s()(),t.j41(18,"div",11)(19,"a",12),t.EFF(20),t.nI1(21,"translate"),t.k0s()()()()()),2&s&&(t.R7$(2),t.JRh(t.bMT(3,9,"FORGOT_YOUR_PWD")),t.R7$(4),t.Y8G("formGroup",n.formGroup),t.R7$(3),t.JRh(t.bMT(10,11,"EMAIL")),t.R7$(2),t.Y8G("ngClass",t.eq3(17,p,n.formGroup.controls.email.errors&&n.formGroup.controls.email.touched)),t.R7$(),t.Y8G("ngIf",n.formGroup.controls.email.hasError("required")),t.R7$(),t.Y8G("ngIf",n.formGroup.controls.email.hasError("email")),t.R7$(2),t.Y8G("disabled",!n.formGroup.valid),t.R7$(),t.SpI(" ",t.bMT(17,13,"RESET_PASSWORD")," "),t.R7$(4),t.JRh(t.bMT(21,15,"BACK_TO_LOGIN")))},dependencies:[r.YN,r.qT,r.me,r.BC,r.cb,r.X1,r.j4,r.JD,m.YU,m.bT,_.Wk,u.h,u.D9],styles:[".wrapper[_ngcontent-%COMP%]{max-width:350px;width:100%}"]})}return e})()}}]);

View file

@ -0,0 +1 @@
"use strict";(self.webpackChunkEasyAngular=self.webpackChunkEasyAngular||[]).push([[290],{6290:(I,i,a)=>{a.r(i),a.d(i,{LoginComponent:()=>b});var l=a(467),m=a(177),o=a(9417),_=a(4550),d=a(9664),E=a(2767),e=a(4438),f=a(1315),v=a(6825);const u=t=>({"is-invalid":t});function R(t,p){1&t&&(e.j41(0,"div",18),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&t&&(e.R7$(),e.SpI(" ",e.bMT(2,1,"FIELD_REQUIRED")," "))}function h(t,p){1&t&&(e.j41(0,"div",18),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&t&&(e.R7$(),e.SpI(" ",e.bMT(2,1,"FIELD_EMAIL")," "))}function g(t,p){1&t&&(e.j41(0,"div",18),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&t&&(e.R7$(),e.SpI(" ",e.bMT(2,1,"FIELD_REQUIRED")," "))}let b=(()=>{class t{constructor(n,s,r){this.router=n,this.storeService=s,this.appService=r,this.appName=E.c.appName,this.initFormGroup()}initFormGroup(){this.formGroup=new o.gE({email:new o.MJ({value:"",disabled:!1},{validators:[o.k0.required,o.k0.email],nonNullable:!0}),password:new o.MJ({value:"",disabled:!1},{validators:[o.k0.required],nonNullable:!0})})}onClickSubmit(){var n=this;return(0,l.A)(function*(){yield n.authenticate()})()}authenticate(){var n=this;return(0,l.A)(function*(){n.storeService.isLoading.set(!0);const s=n.formGroup.controls.email.getRawValue(),r=n.formGroup.controls.password.getRawValue(),c=yield n.appService.authenticate(s,r);n.storeService.isLoading.set(!1),c&&n.router.navigate(["/home"])})()}static#e=this.\u0275fac=function(s){return new(s||t)(e.rXU(_.Ix),e.rXU(f.n),e.rXU(v.d))};static#t=this.\u0275cmp=e.VBU({type:t,selectors:[["app-login"]],standalone:!0,features:[e.aNF],decls:34,vars:30,consts:[[1,"text-center","text-primary","mb-4"],[1,"h2","fw-normal","mb-0"],[1,"h1","fw-bold","text-uppercase"],[1,"fw-normal","text-black"],[1,"d-flex","justify-content-center"],[1,"wrapper"],[3,"ngSubmit","formGroup"],[1,"mb-3"],["for","email",1,"form-label","text-start","w-100"],["type","email","id","email","formControlName","email",1,"form-control",3,"ngClass"],["class","invalid-feedback",4,"ngIf"],["for","password",1,"form-label","text-start","w-100"],["type","password","id","password","formControlName","password",1,"form-control",3,"ngClass"],[1,"text-end","mb-3"],["routerLink","/auth/forgot-password",1,""],[1,"text-center"],["type","submit",1,"btn","btn-primary","mb-3","px-5",3,"disabled"],[1,"px-4","d-block"],[1,"invalid-feedback"]],template:function(s,r){1&s&&(e.j41(0,"div",0)(1,"div",1),e.EFF(2),e.nI1(3,"translate"),e.k0s(),e.j41(4,"div",2),e.EFF(5),e.k0s(),e.j41(6,"div",3),e.EFF(7),e.nI1(8,"translate"),e.k0s()(),e.j41(9,"div",4)(10,"div",5)(11,"form",6),e.bIt("ngSubmit",function(){return r.onClickSubmit()}),e.j41(12,"div",7)(13,"label",8),e.EFF(14),e.nI1(15,"translate"),e.k0s(),e.nrm(16,"input",9),e.DNE(17,R,3,3,"div",10)(18,h,3,3,"div",10),e.k0s(),e.j41(19,"div",7)(20,"label",11),e.EFF(21),e.nI1(22,"translate"),e.k0s(),e.nrm(23,"input",12),e.DNE(24,g,3,3,"div",10),e.k0s(),e.j41(25,"div",13)(26,"a",14),e.EFF(27),e.nI1(28,"translate"),e.k0s()(),e.j41(29,"div",15)(30,"button",16)(31,"span",17),e.EFF(32),e.nI1(33,"translate"),e.k0s()()()()()()),2&s&&(e.R7$(2),e.JRh(e.bMT(3,14,"WELCOME_TO")),e.R7$(3),e.JRh(r.appName),e.R7$(2),e.JRh(e.bMT(8,16,"PROJECT_DESC")),e.R7$(4),e.Y8G("formGroup",r.formGroup),e.R7$(3),e.JRh(e.bMT(15,18,"EMAIL")),e.R7$(2),e.Y8G("ngClass",e.eq3(26,u,r.formGroup.controls.email.errors&&r.formGroup.controls.email.touched)),e.R7$(),e.Y8G("ngIf",r.formGroup.controls.email.hasError("required")),e.R7$(),e.Y8G("ngIf",r.formGroup.controls.email.hasError("email")),e.R7$(3),e.JRh(e.bMT(22,20,"PASSWORD")),e.R7$(2),e.Y8G("ngClass",e.eq3(28,u,r.formGroup.controls.password.errors&&r.formGroup.controls.password.touched)),e.R7$(),e.Y8G("ngIf",r.formGroup.controls.password.hasError("required")),e.R7$(3),e.JRh(e.bMT(28,22,"FORGOT_YOUR_PWD")),e.R7$(3),e.Y8G("disabled",!r.formGroup.valid),e.R7$(2),e.JRh(e.bMT(33,24,"SIGN_IN")))},dependencies:[o.YN,o.qT,o.me,o.BC,o.cb,o.X1,o.j4,o.JD,m.YU,m.bT,_.Wk,d.h,d.D9],styles:[".wrapper[_ngcontent-%COMP%]{max-width:350px;width:100%}"]})}return t})()}}]);

View file

@ -0,0 +1 @@
"use strict";(self.webpackChunkEasyAngular=self.webpackChunkEasyAngular||[]).push([[360],{1360:(A,l,n)=>{n.r(l),n.d(l,{ValidateAccountComponent:()=>h});var i=n(467),c=n(177),r=n(9417),u=n(9664),m=n(2767),t=n(4438),d=n(4550),p=n(1315),v=n(6825);const f=s=>({"is-invalid":s});function E(s,g){1&s&&(t.j41(0,"div",11),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&s&&(t.R7$(),t.SpI(" ",t.bMT(2,1,"FIELD_REQUIRED")," "))}let h=(()=>{class s{constructor(e,o,a,_){this.router=e,this.storeService=o,this.activatedRoute=a,this.appService=_,this.tokenFromUrl="",this.initFormGroup()}ngOnInit(){var e=this;return(0,i.A)(function*(){e.activatedRoute.queryParams.subscribe(o=>{e.tokenFromUrl=o.token,m.c.production||console.log("ValidateAccountComponent : ngOnInit -> Token : ",e.tokenFromUrl)})})()}initFormGroup(){this.formGroup=new r.gE({password:new r.MJ({value:"",disabled:!1},{validators:[r.k0.required],nonNullable:!0})})}onClickSubmit(){var e=this;return(0,i.A)(function*(){e.tokenFromUrl&&(yield e.validateNewAccount())})()}validateNewAccount(){var e=this;return(0,i.A)(function*(){e.storeService.isLoading.set(!0);const o=e.formGroup.controls.password.getRawValue(),a=yield e.appService.validateAccount(e.tokenFromUrl,o);e.storeService.isLoading.set(!1),a&&e.router.navigate(["/home"])})()}static#t=this.\u0275fac=function(o){return new(o||s)(t.rXU(d.Ix),t.rXU(p.n),t.rXU(d.nX),t.rXU(v.d))};static#e=this.\u0275cmp=t.VBU({type:s,selectors:[["app-validate-account"]],standalone:!0,features:[t.aNF],decls:17,vars:15,consts:[[1,"text-center","text-primary","mb-4"],[1,"h2","fw-normal","mb-0"],[1,"d-flex","justify-content-center"],[1,"wrapper"],[3,"ngSubmit","formGroup"],[1,"mb-3"],["for","password",1,"form-label","text-start","w-100"],["type","password","id","password","formControlName","password",1,"form-control",3,"ngClass"],["class","invalid-feedback",4,"ngIf"],[1,"text-center"],["type","submit",1,"btn","btn-primary","px-5",3,"disabled"],[1,"invalid-feedback"]],template:function(o,a){1&o&&(t.j41(0,"div",0)(1,"div",1),t.EFF(2),t.nI1(3,"translate"),t.k0s()(),t.j41(4,"div",2)(5,"div",3)(6,"form",4),t.bIt("ngSubmit",function(){return a.onClickSubmit()}),t.j41(7,"div",5)(8,"label",6),t.EFF(9),t.nI1(10,"translate"),t.k0s(),t.nrm(11,"input",7),t.DNE(12,E,3,3,"div",8),t.k0s(),t.j41(13,"div",9)(14,"button",10),t.EFF(15),t.nI1(16,"translate"),t.k0s()()()()()),2&o&&(t.R7$(2),t.JRh(t.bMT(3,7,"VALIDATE_ACCOUNT")),t.R7$(4),t.Y8G("formGroup",a.formGroup),t.R7$(3),t.JRh(t.bMT(10,9,"PASSWORD")),t.R7$(2),t.Y8G("ngClass",t.eq3(13,f,a.formGroup.controls.password.errors&&a.formGroup.controls.password.touched)),t.R7$(),t.Y8G("ngIf",a.formGroup.controls.password.hasError("required")),t.R7$(2),t.Y8G("disabled",!a.formGroup.valid),t.R7$(),t.SpI(" ",t.bMT(16,11,"VALIDATE")," "))},dependencies:[r.YN,r.qT,r.me,r.BC,r.cb,r.X1,r.j4,r.JD,c.YU,c.bT,u.h,u.D9],styles:[".wrapper[_ngcontent-%COMP%]{max-width:350px;width:100%}"]})}return s})()}}]);

View file

@ -0,0 +1,382 @@
@angular/animations
MIT
@angular/common
MIT
@angular/core
MIT
@angular/forms
MIT
@angular/localize
MIT
@angular/platform-browser
MIT
@angular/router
MIT
@babel/runtime
MIT
MIT License
Copyright (c) 2014-present Sebastian McKenzie and other contributors
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@ng-bootstrap/ng-bootstrap
MIT
The MIT License (MIT)
Copyright (c) 2015-2018 Angular ng-bootstrap team
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
@ngx-translate/core
SEE LICENSE IN LICENSE
@ngx-translate/http-loader
SEE LICENSE IN LICENSE
@popperjs/core
MIT
The MIT License (MIT)
Copyright (c) 2019 Federico Zivolo
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
angular-svg-icon
MIT
The MIT License (MIT)
Copyright (c) 2024 David Czeck.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
axios
MIT
# Copyright (c) 2014-present Matt Zabriskie & Collaborators
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
rxjs
Apache-2.0
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright (c) 2015-2018 Google, Inc., Netflix, Inc., Microsoft Corp. and contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
tslib
0BSD
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
zone.js
MIT
The MIT License
Copyright (c) 2010-2023 Google LLC. https://angular.io/license
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1 @@
"use strict";(self.webpackChunkEasyAngular=self.webpackChunkEasyAngular||[]).push([[794],{9794:(d,t,n)=>{n.r(t),n.d(t,{routes:()=>h});const h=[{path:"",children:[{path:"",redirectTo:"login",pathMatch:"full"},{path:"login",loadComponent:()=>n.e(290).then(n.bind(n,6290)).then(o=>o.LoginComponent)},{path:"forgot-password",loadComponent:()=>n.e(142).then(n.bind(n,3142)).then(o=>o.ForgotPasswordComponent)},{path:"validate-account",loadComponent:()=>n.e(360).then(n.bind(n,1360)).then(o=>o.ValidateAccountComponent)}]}]}}]);

View file

@ -0,0 +1 @@
"use strict";(self.webpackChunkEasyAngular=self.webpackChunkEasyAngular||[]).push([[887],{8887:(l,a,t)=>{t.r(a),t.d(a,{NotFoundComponent:()=>u});var r=t(4550),s=t(9664),n=t(4438);let u=(()=>{class o{constructor(){}static#n=this.\u0275fac=function(e){return new(e||o)};static#t=this.\u0275cmp=n.VBU({type:o,selectors:[["app-not-found"]],standalone:!0,features:[n.aNF],decls:8,vars:6,consts:[[1,"not-found-container"],[1,"not-found","text-center"],[1,"mb-3"],["routerLink","/home",1,"btn","btn-lg","btn-primary"]],template:function(e,i){1&e&&(n.j41(0,"div",0)(1,"div",1)(2,"h1",2),n.EFF(3),n.nI1(4,"translate"),n.k0s(),n.j41(5,"a",3),n.EFF(6),n.nI1(7,"translate"),n.k0s()()()),2&e&&(n.R7$(3),n.JRh(n.bMT(4,2,"NOT_FOUND")),n.R7$(3),n.SpI(" ",n.bMT(7,4,"GO_TO_HOMEPAGE")," "))},dependencies:[r.Wk,s.h,s.D9],styles:[".not-found-container[_ngcontent-%COMP%]{display:flex;align-items:center;min-height:100vh;position:relative}.not-found-container[_ngcontent-%COMP%] .not-found[_ngcontent-%COMP%]{width:100%}"]})}return o})()}}]);

View file

@ -0,0 +1,24 @@
{
"NOT_FOUND" : "404 - Page not found",
"GO_TO_HOMEPAGE" : "Go to homepage",
"WELCOME_TO" : "Welcome to",
"PROJECT_DESC" : "A Centurio boilerplate solution",
"SIGN_IN" : "Sign in",
"LOGOUT" : "Logout",
"HOME" : "Home",
"VERSION" : "Version",
"USER" : "User",
"EMAIL" : "E-mail",
"FORGOT_YOUR_PWD" : "Forgot your password?",
"BACK_TO_LOGIN" : "Back to login",
"VALIDATE_ACCOUNT" : "Validate the account",
"VALIDATE" : "Validate",
"PASSWORD" : "Password",
"LOADING" : "Loading",
"CLOSE" : "Close",
"DELETE" : "Delete",
"ALERT_DELETE_ENTRY" : "Are you sure you want to delete this entry?",
"RESET_PASSWORD" : "Reset password",
"FIELD_REQUIRED" : "This field is required",
"FIELD_EMAIL" : "This field must be an email"
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

View file

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<browserconfig>
<msapplication>
<tile>
<square150x150logo src="mstile-150x150.png"/>
<TileColor>#2d89ef</TileColor>
</tile>
</msapplication>
</browserconfig>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View file

@ -0,0 +1,21 @@
{
"name": "EasyAngular",
"short_name": "EasyAngular",
"theme_color": "#2b46c7",
"background_color": "#2b46c7",
"display": "standalone",
"scope": "/",
"start_url": "",
"icons": [
{
"src": "android-chrome-192x192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "android-chrome-512x512.png",
"sizes": "512x512",
"type": "image/png"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

View file

@ -0,0 +1,44 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
<svg version="1.0" xmlns="http://www.w3.org/2000/svg"
width="700.000000pt" height="700.000000pt" viewBox="0 0 700.000000 700.000000"
preserveAspectRatio="xMidYMid meet">
<metadata>
Created by potrace 1.11, written by Peter Selinger 2001-2013
</metadata>
<g transform="translate(0.000000,700.000000) scale(0.100000,-0.100000)"
fill="#000000" stroke="none">
<path d="M3298 6995 c-2 -1 -48 -6 -102 -9 -55 -4 -102 -8 -105 -10 -3 -2 -35
-7 -70 -10 -35 -4 -85 -11 -110 -16 -25 -5 -57 -12 -71 -14 -83 -14 -199 -42
-304 -73 -125 -36 -364 -119 -381 -133 -5 -4 -21 -11 -35 -15 -42 -13 -228
-105 -340 -169 -188 -106 -468 -302 -453 -317 7 -7 538 -291 873 -467 58 -30
128 -67 155 -82 28 -15 88 -48 135 -72 185 -99 249 -132 340 -181 52 -27 118
-62 145 -77 28 -15 100 -53 160 -85 61 -32 133 -70 160 -85 28 -15 89 -48 138
-74 222 -118 417 -221 502 -266 39 -21 216 -115 395 -210 179 -95 358 -190
398 -211 39 -22 107 -58 150 -80 42 -23 109 -58 147 -79 39 -20 108 -58 155
-82 47 -25 119 -63 160 -85 41 -22 120 -64 175 -93 55 -30 145 -77 200 -107
55 -29 190 -101 301 -159 l201 -106 1 -1156 c0 -637 1 -1161 1 -1165 2 -22
225 294 308 438 57 98 153 292 203 410 71 166 165 468 195 624 56 291 69 431
69 711 0 186 -6 326 -19 420 -3 19 -7 53 -10 75 -50 407 -218 897 -435 1265
-53 90 -191 301 -214 327 -18 21 -31 37 -55 71 -87 124 -326 373 -501 523
-121 104 -424 319 -449 319 -5 0 -11 4 -13 8 -8 20 -306 171 -473 239 -196 81
-434 153 -630 192 -126 25 -213 38 -375 57 -56 6 -516 15 -522 9z"/>
<path d="M1260 6188 c-96 -77 -312 -289 -391 -383 -19 -22 -42 -49 -53 -60
-37 -40 -164 -212 -233 -315 -180 -270 -311 -541 -411 -850 -38 -118 -79 -264
-88 -320 -3 -14 -11 -56 -19 -95 -15 -78 -23 -127 -39 -247 -27 -197 -28 -722
-1 -828 2 -8 6 -40 10 -71 3 -31 8 -67 10 -80 3 -13 7 -39 10 -58 2 -18 7 -41
9 -50 3 -9 8 -31 11 -49 13 -75 77 -306 119 -430 223 -647 652 -1236 1196
-1641 435 -324 918 -542 1415 -640 97 -19 127 -24 210 -36 22 -3 54 -8 70 -10
120 -19 544 -26 705 -11 146 13 164 15 195 20 17 3 48 8 70 12 22 3 74 12 115
20 41 9 89 18 105 21 53 9 327 91 425 127 169 61 484 208 518 240 11 11 17
279 13 556 -1 32 -6 37 -59 65 -31 16 -91 48 -132 71 -41 22 -131 70 -200 106
-69 36 -161 85 -205 109 -44 23 -129 69 -190 101 -60 32 -129 69 -152 80 l-43
22 -1 60 c0 34 0 269 -1 523 0 328 -4 465 -12 471 -6 5 -73 41 -149 81 -76 39
-157 82 -180 95 -51 29 -210 113 -462 246 -55 29 -122 65 -150 80 -27 15 -99
53 -160 85 -60 32 -163 86 -227 121 -64 35 -119 64 -121 64 -3 0 -40 19 -83
43 -73 40 -130 71 -379 202 -49 26 -117 62 -150 80 -33 18 -105 56 -160 85
-129 68 -219 116 -325 173 -191 102 -298 159 -347 184 l-53 26 -2 1013 -3
1012 -25 -20z"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 679 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 25 KiB

View file

@ -0,0 +1,48 @@
// ----------------------------------------------------------------------------------------------
// NOTE Browser style : Reset --------------------------------------------------------- Overwrite
// ----------------------------------------------------------------------------------------------
// ----------------------------------------------------------------------------------------------
// NOTE Project ---------------------------------------------------------------------------------
// ----------------------------------------------------------------------------------------------
// NOTE Link
// NOTE Scrollbar
// NOTE Sortable table --------------------------------------------------------------------------
// NOTE Icons -----------------------------------------------------------------------------------
// ----------------------------------------------------------------------------------------------
// NOTE Bootstrap --------------------------------------------------------------------- Overwrite
// ----------------------------------------------------------------------------------------------
// NOTE Pagination ------------------------------------------------------------------------------
// NOTE Button ----------------------------------------------------------------------------------
// NOTE Modal -----------------------------------------------------------------------------------
// NOTE Toast -----------------------------------------------------------------------------------
.toast-header {
background-color: transparent;
}
.toast-body {
background-color: rgba(255, 255, 255, 0.85);
}
// NOTE Nav -------------------------------------------------------------------------------------
// NOTE Table -----------------------------------------------------------------------------------
// NOTE Select ----------------------------------------------------------------------------------
// NOTE Form ------------------------------------------------------------------------------------
// Checkbox
// Radio
// NOTE Sortable table --------------------------------------------------------------------------

View file

@ -0,0 +1,80 @@
// ----------------------------------------------------------------------------------------------
// NOTE Variables -------------------------------------------------------------------------------
// ----------------------------------------------------------------------------------------------
@import 'variables.scss';
// ----------------------------------------------------------------------------------------------
// NOTE Bootstrap -------------------------------------------------------------------------------
// ----------------------------------------------------------------------------------------------
// NOTE Complete bootstrap
@import '../../../node_modules/bootstrap/scss/bootstrap.scss';
// NOTE Bootstrap configuration
// @import '../../../node_modules/bootstrap/scss/functions';
// @import '../../../node_modules/bootstrap/scss/variables';
// @import '../../../node_modules/bootstrap/scss/mixins';
// // NOTE Merge maps
// $theme-colors: map-merge($theme-colors, $custom-colors);
// @import '../../../node_modules/bootstrap/scss/utilities';
// // NOTE Bootstrap layout & components
// @import '../../../node_modules/bootstrap/scss/root';
// @import '../../../node_modules/bootstrap/scss/reboot';
// @import '../../../node_modules/bootstrap/scss/type';
// // @import '../../../node_modules/bootstrap/scss/images';
// @import '../../../node_modules/bootstrap/scss/containers';
// @import '../../../node_modules/bootstrap/scss/grid';
// @import '../../../node_modules/bootstrap/scss/tables';
// @import '../../../node_modules/bootstrap/scss/forms';
// @import '../../../node_modules/bootstrap/scss/buttons';
// @import '../../../node_modules/bootstrap/scss/transitions';
// @import '../../../node_modules/bootstrap/scss/dropdown';
// // @import '../../../node_modules/bootstrap/scss/button-group';
// @import '../../../node_modules/bootstrap/scss/nav';
// @import '../../../node_modules/bootstrap/scss/navbar';
// @import '../../../node_modules/bootstrap/scss/card';
// // @import '../../../node_modules/bootstrap/scss/accordion';
// // @import '../../../node_modules/bootstrap/scss/breadcrumb';
// // @import '../../../node_modules/bootstrap/scss/pagination';
// @import '../../../node_modules/bootstrap/scss/badge';
// // @import '../../../node_modules/bootstrap/scss/alert';
// // @import '../../../node_modules/bootstrap/scss/progress';
// // @import '../../../node_modules/bootstrap/scss/list-group';
// // @import '../../../node_modules/bootstrap/scss/close';
// @import '../../../node_modules/bootstrap/scss/toasts';
// @import '../../../node_modules/bootstrap/scss/modal';
// @import '../../../node_modules/bootstrap/scss/tooltip';
// @import '../../../node_modules/bootstrap/scss/popover';
// // @import '../../../node_modules/bootstrap/scss/carousel';
// @import '../../../node_modules/bootstrap/scss/spinners';
// // @import '../../../node_modules/bootstrap/scss/offcanvas';
// // NOTE Boostrap helpers
// @import '../../../node_modules/bootstrap/scss/helpers';
// // NOTE Boostrap utilities
// @import '../../../node_modules/bootstrap/scss/utilities/api';
// ----------------------------------------------------------------------------------------------
// NOTE External components ---------------------------------------------------------------------
// ----------------------------------------------------------------------------------------------
// $roboto-font-path: "../../../node_modules/roboto-fontface/fonts" !default;
// @import "../../../node_modules/roboto-fontface/css/roboto/sass/roboto-fontface";
// @import url('https://fonts.googleapis.com/css2?family=Roboto:wght@100;400;700&display=swap');
// ----------------------------------------------------------------------------------------------
// NOTE Project style ---------------------------------------------------------------------------
// ----------------------------------------------------------------------------------------------
@import 'project.scss';
// ----------------------------------------------------------------------------------------------
// NOTE Overwrite styles ------------------------------------------------------------------------
// ----------------------------------------------------------------------------------------------
// @import 'modules/_bootstrap.scss';

View file

@ -0,0 +1,66 @@
// ----------------------------------------------------------------------------------------------
// SECTION Variables ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------------------------
// ----------------------------------------------------------------------------------------------
// NOTE Project ---------------------------------------------------------------------------------
// ----------------------------------------------------------------------------------------------
// NOTE Colors ----------------------------------------------------------------------------------
// ----------------------------------------------------------------------------------------------
// NOTE Bootstrap -------------------------------------------------------------------------------
// ----------------------------------------------------------------------------------------------
// NOTE Utilities -------------------------------------------------------------------------------
$utilities: (
"cursor": (
property: cursor,
class: cursor,
responsive: false,
values: pointer,
)
);
// NOTE Color system ----------------------------------------------------------------------------
// $primary: #375F9B;
$secondary: #8492A6;
$text-muted: #ACA7AA;
$info: #375F9B; // #3C78DA;
$danger: #D0021B;
$success: #12a366;
$min-contrast-ratio: 2.5;
// NOTE Body ------------------------------------------------------------------------------------
// NOTE Grid ------------------------------------------------------------------------------------
// NOTE Borders ---------------------------------------------------------------------------------
// NOTE Typography -----------------------------------------------------------------------------
// NOTE Links -----------------------------------------------------------------------------------
// NOTE Badges ----------------------------------------------------------------------------------
// NOTE Buttons ---------------------------------------------------------------------------------
$btn-close-color: white;
// NOTE Navbar ----------------------------------------------------------------------------------
// NOTE Navs ------------------------------------------------------------------------------------
// NOTE Modal -----------------------------------------------------------------------------------
// NOTE Dropdowns -------------------------------------------------------------------------------
// NOTE Cards -----------------------------------------------------------------------------------
// NOTE List group ------------------------------------------------------------------------------
// NOTE Pagination ------------------------------------------------------------------------------
// NOTE Popovers --------------------------------------------------------------------------------
// NOTE Typography ------------------------------------------------------------------------------
// NOTE Forms -----------------------------------------------------------------------------------
// NOTE Tables ----------------------------------------------------------------------------------
// !SECTION Variables

25
angular18/dist/easy-angular/index.html vendored Normal file
View file

@ -0,0 +1,25 @@
<!doctype html>
<html lang="en" data-critters-container>
<head>
<meta charset="utf-8">
<title>EasyAngular</title>
<base href="/">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="./assets/img/favicon/favicon.ico">
<!-- NOTE RealFavIconGenerator -->
<link rel="apple-touch-icon" sizes="180x180" href="assets/img/favicon/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="assets/img/favicon/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="assets/img/favicon/favicon-16x16.png">
<link rel="manifest" href="assets/img/favicon/manifest.json">
<link rel="mask-icon" href="assets/img/favicon/safari-pinned-tab.svg" color="#5bbad5">
<meta name="msapplication-TileColor" content="#da532c">
<meta name="theme-color" content="#ffffff">
<style>@charset "UTF-8";:root{--bs-blue:#0d6efd;--bs-indigo:#6610f2;--bs-purple:#6f42c1;--bs-pink:#d63384;--bs-red:#dc3545;--bs-orange:#fd7e14;--bs-yellow:#ffc107;--bs-green:#198754;--bs-teal:#20c997;--bs-cyan:#0dcaf0;--bs-black:#000;--bs-white:#fff;--bs-gray:#6c757d;--bs-gray-dark:#343a40;--bs-gray-100:#f8f9fa;--bs-gray-200:#e9ecef;--bs-gray-300:#dee2e6;--bs-gray-400:#ced4da;--bs-gray-500:#adb5bd;--bs-gray-600:#6c757d;--bs-gray-700:#495057;--bs-gray-800:#343a40;--bs-gray-900:#212529;--bs-primary:#0d6efd;--bs-secondary:#8492A6;--bs-success:#12a366;--bs-info:#375F9B;--bs-warning:#ffc107;--bs-danger:#D0021B;--bs-light:#f8f9fa;--bs-dark:#212529;--bs-primary-rgb:13, 110, 253;--bs-secondary-rgb:132, 146, 166;--bs-success-rgb:18, 163, 102;--bs-info-rgb:55, 95, 155;--bs-warning-rgb:255, 193, 7;--bs-danger-rgb:208, 2, 27;--bs-light-rgb:248, 249, 250;--bs-dark-rgb:33, 37, 41;--bs-primary-text-emphasis:#052c65;--bs-secondary-text-emphasis:#353a42;--bs-success-text-emphasis:#074129;--bs-info-text-emphasis:#16263e;--bs-warning-text-emphasis:#664d03;--bs-danger-text-emphasis:#53010b;--bs-light-text-emphasis:#495057;--bs-dark-text-emphasis:#495057;--bs-primary-bg-subtle:#cfe2ff;--bs-secondary-bg-subtle:#e6e9ed;--bs-success-bg-subtle:#d0ede0;--bs-info-bg-subtle:#d7dfeb;--bs-warning-bg-subtle:#fff3cd;--bs-danger-bg-subtle:#f6ccd1;--bs-light-bg-subtle:#fcfcfd;--bs-dark-bg-subtle:#ced4da;--bs-primary-border-subtle:#9ec5fe;--bs-secondary-border-subtle:#ced3db;--bs-success-border-subtle:#a0dac2;--bs-info-border-subtle:#afbfd7;--bs-warning-border-subtle:#ffe69c;--bs-danger-border-subtle:#ec9aa4;--bs-light-border-subtle:#e9ecef;--bs-dark-border-subtle:#adb5bd;--bs-white-rgb:255, 255, 255;--bs-black-rgb:0, 0, 0;--bs-font-sans-serif:system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--bs-font-monospace:SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--bs-gradient:linear-gradient(180deg, rgba(255, 255, 255, .15), rgba(255, 255, 255, 0));--bs-body-font-family:var(--bs-font-sans-serif);--bs-body-font-size:1rem;--bs-body-font-weight:400;--bs-body-line-height:1.5;--bs-body-color:#212529;--bs-body-color-rgb:33, 37, 41;--bs-body-bg:#fff;--bs-body-bg-rgb:255, 255, 255;--bs-emphasis-color:#000;--bs-emphasis-color-rgb:0, 0, 0;--bs-secondary-color:rgba(33, 37, 41, .75);--bs-secondary-color-rgb:33, 37, 41;--bs-secondary-bg:#e9ecef;--bs-secondary-bg-rgb:233, 236, 239;--bs-tertiary-color:rgba(33, 37, 41, .5);--bs-tertiary-color-rgb:33, 37, 41;--bs-tertiary-bg:#f8f9fa;--bs-tertiary-bg-rgb:248, 249, 250;--bs-heading-color:inherit;--bs-link-color:#0d6efd;--bs-link-color-rgb:13, 110, 253;--bs-link-decoration:underline;--bs-link-hover-color:#0a58ca;--bs-link-hover-color-rgb:10, 88, 202;--bs-code-color:#d63384;--bs-highlight-color:#212529;--bs-highlight-bg:#fff3cd;--bs-border-width:1px;--bs-border-style:solid;--bs-border-color:#dee2e6;--bs-border-color-translucent:rgba(0, 0, 0, .175);--bs-border-radius:.375rem;--bs-border-radius-sm:.25rem;--bs-border-radius-lg:.5rem;--bs-border-radius-xl:1rem;--bs-border-radius-xxl:2rem;--bs-border-radius-2xl:var(--bs-border-radius-xxl);--bs-border-radius-pill:50rem;--bs-box-shadow:0 .5rem 1rem rgba(0, 0, 0, .15);--bs-box-shadow-sm:0 .125rem .25rem rgba(0, 0, 0, .075);--bs-box-shadow-lg:0 1rem 3rem rgba(0, 0, 0, .175);--bs-box-shadow-inset:inset 0 1px 2px rgba(0, 0, 0, .075);--bs-focus-ring-width:.25rem;--bs-focus-ring-opacity:.25;--bs-focus-ring-color:rgba(13, 110, 253, .25);--bs-form-valid-color:#12a366;--bs-form-valid-border-color:#12a366;--bs-form-invalid-color:#D0021B;--bs-form-invalid-border-color:#D0021B}*,*:before,*:after{box-sizing:border-box}@media (prefers-reduced-motion: no-preference){:root{scroll-behavior:smooth}}body{margin:0;font-family:var(--bs-body-font-family);font-size:var(--bs-body-font-size);font-weight:var(--bs-body-font-weight);line-height:var(--bs-body-line-height);color:var(--bs-body-color);text-align:var(--bs-body-text-align);background-color:var(--bs-body-bg);-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:rgba(0,0,0,0)}:root{--bs-breakpoint-xs:0;--bs-breakpoint-sm:576px;--bs-breakpoint-md:768px;--bs-breakpoint-lg:992px;--bs-breakpoint-xl:1200px;--bs-breakpoint-xxl:1400px}</style><link rel="stylesheet" href="styles.2f04c023778f6564.css" media="print" onload="this.media='all'"><noscript><link rel="stylesheet" href="styles.2f04c023778f6564.css"></noscript></head>
<body>
<app-root></app-root>
<script src="runtime.f1cabd74d7db8bcc.js" type="module"></script><script src="polyfills.bffe7b9ad1daa123.js" type="module"></script><script src="main.15a24a4830eefcc2.js" type="module"></script></body>
</html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1 @@
(()=>{"use strict";var e,v={},m={};function r(e){var o=m[e];if(void 0!==o)return o.exports;var t=m[e]={exports:{}};return v[e](t,t.exports,r),t.exports}r.m=v,e=[],r.O=(o,t,i,u)=>{if(!t){var a=1/0;for(n=0;n<e.length;n++){for(var[t,i,u]=e[n],c=!0,f=0;f<t.length;f++)(!1&u||a>=u)&&Object.keys(r.O).every(b=>r.O[b](t[f]))?t.splice(f--,1):(c=!1,u<a&&(a=u));if(c){e.splice(n--,1);var d=i();void 0!==d&&(o=d)}}return o}u=u||0;for(var n=e.length;n>0&&e[n-1][2]>u;n--)e[n]=e[n-1];e[n]=[t,i,u]},r.d=(e,o)=>{for(var t in o)r.o(o,t)&&!r.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:o[t]})},r.f={},r.e=e=>Promise.all(Object.keys(r.f).reduce((o,t)=>(r.f[t](e,o),o),[])),r.u=e=>e+"."+{142:"45234a7373c3ac49",290:"c6d31198e7723f1a",360:"79ccdba96c0b194f",554:"fe6f98c9adf2f1d9",794:"90c743b5e538e5a8",887:"22d3d6e5f1b4ba0b"}[e]+".js",r.miniCssF=e=>{},r.o=(e,o)=>Object.prototype.hasOwnProperty.call(e,o),(()=>{var e={},o="EasyAngular:";r.l=(t,i,u,n)=>{if(e[t])e[t].push(i);else{var a,c;if(void 0!==u)for(var f=document.getElementsByTagName("script"),d=0;d<f.length;d++){var l=f[d];if(l.getAttribute("src")==t||l.getAttribute("data-webpack")==o+u){a=l;break}}a||(c=!0,(a=document.createElement("script")).type="module",a.charset="utf-8",a.timeout=120,r.nc&&a.setAttribute("nonce",r.nc),a.setAttribute("data-webpack",o+u),a.src=r.tu(t)),e[t]=[i];var s=(g,b)=>{a.onerror=a.onload=null,clearTimeout(p);var y=e[t];if(delete e[t],a.parentNode&&a.parentNode.removeChild(a),y&&y.forEach(h=>h(b)),g)return g(b)},p=setTimeout(s.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=s.bind(null,a.onerror),a.onload=s.bind(null,a.onload),c&&document.head.appendChild(a)}}})(),r.r=e=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;r.tt=()=>(void 0===e&&(e={createScriptURL:o=>o},typeof trustedTypes<"u"&&trustedTypes.createPolicy&&(e=trustedTypes.createPolicy("angular#bundler",e))),e)})(),r.tu=e=>r.tt().createScriptURL(e),r.p="",(()=>{var e={121:0};r.f.j=(i,u)=>{var n=r.o(e,i)?e[i]:void 0;if(0!==n)if(n)u.push(n[2]);else if(121!=i){var a=new Promise((l,s)=>n=e[i]=[l,s]);u.push(n[2]=a);var c=r.p+r.u(i),f=new Error;r.l(c,l=>{if(r.o(e,i)&&(0!==(n=e[i])&&(e[i]=void 0),n)){var s=l&&("load"===l.type?"missing":l.type),p=l&&l.target&&l.target.src;f.message="Loading chunk "+i+" failed.\n("+s+": "+p+")",f.name="ChunkLoadError",f.type=s,f.request=p,n[1](f)}},"chunk-"+i,i)}else e[i]=0},r.O.j=i=>0===e[i];var o=(i,u)=>{var f,d,[n,a,c]=u,l=0;if(n.some(p=>0!==e[p])){for(f in a)r.o(a,f)&&(r.m[f]=a[f]);if(c)var s=c(r)}for(i&&i(u);l<n.length;l++)r.o(e,d=n[l])&&e[d]&&e[d][0](),e[d]=0;return r.O(s)},t=self.webpackChunkEasyAngular=self.webpackChunkEasyAngular||[];t.forEach(o.bind(null,0)),t.push=o.bind(null,t.push.bind(t))})()})();

File diff suppressed because one or more lines are too long

44
angular18/karma.conf.js Normal file
View file

@ -0,0 +1,44 @@
// 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/easy-angular'),
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
});
};

12361
angular18/package-lock.json generated Normal file

File diff suppressed because it is too large Load diff

49
angular18/package.json Normal file
View file

@ -0,0 +1,49 @@
{
"name": "easy-angular",
"version": "0.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"watch": "ng build --watch --configuration development",
"test": "ng test",
"add-page": "ng g m pages/page-name --routing && ng g component pages/page-name --skip-tests"
},
"private": true,
"dependencies": {
"@angular/animations": "^18.0.1",
"@angular/common": "^18.0.1",
"@angular/compiler": "^18.0.1",
"@angular/core": "^18.0.1",
"@angular/forms": "^18.0.1",
"@angular/localize": "^18.0.1",
"@angular/platform-browser": "^18.0.1",
"@angular/platform-browser-dynamic": "^18.0.1",
"@angular/router": "^18.0.1",
"@caliatys/array-typer": "^1.0.0",
"@ng-bootstrap/ng-bootstrap": "^17.0.0",
"@ngx-translate/core": "^15.0.0",
"@ngx-translate/http-loader": "^8.0.0",
"@popperjs/core": "^2.11.8",
"angular-svg-icon": "^18.0.0",
"axios": "^1.6.7",
"bootstrap": "^5.3.3",
"rxjs": "~7.8.1",
"tslib": "^2.3.0",
"zone.js": "~0.14.4"
},
"devDependencies": {
"@angular-devkit/build-angular": "^18.0.2",
"@angular/cli": "^18.0.2",
"@angular/compiler-cli": "^18.0.1",
"@types/jasmine": "~3.10.0",
"@types/node": "^12.11.1",
"jasmine-core": "~4.0.0",
"karma": "~6.3.0",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage": "~2.1.0",
"karma-jasmine": "~4.0.0",
"karma-jasmine-html-reporter": "~1.7.0",
"typescript": "~5.4.5"
}
}

View file

@ -0,0 +1,9 @@
<div class="scrollable-container">
<div class="layout">
<router-outlet></router-outlet>
</div>
</div>
<app-toast aria-live="polite" aria-atomic="true" *ngIf="!storeService.isServer()"></app-toast>

View file

@ -0,0 +1,9 @@
.scrollable-container {
height: 100vh;
display: block;
.layout {
display: flex;
flex-direction: column;
min-height: 100vh;
}
}

View file

@ -0,0 +1,56 @@
// Angular modules
import { NgIf } from '@angular/common';
import { Component } from '@angular/core';
import { OnInit } from '@angular/core';
import { RouterOutlet } from '@angular/router';
// Services
import { StoreService } from '@services/store.service';
// Components
import { ToastComponent } from '@blocks/toast/toast.component';
@Component({
selector : 'app-root',
templateUrl : './app.component.html',
styleUrls : ['./app.component.scss'],
standalone : true,
imports : [RouterOutlet, ToastComponent, NgIf]
})
export class AppComponent implements OnInit
{
constructor
(
public storeService : StoreService,
)
{
}
// -------------------------------------------------------------------------------
// NOTE Init ---------------------------------------------------------------------
// -------------------------------------------------------------------------------
public ngOnInit() : void
{
}
// -------------------------------------------------------------------------------
// NOTE Actions ------------------------------------------------------------------
// -------------------------------------------------------------------------------
// -------------------------------------------------------------------------------
// NOTE Computed props -----------------------------------------------------------
// -------------------------------------------------------------------------------
// -------------------------------------------------------------------------------
// NOTE Helpers ------------------------------------------------------------------
// -------------------------------------------------------------------------------
// -------------------------------------------------------------------------------
// NOTE Requests -----------------------------------------------------------------
// -------------------------------------------------------------------------------
// -------------------------------------------------------------------------------
// NOTE Subscriptions ------------------------------------------------------------
// -------------------------------------------------------------------------------
}

View file

@ -0,0 +1,84 @@
// Angular modules
import { DatePipe } from '@angular/common';
import { withFetch } from '@angular/common/http';
import { withInterceptorsFromDi } from '@angular/common/http';
import { provideHttpClient } from '@angular/common/http';
import { HttpClient } from '@angular/common/http';
import { ApplicationConfig } from '@angular/core';
import { importProvidersFrom } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { provideClientHydration } from '@angular/platform-browser';
import { provideAnimations } from '@angular/platform-browser/animations';
import { provideRouter } from '@angular/router';
import { withInMemoryScrolling } from '@angular/router';
import { withRouterConfig } from '@angular/router';
// External modules
import { TranslateModule } from '@ngx-translate/core';
import { TranslateLoader } from '@ngx-translate/core';
import { TranslateHttpLoader } from '@ngx-translate/http-loader';
import { AngularSvgIconModule } from 'angular-svg-icon';
// Internal modules
import { environment } from '@env/environment';
import { routes } from './app.routes';
// Services
import { AppService } from '@services/app.service';
import { StoreService } from '@services/store.service';
export function createTranslateLoader(http : HttpClient)
{
return new TranslateHttpLoader(http, './assets/i18n/', '.json');
}
export const appConfig : ApplicationConfig = {
providers : [
// Routing
provideRouter(
routes,
withRouterConfig({
onSameUrlNavigation : 'reload',
}),
withInMemoryScrolling({
scrollPositionRestoration : 'enabled'
}),
),
importProvidersFrom(
// Angular modules
BrowserModule,
// External modules
TranslateModule.forRoot({
defaultLanguage : environment.defaultLanguage,
loader : {
provide : TranslateLoader,
useFactory : (createTranslateLoader),
deps : [HttpClient]
}
}),
AngularSvgIconModule.forRoot(),
// Internal modules
),
// External modules
// Services
StoreService,
AppService,
// Pipes
DatePipe,
// Guards
// Resolvers
provideHttpClient(withFetch(), withInterceptorsFromDi()),
provideAnimations(),
provideClientHydration(),
]
};

View file

@ -0,0 +1,18 @@
// Angular modules
import { Routes } from '@angular/router';
export const routes : Routes = [
{
path : 'auth',
loadChildren : () => import('./pages/auth/auth.routes').then(m => m.routes),
},
{
path : 'home',
loadComponent : () => import('./pages/home/home.component').then(m => m.HomeComponent),
},
{ path : '', redirectTo : '/home', pathMatch : 'full' },
{
path : '**',
loadComponent : () => import('./pages/not-found/not-found.component').then(m => m.NotFoundComponent),
},
];

View file

@ -0,0 +1,21 @@
<!-- NOTE Header with Project logo -->
<header class="position-fixed w-100 text-center py-2 bg-light">
<img src="./assets/img/project/logo.svg" [alt]="appName + ' Logo'" id="auth-svg" class="img-fluid"/>
</header>
<!-- NOTE Loading -->
<app-progress-bar *ngIf="storeService.isLoading$ | async" class="position-fixed w-100"></app-progress-bar>
<div class="auth-component-container">
<div class="auth-component">
<!-- NOTE Form -->
<router-outlet></router-outlet>
</div>
</div>
<!-- NOTE Footer with Application version -->
<footer class="position-fixed w-100 text-white text-end px-2 d-flex align-items-center justify-content-end bg-primary">
<div class="small">{{ 'VERSION' | translate }} {{ appVersion }}</div>
</footer>

View file

@ -0,0 +1,41 @@
// NOTE Header / Loading / Footer
header, app-progress-bar, footer {
z-index: 10;
}
header {
top: 0;
height: 56px;
}
app-progress-bar {
top: 56px;
}
footer {
bottom: 0;
height: 40px;
}
// NOTE Layout
.auth-component-container {
display: flex;
align-items: center;
min-height: 100vh;
padding-top: 60px;
padding-bottom: 40px;
.auth-component {
width: 100%;
max-width: 350px;
padding: 15px;
margin: auto;
}
}
// NOTE Images
#auth-svg {
height: 40px;
}

View file

@ -0,0 +1,10 @@
<app-progress-bar class="position-fixed w-100" *ngIf="storeService.isLoading$ | async"></app-progress-bar>
<div class="row g-0">
<div class="col img-wrapper d-none d-md-flex">
<img [src]="'assets/img/project/login.png'" alt="Login image">
</div>
<div class="col d-flex flex-column justify-content-center p-3">
<!-- NOTE Content -->
<router-outlet></router-outlet>
</div>
</div>

View file

@ -0,0 +1,14 @@
// NOTE Layout
.row {
min-height: 100vh;
.col.img-wrapper {
min-height: 100vh;
overflow: hidden;
img {
object-fit: cover;
width: 100%;
height: 100%;
position: relative;
}
}
}

View file

@ -0,0 +1,66 @@
// Angular modules
import { NgIf } from '@angular/common';
import { AsyncPipe } from '@angular/common';
import { Component } from '@angular/core';
import { OnInit } from '@angular/core';
import { RouterOutlet } from '@angular/router';
// Internal modules
import { environment } from '@env/environment';
// Services
import { StoreService } from '@services/store.service';
// Components
import { ProgressBarComponent } from '@blocks/progress-bar/progress-bar.component';
@Component({
selector : 'app-auth',
templateUrl : './auth.component.html',
styleUrls : ['./auth.component.scss'],
standalone : true,
imports : [NgIf, ProgressBarComponent, RouterOutlet, AsyncPipe]
})
export class AuthComponent implements OnInit
{
// NOTE Component properties
public appName : string = environment.appName;
public appVersion : string = environment.version;
constructor
(
public storeService : StoreService,
)
{
}
public ngOnInit() : void
{
}
// -------------------------------------------------------------------------------
// NOTE Init ---------------------------------------------------------------------
// -------------------------------------------------------------------------------
// -------------------------------------------------------------------------------
// NOTE Actions ------------------------------------------------------------------
// -------------------------------------------------------------------------------
// -------------------------------------------------------------------------------
// NOTE Computed props -----------------------------------------------------------
// -------------------------------------------------------------------------------
// -------------------------------------------------------------------------------
// NOTE Helpers ------------------------------------------------------------------
// -------------------------------------------------------------------------------
// -------------------------------------------------------------------------------
// NOTE Requests -----------------------------------------------------------------
// -------------------------------------------------------------------------------
// -------------------------------------------------------------------------------
// NOTE Subscriptions ------------------------------------------------------------
// -------------------------------------------------------------------------------
}

View file

@ -0,0 +1,27 @@
// Angular modules
import { Routes } from '@angular/router';
export const routes : Routes = [
{
path : '',
children : [
{
path : '',
redirectTo : 'login',
pathMatch : 'full',
},
{
path : 'login',
loadComponent : () => import('./login/login.component').then(m => m.LoginComponent),
},
{
path : 'forgot-password',
loadComponent : () => import('./forgot-password/forgot-password.component').then(m => m.ForgotPasswordComponent),
},
{
path : 'validate-account',
loadComponent : () => import('./validate-account/validate-account.component').then(m => m.ValidateAccountComponent),
},
]
}
];

View file

@ -0,0 +1,38 @@
<div class="text-center text-primary mb-4">
<div class="h2 fw-normal mb-0">{{ 'FORGOT_YOUR_PWD' | translate }}</div>
</div>
<div class="d-flex justify-content-center">
<div class="wrapper">
<!-- NOTE Login form -->
<form [formGroup]="formGroup" (ngSubmit)="onClickSubmit()">
<!-- NOTE Email -->
<div class="mb-3">
<label for="email" class="form-label text-start w-100">{{ 'EMAIL' | translate }}</label>
<input type="email" class="form-control" id="email"
formControlName="email"
[ngClass]="{ 'is-invalid' : formGroup.controls.email.errors && formGroup.controls.email.touched }">
<!-- NOTE Errors -->
<div class="invalid-feedback" *ngIf="formGroup.controls.email.hasError('required')">
{{ 'FIELD_REQUIRED' | translate }}
</div>
<div class="invalid-feedback" *ngIf="formGroup.controls.email.hasError('email')">
{{ 'FIELD_EMAIL' | translate }}
</div>
</div>
<div class="text-center">
<button type="submit" class="btn btn-primary px-5" [disabled]="!formGroup.valid">
{{ 'RESET_PASSWORD' | translate }}
</button>
</div>
<div class="text-center my-3">
<a routerLink="/auth/login">{{ 'BACK_TO_LOGIN' | translate }}</a>
</div>
</form>
</div>
</div>

View file

@ -0,0 +1,4 @@
.wrapper {
max-width: 350px;
width: 100%;
}

View file

@ -0,0 +1,89 @@
// Angular modules
import { NgClass } from '@angular/common';
import { NgIf } from '@angular/common';
import { Component } from '@angular/core';
import { FormGroup } from '@angular/forms';
import { FormsModule } from '@angular/forms';
import { ReactiveFormsModule } from '@angular/forms';
import { FormControl } from '@angular/forms';
import { Validators } from '@angular/forms';
import { Router } from '@angular/router';
import { RouterLink } from '@angular/router';
// External modules
import { TranslateModule } from '@ngx-translate/core';
// Services
import { AppService } from '@services/app.service';
import { StoreService } from '@services/store.service';
@Component({
selector : 'app-forgot-password',
templateUrl : './forgot-password.component.html',
styleUrls : ['./forgot-password.component.scss'],
standalone : true,
imports : [FormsModule, ReactiveFormsModule, NgClass, NgIf, RouterLink, TranslateModule]
})
export class ForgotPasswordComponent
{
public formGroup !: FormGroup<{
email : FormControl<string>
}>;
constructor
(
public router : Router,
private storeService : StoreService,
private appService : AppService,
)
{
this.initFormGroup();
}
// -------------------------------------------------------------------------------
// NOTE Init ---------------------------------------------------------------------
// -------------------------------------------------------------------------------
private initFormGroup() : void
{
this.formGroup = new FormGroup({
email : new FormControl<string>({
value : '',
disabled : false
}, { validators : [Validators.required, Validators.email], nonNullable : true }),
});
}
// -------------------------------------------------------------------------------
// NOTE Actions ------------------------------------------------------------------
// -------------------------------------------------------------------------------
public async onClickSubmit() : Promise<void>
{
await this.forgotPassword();
}
// -------------------------------------------------------------------------------
// NOTE Requests -----------------------------------------------------------------
// -------------------------------------------------------------------------------
private async forgotPassword() : Promise<void>
{
this.storeService.isLoading.set(true);
const email = this.formGroup.controls.email.getRawValue();
const success = await this.appService.forgotPassword(email);
this.storeService.isLoading.set(false);
if (!success)
return;
// NOTE Redirect to validate account
this.router.navigate(['/auth/validate-account']);
}
// -------------------------------------------------------------------------------
// NOTE Helpers ------------------------------------------------------------------
// -------------------------------------------------------------------------------
}

View file

@ -0,0 +1,52 @@
<div class="text-center text-primary mb-4">
<div class="h2 fw-normal mb-0">{{ 'WELCOME_TO' | translate }}</div>
<div class="h1 fw-bold text-uppercase">{{ appName }}</div>
<div class="fw-normal text-black">{{ 'PROJECT_DESC' | translate }}</div>
</div>
<div class="d-flex justify-content-center">
<div class="wrapper">
<!-- NOTE Login form -->
<form [formGroup]="formGroup" (ngSubmit)="onClickSubmit()">
<!-- NOTE Email -->
<div class="mb-3">
<label for="email" class="form-label text-start w-100">{{ 'EMAIL' | translate }}</label>
<input type="email" class="form-control" id="email"
formControlName="email"
[ngClass]="{ 'is-invalid' : formGroup.controls.email.errors && formGroup.controls.email.touched }">
<!-- NOTE Errors -->
<div class="invalid-feedback" *ngIf="formGroup.controls.email.hasError('required')">
{{ 'FIELD_REQUIRED' | translate }}
</div>
<div class="invalid-feedback" *ngIf="formGroup.controls.email.hasError('email')">
{{ 'FIELD_EMAIL' | translate }}
</div>
</div>
<!-- NOTE Password -->
<div class="mb-3">
<label for="password" class="form-label text-start w-100">{{ 'PASSWORD' | translate }}</label>
<input type="password" class="form-control" id="password"
formControlName="password"
[ngClass]="{ 'is-invalid' : formGroup.controls.password.errors && formGroup.controls.password.touched }">
<!-- NOTE Errors -->
<div class="invalid-feedback" *ngIf="formGroup.controls.password.hasError('required')">
{{ 'FIELD_REQUIRED' | translate }}
</div>
</div>
<div class="text-end mb-3">
<a routerLink="/auth/forgot-password" class="">{{ 'FORGOT_YOUR_PWD' | translate }}</a>
</div>
<div class="text-center">
<button type="submit" class="btn btn-primary mb-3 px-5" [disabled]="!formGroup.valid">
<span class="px-4 d-block">{{ 'SIGN_IN' | translate }}</span>
</button>
</div>
</form>
</div>
</div>

View file

@ -0,0 +1,4 @@
.wrapper {
max-width: 350px;
width: 100%;
}

View file

@ -0,0 +1,100 @@
// Angular modules
import { NgClass } from '@angular/common';
import { NgIf } from '@angular/common';
import { Component } from '@angular/core';
import { FormGroup } from '@angular/forms';
import { FormsModule } from '@angular/forms';
import { ReactiveFormsModule } from '@angular/forms';
import { FormControl } from '@angular/forms';
import { Validators } from '@angular/forms';
import { Router } from '@angular/router';
import { RouterLink } from '@angular/router';
// External modules
import { TranslateModule } from '@ngx-translate/core';
// Internal modules
import { environment } from '@env/environment';
// Services
import { AppService } from '@services/app.service';
import { StoreService } from '@services/store.service';
@Component({
selector : 'app-login',
templateUrl : './login.component.html',
styleUrls : ['./login.component.scss'],
standalone : true,
imports : [FormsModule, ReactiveFormsModule, NgClass, NgIf, RouterLink, TranslateModule]
})
export class LoginComponent
{
public appName : string = environment.appName;
public formGroup !: FormGroup<{
email : FormControl<string>,
password : FormControl<string>,
}>;
constructor
(
private router : Router,
private storeService : StoreService,
private appService : AppService,
)
{
this.initFormGroup();
}
// -------------------------------------------------------------------------------
// NOTE Init ---------------------------------------------------------------------
// -------------------------------------------------------------------------------
private initFormGroup() : void
{
this.formGroup = new FormGroup({
email : new FormControl<string>({
value : '',
disabled : false
}, { validators : [Validators.required, Validators.email], nonNullable : true }),
password : new FormControl<string>({
value : '',
disabled : false
}, { validators : [Validators.required], nonNullable : true })
});
}
// -------------------------------------------------------------------------------
// NOTE Actions ------------------------------------------------------------------
// -------------------------------------------------------------------------------
public async onClickSubmit() : Promise<void>
{
await this.authenticate();
}
// -------------------------------------------------------------------------------
// NOTE Requests -----------------------------------------------------------------
// -------------------------------------------------------------------------------
private async authenticate() : Promise<void>
{
this.storeService.isLoading.set(true);
const email = this.formGroup.controls.email.getRawValue();
const password = this.formGroup.controls.password.getRawValue();
const success = await this.appService.authenticate(email, password);
this.storeService.isLoading.set(false);
if (!success)
return;
// NOTE Redirect to home
this.router.navigate(['/home']);
}
// -------------------------------------------------------------------------------
// NOTE Helpers ------------------------------------------------------------------
// -------------------------------------------------------------------------------
}

View file

@ -0,0 +1,31 @@
<div class="text-center text-primary mb-4">
<div class="h2 fw-normal mb-0">{{ 'VALIDATE_ACCOUNT' | translate }}</div>
</div>
<div class="d-flex justify-content-center">
<div class="wrapper">
<!-- NOTE Login form -->
<form [formGroup]="formGroup" (ngSubmit)="onClickSubmit()">
<!-- NOTE Password -->
<div class="mb-3">
<label for="password" class="form-label text-start w-100">{{ 'PASSWORD' | translate }}</label>
<input type="password" class="form-control" id="password"
formControlName="password"
[ngClass]="{ 'is-invalid' : formGroup.controls.password.errors && formGroup.controls.password.touched }">
<!-- NOTE Errors -->
<div class="invalid-feedback" *ngIf="formGroup.controls.password.hasError('required')">
{{ 'FIELD_REQUIRED' | translate }}
</div>
</div>
<div class="text-center">
<button type="submit" class="btn btn-primary px-5" [disabled]="!formGroup.valid">
{{ 'VALIDATE' | translate }}
</button>
</div>
</form>
</div>
</div>

View file

@ -0,0 +1,4 @@
.wrapper {
max-width: 350px;
width: 100%;
}

View file

@ -0,0 +1,111 @@
// Angular modules
import { NgClass } from '@angular/common';
import { NgIf } from '@angular/common';
import { OnInit } from '@angular/core';
import { Component } from '@angular/core';
import { FormGroup } from '@angular/forms';
import { FormsModule } from '@angular/forms';
import { ReactiveFormsModule } from '@angular/forms';
import { FormControl } from '@angular/forms';
import { Validators } from '@angular/forms';
import { ActivatedRoute } from '@angular/router';
import { Router } from '@angular/router';
import { Params } from '@angular/router';
// External modules
import { TranslateModule } from '@ngx-translate/core';
// Internal modules
import { environment } from '@env/environment';
// Services
import { AppService } from '@services/app.service';
import { StoreService } from '@services/store.service';
@Component({
selector : 'app-validate-account',
templateUrl : './validate-account.component.html',
styleUrls : ['./validate-account.component.scss'],
standalone : true,
imports : [FormsModule, ReactiveFormsModule, NgClass, NgIf, TranslateModule]
})
export class ValidateAccountComponent implements OnInit
{
public formGroup !: FormGroup<{
password : FormControl<string>
}>;
private tokenFromUrl : string = '';
constructor
(
private router : Router,
private storeService : StoreService,
private activatedRoute : ActivatedRoute,
private appService : AppService,
)
{
this.initFormGroup();
}
public async ngOnInit() : Promise<void>
{
// NOTE Get token from URL
this.activatedRoute.queryParams.subscribe((params : Params) =>
{
this.tokenFromUrl = params['token'];
if (!environment.production)
console.log('ValidateAccountComponent : ngOnInit -> Token : ', this.tokenFromUrl);
});
}
// -------------------------------------------------------------------------------
// NOTE Init ---------------------------------------------------------------------
// -------------------------------------------------------------------------------
private initFormGroup() : void
{
this.formGroup = new FormGroup({
password : new FormControl<string>({
value : '',
disabled : false
}, { validators : [Validators.required], nonNullable : true }),
});
}
// -------------------------------------------------------------------------------
// NOTE Actions ------------------------------------------------------------------
// -------------------------------------------------------------------------------
public async onClickSubmit() : Promise<void>
{
if (!this.tokenFromUrl)
return;
await this.validateNewAccount();
}
// -------------------------------------------------------------------------------
// NOTE Requests -----------------------------------------------------------------
// -------------------------------------------------------------------------------
private async validateNewAccount() : Promise<void>
{
this.storeService.isLoading.set(true);
const password = this.formGroup.controls.password.getRawValue();
const success = await this.appService.validateAccount(this.tokenFromUrl, password);
this.storeService.isLoading.set(false);
if (!success)
return;
// NOTE Redirect to home
this.router.navigate(['/home']);
}
// -------------------------------------------------------------------------------
// NOTE Helpers ------------------------------------------------------------------
// -------------------------------------------------------------------------------
}

View file

@ -0,0 +1,13 @@
<app-page-layout>
<div class="container my-3">
<app-progress-bar *ngIf="storeService.isLoading()"></app-progress-bar>
<ng-container *ngIf="!storeService.isLoading()">
<div class="text-center">
Let's start the project!
</div>
</ng-container>
</div>
</app-page-layout>

View file

@ -0,0 +1,60 @@
// Angular modules
import { NgIf } from '@angular/common';
import { Component } from '@angular/core';
import { OnInit } from '@angular/core';
// Services
import { StoreService } from '@services/store.service';
// Components
import { ProgressBarComponent } from '@blocks/progress-bar/progress-bar.component';
import { PageLayoutComponent } from '@layouts/page-layout/page-layout.component';
@Component({
selector : 'app-home',
templateUrl : './home.component.html',
styleUrls : ['./home.component.scss'],
standalone : true,
imports : [PageLayoutComponent, NgIf, ProgressBarComponent]
})
export class HomeComponent implements OnInit
{
constructor
(
public storeService : StoreService
)
{ }
// -------------------------------------------------------------------------------
// NOTE Init ---------------------------------------------------------------------
// -------------------------------------------------------------------------------
public ngOnInit() : void
{
setTimeout(_ =>
{
this.storeService.isLoading.set(false);
}, 2000);
}
// -------------------------------------------------------------------------------
// NOTE Actions ------------------------------------------------------------------
// -------------------------------------------------------------------------------
// -------------------------------------------------------------------------------
// NOTE Computed props -----------------------------------------------------------
// -------------------------------------------------------------------------------
// -------------------------------------------------------------------------------
// NOTE Helpers ------------------------------------------------------------------
// -------------------------------------------------------------------------------
// -------------------------------------------------------------------------------
// NOTE Requests -----------------------------------------------------------------
// -------------------------------------------------------------------------------
// -------------------------------------------------------------------------------
// NOTE Subscriptions ------------------------------------------------------------
// -------------------------------------------------------------------------------
}

View file

@ -0,0 +1,8 @@
<div class="not-found-container">
<div class="not-found text-center">
<h1 class="mb-3">{{ 'NOT_FOUND' | translate }}</h1>
<a class="btn btn-lg btn-primary" routerLink="/home">
{{ 'GO_TO_HOMEPAGE' | translate }}
</a>
</div>
</div>

View file

@ -0,0 +1,9 @@
.not-found-container {
display: flex;
align-items: center;
min-height: 100vh;
position: relative;
.not-found {
width: 100%;
}
}

View file

@ -0,0 +1,42 @@
// Angular modules
import { Component } from '@angular/core';
import { RouterLink } from '@angular/router';
// External modules
import { TranslateModule } from '@ngx-translate/core';
@Component({
selector : 'app-not-found',
templateUrl : './not-found.component.html',
styleUrls : ['./not-found.component.scss'],
standalone : true,
imports : [RouterLink, TranslateModule]
})
export class NotFoundComponent
{
constructor() { }
// -------------------------------------------------------------------------------
// NOTE Init ---------------------------------------------------------------------
// -------------------------------------------------------------------------------
// -------------------------------------------------------------------------------
// NOTE Actions ------------------------------------------------------------------
// -------------------------------------------------------------------------------
// -------------------------------------------------------------------------------
// NOTE Computed props -----------------------------------------------------------
// -------------------------------------------------------------------------------
// -------------------------------------------------------------------------------
// NOTE Helpers ------------------------------------------------------------------
// -------------------------------------------------------------------------------
// -------------------------------------------------------------------------------
// NOTE Requests -----------------------------------------------------------------
// -------------------------------------------------------------------------------
// -------------------------------------------------------------------------------
// NOTE Subscriptions ------------------------------------------------------------
// -------------------------------------------------------------------------------
}

View file

@ -0,0 +1,10 @@
<!-- How to write CSS keyframes to indeterminate material design progress bar -->
<!-- https://stackoverflow.com/a/34773398/7462178 -->
<div class="slider">
<div class="line"></div>
<div class="subline inc"></div>
<div class="subline dec"></div>
</div>
<div class="text-center my-3" *ngIf="withLabel">{{ 'LOADING' | translate }}...</div>

View file

@ -0,0 +1,33 @@
.slider {
position: relative;
width: 100%;
height: 5px;
overflow-x: hidden;
.line {
position: absolute;
opacity: 0.4;
background: #4a8df8;
width: 150%;
height: 5px;
}
.subline {
position: absolute;
background: #4a8df8;
height: 5px;
&.inc {
animation: increase 2s infinite;
}
&.dec {
animation: decrease 2s 0.5s infinite;
}
}
}
@keyframes increase {
from { left: -5%; width: 5%; }
to { left: 130%; width: 100%;}
}
@keyframes decrease {
from { left: -80%; width: 80%; }
to { left: 110%; width: 10%;}
}

View file

@ -0,0 +1,27 @@
// Angular modules
import { NgIf } from '@angular/common';
import { Component } from '@angular/core';
import { Input } from '@angular/core';
import { OnInit } from '@angular/core';
// External modules
import { TranslateModule } from '@ngx-translate/core';
@Component({
selector : 'app-progress-bar',
templateUrl : './progress-bar.component.html',
styleUrls : ['./progress-bar.component.scss'],
standalone : true,
imports : [NgIf, TranslateModule]
})
export class ProgressBarComponent implements OnInit
{
@Input() withLabel : boolean = false;
constructor() { }
public ngOnInit() : void
{
}
}

View file

@ -0,0 +1,31 @@
<ng-container *ngFor="let toast of toastManager.toasts">
<!-- NOTE With header -->
<ng-container *ngIf="toast.headerKey && toast.withHeader else withoutHeader">
<ngb-toast class="bg-{{ toast.type }}"
[autohide]="toast.autoHide"
[delay]="toast.delay"
(hide)="toastManager.remove(toast.id)">
<ng-template ngbToastHeader>
<!-- TODO Icon : Success / Info / Error -->
<div class="text-white me-auto">{{ toast.headerKey | translate }}</div>
</ng-template>
<div class="text-dark">{{ toast.body }}</div>
</ngb-toast>
</ng-container>
<!-- NOTE Without header -->
<ng-template #withoutHeader>
<ngb-toast class="bg-{{ toast.type }}"
[autohide]="toast.autoHide"
[delay]="toast.delay"
(hide)="toastManager.remove(toast.id)">
<div class="text-dark">{{ toast.body }}</div>
</ngb-toast>
</ng-template>
</ng-container>

View file

@ -0,0 +1,7 @@
:host {
position: fixed;
bottom: 0;
right: 0;
margin: 0.5em;
z-index: 1200;
}

View file

@ -0,0 +1,26 @@
// Angular modules
import { NgFor } from '@angular/common';
import { NgIf } from '@angular/common';
import { Component } from '@angular/core';
// External modules
import { NgbToast } from '@ng-bootstrap/ng-bootstrap';
import { NgbToastHeader } from '@ng-bootstrap/ng-bootstrap';
import { TranslateModule } from '@ngx-translate/core';
// Internal modules
import { ToastManager } from './toast.manager';
@Component({
selector : 'app-toast',
templateUrl : './toast.component.html',
styleUrls : ['./toast.component.scss'],
standalone : true,
imports : [NgFor, NgIf, NgbToast, NgbToastHeader, TranslateModule]
})
export class ToastComponent
{
constructor(public toastManager : ToastManager) {}
}

View file

@ -0,0 +1,52 @@
// Angular modules
import { Injectable } from '@angular/core';
export type ToastType = 'success' | 'info' | 'warning' | 'danger';
export class Toast
{
public id !: number
readonly headerKey ?: string;
public withHeader : boolean;
public body : string;
public type : ToastType;
public autoHide : boolean;
public delay : number;
constructor(body : string, type ?: ToastType, autoHide : boolean = false)
{
this.withHeader = true;
this.body = body;
this.type = type ?? 'danger';
this.autoHide = autoHide;
this.delay = 10000; // 10 sec
this.headerKey = this.type.toUpperCase();
}
}
@Injectable({ providedIn : 'root' })
export class ToastManager
{
public toasts : Toast[] = [];
private counter : number = 0;
constructor() {}
public show(toast : Toast) : void
{
toast.id = this.counter++;
this.toasts.push(toast);
}
public quickShow(body : string, type ?: ToastType, autoHide : boolean = false) : void
{
const toast = new Toast(body, type, autoHide);
this.show(toast);
}
public remove(id : number) : void
{
this.toasts = this.toasts.filter(t => t.id !== id);
}
}

View file

@ -0,0 +1,17 @@
<!-- NOTE Confirm form -->
<form (ngSubmit)="onClickSubmit()">
<div class="text-center py-3">
<p>{{ 'ALERT_DELETE_ENTRY' | translate }}</p>
</div>
<!-- NOTE Submit -->
<div class="text-center">
<button type="button" class="btn btn-light" (click)="onClickClose()">
{{ 'CLOSE' | translate }}
</button>
<button type="submit" class="btn btn-danger ms-3">
{{ 'DELETE' | translate }}
</button>
</div>
</form>

View file

@ -0,0 +1,45 @@
// Angular modules
import { Component } from '@angular/core';
import { OnInit } from '@angular/core';
import { Input } from '@angular/core';
import { Output } from '@angular/core';
import { EventEmitter } from '@angular/core';
import { FormsModule } from '@angular/forms';
// External modules
import { TranslateModule } from '@ngx-translate/core';
@Component({
selector : 'app-form-confirm',
templateUrl : './form-confirm.component.html',
styleUrls : ['./form-confirm.component.scss'],
standalone : true,
imports : [FormsModule, TranslateModule]
})
export class FormConfirmComponent implements OnInit
{
@Input() data : any;
@Output() submitData : EventEmitter<boolean> = new EventEmitter();
@Output() submitClose : EventEmitter<null> = new EventEmitter();
constructor() { }
public ngOnInit() : void
{
}
// -------------------------------------------------------------------------------
// NOTE Action -------------------------------------------------------------------
// -------------------------------------------------------------------------------
public async onClickSubmit() : Promise<void>
{
this.submitData.emit(true);
}
public onClickClose() : void
{
this.submitClose.emit();
}
}

View file

@ -0,0 +1,35 @@
<!-- NOTE Navbar -->
<nav class="navbar navbar-expand-lg navbar-light bg-light">
<div class="container-fluid">
<a class="navbar-brand" [routerLink]="['/dashboard']">
<img src="./assets/img/project/logo.svg" [alt]="appName + ' Logo'" class="img-fluid me-2"/>
{{ appName }}
</a>
<button class="navbar-toggler" type="button" (click)="isMenuCollapsed = !isMenuCollapsed" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" [ngbCollapse]="isMenuCollapsed" id="navbarSupportedContent">
<ul class="navbar-nav mb-2 mb-lg-0 w-100">
<li class="nav-item">
<a class="nav-link" [routerLink]="['/home']" [routerLinkActive]="['active']">{{ 'HOME' | translate }}</a>
</li>
<li class="nav-item dropdown" ngbDropdown>
<a class="nav-link dropdown-toggle" ngbDropdownToggle id="navbarDropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">
{{ 'USER' | translate }}
</a>
<ul class="dropdown-menu dropdown-menu-end" ngbDropdownMenu aria-labelledby="navbarDropdown">
<!-- <li><a class="dropdown-item" [routerLink]="['/user']" [routerLinkActive]="['active']">{{ 'MY_ACCOUNT' | translate }}</a></li> -->
<li><a class="dropdown-item cursor-pointer" (click)="onClickLogout()">{{ 'LOGOUT' | translate }}</a></li>
</ul>
</li>
</ul>
</div>
</div>
</nav>
<!-- NOTE Content -->
<ng-content></ng-content>

View file

@ -0,0 +1,20 @@
.navbar-brand {
img {
width: 38px;
display: inline-block;
vertical-align: middle;
}
.title-wrapper {
vertical-align: middle;
display: inline-block;
border-left: 1px solid #adadad;
padding-left: 15px;
margin-left: 15px;
span {
display: block;
&.subtitle {
font-size: 71%;
}
}
}
}

View file

@ -0,0 +1,73 @@
// Angular modules
import { Component } from '@angular/core';
import { OnInit } from '@angular/core';
import { Router } from '@angular/router';
import { RouterLink } from '@angular/router';
import { RouterLinkActive } from '@angular/router';
// External modules
import { NgbCollapse } from '@ng-bootstrap/ng-bootstrap';
import { NgbDropdown } from '@ng-bootstrap/ng-bootstrap';
import { NgbDropdownToggle } from '@ng-bootstrap/ng-bootstrap';
import { NgbDropdownMenu } from '@ng-bootstrap/ng-bootstrap';
import { TranslateModule } from '@ngx-translate/core';
// Internal modules
import { environment } from '@env/environment';
@Component({
selector : 'app-layout-header',
templateUrl : './layout-header.component.html',
styleUrls : ['./layout-header.component.scss'],
standalone : true,
imports : [RouterLink, NgbCollapse, RouterLinkActive, NgbDropdown, NgbDropdownToggle, NgbDropdownMenu, TranslateModule]
})
export class LayoutHeaderComponent implements OnInit
{
public appName : string = environment.appName;
public isMenuCollapsed : boolean = true;
constructor
(
private router : Router,
)
{
}
public ngOnInit() : void
{
}
// -------------------------------------------------------------------------------
// NOTE Init ---------------------------------------------------------------------
// -------------------------------------------------------------------------------
// -------------------------------------------------------------------------------
// NOTE Actions ------------------------------------------------------------------
// -------------------------------------------------------------------------------
public async onClickLogout() : Promise<void>
{
// NOTE Redirect to login
this.router.navigate(['/auth/login']);
}
// -------------------------------------------------------------------------------
// NOTE Computed props -----------------------------------------------------------
// -------------------------------------------------------------------------------
// -------------------------------------------------------------------------------
// NOTE Helpers ------------------------------------------------------------------
// -------------------------------------------------------------------------------
// -------------------------------------------------------------------------------
// NOTE Requests -----------------------------------------------------------------
// -------------------------------------------------------------------------------
// -------------------------------------------------------------------------------
// NOTE Subscriptions ------------------------------------------------------------
// -------------------------------------------------------------------------------
}

View file

@ -0,0 +1,5 @@
<app-layout-header>
<ng-content></ng-content>
</app-layout-header>

View file

@ -0,0 +1,51 @@
// Angular modules
import { Component } from '@angular/core';
import { OnInit } from '@angular/core';
// Components
import { LayoutHeaderComponent } from '../layout-header/layout-header.component';
@Component({
selector : 'app-page-layout',
templateUrl : './page-layout.component.html',
styleUrls : ['./page-layout.component.scss'],
standalone : true,
imports : [LayoutHeaderComponent]
})
export class PageLayoutComponent implements OnInit
{
constructor()
{
}
public ngOnInit() : void
{
}
// -------------------------------------------------------------------------------
// NOTE Init ---------------------------------------------------------------------
// -------------------------------------------------------------------------------
// -------------------------------------------------------------------------------
// NOTE Actions ------------------------------------------------------------------
// -------------------------------------------------------------------------------
// -------------------------------------------------------------------------------
// NOTE Computed props -----------------------------------------------------------
// -------------------------------------------------------------------------------
// -------------------------------------------------------------------------------
// NOTE Helpers ------------------------------------------------------------------
// -------------------------------------------------------------------------------
// -------------------------------------------------------------------------------
// NOTE Requests -----------------------------------------------------------------
// -------------------------------------------------------------------------------
// -------------------------------------------------------------------------------
// NOTE Subscriptions ------------------------------------------------------------
// -------------------------------------------------------------------------------
}

View file

@ -0,0 +1,12 @@
<div class="modal-header {{ modalData.headerClasses }}">
<!-- NOTE Dynamic title -->
<h6 class="modal-title">{{ modalData.title }}</h6>
<button type="button" class="btn-close" *ngIf="modalData.closable" aria-label="Close" (click)="activeModal.dismiss()">
</button>
</div>
<div class="modal-body auto">
<!-- NOTE Component -->
<ng-template modal-wrapper-host></ng-template>
</div>

View file

@ -0,0 +1,9 @@
.modal-header {
background: var(--bs-info);
&, button {
color: white;
}
.modal-title {
text-transform: uppercase;
}
}

View file

@ -0,0 +1,103 @@
// Angular modules
import { NgIf } from '@angular/common';
import { Component } from '@angular/core';
import { Input } from '@angular/core';
import { OnInit } from '@angular/core';
import { ViewChild } from '@angular/core';
import { EventEmitter } from '@angular/core';
import { Type } from '@angular/core';
// External modules
import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
// Directives
import { ModalWrapperDirective as ModalWrapperDirective_1 } from '../../../directives/modal-wrapper.directive';
import { ModalWrapperDirective } from '@directives/modal-wrapper.directive';
// Dynamic component loader - Angular
// https://angular.io/guide/dynamic-component-loader
// https://stackblitz.com/angular/bydvgpxaabj?file=src%2Fapp%2Fad-banner.component.ts
export class ModalForm
{
constructor(public component : Type<any>, public data : any) {}
}
export interface FormComponent
{
data : any;
submitData : EventEmitter<any>;
submitClose : EventEmitter<null>;
}
@Component({
selector : 'app-modal-wrapper',
templateUrl : 'modal-wrapper.component.html',
styleUrls : ['modal-wrapper.component.scss'],
standalone : true,
imports : [NgIf, ModalWrapperDirective_1]
})
export class ModalWrapperComponent implements OnInit
{
@Input() component : any;
@Input() componentData : any;
@Input() modalData : {
title : string,
headerClasses : string,
closable : boolean,
} = {
title : '',
headerClasses : '',
closable : true,
};
@ViewChild(ModalWrapperDirective, { static : true }) modalWrapperHost !: ModalWrapperDirective;
constructor(public activeModal : NgbActiveModal)
{
}
public ngOnInit() : void
{
this.loadComponent();
}
// -------------------------------------------------------------------------------
// NOTE Init ---------------------------------------------------------------------
// -------------------------------------------------------------------------------
private loadComponent() : void
{
const modalForm = new ModalForm(this.component, this.componentData);
const viewContainerRef = this.modalWrapperHost.viewContainerRef;
viewContainerRef.clear();
const componentRef = viewContainerRef.createComponent(modalForm.component);
(<FormComponent>componentRef.instance).data = modalForm.data;
(<FormComponent>componentRef.instance).submitClose.subscribe(() =>
{
this.submitClose();
});
(<FormComponent>componentRef.instance).submitData.subscribe(event =>
{
this.submitData(event);
});
}
// -------------------------------------------------------------------------------
// NOTE Helpers ------------------------------------------------------------------
// -------------------------------------------------------------------------------
private submitData($event : any) : void
{
this.activeModal.close($event);
}
private submitClose() : void
{
this.activeModal.close();
}
}

View file

@ -0,0 +1,12 @@
// Angular modules
import { Directive } from '@angular/core';
import { ViewContainerRef } from '@angular/core';
@Directive({
selector : '[modal-wrapper-host]',
standalone : true,
})
export class ModalWrapperDirective
{
constructor(public viewContainerRef : ViewContainerRef) { }
}

View file

@ -0,0 +1,6 @@
export enum Endpoint
{
AUTHENTICATE = 'authenticate',
FORGOT_PASSWORD = 'forgot-password',
VALIDATE_ACCOUNT = 'validate-account',
}

View file

@ -0,0 +1,5 @@
export enum EnvName
{
LOCAL = 'local',
PROD = 'production',
}

View file

@ -0,0 +1,4 @@
export enum StorageKey
{
TOKEN = 'Token',
}

View file

@ -0,0 +1,117 @@
// Angular modules
import { Injectable } from '@angular/core';
// Internal modules
import { environment } from '@env/environment';
// Enums
import { StorageKey } from '@enums/storage-key.enum';
// Models
// import { AuthResponse } from '@models/auth-response.model';
@Injectable()
export class StorageHelper
{
private static storagePrefix : string = environment.appName + '_' + environment.version + '_';
// ----------------------------------------------------------------------------------------------
// SECTION Methods ------------------------------------------------------------------------------
// ----------------------------------------------------------------------------------------------
// NOTE Token
// public static setToken(user : AuthResponse) : void
// {
// StorageHelper.setItem(StorageKey.TOKEN, user);
// }
// public static removeToken() : void
// {
// StorageHelper.removeItem(StorageKey.TOKEN);
// }
// public static getToken() : AuthResponse | null
// {
// // Prevent SSR error
// if (typeof localStorage === 'undefined')
// return undefined;
// const data = StorageHelper.getItem(StorageKey.TOKEN);
// return data ? new AuthResponse(data) : null;
// }
// !SECTION Methods
// ----------------------------------------------------------------------------------------------
// SECTION LocalStorage -------------------------------------------------------------------------
// ----------------------------------------------------------------------------------------------
public static setItem(key : string, value : any, prefix : boolean = true) : void
{
const itemKey = this.prefixer(key, prefix);
localStorage.setItem(itemKey, JSON.stringify(value));
}
public static getItem(key : string, prefix : boolean = true) : any
{
const itemKey = this.prefixer(key, prefix);
const res = localStorage.getItem(itemKey);
if (res !== 'undefined')
return JSON.parse(res as any);
console.error('StorageHelper : getItem -> undefined key');
return null;
}
public static removeItem(key : string, prefix : boolean = true) : void
{
const itemKey = this.prefixer(key, prefix);
localStorage.removeItem(itemKey);
}
public static getKeys(all : boolean = false) : string[]
{
const keys : string[] = [];
// NOTE Keys
for (const key in localStorage)
keys.push(key);
if (all)
return keys;
// NOTE Prefixed keys
return keys.filter((item) => item.startsWith(this.storagePrefix));
}
public static clearItems(all : boolean = false) : void
{
// NOTE Keys
if (all)
{
localStorage.clear();
return;
}
// NOTE Prefixed keys
const prefixedKeys = this.getKeys();
for (const prefixedKey of prefixedKeys)
this.removeItem(prefixedKey, false);
}
public static clearItemsWithoutCurrentPrefix() : void
{
const allKeys = this.getKeys(true);
for (const key of allKeys)
if (!key.startsWith(this.storagePrefix))
this.removeItem(key, false);
}
// !SECTION LocalStorage
// NOTE Private
private static prefixer(key : string, autoPrefix : boolean) : string
{
let itemKey = key;
if (autoPrefix)
itemKey = this.storagePrefix + key;
return itemKey;
}
}

View file

@ -0,0 +1,30 @@
// Angular modules
import { Injectable } from '@angular/core';
@Injectable()
export class StringHelper
{
/** JavaScript equivalent to printf/String.Format
* https://stackoverflow.com/a/31007976/7462178
*/
public static interpolate(theString : string, argumentArray : string[]) : string
{
let regex = /%s/;
let _r = function(p : string, c : string) { return p.replace(regex, c); };
return argumentArray.reduce(_r, theString);
}
public static buildURIParams(parameters : object) : string
{
const parts = new URLSearchParams()
for (const [key, value] of Object.entries(parameters))
{
if (key === undefined || value === undefined)
continue;
parts.append(key, value)
}
return '?' + parts.toString()
}
}

View file

@ -0,0 +1,177 @@
// Angular modules
import { Injectable } from '@angular/core';
import { Router } from '@angular/router';
// External modules
import { ArrayTyper } from '@caliatys/array-typer';
import { TranslateService } from '@ngx-translate/core';
import axios from 'axios';
import { AxiosResponse } from 'axios';
import { AxiosError } from 'axios';
import { AxiosInstance } from 'axios';
import { CreateAxiosDefaults } from 'axios';
// Internal modules
import { ToastManager } from '@blocks/toast/toast.manager';
import { environment } from '@env/environment';
// Helpers
import { StorageHelper } from '@helpers/storage.helper';
// Enums
import { Endpoint } from '@enums/endpoint.enum';
// Models
// Services
import { StoreService } from './store.service';
@Injectable()
export class AppService
{
// NOTE Default configuration
private default : CreateAxiosDefaults = {
withCredentials : true,
timeout : 990000,
headers : {
'Content-Type' : 'application/json',
'Accept' : 'application/json',
},
};
// NOTE Instances
private api : AxiosInstance = axios.create({
baseURL : environment.apiBaseUrl,
...this.default,
});
// NOTE Controller
private controller : AbortController = new AbortController();
constructor
(
private storeService : StoreService,
private toastManager : ToastManager,
private router : Router,
private translateService : TranslateService,
)
{
this.initRequestInterceptor(this.api);
this.initResponseInterceptor(this.api);
this.initAuthHeader();
}
// ----------------------------------------------------------------------------------------------
// SECTION Methods ------------------------------------------------------------------------------
// ----------------------------------------------------------------------------------------------
public async authenticate(email : string, password : string) : Promise<boolean>
{
return Promise.resolve(true);
// StorageHelper.removeToken();
// const url = Endpoint.AUTHENTICATE;
// const { data } = await this.api.post(url, { email, password });
// if (!data)
// return false;
// const authResponse = new AuthResponse(data);
// StorageHelper.setToken(authResponse);
// this.initAuthHeader();
// return true;
}
public async forgotPassword(email : string) : Promise<boolean>
{
return Promise.resolve(true);
// const url = Endpoint.FORGOT_PASSWORD;
// const { data } = await this.api.post(url, { email });
// return !!data;
}
public async validateAccount(token : string, password : string) : Promise<boolean>
{
return Promise.resolve(true);
// const url = Endpoint.VALIDATE_ACCOUNT;
// const { data } = await this.api.post(url, { token, password });
// return !!data;
}
// public async getLastLines(siteId : string) : Promise<Line[]>
// {
// const url = StringHelper.interpolate(Endpoint.GET_LAST_LINES, [ siteId ]);
// const { data } = await this.api.get(url);
// if (!data)
// return [];
// return ArrayTyper.asArray(Line, data);
// }
// !SECTION Methods
// ----------------------------------------------------------------------------------------------
// SECTION Helpers ------------------------------------------------------------------------------
// ----------------------------------------------------------------------------------------------
private initAuthHeader() : void
{
// const token = StorageHelper.getToken();
// if (!token)
// return;
// this.api.defaults.headers.common['Authorization'] = `Bearer ${token.jwtToken}`;
// this.api.defaults.headers.common['Token'] = token.jwtToken;
}
public initRequestInterceptor(instance : AxiosInstance) : void
{
instance.interceptors.request.use((config) =>
{
console.log('interceptors.request.config', config);
this.storeService.isLoading.set(true);
return config;
},
(error) =>
{
console.log('interceptors.request.error', error);
this.storeService.isLoading.set(false);
this.toastManager.quickShow(error);
return Promise.reject(error);
});
}
public initResponseInterceptor(instance : AxiosInstance) : void
{
instance.interceptors.response.use((response) =>
{
console.log('interceptors.response.response', response);
this.storeService.isLoading.set(false);
return response;
},
async (error : AxiosError) =>
{
console.log('interceptors.response.error', error);
this.storeService.isLoading.set(false);
// NOTE Prevent request canceled error
if (error.code === 'ERR_CANCELED')
return Promise.resolve(error);
this.toastManager.quickShow(error.message);
return Promise.reject(error);
});
}
// !SECTION Helpers
}

View file

@ -0,0 +1,38 @@
// Angular modules
import { isPlatformServer } from '@angular/common';
import { Inject } from '@angular/core';
import { signal } from '@angular/core';
import { Injectable } from '@angular/core';
import { PLATFORM_ID } from '@angular/core';
// External modules
import { TranslateService } from '@ngx-translate/core';
// Internal modules
import { environment } from '@env/environment';
@Injectable()
export class StoreService
{
public isServer = signal(isPlatformServer(this.platformId));
public isLoading = signal(true);
public pageTitle = signal(environment.appName);
constructor
(
@Inject(PLATFORM_ID) private platformId : Object,
private translateService : TranslateService
)
{
}
// -------------------------------------------------------------------------------
// NOTE Page title ---------------------------------------------------------------
// -------------------------------------------------------------------------------
public setPageTitle(title : string, translate : boolean = true) : void
{
const pageTitle = translate ? this.translateService.instant(title) : title;
this.pageTitle.set(pageTitle);
}
}

View file

View file

@ -0,0 +1,24 @@
{
"NOT_FOUND" : "404 - Page not found",
"GO_TO_HOMEPAGE" : "Go to homepage",
"WELCOME_TO" : "Welcome to",
"PROJECT_DESC" : "A Centurio boilerplate solution",
"SIGN_IN" : "Sign in",
"LOGOUT" : "Logout",
"HOME" : "Home",
"VERSION" : "Version",
"USER" : "User",
"EMAIL" : "E-mail",
"FORGOT_YOUR_PWD" : "Forgot your password?",
"BACK_TO_LOGIN" : "Back to login",
"VALIDATE_ACCOUNT" : "Validate the account",
"VALIDATE" : "Validate",
"PASSWORD" : "Password",
"LOADING" : "Loading",
"CLOSE" : "Close",
"DELETE" : "Delete",
"ALERT_DELETE_ENTRY" : "Are you sure you want to delete this entry?",
"RESET_PASSWORD" : "Reset password",
"FIELD_REQUIRED" : "This field is required",
"FIELD_EMAIL" : "This field must be an email"
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

View file

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<browserconfig>
<msapplication>
<tile>
<square150x150logo src="mstile-150x150.png"/>
<TileColor>#2d89ef</TileColor>
</tile>
</msapplication>
</browserconfig>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Some files were not shown because too many files have changed in this diff Show more