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,93 @@
|
|
|
1
|
+
import { NgModule } from '@angular/core';
|
|
2
|
+
import { CommonModule } from '@angular/common';
|
|
3
|
+
import { InlineSVGModule } from 'ng-inline-svg-2';
|
|
4
|
+
import { RouterModule, Routes } from '@angular/router';
|
|
5
|
+
import {
|
|
6
|
+
NgbDropdownModule,
|
|
7
|
+
NgbProgressbarModule,
|
|
8
|
+
NgbTooltipModule,
|
|
9
|
+
} from '@ng-bootstrap/ng-bootstrap';
|
|
10
|
+
import { TranslateModule } from '@ngx-translate/core';
|
|
11
|
+
// import { ExtrasModule } from '../partials/layout/extras/extras.module';
|
|
12
|
+
// import {
|
|
13
|
+
// DrawersModule,
|
|
14
|
+
// DropdownMenusModule,
|
|
15
|
+
// ModalsModule,
|
|
16
|
+
// EngagesModule,
|
|
17
|
+
// } from '../partials';
|
|
18
|
+
// import { EngagesComponent } from '../partials/layout/engages/engages.component';
|
|
19
|
+
// import { ThemeModeModule } from '../partials/layout/theme-mode-switcher/theme-mode.module';
|
|
20
|
+
import { KeeniconComponent } from './keenicon/keenicon.component';
|
|
21
|
+
import { TranslationModule } from '../../i18n';
|
|
22
|
+
import { LayoutComponent } from './layout/layout.component';
|
|
23
|
+
import { HeaderComponent } from './header/header.component';
|
|
24
|
+
import { ContentComponent } from './content/content.component';
|
|
25
|
+
import { FooterComponent } from './footer/footer.component';
|
|
26
|
+
import { ScriptsInitComponent } from './scripts-init/scripts-init.component';
|
|
27
|
+
import { ToolbarComponent } from './toolbar/toolbar.component';
|
|
28
|
+
import { PageTitleComponent } from './header/page-title/page-title.component';
|
|
29
|
+
import { HeaderMenuComponent } from './header/header-menu/header-menu.component';
|
|
30
|
+
import { SidebarComponent } from './sidebar/sidebar.component';
|
|
31
|
+
import { SidebarLogoComponent } from './sidebar/sidebar-logo/sidebar-logo.component';
|
|
32
|
+
import { SidebarMenuComponent } from './sidebar/sidebar-menu/sidebar-menu.component';
|
|
33
|
+
import { SidebarFooterComponent } from './sidebar/sidebar-footer/sidebar-footer.component';
|
|
34
|
+
import { NavbarComponent } from './header/navbar/navbar.component';
|
|
35
|
+
import { AccountingComponent } from './toolbar/accounting/accounting.component';
|
|
36
|
+
import { ClassicComponent } from './toolbar/classic/classic.component';
|
|
37
|
+
import { ExtendedComponent } from './toolbar/extended/extended.component';
|
|
38
|
+
import { ReportsComponent } from './toolbar/reports/reports.component';
|
|
39
|
+
import { SaasComponent } from './toolbar/saas/saas.component';
|
|
40
|
+
import { Routing } from '../../routes/routing';
|
|
41
|
+
import { LayoutScrollTopComponent } from './scroll-top/scroll-top.component';
|
|
42
|
+
|
|
43
|
+
const routes: Routes = [
|
|
44
|
+
{
|
|
45
|
+
path: '',
|
|
46
|
+
component: LayoutComponent,
|
|
47
|
+
children: Routing,
|
|
48
|
+
},
|
|
49
|
+
];
|
|
50
|
+
|
|
51
|
+
@NgModule({
|
|
52
|
+
declarations: [
|
|
53
|
+
LayoutComponent,
|
|
54
|
+
HeaderComponent,
|
|
55
|
+
ContentComponent,
|
|
56
|
+
FooterComponent,
|
|
57
|
+
ScriptsInitComponent,
|
|
58
|
+
ToolbarComponent,
|
|
59
|
+
PageTitleComponent,
|
|
60
|
+
HeaderMenuComponent,
|
|
61
|
+
// EngagesComponent,
|
|
62
|
+
SidebarComponent,
|
|
63
|
+
SidebarLogoComponent,
|
|
64
|
+
SidebarMenuComponent,
|
|
65
|
+
SidebarFooterComponent,
|
|
66
|
+
NavbarComponent,
|
|
67
|
+
AccountingComponent,
|
|
68
|
+
ClassicComponent,
|
|
69
|
+
ExtendedComponent,
|
|
70
|
+
ReportsComponent,
|
|
71
|
+
SaasComponent,
|
|
72
|
+
KeeniconComponent,
|
|
73
|
+
LayoutScrollTopComponent
|
|
74
|
+
],
|
|
75
|
+
imports: [
|
|
76
|
+
CommonModule,
|
|
77
|
+
RouterModule.forChild(routes),
|
|
78
|
+
TranslationModule,
|
|
79
|
+
InlineSVGModule,
|
|
80
|
+
NgbDropdownModule,
|
|
81
|
+
NgbProgressbarModule,
|
|
82
|
+
// ExtrasModule,
|
|
83
|
+
// ModalsModule,
|
|
84
|
+
// DrawersModule,
|
|
85
|
+
// EngagesModule,
|
|
86
|
+
// DropdownMenusModule,
|
|
87
|
+
NgbTooltipModule,
|
|
88
|
+
TranslateModule,
|
|
89
|
+
// ThemeModeModule,
|
|
90
|
+
],
|
|
91
|
+
exports: [RouterModule],
|
|
92
|
+
})
|
|
93
|
+
export class LayoutModule {}
|
|
File without changes
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { Component, OnDestroy, OnInit } from '@angular/core';
|
|
2
|
+
import { ResolveEnd, Router } from '@angular/router';
|
|
3
|
+
import { filter } from 'rxjs/operators';
|
|
4
|
+
import { Observable, Subscription } from 'rxjs';
|
|
5
|
+
import {
|
|
6
|
+
ToggleComponent,
|
|
7
|
+
ScrollTopComponent,
|
|
8
|
+
DrawerComponent,
|
|
9
|
+
StickyComponent,
|
|
10
|
+
MenuComponent,
|
|
11
|
+
ScrollComponent,
|
|
12
|
+
} from 'tango-app-metronics';
|
|
13
|
+
import { Title } from '@angular/platform-browser';
|
|
14
|
+
import { LayoutService, PageInfoService } from 'tango-app-metronics';
|
|
15
|
+
|
|
16
|
+
@Component({
|
|
17
|
+
selector: 'lib-scripts-init',
|
|
18
|
+
templateUrl: './scripts-init.component.html',
|
|
19
|
+
})
|
|
20
|
+
export class ScriptsInitComponent implements OnInit, OnDestroy {
|
|
21
|
+
private unsubscribe: Subscription[] = [];
|
|
22
|
+
constructor(
|
|
23
|
+
private layout: LayoutService,
|
|
24
|
+
private pageInfo: PageInfoService,
|
|
25
|
+
private router: Router,
|
|
26
|
+
private titleService: Title,
|
|
27
|
+
) {
|
|
28
|
+
const initPageInfo = () => {
|
|
29
|
+
setTimeout(() => {
|
|
30
|
+
// this.pageInfo.calculateTitle();
|
|
31
|
+
// this.pageInfo.calculateBreadcrumbs();
|
|
32
|
+
|
|
33
|
+
this.pageInfo.title.asObservable().subscribe((title) => {
|
|
34
|
+
this.titleService.setTitle(title + ' - Metronic');
|
|
35
|
+
});
|
|
36
|
+
}, 10);
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
initPageInfo();
|
|
40
|
+
// subscribe to router events
|
|
41
|
+
this.router.events
|
|
42
|
+
.pipe(filter((event) => event instanceof ResolveEnd))
|
|
43
|
+
.subscribe(initPageInfo);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
ngOnInit(): void {
|
|
47
|
+
this.pluginsInitialization();
|
|
48
|
+
const layoutUpdateSubscription = this.layout.layoutConfigSubject
|
|
49
|
+
.asObservable()
|
|
50
|
+
.subscribe(() => {
|
|
51
|
+
this.pluginsReInitialization();
|
|
52
|
+
});
|
|
53
|
+
this.unsubscribe.push(layoutUpdateSubscription);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
pluginsInitialization() {
|
|
57
|
+
setTimeout(() => {
|
|
58
|
+
ToggleComponent.bootstrap();
|
|
59
|
+
ScrollTopComponent.bootstrap();
|
|
60
|
+
DrawerComponent.bootstrap();
|
|
61
|
+
StickyComponent.bootstrap();
|
|
62
|
+
MenuComponent.bootstrap();
|
|
63
|
+
ScrollComponent.bootstrap();
|
|
64
|
+
}, 200);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
pluginsReInitialization() {
|
|
68
|
+
setTimeout(() => {
|
|
69
|
+
ToggleComponent.reinitialization();
|
|
70
|
+
ScrollTopComponent.reinitialization();
|
|
71
|
+
DrawerComponent.reinitialization();
|
|
72
|
+
StickyComponent.bootstrap();
|
|
73
|
+
MenuComponent.reinitialization();
|
|
74
|
+
ScrollComponent.reinitialization();
|
|
75
|
+
}, 100);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
ngOnDestroy() {
|
|
79
|
+
this.unsubscribe.forEach((sb) => sb.unsubscribe());
|
|
80
|
+
}
|
|
81
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<lib-keenicon name="arrow-up" class=""></lib-keenicon>
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { Component, OnInit, OnDestroy, HostBinding } from '@angular/core';
|
|
2
|
+
import { NavigationCancel, NavigationEnd, Router } from '@angular/router';
|
|
3
|
+
import { Subscription } from 'rxjs';
|
|
4
|
+
import {
|
|
5
|
+
StickyComponent,
|
|
6
|
+
ScrollTopComponent,
|
|
7
|
+
MenuComponent,
|
|
8
|
+
ToggleComponent,
|
|
9
|
+
DrawerComponent,
|
|
10
|
+
} from 'tango-app-metronics';
|
|
11
|
+
|
|
12
|
+
@Component({
|
|
13
|
+
selector: 'lib-scroll-top',
|
|
14
|
+
templateUrl: './scroll-top.component.html',
|
|
15
|
+
})
|
|
16
|
+
export class LayoutScrollTopComponent implements OnInit, OnDestroy {
|
|
17
|
+
@HostBinding('class') class = 'kt_scrolltop';
|
|
18
|
+
@HostBinding('id') id = 'scrolltop';
|
|
19
|
+
@HostBinding('attr.data-kt-scrolltop') dataKtScrolltop = 'true';
|
|
20
|
+
|
|
21
|
+
private unsubscribe: Subscription[] = [];
|
|
22
|
+
constructor(private router: Router) {}
|
|
23
|
+
|
|
24
|
+
ngOnInit(): void {
|
|
25
|
+
this.routingChanges();
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
routingChanges() {
|
|
29
|
+
const routerSubscription = this.router.events.subscribe((event) => {
|
|
30
|
+
if (event instanceof NavigationEnd || event instanceof NavigationCancel) {
|
|
31
|
+
this.pluginsReinitialization();
|
|
32
|
+
this.updateHeaderSticky();
|
|
33
|
+
setTimeout(() => {
|
|
34
|
+
this.scrollTop();
|
|
35
|
+
}, 0);
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
this.unsubscribe.push(routerSubscription);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
updateHeaderSticky() {
|
|
42
|
+
const stickyHeader = document.body.querySelectorAll(
|
|
43
|
+
`[data-kt-sticky-name="header"]`
|
|
44
|
+
);
|
|
45
|
+
if (stickyHeader && stickyHeader.length > 0) {
|
|
46
|
+
const sticky = StickyComponent.getInstance(
|
|
47
|
+
stickyHeader[0] as HTMLElement
|
|
48
|
+
);
|
|
49
|
+
if (sticky) {
|
|
50
|
+
sticky.update();
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
scrollTop() {
|
|
56
|
+
ScrollTopComponent.goTop();
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
pluginsReinitialization() {
|
|
60
|
+
setTimeout(() => {
|
|
61
|
+
// ScrollTopComponent.reinitialization()
|
|
62
|
+
MenuComponent.reinitialization();
|
|
63
|
+
StickyComponent.reInitialization();
|
|
64
|
+
setTimeout(() => {
|
|
65
|
+
ToggleComponent.reinitialization();
|
|
66
|
+
DrawerComponent.reinitialization();
|
|
67
|
+
// ScrollComponent.reinitialization()
|
|
68
|
+
}, 70);
|
|
69
|
+
}, 140);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
ngOnDestroy() {
|
|
73
|
+
this.unsubscribe.forEach((sb) => sb.unsubscribe());
|
|
74
|
+
}
|
|
75
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<a target="_blank"
|
|
2
|
+
class="btn btn-flex flex-center btn-custom btn-primary overflow-hidden text-nowrap px-0 h-40px w-100"
|
|
3
|
+
data-bs-toggle="tooltip" data-bs-trigger="hover" data-bs-dismiss-="click" title="Metronic Docs & Components">
|
|
4
|
+
|
|
5
|
+
<span class="btn-label">
|
|
6
|
+
Docs & Components
|
|
7
|
+
</span>
|
|
8
|
+
<lib-keenicon name="document" class="fs-2 m-0"></lib-keenicon>
|
|
9
|
+
</a>
|
|
File without changes
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
+
|
|
3
|
+
import { SidebarFooterComponent } from './sidebar-footer.component';
|
|
4
|
+
|
|
5
|
+
describe('SidebarFooterComponent', () => {
|
|
6
|
+
let component: SidebarFooterComponent;
|
|
7
|
+
let fixture: ComponentFixture<SidebarFooterComponent>;
|
|
8
|
+
|
|
9
|
+
beforeEach(async () => {
|
|
10
|
+
await TestBed.configureTestingModule({
|
|
11
|
+
declarations: [ SidebarFooterComponent ]
|
|
12
|
+
})
|
|
13
|
+
.compileComponents();
|
|
14
|
+
|
|
15
|
+
fixture = TestBed.createComponent(SidebarFooterComponent);
|
|
16
|
+
component = fixture.componentInstance;
|
|
17
|
+
fixture.detectChanges();
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
it('should create', () => {
|
|
21
|
+
expect(component).toBeTruthy();
|
|
22
|
+
});
|
|
23
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Component, OnInit } from '@angular/core';
|
|
2
|
+
|
|
3
|
+
@Component({
|
|
4
|
+
selector: 'lib-sidebar-footer',
|
|
5
|
+
templateUrl: './sidebar-footer.component.html',
|
|
6
|
+
styleUrls: ['./sidebar-footer.component.scss'],
|
|
7
|
+
})
|
|
8
|
+
export class SidebarFooterComponent implements OnInit {
|
|
9
|
+
|
|
10
|
+
constructor() {}
|
|
11
|
+
|
|
12
|
+
ngOnInit(): void {}
|
|
13
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<!--begin::Logo image-->
|
|
2
|
+
<a routerLink="/dashboard">
|
|
3
|
+
<ng-container *ngIf="currentLayoutType === 'dark-sidebar'">
|
|
4
|
+
<img alt="Logo" src="./assets/tango/sidemenu-icons/tango_logo_text.svg" class="h-40px app-sidebar-logo-default" />
|
|
5
|
+
</ng-container>
|
|
6
|
+
<ng-container *ngIf="currentLayoutType !== 'dark-sidebar'">
|
|
7
|
+
<img alt="Logo" src="./assets/tango/sidemenu-icons/tango_logo_text.svg" class="h-40px app-sidebar-logo-default theme-light-show" />
|
|
8
|
+
<img alt="Logo" src="./assets/tango/sidemenu-icons/tango_logo_text.svg"
|
|
9
|
+
class="h-40px app-sidebar-logo-default theme-dark-show" />
|
|
10
|
+
</ng-container>
|
|
11
|
+
|
|
12
|
+
<img alt="Logo" src="./assets/tango/sidemenu-icons/tango_logo.svg" class="h-38px app-sidebar-logo-minimize" />
|
|
13
|
+
</a>
|
|
14
|
+
<!--end::Logo image-->
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
<ng-container *ngIf="toggleEnabled">
|
|
18
|
+
<!--begin::Sidebar toggle-->
|
|
19
|
+
<div id="kt_app_sidebar_toggle"
|
|
20
|
+
class="app-sidebar-toggle btn btn-icon btn-shadow btn-sm btn-color-muted btn-active-color-primary body-bg h-30px w-30px position-absolute top-50 start-100 translate-middle rotate d-none"
|
|
21
|
+
[ngClass]="toggleButtonClass" data-kt-toggle="true" [attr.data-kt-toggle-state]="toggleState"
|
|
22
|
+
data-kt-toggle-target="body" [attr.data-kt-toggle-name]="toggleAttr">
|
|
23
|
+
<lib-keenicon name="double-left" class="fs-2 rotate-180"></lib-keenicon>
|
|
24
|
+
</div>
|
|
25
|
+
<!--end::Sidebar toggle-->
|
|
26
|
+
</ng-container>
|
|
File without changes
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
+
|
|
3
|
+
import { SidebarLogoComponent } from './sidebar-logo.component';
|
|
4
|
+
|
|
5
|
+
describe('SidebarLogoComponent', () => {
|
|
6
|
+
let component: SidebarLogoComponent;
|
|
7
|
+
let fixture: ComponentFixture<SidebarLogoComponent>;
|
|
8
|
+
|
|
9
|
+
beforeEach(async () => {
|
|
10
|
+
await TestBed.configureTestingModule({
|
|
11
|
+
declarations: [ SidebarLogoComponent ]
|
|
12
|
+
})
|
|
13
|
+
.compileComponents();
|
|
14
|
+
|
|
15
|
+
fixture = TestBed.createComponent(SidebarLogoComponent);
|
|
16
|
+
component = fixture.componentInstance;
|
|
17
|
+
fixture.detectChanges();
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
it('should create', () => {
|
|
21
|
+
expect(component).toBeTruthy();
|
|
22
|
+
});
|
|
23
|
+
});
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { Component, Input, OnDestroy, OnInit } from '@angular/core';
|
|
2
|
+
import { Subscription } from 'rxjs';
|
|
3
|
+
import { LayoutService } from 'tango-app-metronics';
|
|
4
|
+
import { LayoutType } from 'tango-app-metronics';
|
|
5
|
+
|
|
6
|
+
@Component({
|
|
7
|
+
selector: 'lib-sidebar-logo',
|
|
8
|
+
templateUrl: './sidebar-logo.component.html',
|
|
9
|
+
styleUrls: ['./sidebar-logo.component.scss'],
|
|
10
|
+
})
|
|
11
|
+
export class SidebarLogoComponent implements OnInit, OnDestroy {
|
|
12
|
+
private unsubscribe: Subscription[] = [];
|
|
13
|
+
@Input() toggleButtonClass: string = '';
|
|
14
|
+
@Input() toggleEnabled: boolean;
|
|
15
|
+
@Input() toggleType: string = '';
|
|
16
|
+
@Input() toggleState: string = '';
|
|
17
|
+
currentLayoutType: LayoutType | null;
|
|
18
|
+
|
|
19
|
+
toggleAttr: string;
|
|
20
|
+
|
|
21
|
+
constructor(private layout: LayoutService) {}
|
|
22
|
+
|
|
23
|
+
ngOnInit(): void {
|
|
24
|
+
this.toggleAttr = `app-sidebar-${this.toggleType}`;
|
|
25
|
+
const layoutSubscr = this.layout.currentLayoutTypeSubject
|
|
26
|
+
.asObservable()
|
|
27
|
+
.subscribe((layout) => {
|
|
28
|
+
this.currentLayoutType = layout;
|
|
29
|
+
});
|
|
30
|
+
this.unsubscribe.push(layoutSubscr);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
ngOnDestroy() {
|
|
34
|
+
this.unsubscribe.forEach((sb) => sb.unsubscribe());
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -0,0 +1,276 @@
|
|
|
1
|
+
<!--begin::Menu wrapper-->
|
|
2
|
+
<div id="kt_app_sidebar_menu_scroll" class="scroll-y my-5 mx-3" data-kt-scroll="true" data-kt-scroll-activate="true"
|
|
3
|
+
data-kt-scroll-height="auto" data-kt-scroll-dependencies="#kt_app_sidebar_logo, #kt_app_sidebar_footer"
|
|
4
|
+
data-kt-scroll-wrappers="#kt_app_sidebar_menu" data-kt-scroll-offset="5px" data-kt-scroll-save-state="true">
|
|
5
|
+
<!--begin::Menu-->
|
|
6
|
+
<div class="menu menu-column menu-rounded menu-sub-indention fw-semibold fs-6" id="#kt_app_sidebar_menu"
|
|
7
|
+
data-kt-menu="true" data-kt-menu-expand="false">
|
|
8
|
+
<!-- Birds Eye -->
|
|
9
|
+
<div class="menu-item">
|
|
10
|
+
<a class="menu-link without-sub" routerLinkActive="active">
|
|
11
|
+
<span class="menu-icon">
|
|
12
|
+
<img class="fs-2" src="./assets/tango/sidemenu-icons/birds_eye.svg" alt="">
|
|
13
|
+
</span>
|
|
14
|
+
<span class="menu-title">Birds Eye</span>
|
|
15
|
+
</a>
|
|
16
|
+
</div>
|
|
17
|
+
|
|
18
|
+
<!-- Tango Traffic -->
|
|
19
|
+
<div class="menu-item">
|
|
20
|
+
<a class="menu-link without-sub" routerLinkActive="active">
|
|
21
|
+
<span class="menu-icon">
|
|
22
|
+
<img class="fs-2" src="./assets/tango/sidemenu-icons/tango_traffic.svg" alt="">
|
|
23
|
+
</span>
|
|
24
|
+
<span class="menu-title">Tango Traffic</span>
|
|
25
|
+
</a>
|
|
26
|
+
</div>
|
|
27
|
+
|
|
28
|
+
<!-- Tango Zone -->
|
|
29
|
+
<div class="menu-item">
|
|
30
|
+
<a class="menu-link without-sub" routerLinkActive="active">
|
|
31
|
+
<span class="menu-icon">
|
|
32
|
+
<img class="fs-2" src="./assets/tango/sidemenu-icons/tango_zone.svg" alt="">
|
|
33
|
+
</span>
|
|
34
|
+
<span class="menu-title">Tango Zone</span>
|
|
35
|
+
</a>
|
|
36
|
+
</div>
|
|
37
|
+
|
|
38
|
+
<!-- Tango Revop -->
|
|
39
|
+
<div class="menu-item menu-accordion" data-kt-menu-trigger="click" routerLinkActive="here show">
|
|
40
|
+
<span class="menu-link">
|
|
41
|
+
<span class="menu-icon">
|
|
42
|
+
<img class="fs-2" src="./assets/tango/sidemenu-icons/tango_revop.svg" alt="">
|
|
43
|
+
</span>
|
|
44
|
+
<span class="menu-title" data-link="/crafted/account">Tango Revop
|
|
45
|
+
</span>
|
|
46
|
+
<span class="menu-arrow"></span>
|
|
47
|
+
</span>
|
|
48
|
+
<div class="menu-sub menu-sub-accordion" routerLinkActive="menu-active-bg">
|
|
49
|
+
<div class="menu-item">
|
|
50
|
+
<a class="menu-link without-sub" routerLinkActive="active">
|
|
51
|
+
<span class="menu-bullet">
|
|
52
|
+
<span class="bullet bullet-dot"></span>
|
|
53
|
+
</span>
|
|
54
|
+
<span class="menu-title">Home
|
|
55
|
+
</span>
|
|
56
|
+
</a>
|
|
57
|
+
</div>
|
|
58
|
+
<div class="menu-item">
|
|
59
|
+
<a class="menu-link without-sub" routerLinkActive="active">
|
|
60
|
+
<span class="menu-bullet">
|
|
61
|
+
<span class="bullet bullet-dot"></span>
|
|
62
|
+
</span>
|
|
63
|
+
<span class="menu-title">Tagging
|
|
64
|
+
</span>
|
|
65
|
+
</a>
|
|
66
|
+
</div>
|
|
67
|
+
<div class="menu-item">
|
|
68
|
+
<a class="menu-link without-sub" routerLinkActive="active">
|
|
69
|
+
<span class="menu-bullet">
|
|
70
|
+
<span class="bullet bullet-dot"></span>
|
|
71
|
+
</span>
|
|
72
|
+
<span class="menu-title">Pending Action
|
|
73
|
+
</span>
|
|
74
|
+
</a>
|
|
75
|
+
</div>
|
|
76
|
+
<div class="menu-item">
|
|
77
|
+
<a class="menu-link without-sub" routerLinkActive="active">
|
|
78
|
+
<span class="menu-bullet">
|
|
79
|
+
<span class="bullet bullet-dot"></span>
|
|
80
|
+
</span>
|
|
81
|
+
<span class="menu-title">Customer Profile
|
|
82
|
+
</span>
|
|
83
|
+
</a>
|
|
84
|
+
</div>
|
|
85
|
+
</div>
|
|
86
|
+
</div>
|
|
87
|
+
|
|
88
|
+
<!-- Control Center -->
|
|
89
|
+
<div class="menu-item menu-accordion" data-kt-menu-trigger="click" routerLinkActive="here show">
|
|
90
|
+
<span class="menu-link">
|
|
91
|
+
<span class="menu-icon">
|
|
92
|
+
<img class="fs-2" src="./assets/tango/sidemenu-icons/control_center.svg" alt="">
|
|
93
|
+
</span>
|
|
94
|
+
<span class="menu-title" data-link="/crafted/account">Control Center
|
|
95
|
+
</span>
|
|
96
|
+
<span class="menu-arrow"></span>
|
|
97
|
+
</span>
|
|
98
|
+
<div class="menu-sub menu-sub-accordion" routerLinkActive="menu-active-bg">
|
|
99
|
+
<div class="menu-item">
|
|
100
|
+
<a class="menu-link without-sub" routerLinkActive="active">
|
|
101
|
+
<span class="menu-bullet">
|
|
102
|
+
<span class="bullet bullet-dot"></span>
|
|
103
|
+
</span>
|
|
104
|
+
<span class="menu-title">Live & Playback
|
|
105
|
+
</span>
|
|
106
|
+
</a>
|
|
107
|
+
</div>
|
|
108
|
+
<div class="menu-item">
|
|
109
|
+
<a class="menu-link without-sub" routerLinkActive="active">
|
|
110
|
+
<span class="menu-bullet">
|
|
111
|
+
<span class="bullet bullet-dot"></span>
|
|
112
|
+
</span>
|
|
113
|
+
<span class="menu-title">Screen Manager
|
|
114
|
+
</span>
|
|
115
|
+
</a>
|
|
116
|
+
</div>
|
|
117
|
+
<div class="menu-item">
|
|
118
|
+
<a class="menu-link without-sub" routerLinkActive="active">
|
|
119
|
+
<span class="menu-bullet">
|
|
120
|
+
<span class="bullet bullet-dot"></span>
|
|
121
|
+
</span>
|
|
122
|
+
<span class="menu-title">Store Explore
|
|
123
|
+
</span>
|
|
124
|
+
</a>
|
|
125
|
+
</div>
|
|
126
|
+
</div>
|
|
127
|
+
</div>
|
|
128
|
+
|
|
129
|
+
<!-- Tango SOP -->
|
|
130
|
+
<div class="menu-item menu-accordion" data-kt-menu-trigger="click" routerLinkActive="here show">
|
|
131
|
+
<span class="menu-link">
|
|
132
|
+
<span class="menu-icon">
|
|
133
|
+
<img class="fs-2" src="./assets/tango/sidemenu-icons/tango_sop.svg" alt="">
|
|
134
|
+
</span>
|
|
135
|
+
<span class="menu-title" data-link="/crafted/account">Tango SOP
|
|
136
|
+
</span>
|
|
137
|
+
<span class="menu-arrow"></span>
|
|
138
|
+
</span>
|
|
139
|
+
<div class="menu-sub menu-sub-accordion" routerLinkActive="menu-active-bg">
|
|
140
|
+
<div class="menu-item">
|
|
141
|
+
<a class="menu-link without-sub" routerLinkActive="active">
|
|
142
|
+
<span class="menu-bullet">
|
|
143
|
+
<span class="bullet bullet-dot"></span>
|
|
144
|
+
</span>
|
|
145
|
+
<span class="menu-title">Dashboard
|
|
146
|
+
</span>
|
|
147
|
+
</a>
|
|
148
|
+
</div>
|
|
149
|
+
<div class="menu-item">
|
|
150
|
+
<a class="menu-link without-sub" routerLinkActive="active">
|
|
151
|
+
<span class="menu-bullet">
|
|
152
|
+
<span class="bullet bullet-dot"></span>
|
|
153
|
+
</span>
|
|
154
|
+
<span class="menu-title">Create & Manage
|
|
155
|
+
</span>
|
|
156
|
+
</a>
|
|
157
|
+
</div>
|
|
158
|
+
<div class="menu-item">
|
|
159
|
+
<a class="menu-link without-sub" routerLinkActive="active">
|
|
160
|
+
<span class="menu-bullet">
|
|
161
|
+
<span class="bullet bullet-dot"></span>
|
|
162
|
+
</span>
|
|
163
|
+
<span class="menu-title">Flag
|
|
164
|
+
</span>
|
|
165
|
+
</a>
|
|
166
|
+
</div>
|
|
167
|
+
<div class="menu-item">
|
|
168
|
+
<a class="menu-link without-sub" routerLinkActive="active">
|
|
169
|
+
<span class="menu-bullet">
|
|
170
|
+
<span class="bullet bullet-dot"></span>
|
|
171
|
+
</span>
|
|
172
|
+
<span class="menu-title">Reports
|
|
173
|
+
</span>
|
|
174
|
+
</a>
|
|
175
|
+
</div>
|
|
176
|
+
<div class="menu-item">
|
|
177
|
+
<a class="menu-link without-sub" routerLinkActive="active" routerLink="/crafted/account/settings">
|
|
178
|
+
<span class="menu-bullet">
|
|
179
|
+
<span class="bullet bullet-dot"></span>
|
|
180
|
+
</span>
|
|
181
|
+
<span class="menu-title">Incidents
|
|
182
|
+
</span>
|
|
183
|
+
</a>
|
|
184
|
+
</div>
|
|
185
|
+
</div>
|
|
186
|
+
</div>
|
|
187
|
+
|
|
188
|
+
<!-- Manage -->
|
|
189
|
+
<div class="menu-item menu-accordion" data-kt-menu-trigger="click" routerLinkActive="here show">
|
|
190
|
+
<span class="menu-link">
|
|
191
|
+
<span style="width: 0px;" class="menu-icon">
|
|
192
|
+
<!-- <lib-keenicon name="profile-circle" class="fs-2"></lib-keenicon> -->
|
|
193
|
+
</span>
|
|
194
|
+
<span class="menu-title" data-link="/manage">Manage
|
|
195
|
+
</span>
|
|
196
|
+
<span class="menu-arrow"></span>
|
|
197
|
+
</span>
|
|
198
|
+
<div class="menu-sub menu-sub-accordion" routerLinkActive="menu-active-bg" >
|
|
199
|
+
<div class="menu-item">
|
|
200
|
+
<a class="menu-link without-sub" routerLinkActive="active" routerLink="/manage/brands">
|
|
201
|
+
<span class="menu-bullet">
|
|
202
|
+
<img class="fs-2" src="./assets/tango/sidemenu-icons/brands.svg" alt="">
|
|
203
|
+
</span>
|
|
204
|
+
<span class="menu-title">Brands
|
|
205
|
+
</span>
|
|
206
|
+
</a>
|
|
207
|
+
</div>
|
|
208
|
+
<div class="menu-item">
|
|
209
|
+
<a class="menu-link without-sub" routerLinkActive="active" routerLink="/manage/overview">
|
|
210
|
+
<span class="menu-bullet">
|
|
211
|
+
<img class="fs-2" src="./assets/tango/sidemenu-icons/overview.svg" alt="">
|
|
212
|
+
</span>
|
|
213
|
+
<span class="menu-title">Overview
|
|
214
|
+
</span>
|
|
215
|
+
</a>
|
|
216
|
+
</div>
|
|
217
|
+
<div class="menu-item">
|
|
218
|
+
<a class="menu-link without-sub" routerLinkActive="active" routerLink="/manage/stores">
|
|
219
|
+
<span class="menu-bullet">
|
|
220
|
+
<img class="fs-2" src="./assets/tango/sidemenu-icons/stores.svg" alt="">
|
|
221
|
+
</span>
|
|
222
|
+
<span class="menu-title">Stores
|
|
223
|
+
</span>
|
|
224
|
+
</a>
|
|
225
|
+
</div>
|
|
226
|
+
<div class="menu-item">
|
|
227
|
+
<a class="menu-link without-sub" routerLinkActive="active" routerLink="/manage/users">
|
|
228
|
+
<span class="menu-bullet">
|
|
229
|
+
<img class="fs-2" src="./assets/tango/sidemenu-icons/users.svg" alt="">
|
|
230
|
+
</span>
|
|
231
|
+
<span class="menu-title">Users
|
|
232
|
+
</span>
|
|
233
|
+
</a>
|
|
234
|
+
</div>
|
|
235
|
+
<div class="menu-item">
|
|
236
|
+
<a class="menu-link without-sub" routerLinkActive="active" routerLink="/manage/tickets" >
|
|
237
|
+
<span class="menu-bullet">
|
|
238
|
+
<img class="fs-2" src="./assets/tango/sidemenu-icons/tickets.svg" alt="">
|
|
239
|
+
</span>
|
|
240
|
+
<span class="menu-title">Tickets
|
|
241
|
+
</span>
|
|
242
|
+
</a>
|
|
243
|
+
</div>
|
|
244
|
+
<div class="menu-item">
|
|
245
|
+
<a class="menu-link without-sub" routerLinkActive="active" routerLink="/manage/reports" >
|
|
246
|
+
<span class="menu-bullet">
|
|
247
|
+
<img class="fs-2" src="./assets/tango/sidemenu-icons/reports.svg" alt="">
|
|
248
|
+
</span>
|
|
249
|
+
<span class="menu-title">Reports
|
|
250
|
+
</span>
|
|
251
|
+
</a>
|
|
252
|
+
</div>
|
|
253
|
+
<div class="menu-item">
|
|
254
|
+
<a class="menu-link without-sub" routerLinkActive="active" routerLink="/manage/audit" >
|
|
255
|
+
<span class="menu-bullet">
|
|
256
|
+
<img class="fs-2" src="./assets/tango/sidemenu-icons/audit.svg" alt="">
|
|
257
|
+
</span>
|
|
258
|
+
<span class="menu-title">Audit
|
|
259
|
+
</span>
|
|
260
|
+
</a>
|
|
261
|
+
</div>
|
|
262
|
+
<div class="menu-item">
|
|
263
|
+
<a class="menu-link without-sub" routerLinkActive="active" routerLink="/manage/settings" >
|
|
264
|
+
<span class="menu-bullet">
|
|
265
|
+
<img class="fs-2" src="./assets/tango/sidemenu-icons/settings.svg" alt="">
|
|
266
|
+
</span>
|
|
267
|
+
<span class="menu-title">Settings
|
|
268
|
+
</span>
|
|
269
|
+
</a>
|
|
270
|
+
</div>
|
|
271
|
+
</div>
|
|
272
|
+
</div>
|
|
273
|
+
</div>
|
|
274
|
+
<!--end::Menu-->
|
|
275
|
+
</div>
|
|
276
|
+
<!--end::Menu wrapper-->
|