@sgcloud-sgsistemas/base 1.0.14 → 1.0.16
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/dist/mobiage-base.min.css +2 -0
- package/dist/mobiage-base.min.css.map +1 -0
- package/dist/mobiage-base.min.js +8 -0
- package/dist/mobiage-base.min.js.map +1 -0
- package/package.json +1 -1
- package/src/modules/base/components/container/container.style.scss +1 -2
- package/src/modules/base/components/content-container/content-container.style.scss +6 -5
- package/src/modules/base/components/content-container/content-container.template.html +1 -0
- package/src/modules/base/components/content-container/content-container.ts +38 -0
- package/src/modules/base/index.js +1 -1
- package/src/modules/side-menu/components/hotbar/hotbar.html +10 -0
- package/src/modules/side-menu/components/hotbar/hotbar.scss +229 -0
- package/src/modules/side-menu/components/hotbar/hotbar.ts +299 -0
- package/src/modules/side-menu/components/hotbar/interface/angular-interface/angular.ts +54 -0
- package/src/modules/side-menu/components/hotbar/interface/config.ts +55 -0
- package/src/modules/side-menu/components/hotbar/interface/coordenates.ts +8 -0
- package/src/modules/side-menu/components/hotbar/interface/rect.ts +14 -0
- package/src/modules/side-menu/components/hotbar/utils/element-utils.ts +55 -0
- package/src/modules/side-menu/controllers/sideMenu.ts +37 -0
- package/src/modules/side-menu/index.js +6 -16
- package/src/modules/side-menu/services/sidemenu-service.ts +63 -0
- package/src/modules/side-menu/styles/side-menu.style.scss +9 -80
- package/src/modules/side-menu/templates/side-menu.template.html +29 -29
- package/src/modules/themes/themes.style.scss +4 -0
- package/src/modules/topbar/controllers/topbar.controller.js +1 -1
- package/src/modules/topbar/styles/topbar.style.scss +16 -15
- package/src/modules/topbar/templates/topbar.template.html +8 -11
- package/src/modules/side-menu/components/btn/btn.controller.js +0 -13
- package/src/modules/side-menu/components/btn/btn.style.scss +0 -75
- package/src/modules/side-menu/components/btn/btn.template.html +0 -43
- package/src/modules/side-menu/components/btn/index.js +0 -26
- package/src/modules/side-menu/components/category/category.style.scss +0 -47
- package/src/modules/side-menu/components/category/category.template.html +0 -23
- package/src/modules/side-menu/components/category/index.js +0 -13
- package/src/modules/side-menu/components/item/index.js +0 -29
- package/src/modules/side-menu/components/item/item.template.html +0 -40
- package/src/modules/side-menu/components/link/index.js +0 -18
- package/src/modules/side-menu/components/link/link.controller.js +0 -48
- package/src/modules/side-menu/components/link/link.style.scss +0 -10
- package/src/modules/side-menu/components/link/link.template.html +0 -21
- package/src/modules/side-menu/components/quick-menu/index.js +0 -14
- package/src/modules/side-menu/components/quick-menu/quick-menu.controller.js +0 -67
- package/src/modules/side-menu/components/quick-menu/quick-menu.style.scss +0 -151
- package/src/modules/side-menu/components/quick-menu/quick-menu.template.html +0 -44
- package/src/modules/side-menu/components/sub-category/index.js +0 -20
- package/src/modules/side-menu/components/sub-category/sub-category.controller.js +0 -16
- package/src/modules/side-menu/components/sub-category/sub-category.style.scss +0 -50
- package/src/modules/side-menu/components/sub-category/sub-category.template.html +0 -47
- package/src/modules/side-menu/controllers/sideMenu.js +0 -71
- package/src/modules/side-menu/services/sideMenu.js +0 -12
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
interface Config {
|
|
2
|
+
keys?: string[]
|
|
3
|
+
authAccess?: (subModule: SubModule) => boolean
|
|
4
|
+
completeStructure?: Module
|
|
5
|
+
quickMenu?: QuickMenu
|
|
6
|
+
structure?: ModuleStructure
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
interface QuickMenu {
|
|
10
|
+
enabled: boolean;
|
|
11
|
+
enableAutoToggle: boolean;
|
|
12
|
+
buttonText: string;
|
|
13
|
+
icon: string;
|
|
14
|
+
links: {
|
|
15
|
+
enable: boolean;
|
|
16
|
+
type: string;
|
|
17
|
+
label: string;
|
|
18
|
+
iconSrc: string;
|
|
19
|
+
icon: string;
|
|
20
|
+
actionType: string;
|
|
21
|
+
action: string|Function
|
|
22
|
+
}[];
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
type Module = {
|
|
26
|
+
type?: string;
|
|
27
|
+
label?: string;
|
|
28
|
+
iconSrc?: string;
|
|
29
|
+
icon?: string;
|
|
30
|
+
children?: SubModule[];
|
|
31
|
+
hide?: boolean;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
type SubModule = ({
|
|
35
|
+
type?: string;
|
|
36
|
+
label?: string;
|
|
37
|
+
actionType?: string;
|
|
38
|
+
action?: Function | string;
|
|
39
|
+
key?: string;
|
|
40
|
+
description?: string;
|
|
41
|
+
hide?: boolean;
|
|
42
|
+
showOffline?: boolean;
|
|
43
|
+
})
|
|
44
|
+
|
|
45
|
+
interface ModuleStructure extends Module {
|
|
46
|
+
showItens: number
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export {
|
|
50
|
+
Config,
|
|
51
|
+
Module,
|
|
52
|
+
ModuleStructure,
|
|
53
|
+
QuickMenu,
|
|
54
|
+
SubModule,
|
|
55
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { XY } from "@sgcloud-sgsistemas/base/src/modules/side-menu/components/hotbar/interface/coordenates"
|
|
2
|
+
import { Rect } from "@sgcloud-sgsistemas/base/src/modules/side-menu/components/hotbar/interface/rect"
|
|
3
|
+
|
|
4
|
+
namespace ElementUtils {
|
|
5
|
+
export function getCenterXYElement(ele: Element): { x: number, y: number } {
|
|
6
|
+
let rect: DOMRect = ele.getBoundingClientRect()
|
|
7
|
+
let x: number = rect.left + rect.width / 2
|
|
8
|
+
let y: number = rect.top + rect.height / 2
|
|
9
|
+
return { x, y }
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export function getElementOnTheTopInXY<Return = HTMLElement>(x: number, y: number): Return {
|
|
13
|
+
return document.elementFromPoint(x, y) as Return
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export function getXYListValidationsInRect(xTotalValidation:number,yTotalValidation:number, rect:Rect|DOMRect):XY[]{
|
|
17
|
+
const list:XY[] = []
|
|
18
|
+
const widthParts:number = (xTotalValidation - 1 > 0) ? (xTotalValidation - 1) : 2
|
|
19
|
+
const HeightParts:number = (yTotalValidation - 1 > 0) ? (yTotalValidation - 1) : 2
|
|
20
|
+
for(let yValidation:number=0; yValidation < yTotalValidation; yValidation++){
|
|
21
|
+
for(let xValidation:number=0; xValidation < xTotalValidation; xValidation++){
|
|
22
|
+
const x:number = rect.left + ((rect.width / widthParts)*xValidation)
|
|
23
|
+
const y:number = rect.top + ((rect.height / HeightParts)*yValidation)
|
|
24
|
+
list.push({x,y})
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
return list
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export function getRealBoundingClientRect(element: JQuery | Element): Rect {
|
|
31
|
+
let ele: HTMLElement = element[0] ? element[0] : element
|
|
32
|
+
const wrongRect:DOMRect = ele.getBoundingClientRect()
|
|
33
|
+
|
|
34
|
+
let zoom:number = 1
|
|
35
|
+
if(window.innerWidth <= 1368){
|
|
36
|
+
zoom = 0.75
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
const correctRect = {
|
|
40
|
+
x: (wrongRect.x * zoom),
|
|
41
|
+
y: (wrongRect.y * zoom),
|
|
42
|
+
top: (wrongRect.top * zoom),
|
|
43
|
+
bottom: (wrongRect.bottom * zoom),
|
|
44
|
+
left: (wrongRect.left * zoom),
|
|
45
|
+
right: (wrongRect.right * zoom),
|
|
46
|
+
width: (wrongRect.width * zoom),
|
|
47
|
+
height: (wrongRect.height * zoom),
|
|
48
|
+
}
|
|
49
|
+
return correctRect
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export {
|
|
54
|
+
ElementUtils
|
|
55
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { $Scope, $Timeout } from "./../components/hotbar/interface/angular-interface/angular";
|
|
2
|
+
import { MbSidemenuService } from "./../services/sidemenu-service";
|
|
3
|
+
|
|
4
|
+
class SideMenuController {
|
|
5
|
+
public menuOpen: boolean = false
|
|
6
|
+
private watchConfig: Function
|
|
7
|
+
|
|
8
|
+
constructor(
|
|
9
|
+
public $timeout: $Timeout,
|
|
10
|
+
public $scope: $Scope,
|
|
11
|
+
public mbSidemenuService: MbSidemenuService,
|
|
12
|
+
) { }
|
|
13
|
+
|
|
14
|
+
$onInit(): void {
|
|
15
|
+
this.$scope.$on('$destroy', (): void => this.$onDestroy())
|
|
16
|
+
this.watchConfig = this.$scope.$watch('vm.config', (config: any): void => {
|
|
17
|
+
this.mbSidemenuService.setMenuConfig(config);
|
|
18
|
+
this.$scope.structure = config ? config.structure : null;
|
|
19
|
+
this.$scope.quickMenu = config ? config.quickMenu : null;
|
|
20
|
+
})
|
|
21
|
+
this.mbSidemenuService.addCallback((value: boolean): any => {
|
|
22
|
+
this.menuOpen = value
|
|
23
|
+
})
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
$onDestroy(): void {
|
|
27
|
+
this.__unWatch(this.watchConfig)
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
private __unWatch(watch: Function): void {
|
|
31
|
+
if (watch) watch()
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export {
|
|
36
|
+
SideMenuController
|
|
37
|
+
};
|
|
@@ -1,33 +1,23 @@
|
|
|
1
1
|
import template from './templates/side-menu.template.html';
|
|
2
|
-
import controller from './controllers/sideMenu';
|
|
3
|
-
import service from './services/sideMenu';
|
|
4
2
|
import './styles/side-menu.style.scss';
|
|
5
3
|
|
|
6
4
|
/* Componentes */
|
|
7
|
-
import quickMenu from './components/quick-menu';
|
|
8
|
-
import link from './components/link';
|
|
9
|
-
import btn from './components/btn';
|
|
10
|
-
import category from './components/category';
|
|
11
|
-
import subCategory from './components/sub-category';
|
|
12
|
-
import item from './components/item';
|
|
13
5
|
import html from './components/html';
|
|
6
|
+
import { hotbar } from './components/hotbar/hotbar';
|
|
7
|
+
import { SideMenuController } from './controllers/sideMenu';
|
|
8
|
+
import { MbSidemenuService } from './services/sidemenu-service';
|
|
14
9
|
|
|
15
10
|
const component = {
|
|
16
11
|
bindings: {
|
|
17
12
|
config: '='
|
|
18
13
|
},
|
|
19
14
|
template,
|
|
20
|
-
controller,
|
|
15
|
+
controller: SideMenuController,
|
|
21
16
|
controllerAs: 'vm'
|
|
22
17
|
};
|
|
23
18
|
|
|
24
19
|
angular.module('mb.sidemenu', ['ngSanitize'])
|
|
25
|
-
.component('mbSmQuickmenu', quickMenu)
|
|
26
|
-
.component('mbSmItem', item)
|
|
27
|
-
.component('mbSmCategory', category)
|
|
28
|
-
.component('mbSmSubcategory', subCategory)
|
|
29
|
-
.component('mbSmLink', link)
|
|
30
|
-
.component('mbSmBtn', btn)
|
|
31
20
|
.component('mbSmHtml', html)
|
|
32
21
|
.component('mbSidemenu', component)
|
|
33
|
-
.
|
|
22
|
+
.component('hotbar', hotbar)
|
|
23
|
+
.service('mbSidemenuService', MbSidemenuService);
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { $Interval } from "./../components/hotbar/interface/angular-interface/angular";
|
|
2
|
+
|
|
3
|
+
class MbSidemenuService {
|
|
4
|
+
|
|
5
|
+
public openMenu: boolean
|
|
6
|
+
public sideMenu: JQuery
|
|
7
|
+
|
|
8
|
+
private menuConfig: any = undefined;
|
|
9
|
+
private callbackListOnChange: ((currentValue: boolean) => void)[] = []
|
|
10
|
+
private interval
|
|
11
|
+
|
|
12
|
+
constructor (
|
|
13
|
+
public $interval: $Interval,
|
|
14
|
+
) {
|
|
15
|
+
this.openMenu = JSON.parse(localStorage.getItem('openMenu')||'false')
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
public switchOpenMenu(preventCallBack?: boolean): void {
|
|
19
|
+
this.openMenu = !this.openMenu
|
|
20
|
+
localStorage.setItem('openMenu', String(this.openMenu))
|
|
21
|
+
|
|
22
|
+
if (!preventCallBack) {
|
|
23
|
+
this.doCallback()
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
public addCallback(callback: (value: boolean) => void): void {
|
|
28
|
+
this.callbackListOnChange.push(callback)
|
|
29
|
+
|
|
30
|
+
if (!this.interval) {
|
|
31
|
+
this.interval = this.$interval((): void => {
|
|
32
|
+
if (this.sideMenu && this.sideMenu.children().length > 0) {
|
|
33
|
+
this.$interval.cancel(this.interval)
|
|
34
|
+
this.interval = null
|
|
35
|
+
this.doCallback()
|
|
36
|
+
}
|
|
37
|
+
}, 100)
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
private doCallback(): void {
|
|
42
|
+
this.callbackListOnChange.forEach((callback: Function, index: number): void => {
|
|
43
|
+
try{
|
|
44
|
+
callback(this.openMenu)
|
|
45
|
+
}catch(e){
|
|
46
|
+
this.callbackListOnChange.splice(index, 1)
|
|
47
|
+
}
|
|
48
|
+
})
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
public setMenuConfig(config: any): void {
|
|
52
|
+
this.menuConfig = config
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
public getMenuConfig(): any {
|
|
56
|
+
this.menuConfig
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export {
|
|
61
|
+
MbSidemenuService
|
|
62
|
+
};
|
|
63
|
+
|
|
@@ -1,86 +1,15 @@
|
|
|
1
1
|
@import "../../themes/themes.style.scss";
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
.
|
|
5
|
-
|
|
6
|
-
top: 0;
|
|
7
|
-
left: 0;
|
|
8
|
-
bottom: 0;
|
|
9
|
-
right: 0;
|
|
10
|
-
background: #000;
|
|
11
|
-
transition: opacity 750ms ease;
|
|
12
|
-
will-change: transform;
|
|
13
|
-
opacity: 0;
|
|
14
|
-
pointer-events: none;
|
|
15
|
-
z-index: 9999;
|
|
16
|
-
&.active {
|
|
17
|
-
pointer-events: all;
|
|
18
|
-
opacity: .6;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
.mb[side-menu] {
|
|
23
|
-
font-family: 'MontSerrat', sans-serif;
|
|
24
|
-
height: calc(100% - #{$topbarHeight});
|
|
25
|
-
width: 220px;
|
|
4
|
+
.side-menu-wrapper{
|
|
5
|
+
transition: width $transition;
|
|
26
6
|
position: relative;
|
|
27
|
-
z-index: 0;
|
|
28
|
-
will-change: transform;
|
|
29
|
-
vertical-align: top;
|
|
30
|
-
transition: transform 750ms cubic-bezier(0.96, 0.015, 0.45, 1);
|
|
31
7
|
display: inline-block;
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
background-color: #ffffff;
|
|
39
|
-
left: 0px;
|
|
40
|
-
top: 0px;
|
|
41
|
-
bottom: 0px;
|
|
42
|
-
right: auto;
|
|
43
|
-
transform: translate3d(-100%, 0, 0);
|
|
44
|
-
height: 100%;
|
|
45
|
-
z-index: 99999;
|
|
46
|
-
|
|
47
|
-
&.active {
|
|
48
|
-
background-color: #fff;
|
|
49
|
-
transform: translate3d(0%, 0, 0);
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
> .mb-sm-quick-container {
|
|
54
|
-
padding: 15px 0px 15px 0px;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
> .mb-sm-content-container {
|
|
58
|
-
width: 100%;
|
|
59
|
-
background-color: #fff;
|
|
60
|
-
@include themify(background-color, backgroundSideMenu);
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
.mb-sm-content {
|
|
64
|
-
height: calc(100vh - calc(200px - #{$topbarHeight}));
|
|
65
|
-
padding-left: 10px;
|
|
66
|
-
padding-bottom: 10px;
|
|
67
|
-
overflow: hidden;
|
|
68
|
-
position: relative;
|
|
69
|
-
|
|
70
|
-
@media screen and (max-width: 1368px) {
|
|
71
|
-
height: calc(134vh - 200px);
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
&.without-env-bar{
|
|
75
|
-
height: calc(100vh - calc(150px - #{$topbarHeight}));
|
|
76
|
-
|
|
77
|
-
@media screen and (max-width: 1368px) {
|
|
78
|
-
height: calc(134vh - 152px);
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
&:hover {
|
|
83
|
-
overflow-y: scroll;
|
|
84
|
-
}
|
|
8
|
+
height: calc(100% - #{$topbarHeight});
|
|
9
|
+
width: #{$leftHotbarWidth};
|
|
10
|
+
vertical-align: top;
|
|
11
|
+
|
|
12
|
+
&.opened-size{
|
|
13
|
+
width: #{$leftHotbarWidthMax};
|
|
85
14
|
}
|
|
86
|
-
}
|
|
15
|
+
}
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
<div ng-class="{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
<
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
</
|
|
1
|
+
<div class="side-menu-wrapper" ng-class="{'opened-size':vm.menuOpen}">
|
|
2
|
+
<hotbar config="vm.config" open="vm.menuOpen">
|
|
3
|
+
<module main>
|
|
4
|
+
<div>
|
|
5
|
+
<i class="{{vm.config.quickMenu.icon || 'fas fa-times'}}"></i>
|
|
6
|
+
<label>{{vm.config.quickMenu.buttonText}}</label>
|
|
7
|
+
</div>
|
|
8
|
+
<sub-module>
|
|
9
|
+
<div ng-repeat="subModule in vm.config.quickMenu.links">
|
|
10
|
+
<i class="{{subModule.icon}}"></i>
|
|
11
|
+
<label>{{subModule.label}}</label>
|
|
12
|
+
</div>
|
|
13
|
+
</sub-module>
|
|
14
|
+
</module>
|
|
15
|
+
<module ng-repeat="module in vm.config.structure" ng-if="module.label && module.children">
|
|
16
|
+
<div>
|
|
17
|
+
<i ng-if="module.icon && module.icon != ''"
|
|
18
|
+
class="{{module.icon}}">
|
|
19
|
+
</i>
|
|
20
|
+
<label>{{module.label}}</label>
|
|
21
|
+
</div>
|
|
22
|
+
<sub-module>
|
|
23
|
+
<div ng-if="!subModule.hide" ng-repeat="subModule in module.children">
|
|
24
|
+
<i class="{{subModule.icon}}"></i>
|
|
25
|
+
<label>{{subModule.label}}</label>
|
|
26
|
+
</div>
|
|
27
|
+
</sub-module>
|
|
28
|
+
</module>
|
|
29
|
+
</hotbar>
|
|
30
30
|
</div>
|
|
@@ -38,7 +38,6 @@
|
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
> .mb-t-logo-container {
|
|
41
|
-
min-width: 220px;
|
|
42
41
|
height: 100%;
|
|
43
42
|
border-bottom: 3px solid #ccc;
|
|
44
43
|
|
|
@@ -54,7 +53,7 @@
|
|
|
54
53
|
|
|
55
54
|
> .mb-t-logo {
|
|
56
55
|
height: 85%;
|
|
57
|
-
width:
|
|
56
|
+
width: 120px;
|
|
58
57
|
background-size: contain;
|
|
59
58
|
background-position: center center;
|
|
60
59
|
background-repeat: no-repeat;
|
|
@@ -63,20 +62,22 @@
|
|
|
63
62
|
}
|
|
64
63
|
|
|
65
64
|
> .mb-t-buguer-btn-container {
|
|
66
|
-
height: 100%;
|
|
67
|
-
width: 10%;
|
|
68
|
-
font-size: 35px;
|
|
69
|
-
line-height: 80px;
|
|
70
|
-
|
|
71
65
|
@include themify(color, color1);
|
|
72
|
-
|
|
73
|
-
|
|
66
|
+
display: block;
|
|
67
|
+
width: fit-content;
|
|
68
|
+
height: 100%;
|
|
69
|
+
font-size: 20px;
|
|
70
|
+
margin: 0px 6px;
|
|
74
71
|
cursor: pointer;
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
72
|
+
display: flex;
|
|
73
|
+
>*{
|
|
74
|
+
margin: auto;
|
|
75
|
+
border-radius: 100%;
|
|
76
|
+
padding: 10px;
|
|
77
|
+
transition: background 0.3s ease-in-out;
|
|
78
|
+
&:hover{
|
|
79
|
+
background: rgba(0,0,0,0.1);
|
|
80
|
+
}
|
|
80
81
|
}
|
|
81
82
|
}
|
|
82
83
|
|
|
@@ -100,7 +101,7 @@
|
|
|
100
101
|
// padding-top: calc((#{$topbarHeight} / 2) - 40px / 2);
|
|
101
102
|
padding-right: 15px;
|
|
102
103
|
|
|
103
|
-
@media screen and (max-width:
|
|
104
|
+
@media screen and (max-width: 920px) {
|
|
104
105
|
padding-left: 0px;
|
|
105
106
|
padding-top: 20px;
|
|
106
107
|
flex: 1;
|
|
@@ -5,13 +5,15 @@
|
|
|
5
5
|
<div class="mb-t-content" tabindex="-1">
|
|
6
6
|
<div class="mb-t-container"
|
|
7
7
|
tabindex="-1">
|
|
8
|
-
<
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
<div class="mb-t-buguer-btn-container"
|
|
9
|
+
ng-click="vm.openMenu()">
|
|
10
|
+
<i class="fas fa-bars"></i>
|
|
11
|
+
</div>
|
|
12
|
+
<a ng-if="vm.config.logoActionType === 'state'" ui-sref="{{vm.config.logoAction}}"
|
|
13
|
+
class="mb-t-logo-link" tabindex="-1">
|
|
12
14
|
<div class="mb-t-logo-container">
|
|
13
|
-
<div class="mb-t-logo"
|
|
14
|
-
|
|
15
|
+
<div class="mb-t-logo" ng-style="{'background-image': 'url(' + vm.config.logo + ')'}">
|
|
16
|
+
</div>
|
|
15
17
|
</div>
|
|
16
18
|
</a>
|
|
17
19
|
<a class="mb-t-logo-link"
|
|
@@ -32,11 +34,6 @@
|
|
|
32
34
|
ng-style="{'background-image': 'url(' + vm.config.logo + ')'}"></div>
|
|
33
35
|
</div>
|
|
34
36
|
</a>
|
|
35
|
-
|
|
36
|
-
<div class="mb-t-buguer-btn-container"
|
|
37
|
-
ng-click="vm.openMenu()">
|
|
38
|
-
<i class="fas fa-bars"></i>
|
|
39
|
-
</div>
|
|
40
37
|
<div class="mb-t-inside-content">
|
|
41
38
|
|
|
42
39
|
<div class="mb-t-search-container">
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
const controller = function ($element, $scope, hotkeys) {
|
|
2
|
-
const click = () => {
|
|
3
|
-
$element[0].children[0].click();
|
|
4
|
-
};
|
|
5
|
-
this.$onInit = () => {
|
|
6
|
-
const { hotkey } = this;
|
|
7
|
-
if (hotkey && hotkey.length > 0) {
|
|
8
|
-
hotkeys.bindTo($scope).add({ combo: hotkey, callback: click });
|
|
9
|
-
}
|
|
10
|
-
};
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
export default controller;
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
@import "../../../themes/themes.style.scss";
|
|
2
|
-
|
|
3
|
-
.mb[side-menu-btn] {
|
|
4
|
-
color: #ccc;
|
|
5
|
-
@include themify(color, font2);
|
|
6
|
-
font-size: 12px;
|
|
7
|
-
font-weight: 400;
|
|
8
|
-
width: 100%;
|
|
9
|
-
display: flex;
|
|
10
|
-
flex-direction: row;
|
|
11
|
-
justify-content: flex-start;
|
|
12
|
-
align-items: center;
|
|
13
|
-
user-select: none;
|
|
14
|
-
transition: transform 250ms ease;
|
|
15
|
-
cursor: pointer;
|
|
16
|
-
padding-top: 5px;
|
|
17
|
-
padding-bottom: 5px;
|
|
18
|
-
|
|
19
|
-
.mbg-tag {
|
|
20
|
-
border-radius: 5px;
|
|
21
|
-
color: #fff;
|
|
22
|
-
text-transform: uppercase;
|
|
23
|
-
font-weight: 600;
|
|
24
|
-
text-shadow: none;
|
|
25
|
-
font-size: 9px;
|
|
26
|
-
padding: 3px 8px;
|
|
27
|
-
text-rendering: optimizeSpeed;
|
|
28
|
-
-webkit-font-smoothing: antialiased;
|
|
29
|
-
line-height: 1;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
> .mb-smb-icon {
|
|
33
|
-
font-size: 14px;
|
|
34
|
-
margin-right: 5px;
|
|
35
|
-
width: 22px;
|
|
36
|
-
height: 22px;
|
|
37
|
-
line-height: 22px;
|
|
38
|
-
user-select: none;
|
|
39
|
-
text-align: center;
|
|
40
|
-
transition: color 200ms linear;
|
|
41
|
-
|
|
42
|
-
> .mb-smb-custom-icon {
|
|
43
|
-
width: auto;
|
|
44
|
-
height: 100%;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
.material-icons {
|
|
48
|
-
font-size: 16px;
|
|
49
|
-
line-height: 22px;
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
> .mb-smb-text {
|
|
54
|
-
display: inline-block;
|
|
55
|
-
vertical-align: middle;
|
|
56
|
-
transition: color 200ms linear;
|
|
57
|
-
font-weight: 600;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
&:hover {
|
|
61
|
-
transform: translate3d(1%, 0, 0);
|
|
62
|
-
|
|
63
|
-
> .mb-smb-text {
|
|
64
|
-
color: #9136ca;
|
|
65
|
-
|
|
66
|
-
@include themify(color, color1);
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
> .mb-smb-icon {
|
|
70
|
-
color: #9136ca;
|
|
71
|
-
|
|
72
|
-
@include themify(color, color1);
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
<mb-sm-link action="vm.action"
|
|
2
|
-
keys="vm.keys"
|
|
3
|
-
config="vm.config"
|
|
4
|
-
action-type="vm.actionType">
|
|
5
|
-
<div side-menu-btn
|
|
6
|
-
class="mb"
|
|
7
|
-
ng-class="{'lastChild' : vm.lastChild, 'firstChild' : vm.firstChild}">
|
|
8
|
-
<div class="mb-smb-text"
|
|
9
|
-
ng-if="vm.iconSide === 'right'">
|
|
10
|
-
{{ vm.label }}
|
|
11
|
-
</div>
|
|
12
|
-
|
|
13
|
-
<div class="mb-smb-icon"
|
|
14
|
-
ng-if="vm.iconSrc === 'fontawesome'"
|
|
15
|
-
ng-style="{'font-size': vm.iconSize ? vm.iconSize + 'px' : undefined, 'line-height' : vm.iconSize ? vm.iconSize + 'px' : undefined, 'height' : vm.iconSize ? vm.iconSize + 'px' : undefined, 'width' : vm.iconSize ? 'auto' : undefined }">
|
|
16
|
-
<i class="{{vm.icon}}"></i>
|
|
17
|
-
</div>
|
|
18
|
-
<div class="mb-smb-icon"
|
|
19
|
-
ng-if="vm.iconSrc === 'material'"
|
|
20
|
-
ng-style="{ 'height' : vm.iconSize ? vm.iconSize + 'px' : undefined, 'width' : vm.iconSize ? 'auto' : undefined }">
|
|
21
|
-
<i class="material-icons"
|
|
22
|
-
ng-style="{'font-size': vm.iconSize ? vm.iconSize + 'px' : undefined, 'line-height' : vm.iconSize ? vm.iconSize + 'px' : undefined }">{{
|
|
23
|
-
vm.icon }}</i>
|
|
24
|
-
</div>
|
|
25
|
-
<div class="mb-smb-icon"
|
|
26
|
-
ng-if="vm.iconSrc !== 'material' && vm.iconSrc !== 'fontawesome' && vm.iconSrc !== undefined && vm.iconSrc.length > 0"
|
|
27
|
-
ng-style="{ 'height' : vm.iconSize ? vm.iconSize + 'px' : undefined, 'width' : vm.iconSize ? 'auto' : undefined }">
|
|
28
|
-
<img class="mb-smb-custom-icon"
|
|
29
|
-
ng-src="{{ vm.iconSrc }}"
|
|
30
|
-
alt="">
|
|
31
|
-
</div>
|
|
32
|
-
|
|
33
|
-
<div class="mb-smb-text"
|
|
34
|
-
ng-if="vm.iconSide !== 'right'">
|
|
35
|
-
{{ vm.label }}
|
|
36
|
-
<span ng-if="vm.tag"
|
|
37
|
-
ng-style="{background: vm.tag.color}"
|
|
38
|
-
class="mbg-tag">
|
|
39
|
-
{{ vm.tag.label }}
|
|
40
|
-
</span>
|
|
41
|
-
</div>
|
|
42
|
-
</div>
|
|
43
|
-
</mb-sm-link>
|