btv-base-controls 0.1.28 → 0.1.30

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (136) hide show
  1. package/esm2022/btv-base-controls.mjs +5 -0
  2. package/esm2022/lib/basic.module.mjs +64 -0
  3. package/esm2022/lib/blink-message/blink-message.component.mjs +54 -0
  4. package/esm2022/lib/btv-icon-button/btv-counter-button.mjs +47 -0
  5. package/esm2022/lib/btv-icon-button/btv-icon-button.component.mjs +91 -0
  6. package/esm2022/lib/btv-progress/btv-progress.component.mjs +71 -0
  7. package/esm2022/lib/btv-search/btv-search.component.mjs +82 -0
  8. package/esm2022/lib/btv-search/index.mjs +2 -0
  9. package/esm2022/lib/busy-indicator/busy-indicator.component.mjs +16 -0
  10. package/esm2022/lib/custom-tool-tip/custom-tool-tip.component.mjs +34 -0
  11. package/esm2022/lib/custom-tool-tip/tool-tip-renderer.directive.mjs +113 -0
  12. package/esm2022/lib/illustration/illustration.component.mjs +17 -0
  13. package/esm2022/lib/wm-avatar/avatar.component.mjs +175 -0
  14. package/esm2022/lib/wm-back-btn/wm-back-btn.component.mjs +26 -0
  15. package/esm2022/lib/wm-beta-text/wm-beta-text.component.mjs +19 -0
  16. package/esm2022/lib/wm-info/info-models.mjs +14 -0
  17. package/esm2022/lib/wm-info/wm-info.component.mjs +239 -0
  18. package/esm2022/lib/wm-info-card/wm-info-card.component.mjs +23 -0
  19. package/esm2022/lib/wm-no-content/wm-no-content.component.mjs +30 -0
  20. package/esm2022/lib/wm-panel-bar/wm-panel-bar.component.mjs +81 -0
  21. package/esm2022/lib/wm-scalable-div/scalable-div.component.mjs +105 -0
  22. package/esm2022/lib/wm-spinner/wm-spinner.component.mjs +135 -0
  23. package/esm2022/lib/wm-state-icon/wm-state-icon.component.mjs +18 -0
  24. package/esm2022/lib/wm-tag/wm-tag.component.mjs +28 -0
  25. package/esm2022/lib/wm-tamplate-image/wm-template-image.component.mjs +71 -0
  26. package/esm2022/lib/wm-toggle/wm-toggle.component.mjs +31 -0
  27. package/esm2022/models/guidExtension.mjs +15 -0
  28. package/esm2022/public-api.mjs +28 -0
  29. package/fesm2022/btv-base-controls.mjs +1503 -0
  30. package/fesm2022/btv-base-controls.mjs.map +1 -0
  31. package/index.d.ts +5 -0
  32. package/lib/basic.module.d.ts +33 -0
  33. package/lib/blink-message/blink-message.component.d.ts +20 -0
  34. package/lib/btv-icon-button/btv-counter-button.d.ts +12 -0
  35. package/lib/btv-icon-button/btv-icon-button.component.d.ts +32 -0
  36. package/lib/btv-progress/btv-progress.component.d.ts +20 -0
  37. package/lib/btv-search/btv-search.component.d.ts +31 -0
  38. package/{src/lib/btv-search/index.ts → lib/btv-search/index.d.ts} +1 -1
  39. package/lib/busy-indicator/busy-indicator.component.d.ts +7 -0
  40. package/lib/custom-tool-tip/custom-tool-tip.component.d.ts +35 -0
  41. package/lib/custom-tool-tip/tool-tip-renderer.directive.d.ts +49 -0
  42. package/lib/illustration/illustration.component.d.ts +10 -0
  43. package/lib/wm-avatar/avatar.component.d.ts +63 -0
  44. package/lib/wm-back-btn/wm-back-btn.component.d.ts +10 -0
  45. package/lib/wm-beta-text/wm-beta-text.component.d.ts +7 -0
  46. package/lib/wm-info/info-models.d.ts +21 -0
  47. package/lib/wm-info/wm-info.component.d.ts +34 -0
  48. package/lib/wm-info-card/wm-info-card.component.d.ts +9 -0
  49. package/lib/wm-no-content/wm-no-content.component.d.ts +11 -0
  50. package/lib/wm-panel-bar/wm-panel-bar.component.d.ts +26 -0
  51. package/lib/wm-scalable-div/scalable-div.component.d.ts +24 -0
  52. package/lib/wm-spinner/wm-spinner.component.d.ts +37 -0
  53. package/lib/wm-state-icon/wm-state-icon.component.d.ts +9 -0
  54. package/lib/wm-tag/wm-tag.component.d.ts +10 -0
  55. package/lib/wm-tamplate-image/wm-template-image.component.d.ts +49 -0
  56. package/lib/wm-toggle/wm-toggle.component.d.ts +11 -0
  57. package/models/guidExtension.d.ts +5 -0
  58. package/package.json +24 -10
  59. package/public-api.d.ts +24 -0
  60. package/.browserslistrc +0 -16
  61. package/karma.conf.js +0 -44
  62. package/ng-package.json +0 -7
  63. package/src/assets/icon/state-icons.png +0 -0
  64. package/src/assets/theme/wmGlobals.scss +0 -181
  65. package/src/lib/basic.module.ts +0 -48
  66. package/src/lib/blink-message/blink-message.component.html +0 -1
  67. package/src/lib/blink-message/blink-message.component.scss +0 -4
  68. package/src/lib/blink-message/blink-message.component.ts +0 -54
  69. package/src/lib/btv-icon-button/btv-counter-button.html +0 -18
  70. package/src/lib/btv-icon-button/btv-counter-button.ts +0 -34
  71. package/src/lib/btv-icon-button/btv-icon-button.component.ts +0 -64
  72. package/src/lib/btv-icon-button/btv-icon-button.html +0 -14
  73. package/src/lib/btv-icon-button/btv-icon-button.scss +0 -124
  74. package/src/lib/btv-icon-button/index.ts +0 -1
  75. package/src/lib/btv-progress/btv-progress.component.ts +0 -65
  76. package/src/lib/btv-progress/btv-progress.html +0 -11
  77. package/src/lib/btv-progress/btv-progress.scss +0 -24
  78. package/src/lib/btv-search/btv-search.component.ts +0 -78
  79. package/src/lib/btv-search/btv-search.html +0 -15
  80. package/src/lib/btv-search/btv-search.scss +0 -97
  81. package/src/lib/busy-indicator/busy-indicator.component.ts +0 -13
  82. package/src/lib/busy-indicator/busy-indicator.html +0 -6
  83. package/src/lib/busy-indicator/busy-indicator.scss +0 -86
  84. package/src/lib/custom-tool-tip/custom-tool-tip.component.html +0 -9
  85. package/src/lib/custom-tool-tip/custom-tool-tip.component.scss +0 -47
  86. package/src/lib/custom-tool-tip/custom-tool-tip.component.ts +0 -44
  87. package/src/lib/custom-tool-tip/tool-tip-renderer.directive.ts +0 -111
  88. package/src/lib/illustration/illustration.component.html +0 -412
  89. package/src/lib/illustration/illustration.component.scss +0 -48
  90. package/src/lib/illustration/illustration.component.ts +0 -21
  91. package/src/lib/wm-avatar/avatar.component.ts +0 -179
  92. package/src/lib/wm-avatar/avatar.html +0 -13
  93. package/src/lib/wm-avatar/avatar.scss +0 -3
  94. package/src/lib/wm-back-btn/wm-back-btn.component.ts +0 -19
  95. package/src/lib/wm-back-btn/wm-back-btn.html +0 -7
  96. package/src/lib/wm-back-btn/wm-back-btn.scss +0 -51
  97. package/src/lib/wm-beta-text/wm-beta-text.component.html +0 -1
  98. package/src/lib/wm-beta-text/wm-beta-text.component.scss +0 -44
  99. package/src/lib/wm-beta-text/wm-beta-text.component.ts +0 -14
  100. package/src/lib/wm-info/info-models.ts +0 -22
  101. package/src/lib/wm-info/wm-info.component.ts +0 -238
  102. package/src/lib/wm-info/wm-info.html +0 -19
  103. package/src/lib/wm-info/wm-info.scss +0 -64
  104. package/src/lib/wm-info-card/wm-info-card.component.ts +0 -14
  105. package/src/lib/wm-info-card/wm-info-card.html +0 -13
  106. package/src/lib/wm-info-card/wm-info-card.scss +0 -56
  107. package/src/lib/wm-no-content/wm-no-content.component.ts +0 -17
  108. package/src/lib/wm-no-content/wm-no-content.html +0 -13
  109. package/src/lib/wm-no-content/wm-no-content.scss +0 -60
  110. package/src/lib/wm-panel-bar/wm-panel-bar.component.ts +0 -60
  111. package/src/lib/wm-panel-bar/wm-panel-bar.html +0 -43
  112. package/src/lib/wm-panel-bar/wm-panel-bar.scss +0 -114
  113. package/src/lib/wm-scalable-div/scalable-div.component.ts +0 -106
  114. package/src/lib/wm-scalable-div/scalable-div.html +0 -1
  115. package/src/lib/wm-scalable-div/scalable-div.scss +0 -11
  116. package/src/lib/wm-spinner/wm-spinner.component.ts +0 -129
  117. package/src/lib/wm-spinner/wm-spinner.html +0 -37
  118. package/src/lib/wm-spinner/wm-spinner.scss +0 -72
  119. package/src/lib/wm-state-icon/wm-state-icon.component.html +0 -4
  120. package/src/lib/wm-state-icon/wm-state-icon.component.scss +0 -26
  121. package/src/lib/wm-state-icon/wm-state-icon.component.ts +0 -18
  122. package/src/lib/wm-tag/wm-tag.component.html +0 -8
  123. package/src/lib/wm-tag/wm-tag.component.scss +0 -48
  124. package/src/lib/wm-tag/wm-tag.component.ts +0 -17
  125. package/src/lib/wm-tamplate-image/wm-template-image.component.ts +0 -56
  126. package/src/lib/wm-tamplate-image/wm-template-image.html +0 -3
  127. package/src/lib/wm-tamplate-image/wm-template-image.scss +0 -31
  128. package/src/lib/wm-toggle/wm-toggle.component.ts +0 -20
  129. package/src/lib/wm-toggle/wm-toggle.html +0 -5
  130. package/src/lib/wm-toggle/wm-toggle.scss +0 -33
  131. package/src/models/guidExtension.ts +0 -16
  132. package/src/public-api.ts +0 -29
  133. package/src/test.ts +0 -15
  134. package/tsconfig.lib.json +0 -15
  135. package/tsconfig.lib.prod.json +0 -10
  136. package/tsconfig.spec.json +0 -17
@@ -1,181 +0,0 @@
1
- /** GLobal Colors **/
2
-
3
- // page width
4
- $smWidth: 640px;
5
- $smallWidth: 1024px;
6
- $standardWidth: 1440px;
7
- $a4: 794px;
8
-
9
- // A4 sizes
10
- $paper-a4-portrait-x: 210mm;
11
- $paper-a4-portrait-y: 297mm;
12
-
13
- // wizard windows (inner content)
14
- $wizardMediumWidth: 720px;
15
- $wizardMediumHeight: 420px;
16
-
17
- // box-shadow
18
- $boxShadow: 0 0 1px 0 rgba(5, 29, 57, 0.07),
19
- 0 6px 6px -1px rgba(5, 29, 57, 0.10);
20
-
21
- // border-radius
22
- $standardBorderRadius: 4px;
23
-
24
- // font-weight FontWeight
25
- $regularFontWeight: 400;
26
- $semiBoldFontWeight: 600;
27
- $boldFontWeight: 700;
28
-
29
- // Font style
30
- $fontSizeHeader: 24px;
31
- $lineHeightHeader: 32px;
32
- $fontSize: 14px;
33
- $lineHeight: 24px;
34
- $fontSizeList: 12px;
35
- $lineHeightListPX: 20px;
36
- $lineHeightList: 2.74em;
37
- $fontFamily: Inter,
38
- Verdana,
39
- Geneva,
40
- Tahoma,
41
- sans-serif;
42
- //color for text
43
- //-------------------------
44
- ////detail grid header, row
45
- // -----------
46
- $GreenishColor: #879992;
47
- // color for dropdown, input
48
- $color6F777A: #6F777A;
49
- // background color for splitter splitbar
50
- $color71807A: #71807A;
51
- //background-color and border-color for list
52
- $color424651: #424651;
53
-
54
- // border for list in kendo popup
55
- $colorF1F2F4: #F1F2F4;
56
-
57
-
58
- @mixin flexJA($just, $align) {
59
- justify-content: $just;
60
- align-items: $align;
61
- }
62
-
63
- @mixin flex($display, $direction, $justify, $align) {
64
- display: $display;
65
- flex-direction: $direction;
66
- justify-content: $justify;
67
- align-items: $align;
68
- }
69
-
70
- @mixin arrow($wid, $hei, $bLeft, $bRight, $bBot, $bTop, $float) {
71
- width: $wid;
72
- height: $hei;
73
- border-left: $bLeft;
74
- border-right: $bRight;
75
- border-bottom: $bBot;
76
- border-top: $bTop;
77
- float: $float;
78
- }
79
-
80
- @mixin chrome {
81
- @media all and (-webkit-min-device-pixel-ratio: 0) and (min-resolution: .001dpcm) {
82
- @content;
83
- }
84
- }
85
-
86
- /*----------Mixin for adaptive and responce designe-----------*/
87
-
88
- $tablet-width: 799px;
89
- $tablet-height: 599px;
90
- @mixin tablet {
91
-
92
- @media all and (max-width: #{$tablet-width}) and (max-height: #{$tablet-height}),
93
- all and (max-width: #{$tablet-width}),
94
- all and (max-height: #{$tablet-height}) {
95
- @content;
96
- }
97
- }
98
- @mixin customSize($customWidth, $customHeight) {
99
- @media all and (max-width: #{$customWidth}) and (max-height: #{$customHeight}) {
100
- @content;
101
- }
102
- }
103
-
104
- @mixin customMaxWidth($customWidth) {
105
- @media all and (max-width: #{$customWidth}) {
106
- @content;
107
- }
108
- }
109
-
110
- @mixin customMinWidth($customMinWidth) {
111
- @media all and (min-width: #{$customMinWidth}) {
112
- @content;
113
- }
114
- }
115
-
116
- @mixin customMaxHeight($customHeight) {
117
- @media all and (max-height: #{$customHeight}) {
118
- @content;
119
- }
120
- }
121
-
122
- @mixin customMinHeight($customMinHeight) {
123
- @media all and (min-height: #{$customMinHeight}) {
124
- @content;
125
- }
126
- }
127
-
128
- /*----------------------THEMES----------------------------*/
129
-
130
- @mixin safeMask($icon, $size: 24px, $color: var(--brandColor), $hoverColor: var(--onBrandHoverColor)) {
131
- @supports (mask: url('')) and (mask-image: url('')) {
132
- -webkit-mask-position: center;
133
- -webkit-mask-repeat: no-repeat;
134
- -webkit-mask-size: $size;
135
- -webkit-mask-image: url('assets/icon/svg/#{$icon}.svg');
136
- mask-image: url('assets/icon/svg/#{$icon}.svg');
137
- mask-size: $size !important;
138
- background-image: none !important;
139
- background-color: $color !important;
140
-
141
- &:hover {
142
- background-color: $hoverColor !important;
143
- }
144
- }
145
-
146
- @supports not ((mask: url('')) or (mask-image: url(''))) {
147
- background-image: url('assets/icon/svg/#{$icon}.svg') !important;
148
- background-size: contain !important;
149
- background-repeat: no-repeat !important;
150
- opacity: 0.8 !important;
151
-
152
- &:hover {
153
- opacity: 1 !important;
154
- }
155
- }
156
- }
157
-
158
- /*----------------------PRINTING----------------------------*/
159
-
160
- @media print {
161
- body {
162
- all: unset !important;
163
- }
164
-
165
- .wm-page {
166
- margin: 0px !important;
167
- display: block !important;
168
- }
169
-
170
- .not-printable {
171
- display: none !important;
172
- }
173
-
174
- * {
175
- visibility: hidden;
176
- }
177
-
178
- .printable, .printable * {
179
- visibility: visible !important;
180
- }
181
- }
@@ -1,48 +0,0 @@
1
- import { ToolTipRendererDirective } from './custom-tool-tip/tool-tip-renderer.directive';
2
- import { CustomToolTipComponent } from './custom-tool-tip/custom-tool-tip.component';
3
- import { CommonModule } from '@angular/common';
4
- import { NgModule } from '@angular/core';
5
- import { MatButtonToggleModule } from '@angular/material/button-toggle';
6
- import { AvatarComponent } from './wm-avatar/avatar.component';
7
- import { BlinkMessageComponent } from './blink-message/blink-message.component';
8
- import { BtvIconButtonComponent } from './btv-icon-button/btv-icon-button.component';
9
- import { BtvProgressComponent } from './btv-progress/btv-progress.component';
10
- import { BtvSearch } from './btv-search/btv-search.component';
11
- import { BusyIndicatorComponent } from './busy-indicator/busy-indicator.component';
12
- import { IllustrationComponent } from './illustration/illustration.component';
13
- import { WmBackBtnComponent } from './wm-back-btn/wm-back-btn.component';
14
- import { WmBetaTextComponent } from './wm-beta-text/wm-beta-text.component';
15
- import { InfoCardComponent } from './wm-info-card/wm-info-card.component';
16
- import { WmInfoComponent } from './wm-info/wm-info.component';
17
- import { WmNoContentComponent } from './wm-no-content/wm-no-content.component';
18
- import { WmPanelBarComponent } from './wm-panel-bar/wm-panel-bar.component';
19
- import { ScalableDivComponent } from './wm-scalable-div/scalable-div.component';
20
- import { SpinnerComponent } from './wm-spinner/wm-spinner.component';
21
- import { WmStateIconComponent } from './wm-state-icon/wm-state-icon.component';
22
- import { WmTagComponent } from './wm-tag/wm-tag.component';
23
- import { WmTemplateImageComponent } from './wm-tamplate-image/wm-template-image.component';
24
- import { WmToggleComponent } from './wm-toggle/wm-toggle.component';
25
- import { BtvCounterButtonComponent } from './btv-icon-button/btv-counter-button';
26
- import { MatTooltipModule } from '@angular/material/tooltip';
27
- import { OverlayModule } from '@angular/cdk/overlay';
28
-
29
-
30
- @NgModule({
31
- imports: [CommonModule, MatButtonToggleModule, MatTooltipModule, OverlayModule],
32
- declarations: [BtvSearch, WmBackBtnComponent, BtvIconButtonComponent, WmNoContentComponent,
33
- BtvCounterButtonComponent, WmStateIconComponent, BlinkMessageComponent, BusyIndicatorComponent,
34
- ScalableDivComponent,
35
- BtvProgressComponent, WmBetaTextComponent, WmTemplateImageComponent, IllustrationComponent,
36
- AvatarComponent, WmToggleComponent, WmTagComponent, WmPanelBarComponent, InfoCardComponent,
37
- CustomToolTipComponent, ToolTipRendererDirective, WmInfoComponent,SpinnerComponent],
38
- exports: [BtvSearch, WmBackBtnComponent, BtvIconButtonComponent, WmNoContentComponent,
39
- BtvCounterButtonComponent, WmStateIconComponent, BlinkMessageComponent, BusyIndicatorComponent,
40
- ScalableDivComponent,
41
- BtvProgressComponent, WmBetaTextComponent, WmTemplateImageComponent, IllustrationComponent,
42
- AvatarComponent, WmToggleComponent, WmTagComponent, WmPanelBarComponent, InfoCardComponent,
43
- WmInfoComponent,SpinnerComponent, ToolTipRendererDirective, CustomToolTipComponent],
44
- providers: []
45
- })
46
- export class WmBaseControlsModule {
47
- constructor() { }
48
- }
@@ -1 +0,0 @@
1
- <span class="copy-label" *ngIf="show"> {{ message }} </span>
@@ -1,4 +0,0 @@
1
- .copy-label {
2
- color: var(--brandColor);
3
- margin-right: 10px;
4
- }
@@ -1,54 +0,0 @@
1
- import { interval, Subscription } from 'rxjs';
2
- import { ChangeDetectionStrategy, ChangeDetectorRef, Component, Input } from '@angular/core';
3
- import { Guid } from '../../models/guidExtension';
4
-
5
- @Component({
6
- selector: 'wm-blink-message',
7
- templateUrl: './blink-message.component.html',
8
- styleUrls: ['./blink-message.component.scss'],
9
- changeDetection: ChangeDetectionStrategy.OnPush
10
- })
11
- export class BlinkMessageComponent {
12
-
13
- private _subscription: Subscription;
14
-
15
- @Input() public message: string = 'Copied';
16
-
17
- private _intervalNumber: number = 1;
18
- public get intervalNumber() { return this._intervalNumber; }
19
- @Input() public set intervalNumber(value: number) {
20
- if (this._intervalNumber === value) return;
21
- if (!value) return;
22
- this._intervalNumber = value;
23
- this._duration = interval(this.intervalNumber * 1000);
24
- }
25
-
26
- private _duration = interval(this.intervalNumber * 1000);
27
-
28
- private _actionId: Guid;
29
- public get actionId() { return this._actionId; }
30
- @Input() public set actionId(value: Guid) {
31
- if (this._actionId === value) return;
32
- if (!value) return;
33
- this.show = true;
34
- this.selectScript();
35
- }
36
-
37
- public show: boolean = false;
38
-
39
- constructor(private change: ChangeDetectorRef) {
40
- }
41
-
42
- public selectScript() {
43
- if (this._subscription) this._subscription.unsubscribe();
44
- this._subscription = this._duration.subscribe(() => {
45
- this.show = false;
46
- this.change.detectChanges();
47
- this._subscription.unsubscribe();
48
- this._subscription = undefined;
49
- });
50
- }
51
-
52
-
53
-
54
- }
@@ -1,18 +0,0 @@
1
- <button class="icon flex-row {{buttonClasses}}" (click)="onClick($event)" type="button" #button
2
- [tabindex]="(!isTabStop || disabled) ? -1 : undefined" [showToolTip]="!!titleText" customToolTip [contentTemplate]="template">
3
-
4
- <wm-template-image [icon]="icon" [size]="floor(iconSize * (isHover ? 1.1: 1)) + 'px'" [active]="!disabled && changed"
5
- [light]="light">
6
- </wm-template-image>
7
-
8
- <ng-content></ng-content>
9
-
10
- <span class="wm-counter" [title]="counter" *ngIf="counter > 0">{{counterLabel}}</span>
11
-
12
- </button>
13
-
14
-
15
- <ng-template #template>
16
- <span class="tooltip-text"> {{titleText}} </span>
17
- <span *ngIf="disabled" class="tooltip-disabled"> - {{unavailableText}} </span>
18
- </ng-template>
@@ -1,34 +0,0 @@
1
- import { BtvIconButtonComponent } from './btv-icon-button.component';
2
- import { Component, ChangeDetectionStrategy, Input } from '@angular/core';
3
-
4
- @Component({
5
- selector: 'btv-counter-button',
6
- styleUrls: ['./btv-icon-button.scss'],
7
- templateUrl: './btv-counter-button.html',
8
- changeDetection: ChangeDetectionStrategy.OnPush
9
- })
10
-
11
- export class BtvCounterButtonComponent extends BtvIconButtonComponent {
12
- private _counter: number = 0;
13
- public counterLabel: string = '';
14
- @Input() set counter(val) {
15
- this._counter = val;
16
- this.counterLabel = this.toShortLabel(val);
17
- }
18
- get counter() {
19
- return this._counter;
20
- }
21
-
22
- public toShortLabel(value: number): string {
23
- if (!value && value !== 0) return '';
24
- if (value <= 999) return value.toString();
25
- let num = Math.trunc(value / 100) / 10;
26
- if (num >= 100) num = Math.trunc(value / 1000);
27
- if (num <= 999) return num + 'K';
28
- num = Math.trunc(num / 1000);
29
- if (num <= 999) return num + 'M';
30
- return 'A lot';
31
- }
32
-
33
- @Input() public override unavailableText: string = '';
34
- }
@@ -1,64 +0,0 @@
1
- import { ChangeDetectionStrategy, Component, EventEmitter, HostBinding, Input, Output } from '@angular/core';
2
- import { ViewState } from '../btv-search';
3
-
4
- export type ButtonSize = 'small' | 'medium' | 'large';
5
-
6
- @Component({
7
- selector: 'btv-icon-button',
8
- styleUrls: ['./btv-icon-button.scss'],
9
- templateUrl: './btv-icon-button.html',
10
- changeDetection: ChangeDetectionStrategy.OnPush
11
- })
12
-
13
- export class BtvIconButtonComponent {
14
-
15
- @HostBinding('class.disabled') get getIsDisabled() { return this.disabled; }
16
- @HostBinding('class.small') get getIsSmall() { return this.size === 'small'; }
17
- @HostBinding('class.medium') get getIsMedium() { return this.size === 'medium'; }
18
- @HostBinding('class.danger') get getIsDanger() { return this.danger; }
19
-
20
-
21
- @Input() titleText: string = '';
22
- @Input() disabled: boolean = false;
23
- @Input() size: ButtonSize = 'large';
24
- @Input() icon: string = '';
25
- @Input() changed: boolean = false;
26
- @Input() isTabStop: boolean = false;
27
- @Input() light: boolean = false;
28
- @Input() buttonClasses = '';
29
- @Input() imageClasses = 'icon-svg';
30
- @Input() danger: boolean = false;
31
- @Input() unavailableText: string = "Unavailable";
32
- public isHover = false;
33
- view: ViewState = new ViewState();
34
-
35
- floor = Math.floor;
36
-
37
- isInFullScreen: boolean = false;
38
-
39
- public get iconSize() {
40
- switch (this.size) {
41
- case 'small': return 16;
42
- case 'medium': return 20;
43
- default: return 24;
44
- }
45
- }
46
-
47
- public get animate(): any {
48
- return {
49
- type: 'zoom',
50
- duration: 200
51
- };
52
- }
53
-
54
- @Output() iClick: EventEmitter<any> = new EventEmitter<any>();
55
-
56
- constructor() {
57
- }
58
-
59
- onClick($event: any) {
60
- if (this.disabled) return;
61
- this.iClick.emit($event);
62
- }
63
-
64
- }
@@ -1,14 +0,0 @@
1
- <button class="icon flex-row {{buttonClasses}}" (click)="onClick($event)" type="button" #button
2
- [tabindex]="(!isTabStop || disabled) ? -1 : undefined" [showToolTip]="!!titleText && !view.isPhone" customToolTip [contentTemplate]="template">
3
-
4
- <wm-template-image [icon]="icon" [size]="floor(iconSize * (isHover ? 1.1: 1)) + 'px'" [active]="!disabled && changed"
5
- [light]="light" [classes]="imageClasses">
6
- </wm-template-image>
7
- <ng-content></ng-content>
8
-
9
- </button>
10
-
11
- <ng-template #template>
12
- <span class="tooltip-text"> {{titleText}} </span>
13
- <span *ngIf="disabled" class="tooltip-text"> - {{unavailableText}} </span>
14
- </ng-template>
@@ -1,124 +0,0 @@
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
- .icon {
18
- outline: none;
19
- background: var(--secondaryHover);
20
- }
21
- }
22
- }
23
-
24
- :host(.u-no-border) {
25
- border-width: 0px;
26
- }
27
-
28
- :host(.small) {
29
- width: 16px;
30
- height: 16px;
31
- }
32
-
33
- :host(.medium) {
34
- width: 30px;
35
- height: 30px;
36
- }
37
-
38
- :host(.disabled) {
39
- background-color: var(--disabledColor);
40
- border-color: var(--disabledColor);
41
- color: var(--lightFontColor);
42
- cursor: default;
43
-
44
- &:hover {
45
- background-color: var(--disabledColor);
46
- border-color: var(--disabledColor);
47
- }
48
-
49
- .icon {
50
- cursor: default;
51
- }
52
- }
53
-
54
- :host(.danger) {
55
- background-color: var(--dangerColor);
56
- border-color: var(--warningColor);
57
- }
58
-
59
- .tooltip-text {
60
- align-self: center;
61
- }
62
-
63
- .tooltip-disabled {
64
- font-size: $fontSize -2;
65
- counter-reset: var(--lightFontColor);
66
- }
67
-
68
- .icon {
69
- @include flexJA(center, center);
70
- width: 100%;
71
- height: 100%;
72
- border: 0px;
73
- cursor: pointer;
74
-
75
- color: var(--strongFontColor);
76
- outline: 0px;
77
- padding: 0px;
78
- background: transparent;
79
- border-radius: inherit;
80
- }
81
-
82
- .wm-counter-button {
83
- position: relative;
84
- }
85
-
86
- .wm-counter {
87
- display: inline-block;
88
- width: 16px;
89
- height: 16px;
90
- line-height: 16px;
91
- position: absolute;
92
- top: 0px;
93
- right: 0px;
94
- border: none;
95
- background-color: var(--dangerColor);
96
- border-radius: 50%;
97
- font-size: $fontSize - 4;
98
- font-weight: bold;
99
- text-align: center;
100
- color: var(--strongFontColor);
101
- text-indent: -1px;
102
- overflow: hidden;
103
- white-space: nowrap;
104
- }
105
-
106
- .u-btn-validate {
107
- border-color: var(--dangerColor);
108
- background-color: var(--dangerColor);
109
- color: var(--onBrandTextColor);
110
-
111
- &:hover {
112
- background-color: var(--dangerColor);
113
- }
114
- }
115
-
116
- .u-btn-primary {
117
- border-color: var(--brandColor);
118
- background-color: var(--brandColor);
119
- color: var(--onBrandTextColor);
120
-
121
- &:hover {
122
- background-color: var(--onBrandHoverColor);
123
- }
124
- }
@@ -1 +0,0 @@
1
- export * from './btv-icon-button.component';
@@ -1,65 +0,0 @@
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
- }
@@ -1,11 +0,0 @@
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>
@@ -1,24 +0,0 @@
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
- }