tango-app-ui-shared 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (114) hide show
  1. package/.eslintrc.json +37 -0
  2. package/README.md +24 -0
  3. package/ng-package.json +7 -0
  4. package/package.json +12 -0
  5. package/src/lib/guards/auth.guard.ts +20 -0
  6. package/src/lib/i18n/index.ts +2 -0
  7. package/src/lib/i18n/translation.module.ts +9 -0
  8. package/src/lib/i18n/translation.service.ts +61 -0
  9. package/src/lib/i18n/vocabs/ch.ts +105 -0
  10. package/src/lib/i18n/vocabs/de.ts +105 -0
  11. package/src/lib/i18n/vocabs/en.ts +105 -0
  12. package/src/lib/i18n/vocabs/es.ts +105 -0
  13. package/src/lib/i18n/vocabs/fr.ts +105 -0
  14. package/src/lib/i18n/vocabs/jp.ts +105 -0
  15. package/src/lib/interceptors/http-auth-interceptor.ts +21 -0
  16. package/src/lib/interfaces/global-state.ts +6 -0
  17. package/src/lib/modules/errors/error404/error404.component.html +24 -0
  18. package/src/lib/modules/errors/error404/error404.component.scss +0 -0
  19. package/src/lib/modules/errors/error404/error404.component.spec.ts +25 -0
  20. package/src/lib/modules/errors/error404/error404.component.ts +50 -0
  21. package/src/lib/modules/errors/error500/error500.component.html +24 -0
  22. package/src/lib/modules/errors/error500/error500.component.scss +0 -0
  23. package/src/lib/modules/errors/error500/error500.component.spec.ts +25 -0
  24. package/src/lib/modules/errors/error500/error500.component.ts +50 -0
  25. package/src/lib/modules/errors/errors-routing.module.ts +30 -0
  26. package/src/lib/modules/errors/errors.component.html +15 -0
  27. package/src/lib/modules/errors/errors.component.scss +4 -0
  28. package/src/lib/modules/errors/errors.component.spec.ts +25 -0
  29. package/src/lib/modules/errors/errors.component.ts +42 -0
  30. package/src/lib/modules/errors/errors.module.ts +21 -0
  31. package/src/lib/modules/layout/content/content.component.html +12 -0
  32. package/src/lib/modules/layout/content/content.component.scss +0 -0
  33. package/src/lib/modules/layout/content/content.component.ts +35 -0
  34. package/src/lib/modules/layout/footer/footer.component.html +32 -0
  35. package/src/lib/modules/layout/footer/footer.component.scss +0 -0
  36. package/src/lib/modules/layout/footer/footer.component.spec.ts +25 -0
  37. package/src/lib/modules/layout/footer/footer.component.ts +13 -0
  38. package/src/lib/modules/layout/header/header-menu/header-menu.component.html +27 -0
  39. package/src/lib/modules/layout/header/header-menu/header-menu.component.scss +4 -0
  40. package/src/lib/modules/layout/header/header-menu/header-menu.component.spec.ts +25 -0
  41. package/src/lib/modules/layout/header/header-menu/header-menu.component.ts +38 -0
  42. package/src/lib/modules/layout/header/header.component.html +90 -0
  43. package/src/lib/modules/layout/header/header.component.scss +0 -0
  44. package/src/lib/modules/layout/header/header.component.spec.ts +25 -0
  45. package/src/lib/modules/layout/header/header.component.ts +139 -0
  46. package/src/lib/modules/layout/header/navbar/navbar.component.html +92 -0
  47. package/src/lib/modules/layout/header/navbar/navbar.component.scss +0 -0
  48. package/src/lib/modules/layout/header/navbar/navbar.component.spec.ts +23 -0
  49. package/src/lib/modules/layout/header/navbar/navbar.component.ts +20 -0
  50. package/src/lib/modules/layout/header/page-title/page-title.component.html +32 -0
  51. package/src/lib/modules/layout/header/page-title/page-title.component.ts +40 -0
  52. package/src/lib/modules/layout/keenicon/icons.json +1 -0
  53. package/src/lib/modules/layout/keenicon/keenicon.component.html +4 -0
  54. package/src/lib/modules/layout/keenicon/keenicon.component.scss +0 -0
  55. package/src/lib/modules/layout/keenicon/keenicon.component.spec.ts +23 -0
  56. package/src/lib/modules/layout/keenicon/keenicon.component.ts +30 -0
  57. package/src/lib/modules/layout/layout/layout.component.html +70 -0
  58. package/src/lib/modules/layout/layout/layout.component.scss +15 -0
  59. package/src/lib/modules/layout/layout/layout.component.ts +399 -0
  60. package/src/lib/modules/layout/layout.module.ts +93 -0
  61. package/src/lib/modules/layout/scripts-init/scripts-init.component.html +0 -0
  62. package/src/lib/modules/layout/scripts-init/scripts-init.component.ts +81 -0
  63. package/src/lib/modules/layout/scroll-top/scroll-top.component.html +1 -0
  64. package/src/lib/modules/layout/scroll-top/scroll-top.component.ts +75 -0
  65. package/src/lib/modules/layout/sidebar/sidebar-footer/sidebar-footer.component.html +9 -0
  66. package/src/lib/modules/layout/sidebar/sidebar-footer/sidebar-footer.component.scss +0 -0
  67. package/src/lib/modules/layout/sidebar/sidebar-footer/sidebar-footer.component.spec.ts +23 -0
  68. package/src/lib/modules/layout/sidebar/sidebar-footer/sidebar-footer.component.ts +13 -0
  69. package/src/lib/modules/layout/sidebar/sidebar-logo/sidebar-logo.component.html +26 -0
  70. package/src/lib/modules/layout/sidebar/sidebar-logo/sidebar-logo.component.scss +0 -0
  71. package/src/lib/modules/layout/sidebar/sidebar-logo/sidebar-logo.component.spec.ts +23 -0
  72. package/src/lib/modules/layout/sidebar/sidebar-logo/sidebar-logo.component.ts +36 -0
  73. package/src/lib/modules/layout/sidebar/sidebar-menu/sidebar-menu.component.html +276 -0
  74. package/src/lib/modules/layout/sidebar/sidebar-menu/sidebar-menu.component.scss +0 -0
  75. package/src/lib/modules/layout/sidebar/sidebar-menu/sidebar-menu.component.spec.ts +23 -0
  76. package/src/lib/modules/layout/sidebar/sidebar-menu/sidebar-menu.component.ts +15 -0
  77. package/src/lib/modules/layout/sidebar/sidebar.component.html +16 -0
  78. package/src/lib/modules/layout/sidebar/sidebar.component.scss +0 -0
  79. package/src/lib/modules/layout/sidebar/sidebar.component.spec.ts +23 -0
  80. package/src/lib/modules/layout/sidebar/sidebar.component.ts +203 -0
  81. package/src/lib/modules/layout/toolbar/accounting/accounting.component.html +84 -0
  82. package/src/lib/modules/layout/toolbar/accounting/accounting.component.scss +0 -0
  83. package/src/lib/modules/layout/toolbar/accounting/accounting.component.spec.ts +23 -0
  84. package/src/lib/modules/layout/toolbar/accounting/accounting.component.ts +14 -0
  85. package/src/lib/modules/layout/toolbar/classic/classic.component.html +37 -0
  86. package/src/lib/modules/layout/toolbar/classic/classic.component.scss +0 -0
  87. package/src/lib/modules/layout/toolbar/classic/classic.component.spec.ts +23 -0
  88. package/src/lib/modules/layout/toolbar/classic/classic.component.ts +88 -0
  89. package/src/lib/modules/layout/toolbar/extended/extended.component.html +100 -0
  90. package/src/lib/modules/layout/toolbar/extended/extended.component.scss +0 -0
  91. package/src/lib/modules/layout/toolbar/extended/extended.component.spec.ts +23 -0
  92. package/src/lib/modules/layout/toolbar/extended/extended.component.ts +12 -0
  93. package/src/lib/modules/layout/toolbar/reports/reports.component.html +62 -0
  94. package/src/lib/modules/layout/toolbar/reports/reports.component.scss +0 -0
  95. package/src/lib/modules/layout/toolbar/reports/reports.component.spec.ts +23 -0
  96. package/src/lib/modules/layout/toolbar/reports/reports.component.ts +14 -0
  97. package/src/lib/modules/layout/toolbar/saas/saas.component.html +77 -0
  98. package/src/lib/modules/layout/toolbar/saas/saas.component.scss +0 -0
  99. package/src/lib/modules/layout/toolbar/saas/saas.component.spec.ts +23 -0
  100. package/src/lib/modules/layout/toolbar/saas/saas.component.ts +14 -0
  101. package/src/lib/modules/layout/toolbar/toolbar.component.html +27 -0
  102. package/src/lib/modules/layout/toolbar/toolbar.component.scss +0 -0
  103. package/src/lib/modules/layout/toolbar/toolbar.component.spec.ts +25 -0
  104. package/src/lib/modules/layout/toolbar/toolbar.component.ts +125 -0
  105. package/src/lib/routes/route-wraper-modules/manage-wrapper.module.ts +12 -0
  106. package/src/lib/routes/route-wraper-modules/profile-wrapper.module.ts +12 -0
  107. package/src/lib/routes/route-wraper-modules/store-wrapper.module.ts +12 -0
  108. package/src/lib/routes/routing.ts +72 -0
  109. package/src/lib/services/auth.service.ts +16 -0
  110. package/src/lib/services/global-state.service.ts +11 -0
  111. package/src/public-api.ts +64 -0
  112. package/tsconfig.lib.json +14 -0
  113. package/tsconfig.lib.prod.json +10 -0
  114. package/tsconfig.spec.json +14 -0
@@ -0,0 +1,105 @@
1
+ // France
2
+ export const locale = {
3
+ lang: 'fr',
4
+ data: {
5
+ TRANSLATOR: {
6
+ SELECT: 'choisissez votre langue',
7
+ },
8
+ MENU: {
9
+ NEW: 'Nouveau',
10
+ ACTIONS: 'Actes',
11
+ CREATE_POST: 'Créer un nouveau Post',
12
+ PAGES: 'Pages',
13
+ FEATURES: 'Fonctionnalités',
14
+ APPS: 'Applications',
15
+ DASHBOARD: 'Tableau de Bord',
16
+ },
17
+ AUTH: {
18
+ GENERAL: {
19
+ OR: 'Ou',
20
+ SUBMIT_BUTTON: 'Soumettre',
21
+ NO_ACCOUNT: 'Ne pas avoir de compte?',
22
+ SIGNUP_BUTTON: 'Registre',
23
+ FORGOT_BUTTON: 'Mot de passe oublié',
24
+ BACK_BUTTON: 'Back',
25
+ PRIVACY: 'Privacy',
26
+ LEGAL: 'Legal',
27
+ CONTACT: 'Contact',
28
+ },
29
+ LOGIN: {
30
+ TITLE: 'Créer un compte',
31
+ BUTTON: 'Sign In',
32
+ },
33
+ FORGOT: {
34
+ TITLE: 'Forgotten Password?',
35
+ DESC: 'Enter your email to reset your password',
36
+ SUCCESS: 'Your account has been successfully reset.'
37
+ },
38
+ REGISTER: {
39
+ TITLE: 'Sign Up',
40
+ DESC: 'Enter your details to create your account',
41
+ SUCCESS: 'Your account has been successfuly registered.'
42
+ },
43
+ INPUT: {
44
+ EMAIL: 'Email',
45
+ FULLNAME: 'Fullname',
46
+ PASSWORD: 'Mot de passe',
47
+ CONFIRM_PASSWORD: 'Confirm Password',
48
+ USERNAME: 'Nom d\'utilisateur'
49
+ },
50
+ VALIDATION: {
51
+ INVALID: '{{name}} n\'est pas valide',
52
+ REQUIRED: '{{name}} est requis',
53
+ MIN_LENGTH: '{{name}} minimum length is {{min}}',
54
+ AGREEMENT_REQUIRED: 'Accepting terms & conditions are required',
55
+ NOT_FOUND: 'The requested {{name}} is not found',
56
+ INVALID_LOGIN: 'The login detail is incorrect',
57
+ REQUIRED_FIELD: 'Required field',
58
+ MIN_LENGTH_FIELD: 'Minimum field length:',
59
+ MAX_LENGTH_FIELD: 'Maximum field length:',
60
+ INVALID_FIELD: 'Field is not valid',
61
+ }
62
+ },
63
+ ECOMMERCE: {
64
+ COMMON: {
65
+ SELECTED_RECORDS_COUNT: 'Nombre d\'enregistrements sélectionnés: ',
66
+ ALL: 'All',
67
+ SUSPENDED: 'Suspended',
68
+ ACTIVE: 'Active',
69
+ FILTER: 'Filter',
70
+ BY_STATUS: 'by Status',
71
+ BY_TYPE: 'by Type',
72
+ BUSINESS: 'Business',
73
+ INDIVIDUAL: 'Individual',
74
+ SEARCH: 'Search',
75
+ IN_ALL_FIELDS: 'in all fields'
76
+ },
77
+ ECOMMERCE: 'éCommerce',
78
+ CUSTOMERS: {
79
+ CUSTOMERS: 'Les clients',
80
+ CUSTOMERS_LIST: 'Liste des clients',
81
+ NEW_CUSTOMER: 'Nouveau client',
82
+ DELETE_CUSTOMER_SIMPLE: {
83
+ TITLE: 'Suppression du client',
84
+ DESCRIPTION: 'Êtes-vous sûr de supprimer définitivement ce client?',
85
+ WAIT_DESCRIPTION: 'Le client est en train de supprimer ...',
86
+ MESSAGE: 'Le client a été supprimé'
87
+ },
88
+ DELETE_CUSTOMER_MULTY: {
89
+ TITLE: 'Supprimer les clients',
90
+ DESCRIPTION: 'Êtes-vous sûr de supprimer définitivement les clients sélectionnés?',
91
+ WAIT_DESCRIPTION: 'Les clients suppriment ...',
92
+ MESSAGE: 'Les clients sélectionnés ont été supprimés'
93
+ },
94
+ UPDATE_STATUS: {
95
+ TITLE: 'Le statut a été mis à jour pour les clients sélectionnés',
96
+ MESSAGE: 'Le statut des clients sélectionnés a été mis à jour avec succès'
97
+ },
98
+ EDIT: {
99
+ UPDATE_MESSAGE: 'Le client a été mis à jour',
100
+ ADD_MESSAGE: 'Le client a été créé'
101
+ }
102
+ }
103
+ }
104
+ }
105
+ };
@@ -0,0 +1,105 @@
1
+ // Japan
2
+ export const locale = {
3
+ lang: 'ja',
4
+ data: {
5
+ TRANSLATOR: {
6
+ SELECT: 'あなたが使う言語を選んでください',
7
+ },
8
+ MENU: {
9
+ NEW: '新しい',
10
+ ACTIONS: '行動',
11
+ CREATE_POST: '新しい投稿を作成',
12
+ PAGES: 'Pages',
13
+ FEATURES: '特徴',
14
+ APPS: 'アプリ',
15
+ DASHBOARD: 'ダッシュボード',
16
+ },
17
+ AUTH: {
18
+ GENERAL: {
19
+ OR: 'または',
20
+ SUBMIT_BUTTON: '提出する',
21
+ NO_ACCOUNT: 'アカウントを持っていない?',
22
+ SIGNUP_BUTTON: 'サインアップ',
23
+ FORGOT_BUTTON: 'パスワードをお忘れですか',
24
+ BACK_BUTTON: 'バック',
25
+ PRIVACY: 'プライバシー',
26
+ LEGAL: '法的',
27
+ CONTACT: '接触',
28
+ },
29
+ LOGIN: {
30
+ TITLE: 'Create Account',
31
+ BUTTON: 'Sign In',
32
+ },
33
+ FORGOT: {
34
+ TITLE: 'Forgotten Password?',
35
+ DESC: 'Enter your email to reset your password',
36
+ SUCCESS: 'Your account has been successfully reset.',
37
+ },
38
+ REGISTER: {
39
+ TITLE: 'Sign Up',
40
+ DESC: 'Enter your details to create your account',
41
+ SUCCESS: 'Your account has been successfuly registered.',
42
+ },
43
+ INPUT: {
44
+ EMAIL: 'Email',
45
+ FULLNAME: 'Fullname',
46
+ PASSWORD: 'Password',
47
+ CONFIRM_PASSWORD: 'Confirm Password',
48
+ USERNAME: 'ユーザー名',
49
+ },
50
+ VALIDATION: {
51
+ INVALID: '{{name}} is not valid',
52
+ REQUIRED: '{{name}} is required',
53
+ MIN_LENGTH: '{{name}} minimum length is {{min}}',
54
+ AGREEMENT_REQUIRED: 'Accepting terms & conditions are required',
55
+ NOT_FOUND: 'The requested {{name}} is not found',
56
+ INVALID_LOGIN: 'The login detail is incorrect',
57
+ REQUIRED_FIELD: 'Required field',
58
+ MIN_LENGTH_FIELD: 'Minimum field length:',
59
+ MAX_LENGTH_FIELD: 'Maximum field length:',
60
+ INVALID_FIELD: 'Field is not valid',
61
+ },
62
+ },
63
+ ECOMMERCE: {
64
+ COMMON: {
65
+ SELECTED_RECORDS_COUNT: 'Selected records count: ',
66
+ ALL: 'All',
67
+ SUSPENDED: 'Suspended',
68
+ ACTIVE: 'Active',
69
+ FILTER: 'Filter',
70
+ BY_STATUS: 'by Status',
71
+ BY_TYPE: 'by Type',
72
+ BUSINESS: 'Business',
73
+ INDIVIDUAL: 'Individual',
74
+ SEARCH: 'Search',
75
+ IN_ALL_FIELDS: 'in all fields',
76
+ },
77
+ ECOMMERCE: 'eCommerce',
78
+ CUSTOMERS: {
79
+ CUSTOMERS: 'Customers',
80
+ CUSTOMERS_LIST: 'Customers list',
81
+ NEW_CUSTOMER: 'New Customer',
82
+ DELETE_CUSTOMER_SIMPLE: {
83
+ TITLE: 'Customer Delete',
84
+ DESCRIPTION: 'Are you sure to permanently delete this customer?',
85
+ WAIT_DESCRIPTION: 'Customer is deleting...',
86
+ MESSAGE: 'Customer has been deleted',
87
+ },
88
+ DELETE_CUSTOMER_MULTY: {
89
+ TITLE: 'Customers Delete',
90
+ DESCRIPTION: 'Are you sure to permanently delete selected customers?',
91
+ WAIT_DESCRIPTION: 'Customers are deleting...',
92
+ MESSAGE: 'Selected customers have been deleted',
93
+ },
94
+ UPDATE_STATUS: {
95
+ TITLE: 'Status has been updated for selected customers',
96
+ MESSAGE: 'Selected customers status have successfully been updated',
97
+ },
98
+ EDIT: {
99
+ UPDATE_MESSAGE: 'Customer has been updated',
100
+ ADD_MESSAGE: 'Customer has been created',
101
+ },
102
+ },
103
+ },
104
+ },
105
+ };
@@ -0,0 +1,21 @@
1
+ import { Injectable } from '@angular/core';
2
+ import {
3
+ HttpRequest,
4
+ HttpHandler,
5
+ HttpEvent,
6
+ HttpInterceptor
7
+ } from '@angular/common/http';
8
+ import { Observable } from 'rxjs';
9
+ @Injectable()
10
+ export class HttpAuthInterceptor implements HttpInterceptor {
11
+ constructor() {}
12
+ intercept(request: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {
13
+
14
+ request = request.clone({
15
+ setHeaders: {
16
+ Authorization: `Bearer 7762ffb2-58be-47ab-be39-99e776bfe78a`
17
+ }
18
+ });
19
+ return next.handle(request);
20
+ }
21
+ }
@@ -0,0 +1,6 @@
1
+ export type sampleType = {
2
+ firstName:string
3
+ lastName:string,
4
+ email:string
5
+ }
6
+
@@ -0,0 +1,24 @@
1
+ <!--begin::Title-->
2
+ <h1 class="fw-bolder fs-2hx text-gray-900 mb-4">
3
+ Oops!
4
+ </h1>
5
+ <!--end::Title-->
6
+
7
+ <!--begin::Text-->
8
+ <div class="fw-semibold fs-6 text-gray-500 mb-7">
9
+ We can't find that page.
10
+ </div>
11
+ <!--end::Text-->
12
+
13
+ <!--begin::Illustration-->
14
+ <div class="mb-3">
15
+ <img src="./assets/media/auth/404-error.png" class="mw-100 mh-300px theme-light-show" alt="" />
16
+ <img src="./assets/media/auth/404-error-dark.png" class="mw-100 mh-300px theme-dark-show" alt="" />
17
+ </div>
18
+ <!--end::Illustration-->
19
+
20
+ <!--begin::Link-->
21
+ <div class="mb-0">
22
+ <a (click)="routeToDashboard()" class="btn btn-sm btn-primary">Return Home</a>
23
+ </div>
24
+ <!--end::Link-->
@@ -0,0 +1,25 @@
1
+ import { ComponentFixture, TestBed } from '@angular/core/testing';
2
+
3
+ import { Error404Component } from './error404.component';
4
+
5
+ describe('Error404Component', () => {
6
+ let component: Error404Component;
7
+ let fixture: ComponentFixture<Error404Component>;
8
+
9
+ beforeEach(async () => {
10
+ await TestBed.configureTestingModule({
11
+ declarations: [ Error404Component ]
12
+ })
13
+ .compileComponents();
14
+ });
15
+
16
+ beforeEach(() => {
17
+ fixture = TestBed.createComponent(Error404Component);
18
+ component = fixture.componentInstance;
19
+ fixture.detectChanges();
20
+ });
21
+
22
+ it('should create', () => {
23
+ expect(component).toBeTruthy();
24
+ });
25
+ });
@@ -0,0 +1,50 @@
1
+ import { Component, OnDestroy, OnInit } from '@angular/core';
2
+ import { Router } from '@angular/router';
3
+ import { Subscription } from 'rxjs';
4
+ import {
5
+ DrawerComponent,
6
+ MenuComponent,
7
+ ScrollComponent,
8
+ ScrollTopComponent,
9
+ StickyComponent,
10
+ ToggleComponent,
11
+ } from 'tango-app-metronics';
12
+ import { ThemeModeService } from 'tango-app-metronics';
13
+
14
+ @Component({
15
+ selector: 'lib-error404',
16
+ templateUrl: './error404.component.html',
17
+ styleUrls: ['./error404.component.scss'],
18
+ })
19
+ export class Error404Component implements OnInit, OnDestroy {
20
+ private unsubscribe: Subscription[] = [];
21
+
22
+ constructor(private router: Router, private modeService: ThemeModeService) {}
23
+
24
+ ngOnInit(): void {
25
+ const subscr = this.modeService.mode.asObservable().subscribe((mode) => {
26
+ document.body.style.backgroundImage =
27
+ mode === 'dark'
28
+ ? 'url(./assets/media/auth/bg1-dark.jpg)'
29
+ : 'url(./assets/media/auth/bg1.jpg)';
30
+ });
31
+ this.unsubscribe.push(subscr);
32
+ }
33
+
34
+ routeToDashboard() {
35
+ this.router.navigate(['dashboard']);
36
+ setTimeout(() => {
37
+ ToggleComponent.reinitialization();
38
+ ScrollTopComponent.reinitialization();
39
+ DrawerComponent.reinitialization();
40
+ StickyComponent.bootstrap();
41
+ MenuComponent.reinitialization();
42
+ ScrollComponent.reinitialization();
43
+ }, 200);
44
+ }
45
+
46
+ ngOnDestroy() {
47
+ this.unsubscribe.forEach((sb) => sb.unsubscribe());
48
+ document.body.style.backgroundImage = 'none';
49
+ }
50
+ }
@@ -0,0 +1,24 @@
1
+ <!--begin::Title-->
2
+ <h1 class="fw-bolder fs-2qx text-gray-900 mb-4">
3
+ System Error
4
+ </h1>
5
+ <!--end::Title-->
6
+
7
+ <!--begin::Text-->
8
+ <div class="fw-semibold fs-6 text-gray-500 mb-7">
9
+ Something went wrong! Please try again later.
10
+ </div>
11
+ <!--end::Text-->
12
+
13
+ <!--begin::Illustration-->
14
+ <div class="mb-11">
15
+ <img src="./assets/media/auth/500-error.png" class="mw-100 mh-300px theme-light-show" alt="" />
16
+ <img src="./assets/media/auth/500-error-dark.png" class="mw-100 mh-300px theme-dark-show" alt="" />
17
+ </div>
18
+ <!--end::Illustration-->
19
+
20
+ <!--begin::Link-->
21
+ <div class="mb-0">
22
+ <a (click)="routeToDashboard()" class="btn btn-sm btn-primary">Return Home</a>
23
+ </div>
24
+ <!--end::Link-->
@@ -0,0 +1,25 @@
1
+ import { ComponentFixture, TestBed } from '@angular/core/testing';
2
+
3
+ import { Error500Component } from './error500.component';
4
+
5
+ describe('Error500Component', () => {
6
+ let component: Error500Component;
7
+ let fixture: ComponentFixture<Error500Component>;
8
+
9
+ beforeEach(async () => {
10
+ await TestBed.configureTestingModule({
11
+ declarations: [ Error500Component ]
12
+ })
13
+ .compileComponents();
14
+ });
15
+
16
+ beforeEach(() => {
17
+ fixture = TestBed.createComponent(Error500Component);
18
+ component = fixture.componentInstance;
19
+ fixture.detectChanges();
20
+ });
21
+
22
+ it('should create', () => {
23
+ expect(component).toBeTruthy();
24
+ });
25
+ });
@@ -0,0 +1,50 @@
1
+ import { Component, OnDestroy, OnInit } from '@angular/core';
2
+ import { Router } from '@angular/router';
3
+ import { Subscription } from 'rxjs';
4
+ import {
5
+ DrawerComponent,
6
+ MenuComponent,
7
+ ScrollComponent,
8
+ ScrollTopComponent,
9
+ StickyComponent,
10
+ ToggleComponent,
11
+ } from 'tango-app-metronics';
12
+ import { ThemeModeService } from 'tango-app-metronics';
13
+
14
+ @Component({
15
+ selector: 'lib-error500',
16
+ templateUrl: './error500.component.html',
17
+ styleUrls: ['./error500.component.scss'],
18
+ })
19
+ export class Error500Component implements OnInit, OnDestroy {
20
+ private unsubscribe: Subscription[] = [];
21
+
22
+ constructor(private router: Router, private modeService: ThemeModeService) {}
23
+
24
+ ngOnInit(): void {
25
+ const subscr = this.modeService.mode.asObservable().subscribe((mode) => {
26
+ document.body.style.backgroundImage =
27
+ mode === 'dark'
28
+ ? 'url(./assets/media/auth/bg7-dark.jpg)'
29
+ : 'url(./assets/media/auth/bg7.jpg)';
30
+ });
31
+ this.unsubscribe.push(subscr);
32
+ }
33
+
34
+ routeToDashboard() {
35
+ this.router.navigate(['dashboard']);
36
+ setTimeout(() => {
37
+ ToggleComponent.reinitialization();
38
+ ScrollTopComponent.reinitialization();
39
+ DrawerComponent.reinitialization();
40
+ StickyComponent.bootstrap();
41
+ MenuComponent.reinitialization();
42
+ ScrollComponent.reinitialization();
43
+ }, 200);
44
+ }
45
+
46
+ ngOnDestroy() {
47
+ this.unsubscribe.forEach((sb) => sb.unsubscribe());
48
+ document.body.style.backgroundImage = 'none';
49
+ }
50
+ }
@@ -0,0 +1,30 @@
1
+ import { NgModule } from '@angular/core';
2
+ import { RouterModule, Routes } from '@angular/router';
3
+ import { Error404Component } from './error404/error404.component';
4
+ import { Error500Component } from './error500/error500.component';
5
+ import { ErrorsComponent } from './errors.component';
6
+
7
+ const routes: Routes = [
8
+ {
9
+ path: '',
10
+ component: ErrorsComponent,
11
+ children: [
12
+ {
13
+ path: '404',
14
+ component: Error404Component,
15
+ },
16
+ {
17
+ path: '500',
18
+ component: Error500Component,
19
+ },
20
+ { path: '', redirectTo: '404', pathMatch: 'full' },
21
+ { path: '**', redirectTo: '404', pathMatch: 'full' },
22
+ ],
23
+ },
24
+ ];
25
+
26
+ @NgModule({
27
+ imports: [RouterModule.forChild(routes)],
28
+ exports: [RouterModule],
29
+ })
30
+ export class ErrorsRoutingModule {}
@@ -0,0 +1,15 @@
1
+ <!--begin::Authentication - -->
2
+ <div class="d-flex flex-column flex-center flex-column-fluid">
3
+ <!--begin::Content-->
4
+ <div class="d-flex flex-column flex-center text-center p-10">
5
+ <!--begin::Wrapper-->
6
+ <div class="card card-flush w-lg-650px py-5">
7
+ <div class="card-body py-15 py-lg-20">
8
+ <router-outlet></router-outlet>
9
+ </div>
10
+ </div>
11
+ <!--end::Wrapper-->
12
+ </div>
13
+ <!--end::Content-->
14
+ </div>
15
+ <!--end::Authentication - -->
@@ -0,0 +1,4 @@
1
+ :host {
2
+ height: 100%;
3
+ margin: 0;
4
+ }
@@ -0,0 +1,25 @@
1
+ import { ComponentFixture, TestBed } from '@angular/core/testing';
2
+
3
+ import { ErrorsComponent } from './errors.component';
4
+
5
+ describe('ErrorsComponent', () => {
6
+ let component: ErrorsComponent;
7
+ let fixture: ComponentFixture<ErrorsComponent>;
8
+
9
+ beforeEach(async () => {
10
+ await TestBed.configureTestingModule({
11
+ declarations: [ ErrorsComponent ]
12
+ })
13
+ .compileComponents();
14
+ });
15
+
16
+ beforeEach(() => {
17
+ fixture = TestBed.createComponent(ErrorsComponent);
18
+ component = fixture.componentInstance;
19
+ fixture.detectChanges();
20
+ });
21
+
22
+ it('should create', () => {
23
+ expect(component).toBeTruthy();
24
+ });
25
+ });
@@ -0,0 +1,42 @@
1
+ import { Component, HostBinding, OnDestroy, OnInit } from '@angular/core';
2
+ import { Router } from '@angular/router';
3
+ import {
4
+ DrawerComponent,
5
+ MenuComponent,
6
+ ScrollComponent,
7
+ ScrollTopComponent,
8
+ StickyComponent,
9
+ ToggleComponent,
10
+ } from 'tango-app-metronics';
11
+
12
+ const BODY_CLASSES = ['bgi-size-cover', 'bgi-position-center', 'bgi-no-repeat'];
13
+
14
+ @Component({
15
+ selector: 'lib-errors',
16
+ templateUrl: './errors.component.html',
17
+ styleUrls: ['./errors.component.scss'],
18
+ })
19
+ export class ErrorsComponent implements OnInit, OnDestroy {
20
+ @HostBinding('class') class = 'd-flex flex-column flex-root';
21
+ constructor(private router: Router) {}
22
+
23
+ ngOnInit(): void {
24
+ BODY_CLASSES.forEach((c) => document.body.classList.add(c));
25
+ }
26
+
27
+ ngOnDestroy(): void {
28
+ BODY_CLASSES.forEach((c) => document.body.classList.remove(c));
29
+ }
30
+
31
+ routeToDashboard() {
32
+ this.router.navigate(['dashboard']);
33
+ setTimeout(() => {
34
+ ToggleComponent.bootstrap();
35
+ ScrollTopComponent.bootstrap();
36
+ DrawerComponent.bootstrap();
37
+ StickyComponent.bootstrap();
38
+ MenuComponent.bootstrap();
39
+ ScrollComponent.bootstrap();
40
+ }, 200);
41
+ }
42
+ }
@@ -0,0 +1,21 @@
1
+ import { NgModule } from '@angular/core';
2
+ import { CommonModule } from '@angular/common';
3
+
4
+ import { ErrorsRoutingModule } from './errors-routing.module';
5
+ import { ErrorsComponent } from '../errors/errors.component';
6
+ import { Error500Component } from './error500/error500.component';
7
+ import { Error404Component } from './error404/error404.component';
8
+
9
+
10
+ @NgModule({
11
+ declarations: [
12
+ ErrorsComponent,
13
+ Error404Component,
14
+ Error500Component
15
+ ],
16
+ imports: [
17
+ CommonModule,
18
+ ErrorsRoutingModule
19
+ ]
20
+ })
21
+ export class ErrorsModule { }
@@ -0,0 +1,12 @@
1
+ <ng-container *ngIf="appContentContiner">
2
+ <!--begin::Content container-->
3
+ <div id="kt_app_content_container" class="app-container"
4
+ [ngClass]="appContentContainerClass + ' ' + contentContainerCSSClass"
5
+ [ngClass]="{'container-xxl': appContentContiner === 'fixed', 'container-fluid': appContentContiner === 'fluid'}">
6
+ <router-outlet></router-outlet>
7
+ </div>
8
+ <!--end::Content container-->
9
+ </ng-container>
10
+ <ng-container *ngIf="!appContentContiner">
11
+ <router-outlet></router-outlet>
12
+ </ng-container>
@@ -0,0 +1,35 @@
1
+ import { Component, Input, OnDestroy, OnInit } from '@angular/core';
2
+ import { NavigationCancel, NavigationEnd, Router } from '@angular/router';
3
+ import { Subscription } from 'rxjs/internal/Subscription';
4
+ // import { DrawerComponent } from '../../../kt/components';
5
+ @Component({
6
+ selector: 'lib-content',
7
+ templateUrl: './content.component.html',
8
+ styleUrls: ['./content.component.scss'],
9
+ })
10
+ export class ContentComponent implements OnInit, OnDestroy {
11
+ @Input() contentContainerCSSClass: string = '';
12
+ @Input() appContentContiner?: 'fixed' | 'fluid';
13
+ @Input() appContentContainerClass: string = '';
14
+
15
+ private unsubscribe: Subscription[] = [];
16
+
17
+ constructor(private router: Router) {}
18
+
19
+ ngOnInit(): void {
20
+ this.routingChanges();
21
+ }
22
+
23
+ routingChanges() {
24
+ const routerSubscription = this.router.events.subscribe((event) => {
25
+ if (event instanceof NavigationEnd || event instanceof NavigationCancel) {
26
+ // DrawerComponent.hideAll();
27
+ }
28
+ });
29
+ this.unsubscribe.push(routerSubscription);
30
+ }
31
+
32
+ ngOnDestroy() {
33
+ this.unsubscribe.forEach((sb) => sb.unsubscribe());
34
+ }
35
+ }
@@ -0,0 +1,32 @@
1
+ <ng-container *ngIf="appFooterContainerCSSClass">
2
+ <!--begin::Footer container-->
3
+ <div class="app-container" [ngClass]="appFooterContainerCSSClass">
4
+ <ng-container *ngTemplateOutlet="footerView"></ng-container>
5
+ </div>
6
+ <!--end::Footer container-->
7
+ </ng-container>
8
+
9
+ <ng-container *ngIf="!appFooterContainerCSSClass">
10
+ <ng-container *ngTemplateOutlet="footerView"></ng-container>
11
+ </ng-container>
12
+
13
+ <ng-template #footerView>
14
+ <!--begin::Copyright-->
15
+ <div class="text-gray-900 order-2 order-md-1">
16
+ <span class="text-muted fw-semibold me-1">{{currentDateStr}}&copy;</span>
17
+ <a href="https://keenthemes.com/" target="_blank" class="text-gray-800 text-hover-primary">Keenthemes</a>
18
+ </div>
19
+ <!--end::Copyright-->
20
+
21
+ <!--begin::Menu-->
22
+ <ul class="menu menu-gray-600 menu-hover-primary fw-semibold order-1">
23
+ <li class="menu-item"><a href="https://keenthemes.com/" target="_blank" class="menu-link px-2">About</a></li>
24
+
25
+ <li class="menu-item"><a href="https://devs.keenthemes.com/" target="_blank" class="menu-link px-2">Support</a></li>
26
+
27
+ <li class="menu-item"><a href="https://themeforest.net/item/metronic-responsive-admin-dashboard-template/4021469"
28
+ target="_blank" class="menu-link px-2">Purchase</a></li>
29
+ </ul>
30
+ <!--end::Menu-->
31
+
32
+ </ng-template>