btv-base-controls 0.1.22 → 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/karma.conf.js +44 -0
- package/ng-package.json +7 -0
- package/package.json +10 -30
- 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/esm2020/btv-base-controls.mjs +0 -5
- package/esm2020/lib/basic.module.mjs +0 -64
- package/esm2020/lib/blink-message/blink-message.component.mjs +0 -54
- package/esm2020/lib/btv-icon-button/btv-counter-button.mjs +0 -47
- package/esm2020/lib/btv-icon-button/btv-icon-button.component.mjs +0 -89
- package/esm2020/lib/btv-progress/btv-progress.component.mjs +0 -71
- package/esm2020/lib/btv-search/btv-search.component.mjs +0 -82
- package/esm2020/lib/busy-indicator/busy-indicator.component.mjs +0 -16
- package/esm2020/lib/custom-tool-tip/custom-tool-tip.component.mjs +0 -34
- package/esm2020/lib/custom-tool-tip/tool-tip-renderer.directive.mjs +0 -113
- package/esm2020/lib/illustration/illustration.component.mjs +0 -17
- package/esm2020/lib/wm-avatar/avatar.component.mjs +0 -175
- package/esm2020/lib/wm-back-btn/wm-back-btn.component.mjs +0 -26
- package/esm2020/lib/wm-beta-text/wm-beta-text.component.mjs +0 -19
- package/esm2020/lib/wm-info/info-models.mjs +0 -13
- package/esm2020/lib/wm-info/wm-info.component.mjs +0 -237
- package/esm2020/lib/wm-info-card/wm-info-card.component.mjs +0 -23
- package/esm2020/lib/wm-no-content/wm-no-content.component.mjs +0 -30
- package/esm2020/lib/wm-panel-bar/wm-panel-bar.component.mjs +0 -78
- package/esm2020/lib/wm-scalable-div/scalable-div.component.mjs +0 -105
- package/esm2020/lib/wm-spinner/wm-spinner.component.mjs +0 -135
- package/esm2020/lib/wm-state-icon/wm-state-icon.component.mjs +0 -18
- package/esm2020/lib/wm-tag/wm-tag.component.mjs +0 -28
- package/esm2020/lib/wm-tamplate-image/wm-template-image.component.mjs +0 -71
- package/esm2020/lib/wm-toggle/wm-toggle.component.mjs +0 -31
- package/esm2020/models/guidExtension.mjs +0 -15
- package/esm2020/public-api.mjs +0 -28
- package/fesm2015/btv-base-controls.mjs +0 -1479
- package/fesm2015/btv-base-controls.mjs.map +0 -1
- package/fesm2020/btv-base-controls.mjs +0 -1496
- package/fesm2020/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
package/.browserslistrc
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
|
|
2
|
+
# For additional information regarding the format and rule options, please see:
|
|
3
|
+
# https://github.com/browserslist/browserslist#queries
|
|
4
|
+
|
|
5
|
+
# For the full list of supported browsers by the Angular framework, please see:
|
|
6
|
+
# https://angular.io/guide/browser-support
|
|
7
|
+
|
|
8
|
+
# You can see what browsers were selected by your queries by running:
|
|
9
|
+
# npx browserslist
|
|
10
|
+
|
|
11
|
+
last 1 Chrome version
|
|
12
|
+
last 1 Firefox version
|
|
13
|
+
last 2 Edge major versions
|
|
14
|
+
last 2 Safari major versions
|
|
15
|
+
last 2 iOS major versions
|
|
16
|
+
Firefox ESR
|
package/karma.conf.js
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
// Karma configuration file, see link for more information
|
|
2
|
+
// https://karma-runner.github.io/1.0/config/configuration-file.html
|
|
3
|
+
|
|
4
|
+
module.exports = function (config) {
|
|
5
|
+
config.set({
|
|
6
|
+
basePath: '',
|
|
7
|
+
frameworks: ['jasmine', '@angular-devkit/build-angular'],
|
|
8
|
+
plugins: [
|
|
9
|
+
require('karma-jasmine'),
|
|
10
|
+
require('karma-chrome-launcher'),
|
|
11
|
+
require('karma-jasmine-html-reporter'),
|
|
12
|
+
require('karma-coverage'),
|
|
13
|
+
require('@angular-devkit/build-angular/plugins/karma')
|
|
14
|
+
],
|
|
15
|
+
client: {
|
|
16
|
+
jasmine: {
|
|
17
|
+
// you can add configuration options for Jasmine here
|
|
18
|
+
// the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html
|
|
19
|
+
// for example, you can disable the random execution with `random: false`
|
|
20
|
+
// or set a specific seed with `seed: 4321`
|
|
21
|
+
},
|
|
22
|
+
clearContext: false // leave Jasmine Spec Runner output visible in browser
|
|
23
|
+
},
|
|
24
|
+
jasmineHtmlReporter: {
|
|
25
|
+
suppressAll: true // removes the duplicated traces
|
|
26
|
+
},
|
|
27
|
+
coverageReporter: {
|
|
28
|
+
dir: require('path').join(__dirname, '../../coverage/btv-base-controls'),
|
|
29
|
+
subdir: '.',
|
|
30
|
+
reporters: [
|
|
31
|
+
{ type: 'html' },
|
|
32
|
+
{ type: 'text-summary' }
|
|
33
|
+
]
|
|
34
|
+
},
|
|
35
|
+
reporters: ['progress', 'kjhtml'],
|
|
36
|
+
port: 9876,
|
|
37
|
+
colors: true,
|
|
38
|
+
logLevel: config.LOG_INFO,
|
|
39
|
+
autoWatch: true,
|
|
40
|
+
browsers: ['Chrome'],
|
|
41
|
+
singleRun: false,
|
|
42
|
+
restartOnFileChange: true
|
|
43
|
+
});
|
|
44
|
+
};
|
package/ng-package.json
ADDED
package/package.json
CHANGED
|
@@ -1,31 +1,11 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "btv-base-controls",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"peerDependencies": {
|
|
5
|
-
"@angular/common": "^18.0.1",
|
|
6
|
-
"@angular/core": "^18.0.1"
|
|
7
|
-
},
|
|
8
|
-
"dependencies": {
|
|
9
|
-
"tslib": "^2.4.0"
|
|
10
|
-
}
|
|
11
|
-
"module": "fesm2015/btv-base-controls.mjs",
|
|
12
|
-
"es2020": "fesm2020/btv-base-controls.mjs",
|
|
13
|
-
"esm2020": "esm2020/btv-base-controls.mjs",
|
|
14
|
-
"fesm2020": "fesm2020/btv-base-controls.mjs",
|
|
15
|
-
"fesm2015": "fesm2015/btv-base-controls.mjs",
|
|
16
|
-
"typings": "index.d.ts",
|
|
17
|
-
"exports": {
|
|
18
|
-
"./package.json": {
|
|
19
|
-
"default": "./package.json"
|
|
20
|
-
},
|
|
21
|
-
".": {
|
|
22
|
-
"types": "./index.d.ts",
|
|
23
|
-
"esm2020": "./esm2020/btv-base-controls.mjs",
|
|
24
|
-
"es2020": "./fesm2020/btv-base-controls.mjs",
|
|
25
|
-
"es2015": "./fesm2015/btv-base-controls.mjs",
|
|
26
|
-
"node": "./fesm2015/btv-base-controls.mjs",
|
|
27
|
-
"default": "./fesm2020/btv-base-controls.mjs"
|
|
28
|
-
}
|
|
29
|
-
},
|
|
30
|
-
"sideEffects": false
|
|
1
|
+
{
|
|
2
|
+
"name": "btv-base-controls",
|
|
3
|
+
"version": "0.1.23",
|
|
4
|
+
"peerDependencies": {
|
|
5
|
+
"@angular/common": "^18.0.1",
|
|
6
|
+
"@angular/core": "^18.0.1"
|
|
7
|
+
},
|
|
8
|
+
"dependencies": {
|
|
9
|
+
"tslib": "^2.4.0"
|
|
10
|
+
}
|
|
31
11
|
}
|
|
Binary file
|
|
@@ -0,0 +1,181 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<span class="copy-label" *ngIf="show"> {{ message }} </span>
|
|
@@ -0,0 +1,54 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
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>
|
|
@@ -0,0 +1,34 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { ChangeDetectionStrategy, Component, EventEmitter, HostBinding, Input, Output } from '@angular/core';
|
|
2
|
+
|
|
3
|
+
export type ButtonSize = 'small' | 'medium' | 'large';
|
|
4
|
+
|
|
5
|
+
@Component({
|
|
6
|
+
selector: 'btv-icon-button',
|
|
7
|
+
styleUrls: ['./btv-icon-button.scss'],
|
|
8
|
+
templateUrl: './btv-icon-button.html',
|
|
9
|
+
changeDetection: ChangeDetectionStrategy.OnPush
|
|
10
|
+
})
|
|
11
|
+
|
|
12
|
+
export class BtvIconButtonComponent {
|
|
13
|
+
|
|
14
|
+
@HostBinding('class.disabled') get getIsDisabled() { return this.disabled; }
|
|
15
|
+
@HostBinding('class.small') get getIsSmall() { return this.size === 'small'; }
|
|
16
|
+
@HostBinding('class.medium') get getIsMedium() { return this.size === 'medium'; }
|
|
17
|
+
@HostBinding('class.danger') get getIsDanger() { return this.danger; }
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
@Input() titleText: string = '';
|
|
21
|
+
@Input() disabled: boolean = false;
|
|
22
|
+
@Input() size: ButtonSize = 'large';
|
|
23
|
+
@Input() icon: string = '';
|
|
24
|
+
@Input() changed: boolean = false;
|
|
25
|
+
@Input() isTabStop: boolean = false;
|
|
26
|
+
@Input() light: boolean = false;
|
|
27
|
+
@Input() buttonClasses = '';
|
|
28
|
+
@Input() imageClasses = 'icon-svg';
|
|
29
|
+
@Input() danger: boolean = false;
|
|
30
|
+
@Input() unavailableText: string = "Unavailable";
|
|
31
|
+
public isHover = false;
|
|
32
|
+
|
|
33
|
+
floor = Math.floor;
|
|
34
|
+
|
|
35
|
+
isInFullScreen: boolean = false;
|
|
36
|
+
|
|
37
|
+
public get iconSize() {
|
|
38
|
+
switch (this.size) {
|
|
39
|
+
case 'small': return 16;
|
|
40
|
+
case 'medium': return 20;
|
|
41
|
+
default: return 24;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
public get animate(): any {
|
|
46
|
+
return {
|
|
47
|
+
type: 'zoom',
|
|
48
|
+
duration: 200
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
@Output() iClick: EventEmitter<any> = new EventEmitter<any>();
|
|
53
|
+
|
|
54
|
+
constructor() {
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
onClick($event: any) {
|
|
58
|
+
if (this.disabled) return;
|
|
59
|
+
this.iClick.emit($event);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
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" [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>
|
|
@@ -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';
|