From c874514e4c39a0550b575c220ff71b0b249b3e8d Mon Sep 17 00:00:00 2001 From: Anartz Mugika Date: Thu, 27 Sep 2018 08:42:04 +0200 Subject: [PATCH 01/30] Add new ignore files and directories --- .gitignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 418aaaa..674acf0 100644 --- a/.gitignore +++ b/.gitignore @@ -42,4 +42,5 @@ package-lock.json # Others /traslate-template-files -src/environments/api-keys.ts +/src/environments/api-keys.ts +/documentation From 1756c0dae1508681d8cbaceb8a2bbcb356aa70b1 Mon Sep 17 00:00:00 2001 From: Anartz Mugika Date: Thu, 27 Sep 2018 08:42:37 +0200 Subject: [PATCH 02/30] Add compodoc dependencies and add compodoc script with basic configuration --- package.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 2ea80a4..1493f31 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,8 @@ "lint": "ng lint", "e2e": "ng e2e", "prod": "ng build --prod --base-href='./'", - "firebase": "ng build --prod && firebase deploy" + "firebase": "ng build --prod && firebase deploy", + "compodoc": "./node_modules/.bin/compodoc -p src/tsconfig.app.json" }, "private": true, "dependencies": { @@ -40,7 +41,7 @@ "@angular/cli": "~6.0.8", "@angular/compiler-cli": "^6.0.3", "@angular/language-service": "^6.0.3", - "@compodoc/compodoc": "^1.1.3", + "@compodoc/compodoc": "^1.1.5", "@types/jasmine": "~2.8.6", "@types/jasminewd2": "~2.0.3", "@types/node": "~8.9.4", From 87f3a51429c5390e3f37a541f5ff2ae529e69269 Mon Sep 17 00:00:00 2001 From: Anartz Mugika Date: Thu, 27 Sep 2018 08:43:08 +0200 Subject: [PATCH 03/30] Add documentation to circuits.component to use in first example with jsdoc tags --- src/app/pages/circuits/circuits.component.ts | 54 ++++++++++++++------ 1 file changed, 37 insertions(+), 17 deletions(-) diff --git a/src/app/pages/circuits/circuits.component.ts b/src/app/pages/circuits/circuits.component.ts index a343e30..48b211b 100644 --- a/src/app/pages/circuits/circuits.component.ts +++ b/src/app/pages/circuits/circuits.component.ts @@ -25,21 +25,34 @@ export class CircuitsComponent implements OnInit { ngOnInit() { this.showInfo = false; - this.selectPageService.setSelectPage('circuits'); + this.selectPageService.setSelectPage(`circuits`); this.loadDataFromAssets(); } - + /** + * @example + * Example to open dialog with pass info. + * loadDataDialog(true) + * + * @param {boolean }open use boolean value to open or close select load data dialog + */ private loadDataDialog(open: boolean = true) { if (open) { this._alertService.loadData( `Load ${this.selectYear} season circuits list!!`, - 'Wait a moment please!!' + `Wait a moment please!!` ); } else { this._alertService.closeAlert(); } } - + /** + * @example + * This is a good example. Add years from 1950 to 2018 + * selectYearCircuits("2017") + * + * @param {string} year The year to take select circuits to show + * @returns + */ selectYearCircuits(year: string = String(new Date().getFullYear())) { this.selectYear = year; this.loadDataDialog(); @@ -57,31 +70,38 @@ export class CircuitsComponent implements OnInit { } /** - * Take data from a local file in json format - */ + * Take data from a local file in json format + */ loadDataFromAssets() { this.selectYear = '2018'; this.loadDataDialog(); - this._circuitService - .loadListFromLocal() - .subscribe((data: Circuit[]) => { - this.showInfo = true; - this.selectPageService.setSelectPage(`Circuits List to ${this.selectYear} season`); - this.circuitsList = data; - this.loadDataDialog(false); - }); + this._circuitService.loadListFromLocal().subscribe((data: Circuit[]) => { + this.showInfo = true; + this.selectPageService.setSelectPage( + `Circuits List to ${this.selectYear} season` + ); + this.circuitsList = data; + this.loadDataDialog(false); + }); } infoAlert(circuit: Circuit) { - - const googleStaticMapUrl = new GoogleStaticMapUrlPipe().transform(circuit.Location, `h`, `red`, `C`, 1000, 300, 5); + const googleStaticMapUrl = new GoogleStaticMapUrlPipe().transform( + circuit.Location, + `h`, + `red`, + `C`, + 1000, + 300, + 5 + ); const locationText = new LocationTextPipe().transform(circuit.Location); const googleMapsUrl = new GoogleMapsUrlPipe().transform(circuit.Location); swal({ title: `
${circuit.circuitName} `, html: `Location: ${locationText}

Card image + alt="${circuit.circuitName} circuit image">

Open in Google Maps`, From df7f2c8992a944b17fd538439d10028973f2fd2f Mon Sep 17 00:00:00 2001 From: Anartz Mugika Date: Thu, 27 Sep 2018 09:22:38 +0200 Subject: [PATCH 04/30] Add material, laravel and readthedocs theme generate scripts --- package.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 1493f31..ffeed7e 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,10 @@ "e2e": "ng e2e", "prod": "ng build --prod --base-href='./'", "firebase": "ng build --prod && firebase deploy", - "compodoc": "./node_modules/.bin/compodoc -p src/tsconfig.app.json" + "compodoc": "./node_modules/.bin/compodoc -p src/tsconfig.app.json", + "compodoc-laravel": "./node_modules/.bin/compodoc -p src/tsconfig.app.json --theme laravel", + "compodoc-material": "./node_modules/.bin/compodoc -p src/tsconfig.app.json --theme material", + "compodoc-readthedocs": "./node_modules/.bin/compodoc -p src/tsconfig.app.json --theme readthedocs" }, "private": true, "dependencies": { From f6281c644331306f501e9b7badfd38289e97cc16 Mon Sep 17 00:00:00 2001 From: Anartz Mugika Date: Thu, 27 Sep 2018 09:41:01 +0200 Subject: [PATCH 05/30] Add documentation aditional script generation command --- package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index ffeed7e..7e335c4 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,8 @@ "compodoc": "./node_modules/.bin/compodoc -p src/tsconfig.app.json", "compodoc-laravel": "./node_modules/.bin/compodoc -p src/tsconfig.app.json --theme laravel", "compodoc-material": "./node_modules/.bin/compodoc -p src/tsconfig.app.json --theme material", - "compodoc-readthedocs": "./node_modules/.bin/compodoc -p src/tsconfig.app.json --theme readthedocs" + "compodoc-readthedocs": "./node_modules/.bin/compodoc -p src/tsconfig.app.json --theme readthedocs", + "compodoc-with-additional-doc": "./node_modules/.bin/compodoc -p src/tsconfig.app.json --includes src/doc-config/" }, "private": true, "dependencies": { From c92f35be5759e1e7a6bfa1b7396b5f56f44db5c9 Mon Sep 17 00:00:00 2001 From: Anartz Mugika Date: Thu, 27 Sep 2018 09:41:23 +0200 Subject: [PATCH 06/30] Add aditional documentation files with summary --- src/doc-config/features/functions.md | 3 +++ src/doc-config/features/init.md | 3 +++ src/doc-config/init.md | 3 +++ src/doc-config/summary.json | 16 ++++++++++++++++ 4 files changed, 25 insertions(+) create mode 100644 src/doc-config/features/functions.md create mode 100644 src/doc-config/features/init.md create mode 100644 src/doc-config/init.md create mode 100644 src/doc-config/summary.json diff --git a/src/doc-config/features/functions.md b/src/doc-config/features/functions.md new file mode 100644 index 0000000..0301eaf --- /dev/null +++ b/src/doc-config/features/functions.md @@ -0,0 +1,3 @@ +# Features Functions + +Example test \ No newline at end of file diff --git a/src/doc-config/features/init.md b/src/doc-config/features/init.md new file mode 100644 index 0000000..c41efbc --- /dev/null +++ b/src/doc-config/features/init.md @@ -0,0 +1,3 @@ +# Features Init + +Example test \ No newline at end of file diff --git a/src/doc-config/init.md b/src/doc-config/init.md new file mode 100644 index 0000000..a46a396 --- /dev/null +++ b/src/doc-config/init.md @@ -0,0 +1,3 @@ +# Starter Bootstrap Admin Angular 6 template + +Example test \ No newline at end of file diff --git a/src/doc-config/summary.json b/src/doc-config/summary.json new file mode 100644 index 0000000..6d43bfe --- /dev/null +++ b/src/doc-config/summary.json @@ -0,0 +1,16 @@ +[ + { + "title": "Starter Bootstrap Admin Angular Template", + "file": "init.md" + }, + { + "title": "Features", + "file": "features/init.md", + "children": [ + { + "title": "Functions", + "file": "features/functions.md" + } + ] + } +] From 8df09c7b724d78b4804d98c2a265a543a1cd5edc Mon Sep 17 00:00:00 2001 From: Anartz Date: Mon, 1 Oct 2018 10:41:18 +0200 Subject: [PATCH 07/30] Not default logo show --- package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 7e335c4..e899806 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,8 @@ "compodoc-laravel": "./node_modules/.bin/compodoc -p src/tsconfig.app.json --theme laravel", "compodoc-material": "./node_modules/.bin/compodoc -p src/tsconfig.app.json --theme material", "compodoc-readthedocs": "./node_modules/.bin/compodoc -p src/tsconfig.app.json --theme readthedocs", - "compodoc-with-additional-doc": "./node_modules/.bin/compodoc -p src/tsconfig.app.json --includes src/doc-config/" + "compodoc-with-additional-doc": "./node_modules/.bin/compodoc -p src/tsconfig.app.json --includes src/doc-config/", + "compodoc-no-logo": "./node_modules/.bin/compodoc -p src/tsconfig.app.json --hideGenerator" }, "private": true, "dependencies": { From 3e06fa9c175c600a69beb48c26ba18dbf943443f Mon Sep 17 00:00:00 2001 From: Anartz Date: Mon, 1 Oct 2018 11:06:00 +0200 Subject: [PATCH 08/30] Add custom favicon and title in documentation --- package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index e899806..15d0540 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,8 @@ "compodoc-material": "./node_modules/.bin/compodoc -p src/tsconfig.app.json --theme material", "compodoc-readthedocs": "./node_modules/.bin/compodoc -p src/tsconfig.app.json --theme readthedocs", "compodoc-with-additional-doc": "./node_modules/.bin/compodoc -p src/tsconfig.app.json --includes src/doc-config/", - "compodoc-no-logo": "./node_modules/.bin/compodoc -p src/tsconfig.app.json --hideGenerator" + "compodoc-no-logo": "./node_modules/.bin/compodoc -p src/tsconfig.app.json --hideGenerator", + "compodoc-c-favicon-title": "./node_modules/.bin/compodoc -p src/tsconfig.app.json --customFavicon src/favicon.ico -n \"Compodoc Angular / Ionic Doc\"" }, "private": true, "dependencies": { From 7d354435d2fae708bd31c7be6c293662df360e8d Mon Sep 17 00:00:00 2001 From: Anartz Date: Mon, 8 Oct 2018 17:01:12 +0200 Subject: [PATCH 09/30] Add custom-styles --- src/custom-style/style.css | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 src/custom-style/style.css diff --git a/src/custom-style/style.css b/src/custom-style/style.css new file mode 100644 index 0000000..2b1fe13 --- /dev/null +++ b/src/custom-style/style.css @@ -0,0 +1,7 @@ +@import "./reset.css"; +@import "./bootstrap.min.css"; +@import "./bootstrap-card.css"; +@import "./font-awesome.min.css"; +@import "./compodoc.css"; +@import "./prism.css"; +@import "./tablesort.css"; \ No newline at end of file From 6e530503bf871126a68ed45771f7bbfbf54898c5 Mon Sep 17 00:00:00 2001 From: Anartz Mugika Date: Mon, 8 Oct 2018 18:04:09 +0200 Subject: [PATCH 10/30] Compodoc no logo creator and add custom logo with styles OK. Part 1 complete of section 5 --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 15d0540..fd1afea 100644 --- a/package.json +++ b/package.json @@ -15,8 +15,8 @@ "compodoc-material": "./node_modules/.bin/compodoc -p src/tsconfig.app.json --theme material", "compodoc-readthedocs": "./node_modules/.bin/compodoc -p src/tsconfig.app.json --theme readthedocs", "compodoc-with-additional-doc": "./node_modules/.bin/compodoc -p src/tsconfig.app.json --includes src/doc-config/", - "compodoc-no-logo": "./node_modules/.bin/compodoc -p src/tsconfig.app.json --hideGenerator", - "compodoc-c-favicon-title": "./node_modules/.bin/compodoc -p src/tsconfig.app.json --customFavicon src/favicon.ico -n \"Compodoc Angular / Ionic Doc\"" + "compodoc-no-logo": "./node_modules/.bin/compodoc -p src/tsconfig.app.json --hideGenerator -y src/custom-style/", + "compodoc-c-favicon-title": "./node_modules/.bin/compodoc -p src/tsconfig.app.json --customFavicon src/favicon.ico -n \"Compodoc Angular / Ionic Doc\" -y src/custom-style/" }, "private": true, "dependencies": { From 20cb644acbdbba509d2a4381b795792520479342 Mon Sep 17 00:00:00 2001 From: Anartz Mugika Date: Mon, 8 Oct 2018 18:04:45 +0200 Subject: [PATCH 11/30] Add need css to part 1 of section 5 and logotypes to use --- src/custom-style/img/cup.png | Bin 0 -> 4973 bytes src/custom-style/img/semaphore.png | Bin 0 -> 2930 bytes src/custom-style/style.css | 18 +++++++++++++++++- 3 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 src/custom-style/img/cup.png create mode 100644 src/custom-style/img/semaphore.png diff --git a/src/custom-style/img/cup.png b/src/custom-style/img/cup.png new file mode 100644 index 0000000000000000000000000000000000000000..ff5f82f0da0b316733746183604f5d63cdadc0fa GIT binary patch literal 4973 zcmV-z6O!zSP)$&q`WlV+U;;QiW~7cJ z5Ugl*4TwN>M)B1t1oPk_fj~&^>+Ib>NHmXo&wZV9U&)7+wYcZ}e*3r2`R(&NzsLUV zLr4Mo-W`_+;orfS&fvUM=#VZ5q!WT2HLu%fN_amz~ZC z&`K_z#FspKIGN>gG7AF$xOnkk<@bky5eUfQ6qK7>lyG&j%ghv1CF%Dj`7HqG+~k*; zA#n2VO$rP^&PaZl8G>li?@jUzK-iP?GBbyy-tuW3DBQHFoZqG`*#8BqR-0%Z&s zQC|$?AS*u|Fy-m9u3vMk`?$I5jsSzBHoSp^hy;vjD{{MkH@rTtD97Nth2(AqkBwRm zU=pxdfuEI@t@@o++OP(2@Qqu>m;u*QM7Sy1g2V6?MDHt^y?PY@m^<(AGP65DnOTVd zUSn!?9so4gRaHUFpMyD}j-e_x7&*av#(wWtheDkXX#h=I=FL!(f6a_Bi4@)wQLP^5 zX}nwV&ue4mA$G}46z$XMQVQQrBGS&Mz9?$(p7{(2i)@n%ISBAyhiVP_U2XH`$})(& z3U;8ku2?%}l&74*!)%uw174qr#zUuYqB8)M-Ue{#q>(Ao3INd7a-?H32y<9{!Q@w4 zx6Uc-KJc{xcun`ef^nw93Lx}A$9V!l!RHNa@cPZvC=d;rg#HKPOmEQr*f&1`9NaYT zB7xi$#UqF0x>QR5l%GB)9g)frl7%f>DlY`OCW3+nFX70ug6|OJ%r7omxj)3YeO-UA zwbU(mSjqe)fbWD7qAG}CIw4^)rSbvmheK7~%q6NEUB0>{#Oao<1JQA5OG zR~8w}B62@~1=PBAPNCP#Jp_=&*j(QYw)w6dKX*fCG#7GU?M->ELU%ntSM)u1Mxh(I zImt1Acq%`Yoj`v;aJ0?a@3;bQ9XsKhb>YqH{n5zzXx*ILqG9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V2f_sAiJ;TRLNGcaSh~sEhRVs|2(ri3g`89><*o2Ul_M&cJQRjCE3ka? zEJVoN_eMp5&)$h3`>D1ITSNFtU;xM-58?Pp6N|5&MYOkA+OA&+7MS`tgj1Og*g1dg zE(1Ok7yzspfzS4xhl%}+MXL&ktgsP^*)Yqw1uHL5I4zMI4`KRP2==W1exPIyUkW^j zH6t+jVFxBZY_%tip091upNdwn@i?E0~#|^lHTOwre7hI1!J>R|44N z)s~-N=EwT``=9Y@N69K8pU*!8V6O^Wet?MH?Ck9Pr3zb03I{TojCIvjSG{1G=7j*_ z&{u&32mZ8ts3MG3CjbBd07*qoM6N<$g00Vd6aWAK literal 0 HcmV?d00001 diff --git a/src/custom-style/style.css b/src/custom-style/style.css index 2b1fe13..e0e1063 100644 --- a/src/custom-style/style.css +++ b/src/custom-style/style.css @@ -4,4 +4,20 @@ @import "./font-awesome.min.css"; @import "./compodoc.css"; @import "./prism.css"; -@import "./tablesort.css"; \ No newline at end of file +@import "./tablesort.css"; + +.menu { + background: url(img/cup.png) no-repeat; + background-size: 180px; + background-position-x: 50%; + background-position-y: 2%; +} + +.menu ul.list { + background: whitesmoke; +} + +.menu .title { + padding: 8px 0; + margin-top: 215px; +} \ No newline at end of file From 66cfb24d649183b8f9ae78f35817ba5a7733466b Mon Sep 17 00:00:00 2001 From: Anartz Mugika Date: Mon, 8 Oct 2018 18:19:55 +0200 Subject: [PATCH 12/30] Section 5 Part 2 complete - Add custom favicon and title --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index fd1afea..7c5f12e 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ "compodoc-readthedocs": "./node_modules/.bin/compodoc -p src/tsconfig.app.json --theme readthedocs", "compodoc-with-additional-doc": "./node_modules/.bin/compodoc -p src/tsconfig.app.json --includes src/doc-config/", "compodoc-no-logo": "./node_modules/.bin/compodoc -p src/tsconfig.app.json --hideGenerator -y src/custom-style/", - "compodoc-c-favicon-title": "./node_modules/.bin/compodoc -p src/tsconfig.app.json --customFavicon src/favicon.ico -n \"Compodoc Angular / Ionic Doc\" -y src/custom-style/" + "compodoc-c-favicon-title": "./node_modules/.bin/compodoc -p src/tsconfig.app.json --customFavicon src/favicon.ico -n \"Compodoc Angular / Ionic Docum.\" -y src/custom-style/" }, "private": true, "dependencies": { From 4b45a717619ebaef8961412a9f32b66ccb98cac5 Mon Sep 17 00:00:00 2001 From: Anartz Mugika Date: Mon, 8 Oct 2018 18:51:06 +0200 Subject: [PATCH 13/30] Add custom theme. Section 5 Part 3 Finish --- package.json | 3 ++- src/custom-style/style.css | 19 +++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 7c5f12e..ef51ad1 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,8 @@ "compodoc-readthedocs": "./node_modules/.bin/compodoc -p src/tsconfig.app.json --theme readthedocs", "compodoc-with-additional-doc": "./node_modules/.bin/compodoc -p src/tsconfig.app.json --includes src/doc-config/", "compodoc-no-logo": "./node_modules/.bin/compodoc -p src/tsconfig.app.json --hideGenerator -y src/custom-style/", - "compodoc-c-favicon-title": "./node_modules/.bin/compodoc -p src/tsconfig.app.json --customFavicon src/favicon.ico -n \"Compodoc Angular / Ionic Docum.\" -y src/custom-style/" + "compodoc-c-favicon-title": "./node_modules/.bin/compodoc -p src/tsconfig.app.json --customFavicon src/favicon.ico -n \"Compodoc Angular / Ionic Docum.\" -y src/custom-style/", + "compodoc-custom-theme": "./node_modules/.bin/compodoc -p src/tsconfig.app.json --customFavicon src/favicon.ico -n \"Compodoc Angular / Ionic Docum.\" -y src/custom-style/" }, "private": true, "dependencies": { diff --git a/src/custom-style/style.css b/src/custom-style/style.css index e0e1063..83c3770 100644 --- a/src/custom-style/style.css +++ b/src/custom-style/style.css @@ -20,4 +20,23 @@ .menu .title { padding: 8px 0; margin-top: 215px; +} + +/*####################################################*/ +/* CUSTOM THEME OPTIONS +/*####################################################*/ + +/* Estilo de la sección del título */ +.title { + background: red; +} + +/* Estilo de la sección de búsqueda */ +#book-search-input { + background: greenyellow +} + +/* Cambio de apariencia en el menú principal */ +.menu ul.list { + background: aliceblue; } \ No newline at end of file From b29802e152578bcd9c7e1a21e1f7a3f1c63ee79c Mon Sep 17 00:00:00 2001 From: Anartz Mugika Date: Mon, 8 Oct 2018 19:09:48 +0200 Subject: [PATCH 14/30] Disable custom theme styles --- src/custom-style/style.css | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/custom-style/style.css b/src/custom-style/style.css index 83c3770..881ca07 100644 --- a/src/custom-style/style.css +++ b/src/custom-style/style.css @@ -27,16 +27,16 @@ /*####################################################*/ /* Estilo de la sección del título */ -.title { +/*.title { background: red; } /* Estilo de la sección de búsqueda */ -#book-search-input { +/*#book-search-input { background: greenyellow } /* Cambio de apariencia en el menú principal */ -.menu ul.list { +/*.menu ul.list { background: aliceblue; -} \ No newline at end of file +}*/ \ No newline at end of file From dde43c93bd1879ab542a5b9bc82d2a1612d31198 Mon Sep 17 00:00:00 2001 From: Anartz Mugika Date: Mon, 8 Oct 2018 19:36:59 +0200 Subject: [PATCH 15/30] Add jdoctags to show example in drivers.component.ts --- package.json | 3 +- src/app/pages/drivers/drivers.component.ts | 55 +++++++++++++++++----- 2 files changed, 44 insertions(+), 14 deletions(-) diff --git a/package.json b/package.json index ef51ad1..e4d5f9c 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,8 @@ "compodoc-with-additional-doc": "./node_modules/.bin/compodoc -p src/tsconfig.app.json --includes src/doc-config/", "compodoc-no-logo": "./node_modules/.bin/compodoc -p src/tsconfig.app.json --hideGenerator -y src/custom-style/", "compodoc-c-favicon-title": "./node_modules/.bin/compodoc -p src/tsconfig.app.json --customFavicon src/favicon.ico -n \"Compodoc Angular / Ionic Docum.\" -y src/custom-style/", - "compodoc-custom-theme": "./node_modules/.bin/compodoc -p src/tsconfig.app.json --customFavicon src/favicon.ico -n \"Compodoc Angular / Ionic Docum.\" -y src/custom-style/" + "compodoc-custom-theme": "./node_modules/.bin/compodoc -p src/tsconfig.app.json --customFavicon src/favicon.ico -n \"Compodoc Angular / Ionic Docum.\" -y src/custom-style/", + "compodoc-tips": "./node_modules/.bin/compodoc -p src/tsconfig.app.json" }, "private": true, "dependencies": { diff --git a/src/app/pages/drivers/drivers.component.ts b/src/app/pages/drivers/drivers.component.ts index be1f355..3dcd81d 100644 --- a/src/app/pages/drivers/drivers.component.ts +++ b/src/app/pages/drivers/drivers.component.ts @@ -6,31 +6,50 @@ import { AlertService } from '../../services/alert.service'; import swal from 'sweetalert2'; @Component({ - selector: 'app-drivers', - templateUrl: './drivers.component.html', - styleUrls: ['./drivers.component.css'] + selector: `app-drivers`, + templateUrl: `./drivers.component.html`, + styleUrls: [`./drivers.component.css`] }) export class DriversComponent implements OnInit { + /** + * @ignore + */ selectYear: string; + /** + * @ignore + */ driversList: Driver[]; + /** + * @ignore + */ showInfo: boolean; constructor( private selectPageService: SharedService, private _driversService: DriversService, private _alertService: AlertService ) {} - + /** + * @ignore + */ ngOnInit() { this.showInfo = false; - this.selectPageService.setSelectPage('drivers'); + this.selectPageService.setSelectPage(`drivers`); this.loadDataFromAssets(); } + /** + * Function to show / hide loading data loading. + * @example + * This is a good example to show loading data dialog + * loadDataDialog(true) + * + * @param open Value to specify if open load data dialog + */ private loadDataDialog(open: boolean = true) { if (open) { this._alertService.loadData( `Load ${this.selectYear} season drivers!!`, - 'Wait a moment please!!' + `Wait a moment please!!` ); } else { this._alertService.closeAlert(); @@ -38,7 +57,14 @@ export class DriversComponent implements OnInit { } /** - * Take data from server + * Take data from server. More info in: + * [Drivers List API Documentation]{@link https://ergast.com/mrd/methods/drivers/} + * + * @example + * This is a good example to show 2018 drivers list + * selectYearDrivers(2018) + * + * @param {string} year Select year value */ selectYearDrivers(year: string = String(new Date().getFullYear())) { this.selectYear = year; @@ -62,7 +88,7 @@ export class DriversComponent implements OnInit { * Take data from a local file in json format */ loadDataFromAssets() { - this.selectYear = '2018'; + this.selectYear = `2018`; this.loadDataDialog(); this._driversService.loadListFromLocal().subscribe((data: Driver[]) => { console.log(data); @@ -72,18 +98,21 @@ export class DriversComponent implements OnInit { }); } + /** + * @param {Driver} driver Select driver object + * @returns + */ infoAlert(driver: Driver) { - swal({ title: `
${driver.givenName} ${driver.familyName} `, html: ``, showCloseButton: false, showCancelButton: false, focusConfirm: false, - confirmButtonText: 'Close', - confirmButtonAriaLabel: 'Thumbs up, great!', - cancelButtonText: '', - cancelButtonAriaLabel: 'Thumbs down' + confirmButtonText: `Close`, + confirmButtonAriaLabel: `Thumbs up, great!`, + cancelButtonText: ``, + cancelButtonAriaLabel: `Thumbs down` }); } } From 52ecca1fa3973dcd76bae59eb41c5fe8e050cb4c Mon Sep 17 00:00:00 2001 From: Anartz Mugika Date: Tue, 9 Oct 2018 11:11:03 +0200 Subject: [PATCH 16/30] Update changes with protected and private functions not show. Part 2 complete --- package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index e4d5f9c..28ca534 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,8 @@ "compodoc-no-logo": "./node_modules/.bin/compodoc -p src/tsconfig.app.json --hideGenerator -y src/custom-style/", "compodoc-c-favicon-title": "./node_modules/.bin/compodoc -p src/tsconfig.app.json --customFavicon src/favicon.ico -n \"Compodoc Angular / Ionic Docum.\" -y src/custom-style/", "compodoc-custom-theme": "./node_modules/.bin/compodoc -p src/tsconfig.app.json --customFavicon src/favicon.ico -n \"Compodoc Angular / Ionic Docum.\" -y src/custom-style/", - "compodoc-tips": "./node_modules/.bin/compodoc -p src/tsconfig.app.json" + "compodoc-tips": "./node_modules/.bin/compodoc -p src/tsconfig.app.json", + "compodoc-no-private-protected": "./node_modules/.bin/compodoc -p src/tsconfig.app.json --disablePrivate --disableProtected" }, "private": true, "dependencies": { From 21f6b81d76a09e993388722fa2140485e346f376 Mon Sep 17 00:00:00 2001 From: Anartz Mugika Date: Tue, 9 Oct 2018 11:11:52 +0200 Subject: [PATCH 17/30] Add changes. Part 2 of section 6 ok --- src/app/pages/drivers/drivers.component.ts | 2 +- src/app/pages/races/races.component.ts | 2 +- src/app/pages/support/support.component.ts | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/app/pages/drivers/drivers.component.ts b/src/app/pages/drivers/drivers.component.ts index 3dcd81d..2ec78a4 100644 --- a/src/app/pages/drivers/drivers.component.ts +++ b/src/app/pages/drivers/drivers.component.ts @@ -87,7 +87,7 @@ export class DriversComponent implements OnInit { /** * Take data from a local file in json format */ - loadDataFromAssets() { + protected loadDataFromAssets() { this.selectYear = `2018`; this.loadDataDialog(); this._driversService.loadListFromLocal().subscribe((data: Driver[]) => { diff --git a/src/app/pages/races/races.component.ts b/src/app/pages/races/races.component.ts index c0522a6..877fd19 100644 --- a/src/app/pages/races/races.component.ts +++ b/src/app/pages/races/races.component.ts @@ -38,7 +38,7 @@ export class RacesComponent implements OnInit { /** * Take data from a local file in json format */ - loadDataFromAssets() { + private loadDataFromAssets() { this.selectYear = `2018`; this.loadDataDialog(); this._racesService.loadListFromLocal().subscribe((data: Race[]) => { diff --git a/src/app/pages/support/support.component.ts b/src/app/pages/support/support.component.ts index 10b66ce..e023789 100644 --- a/src/app/pages/support/support.component.ts +++ b/src/app/pages/support/support.component.ts @@ -8,7 +8,9 @@ import { SharedService } from '../../services/shared.service'; }) export class SupportComponent implements OnInit { constructor(private selectPageService: SharedService) {} - + /** + * @ignore + */ ngOnInit() { this.selectPageService.setSelectPage('Support'); } From 498b526ff7989458b6729065cdb421e8328c4aee Mon Sep 17 00:00:00 2001 From: Anartz Mugika Date: Tue, 9 Oct 2018 14:27:55 +0200 Subject: [PATCH 18/30] No show source code and dom tree structure. Part 3. Section 6 --- package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 28ca534..10b78b5 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,8 @@ "compodoc-c-favicon-title": "./node_modules/.bin/compodoc -p src/tsconfig.app.json --customFavicon src/favicon.ico -n \"Compodoc Angular / Ionic Docum.\" -y src/custom-style/", "compodoc-custom-theme": "./node_modules/.bin/compodoc -p src/tsconfig.app.json --customFavicon src/favicon.ico -n \"Compodoc Angular / Ionic Docum.\" -y src/custom-style/", "compodoc-tips": "./node_modules/.bin/compodoc -p src/tsconfig.app.json", - "compodoc-no-private-protected": "./node_modules/.bin/compodoc -p src/tsconfig.app.json --disablePrivate --disableProtected" + "compodoc-no-private-protected": "./node_modules/.bin/compodoc -p src/tsconfig.app.json --disablePrivate --disableProtected", + "compodoc-no-source-dom-tree": "./node_modules/.bin/compodoc -p src/tsconfig.app.json --disableSourceCode --disableDomTree" }, "private": true, "dependencies": { From 6cdfd6606d7e4128332493897f29019d1e246291 Mon Sep 17 00:00:00 2001 From: Anartz Mugika Date: Tue, 9 Oct 2018 17:04:56 +0200 Subject: [PATCH 19/30] Add OnDestroy LifeCycleHook method to complete part 4 - Section 6- Generate documentation with life cycle hooks functions and add script to generate documentation without life cycle hooks functions --- package.json | 3 ++- src/app/pages/drivers/drivers.component.ts | 10 ++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 10b78b5..212cf8b 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,8 @@ "compodoc-custom-theme": "./node_modules/.bin/compodoc -p src/tsconfig.app.json --customFavicon src/favicon.ico -n \"Compodoc Angular / Ionic Docum.\" -y src/custom-style/", "compodoc-tips": "./node_modules/.bin/compodoc -p src/tsconfig.app.json", "compodoc-no-private-protected": "./node_modules/.bin/compodoc -p src/tsconfig.app.json --disablePrivate --disableProtected", - "compodoc-no-source-dom-tree": "./node_modules/.bin/compodoc -p src/tsconfig.app.json --disableSourceCode --disableDomTree" + "compodoc-no-source-dom-tree": "./node_modules/.bin/compodoc -p src/tsconfig.app.json --disableSourceCode --disableDomTree", + "compodoc-disable-life-cycle-hooks": "./node_modules/.bin/compodoc -p src/tsconfig.app.json --disableLifeCycleHooks" }, "private": true, "dependencies": { diff --git a/src/app/pages/drivers/drivers.component.ts b/src/app/pages/drivers/drivers.component.ts index 2ec78a4..e781e0f 100644 --- a/src/app/pages/drivers/drivers.component.ts +++ b/src/app/pages/drivers/drivers.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, OnDestroy } from '@angular/core'; import { SharedService } from '../../services/shared.service'; import { DriversService } from '../../services/api/drivers.service'; import { Driver } from '../../interfaces/driver.interface'; @@ -10,7 +10,7 @@ import swal from 'sweetalert2'; templateUrl: `./drivers.component.html`, styleUrls: [`./drivers.component.css`] }) -export class DriversComponent implements OnInit { +export class DriversComponent implements OnInit, OnDestroy { /** * @ignore */ @@ -37,6 +37,12 @@ export class DriversComponent implements OnInit { this.loadDataFromAssets(); } + + ngOnDestroy(): void { + this.showInfo = false; + this.driversList = []; + } + /** * Function to show / hide loading data loading. * @example From 021a5820f187ef639caae9a190c043d9b99071bf Mon Sep 17 00:00:00 2001 From: Anartz Mugika Date: Wed, 10 Oct 2018 07:23:20 +0200 Subject: [PATCH 20/30] Add documentation in pipe google static image url --- src/app/pipes/google-static-map-url.pipe.ts | 37 +++++++++++++++++++-- 1 file changed, 35 insertions(+), 2 deletions(-) diff --git a/src/app/pipes/google-static-map-url.pipe.ts b/src/app/pipes/google-static-map-url.pipe.ts index a0ceafc..77e580e 100644 --- a/src/app/pipes/google-static-map-url.pipe.ts +++ b/src/app/pipes/google-static-map-url.pipe.ts @@ -11,8 +11,22 @@ export class GoogleStaticMapUrlPipe implements PipeTransform { STATICMAP = `https://maps.googleapis.com/maps/api/staticmap?`; - // value | googleStaticMapUrl::