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.
- package/.eslintrc.json +37 -0
- package/README.md +24 -0
- package/ng-package.json +7 -0
- package/package.json +12 -0
- package/src/lib/guards/auth.guard.ts +20 -0
- package/src/lib/i18n/index.ts +2 -0
- package/src/lib/i18n/translation.module.ts +9 -0
- package/src/lib/i18n/translation.service.ts +61 -0
- package/src/lib/i18n/vocabs/ch.ts +105 -0
- package/src/lib/i18n/vocabs/de.ts +105 -0
- package/src/lib/i18n/vocabs/en.ts +105 -0
- package/src/lib/i18n/vocabs/es.ts +105 -0
- package/src/lib/i18n/vocabs/fr.ts +105 -0
- package/src/lib/i18n/vocabs/jp.ts +105 -0
- package/src/lib/interceptors/http-auth-interceptor.ts +21 -0
- package/src/lib/interfaces/global-state.ts +6 -0
- package/src/lib/modules/errors/error404/error404.component.html +24 -0
- package/src/lib/modules/errors/error404/error404.component.scss +0 -0
- package/src/lib/modules/errors/error404/error404.component.spec.ts +25 -0
- package/src/lib/modules/errors/error404/error404.component.ts +50 -0
- package/src/lib/modules/errors/error500/error500.component.html +24 -0
- package/src/lib/modules/errors/error500/error500.component.scss +0 -0
- package/src/lib/modules/errors/error500/error500.component.spec.ts +25 -0
- package/src/lib/modules/errors/error500/error500.component.ts +50 -0
- package/src/lib/modules/errors/errors-routing.module.ts +30 -0
- package/src/lib/modules/errors/errors.component.html +15 -0
- package/src/lib/modules/errors/errors.component.scss +4 -0
- package/src/lib/modules/errors/errors.component.spec.ts +25 -0
- package/src/lib/modules/errors/errors.component.ts +42 -0
- package/src/lib/modules/errors/errors.module.ts +21 -0
- package/src/lib/modules/layout/content/content.component.html +12 -0
- package/src/lib/modules/layout/content/content.component.scss +0 -0
- package/src/lib/modules/layout/content/content.component.ts +35 -0
- package/src/lib/modules/layout/footer/footer.component.html +32 -0
- package/src/lib/modules/layout/footer/footer.component.scss +0 -0
- package/src/lib/modules/layout/footer/footer.component.spec.ts +25 -0
- package/src/lib/modules/layout/footer/footer.component.ts +13 -0
- package/src/lib/modules/layout/header/header-menu/header-menu.component.html +27 -0
- package/src/lib/modules/layout/header/header-menu/header-menu.component.scss +4 -0
- package/src/lib/modules/layout/header/header-menu/header-menu.component.spec.ts +25 -0
- package/src/lib/modules/layout/header/header-menu/header-menu.component.ts +38 -0
- package/src/lib/modules/layout/header/header.component.html +90 -0
- package/src/lib/modules/layout/header/header.component.scss +0 -0
- package/src/lib/modules/layout/header/header.component.spec.ts +25 -0
- package/src/lib/modules/layout/header/header.component.ts +139 -0
- package/src/lib/modules/layout/header/navbar/navbar.component.html +92 -0
- package/src/lib/modules/layout/header/navbar/navbar.component.scss +0 -0
- package/src/lib/modules/layout/header/navbar/navbar.component.spec.ts +23 -0
- package/src/lib/modules/layout/header/navbar/navbar.component.ts +20 -0
- package/src/lib/modules/layout/header/page-title/page-title.component.html +32 -0
- package/src/lib/modules/layout/header/page-title/page-title.component.ts +40 -0
- package/src/lib/modules/layout/keenicon/icons.json +1 -0
- package/src/lib/modules/layout/keenicon/keenicon.component.html +4 -0
- package/src/lib/modules/layout/keenicon/keenicon.component.scss +0 -0
- package/src/lib/modules/layout/keenicon/keenicon.component.spec.ts +23 -0
- package/src/lib/modules/layout/keenicon/keenicon.component.ts +30 -0
- package/src/lib/modules/layout/layout/layout.component.html +70 -0
- package/src/lib/modules/layout/layout/layout.component.scss +15 -0
- package/src/lib/modules/layout/layout/layout.component.ts +399 -0
- package/src/lib/modules/layout/layout.module.ts +93 -0
- package/src/lib/modules/layout/scripts-init/scripts-init.component.html +0 -0
- package/src/lib/modules/layout/scripts-init/scripts-init.component.ts +81 -0
- package/src/lib/modules/layout/scroll-top/scroll-top.component.html +1 -0
- package/src/lib/modules/layout/scroll-top/scroll-top.component.ts +75 -0
- package/src/lib/modules/layout/sidebar/sidebar-footer/sidebar-footer.component.html +9 -0
- package/src/lib/modules/layout/sidebar/sidebar-footer/sidebar-footer.component.scss +0 -0
- package/src/lib/modules/layout/sidebar/sidebar-footer/sidebar-footer.component.spec.ts +23 -0
- package/src/lib/modules/layout/sidebar/sidebar-footer/sidebar-footer.component.ts +13 -0
- package/src/lib/modules/layout/sidebar/sidebar-logo/sidebar-logo.component.html +26 -0
- package/src/lib/modules/layout/sidebar/sidebar-logo/sidebar-logo.component.scss +0 -0
- package/src/lib/modules/layout/sidebar/sidebar-logo/sidebar-logo.component.spec.ts +23 -0
- package/src/lib/modules/layout/sidebar/sidebar-logo/sidebar-logo.component.ts +36 -0
- package/src/lib/modules/layout/sidebar/sidebar-menu/sidebar-menu.component.html +276 -0
- package/src/lib/modules/layout/sidebar/sidebar-menu/sidebar-menu.component.scss +0 -0
- package/src/lib/modules/layout/sidebar/sidebar-menu/sidebar-menu.component.spec.ts +23 -0
- package/src/lib/modules/layout/sidebar/sidebar-menu/sidebar-menu.component.ts +15 -0
- package/src/lib/modules/layout/sidebar/sidebar.component.html +16 -0
- package/src/lib/modules/layout/sidebar/sidebar.component.scss +0 -0
- package/src/lib/modules/layout/sidebar/sidebar.component.spec.ts +23 -0
- package/src/lib/modules/layout/sidebar/sidebar.component.ts +203 -0
- package/src/lib/modules/layout/toolbar/accounting/accounting.component.html +84 -0
- package/src/lib/modules/layout/toolbar/accounting/accounting.component.scss +0 -0
- package/src/lib/modules/layout/toolbar/accounting/accounting.component.spec.ts +23 -0
- package/src/lib/modules/layout/toolbar/accounting/accounting.component.ts +14 -0
- package/src/lib/modules/layout/toolbar/classic/classic.component.html +37 -0
- package/src/lib/modules/layout/toolbar/classic/classic.component.scss +0 -0
- package/src/lib/modules/layout/toolbar/classic/classic.component.spec.ts +23 -0
- package/src/lib/modules/layout/toolbar/classic/classic.component.ts +88 -0
- package/src/lib/modules/layout/toolbar/extended/extended.component.html +100 -0
- package/src/lib/modules/layout/toolbar/extended/extended.component.scss +0 -0
- package/src/lib/modules/layout/toolbar/extended/extended.component.spec.ts +23 -0
- package/src/lib/modules/layout/toolbar/extended/extended.component.ts +12 -0
- package/src/lib/modules/layout/toolbar/reports/reports.component.html +62 -0
- package/src/lib/modules/layout/toolbar/reports/reports.component.scss +0 -0
- package/src/lib/modules/layout/toolbar/reports/reports.component.spec.ts +23 -0
- package/src/lib/modules/layout/toolbar/reports/reports.component.ts +14 -0
- package/src/lib/modules/layout/toolbar/saas/saas.component.html +77 -0
- package/src/lib/modules/layout/toolbar/saas/saas.component.scss +0 -0
- package/src/lib/modules/layout/toolbar/saas/saas.component.spec.ts +23 -0
- package/src/lib/modules/layout/toolbar/saas/saas.component.ts +14 -0
- package/src/lib/modules/layout/toolbar/toolbar.component.html +27 -0
- package/src/lib/modules/layout/toolbar/toolbar.component.scss +0 -0
- package/src/lib/modules/layout/toolbar/toolbar.component.spec.ts +25 -0
- package/src/lib/modules/layout/toolbar/toolbar.component.ts +125 -0
- package/src/lib/routes/route-wraper-modules/manage-wrapper.module.ts +12 -0
- package/src/lib/routes/route-wraper-modules/profile-wrapper.module.ts +12 -0
- package/src/lib/routes/route-wraper-modules/store-wrapper.module.ts +12 -0
- package/src/lib/routes/routing.ts +72 -0
- package/src/lib/services/auth.service.ts +16 -0
- package/src/lib/services/global-state.service.ts +11 -0
- package/src/public-api.ts +64 -0
- package/tsconfig.lib.json +14 -0
- package/tsconfig.lib.prod.json +10 -0
- package/tsconfig.spec.json +14 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
+
|
|
3
|
+
import { ExtendedComponent } from './extended.component';
|
|
4
|
+
|
|
5
|
+
describe('ExtendedComponent', () => {
|
|
6
|
+
let component: ExtendedComponent;
|
|
7
|
+
let fixture: ComponentFixture<ExtendedComponent>;
|
|
8
|
+
|
|
9
|
+
beforeEach(async () => {
|
|
10
|
+
await TestBed.configureTestingModule({
|
|
11
|
+
declarations: [ ExtendedComponent ]
|
|
12
|
+
})
|
|
13
|
+
.compileComponents();
|
|
14
|
+
|
|
15
|
+
fixture = TestBed.createComponent(ExtendedComponent);
|
|
16
|
+
component = fixture.componentInstance;
|
|
17
|
+
fixture.detectChanges();
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
it('should create', () => {
|
|
21
|
+
expect(component).toBeTruthy();
|
|
22
|
+
});
|
|
23
|
+
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Component, OnInit } from '@angular/core';
|
|
2
|
+
|
|
3
|
+
@Component({
|
|
4
|
+
selector: 'lib-extended',
|
|
5
|
+
templateUrl: './extended.component.html',
|
|
6
|
+
styleUrls: ['./extended.component.scss'],
|
|
7
|
+
})
|
|
8
|
+
export class ExtendedComponent implements OnInit {
|
|
9
|
+
constructor() {}
|
|
10
|
+
|
|
11
|
+
ngOnInit(): void {}
|
|
12
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
<!--begin::Wrapper-->
|
|
2
|
+
<div class="d-flex align-items-center flex-shrink-0">
|
|
3
|
+
<!--begin::Label-->
|
|
4
|
+
<span class="fs-7 fw-bold text-gray-700 flex-shrink-0 pe-4 d-none d-md-block">Filter By:</span>
|
|
5
|
+
<!--end::Label-->
|
|
6
|
+
|
|
7
|
+
<div class="flex-shrink-0 ">
|
|
8
|
+
<ul class="nav">
|
|
9
|
+
<li class="nav-item">
|
|
10
|
+
<a class="nav-link btn btn-sm btn-color-muted btn-active-color-primary btn-active-light active fw-semibold fs-7 px-4 me-1"
|
|
11
|
+
data-bs-toggle="tab" href="#">Today</a>
|
|
12
|
+
</li>
|
|
13
|
+
|
|
14
|
+
<li class="nav-item">
|
|
15
|
+
<a class="nav-link btn btn-sm btn-color-muted btn-active-color-primary btn-active-light fw-semibold fs-7 px-4 me-1"
|
|
16
|
+
data-bs-toggle="tab" href="">Week</a>
|
|
17
|
+
</li>
|
|
18
|
+
|
|
19
|
+
<li class="nav-item">
|
|
20
|
+
<a class="nav-link btn btn-sm btn-color-muted btn-active-color-primary btn-active-light fw-semibold fs-7 px-4"
|
|
21
|
+
data-bs-toggle="tab" href="#">Day</a>
|
|
22
|
+
</li>
|
|
23
|
+
</ul>
|
|
24
|
+
</div>
|
|
25
|
+
</div>
|
|
26
|
+
<!--end::Wrapper-->
|
|
27
|
+
|
|
28
|
+
<!--begin::Separartor-->
|
|
29
|
+
<div class="bullet bg-secondary h-35px w-1px mx-5"></div>
|
|
30
|
+
<!--end::Separartor-->
|
|
31
|
+
|
|
32
|
+
<!--begin::Wrapper-->
|
|
33
|
+
<div class="d-flex align-items-center">
|
|
34
|
+
<!--begin::Label-->
|
|
35
|
+
<span class="fs-7 fw-bold text-gray-700 flex-shrink-0 pe-4 d-none d-md-block">Sort By:</span>
|
|
36
|
+
<!--end::Label-->
|
|
37
|
+
|
|
38
|
+
<!--begin::Select-->
|
|
39
|
+
<select class="form-select form-select-sm w-md-125px form-select-solid" data-control="select2"
|
|
40
|
+
data-placeholder="Latest" data-hide-search="true">
|
|
41
|
+
<option value=""></option>
|
|
42
|
+
<option value="1" selected>Latest</option>
|
|
43
|
+
<option value="2">In Progress</option>
|
|
44
|
+
<option value="3">Done</option>
|
|
45
|
+
</select>
|
|
46
|
+
<!--end::Select-->
|
|
47
|
+
|
|
48
|
+
<!--begin::Actions-->
|
|
49
|
+
<div class="d-flex align-items-center ms-3">
|
|
50
|
+
<button type="button" class="btn btn-sm btn-icon btn-light-primary me-3" data-bs-toggle="tooltip"
|
|
51
|
+
data-bs-placement="top" title="Enable grid view">
|
|
52
|
+
<lib-keenicon name="element-11" class="fs-2 text-primary"></lib-keenicon>
|
|
53
|
+
</button>
|
|
54
|
+
|
|
55
|
+
<button type="button" class="btn btn-sm btn-icon btn-light" data-bs-toggle="tooltip" data-bs-placement="top"
|
|
56
|
+
title="Enable row view">
|
|
57
|
+
<lib-keenicon name="abstract-14" class="fs-2 text-gray400"></lib-keenicon>
|
|
58
|
+
</button>
|
|
59
|
+
</div>
|
|
60
|
+
<!--end::Actions-->
|
|
61
|
+
</div>
|
|
62
|
+
<!--end::Wrapper-->
|
|
File without changes
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
+
|
|
3
|
+
import { ReportsComponent } from './reports.component';
|
|
4
|
+
|
|
5
|
+
describe('ReportsComponent', () => {
|
|
6
|
+
let component: ReportsComponent;
|
|
7
|
+
let fixture: ComponentFixture<ReportsComponent>;
|
|
8
|
+
|
|
9
|
+
beforeEach(async () => {
|
|
10
|
+
await TestBed.configureTestingModule({
|
|
11
|
+
declarations: [ ReportsComponent ]
|
|
12
|
+
})
|
|
13
|
+
.compileComponents();
|
|
14
|
+
|
|
15
|
+
fixture = TestBed.createComponent(ReportsComponent);
|
|
16
|
+
component = fixture.componentInstance;
|
|
17
|
+
fixture.detectChanges();
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
it('should create', () => {
|
|
21
|
+
expect(component).toBeTruthy();
|
|
22
|
+
});
|
|
23
|
+
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Component, Input, OnInit } from '@angular/core';
|
|
2
|
+
|
|
3
|
+
@Component({
|
|
4
|
+
selector: 'lib-reports',
|
|
5
|
+
templateUrl: './reports.component.html',
|
|
6
|
+
styleUrls: ['./reports.component.scss'],
|
|
7
|
+
})
|
|
8
|
+
export class ReportsComponent implements OnInit {
|
|
9
|
+
@Input() appPageTitleDisplay: boolean;
|
|
10
|
+
|
|
11
|
+
constructor() {}
|
|
12
|
+
|
|
13
|
+
ngOnInit(): void {}
|
|
14
|
+
}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
<!--begin::Action wrapper-->
|
|
2
|
+
<div class="d-flex align-items-center">
|
|
3
|
+
<!--begin::Label-->
|
|
4
|
+
<span class="fs-7 fw-bold text-gray-700 pe-4 text-nowrap d-none d-md-block">Sort By:</span>
|
|
5
|
+
<!--end::Label-->
|
|
6
|
+
|
|
7
|
+
<!--begin::Select-->
|
|
8
|
+
<select class="form-select form-select-sm form-select-solid w-100px w-xxl-125px" data-control="select2"
|
|
9
|
+
data-placeholder="Latest" data-hide-search="true">
|
|
10
|
+
<option value=""></option>
|
|
11
|
+
<option value="1" selected>Latest</option>
|
|
12
|
+
<option value="2">In Progress</option>
|
|
13
|
+
<option value="3">Done</option>
|
|
14
|
+
</select>
|
|
15
|
+
<!--end::Select-->
|
|
16
|
+
</div>
|
|
17
|
+
<!--end::Action wrapper-->
|
|
18
|
+
|
|
19
|
+
<!--begin::Action wrapper-->
|
|
20
|
+
<div class="d-flex align-items-center">
|
|
21
|
+
<!--begin::Separartor-->
|
|
22
|
+
<div class="bullet bg-secondary h-35px w-1px mx-5"></div>
|
|
23
|
+
<!--end::Separartor-->
|
|
24
|
+
|
|
25
|
+
<!--begin::Label-->
|
|
26
|
+
<span class="fs-7 text-gray-700 fw-bold">Impact Level:</span>
|
|
27
|
+
<!--end::Label-->
|
|
28
|
+
|
|
29
|
+
<!--begin::NoUiSlider-->
|
|
30
|
+
<div class="d-flex align-items-center ps-4">
|
|
31
|
+
<div id="kt_app_toolbar_slider" class="noUi-target noUi-target-success w-75px w-xxl-150px noUi-sm"></div>
|
|
32
|
+
|
|
33
|
+
<span id="kt_app_toolbar_slider_value"
|
|
34
|
+
class="d-flex flex-center bg-light-success rounded-circle w-35px h-35px ms-4 fs-7 fw-bold text-success"
|
|
35
|
+
data-bs-toggle="tooltip" data-bs-placement="top" title="Set impact level">
|
|
36
|
+
</span>
|
|
37
|
+
</div>
|
|
38
|
+
<!--end::NoUiSlider-->
|
|
39
|
+
|
|
40
|
+
<!--begin::Separartor-->
|
|
41
|
+
<div class="bullet bg-secondary h-35px w-1px mx-5"></div>
|
|
42
|
+
<!--end::Separartor-->
|
|
43
|
+
</div>
|
|
44
|
+
<!--end::Action wrapper-->
|
|
45
|
+
|
|
46
|
+
<!--begin::Action wrapper-->
|
|
47
|
+
<div class="d-flex align-items-center">
|
|
48
|
+
<!--begin::Label-->
|
|
49
|
+
<span class="fs-7 text-gray-700 fw-bold pe-3 d-none d-md-block">Quick Tools:</span>
|
|
50
|
+
<!--end::Label-->
|
|
51
|
+
|
|
52
|
+
<!--begin::Actions-->
|
|
53
|
+
<div class="d-flex">
|
|
54
|
+
<!--begin::Action-->
|
|
55
|
+
<a href="#" class="btn btn-sm btn-icon btn-icon-muted btn-active-icon-success" data-bs-toggle="tooltip"
|
|
56
|
+
data-bs-trigger="hover" data-bs-placement="top" title="Add new page">
|
|
57
|
+
<lib-keenicon name="files" class="fs-2x"></lib-keenicon>
|
|
58
|
+
</a>
|
|
59
|
+
<!--end::Action-->
|
|
60
|
+
|
|
61
|
+
<!--begin::Action-->
|
|
62
|
+
<a href="#" class="btn btn-sm btn-icon btn-icon-muted btn-active-icon-success" data-bs-toggle="tooltip"
|
|
63
|
+
data-bs-trigger="hover" data-bs-placement="top" title="Add new category">
|
|
64
|
+
<lib-keenicon name="add-files" class="fs-2x"></lib-keenicon>
|
|
65
|
+
</a>
|
|
66
|
+
<!--end::Action-->
|
|
67
|
+
|
|
68
|
+
<!--begin::Action-->
|
|
69
|
+
<a href="#" class="btn btn-sm btn-icon btn-icon-muted btn-active-icon-success" data-bs-toggle="tooltip"
|
|
70
|
+
data-bs-trigger="hover" data-bs-placement="top" title="Add new section">
|
|
71
|
+
<lib-keenicon name="search-list" class="fs-2x"></lib-keenicon>
|
|
72
|
+
</a>
|
|
73
|
+
<!--end::Action-->
|
|
74
|
+
</div>
|
|
75
|
+
<!--end::Actions-->
|
|
76
|
+
</div>
|
|
77
|
+
<!--end::Action wrapper-->
|
|
File without changes
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
+
|
|
3
|
+
import { SaasComponent } from './saas.component';
|
|
4
|
+
|
|
5
|
+
describe('SaasComponent', () => {
|
|
6
|
+
let component: SaasComponent;
|
|
7
|
+
let fixture: ComponentFixture<SaasComponent>;
|
|
8
|
+
|
|
9
|
+
beforeEach(async () => {
|
|
10
|
+
await TestBed.configureTestingModule({
|
|
11
|
+
declarations: [ SaasComponent ]
|
|
12
|
+
})
|
|
13
|
+
.compileComponents();
|
|
14
|
+
|
|
15
|
+
fixture = TestBed.createComponent(SaasComponent);
|
|
16
|
+
component = fixture.componentInstance;
|
|
17
|
+
fixture.detectChanges();
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
it('should create', () => {
|
|
21
|
+
expect(component).toBeTruthy();
|
|
22
|
+
});
|
|
23
|
+
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Component, Input, OnInit } from '@angular/core';
|
|
2
|
+
|
|
3
|
+
@Component({
|
|
4
|
+
selector: 'lib-saas',
|
|
5
|
+
templateUrl: './saas.component.html',
|
|
6
|
+
styleUrls: ['./saas.component.scss'],
|
|
7
|
+
})
|
|
8
|
+
export class SaasComponent implements OnInit {
|
|
9
|
+
@Input() appPageTitleDisplay: boolean;
|
|
10
|
+
|
|
11
|
+
constructor() {}
|
|
12
|
+
|
|
13
|
+
ngOnInit(): void {}
|
|
14
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<!--begin::Toolbar container-->
|
|
2
|
+
<div id="kt_app_toolbar_container" class="app-container" [ngClass]="appToolbarContainerCSSClass">
|
|
3
|
+
<ng-container *ngIf="showPageTitle()">
|
|
4
|
+
<lib-page-title [appPageTitleDirection]="appPageTitleDirection" [appPageTitleBreadcrumb]="appPageTitleBreadcrumb"
|
|
5
|
+
[appPageTitleDescription]="appPageTitleDescription" class="page-title d-flex flex-wrap me-3"
|
|
6
|
+
[ngClass]="{'flex-column justify-content-center': appPageTitleDirection === 'column', 'align-items-center': appPageTitleDirection !== 'column', appPageTitleCSSClass}">
|
|
7
|
+
</lib-page-title>
|
|
8
|
+
</ng-container>
|
|
9
|
+
|
|
10
|
+
<ng-container *ngIf="appToolbarLayout === 'classic'">
|
|
11
|
+
<lib-classic class="d-flex align-items-center gap-2 gap-lg-3"></lib-classic>
|
|
12
|
+
</ng-container>
|
|
13
|
+
<ng-container *ngIf="appToolbarLayout === 'accounting'">
|
|
14
|
+
<lib-accounting class="d-flex align-items-center me-5"></lib-accounting>
|
|
15
|
+
</ng-container>
|
|
16
|
+
<ng-container *ngIf="appToolbarLayout === 'extended'">
|
|
17
|
+
<lib-extended class="d-flex align-items-center flex-shrink-0 me-5"></lib-extended>
|
|
18
|
+
</ng-container>
|
|
19
|
+
<ng-container *ngIf="appToolbarLayout === 'reports'">
|
|
20
|
+
<lib-reports class="d-flex align-items-center overflow-auto" [appPageTitleDisplay]="appPageTitleDisplay">
|
|
21
|
+
</lib-reports>
|
|
22
|
+
</ng-container>
|
|
23
|
+
<ng-container *ngIf="appToolbarLayout === 'saas'">
|
|
24
|
+
<lib-saas class="d-flex align-items-center gap-2" [appPageTitleDisplay]="appPageTitleDisplay"></lib-saas>
|
|
25
|
+
</ng-container>
|
|
26
|
+
</div>
|
|
27
|
+
<!--end::Toolbar container-->
|
|
File without changes
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
+
|
|
3
|
+
import { ToolbarComponent } from './toolbar.component';
|
|
4
|
+
|
|
5
|
+
describe('ToolbarComponent', () => {
|
|
6
|
+
let component: ToolbarComponent;
|
|
7
|
+
let fixture: ComponentFixture<ToolbarComponent>;
|
|
8
|
+
|
|
9
|
+
beforeEach(async () => {
|
|
10
|
+
await TestBed.configureTestingModule({
|
|
11
|
+
declarations: [ ToolbarComponent ]
|
|
12
|
+
})
|
|
13
|
+
.compileComponents();
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
beforeEach(() => {
|
|
17
|
+
fixture = TestBed.createComponent(ToolbarComponent);
|
|
18
|
+
component = fixture.componentInstance;
|
|
19
|
+
fixture.detectChanges();
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
it('should create', () => {
|
|
23
|
+
expect(component).toBeTruthy();
|
|
24
|
+
});
|
|
25
|
+
});
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { Component, Input, OnDestroy, OnInit } from '@angular/core';
|
|
2
|
+
import { Subscription } from 'rxjs';
|
|
3
|
+
import { LayoutService } from 'tango-app-metronics';
|
|
4
|
+
import { ILayout, LayoutType } from 'tango-app-metronics';
|
|
5
|
+
|
|
6
|
+
@Component({
|
|
7
|
+
selector: 'lib-toolbar',
|
|
8
|
+
templateUrl: './toolbar.component.html',
|
|
9
|
+
styleUrls: ['./toolbar.component.scss'],
|
|
10
|
+
})
|
|
11
|
+
export class ToolbarComponent implements OnInit, OnDestroy {
|
|
12
|
+
private unsubscribe: Subscription[] = [];
|
|
13
|
+
|
|
14
|
+
// Public props
|
|
15
|
+
@Input() currentLayoutType: LayoutType | null;
|
|
16
|
+
@Input() appToolbarLayout:
|
|
17
|
+
| 'classic'
|
|
18
|
+
| 'accounting'
|
|
19
|
+
| 'extended'
|
|
20
|
+
| 'reports'
|
|
21
|
+
| 'saas';
|
|
22
|
+
|
|
23
|
+
// toolbar
|
|
24
|
+
appToolbarDisplay: boolean;
|
|
25
|
+
appToolbarContainer: 'fixed' | 'fluid';
|
|
26
|
+
appToolbarContainerCSSClass: string = '';
|
|
27
|
+
appToolbarFixedDesktop: boolean;
|
|
28
|
+
appToolbarFixedMobile: boolean;
|
|
29
|
+
appPageTitleDisplay: boolean;
|
|
30
|
+
|
|
31
|
+
// page title
|
|
32
|
+
appPageTitleDirection: string = '';
|
|
33
|
+
appPageTitleCSSClass: string = '';
|
|
34
|
+
appPageTitleBreadcrumb: boolean;
|
|
35
|
+
appPageTitleDescription: boolean;
|
|
36
|
+
|
|
37
|
+
constructor(private layout: LayoutService) {}
|
|
38
|
+
|
|
39
|
+
ngOnInit(): void {
|
|
40
|
+
const subscr = this.layout.layoutConfigSubject
|
|
41
|
+
.asObservable()
|
|
42
|
+
.subscribe((config: ILayout) => {
|
|
43
|
+
this.updateProps(config);
|
|
44
|
+
});
|
|
45
|
+
this.unsubscribe.push(subscr);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
updateProps(config: ILayout) {
|
|
49
|
+
this.appToolbarDisplay = this.layout.getProp(
|
|
50
|
+
'app.toolbar.display',
|
|
51
|
+
config
|
|
52
|
+
) as boolean;
|
|
53
|
+
if (!this.appToolbarDisplay) {
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
this.appPageTitleDisplay = this.layout.getProp(
|
|
58
|
+
'app.pageTitle.display',
|
|
59
|
+
config
|
|
60
|
+
) as boolean;
|
|
61
|
+
this.appToolbarContainer = this.layout.getProp(
|
|
62
|
+
'app.toolbar.container',
|
|
63
|
+
config
|
|
64
|
+
) as 'fluid' | 'fixed';
|
|
65
|
+
this.appToolbarContainerCSSClass =
|
|
66
|
+
this.appToolbarContainer === 'fixed'
|
|
67
|
+
? 'container-xxl'
|
|
68
|
+
: 'container-fluid';
|
|
69
|
+
const containerClass = this.layout.getProp(
|
|
70
|
+
'app.toolbar.containerClass',
|
|
71
|
+
config
|
|
72
|
+
) as string;
|
|
73
|
+
if (containerClass) {
|
|
74
|
+
this.appToolbarContainerCSSClass += ` ${containerClass}`;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
this.appToolbarFixedDesktop = this.layout.getProp(
|
|
78
|
+
'app.toolbar.fixed.desktop',
|
|
79
|
+
config
|
|
80
|
+
) as boolean;
|
|
81
|
+
if (this.appToolbarFixedDesktop) {
|
|
82
|
+
document.body.setAttribute('data-kt-app-toolbar-fixed', 'true');
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
this.appToolbarFixedMobile = this.layout.getProp(
|
|
86
|
+
'app.toolbar.fixed.mobile',
|
|
87
|
+
config
|
|
88
|
+
) as boolean;
|
|
89
|
+
if (this.appToolbarFixedMobile) {
|
|
90
|
+
document.body.setAttribute('data-kt-app-toolbar-fixed-mobile', 'true');
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
// toolbar
|
|
94
|
+
this.appPageTitleDirection = this.layout.getProp(
|
|
95
|
+
'app.pageTitle.direction',
|
|
96
|
+
config
|
|
97
|
+
) as string;
|
|
98
|
+
this.appPageTitleCSSClass = this.layout.getProp(
|
|
99
|
+
'app.pageTitle.class',
|
|
100
|
+
config
|
|
101
|
+
) as string;
|
|
102
|
+
this.appPageTitleBreadcrumb = this.layout.getProp(
|
|
103
|
+
'app.pageTitle.breadCrumb',
|
|
104
|
+
config
|
|
105
|
+
) as boolean;
|
|
106
|
+
this.appPageTitleDescription = this.layout.getProp(
|
|
107
|
+
'app.pageTitle.description',
|
|
108
|
+
config
|
|
109
|
+
) as boolean;
|
|
110
|
+
|
|
111
|
+
document.body.setAttribute('data-kt-app-toolbar-enabled', 'true');
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
ngOnDestroy() {
|
|
115
|
+
this.unsubscribe.forEach((sb) => sb.unsubscribe());
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
showPageTitle() {
|
|
119
|
+
const viewsWithPageTitles = ['classic', 'reports', 'saas'];
|
|
120
|
+
return (
|
|
121
|
+
this.appPageTitleDisplay &&
|
|
122
|
+
viewsWithPageTitles.some((t) => t === this.appToolbarLayout)
|
|
123
|
+
);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { Routes } from '@angular/router';
|
|
2
|
+
|
|
3
|
+
const Routing: Routes = [
|
|
4
|
+
{
|
|
5
|
+
path: 'manage',
|
|
6
|
+
loadChildren: () => import('./route-wraper-modules/manage-wrapper.module').then((m) => m.ManageWrapperModule),
|
|
7
|
+
},
|
|
8
|
+
{
|
|
9
|
+
path: 'manage/stores/:id',
|
|
10
|
+
loadChildren: () => import('./route-wraper-modules/store-wrapper.module').then((m) => m.StoreWrapperModule),
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
path: 'profile',
|
|
14
|
+
loadChildren: () => import('./route-wraper-modules/profile-wrapper.module').then((m) => m.ProfileWrapperModule),
|
|
15
|
+
},
|
|
16
|
+
// {
|
|
17
|
+
// path: 'dashboard',
|
|
18
|
+
// loadChildren: () => import('./route-wraper-modules/dashboard-wrapper.module').then((m) => m.DashboardWrapperModule),
|
|
19
|
+
// },
|
|
20
|
+
// {
|
|
21
|
+
// path: 'builder',
|
|
22
|
+
// loadChildren: () => import('./builder/builder.module').then((m) => m.BuilderModule),
|
|
23
|
+
// },
|
|
24
|
+
// {
|
|
25
|
+
// path: 'crafted/pages/profile',
|
|
26
|
+
// loadChildren: () => import('../modules/profile/profile.module').then((m) => m.ProfileModule),
|
|
27
|
+
// data: { layout: 'light-sidebar' },
|
|
28
|
+
// },
|
|
29
|
+
// {
|
|
30
|
+
// path: 'crafted/account',
|
|
31
|
+
// loadChildren: () => import('./route-wraper-modules/account-wrapper.module').then((m) => m.AccountWrapperModule),
|
|
32
|
+
// // data: { layout: 'dark-header' },
|
|
33
|
+
// },
|
|
34
|
+
// {
|
|
35
|
+
// path: 'crafted/pages/wizards',
|
|
36
|
+
// loadChildren: () => import('../modules/wizards/wizards.module').then((m) => m.WizardsModule),
|
|
37
|
+
// data: { layout: 'light-header' },
|
|
38
|
+
// },
|
|
39
|
+
// {
|
|
40
|
+
// path: 'crafted/widgets',
|
|
41
|
+
// loadChildren: () => import('../modules/widgets-examples/widgets-examples.module').then((m) => m.WidgetsExamplesModule),
|
|
42
|
+
// data: { layout: 'light-header' },
|
|
43
|
+
// },
|
|
44
|
+
// {
|
|
45
|
+
// path: 'apps/chat',
|
|
46
|
+
// loadChildren: () => import('../modules/apps/chat/chat.module').then((m) => m.ChatModule),
|
|
47
|
+
// data: { layout: 'light-sidebar' },
|
|
48
|
+
// },
|
|
49
|
+
// {
|
|
50
|
+
// path: 'apps/users',
|
|
51
|
+
// loadChildren: () => import('./user/user.module').then((m) => m.UserModule),
|
|
52
|
+
// },
|
|
53
|
+
// {
|
|
54
|
+
// path: 'apps/roles',
|
|
55
|
+
// loadChildren: () => import('./role/role.module').then((m) => m.RoleModule),
|
|
56
|
+
// },
|
|
57
|
+
// {
|
|
58
|
+
// path: 'apps/permissions',
|
|
59
|
+
// loadChildren: () => import('./permission/permission.module').then((m) => m.PermissionModule),
|
|
60
|
+
// },
|
|
61
|
+
// {
|
|
62
|
+
// path: '',
|
|
63
|
+
// redirectTo: '/dashboard',
|
|
64
|
+
// pathMatch: 'full',
|
|
65
|
+
// },
|
|
66
|
+
// {
|
|
67
|
+
// path: '**',
|
|
68
|
+
// redirectTo: 'error/404',
|
|
69
|
+
// },
|
|
70
|
+
];
|
|
71
|
+
|
|
72
|
+
export { Routing };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Injectable } from '@angular/core';
|
|
2
|
+
import { Router } from '@angular/router';
|
|
3
|
+
|
|
4
|
+
@Injectable({
|
|
5
|
+
providedIn: 'root'
|
|
6
|
+
})
|
|
7
|
+
export class AuthService {
|
|
8
|
+
|
|
9
|
+
constructor(private router:Router) { }
|
|
10
|
+
|
|
11
|
+
logout() {
|
|
12
|
+
this.router.navigate(['/auth/login'], {
|
|
13
|
+
queryParams: {},
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Injectable } from '@angular/core';
|
|
2
|
+
import { BehaviorSubject } from 'rxjs';
|
|
3
|
+
import { sampleType } from '../interfaces/global-state';
|
|
4
|
+
|
|
5
|
+
@Injectable({
|
|
6
|
+
providedIn: 'root'
|
|
7
|
+
})
|
|
8
|
+
export class GlobalStateService {
|
|
9
|
+
userData = new BehaviorSubject<sampleType | null>(null)
|
|
10
|
+
environment = new BehaviorSubject<any>(null)
|
|
11
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Public API Surface of tango-app-shared
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
// Components
|
|
6
|
+
export * from './lib/modules/layout/layout/layout.component';
|
|
7
|
+
export * from './lib/modules/layout/content/content.component';
|
|
8
|
+
export * from './lib/modules/layout/footer/footer.component';
|
|
9
|
+
export * from './lib/modules/layout/header/header.component';
|
|
10
|
+
export * from './lib/modules/layout/header/header-menu/header-menu.component';
|
|
11
|
+
export * from './lib/modules/layout/header/navbar/navbar.component';
|
|
12
|
+
export * from './lib/modules/layout/header/page-title/page-title.component';
|
|
13
|
+
export * from './lib/modules/layout/scripts-init/scripts-init.component';
|
|
14
|
+
export * from './lib/modules/layout/sidebar/sidebar-footer/sidebar-footer.component';
|
|
15
|
+
export * from './lib/modules/layout/sidebar/sidebar-logo/sidebar-logo.component';
|
|
16
|
+
export * from './lib/modules/layout/sidebar/sidebar-menu/sidebar-menu.component';
|
|
17
|
+
export * from './lib/modules/layout/sidebar/sidebar.component';
|
|
18
|
+
export * from './lib/modules/layout/toolbar/accounting/accounting.component';
|
|
19
|
+
export * from './lib/modules/layout/toolbar/classic/classic.component';
|
|
20
|
+
export * from './lib/modules/layout/toolbar/extended/extended.component';
|
|
21
|
+
export * from './lib/modules/layout/toolbar/reports/reports.component';
|
|
22
|
+
export * from './lib/modules/layout/toolbar/saas/saas.component';
|
|
23
|
+
export * from './lib/modules/layout/toolbar/toolbar.component';
|
|
24
|
+
export * from './lib/modules/layout/scroll-top/scroll-top.component';
|
|
25
|
+
|
|
26
|
+
export * from './lib/modules/errors/errors.component';
|
|
27
|
+
export * from './lib/modules/errors/error404/error404.component';
|
|
28
|
+
export * from './lib/modules/errors/error500/error500.component';
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
// i18n
|
|
32
|
+
export * from './lib/i18n/translation.module';
|
|
33
|
+
export * from './lib/i18n/translation.service';
|
|
34
|
+
export * as enLang from './lib/i18n/vocabs/en';
|
|
35
|
+
export * as chLang from './lib/i18n/vocabs/ch';
|
|
36
|
+
export * as deLang from './lib/i18n/vocabs/de';
|
|
37
|
+
export * as esLang from './lib/i18n/vocabs/es';
|
|
38
|
+
export * as frLang from './lib/i18n/vocabs/fr';
|
|
39
|
+
export * as jpLang from './lib/i18n/vocabs/jp';
|
|
40
|
+
|
|
41
|
+
// modules
|
|
42
|
+
export * from './lib/modules/layout/layout.module';
|
|
43
|
+
export * from './lib/modules/errors/errors.module';
|
|
44
|
+
|
|
45
|
+
// guards
|
|
46
|
+
export * from './lib/guards/auth.guard';
|
|
47
|
+
|
|
48
|
+
// interfaces
|
|
49
|
+
export * from './lib/interfaces/global-state';
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
// services
|
|
53
|
+
export * from './lib/services/global-state.service';
|
|
54
|
+
export * from './lib/services/auth.service';
|
|
55
|
+
|
|
56
|
+
// interceptors
|
|
57
|
+
export * from './lib/interceptors/http-auth-interceptor';
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/* To learn more about this file see: https://angular.io/config/tsconfig. */
|
|
2
|
+
{
|
|
3
|
+
"extends": "../../tsconfig.json",
|
|
4
|
+
"compilerOptions": {
|
|
5
|
+
"outDir": "../../out-tsc/lib",
|
|
6
|
+
"declaration": true,
|
|
7
|
+
"declarationMap": true,
|
|
8
|
+
"inlineSources": true,
|
|
9
|
+
"types": []
|
|
10
|
+
},
|
|
11
|
+
"exclude": [
|
|
12
|
+
"**/*.spec.ts"
|
|
13
|
+
]
|
|
14
|
+
}
|