@tetacom/ng-components 1.0.151 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/color-icons.svg +521 -49
- package/assets/file-icons.svg +1 -0
- package/assets/icons.svg +138 -205
- package/component/accordion/accordion-item/accordion-item.component.d.ts +1 -4
- package/component/button/button/button.component.d.ts +1 -4
- package/component/checkbox/checkbox/checkbox.component.d.ts +1 -2
- package/component/date-picker/date-picker/date-picker.component.d.ts +68 -38
- package/component/date-picker/date-picker.module.d.ts +16 -19
- package/component/date-picker/day-select/day-select.component.d.ts +51 -0
- package/component/date-picker/model/date-picker-mode.enum.d.ts +5 -0
- package/component/date-picker/month-picker/month-picker.component.d.ts +50 -16
- package/component/date-picker/month-select/month-select.component.d.ts +40 -0
- package/component/date-picker/public-api.d.ts +4 -5
- package/component/date-picker/service/picker-touch.service.d.ts +12 -0
- package/component/date-picker/time-part-control/time-part-control.component.d.ts +26 -0
- package/component/date-picker/util/date-picker-util.d.ts +15 -0
- package/component/date-picker/year-select/year-select.component.d.ts +45 -0
- package/component/dropdown/dropdown-base.d.ts +1 -3
- package/component/filter/filter.module.d.ts +2 -1
- package/component/icon/icon-file/icon-file.component.d.ts +3 -9
- package/component/icon/icon.module.d.ts +5 -4
- package/component/icon/public-api.d.ts +0 -1
- package/component/input/input/input.component.d.ts +1 -3
- package/component/message/model/message.d.ts +0 -3
- package/component/public-api.d.ts +0 -2
- package/component/select/select/select.component.d.ts +1 -4
- package/component/select/select.module.d.ts +2 -1
- package/component/switch/switch/switch.component.d.ts +1 -4
- package/component/table/table-body/table-body.component.d.ts +1 -0
- package/component/table/table.module.d.ts +2 -1
- package/component/tree/tree.module.d.ts +2 -1
- package/directive/hint/hint.directive.d.ts +1 -3
- package/directive/only-number/only-number.directive.d.ts +2 -1
- package/directive/public-api.d.ts +1 -0
- package/directive/scrollable/public-api.d.ts +3 -0
- package/directive/scrollable/scrollable/scrollable.component.d.ts +32 -0
- package/directive/scrollable/scrollable.directive.d.ts +6 -0
- package/directive/scrollable/scrollable.module.d.ts +10 -0
- package/esm2020/component/accordion/accordion/accordion.component.mjs +2 -3
- package/esm2020/component/accordion/accordion-head/accordion-head.component.mjs +2 -3
- package/esm2020/component/accordion/accordion-item/accordion-item.component.mjs +3 -13
- package/esm2020/component/button/button/button.component.mjs +3 -18
- package/esm2020/component/checkbox/checkbox/checkbox.component.mjs +3 -6
- package/esm2020/component/date-picker/date-picker/date-picker.component.mjs +235 -141
- package/esm2020/component/date-picker/date-picker.module.mjs +45 -41
- package/esm2020/component/date-picker/day-select/day-select.component.mjs +184 -0
- package/esm2020/component/date-picker/model/date-picker-mode.enum.mjs +7 -0
- package/esm2020/component/date-picker/month-picker/month-picker.component.mjs +237 -33
- package/esm2020/component/date-picker/month-select/month-select.component.mjs +148 -0
- package/esm2020/component/date-picker/public-api.mjs +5 -6
- package/esm2020/component/date-picker/service/picker-touch.service.mjs +34 -0
- package/esm2020/component/date-picker/time-part-control/time-part-control.component.mjs +73 -0
- package/esm2020/component/date-picker/util/date-picker-util.mjs +142 -0
- package/esm2020/component/date-picker/year-select/year-select.component.mjs +189 -0
- package/esm2020/component/dropdown/dropdown/dropdown.component.mjs +2 -3
- package/esm2020/component/dropdown/dropdown-base.mjs +2 -6
- package/esm2020/component/dropdown/dropdown.directive.mjs +1 -1
- package/esm2020/component/expand-card/expand-card/expand-card.component.mjs +1 -1
- package/esm2020/component/expand-card/expand-item/expand-item.component.mjs +1 -1
- package/esm2020/component/expand-panel/expand-panel/expand-panel.component.mjs +1 -1
- package/esm2020/component/file-upload/file-upload-area/file-upload-area.component.mjs +1 -1
- package/esm2020/component/filter/date-filter/date-filter.component.mjs +1 -1
- package/esm2020/component/filter/filter.module.mjs +7 -3
- package/esm2020/component/filter/list-filter/list-filter.component.mjs +4 -3
- package/esm2020/component/filter/numeric-filter/numeric-filter.component.mjs +1 -1
- package/esm2020/component/filter/string-filter/string-filter.component.mjs +1 -1
- package/esm2020/component/icon/icon-file/icon-file.component.mjs +6 -20
- package/esm2020/component/icon/icon.module.mjs +6 -1
- package/esm2020/component/icon/public-api.mjs +1 -2
- package/esm2020/component/input/input/input.component.mjs +3 -6
- package/esm2020/component/input/input.module.mjs +1 -1
- package/esm2020/component/input/text-field/text-field.component.mjs +3 -3
- package/esm2020/component/message/message/message.component.mjs +3 -4
- package/esm2020/component/message/message-host/message-host.component.mjs +1 -1
- package/esm2020/component/message/model/message.mjs +1 -2
- package/esm2020/component/modal/dialog/dialog.component.mjs +1 -1
- package/esm2020/component/property-grid/property-grid/property-grid-item/property-grid-item.component.mjs +2 -2
- package/esm2020/component/public-api.mjs +1 -4
- package/esm2020/component/select/select/select.component.mjs +6 -9
- package/esm2020/component/select/select.module.mjs +7 -3
- package/esm2020/component/switch/switch/switch.component.mjs +7 -19
- package/esm2020/component/table/default/boolean-cell/boolean-cell.component.mjs +1 -1
- package/esm2020/component/table/default/date-cell/date-cell.component.mjs +1 -1
- package/esm2020/component/table/default/date-time-cell/date-time-cell.component.mjs +1 -1
- package/esm2020/component/table/default/default-head-cell/default-head-cell.component.mjs +1 -1
- package/esm2020/component/table/default/list-cell/list-cell.component.mjs +1 -1
- package/esm2020/component/table/default/string-cell/string-cell.component.mjs +1 -1
- package/esm2020/component/table/selection-cell/selection-cell.component.mjs +1 -1
- package/esm2020/component/table/selection-head-cell/selection-head-cell.component.mjs +1 -1
- package/esm2020/component/table/table-body/table-body.component.mjs +11 -6
- package/esm2020/component/table/table-head/filter-dropdown-tab/filter-dropdown-tab.component.mjs +1 -1
- package/esm2020/component/table/table-head/visibility-dropdown-tab/visibility-dropdown-tab.component.mjs +4 -3
- package/esm2020/component/table/table.module.mjs +7 -3
- package/esm2020/component/theme-switch/theme-switch/theme-switch.component.mjs +1 -1
- package/esm2020/component/tree/tree/tree.component.mjs +6 -4
- package/esm2020/component/tree/tree.module.mjs +5 -4
- package/esm2020/directive/hint/hint.directive.mjs +3 -6
- package/esm2020/directive/only-number/only-number.directive.mjs +12 -2
- package/esm2020/directive/public-api.mjs +2 -1
- package/esm2020/directive/scrollable/public-api.mjs +4 -0
- package/esm2020/directive/scrollable/scrollable/scrollable.component.mjs +96 -0
- package/esm2020/directive/scrollable/scrollable.directive.mjs +19 -0
- package/esm2020/directive/scrollable/scrollable.module.mjs +33 -0
- package/esm2020/locale/en.mjs +1 -3
- package/esm2020/locale/ru.mjs +1 -3
- package/esm2020/locale/teta-localisation.mjs +1 -1
- package/esm2020/observable/animation-frame.mjs +30 -0
- package/esm2020/observable/public-api.mjs +2 -1
- package/esm2020/pipe/prepend-zero/prepend-zero.module.mjs +18 -0
- package/esm2020/pipe/prepend-zero/prepend-zero.pipe.mjs +21 -0
- package/fesm2015/tetacom-ng-components.mjs +5483 -5181
- package/fesm2015/tetacom-ng-components.mjs.map +1 -1
- package/fesm2020/tetacom-ng-components.mjs +3333 -3025
- package/fesm2020/tetacom-ng-components.mjs.map +1 -1
- package/locale/teta-localisation.d.ts +0 -2
- package/observable/animation-frame.d.ts +4 -0
- package/observable/public-api.d.ts +1 -0
- package/package.json +2 -3
- package/pipe/prepend-zero/prepend-zero.module.d.ts +8 -0
- package/pipe/prepend-zero/prepend-zero.pipe.d.ts +7 -0
- package/style/accordion.scss +6 -28
- package/style/assembly-library.scss +1 -4
- package/style/assembly-presets.scss +1 -0
- package/style/button.scss +13 -16
- package/style/checkbox.scss +13 -26
- package/style/chips.scss +10 -10
- package/style/color.scss +36 -1
- package/style/datepicker.scss +24 -139
- package/style/drag.scss +1 -1
- package/style/dropdown.scss +4 -6
- package/style/hint.scss +5 -5
- package/style/icon.scss +1 -2
- package/style/input.scss +23 -32
- package/style/layout.scss +2 -6
- package/style/library.scss +17 -0
- package/style/list.scss +8 -11
- package/style/loader.scss +2 -2
- package/style/message.scss +7 -15
- package/style/modal.scss +2 -3
- package/style/navigation.scss +1 -4
- package/style/presets/color-presets.scss +160 -8
- package/style/presets/font-presets.scss +25 -26
- package/style/presets/shadow-presets.scss +16 -0
- package/style/progress.scss +3 -3
- package/style/radio.scss +7 -21
- package/style/resize-panel.scss +2 -2
- package/style/scroll.scss +21 -17
- package/style/select.scss +21 -26
- package/style/shadow.scss +20 -0
- package/style/sidebar.scss +1 -1
- package/style/switch.scss +10 -15
- package/style/table.scss +15 -17
- package/style/tabs.scss +11 -11
- package/style/toggle.scss +18 -20
- package/style/tokens/basedark.tokens.css +77 -0
- package/style/tokens/baselight.tokens.css +61 -0
- package/style/tokens/global.tokens.css +235 -0
- package/style/tokens/utility.tokens.css +1119 -0
- package/style/toolbar.scss +1 -1
- package/style/tooltip.scss +6 -8
- package/style/tree.scss +4 -4
- package/style/util/button-util.scss +58 -0
- package/common/model/view-type.model.d.ts +0 -1
- package/component/avatar/avatar/avatar.component.d.ts +0 -17
- package/component/avatar/avatar.module.d.ts +0 -9
- package/component/avatar/model/avatar-color.enum.d.ts +0 -20
- package/component/avatar/public-api.d.ts +0 -2
- package/component/date-picker/base-calendar.d.ts +0 -49
- package/component/date-picker/base-picker.d.ts +0 -60
- package/component/date-picker/date-picker/date-calendar/date-calendar.component.d.ts +0 -20
- package/component/date-picker/date-range/date-range.component.d.ts +0 -46
- package/component/date-picker/date-range/range-calendar/range-calendar.component.d.ts +0 -39
- package/component/date-picker/day-picker/day-item/day-item.component.d.ts +0 -9
- package/component/date-picker/day-picker/day-picker.component.d.ts +0 -30
- package/component/date-picker/model/from-to.model.d.ts +0 -4
- package/component/date-picker/model/min-max-date.model.d.ts +0 -4
- package/component/date-picker/year-picker/scroll-to-selected-year.directive.d.ts +0 -11
- package/component/date-picker/year-picker/year-picker.component.d.ts +0 -24
- package/component/divider/divider/divider.component.d.ts +0 -10
- package/component/divider/divider.module.d.ts +0 -8
- package/component/divider/public-api.d.ts +0 -2
- package/component/icon/icon-file/icon-file.module.d.ts +0 -9
- package/esm2020/common/model/view-type.model.mjs +0 -2
- package/esm2020/component/avatar/avatar/avatar.component.mjs +0 -57
- package/esm2020/component/avatar/avatar.module.mjs +0 -28
- package/esm2020/component/avatar/model/avatar-color.enum.mjs +0 -22
- package/esm2020/component/avatar/public-api.mjs +0 -3
- package/esm2020/component/date-picker/base-calendar.mjs +0 -99
- package/esm2020/component/date-picker/base-picker.mjs +0 -102
- package/esm2020/component/date-picker/date-picker/date-calendar/date-calendar.component.mjs +0 -49
- package/esm2020/component/date-picker/date-range/date-range.component.mjs +0 -211
- package/esm2020/component/date-picker/date-range/range-calendar/range-calendar.component.mjs +0 -108
- package/esm2020/component/date-picker/day-picker/day-item/day-item.component.mjs +0 -15
- package/esm2020/component/date-picker/day-picker/day-picker.component.mjs +0 -113
- package/esm2020/component/date-picker/model/from-to.model.mjs +0 -2
- package/esm2020/component/date-picker/model/min-max-date.model.mjs +0 -2
- package/esm2020/component/date-picker/year-picker/scroll-to-selected-year.directive.mjs +0 -26
- package/esm2020/component/date-picker/year-picker/year-picker.component.mjs +0 -48
- package/esm2020/component/divider/divider/divider.component.mjs +0 -18
- package/esm2020/component/divider/divider.module.mjs +0 -20
- package/esm2020/component/divider/public-api.mjs +0 -3
- package/esm2020/component/icon/icon-file/icon-file.module.mjs +0 -28
- package/style/badge.scss +0 -28
- package/style/bottombar.scss +0 -5
- package/style/divider.scss +0 -15
- package/style/presets/view-types.scss +0 -15
- package/style/tag.scss +0 -37
- package/style/util/scroll-util.scss +0 -4
package/style/toolbar.scss
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
padding: 0 12px;
|
|
13
13
|
@include getFont($fonts, 'title-2');
|
|
14
14
|
|
|
15
|
-
@each $paletteName
|
|
15
|
+
@each $paletteName in $palettes {
|
|
16
16
|
&.toolbar-#{$paletteName} {
|
|
17
17
|
background-color: getColorVar($paletteName, '50');
|
|
18
18
|
}
|
package/style/tooltip.scss
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
@import "util/shadow-util.scss";
|
|
2
2
|
@import "util/color-util.scss";
|
|
3
|
-
@import "presets/view-types.scss";
|
|
4
3
|
|
|
5
4
|
.tooltip {
|
|
6
5
|
@include shadow(1);
|
|
@@ -8,9 +7,8 @@
|
|
|
8
7
|
padding: 12px;
|
|
9
8
|
white-space: nowrap;
|
|
10
9
|
z-index: 1;
|
|
11
|
-
background-color:
|
|
12
|
-
color:
|
|
13
|
-
@include getView('base');
|
|
10
|
+
background-color: getColorVar('white', '50');
|
|
11
|
+
color: getColorVar('text', '50');
|
|
14
12
|
|
|
15
13
|
&::before, &::after {
|
|
16
14
|
position: absolute;
|
|
@@ -27,7 +25,7 @@
|
|
|
27
25
|
transform: translate(-50%, 0);
|
|
28
26
|
border-left: 12px solid transparent;
|
|
29
27
|
border-right: 12px solid transparent;
|
|
30
|
-
border-top: 12px solid
|
|
28
|
+
border-top: 12px solid getColorVar('white', '50');
|
|
31
29
|
}
|
|
32
30
|
|
|
33
31
|
&::after {
|
|
@@ -36,7 +34,7 @@
|
|
|
36
34
|
transform: translate(-50%, 0);
|
|
37
35
|
border-left: 12px solid transparent;
|
|
38
36
|
border-right: 12px solid transparent;
|
|
39
|
-
border-top: 12px solid
|
|
37
|
+
border-top: 12px solid getColorVar('white', '50');
|
|
40
38
|
}
|
|
41
39
|
}
|
|
42
40
|
|
|
@@ -47,7 +45,7 @@
|
|
|
47
45
|
transform: translate(-50%, 0);
|
|
48
46
|
border-left: 12px solid transparent;
|
|
49
47
|
border-right: 12px solid transparent;
|
|
50
|
-
border-bottom: 12px solid
|
|
48
|
+
border-bottom: 12px solid getColorVar('white', '50');
|
|
51
49
|
}
|
|
52
50
|
|
|
53
51
|
&::after {
|
|
@@ -56,7 +54,7 @@
|
|
|
56
54
|
transform: translate(-50%, 0);
|
|
57
55
|
border-left: 12px solid transparent;
|
|
58
56
|
border-right: 12px solid transparent;
|
|
59
|
-
border-bottom: 12px solid
|
|
57
|
+
border-bottom: 12px solid getColorVar('white', '50');
|
|
60
58
|
}
|
|
61
59
|
}
|
|
62
60
|
}
|
package/style/tree.scss
CHANGED
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
flex-grow: 1;
|
|
21
21
|
align-items: center;
|
|
22
22
|
height: 28px;
|
|
23
|
-
color:
|
|
23
|
+
color: getColorVar('text', '90');
|
|
24
24
|
transition: background 0.4s;
|
|
25
25
|
padding: 0 12px;
|
|
26
26
|
min-width: 0;
|
|
@@ -40,16 +40,16 @@
|
|
|
40
40
|
|
|
41
41
|
&:hover {
|
|
42
42
|
cursor: pointer;
|
|
43
|
-
background-color:
|
|
43
|
+
background-color: getColorVar('text', '5');
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
&_active {
|
|
47
|
-
background-color:
|
|
47
|
+
background-color: getColorVar('text', '10');
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
&__icon {
|
|
52
|
-
fill:
|
|
52
|
+
fill: getColorVar('text', '70');
|
|
53
53
|
|
|
54
54
|
&:hover {
|
|
55
55
|
cursor: pointer;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
@import "./color-util.scss";
|
|
2
|
+
|
|
3
|
+
@mixin generateButtonForPalette($paletteName) {
|
|
4
|
+
.button_primary.button-#{$paletteName} {
|
|
5
|
+
background-color: getColorVar($paletteName, '50');
|
|
6
|
+
background-position: center;
|
|
7
|
+
transition: background 0.8s;
|
|
8
|
+
|
|
9
|
+
&:hover {
|
|
10
|
+
background: getColorVar($paletteName, '60') radial-gradient(circle, transparent 1%, getColorVar($paletteName, '60') 1%) center/15000%;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
&:active {
|
|
14
|
+
background-color: getColorVar($paletteName, '70');
|
|
15
|
+
background-size: 100%;
|
|
16
|
+
transition: background 0s;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.button_ghost.button-#{$paletteName} {
|
|
21
|
+
color: getColorVar($paletteName, '90');
|
|
22
|
+
fill: getColorVar($paletteName, '90');
|
|
23
|
+
background-color: transparent;
|
|
24
|
+
background-position: center;
|
|
25
|
+
transition: background 0.8s;
|
|
26
|
+
|
|
27
|
+
&:hover {
|
|
28
|
+
background: getColorVar($paletteName, '5') radial-gradient(circle, transparent 1%, getColorVar($paletteName, '5') 1%) center/15000%;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
&:active {
|
|
32
|
+
background-color: getColorVar($paletteName, '10');
|
|
33
|
+
background-size: 100%;
|
|
34
|
+
transition: background 0s;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.button_outline.button-#{$paletteName} {
|
|
39
|
+
color: getColorVar($paletteName, '50');
|
|
40
|
+
fill: getColorVar($paletteName, '50');
|
|
41
|
+
border-color: getColorVar($paletteName, '50');
|
|
42
|
+
border-style: solid;
|
|
43
|
+
border-width: 1px;
|
|
44
|
+
background-color: transparent;
|
|
45
|
+
background-position: center;
|
|
46
|
+
transition: background 0.8s;
|
|
47
|
+
|
|
48
|
+
&:hover {
|
|
49
|
+
background: getColorVar($paletteName, '5') radial-gradient(circle, transparent 1%, getColorVar($paletteName, '5') 1%) center/15000%;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
&:active {
|
|
53
|
+
background-color: getColorVar($paletteName, '10');
|
|
54
|
+
background-size: 100%;
|
|
55
|
+
transition: background 0s;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare type viewType = 'brick' | 'rounded' | 'circle';
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { OnInit } from '@angular/core';
|
|
2
|
-
import { viewType } from 'projects/components/src/common/model/view-type.model';
|
|
3
|
-
import { AvatarColorEnum } from '../model/avatar-color.enum';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
export declare class AvatarComponent implements OnInit {
|
|
6
|
-
photo?: string | ArrayBuffer;
|
|
7
|
-
name?: string;
|
|
8
|
-
id?: number;
|
|
9
|
-
viewType?: viewType;
|
|
10
|
-
size?: '24' | '28' | '32' | '44' | '64' | '128' | '200';
|
|
11
|
-
get avatar(): string;
|
|
12
|
-
colorMap: Map<AvatarColorEnum, string>;
|
|
13
|
-
constructor();
|
|
14
|
-
ngOnInit(): void;
|
|
15
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<AvatarComponent, never>;
|
|
16
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<AvatarComponent, "teta-avatar", never, { "photo": "photo"; "name": "name"; "id": "id"; "viewType": "viewType"; "size": "size"; }, {}, never, never, false>;
|
|
17
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import * as i0 from "@angular/core";
|
|
2
|
-
import * as i1 from "./avatar/avatar.component";
|
|
3
|
-
import * as i2 from "@angular/common";
|
|
4
|
-
import * as i3 from "../icon/icon.module";
|
|
5
|
-
export declare class AvatarModule {
|
|
6
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<AvatarModule, never>;
|
|
7
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<AvatarModule, [typeof i1.AvatarComponent], [typeof i2.CommonModule, typeof i3.IconModule], [typeof i1.AvatarComponent]>;
|
|
8
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<AvatarModule>;
|
|
9
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
export declare enum AvatarColorEnum {
|
|
2
|
-
vibrant = 0,
|
|
3
|
-
nebula = 1,
|
|
4
|
-
gorgonzola = 2,
|
|
5
|
-
lagoon = 3,
|
|
6
|
-
lime = 4,
|
|
7
|
-
pumpkin = 5,
|
|
8
|
-
vanity = 6,
|
|
9
|
-
navy = 7,
|
|
10
|
-
turquoise = 8,
|
|
11
|
-
greyish = 9,
|
|
12
|
-
heart = 10,
|
|
13
|
-
gloomy = 11,
|
|
14
|
-
rockman = 12,
|
|
15
|
-
hair = 13,
|
|
16
|
-
cerise = 14,
|
|
17
|
-
iris = 15,
|
|
18
|
-
caribbean = 16,
|
|
19
|
-
poisonous = 17
|
|
20
|
-
}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { ChangeDetectorRef, EventEmitter, OnChanges, OnDestroy, SimpleChanges } from "@angular/core";
|
|
2
|
-
import { BehaviorSubject, ReplaySubject } from "rxjs";
|
|
3
|
-
import { Dayjs } from "dayjs";
|
|
4
|
-
import { viewType } from "../../common/model/view-type.model";
|
|
5
|
-
import { MinMaxDateModel } from "./model/min-max-date.model";
|
|
6
|
-
import { DayModel } from "./model/day-model";
|
|
7
|
-
import * as i0 from "@angular/core";
|
|
8
|
-
export declare abstract class BaseCalendar implements OnChanges, OnDestroy {
|
|
9
|
-
protected _cdr: ChangeDetectorRef;
|
|
10
|
-
abstract selectedDate: any;
|
|
11
|
-
abstract locale: string;
|
|
12
|
-
abstract open: boolean;
|
|
13
|
-
abstract viewType: viewType;
|
|
14
|
-
abstract min: Date | string | number;
|
|
15
|
-
abstract isDateNull: boolean;
|
|
16
|
-
abstract max: Date | string | number;
|
|
17
|
-
abstract setDate: EventEmitter<Date>;
|
|
18
|
-
currentMonth: ReplaySubject<number>;
|
|
19
|
-
minMax: ReplaySubject<MinMaxDateModel>;
|
|
20
|
-
currentYear: ReplaySubject<number>;
|
|
21
|
-
selectedPicker: BehaviorSubject<'day' | 'month' | 'year'>;
|
|
22
|
-
abstract calendar: DayModel[] | {
|
|
23
|
-
currentMonth: DayModel[];
|
|
24
|
-
nextMonth: DayModel[];
|
|
25
|
-
};
|
|
26
|
-
localeMonths: Map<any, any>;
|
|
27
|
-
alive: boolean;
|
|
28
|
-
protected constructor(_cdr: ChangeDetectorRef);
|
|
29
|
-
generateCalendar(selectedDate: Dayjs, year: number, month: number, minMax: MinMaxDateModel): DayModel[];
|
|
30
|
-
isSuitableMinDate(d: Date, minDate: Date | string | number): boolean;
|
|
31
|
-
isSuitableMaxDate(d: Date, maxDate: Date | string | number): boolean;
|
|
32
|
-
isSelected(date: Date, selectedDate: Date): boolean;
|
|
33
|
-
ngOnDestroy(): void;
|
|
34
|
-
selectPicker(entity: "day" | "month" | "year"): void;
|
|
35
|
-
selectMonth(month: number): void;
|
|
36
|
-
selectYear(year: number): void;
|
|
37
|
-
ngOnChanges(changes: SimpleChanges): void;
|
|
38
|
-
changeCalendarData(selectedDate: Date | number | string): void;
|
|
39
|
-
setYear(year: number): void;
|
|
40
|
-
changeMonth(month: number, year: number): void;
|
|
41
|
-
getAvailableMonthYear(month: number, year: number): {
|
|
42
|
-
availableMonth: number;
|
|
43
|
-
availableYear: number;
|
|
44
|
-
};
|
|
45
|
-
getMothName(month: number): any;
|
|
46
|
-
selectDate(date: Date): void;
|
|
47
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<BaseCalendar, never>;
|
|
48
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<BaseCalendar, "ng-component", never, {}, {}, never, never, false>;
|
|
49
|
-
}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { ChangeDetectorRef, ElementRef, EventEmitter } from "@angular/core";
|
|
2
|
-
import { Align } from "../../common/enum/align.enum";
|
|
3
|
-
import { VerticalAlign } from "../../common/enum/vertical-align.enum";
|
|
4
|
-
import { ReplaySubject } from "rxjs";
|
|
5
|
-
import { MaskitoOptions } from "@maskito/core";
|
|
6
|
-
import { viewType } from "../../common/model/view-type.model";
|
|
7
|
-
import { DatePipe } from "@angular/common";
|
|
8
|
-
import { DateFromToModel } from "./model/from-to.model";
|
|
9
|
-
export declare abstract class BasePicker {
|
|
10
|
-
protected _elementRef: ElementRef;
|
|
11
|
-
protected _cdr: ChangeDetectorRef;
|
|
12
|
-
protected datePipe: DatePipe;
|
|
13
|
-
abstract mask: string;
|
|
14
|
-
abstract date: any;
|
|
15
|
-
abstract locale: string;
|
|
16
|
-
abstract showTime: boolean;
|
|
17
|
-
abstract minDate: Date | string | number;
|
|
18
|
-
abstract maxDate: Date | string | number;
|
|
19
|
-
abstract invalid: boolean;
|
|
20
|
-
abstract disabled: boolean;
|
|
21
|
-
abstract align: Align;
|
|
22
|
-
abstract verticalAlign: VerticalAlign;
|
|
23
|
-
abstract viewType: viewType;
|
|
24
|
-
abstract appendToBody: boolean;
|
|
25
|
-
abstract backdrop: boolean;
|
|
26
|
-
abstract allowNull: boolean;
|
|
27
|
-
abstract input: ElementRef;
|
|
28
|
-
abstract selectDate: EventEmitter<Date | DateFromToModel>;
|
|
29
|
-
open: boolean;
|
|
30
|
-
abstract selectedDate: ReplaySubject<any>;
|
|
31
|
-
placeholder: string;
|
|
32
|
-
inputText: string;
|
|
33
|
-
maskitoOptions: MaskitoOptions;
|
|
34
|
-
protected constructor(_elementRef: ElementRef, _cdr: ChangeDetectorRef, datePipe: DatePipe);
|
|
35
|
-
abstract onChange(date: Date): any;
|
|
36
|
-
abstract prepareInput(): any;
|
|
37
|
-
abstract onBlur(): any;
|
|
38
|
-
abstract setDate(date: any): any;
|
|
39
|
-
changeInput(v: any): void;
|
|
40
|
-
changePlaceholder(value: string): void;
|
|
41
|
-
openChange(e: boolean): void;
|
|
42
|
-
checkNull(): string;
|
|
43
|
-
openPicker: (show: boolean) => void;
|
|
44
|
-
changeSelectedDate(date: any, selectedDate?: any): void;
|
|
45
|
-
emitValue(value: any): void;
|
|
46
|
-
checkEnter(e: any): void;
|
|
47
|
-
isAvailableLength(val: string, length: number): boolean;
|
|
48
|
-
getDateFromStr(str: string, separator?: string): {
|
|
49
|
-
day: number;
|
|
50
|
-
month: number;
|
|
51
|
-
year: number;
|
|
52
|
-
};
|
|
53
|
-
getTimeFromStr(str: string, separator?: string): {
|
|
54
|
-
hours: number;
|
|
55
|
-
mins: number;
|
|
56
|
-
};
|
|
57
|
-
focus(): void;
|
|
58
|
-
getLocaleString(date: Date | number | string): string;
|
|
59
|
-
getAvailableDate(min: Date | number | string, max: Date | number | string, date: Date | number | string): Date;
|
|
60
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { ChangeDetectorRef, EventEmitter, OnChanges, OnDestroy } from '@angular/core';
|
|
2
|
-
import { viewType } from "../../../../common/model/view-type.model";
|
|
3
|
-
import { BaseCalendar } from "../../base-calendar";
|
|
4
|
-
import { DayModel } from "../../model/day-model";
|
|
5
|
-
import * as i0 from "@angular/core";
|
|
6
|
-
export declare class DateCalendarComponent extends BaseCalendar implements OnChanges, OnDestroy {
|
|
7
|
-
_cdr: ChangeDetectorRef;
|
|
8
|
-
selectedDate: Date | string | number;
|
|
9
|
-
locale: string;
|
|
10
|
-
open: boolean;
|
|
11
|
-
viewType: viewType;
|
|
12
|
-
min: Date | string | number;
|
|
13
|
-
isDateNull: boolean;
|
|
14
|
-
max: Date | string | number;
|
|
15
|
-
setDate: EventEmitter<Date>;
|
|
16
|
-
calendar: DayModel[];
|
|
17
|
-
constructor(_cdr: ChangeDetectorRef);
|
|
18
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DateCalendarComponent, never>;
|
|
19
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<DateCalendarComponent, "teta-date-calendar", never, { "selectedDate": "selectedDate"; "locale": "locale"; "open": "open"; "viewType": "viewType"; "min": "min"; "isDateNull": "isDateNull"; "max": "max"; }, { "setDate": "setDate"; }, never, never, false>;
|
|
20
|
-
}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { ChangeDetectorRef, ElementRef, EventEmitter, OnInit } from '@angular/core';
|
|
2
|
-
import { BasePicker } from "../base-picker";
|
|
3
|
-
import { DatePipe } from "@angular/common";
|
|
4
|
-
import { Align } from "../../../common/enum/align.enum";
|
|
5
|
-
import { VerticalAlign } from "../../../common/enum/vertical-align.enum";
|
|
6
|
-
import { viewType } from 'projects/components/src/common/model/view-type.model';
|
|
7
|
-
import { ControlValueAccessor } from "@angular/forms";
|
|
8
|
-
import { ReplaySubject } from "rxjs";
|
|
9
|
-
import { DateFromToModel } from "../model/from-to.model";
|
|
10
|
-
import * as i0 from "@angular/core";
|
|
11
|
-
export declare const DATE_Range_CONTROL_VALUE_ACCESSOR: any;
|
|
12
|
-
export declare class DateRangeComponent extends BasePicker implements OnInit, ControlValueAccessor {
|
|
13
|
-
_cdr: ChangeDetectorRef;
|
|
14
|
-
_elementRef: ElementRef;
|
|
15
|
-
datePipe: DatePipe;
|
|
16
|
-
date: DateFromToModel;
|
|
17
|
-
locale: string;
|
|
18
|
-
showTime: boolean;
|
|
19
|
-
minDate: Date | string | number;
|
|
20
|
-
maxDate: Date | string | number;
|
|
21
|
-
invalid: boolean;
|
|
22
|
-
disabled: boolean;
|
|
23
|
-
align: Align;
|
|
24
|
-
verticalAlign: VerticalAlign;
|
|
25
|
-
viewType: viewType;
|
|
26
|
-
appendToBody: boolean;
|
|
27
|
-
backdrop: boolean;
|
|
28
|
-
allowNull: boolean;
|
|
29
|
-
input: ElementRef;
|
|
30
|
-
selectDate: EventEmitter<DateFromToModel>;
|
|
31
|
-
mask: string;
|
|
32
|
-
selectedDate: ReplaySubject<DateFromToModel>;
|
|
33
|
-
constructor(_cdr: ChangeDetectorRef, _elementRef: ElementRef, datePipe: DatePipe);
|
|
34
|
-
changeSelectedDate(date: Date, selectedDate: DateFromToModel): void;
|
|
35
|
-
checkNull(): string;
|
|
36
|
-
prepareInput(): void;
|
|
37
|
-
onBlur(): void;
|
|
38
|
-
setDate(range: DateFromToModel): void;
|
|
39
|
-
writeValue(obj: DateFromToModel): void;
|
|
40
|
-
registerOnChange(fn: any): void;
|
|
41
|
-
registerOnTouched(fn: any): void;
|
|
42
|
-
ngOnInit(): void;
|
|
43
|
-
onChange(date: Date): void;
|
|
44
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DateRangeComponent, never>;
|
|
45
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<DateRangeComponent, "teta-date-range", never, { "date": "date"; "locale": "locale"; "showTime": "showTime"; "minDate": "minDate"; "maxDate": "maxDate"; "invalid": "invalid"; "disabled": "disabled"; "align": "align"; "verticalAlign": "verticalAlign"; "viewType": "viewType"; "appendToBody": "appendToBody"; "backdrop": "backdrop"; "allowNull": "allowNull"; }, { "selectDate": "selectDate"; }, never, never, false>;
|
|
46
|
-
}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { ChangeDetectorRef, EventEmitter, OnChanges, OnDestroy, SimpleChanges } from '@angular/core';
|
|
2
|
-
import { DayModel } from '../../model/day-model';
|
|
3
|
-
import { viewType } from "../../../../common/model/view-type.model";
|
|
4
|
-
import { DateFromToModel } from "../../model/from-to.model";
|
|
5
|
-
import { BaseCalendar } from "../../base-calendar";
|
|
6
|
-
import * as i0 from "@angular/core";
|
|
7
|
-
export declare class RangeCalendarComponent extends BaseCalendar implements OnChanges, OnDestroy {
|
|
8
|
-
_cdr: ChangeDetectorRef;
|
|
9
|
-
locale: string;
|
|
10
|
-
open: boolean;
|
|
11
|
-
date: DateFromToModel;
|
|
12
|
-
viewType: viewType;
|
|
13
|
-
allowNull: boolean;
|
|
14
|
-
selectedDate: DateFromToModel;
|
|
15
|
-
min: Date | string | number;
|
|
16
|
-
isDateNull: boolean;
|
|
17
|
-
max: Date | string | number;
|
|
18
|
-
hoveredDateChange: EventEmitter<Date>;
|
|
19
|
-
setDate: EventEmitter<Date>;
|
|
20
|
-
calendar: {
|
|
21
|
-
currentMonth: DayModel[];
|
|
22
|
-
nextMonth: DayModel[];
|
|
23
|
-
};
|
|
24
|
-
_hoveredDate: Date;
|
|
25
|
-
get hoveredDate(): Date;
|
|
26
|
-
set hoveredDate(e: Date);
|
|
27
|
-
constructor(_cdr: ChangeDetectorRef);
|
|
28
|
-
getFromTo(): {
|
|
29
|
-
from: any;
|
|
30
|
-
to: any;
|
|
31
|
-
};
|
|
32
|
-
isSelected(d: Date, selectedDate: Date): boolean;
|
|
33
|
-
checkSelected(date: Date, selectedDate: Date): boolean;
|
|
34
|
-
isFirstDaySuitable(m: number, y: number, max: Date): boolean;
|
|
35
|
-
isLastDaySuitable(m: number, y: number, min: Date): boolean;
|
|
36
|
-
ngOnChanges(changes: SimpleChanges): void;
|
|
37
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<RangeCalendarComponent, never>;
|
|
38
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<RangeCalendarComponent, "teta-range-calendar", never, { "locale": "locale"; "open": "open"; "date": "date"; "viewType": "viewType"; "allowNull": "allowNull"; "selectedDate": "selectedDate"; "min": "min"; "isDateNull": "isDateNull"; "max": "max"; }, { "hoveredDateChange": "hoveredDateChange"; "setDate": "setDate"; }, never, never, false>;
|
|
39
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { OnInit } from '@angular/core';
|
|
2
|
-
import { DayModel } from 'projects/components/src/component/date-picker/model/day-model';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class DayItemComponent implements OnInit {
|
|
5
|
-
day: DayModel;
|
|
6
|
-
ngOnInit(): void;
|
|
7
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DayItemComponent, never>;
|
|
8
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<DayItemComponent, "teta-day-item", never, { "day": "day"; }, {}, never, never, false>;
|
|
9
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { EventEmitter } from '@angular/core';
|
|
2
|
-
import { viewType } from 'projects/components/src/common/model/view-type.model';
|
|
3
|
-
import { DayModel } from "../model/day-model";
|
|
4
|
-
import { DateFromToModel } from "../model/from-to.model";
|
|
5
|
-
import * as i0 from "@angular/core";
|
|
6
|
-
export declare class DayPickerComponent {
|
|
7
|
-
date: Date | string | number;
|
|
8
|
-
calendar: DayModel[];
|
|
9
|
-
viewType: viewType;
|
|
10
|
-
range?: DateFromToModel;
|
|
11
|
-
min: Date | string | number;
|
|
12
|
-
max: Date | string | number;
|
|
13
|
-
locale: string;
|
|
14
|
-
hoveredDate?: Date;
|
|
15
|
-
hoveredDateChange?: EventEmitter<Date>;
|
|
16
|
-
selectDate: EventEmitter<Date>;
|
|
17
|
-
daysOfWeek: Map<any, any>;
|
|
18
|
-
constructor();
|
|
19
|
-
isInRange(day: DayModel, from: Date | number | string, to: Date | number | string): boolean;
|
|
20
|
-
isHoveredRange(day: DayModel): boolean;
|
|
21
|
-
isActiveRange(day: DayModel): boolean;
|
|
22
|
-
pickDate(day: DayModel): void;
|
|
23
|
-
getRangeActiveClass(d: DayModel): "" | "datepicker-date_active-first" | "datepicker-date_active-second";
|
|
24
|
-
hover(date: Date): void;
|
|
25
|
-
getClassStaticItem(d: DayModel): "" | "datepicker-date_active-first" | "datepicker-date_active-second";
|
|
26
|
-
getClassHoveredItem(): "datepicker-date_active-first" | "datepicker-date_active-second";
|
|
27
|
-
getClassSelectedItem(d: DayModel): "" | "datepicker-date_active-first" | "datepicker-date_active-second";
|
|
28
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DayPickerComponent, never>;
|
|
29
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<DayPickerComponent, "teta-day-picker", never, { "date": "date"; "calendar": "calendar"; "viewType": "viewType"; "range": "range"; "min": "min"; "max": "max"; "locale": "locale"; "hoveredDate": "hoveredDate"; }, { "hoveredDateChange": "hoveredDateChange"; "selectDate": "selectDate"; }, never, never, false>;
|
|
30
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { ElementRef, OnDestroy } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export declare class ScrollToSelectedYearDirective implements OnDestroy {
|
|
4
|
-
private readonly el;
|
|
5
|
-
alive: boolean;
|
|
6
|
-
constructor(el: ElementRef<Element>);
|
|
7
|
-
ngOnDestroy(): void;
|
|
8
|
-
ngAfterViewInit(): void;
|
|
9
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<ScrollToSelectedYearDirective, never>;
|
|
10
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<ScrollToSelectedYearDirective, "[tetaScrollToSelectedYear]", never, {}, {}, never, never, false>;
|
|
11
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { EventEmitter, OnInit } from '@angular/core';
|
|
2
|
-
import { viewType } from "../../../common/model/view-type.model";
|
|
3
|
-
import { MinMaxDateModel } from "../model/min-max-date.model";
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
export declare class YearPickerComponent implements OnInit {
|
|
6
|
-
selectedYear: number;
|
|
7
|
-
viewType: viewType;
|
|
8
|
-
minMax?: MinMaxDateModel;
|
|
9
|
-
locale: string;
|
|
10
|
-
selectYear: EventEmitter<number>;
|
|
11
|
-
yearPickerDictionary: Map<string, string>;
|
|
12
|
-
alive: boolean;
|
|
13
|
-
years: {
|
|
14
|
-
id: number;
|
|
15
|
-
isSelected: boolean;
|
|
16
|
-
disabled: boolean;
|
|
17
|
-
}[];
|
|
18
|
-
constructor();
|
|
19
|
-
pickYear(year: number, disabled: boolean): void;
|
|
20
|
-
ngOnInit(): void;
|
|
21
|
-
isDisabled(year: number): boolean;
|
|
22
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<YearPickerComponent, never>;
|
|
23
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<YearPickerComponent, "teta-year-picker", never, { "selectedYear": "selectedYear"; "viewType": "viewType"; "minMax": "minMax"; "locale": "locale"; }, { "selectYear": "selectYear"; }, never, never, false>;
|
|
24
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { OnInit, TemplateRef } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export declare class DividerComponent implements OnInit {
|
|
4
|
-
label: any;
|
|
5
|
-
template: TemplateRef<any>;
|
|
6
|
-
constructor();
|
|
7
|
-
ngOnInit(): void;
|
|
8
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DividerComponent, never>;
|
|
9
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<DividerComponent, "teta-divider", never, { "label": "label"; "template": "template"; }, {}, never, never, false>;
|
|
10
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import * as i0 from "@angular/core";
|
|
2
|
-
import * as i1 from "./divider/divider.component";
|
|
3
|
-
import * as i2 from "@angular/common";
|
|
4
|
-
export declare class DividerModule {
|
|
5
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DividerModule, never>;
|
|
6
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<DividerModule, [typeof i1.DividerComponent], [typeof i2.CommonModule], [typeof i1.DividerComponent]>;
|
|
7
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<DividerModule>;
|
|
8
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import * as i0 from "@angular/core";
|
|
2
|
-
import * as i1 from "./icon-file.component";
|
|
3
|
-
import * as i2 from "@angular/common";
|
|
4
|
-
import * as i3 from "@angular/common/http";
|
|
5
|
-
export declare class IconFileModule {
|
|
6
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<IconFileModule, never>;
|
|
7
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<IconFileModule, [typeof i1.IconFileComponent], [typeof i2.CommonModule, typeof i3.HttpClientModule], [typeof i1.IconFileComponent]>;
|
|
8
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<IconFileModule>;
|
|
9
|
-
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
export {};
|
|
2
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmlldy10eXBlLm1vZGVsLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vc3JjL2NvbW1vbi9tb2RlbC92aWV3LXR5cGUubW9kZWwudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCB0eXBlIHZpZXdUeXBlID0gJ2JyaWNrJyB8ICdyb3VuZGVkJyB8ICdjaXJjbGUnXG4iXX0=
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { ChangeDetectionStrategy, Component, HostBinding, Input } from '@angular/core';
|
|
2
|
-
import { AvatarColorEnum } from '../model/avatar-color.enum';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
import * as i1 from "@angular/common";
|
|
5
|
-
import * as i2 from "../../icon/icon/icon.component";
|
|
6
|
-
export class AvatarComponent {
|
|
7
|
-
constructor() {
|
|
8
|
-
this.id = 0;
|
|
9
|
-
this.size = '28';
|
|
10
|
-
this.colorMap = new Map()
|
|
11
|
-
.set(AvatarColorEnum.vibrant, '#FAB13C')
|
|
12
|
-
.set(AvatarColorEnum.pumpkin, '#F67A1A')
|
|
13
|
-
.set(AvatarColorEnum.heart, '#CC3E3E')
|
|
14
|
-
.set(AvatarColorEnum.cerise, '#EB3673')
|
|
15
|
-
.set(AvatarColorEnum.nebula, '#9121A3')
|
|
16
|
-
.set(AvatarColorEnum.vanity, '#9C2AD6')
|
|
17
|
-
.set(AvatarColorEnum.gloomy, '#855EE1')
|
|
18
|
-
.set(AvatarColorEnum.iris, '#5350D1')
|
|
19
|
-
.set(AvatarColorEnum.gorgonzola, '#3858DA')
|
|
20
|
-
.set(AvatarColorEnum.navy, '#1F7CE0')
|
|
21
|
-
.set(AvatarColorEnum.rockman, '#3AA2F4')
|
|
22
|
-
.set(AvatarColorEnum.caribbean, '#1CC3D9')
|
|
23
|
-
.set(AvatarColorEnum.lagoon, '#1D96AE')
|
|
24
|
-
.set(AvatarColorEnum.turquoise, '#1F9D8C')
|
|
25
|
-
.set(AvatarColorEnum.hair, '#1EAE66')
|
|
26
|
-
.set(AvatarColorEnum.poisonous, '#33C333')
|
|
27
|
-
.set(AvatarColorEnum.lime, '#80C026')
|
|
28
|
-
.set(AvatarColorEnum.greyish, '#7F8697');
|
|
29
|
-
}
|
|
30
|
-
get avatar() {
|
|
31
|
-
let avatar = 'avatar ';
|
|
32
|
-
avatar += 'avatar-size-' + this.size;
|
|
33
|
-
return avatar;
|
|
34
|
-
}
|
|
35
|
-
ngOnInit() {
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
AvatarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: AvatarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
39
|
-
AvatarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: AvatarComponent, selector: "teta-avatar", inputs: { photo: "photo", name: "name", id: "id", viewType: "viewType", size: "size" }, host: { properties: { "class": "this.avatar" } }, ngImport: i0, template: "<div [class]=\"avatar\">\n <img [class]=\"'avatar_' + this.viewType\" *ngIf=\"photo;else withoutPhoto\" [src]=\"photo\" alt=\"\"/>\n <ng-template #withoutPhoto>\n <div [class]=\"'avatar_' + this.viewType\" [style.background-color]=\"colorMap.get(id%17)||colorMap.get(0)\"\n class=\"column align-center justify-content-center position-relative\">\n <ng-container *ngIf=\"name;else withoutName\">\n <p>{{name}}</p>\n </ng-container>\n <ng-template #withoutName>\n <teta-icon class=\"width-10 height-10\" style=\"fill: white;width:{{size}}px; height:{{size}}px\" name=\"photoCamera\"></teta-icon>\n </ng-template>\n <div [class]=\"'avatar_' + this.viewType\" class=\"position-absolute\" style=\"width: 100%;z-index:1;height: 100%; background: linear-gradient(180deg, rgba(255, 255, 255, 0.24) 0%, rgba(255, 255, 255, 0) 100%);'\"></div>\n </div>\n </ng-template>\n\n</div>\n", styles: [".avatar{font-style:normal;font-weight:600;line-height:16px}.avatar_brick{border-radius:var(--radius-base-brick)}.avatar_circle{border-radius:var(--radius-base-circle) \"\"}.avatar_round{border-radius:var(--radius-base-round)}.avatar-size-24{height:24px;width:24px;font-size:11px}.avatar-size-24 img,.avatar-size-24 div{height:24px;width:24px}.avatar-size-28{height:28px;width:28px;font-size:11px}.avatar-size-28 img,.avatar-size-28 div{height:28px;width:28px}.avatar-size-32{height:32px;width:32px;font-size:11px}.avatar-size-32 img,.avatar-size-32 div{height:32px;width:32px}.avatar-size-44{height:44px;width:44px;font-size:14px}.avatar-size-44 img,.avatar-size-44 div{height:44px;width:44px}.avatar-size-64{height:64px;width:64px;font-size:16px}.avatar-size-64 img,.avatar-size-64 div{height:64px;width:64px}.avatar-size-128{height:128px;width:128px;font-size:28px}.avatar-size-128 img,.avatar-size-128 div{height:128px;width:128px}.avatar-size-200{height:200px;width:200px;font-size:35px}.avatar-size-200 img,.avatar-size-200 div{height:200px;width:200px}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.IconComponent, selector: "teta-icon", inputs: ["name", "size", "palette", "class"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
40
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: AvatarComponent, decorators: [{
|
|
41
|
-
type: Component,
|
|
42
|
-
args: [{ selector: 'teta-avatar', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div [class]=\"avatar\">\n <img [class]=\"'avatar_' + this.viewType\" *ngIf=\"photo;else withoutPhoto\" [src]=\"photo\" alt=\"\"/>\n <ng-template #withoutPhoto>\n <div [class]=\"'avatar_' + this.viewType\" [style.background-color]=\"colorMap.get(id%17)||colorMap.get(0)\"\n class=\"column align-center justify-content-center position-relative\">\n <ng-container *ngIf=\"name;else withoutName\">\n <p>{{name}}</p>\n </ng-container>\n <ng-template #withoutName>\n <teta-icon class=\"width-10 height-10\" style=\"fill: white;width:{{size}}px; height:{{size}}px\" name=\"photoCamera\"></teta-icon>\n </ng-template>\n <div [class]=\"'avatar_' + this.viewType\" class=\"position-absolute\" style=\"width: 100%;z-index:1;height: 100%; background: linear-gradient(180deg, rgba(255, 255, 255, 0.24) 0%, rgba(255, 255, 255, 0) 100%);'\"></div>\n </div>\n </ng-template>\n\n</div>\n", styles: [".avatar{font-style:normal;font-weight:600;line-height:16px}.avatar_brick{border-radius:var(--radius-base-brick)}.avatar_circle{border-radius:var(--radius-base-circle) \"\"}.avatar_round{border-radius:var(--radius-base-round)}.avatar-size-24{height:24px;width:24px;font-size:11px}.avatar-size-24 img,.avatar-size-24 div{height:24px;width:24px}.avatar-size-28{height:28px;width:28px;font-size:11px}.avatar-size-28 img,.avatar-size-28 div{height:28px;width:28px}.avatar-size-32{height:32px;width:32px;font-size:11px}.avatar-size-32 img,.avatar-size-32 div{height:32px;width:32px}.avatar-size-44{height:44px;width:44px;font-size:14px}.avatar-size-44 img,.avatar-size-44 div{height:44px;width:44px}.avatar-size-64{height:64px;width:64px;font-size:16px}.avatar-size-64 img,.avatar-size-64 div{height:64px;width:64px}.avatar-size-128{height:128px;width:128px;font-size:28px}.avatar-size-128 img,.avatar-size-128 div{height:128px;width:128px}.avatar-size-200{height:200px;width:200px;font-size:35px}.avatar-size-200 img,.avatar-size-200 div{height:200px;width:200px}\n"] }]
|
|
43
|
-
}], ctorParameters: function () { return []; }, propDecorators: { photo: [{
|
|
44
|
-
type: Input
|
|
45
|
-
}], name: [{
|
|
46
|
-
type: Input
|
|
47
|
-
}], id: [{
|
|
48
|
-
type: Input
|
|
49
|
-
}], viewType: [{
|
|
50
|
-
type: Input
|
|
51
|
-
}], size: [{
|
|
52
|
-
type: Input
|
|
53
|
-
}], avatar: [{
|
|
54
|
-
type: HostBinding,
|
|
55
|
-
args: ['class']
|
|
56
|
-
}] } });
|
|
57
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXZhdGFyLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3NyYy9jb21wb25lbnQvYXZhdGFyL2F2YXRhci9hdmF0YXIuY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vLi4vc3JjL2NvbXBvbmVudC9hdmF0YXIvYXZhdGFyL2F2YXRhci5jb21wb25lbnQuaHRtbCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUMsdUJBQXVCLEVBQUUsU0FBUyxFQUFFLFdBQVcsRUFBRSxLQUFLLEVBQVMsTUFBTSxlQUFlLENBQUM7QUFFN0YsT0FBTyxFQUFDLGVBQWUsRUFB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