btv-base-controls 0.1.21 → 0.1.23
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/.browserslistrc +16 -0
- package/README.md +24 -24
- package/karma.conf.js +44 -0
- package/ng-package.json +7 -0
- package/package.json +10 -24
- package/src/assets/icon/state-icons.png +0 -0
- package/src/assets/theme/wmGlobals.scss +181 -0
- package/src/lib/basic.module.ts +48 -0
- package/src/lib/blink-message/blink-message.component.html +1 -0
- package/src/lib/blink-message/blink-message.component.scss +4 -0
- package/src/lib/blink-message/blink-message.component.ts +54 -0
- package/src/lib/btv-icon-button/btv-counter-button.html +18 -0
- package/src/lib/btv-icon-button/btv-counter-button.ts +34 -0
- package/src/lib/btv-icon-button/btv-icon-button.component.ts +62 -0
- package/src/lib/btv-icon-button/btv-icon-button.html +14 -0
- package/src/lib/btv-icon-button/btv-icon-button.scss +125 -0
- package/src/lib/btv-icon-button/index.ts +1 -0
- package/src/lib/btv-progress/btv-progress.component.ts +65 -0
- package/src/lib/btv-progress/btv-progress.html +11 -0
- package/src/lib/btv-progress/btv-progress.scss +24 -0
- package/src/lib/btv-search/btv-search.component.ts +78 -0
- package/src/lib/btv-search/btv-search.html +15 -0
- package/src/lib/btv-search/btv-search.scss +97 -0
- package/src/lib/btv-search/index.ts +1 -0
- package/src/lib/busy-indicator/busy-indicator.component.ts +13 -0
- package/src/lib/busy-indicator/busy-indicator.html +6 -0
- package/src/lib/busy-indicator/busy-indicator.scss +86 -0
- package/src/lib/custom-tool-tip/custom-tool-tip.component.html +9 -0
- package/src/lib/custom-tool-tip/custom-tool-tip.component.scss +47 -0
- package/src/lib/custom-tool-tip/custom-tool-tip.component.ts +44 -0
- package/src/lib/custom-tool-tip/tool-tip-renderer.directive.ts +111 -0
- package/src/lib/illustration/illustration.component.html +412 -0
- package/src/lib/illustration/illustration.component.scss +48 -0
- package/src/lib/illustration/illustration.component.ts +21 -0
- package/src/lib/wm-avatar/avatar.component.ts +179 -0
- package/src/lib/wm-avatar/avatar.html +13 -0
- package/src/lib/wm-avatar/avatar.scss +3 -0
- package/src/lib/wm-back-btn/wm-back-btn.component.ts +19 -0
- package/src/lib/wm-back-btn/wm-back-btn.html +7 -0
- package/src/lib/wm-back-btn/wm-back-btn.scss +51 -0
- package/src/lib/wm-beta-text/wm-beta-text.component.html +1 -0
- package/src/lib/wm-beta-text/wm-beta-text.component.scss +44 -0
- package/src/lib/wm-beta-text/wm-beta-text.component.ts +14 -0
- package/src/lib/wm-info/info-models.ts +22 -0
- package/src/lib/wm-info/wm-info.component.ts +238 -0
- package/src/lib/wm-info/wm-info.html +19 -0
- package/src/lib/wm-info/wm-info.scss +64 -0
- package/src/lib/wm-info-card/wm-info-card.component.ts +14 -0
- package/src/lib/wm-info-card/wm-info-card.html +13 -0
- package/src/lib/wm-info-card/wm-info-card.scss +56 -0
- package/src/lib/wm-no-content/wm-no-content.component.ts +17 -0
- package/src/lib/wm-no-content/wm-no-content.html +13 -0
- package/src/lib/wm-no-content/wm-no-content.scss +60 -0
- package/src/lib/wm-panel-bar/wm-panel-bar.component.ts +59 -0
- package/src/lib/wm-panel-bar/wm-panel-bar.html +37 -0
- package/src/lib/wm-panel-bar/wm-panel-bar.scss +114 -0
- package/src/lib/wm-scalable-div/scalable-div.component.ts +106 -0
- package/src/lib/wm-scalable-div/scalable-div.html +1 -0
- package/src/lib/wm-scalable-div/scalable-div.scss +11 -0
- package/src/lib/wm-spinner/wm-spinner.component.ts +129 -0
- package/src/lib/wm-spinner/wm-spinner.html +37 -0
- package/src/lib/wm-spinner/wm-spinner.scss +72 -0
- package/src/lib/wm-state-icon/wm-state-icon.component.html +4 -0
- package/src/lib/wm-state-icon/wm-state-icon.component.scss +26 -0
- package/src/lib/wm-state-icon/wm-state-icon.component.ts +18 -0
- package/src/lib/wm-tag/wm-tag.component.html +8 -0
- package/src/lib/wm-tag/wm-tag.component.scss +48 -0
- package/src/lib/wm-tag/wm-tag.component.ts +17 -0
- package/src/lib/wm-tamplate-image/wm-template-image.component.ts +56 -0
- package/src/lib/wm-tamplate-image/wm-template-image.html +3 -0
- package/src/lib/wm-tamplate-image/wm-template-image.scss +31 -0
- package/src/lib/wm-toggle/wm-toggle.component.ts +20 -0
- package/src/lib/wm-toggle/wm-toggle.html +5 -0
- package/src/lib/wm-toggle/wm-toggle.scss +33 -0
- package/src/models/guidExtension.ts +16 -0
- package/src/public-api.ts +29 -0
- package/src/test.ts +15 -0
- package/tsconfig.lib.json +15 -0
- package/tsconfig.lib.prod.json +10 -0
- package/tsconfig.spec.json +17 -0
- package/esm2022/btv-base-controls.mjs +0 -5
- package/esm2022/lib/basic.module.mjs +0 -64
- package/esm2022/lib/blink-message/blink-message.component.mjs +0 -54
- package/esm2022/lib/btv-icon-button/btv-counter-button.mjs +0 -47
- package/esm2022/lib/btv-icon-button/btv-icon-button.component.mjs +0 -89
- package/esm2022/lib/btv-progress/btv-progress.component.mjs +0 -71
- package/esm2022/lib/btv-search/btv-search.component.mjs +0 -82
- package/esm2022/lib/busy-indicator/busy-indicator.component.mjs +0 -16
- package/esm2022/lib/custom-tool-tip/custom-tool-tip.component.mjs +0 -34
- package/esm2022/lib/custom-tool-tip/tool-tip-renderer.directive.mjs +0 -113
- package/esm2022/lib/illustration/illustration.component.mjs +0 -17
- package/esm2022/lib/wm-avatar/avatar.component.mjs +0 -175
- package/esm2022/lib/wm-back-btn/wm-back-btn.component.mjs +0 -26
- package/esm2022/lib/wm-beta-text/wm-beta-text.component.mjs +0 -19
- package/esm2022/lib/wm-info/info-models.mjs +0 -13
- package/esm2022/lib/wm-info/wm-info.component.mjs +0 -237
- package/esm2022/lib/wm-info-card/wm-info-card.component.mjs +0 -23
- package/esm2022/lib/wm-no-content/wm-no-content.component.mjs +0 -30
- package/esm2022/lib/wm-panel-bar/wm-panel-bar.component.mjs +0 -78
- package/esm2022/lib/wm-scalable-div/scalable-div.component.mjs +0 -105
- package/esm2022/lib/wm-spinner/wm-spinner.component.mjs +0 -135
- package/esm2022/lib/wm-state-icon/wm-state-icon.component.mjs +0 -18
- package/esm2022/lib/wm-tag/wm-tag.component.mjs +0 -28
- package/esm2022/lib/wm-tamplate-image/wm-template-image.component.mjs +0 -71
- package/esm2022/lib/wm-toggle/wm-toggle.component.mjs +0 -31
- package/esm2022/models/guidExtension.mjs +0 -15
- package/esm2022/public-api.mjs +0 -28
- package/fesm2022/btv-base-controls.mjs +0 -1496
- package/fesm2022/btv-base-controls.mjs.map +0 -1
- package/index.d.ts +0 -5
- package/lib/basic.module.d.ts +0 -33
- package/lib/blink-message/blink-message.component.d.ts +0 -20
- package/lib/btv-icon-button/btv-counter-button.d.ts +0 -12
- package/lib/btv-icon-button/btv-icon-button.component.d.ts +0 -30
- package/lib/btv-progress/btv-progress.component.d.ts +0 -20
- package/lib/btv-search/btv-search.component.d.ts +0 -31
- package/lib/busy-indicator/busy-indicator.component.d.ts +0 -7
- package/lib/custom-tool-tip/custom-tool-tip.component.d.ts +0 -35
- package/lib/custom-tool-tip/tool-tip-renderer.directive.d.ts +0 -49
- package/lib/illustration/illustration.component.d.ts +0 -10
- package/lib/wm-avatar/avatar.component.d.ts +0 -63
- package/lib/wm-back-btn/wm-back-btn.component.d.ts +0 -10
- package/lib/wm-beta-text/wm-beta-text.component.d.ts +0 -7
- package/lib/wm-info/info-models.d.ts +0 -20
- package/lib/wm-info/wm-info.component.d.ts +0 -34
- package/lib/wm-info-card/wm-info-card.component.d.ts +0 -9
- package/lib/wm-no-content/wm-no-content.component.d.ts +0 -11
- package/lib/wm-panel-bar/wm-panel-bar.component.d.ts +0 -25
- package/lib/wm-scalable-div/scalable-div.component.d.ts +0 -24
- package/lib/wm-spinner/wm-spinner.component.d.ts +0 -37
- package/lib/wm-state-icon/wm-state-icon.component.d.ts +0 -9
- package/lib/wm-tag/wm-tag.component.d.ts +0 -10
- package/lib/wm-tamplate-image/wm-template-image.component.d.ts +0 -49
- package/lib/wm-toggle/wm-toggle.component.d.ts +0 -11
- package/models/guidExtension.d.ts +0 -5
- package/public-api.d.ts +0 -24
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
@import './../../assets/theme/wmGlobals.scss';
|
|
2
|
+
|
|
3
|
+
:host {
|
|
4
|
+
display: block;
|
|
5
|
+
background: var(--pageBackgroundColor);
|
|
6
|
+
border: 1px solid;
|
|
7
|
+
border-radius: 4px;
|
|
8
|
+
border-color: var(--secondaryHover);
|
|
9
|
+
cursor: pointer;
|
|
10
|
+
box-sizing: border-box;
|
|
11
|
+
width: 36px;
|
|
12
|
+
height: 36px;
|
|
13
|
+
flex-shrink: 0;
|
|
14
|
+
|
|
15
|
+
&:focus,
|
|
16
|
+
&:hover {
|
|
17
|
+
|
|
18
|
+
.icon {
|
|
19
|
+
outline: none;
|
|
20
|
+
background: var(--secondaryHover);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
:host(.u-no-border) {
|
|
26
|
+
border-width: 0px;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
:host(.small) {
|
|
30
|
+
width: 16px;
|
|
31
|
+
height: 16px;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
:host(.medium) {
|
|
35
|
+
width: 30px;
|
|
36
|
+
height: 30px;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
:host(.disabled) {
|
|
40
|
+
background-color: var(--disabledColor);
|
|
41
|
+
border-color: var(--disabledColor);
|
|
42
|
+
color: var(--lightFontColor);
|
|
43
|
+
cursor: default;
|
|
44
|
+
|
|
45
|
+
&:hover {
|
|
46
|
+
background-color: var(--disabledColor);
|
|
47
|
+
border-color: var(--disabledColor);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.icon {
|
|
51
|
+
cursor: default;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
:host(.danger) {
|
|
56
|
+
background-color: var(--dangerColor);
|
|
57
|
+
border-color: var(--warningColor);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.tooltip-text {
|
|
61
|
+
align-self: center;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.tooltip-disabled {
|
|
65
|
+
font-size: $fontSize -2;
|
|
66
|
+
counter-reset: var(--lightFontColor);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.icon {
|
|
70
|
+
@include flexJA(center, center);
|
|
71
|
+
width: 100%;
|
|
72
|
+
height: 100%;
|
|
73
|
+
border: 0px;
|
|
74
|
+
cursor: pointer;
|
|
75
|
+
|
|
76
|
+
color: var(--strongFontColor);
|
|
77
|
+
outline: 0px;
|
|
78
|
+
padding: 0px;
|
|
79
|
+
background: transparent;
|
|
80
|
+
border-radius: inherit;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.wm-counter-button {
|
|
84
|
+
position: relative;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.wm-counter {
|
|
88
|
+
display: inline-block;
|
|
89
|
+
width: 16px;
|
|
90
|
+
height: 16px;
|
|
91
|
+
line-height: 16px;
|
|
92
|
+
position: absolute;
|
|
93
|
+
top: 0px;
|
|
94
|
+
right: 0px;
|
|
95
|
+
border: none;
|
|
96
|
+
background-color: var(--dangerColor);
|
|
97
|
+
border-radius: 50%;
|
|
98
|
+
font-size: $fontSize - 4;
|
|
99
|
+
font-weight: bold;
|
|
100
|
+
text-align: center;
|
|
101
|
+
color: var(--strongFontColor);
|
|
102
|
+
text-indent: -1px;
|
|
103
|
+
overflow: hidden;
|
|
104
|
+
white-space: nowrap;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.u-btn-validate {
|
|
108
|
+
border-color: var(--dangerColor);
|
|
109
|
+
background-color: var(--dangerColor);
|
|
110
|
+
color: var(--onBrandTextColor);
|
|
111
|
+
|
|
112
|
+
&:hover {
|
|
113
|
+
background-color: var(--dangerColor);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.u-btn-primary {
|
|
118
|
+
border-color: var(--brandColor);
|
|
119
|
+
background-color: var(--brandColor);
|
|
120
|
+
color: var(--onBrandTextColor);
|
|
121
|
+
|
|
122
|
+
&:hover {
|
|
123
|
+
background-color: var(--onBrandHoverColor);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './btv-icon-button.component';
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { Component, Input } from '@angular/core';
|
|
2
|
+
|
|
3
|
+
@Component({
|
|
4
|
+
selector: 'btv-progress',
|
|
5
|
+
styleUrls: ['./btv-progress.scss'],
|
|
6
|
+
templateUrl: './btv-progress.html'
|
|
7
|
+
})
|
|
8
|
+
export class BtvProgressComponent {
|
|
9
|
+
|
|
10
|
+
relativeValue: number = 0;
|
|
11
|
+
|
|
12
|
+
private _val: number = 0;
|
|
13
|
+
|
|
14
|
+
@Input() height: number = 8;
|
|
15
|
+
get val() {
|
|
16
|
+
return this._val;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
@Input() set val(val: number) {
|
|
20
|
+
this._val = val;
|
|
21
|
+
this.relativeValue = this.calcRelativeValue(val, this.max);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
private _max: number = 0;
|
|
25
|
+
get max() {
|
|
26
|
+
return this._max;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
@Input() set max(m: number) {
|
|
30
|
+
this._max = m;
|
|
31
|
+
this.relativeValue = this.calcRelativeValue(this._val, m);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
@Input() color: string = '#ffffff';
|
|
36
|
+
|
|
37
|
+
public _backColor: string = '#4e5a6b';
|
|
38
|
+
|
|
39
|
+
@Input() set backColor(value: string) {
|
|
40
|
+
if (value) {
|
|
41
|
+
this._backColor = value;
|
|
42
|
+
} else {
|
|
43
|
+
this._backColor = '#4e5a6b';
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
get backColor() {
|
|
48
|
+
return this._backColor;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
@Input() showFlag: boolean = false;
|
|
52
|
+
|
|
53
|
+
getFlagPosition(): string {
|
|
54
|
+
const max = this.max;
|
|
55
|
+
const val = this.val;
|
|
56
|
+
if (!max) return '0';
|
|
57
|
+
const percent = val / max * 100;
|
|
58
|
+
return percent + '%';
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
calcRelativeValue(value, max) {
|
|
62
|
+
if (!max) return 100;
|
|
63
|
+
return (value / max) * 100;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<div class="progress-wrap" [ngStyle]="{'height': height + 'px'}">
|
|
2
|
+
<div class="progress" [ngStyle]="{'background-color': backColor}">
|
|
3
|
+
<div class="progress-fill" [ngStyle]="{'width': relativeValue + '%', 'background-color': color}"></div>
|
|
4
|
+
<!--workaround for css image resolve plugin-->
|
|
5
|
+
<div *ngIf="showFlag" class="flag" [ngStyle]="{
|
|
6
|
+
'margin-left': getFlagPosition(),
|
|
7
|
+
'background-image': 'url(./assets/img/flag.png)'
|
|
8
|
+
}">
|
|
9
|
+
</div>
|
|
10
|
+
</div>
|
|
11
|
+
</div>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
@import './../../assets/theme/wmGlobals.scss';
|
|
2
|
+
.progress-wrap {
|
|
3
|
+
display: block;
|
|
4
|
+
width: 100%;
|
|
5
|
+
height: 8px;
|
|
6
|
+
}
|
|
7
|
+
.progress {
|
|
8
|
+
width: 100%;
|
|
9
|
+
height: 100%;
|
|
10
|
+
position: relative;
|
|
11
|
+
}
|
|
12
|
+
.progress-fill {
|
|
13
|
+
position: absolute;
|
|
14
|
+
height: 100%;
|
|
15
|
+
}
|
|
16
|
+
.flag {
|
|
17
|
+
position: absolute;
|
|
18
|
+
height: 14px;
|
|
19
|
+
width: 8px;
|
|
20
|
+
margin-top: -4px;
|
|
21
|
+
position: absolute;
|
|
22
|
+
background-repeat: no-repeat;
|
|
23
|
+
transform: scale(1, 0.7);
|
|
24
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { Component, ElementRef, EventEmitter, Input, OnDestroy, OnInit, Output, ViewChild } from '@angular/core';
|
|
2
|
+
import { fromEvent, Subscription } from 'rxjs';
|
|
3
|
+
import { debounceTime, distinctUntilChanged, map } from 'rxjs/operators';
|
|
4
|
+
|
|
5
|
+
export class ViewState {
|
|
6
|
+
get isLaptop() { return window.innerWidth <= 1440; }
|
|
7
|
+
get isMobile() { return window.innerWidth <= 1024; }
|
|
8
|
+
get isPhone() { return window.innerWidth <= 767; }
|
|
9
|
+
public isWidthLessOrEqualTo(width: number) { return window.innerWidth <= width; }
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
@Component({
|
|
13
|
+
selector: 'btv-search',
|
|
14
|
+
styleUrls: ['./btv-search.scss'],
|
|
15
|
+
templateUrl: './btv-search.html'
|
|
16
|
+
})
|
|
17
|
+
|
|
18
|
+
export class BtvSearch implements OnInit, OnDestroy {
|
|
19
|
+
@Input() widthAuto: boolean = false;
|
|
20
|
+
@Input() isSmall: boolean = false;
|
|
21
|
+
@Input() searchRight: string;
|
|
22
|
+
@Input() placeholder: string = 'Search';
|
|
23
|
+
@Input() keepExpanded: boolean = false;
|
|
24
|
+
searchFocus: boolean = false;
|
|
25
|
+
view: ViewState = new ViewState();
|
|
26
|
+
@ViewChild('searchBox', { static: true }) box: ElementRef;
|
|
27
|
+
@Output() searchTextChange: EventEmitter<string> = new EventEmitter<string>();
|
|
28
|
+
public expanded: boolean;
|
|
29
|
+
private _searchSubscription: Subscription;
|
|
30
|
+
|
|
31
|
+
private _searchText: string;
|
|
32
|
+
|
|
33
|
+
@Input() set searchText(value: string) {
|
|
34
|
+
if (value === this._searchText) return;
|
|
35
|
+
this._searchText = value;
|
|
36
|
+
if (value) {
|
|
37
|
+
this.expanded = true;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
get searchText(): string {
|
|
42
|
+
return this._searchText || '';
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
constructor() {
|
|
46
|
+
this.expanded = false;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
ngOnInit() {
|
|
50
|
+
let box = this.box.nativeElement;
|
|
51
|
+
let observable = fromEvent(box, 'keyup').pipe(
|
|
52
|
+
debounceTime(400),
|
|
53
|
+
distinctUntilChanged(),
|
|
54
|
+
map(x => <string>(<any>x).target.value)
|
|
55
|
+
);
|
|
56
|
+
this._searchSubscription = observable.subscribe(it => {
|
|
57
|
+
this.searchTextChange.emit(it);
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
ngOnDestroy(): void {
|
|
62
|
+
if (this._searchSubscription) this._searchSubscription.unsubscribe();
|
|
63
|
+
}
|
|
64
|
+
toggleSearch() {
|
|
65
|
+
this.expanded = !this.expanded;
|
|
66
|
+
if (this.box && this.expanded) {
|
|
67
|
+
this.box.nativeElement.focus();
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
onFocusOut() {
|
|
72
|
+
if (!this.box.nativeElement.value && this.expanded && !this.keepExpanded) {
|
|
73
|
+
this.expanded = false;
|
|
74
|
+
}
|
|
75
|
+
this.searchFocus = false;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<div class="wm-search flex-row" [ngClass]="{'search-reverse': searchRight == 'right', 'always-opened': keepExpanded, 'small': isSmall}">
|
|
2
|
+
<div class="search-icon inline-col" [ngClass]="{'search-toggle-disabled': keepExpanded || !searchFocus}"
|
|
3
|
+
(click)="toggleSearch()">
|
|
4
|
+
<wm-template-image class="marginXA" icon="search" [light]="(!expanded && !searchFocus) || keepExpanded">
|
|
5
|
+
</wm-template-image>
|
|
6
|
+
</div>
|
|
7
|
+
<div class="search-wrap flex-col"
|
|
8
|
+
[ngClass]="{'search-open': keepExpanded || expanded, 'search-focused': (expanded && searchFocus) || (keepExpanded && searchFocus),
|
|
9
|
+
'width-auto': widthAuto}">
|
|
10
|
+
<input class="search-field" #searchBox
|
|
11
|
+
[value]="searchText"
|
|
12
|
+
[placeholder]="placeholder"
|
|
13
|
+
(focus)="searchFocus = true" (focusout)="onFocusOut()">
|
|
14
|
+
</div>
|
|
15
|
+
</div>
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
@import './../../assets/theme/wmGlobals.scss';
|
|
2
|
+
|
|
3
|
+
.wm-search,
|
|
4
|
+
.search-wrap,
|
|
5
|
+
.search-field {
|
|
6
|
+
box-sizing: border-box;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.wm-search {
|
|
10
|
+
&:hover {
|
|
11
|
+
border-color: var(--brandColor);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.wm-search {
|
|
16
|
+
background: var(--pageBackgroundColor);
|
|
17
|
+
height: 36px;
|
|
18
|
+
max-width: 280px;
|
|
19
|
+
border-radius: 4px;
|
|
20
|
+
align-items: center;
|
|
21
|
+
flex: 1 0 100%;
|
|
22
|
+
flex-shrink: 0;
|
|
23
|
+
border: 1px solid var(--secondaryHover);
|
|
24
|
+
|
|
25
|
+
&.small {
|
|
26
|
+
max-width: 140px;
|
|
27
|
+
.search-open {
|
|
28
|
+
width:auto;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.search-icon {
|
|
34
|
+
width: 36px;
|
|
35
|
+
height: 100%;
|
|
36
|
+
flex-shrink: 0;
|
|
37
|
+
cursor: pointer;
|
|
38
|
+
|
|
39
|
+
&.search-toggle-disabled {
|
|
40
|
+
cursor: text;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.search-wrap {
|
|
45
|
+
width: 0px;
|
|
46
|
+
height: 100%;
|
|
47
|
+
color: var(--mediumFontColor);
|
|
48
|
+
direction: ltr;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.search-open {
|
|
52
|
+
width: 280px;
|
|
53
|
+
max-width: 100%;
|
|
54
|
+
flex-grow: 1;
|
|
55
|
+
flex-shrink: 1;
|
|
56
|
+
&.width-auto {
|
|
57
|
+
width: auto;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.search-open:hover,
|
|
62
|
+
.search-focused {
|
|
63
|
+
color: var(--strongFontColor);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
.search-field {
|
|
68
|
+
width: 100%;
|
|
69
|
+
height: 100%;
|
|
70
|
+
color: inherit;
|
|
71
|
+
text-indent: 0.1em;
|
|
72
|
+
font-size: $fontSize + 2;
|
|
73
|
+
padding: 0;
|
|
74
|
+
background-color: transparent;
|
|
75
|
+
border: none;
|
|
76
|
+
outline: none;
|
|
77
|
+
padding: 0px 8px 0 0;
|
|
78
|
+
|
|
79
|
+
&::placeholder {
|
|
80
|
+
color: var(--disabledTextColor);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.search-reverse {
|
|
86
|
+
display: flex;
|
|
87
|
+
flex-direction: row-reverse;
|
|
88
|
+
|
|
89
|
+
.search-wrap {
|
|
90
|
+
direction: rtl;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.search-field {
|
|
94
|
+
direction: ltr;
|
|
95
|
+
padding: 0px 8px;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './btv-search.component';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ChangeDetectionStrategy, Component, Input } from '@angular/core';
|
|
2
|
+
|
|
3
|
+
@Component({
|
|
4
|
+
selector: 'wm-busy-indicator',
|
|
5
|
+
styleUrls: ['./busy-indicator.scss'],
|
|
6
|
+
templateUrl: './busy-indicator.html',
|
|
7
|
+
changeDetection: ChangeDetectionStrategy.OnPush
|
|
8
|
+
})
|
|
9
|
+
export class BusyIndicatorComponent {
|
|
10
|
+
|
|
11
|
+
@Input() public busy: boolean;
|
|
12
|
+
@Input() public long: boolean;
|
|
13
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
@import './../../assets/theme/wmGlobals.scss';
|
|
2
|
+
.load-snake-wrap {
|
|
3
|
+
width: 120px;
|
|
4
|
+
height: 12px;
|
|
5
|
+
overflow: hidden;
|
|
6
|
+
align-self: flex-end;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.snake-field {
|
|
10
|
+
display: block;
|
|
11
|
+
width: 100%;
|
|
12
|
+
height: 2px;
|
|
13
|
+
background: #22252C;
|
|
14
|
+
top: 5px;
|
|
15
|
+
position: relative;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.snake {
|
|
19
|
+
display: inline-block;
|
|
20
|
+
width: 80px;
|
|
21
|
+
height: 2px;
|
|
22
|
+
background: #7F868C;
|
|
23
|
+
animation-play-state: running;
|
|
24
|
+
position: relative;
|
|
25
|
+
top: -9px;
|
|
26
|
+
animation: snakeMove 2s linear 0s infinite;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.snake-shadow {
|
|
30
|
+
display: inline-block;
|
|
31
|
+
width: 40px;
|
|
32
|
+
height: 8px;
|
|
33
|
+
position: absolute;
|
|
34
|
+
margin-top: -3px;
|
|
35
|
+
animation: rotate 2s linear 0s infinite;
|
|
36
|
+
animation-play-state: running;
|
|
37
|
+
border-radius: 25%;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.long-snake-wrap {
|
|
41
|
+
width: 400px;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.longSnake {
|
|
45
|
+
animation: snakeLongMove 3s linear 0s infinite;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.longRotate {
|
|
49
|
+
animation: rotate 3s linear 0s infinite;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
@keyframes snakeMove {
|
|
53
|
+
0% {
|
|
54
|
+
left: -80px;
|
|
55
|
+
}
|
|
56
|
+
50% {
|
|
57
|
+
left: 200px;
|
|
58
|
+
}
|
|
59
|
+
100% {
|
|
60
|
+
left: -200px;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
@keyframes snakeLongMove {
|
|
65
|
+
0% {
|
|
66
|
+
left: -80px;
|
|
67
|
+
}
|
|
68
|
+
50% {
|
|
69
|
+
left: 440px;
|
|
70
|
+
}
|
|
71
|
+
100% {
|
|
72
|
+
left: -200px;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
@keyframes rotate {
|
|
77
|
+
0% {
|
|
78
|
+
background: linear-gradient(to right, rgba(0, 0, 0, 0) 0%, rgba(152, 141, 103, 0.4) 100%);
|
|
79
|
+
right: 0px;
|
|
80
|
+
}
|
|
81
|
+
100% {
|
|
82
|
+
background: linear-gradient(to left, rgba(0, 0, 0, 0) 0%, rgba(152, 141, 103, 0.4) 100%);
|
|
83
|
+
left: 0px;
|
|
84
|
+
right: unset;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
@import './../../assets/theme/wmGlobals.scss';
|
|
2
|
+
|
|
3
|
+
.tooltip-container {
|
|
4
|
+
position: relative;
|
|
5
|
+
box-sizing: border-box;
|
|
6
|
+
box-shadow: 0px 16px 16px -1px rgb(5 29 57 / 10%);
|
|
7
|
+
border-radius: 4px;
|
|
8
|
+
-webkit-appearance: none;
|
|
9
|
+
|
|
10
|
+
&:before {
|
|
11
|
+
content: '';
|
|
12
|
+
display: block;
|
|
13
|
+
width: 0;
|
|
14
|
+
height: 0;
|
|
15
|
+
border-style: solid;
|
|
16
|
+
border-width: 6px;
|
|
17
|
+
border-color: transparent;
|
|
18
|
+
left: 50%;
|
|
19
|
+
bottom: -12px;
|
|
20
|
+
margin-left: -6.0625px;
|
|
21
|
+
border-top-color: var(--pageBackgroundColor);
|
|
22
|
+
position: absolute;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.mat-tooltip {
|
|
27
|
+
font-family: $fontFamily;
|
|
28
|
+
margin: 0;
|
|
29
|
+
transform-origin: center top;
|
|
30
|
+
box-shadow: none;
|
|
31
|
+
background: var(--pageBackgroundColor);
|
|
32
|
+
color: var(--strongFontColor);
|
|
33
|
+
border-radius: 2px;
|
|
34
|
+
z-index: 12000;
|
|
35
|
+
border-style: solid;
|
|
36
|
+
border-width: 0;
|
|
37
|
+
padding: 5px 5px 5px 6px;
|
|
38
|
+
background-repeat: repeat-x;
|
|
39
|
+
min-width: 20px;
|
|
40
|
+
text-align: center;
|
|
41
|
+
font-size: 14px;
|
|
42
|
+
transform: scale(1)!important;
|
|
43
|
+
|
|
44
|
+
&.mat-tooltip-show {
|
|
45
|
+
animation:none
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { Component, OnInit, Input, TemplateRef } from '@angular/core';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* This component will be used to show custom tooltip
|
|
5
|
+
*
|
|
6
|
+
* This component will be rendered using OverlayModule of angular material
|
|
7
|
+
* This component will be rendered by directive on an Overlay
|
|
8
|
+
*
|
|
9
|
+
* CONSUMER will not be using this component directly
|
|
10
|
+
* This component will be hosted in an overlay by ToolTipRenderer directive
|
|
11
|
+
* This component exposes two properties. These two properties will be filled by ToolTipRenderer directive
|
|
12
|
+
* 1. text - This is a simple string which is to be shown in the tooltip; This will be injected in the ToolTipRenderer directive
|
|
13
|
+
* by the consumer
|
|
14
|
+
* 2. contentTemplate - This gives finer control on the content to be shown in the tooltip
|
|
15
|
+
*
|
|
16
|
+
* NOTE - ONLY one should be specified; If BOTH are specified then "template" will be rendered and "text" will be ignored
|
|
17
|
+
*/
|
|
18
|
+
@Component({
|
|
19
|
+
selector: 'app-custom-tool-tip',
|
|
20
|
+
templateUrl: './custom-tool-tip.component.html',
|
|
21
|
+
styleUrls: ['./custom-tool-tip.component.scss']
|
|
22
|
+
})
|
|
23
|
+
export class CustomToolTipComponent implements OnInit {
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* This is simple text which is to be shown in the tooltip
|
|
27
|
+
*/
|
|
28
|
+
@Input() text: string;
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* This provides finer control on the content to be visible on the tooltip
|
|
32
|
+
* This template will be injected in McToolTipRenderer directive in the consumer template
|
|
33
|
+
* <ng-template #template>
|
|
34
|
+
* content.....
|
|
35
|
+
* </ng-template>
|
|
36
|
+
*/
|
|
37
|
+
@Input() contentTemplate: TemplateRef<any>;
|
|
38
|
+
|
|
39
|
+
constructor() { }
|
|
40
|
+
|
|
41
|
+
ngOnInit() {
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
}
|