@libs-ui/components-badge 0.2.29 → 0.2.30-6.1
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/README.md
CHANGED
|
@@ -1,3 +1,143 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Badge
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
## Giới thiệu
|
|
4
|
+
|
|
5
|
+
`@libs-ui/components-badge` là một component Angular linh hoạt để hiển thị các chỉ số số học như thông báo, trạng thái và số liệu quan trọng. Component hỗ trợ nhiều chế độ hiển thị, trạng thái active và tooltip tùy chỉnh.
|
|
6
|
+
|
|
7
|
+
## Tính năng
|
|
8
|
+
|
|
9
|
+
- Định dạng số: hiển thị số nguyên, với dấu cộng, viết tắt K (nghìn) và M (triệu)
|
|
10
|
+
- Hỗ trợ trạng thái `active`
|
|
11
|
+
- Tooltip thông tin với cấu hình linh hoạt (`IPopoverOverlay`)
|
|
12
|
+
- Tùy chỉnh giao diện bằng CSS class và điều khiển margin
|
|
13
|
+
|
|
14
|
+
## Cài đặt
|
|
15
|
+
|
|
16
|
+
### Yêu cầu
|
|
17
|
+
|
|
18
|
+
- Angular 18.0.0 trở lên
|
|
19
|
+
- Tailwind CSS 3.3.0 trở lên
|
|
20
|
+
|
|
21
|
+
Để cài đặt component `badge`, sử dụng npm hoặc yarn:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
npm install @libs-ui/components-badge
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
hoặc
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
yarn add @libs-ui/components-badge
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Sử dụng
|
|
34
|
+
|
|
35
|
+
### Inline Template
|
|
36
|
+
|
|
37
|
+
```typescript
|
|
38
|
+
import { Component } from '@angular/core';
|
|
39
|
+
import { LibsUiComponentsBadgeComponent } from '@libs-ui/components-badge';
|
|
40
|
+
|
|
41
|
+
@Component({
|
|
42
|
+
selector: 'app-example',
|
|
43
|
+
standalone: true,
|
|
44
|
+
imports: [LibsUiComponentsBadgeComponent],
|
|
45
|
+
template: `
|
|
46
|
+
<libs_ui-components-badge
|
|
47
|
+
[count]="newMessages"
|
|
48
|
+
[mode]="'k'"
|
|
49
|
+
[active]="true"
|
|
50
|
+
[popoverConfig]="{ content: newMessages + ' tin nhắn mới' }">
|
|
51
|
+
</libs_ui-components-badge>
|
|
52
|
+
`
|
|
53
|
+
})
|
|
54
|
+
export class ExampleComponent {
|
|
55
|
+
newMessages = 12;
|
|
56
|
+
}
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### File HTML riêng
|
|
60
|
+
|
|
61
|
+
```typescript
|
|
62
|
+
import { Component } from '@angular/core';
|
|
63
|
+
import { LibsUiComponentsBadgeComponent } from '@libs-ui/components-badge';
|
|
64
|
+
|
|
65
|
+
@Component({
|
|
66
|
+
selector: 'app-tooltip-example',
|
|
67
|
+
standalone: true,
|
|
68
|
+
imports: [LibsUiComponentsBadgeComponent],
|
|
69
|
+
templateUrl: './tooltip-example.component.html'
|
|
70
|
+
})
|
|
71
|
+
export class TooltipExampleComponent {
|
|
72
|
+
newMessages = 12;
|
|
73
|
+
}
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
```html
|
|
77
|
+
<libs_ui-components-badge
|
|
78
|
+
[count]="newMessages"
|
|
79
|
+
[popoverConfig]="{ content: newMessages + ' tin nhắn mới' }"
|
|
80
|
+
[active]="true">
|
|
81
|
+
</libs_ui-components-badge>
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
## Công nghệ sử dụng
|
|
85
|
+
|
|
86
|
+
- **Angular 18**: standalone components, Signals
|
|
87
|
+
- **Tailwind CSS**: cho styling
|
|
88
|
+
|
|
89
|
+
## API Reference
|
|
90
|
+
|
|
91
|
+
### Inputs
|
|
92
|
+
|
|
93
|
+
| Tên | Kiểu | Mặc định | Mô tả |
|
|
94
|
+
|-----------------------------|--------------------------------|---------------------------|-------------------------------------------------------------------------------|
|
|
95
|
+
| count | `number` | `0` | Số cần hiển thị trong badge |
|
|
96
|
+
| mode | `TYPE_BADGE_MODE` | `undefined` | Chế độ hiển thị: `'x'` | `'x+'` | `'+x'` | `'k'` | `'0x'` |
|
|
97
|
+
| active | `boolean` | `undefined` | Xác định badge có đang ở trạng thái active hay không |
|
|
98
|
+
| maxCount | `number` | `Number.MAX_SAFE_INTEGER` | Số tối đa để hiển thị trước khi áp dụng định dạng |
|
|
99
|
+
| popoverConfig | `IPopoverOverlay` | `undefined` | Cấu hình popover khi di chuột qua badge |
|
|
100
|
+
| ignoreMarginDefault | `boolean` | `undefined` | Bỏ qua margin mặc định bên trái của badge |
|
|
101
|
+
| classCircle | `string` | `libs-ui-font-h6r` | CSS class cho vòng tròn badge |
|
|
102
|
+
| ignoreStopPropagationEvent | `boolean` | `true` | Bỏ qua việc lan truyền sự kiện khi nhấp vào badge |
|
|
103
|
+
|
|
104
|
+
### Outputs
|
|
105
|
+
|
|
106
|
+
Thư viện không có Outputs.
|
|
107
|
+
|
|
108
|
+
### Interfaces
|
|
109
|
+
|
|
110
|
+
#### `IBadge`
|
|
111
|
+
|
|
112
|
+
```typescript
|
|
113
|
+
export interface IBadge {
|
|
114
|
+
mode?: TYPE_BADGE_MODE;
|
|
115
|
+
count?: number;
|
|
116
|
+
maxCount?: number;
|
|
117
|
+
classCircle?: string;
|
|
118
|
+
}
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
Định nghĩa cấu hình badge (inputs).
|
|
122
|
+
|
|
123
|
+
#### `TYPE_BADGE_MODE`
|
|
124
|
+
|
|
125
|
+
```typescript
|
|
126
|
+
export type TYPE_BADGE_MODE = 'x' | 'x+' | '+x' | 'k' | '0x';
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
Định nghĩa các chế độ hiển thị badge.
|
|
130
|
+
|
|
131
|
+
#### `IPopoverOverlay`
|
|
132
|
+
|
|
133
|
+
```typescript
|
|
134
|
+
interface IPopoverOverlay {
|
|
135
|
+
content: string | TemplateRef<any>;
|
|
136
|
+
width?: string;
|
|
137
|
+
position?: string;
|
|
138
|
+
zIndex?: number;
|
|
139
|
+
offset?: { x?: number; y?: number; };
|
|
140
|
+
}
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
Định nghĩa cấu hình cho popover hiển thị khi di chuột qua badge.
|
|
@@ -4,10 +4,10 @@ import { viewDataNumberByLanguage } from '@libs-ui/utils';
|
|
|
4
4
|
import { Subject } from 'rxjs';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
export class LibsUiComponentsBadgeComponent {
|
|
7
|
-
|
|
7
|
+
// #region PROPERTY
|
|
8
8
|
countDisplay = computed(this.countDisplayComputed.bind(this));
|
|
9
9
|
onDestroy = new Subject();
|
|
10
|
-
|
|
10
|
+
// #region INPUT
|
|
11
11
|
popoverConfig = input();
|
|
12
12
|
active = input();
|
|
13
13
|
count = input(0, { transform: (value) => value ?? 0 });
|
|
@@ -61,10 +61,10 @@ export class LibsUiComponentsBadgeComponent {
|
|
|
61
61
|
this.onDestroy.complete();
|
|
62
62
|
}
|
|
63
63
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LibsUiComponentsBadgeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
64
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.13", type: LibsUiComponentsBadgeComponent, isStandalone: true, selector: "libs_ui-components-badge", inputs: { popoverConfig: { classPropertyName: "popoverConfig", publicName: "popoverConfig", isSignal: true, isRequired: false, transformFunction: null }, active: { classPropertyName: "active", publicName: "active", isSignal: true, isRequired: false, transformFunction: null }, count: { classPropertyName: "count", publicName: "count", isSignal: true, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, maxCount: { classPropertyName: "maxCount", publicName: "maxCount", isSignal: true, isRequired: false, transformFunction: null }, ignoreMarginDefault: { classPropertyName: "ignoreMarginDefault", publicName: "ignoreMarginDefault", isSignal: true, isRequired: false, transformFunction: null }, classCircle: { classPropertyName: "classCircle", publicName: "classCircle", isSignal: true, isRequired: false, transformFunction: null }, ignoreStopPropagationEvent: { classPropertyName: "ignoreStopPropagationEvent", publicName: "ignoreStopPropagationEvent", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<span class=\"libs-ui-badge {{ classCircle () }}\"\n [class.libs-ui-badge-active]=\"active()\"\n [class.ml-0]=\"ignoreMarginDefault()\"\n LibsUiComponentsPopoverDirective\n [type]=\"popoverConfig() ? 'other':'text'\"\n [config]=\"popoverConfig() ?? {content:countDisplay()}\"\n [ignoreStopPropagationEvent]=\"ignoreStopPropagationEvent()\">\n {{ countDisplay() }}\n</span>\n", styles: [".libs-ui-badge{width:fit-content;height:20px;border-radius:12px;display:flex;align-items:center;justify-content:center;color:#6a7383;background:#e6e7ea;margin-left:8px;padding:2px 6px}.libs-ui-badge-active{color:var(--libs-ui-color-default, #226FF5);background:var(--libs-ui-color-light-3, #F4F8FF)}\n"], dependencies: [{ kind: "component", type: LibsUiComponentsPopoverComponent, selector: "libs_ui-components-popover,[LibsUiComponentsPopoverDirective]", inputs: ["flagMouse", "type", "mode", "config", "ignoreShowPopover", "elementRefCustom", "classInclude", "ignoreHiddenPopoverContentWhenMouseLeave", "ignoreStopPropagationEvent", "ignoreCursorPointerModeLikeClick", "isAddContentToParentDocument", "ignoreClickOutside"], outputs: ["outEvent", "outChangStageFlagMouse", "outEventPopoverContent", "outFunctionsControl"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
64
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.13", type: LibsUiComponentsBadgeComponent, isStandalone: true, selector: "libs_ui-components-badge", inputs: { popoverConfig: { classPropertyName: "popoverConfig", publicName: "popoverConfig", isSignal: true, isRequired: false, transformFunction: null }, active: { classPropertyName: "active", publicName: "active", isSignal: true, isRequired: false, transformFunction: null }, count: { classPropertyName: "count", publicName: "count", isSignal: true, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, maxCount: { classPropertyName: "maxCount", publicName: "maxCount", isSignal: true, isRequired: false, transformFunction: null }, ignoreMarginDefault: { classPropertyName: "ignoreMarginDefault", publicName: "ignoreMarginDefault", isSignal: true, isRequired: false, transformFunction: null }, classCircle: { classPropertyName: "classCircle", publicName: "classCircle", isSignal: true, isRequired: false, transformFunction: null }, ignoreStopPropagationEvent: { classPropertyName: "ignoreStopPropagationEvent", publicName: "ignoreStopPropagationEvent", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<span class=\"libs-ui-badge {{ classCircle () }}\"\n [class.libs-ui-badge-active]=\"active()\"\n [class.ml-0]=\"ignoreMarginDefault()\"\n LibsUiComponentsPopoverDirective\n [type]=\"popoverConfig() ? 'other':'text'\"\n [config]=\"popoverConfig() ?? {content:countDisplay()}\"\n [ignoreStopPropagationEvent]=\"ignoreStopPropagationEvent()\">\n {{ countDisplay() }}\n</span>\n", styles: [".libs-ui-badge{width:fit-content;height:20px;border-radius:12px;display:flex;align-items:center;justify-content:center;color:#6a7383;background:#e6e7ea;margin-left:8px;padding:2px 6px}.libs-ui-badge-active{color:var(--libs-ui-color-default, #226FF5);background:var(--libs-ui-color-light-3, #F4F8FF)}\n"], dependencies: [{ kind: "component", type: LibsUiComponentsPopoverComponent, selector: "libs_ui-components-popover,[LibsUiComponentsPopoverDirective]", inputs: ["debugId", "flagMouse", "type", "mode", "config", "ignoreShowPopover", "elementRefCustom", "initEventInElementRefCustom", "classInclude", "ignoreHiddenPopoverContentWhenMouseLeave", "ignoreStopPropagationEvent", "ignoreCursorPointerModeLikeClick", "isAddContentToParentDocument", "ignoreClickOutside"], outputs: ["outEvent", "outChangStageFlagMouse", "outEventPopoverContent", "outFunctionsControl"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
65
65
|
}
|
|
66
66
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LibsUiComponentsBadgeComponent, decorators: [{
|
|
67
67
|
type: Component,
|
|
68
68
|
args: [{ selector: 'libs_ui-components-badge', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [LibsUiComponentsPopoverComponent], template: "<span class=\"libs-ui-badge {{ classCircle () }}\"\n [class.libs-ui-badge-active]=\"active()\"\n [class.ml-0]=\"ignoreMarginDefault()\"\n LibsUiComponentsPopoverDirective\n [type]=\"popoverConfig() ? 'other':'text'\"\n [config]=\"popoverConfig() ?? {content:countDisplay()}\"\n [ignoreStopPropagationEvent]=\"ignoreStopPropagationEvent()\">\n {{ countDisplay() }}\n</span>\n", styles: [".libs-ui-badge{width:fit-content;height:20px;border-radius:12px;display:flex;align-items:center;justify-content:center;color:#6a7383;background:#e6e7ea;margin-left:8px;padding:2px 6px}.libs-ui-badge-active{color:var(--libs-ui-color-default, #226FF5);background:var(--libs-ui-color-light-3, #F4F8FF)}\n"] }]
|
|
69
69
|
}] });
|
|
70
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
70
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmFkZ2UuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vbGlicy11aS9jb21wb25lbnRzL2JhZGdlL3NyYy9iYWRnZS5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi9saWJzLXVpL2NvbXBvbmVudHMvYmFkZ2Uvc3JjL2JhZGdlLmNvbXBvbmVudC5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSx1QkFBdUIsRUFBRSxTQUFTLEVBQWEsUUFBUSxFQUFFLEtBQUssRUFBRSxNQUFNLGVBQWUsQ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Gb3JtYXQgPSB2aWV3RGF0YU51bWJlckJ5TGFuZ3VhZ2UodGhpcy5tYXhDb3VudCgpLCB0cnVlKTtcblxuICAgICAgcmV0dXJuIGAke2NvdW50Rm9ybWF0fStgO1xuICAgIH1cblxuICAgIGlmICghdGhpcy5jb3VudCgpKSB7XG4gICAgICBzd2l0Y2ggKHRoaXMubW9kZSgpKSB7XG4gICAgICAgIGNhc2UgJyt4JzpcbiAgICAgICAgICByZXR1cm4gJyswMCc7XG5cbiAgICAgICAgY2FzZSAneCsnOlxuICAgICAgICAgIHJldHVybiAnMDAnO1xuXG4gICAgICAgIGNhc2UgJ3gnOlxuICAgICAgICAgIHJldHVybiAnMCc7XG5cbiAgICAgICAgY2FzZSAnMHgnOlxuICAgICAgICAgIHJldHVybiAnMDAnO1xuICAgICAgfVxuICAgIH1cblxuICAgIGlmICh0aGlzLmNvdW50KCkgPCAxMCkge1xuICAgICAgc3dpdGNoICh0aGlzLm1vZGUoKSkge1xuICAgICAgICBjYXNlICcreCc6XG4gICAgICAgICAgcmV0dXJuIGArMCR7dGhpcy5jb3VudCgpfWA7XG5cbiAgICAgICAgY2FzZSAneCsnOlxuICAgICAgICAgIHJldHVybiBgMCR7dGhpcy5jb3VudCgpfWA7XG5cbiAgICAgICAgY2FzZSAneCc6XG4gICAgICAgICAgcmV0dXJuIGAke3RoaXMuY291bnQoKX1gO1xuXG4gICAgICAgIGNhc2UgJzB4JzpcbiAgICAgICAgICByZXR1cm4gYDAke3RoaXMuY291bnQoKX1gO1xuICAgICAgfVxuICAgIH1cbiAgICBjb25zdCBjb3VudEZvcm1hdCA9IHZpZXdEYXRhTnVtYmVyQnlMYW5ndWFnZSh0aGlzLmNvdW50KCksIHRydWUpO1xuXG4gICAgcmV0dXJuIHRoaXMubW9kZSgpID09PSAnK3gnID8gYCske2NvdW50Rm9ybWF0fWAgOiBgJHtjb3VudEZvcm1hdH1gO1xuICB9XG5cbiAgbmdPbkRlc3Ryb3koKTogdm9pZCB7XG4gICAgdGhpcy5vbkRlc3Ryb3kubmV4dCgpO1xuICAgIHRoaXMub25EZXN0cm95LmNvbXBsZXRlKCk7XG4gIH1cbn1cbiIsIjxzcGFuIGNsYXNzPVwibGlicy11aS1iYWRnZSB7eyBjbGFzc0NpcmNsZSAoKSB9fVwiXG4gIFtjbGFzcy5saWJzLXVpLWJhZGdlLWFjdGl2ZV09XCJhY3RpdmUoKVwiXG4gIFtjbGFzcy5tbC0wXT1cImlnbm9yZU1hcmdpbkRlZmF1bHQoKVwiXG4gIExpYnNVaUNvbXBvbmVudHNQb3BvdmVyRGlyZWN0aXZlXG4gIFt0eXBlXT1cInBvcG92ZXJDb25maWcoKSA/ICdvdGhlcic6J3RleHQnXCJcbiAgW2NvbmZpZ109XCJwb3BvdmVyQ29uZmlnKCkgPz8ge2NvbnRlbnQ6Y291bnREaXNwbGF5KCl9XCJcbiAgW2lnbm9yZVN0b3BQcm9wYWdhdGlvbkV2ZW50XT1cImlnbm9yZVN0b3BQcm9wYWdhdGlvbkV2ZW50KClcIj5cbiAge3sgY291bnREaXNwbGF5KCkgfX1cbjwvc3Bhbj5cbiJdfQ==
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { computed, input,
|
|
2
|
+
import { computed, input, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
3
|
import { LibsUiComponentsPopoverComponent } from '@libs-ui/components-popover';
|
|
4
4
|
import { viewDataNumberByLanguage } from '@libs-ui/utils';
|
|
5
5
|
import { Subject } from 'rxjs';
|
|
6
6
|
|
|
7
7
|
class LibsUiComponentsBadgeComponent {
|
|
8
|
-
|
|
8
|
+
// #region PROPERTY
|
|
9
9
|
countDisplay = computed(this.countDisplayComputed.bind(this));
|
|
10
10
|
onDestroy = new Subject();
|
|
11
|
-
|
|
11
|
+
// #region INPUT
|
|
12
12
|
popoverConfig = input();
|
|
13
13
|
active = input();
|
|
14
14
|
count = input(0, { transform: (value) => value ?? 0 });
|
|
@@ -62,7 +62,7 @@ class LibsUiComponentsBadgeComponent {
|
|
|
62
62
|
this.onDestroy.complete();
|
|
63
63
|
}
|
|
64
64
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LibsUiComponentsBadgeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
65
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.13", type: LibsUiComponentsBadgeComponent, isStandalone: true, selector: "libs_ui-components-badge", inputs: { popoverConfig: { classPropertyName: "popoverConfig", publicName: "popoverConfig", isSignal: true, isRequired: false, transformFunction: null }, active: { classPropertyName: "active", publicName: "active", isSignal: true, isRequired: false, transformFunction: null }, count: { classPropertyName: "count", publicName: "count", isSignal: true, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, maxCount: { classPropertyName: "maxCount", publicName: "maxCount", isSignal: true, isRequired: false, transformFunction: null }, ignoreMarginDefault: { classPropertyName: "ignoreMarginDefault", publicName: "ignoreMarginDefault", isSignal: true, isRequired: false, transformFunction: null }, classCircle: { classPropertyName: "classCircle", publicName: "classCircle", isSignal: true, isRequired: false, transformFunction: null }, ignoreStopPropagationEvent: { classPropertyName: "ignoreStopPropagationEvent", publicName: "ignoreStopPropagationEvent", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<span class=\"libs-ui-badge {{ classCircle () }}\"\n [class.libs-ui-badge-active]=\"active()\"\n [class.ml-0]=\"ignoreMarginDefault()\"\n LibsUiComponentsPopoverDirective\n [type]=\"popoverConfig() ? 'other':'text'\"\n [config]=\"popoverConfig() ?? {content:countDisplay()}\"\n [ignoreStopPropagationEvent]=\"ignoreStopPropagationEvent()\">\n {{ countDisplay() }}\n</span>\n", styles: [".libs-ui-badge{width:fit-content;height:20px;border-radius:12px;display:flex;align-items:center;justify-content:center;color:#6a7383;background:#e6e7ea;margin-left:8px;padding:2px 6px}.libs-ui-badge-active{color:var(--libs-ui-color-default, #226FF5);background:var(--libs-ui-color-light-3, #F4F8FF)}\n"], dependencies: [{ kind: "component", type: LibsUiComponentsPopoverComponent, selector: "libs_ui-components-popover,[LibsUiComponentsPopoverDirective]", inputs: ["flagMouse", "type", "mode", "config", "ignoreShowPopover", "elementRefCustom", "classInclude", "ignoreHiddenPopoverContentWhenMouseLeave", "ignoreStopPropagationEvent", "ignoreCursorPointerModeLikeClick", "isAddContentToParentDocument", "ignoreClickOutside"], outputs: ["outEvent", "outChangStageFlagMouse", "outEventPopoverContent", "outFunctionsControl"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
65
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.13", type: LibsUiComponentsBadgeComponent, isStandalone: true, selector: "libs_ui-components-badge", inputs: { popoverConfig: { classPropertyName: "popoverConfig", publicName: "popoverConfig", isSignal: true, isRequired: false, transformFunction: null }, active: { classPropertyName: "active", publicName: "active", isSignal: true, isRequired: false, transformFunction: null }, count: { classPropertyName: "count", publicName: "count", isSignal: true, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, maxCount: { classPropertyName: "maxCount", publicName: "maxCount", isSignal: true, isRequired: false, transformFunction: null }, ignoreMarginDefault: { classPropertyName: "ignoreMarginDefault", publicName: "ignoreMarginDefault", isSignal: true, isRequired: false, transformFunction: null }, classCircle: { classPropertyName: "classCircle", publicName: "classCircle", isSignal: true, isRequired: false, transformFunction: null }, ignoreStopPropagationEvent: { classPropertyName: "ignoreStopPropagationEvent", publicName: "ignoreStopPropagationEvent", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<span class=\"libs-ui-badge {{ classCircle () }}\"\n [class.libs-ui-badge-active]=\"active()\"\n [class.ml-0]=\"ignoreMarginDefault()\"\n LibsUiComponentsPopoverDirective\n [type]=\"popoverConfig() ? 'other':'text'\"\n [config]=\"popoverConfig() ?? {content:countDisplay()}\"\n [ignoreStopPropagationEvent]=\"ignoreStopPropagationEvent()\">\n {{ countDisplay() }}\n</span>\n", styles: [".libs-ui-badge{width:fit-content;height:20px;border-radius:12px;display:flex;align-items:center;justify-content:center;color:#6a7383;background:#e6e7ea;margin-left:8px;padding:2px 6px}.libs-ui-badge-active{color:var(--libs-ui-color-default, #226FF5);background:var(--libs-ui-color-light-3, #F4F8FF)}\n"], dependencies: [{ kind: "component", type: LibsUiComponentsPopoverComponent, selector: "libs_ui-components-popover,[LibsUiComponentsPopoverDirective]", inputs: ["debugId", "flagMouse", "type", "mode", "config", "ignoreShowPopover", "elementRefCustom", "initEventInElementRefCustom", "classInclude", "ignoreHiddenPopoverContentWhenMouseLeave", "ignoreStopPropagationEvent", "ignoreCursorPointerModeLikeClick", "isAddContentToParentDocument", "ignoreClickOutside"], outputs: ["outEvent", "outChangStageFlagMouse", "outEventPopoverContent", "outFunctionsControl"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
66
66
|
}
|
|
67
67
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LibsUiComponentsBadgeComponent, decorators: [{
|
|
68
68
|
type: Component,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"libs-ui-components-badge.mjs","sources":["../../../../../libs-ui/components/badge/src/badge.component.ts","../../../../../libs-ui/components/badge/src/badge.component.html","../../../../../libs-ui/components/badge/src/libs-ui-components-badge.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, OnDestroy, computed, input } from '@angular/core';\nimport { IPopoverOverlay, LibsUiComponentsPopoverComponent } from '@libs-ui/components-popover';\nimport { viewDataNumberByLanguage } from '@libs-ui/utils';\nimport { Subject } from 'rxjs';\nimport { TYPE_BADGE_MODE } from './interfaces/mode.type';\n\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'libs_ui-components-badge',\n templateUrl: './badge.component.html',\n styleUrls: ['./badge.component.scss'],\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [LibsUiComponentsPopoverComponent]\n})\nexport class LibsUiComponentsBadgeComponent implements OnDestroy {\n
|
|
1
|
+
{"version":3,"file":"libs-ui-components-badge.mjs","sources":["../../../../../libs-ui/components/badge/src/badge.component.ts","../../../../../libs-ui/components/badge/src/badge.component.html","../../../../../libs-ui/components/badge/src/libs-ui-components-badge.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, OnDestroy, computed, input } from '@angular/core';\nimport { IPopoverOverlay, LibsUiComponentsPopoverComponent } from '@libs-ui/components-popover';\nimport { viewDataNumberByLanguage } from '@libs-ui/utils';\nimport { Subject } from 'rxjs';\nimport { TYPE_BADGE_MODE } from './interfaces/mode.type';\n\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'libs_ui-components-badge',\n templateUrl: './badge.component.html',\n styleUrls: ['./badge.component.scss'],\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [LibsUiComponentsPopoverComponent]\n})\nexport class LibsUiComponentsBadgeComponent implements OnDestroy {\n // #region PROPERTY\n protected countDisplay = computed(this.countDisplayComputed.bind(this));\n\n private onDestroy = new Subject<void>();\n\n // #region INPUT\n readonly popoverConfig = input<IPopoverOverlay>();\n readonly active = input<boolean>();\n readonly count = input<number, number>(0, { transform: (value) => value ?? 0 });\n readonly mode = input<TYPE_BADGE_MODE>(); // không truyền mặc định các giá trị < 10 sẽ có số 0 ở đầu\n readonly maxCount = input<number, number>(Number.MAX_SAFE_INTEGER, { transform: (value) => value ?? Number.MAX_SAFE_INTEGER }); // nếu count > maxCount sẽ xem xét mode để hiển thị.\n readonly ignoreMarginDefault = input<boolean>();\n readonly classCircle = input<string, string>('libs-ui-font-h6r', { transform: (value) => value ?? 'libs-ui-font-h6r' });\n readonly ignoreStopPropagationEvent = input<boolean, boolean>(true, { transform: (value) => value ?? true });\n\n /* COMPUTED PROPERTIES FUNCTION */\n private countDisplayComputed() {\n if (this.mode() === 'k' && this.count() > 999) {\n const count = this.count() / 1000;\n\n if (count > 1000) {\n return `${viewDataNumberByLanguage(count / 1000, true, 1, false, true)}M`;\n }\n\n return `${viewDataNumberByLanguage(count, true, 1, false, true)}K`;\n }\n\n if (this.mode() === 'x+' && this.count() > this.maxCount()) {\n const countFormat = viewDataNumberByLanguage(this.maxCount(), true);\n\n return `${countFormat}+`;\n }\n\n if (!this.count()) {\n switch (this.mode()) {\n case '+x':\n return '+00';\n\n case 'x+':\n return '00';\n\n case 'x':\n return '0';\n\n case '0x':\n return '00';\n }\n }\n\n if (this.count() < 10) {\n switch (this.mode()) {\n case '+x':\n return `+0${this.count()}`;\n\n case 'x+':\n return `0${this.count()}`;\n\n case 'x':\n return `${this.count()}`;\n\n case '0x':\n return `0${this.count()}`;\n }\n }\n const countFormat = viewDataNumberByLanguage(this.count(), true);\n\n return this.mode() === '+x' ? `+${countFormat}` : `${countFormat}`;\n }\n\n ngOnDestroy(): void {\n this.onDestroy.next();\n this.onDestroy.complete();\n }\n}\n","<span class=\"libs-ui-badge {{ classCircle () }}\"\n [class.libs-ui-badge-active]=\"active()\"\n [class.ml-0]=\"ignoreMarginDefault()\"\n LibsUiComponentsPopoverDirective\n [type]=\"popoverConfig() ? 'other':'text'\"\n [config]=\"popoverConfig() ?? {content:countDisplay()}\"\n [ignoreStopPropagationEvent]=\"ignoreStopPropagationEvent()\">\n {{ countDisplay() }}\n</span>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;MAea,8BAA8B,CAAA;;AAE/B,IAAA,YAAY,GAAG,QAAQ,CAAC,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAE/D,IAAA,SAAS,GAAG,IAAI,OAAO,EAAQ;;IAG9B,aAAa,GAAG,KAAK,EAAmB;IACxC,MAAM,GAAG,KAAK,EAAW;AACzB,IAAA,KAAK,GAAG,KAAK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EAAA,IAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECf3C,+XASA,EAAA,MAAA,EAAA,CAAA,+SAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EDIY,gCAAgC,EAAA,QAAA,EAAA,+DAAA,EAAA,MAAA,EAAA,CAAA,SAAA,EAAA,WAAA,EAAA,MAAA,EAAA,MAAA,EAAA,QAAA,EAAA,mBAAA,EAAA,kBAAA,EAAA,6BAAA,EAAA,cAAA,EAAA,0CAAA,EAAA,4BAAA,EAAA,kCAAA,EAAA,8BAAA,EAAA,oBAAA,CAAA,EAAA,OAAA,EAAA,CAAA,UAAA,EAAA,wBAAA,EAAA,wBAAA,EAAA,qBAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;4FAE/B,8BAA8B,EAAA,UAAA,EAAA,CAAA;kBAT1C,SAAS;+BAEE,0BAA0B,EAAA,UAAA,EAGxB,IAAI,EAAA,eAAA,EACC,uBAAuB,CAAC,MAAM,EAAA,OAAA,EACtC,CAAC,gCAAgC,CAAC,EAAA,QAAA,EAAA,+XAAA,EAAA,MAAA,EAAA,CAAA,+SAAA,CAAA,EAAA;;;AEb7C;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@libs-ui/components-badge",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.306.1",
|
|
4
4
|
"peerDependencies": {
|
|
5
|
-
"@angular/
|
|
6
|
-
"@
|
|
5
|
+
"@angular/core": ">=18.0.0",
|
|
6
|
+
"@libs-ui/components-popover": "0.2.306.1",
|
|
7
|
+
"@libs-ui/utils": "0.2.306.1",
|
|
8
|
+
"rxjs": "~7.8.0"
|
|
7
9
|
},
|
|
8
10
|
"sideEffects": false,
|
|
9
11
|
"module": "fesm2022/libs-ui-components-badge.mjs",
|