@libs-ui/components-process-bar-standard 0.2.357-3 → 0.2.357-31
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 +78 -129
- package/esm2022/process-bar-standard.component.mjs +5 -3
- package/esm2022/process-bar-standard.interface.mjs +1 -1
- package/fesm2022/libs-ui-components-process-bar-standard.mjs +4 -2
- package/fesm2022/libs-ui-components-process-bar-standard.mjs.map +1 -1
- package/package.json +2 -2
- package/process-bar-standard.component.d.ts +1 -0
- package/process-bar-standard.interface.d.ts +5 -0
package/README.md
CHANGED
|
@@ -45,152 +45,109 @@ export class MyComponent {}
|
|
|
45
45
|
|
|
46
46
|
## Ví dụ sử dụng
|
|
47
47
|
|
|
48
|
-
###
|
|
48
|
+
### 1. Basic Stack
|
|
49
|
+
|
|
50
|
+
Chế độ Stack cơ bản với nhiều bước.
|
|
51
|
+
|
|
52
|
+
```html
|
|
53
|
+
<libs_ui-components-process_bar-standard [config]="configBasic()" />
|
|
54
|
+
```
|
|
49
55
|
|
|
50
56
|
```typescript
|
|
51
57
|
import { signal } from '@angular/core';
|
|
52
|
-
import {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
58
|
+
import { IProcessBarStandardInterface, IProcessBarStandardStepInterface } from '@libs-ui/components-process-bar-standard';
|
|
59
|
+
|
|
60
|
+
// Define Steps as Signals
|
|
61
|
+
const step1 = signal<IProcessBarStandardStepInterface>({ value: 30, color: '#EF4444', label: 'Processing' });
|
|
62
|
+
const step2 = signal<IProcessBarStandardStepInterface>({ value: 50, color: '#3B82F6', label: 'Done' });
|
|
63
|
+
|
|
64
|
+
// Config with nested signals
|
|
65
|
+
readonly configBasic = signal<IProcessBarStandardInterface>({
|
|
66
|
+
width: '100%',
|
|
67
|
+
height: '24px',
|
|
68
|
+
radius: 12,
|
|
69
|
+
totalValue: 100,
|
|
70
|
+
mode: 'stack',
|
|
71
|
+
steps: signal([step1, step2])
|
|
72
|
+
});
|
|
73
|
+
```
|
|
57
74
|
|
|
58
|
-
|
|
59
|
-
standalone: true,
|
|
60
|
-
imports: [LibsUiComponentsProcessBarStandardComponent],
|
|
61
|
-
template: `
|
|
62
|
-
<libs_ui-components-process_bar-standard [config]="configStack()" />
|
|
63
|
-
`,
|
|
64
|
-
})
|
|
65
|
-
export class MyComponent {
|
|
66
|
-
private readonly stepProcessing = signal<IProcessBarStandardStepInterface>({
|
|
67
|
-
value: 30,
|
|
68
|
-
color: '#EF4444',
|
|
69
|
-
label: 'Processing',
|
|
70
|
-
});
|
|
71
|
-
private readonly stepDone = signal<IProcessBarStandardStepInterface>({
|
|
72
|
-
value: 50,
|
|
73
|
-
color: '#3B82F6',
|
|
74
|
-
label: 'Done',
|
|
75
|
-
});
|
|
76
|
-
private readonly stepPending = signal<IProcessBarStandardStepInterface>({
|
|
77
|
-
value: 20,
|
|
78
|
-
color: '#10B981',
|
|
79
|
-
});
|
|
75
|
+
---
|
|
80
76
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
radius: 12,
|
|
85
|
-
totalValue: 100,
|
|
86
|
-
mode: 'stack',
|
|
87
|
-
steps: signal([this.stepProcessing, this.stepDone, this.stepPending]),
|
|
88
|
-
});
|
|
89
|
-
}
|
|
90
|
-
```
|
|
77
|
+
### 2. Separate Mode
|
|
78
|
+
|
|
79
|
+
Chế độ Separate với các thanh riêng biệt.
|
|
91
80
|
|
|
92
81
|
```html
|
|
93
|
-
<libs_ui-components-process_bar-standard [config]="
|
|
82
|
+
<libs_ui-components-process_bar-standard [config]="configSeparate()" />
|
|
94
83
|
```
|
|
95
84
|
|
|
96
|
-
### Ví dụ 2 — Separate mode với hiển thị phần trăm
|
|
97
|
-
|
|
98
85
|
```typescript
|
|
99
86
|
import { signal } from '@angular/core';
|
|
100
|
-
import {
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
87
|
+
import { IProcessBarStandardInterface } from '@libs-ui/components-process-bar-standard';
|
|
88
|
+
|
|
89
|
+
readonly configSeparate = signal<IProcessBarStandardInterface>({
|
|
90
|
+
width: '100%',
|
|
91
|
+
height: '16px',
|
|
92
|
+
backgroundColor: 'transparent',
|
|
93
|
+
radius: 8,
|
|
94
|
+
totalValue: 100,
|
|
95
|
+
mode: 'separate',
|
|
96
|
+
steps: signal([
|
|
97
|
+
signal({ value: 75, color: '#8B5CF6', label: 'Progress', showPercent: true }),
|
|
98
|
+
signal({ value: 45, color: '#F59E0B', label: 'Pending', showPercent: true }),
|
|
99
|
+
])
|
|
100
|
+
});
|
|
101
|
+
```
|
|
105
102
|
|
|
106
|
-
|
|
107
|
-
standalone: true,
|
|
108
|
-
imports: [LibsUiComponentsProcessBarStandardComponent],
|
|
109
|
-
template: `
|
|
110
|
-
<libs_ui-components-process_bar-standard [config]="configSeparate()" />
|
|
111
|
-
`,
|
|
112
|
-
})
|
|
113
|
-
export class MyComponent {
|
|
114
|
-
private readonly stepProgress = signal<IProcessBarStandardStepInterface>({
|
|
115
|
-
value: 75,
|
|
116
|
-
color: '#8B5CF6',
|
|
117
|
-
label: 'Tiến độ',
|
|
118
|
-
showPercent: true,
|
|
119
|
-
});
|
|
120
|
-
private readonly stepPending = signal<IProcessBarStandardStepInterface>({
|
|
121
|
-
value: 45,
|
|
122
|
-
color: '#F59E0B',
|
|
123
|
-
label: 'Đang chờ',
|
|
124
|
-
showPercent: true,
|
|
125
|
-
});
|
|
103
|
+
---
|
|
126
104
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
backgroundColor: 'transparent',
|
|
131
|
-
radius: 8,
|
|
132
|
-
totalValue: 100,
|
|
133
|
-
mode: 'separate',
|
|
134
|
-
steps: signal([this.stepProgress, this.stepPending]),
|
|
135
|
-
});
|
|
136
|
-
}
|
|
137
|
-
```
|
|
105
|
+
### 3. Interactive
|
|
106
|
+
|
|
107
|
+
Thay đổi giá trị động realtime.
|
|
138
108
|
|
|
139
109
|
```html
|
|
140
|
-
<
|
|
110
|
+
<div class="mb-4">
|
|
111
|
+
<input type="range" [(ngModel)]="interactiveValue" min="0" max="100">
|
|
112
|
+
</div>
|
|
113
|
+
<libs_ui-components-process_bar-standard [config]="configInteractive()" />
|
|
141
114
|
```
|
|
142
115
|
|
|
143
|
-
### Ví dụ 3 — Cập nhật realtime bằng Nested Signals
|
|
144
|
-
|
|
145
116
|
```typescript
|
|
146
|
-
import { signal, computed } from '@angular/core';
|
|
147
|
-
import {
|
|
148
|
-
LibsUiComponentsProcessBarStandardComponent,
|
|
149
|
-
IProcessBarStandardInterface,
|
|
150
|
-
IProcessBarStandardStepInterface,
|
|
151
|
-
} from '@libs-ui/components-process-bar-standard';
|
|
117
|
+
import { signal, computed, effect, untracked } from '@angular/core';
|
|
118
|
+
import { IProcessBarStandardInterface, IProcessBarStandardStepInterface } from '@libs-ui/components-process-bar-standard';
|
|
152
119
|
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
<button (click)="handlerIncrement($event)">Tăng tiến độ</button>
|
|
158
|
-
<libs_ui-components-process_bar-standard [config]="configRealtime()" />
|
|
159
|
-
`,
|
|
160
|
-
})
|
|
161
|
-
export class MyComponent {
|
|
162
|
-
private readonly currentValue = signal(40);
|
|
120
|
+
// [(ngModel)]="interactiveValue" — giá trị điều khiển bằng thanh trượt
|
|
121
|
+
readonly interactiveValue = signal(40);
|
|
122
|
+
readonly interactiveHeight = signal('20px');
|
|
123
|
+
readonly interactiveRadius = signal(10);
|
|
163
124
|
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
color: '#EC4899',
|
|
167
|
-
label: 'Đang xử lý',
|
|
168
|
-
});
|
|
125
|
+
// Step cơ sở — value được đồng bộ tự động từ interactiveValue qua effect()
|
|
126
|
+
readonly interactiveStep = signal<IProcessBarStandardStepInterface>({ value: 40, color: '#EC4899', label: 'Dynamic Base' });
|
|
169
127
|
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
mode: 'stack',
|
|
176
|
-
steps: signal([this.stepMain]),
|
|
177
|
-
}));
|
|
178
|
-
|
|
179
|
-
protected handlerIncrement(event: Event): void {
|
|
180
|
-
event.stopPropagation();
|
|
181
|
-
const next = Math.min(this.currentValue() + 10, 100);
|
|
182
|
-
this.currentValue.set(next);
|
|
183
|
-
this.stepMain.update((step) => ({ ...step, value: next }));
|
|
184
|
-
}
|
|
128
|
+
constructor() {
|
|
129
|
+
effect(() => {
|
|
130
|
+
const value = this.interactiveValue();
|
|
131
|
+
untracked(() => this.interactiveStep.update((s) => ({ ...s, value })));
|
|
132
|
+
});
|
|
185
133
|
}
|
|
186
|
-
```
|
|
187
134
|
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
135
|
+
// [config]="configInteractive()" — computed config dựa trên các signal tương tác
|
|
136
|
+
readonly configInteractive = computed<IProcessBarStandardInterface>(() => ({
|
|
137
|
+
width: '100%',
|
|
138
|
+
height: this.interactiveHeight(),
|
|
139
|
+
radius: this.interactiveRadius(),
|
|
140
|
+
totalValue: 100,
|
|
141
|
+
mode: 'stack',
|
|
142
|
+
steps: signal([this.interactiveStep])
|
|
143
|
+
}));
|
|
191
144
|
```
|
|
192
145
|
|
|
193
|
-
|
|
146
|
+
> ⚠️ **FormsModule bắt buộc**: Ví dụ Interactive dùng `[(ngModel)]`, cần import `FormsModule` vào `imports[]` của component sử dụng.
|
|
147
|
+
|
|
148
|
+
---
|
|
149
|
+
|
|
150
|
+
### 4. Global default config qua Injection Token
|
|
194
151
|
|
|
195
152
|
```typescript
|
|
196
153
|
import { ApplicationConfig } from '@angular/core';
|
|
@@ -318,11 +275,3 @@ export interface IProcessBarStandardStepInterface {
|
|
|
318
275
|
⚠️ **`showPercent` chỉ hoạt động ở chế độ `separate`**: Trong chế độ `stack`, thuộc tính `showPercent` (cả ở config lẫn từng step) không có hiệu lực vì cấu trúc layout không hỗ trợ.
|
|
319
276
|
|
|
320
277
|
⚠️ **Global default token**: Nếu inject `PROCESS_BAR_STANDARD_CONFIG_DEFAULT_TOKEN_INJECT`, các giá trị trong token sẽ là fallback khi thuộc tính tương ứng trong `[config]` không được truyền. Thứ tự ưu tiên: `config.xxx` > `tokenDefault.xxx` > hardcoded default.
|
|
321
|
-
|
|
322
|
-
## Demo
|
|
323
|
-
|
|
324
|
-
```bash
|
|
325
|
-
npx nx serve core-ui
|
|
326
|
-
```
|
|
327
|
-
|
|
328
|
-
Truy cập: http://localhost:4500/components/process-bar/standard
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ChangeDetectionStrategy, Component, computed, inject, input } from '@angular/core';
|
|
2
|
+
import { LibsUiPipesFormatNumberPipe } from '@libs-ui/pipes-format-number';
|
|
2
3
|
import { PROCESS_BAR_STANDARD_CONFIG_DEFAULT_TOKEN_INJECT } from '@libs-ui/utils';
|
|
3
4
|
import * as i0 from "@angular/core";
|
|
4
5
|
export class LibsUiComponentsProcessBarStandardComponent {
|
|
@@ -6,13 +7,14 @@ export class LibsUiComponentsProcessBarStandardComponent {
|
|
|
6
7
|
height = computed(() => this.config().height ?? this.processBarConfigDefault?.height ?? '12px');
|
|
7
8
|
backgroundColor = computed(() => this.config().backgroundColor ?? this.processBarConfigDefault?.backgroundColor ?? '#F8F9FA');
|
|
8
9
|
radius = computed(() => `${this.config().radius ?? this.processBarConfigDefault?.radius ?? 20}px`);
|
|
10
|
+
percentFixed = computed(() => this.config().percentFixed ?? this.processBarConfigDefault?.percentFixed ?? 2);
|
|
9
11
|
config = input.required();
|
|
10
12
|
processBarConfigDefault = inject(PROCESS_BAR_STANDARD_CONFIG_DEFAULT_TOKEN_INJECT, { optional: true });
|
|
11
13
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: LibsUiComponentsProcessBarStandardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
12
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: LibsUiComponentsProcessBarStandardComponent, isStandalone: true, selector: "libs_ui-components-process_bar-standard", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "@let constHtmlSteps = config().steps() || [];\n@let constHtmlMode = config().mode || 'stack';\n@let constHtmlTotalValue = config().totalValue;\n\n@if (constHtmlSteps.length > 0 && constHtmlTotalValue) {\n @switch (constHtmlMode) {\n @case ('stack') {\n <div\n [class]=\"(config().classInclude || '') + ' libs-ui-process-bar-standard'\"\n [style.width]=\"width()\"\n [style.height]=\"height()\"\n [style.backgroundColor]=\"backgroundColor()\"\n [style.borderRadius]=\"radius()\">\n @for (step of constHtmlSteps; track step()) {\n @let constHtmlStepPercent = (step().value / constHtmlTotalValue) * 100;\n <div\n class=\"flex h-full items-center\"\n [style.backgroundColor]=\"step().color\"\n [style.width]=\"constHtmlStepPercent + '%'\">\n @if (step().label) {\n <span [class]=\"(step().classLabel || '') + ' libs-ui-font-h5r ml-[12px]'\">{{ step().label }}</span>\n }\n </div>\n }\n </div>\n }\n\n @case ('separate') {\n @for (step of constHtmlSteps; track step()) {\n @let constHtmlStepPercent = (step().value / constHtmlTotalValue) * 100;\n @let constHtmlShowPercent = step().showPercent ?? config().showPercent;\n @let constHtmlPercentClass = (step().percentClass ?? config().percentClass) || '';\n\n <div\n [class]=\"(config().classInclude || '') + ' flex w-full shrink-0 items-center relative my-[8px]'\"\n [style.width]=\"width()\"\n [style.height]=\"height()\">\n <div class=\"flex w-full h-full relative\">\n <div class=\"flex absolute w-full h-full\">\n <div\n class=\"libs-ui-process-bar-standard\"\n [style.backgroundColor]=\"backgroundColor()\"\n [style.borderRadius]=\"radius()\">\n <div\n class=\"flex h-full\"\n [style.backgroundColor]=\"step().color\"\n [style.width]=\"constHtmlStepPercent + '%'\"\n [style.borderRadius]=\"radius()\"\n [class]=\"step().classInclude\"></div>\n @if (step().label) {\n <div class=\"absolute top-0 left-0 w-full h-full flex items-center\">\n <span [class]=\"(step().classLabel || '') + ' libs-ui-font-h5r ml-[12px]'\">{{ step().label }}</span>\n </div>\n }\n </div>\n </div>\n </div>\n @if (constHtmlShowPercent) {\n <div [class]=\"constHtmlPercentClass + 'libs-ui-font-
|
|
14
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: LibsUiComponentsProcessBarStandardComponent, isStandalone: true, selector: "libs_ui-components-process_bar-standard", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "@let constHtmlSteps = config().steps() || [];\n@let constHtmlMode = config().mode || 'stack';\n@let constHtmlTotalValue = config().totalValue;\n\n@if (constHtmlSteps.length > 0 && constHtmlTotalValue) {\n @switch (constHtmlMode) {\n @case ('stack') {\n <div\n [class]=\"(config().classInclude || '') + ' libs-ui-process-bar-standard'\"\n [style.width]=\"width()\"\n [style.height]=\"height()\"\n [style.backgroundColor]=\"backgroundColor()\"\n [style.borderRadius]=\"radius()\">\n @for (step of constHtmlSteps; track step()) {\n @let constHtmlStepPercent = (step().value / constHtmlTotalValue) * 100;\n <div\n class=\"flex h-full items-center\"\n [style.backgroundColor]=\"step().color\"\n [style.width]=\"constHtmlStepPercent + '%'\">\n @if (step().label) {\n <span [class]=\"(step().classLabel || '') + ' libs-ui-font-h5r ml-[12px]'\">{{ step().label }}</span>\n }\n </div>\n }\n </div>\n }\n\n @case ('separate') {\n @for (step of constHtmlSteps; track step()) {\n @let constHtmlStepPercent = (step().value / constHtmlTotalValue) * 100;\n @let constHtmlShowPercent = step().showPercent ?? config().showPercent;\n @let constHtmlPercentClass = (step().percentClass ?? config().percentClass) || '';\n\n <div\n [class]=\"(config().classInclude || '') + ' flex w-full shrink-0 items-center relative my-[8px]'\"\n [style.width]=\"width()\"\n [style.height]=\"height()\">\n <div class=\"flex w-full h-full relative\">\n <div class=\"flex absolute w-full h-full\">\n <div\n class=\"libs-ui-process-bar-standard\"\n [style.backgroundColor]=\"backgroundColor()\"\n [style.borderRadius]=\"radius()\">\n <div\n class=\"flex h-full\"\n [style.backgroundColor]=\"step().color\"\n [style.width]=\"constHtmlStepPercent + '%'\"\n [style.borderRadius]=\"radius()\"\n [class]=\"step().classInclude\"></div>\n @if (step().label) {\n <div class=\"absolute top-0 left-0 w-full h-full flex items-center\">\n <span [class]=\"(step().classLabel || '') + ' libs-ui-font-h5r ml-[12px]'\">{{ step().label }}</span>\n </div>\n }\n </div>\n </div>\n </div>\n @if (constHtmlShowPercent) {\n <div [class]=\"constHtmlPercentClass + 'libs-ui-font-h5m ml-[8px]'\">{{ constHtmlStepPercent | LibsUiPipesFormatNumberPipe: true : step().percentFixed ?? percentFixed() }}{{ '%' }}</div>\n }\n </div>\n }\n }\n }\n}\n", styles: [".libs-ui-process-bar-standard{display:flex;position:relative;flex-shrink:0;flex-grow:0;align-items:center;overflow:hidden;width:100%;height:100%}\n"], dependencies: [{ kind: "pipe", type: LibsUiPipesFormatNumberPipe, name: "LibsUiPipesFormatNumberPipe" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
13
15
|
}
|
|
14
16
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: LibsUiComponentsProcessBarStandardComponent, decorators: [{
|
|
15
17
|
type: Component,
|
|
16
|
-
args: [{ selector: 'libs_ui-components-process_bar-standard', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "@let constHtmlSteps = config().steps() || [];\n@let constHtmlMode = config().mode || 'stack';\n@let constHtmlTotalValue = config().totalValue;\n\n@if (constHtmlSteps.length > 0 && constHtmlTotalValue) {\n @switch (constHtmlMode) {\n @case ('stack') {\n <div\n [class]=\"(config().classInclude || '') + ' libs-ui-process-bar-standard'\"\n [style.width]=\"width()\"\n [style.height]=\"height()\"\n [style.backgroundColor]=\"backgroundColor()\"\n [style.borderRadius]=\"radius()\">\n @for (step of constHtmlSteps; track step()) {\n @let constHtmlStepPercent = (step().value / constHtmlTotalValue) * 100;\n <div\n class=\"flex h-full items-center\"\n [style.backgroundColor]=\"step().color\"\n [style.width]=\"constHtmlStepPercent + '%'\">\n @if (step().label) {\n <span [class]=\"(step().classLabel || '') + ' libs-ui-font-h5r ml-[12px]'\">{{ step().label }}</span>\n }\n </div>\n }\n </div>\n }\n\n @case ('separate') {\n @for (step of constHtmlSteps; track step()) {\n @let constHtmlStepPercent = (step().value / constHtmlTotalValue) * 100;\n @let constHtmlShowPercent = step().showPercent ?? config().showPercent;\n @let constHtmlPercentClass = (step().percentClass ?? config().percentClass) || '';\n\n <div\n [class]=\"(config().classInclude || '') + ' flex w-full shrink-0 items-center relative my-[8px]'\"\n [style.width]=\"width()\"\n [style.height]=\"height()\">\n <div class=\"flex w-full h-full relative\">\n <div class=\"flex absolute w-full h-full\">\n <div\n class=\"libs-ui-process-bar-standard\"\n [style.backgroundColor]=\"backgroundColor()\"\n [style.borderRadius]=\"radius()\">\n <div\n class=\"flex h-full\"\n [style.backgroundColor]=\"step().color\"\n [style.width]=\"constHtmlStepPercent + '%'\"\n [style.borderRadius]=\"radius()\"\n [class]=\"step().classInclude\"></div>\n @if (step().label) {\n <div class=\"absolute top-0 left-0 w-full h-full flex items-center\">\n <span [class]=\"(step().classLabel || '') + ' libs-ui-font-h5r ml-[12px]'\">{{ step().label }}</span>\n </div>\n }\n </div>\n </div>\n </div>\n @if (constHtmlShowPercent) {\n <div [class]=\"constHtmlPercentClass + 'libs-ui-font-
|
|
18
|
+
args: [{ selector: 'libs_ui-components-process_bar-standard', standalone: true, imports: [LibsUiPipesFormatNumberPipe], changeDetection: ChangeDetectionStrategy.OnPush, template: "@let constHtmlSteps = config().steps() || [];\n@let constHtmlMode = config().mode || 'stack';\n@let constHtmlTotalValue = config().totalValue;\n\n@if (constHtmlSteps.length > 0 && constHtmlTotalValue) {\n @switch (constHtmlMode) {\n @case ('stack') {\n <div\n [class]=\"(config().classInclude || '') + ' libs-ui-process-bar-standard'\"\n [style.width]=\"width()\"\n [style.height]=\"height()\"\n [style.backgroundColor]=\"backgroundColor()\"\n [style.borderRadius]=\"radius()\">\n @for (step of constHtmlSteps; track step()) {\n @let constHtmlStepPercent = (step().value / constHtmlTotalValue) * 100;\n <div\n class=\"flex h-full items-center\"\n [style.backgroundColor]=\"step().color\"\n [style.width]=\"constHtmlStepPercent + '%'\">\n @if (step().label) {\n <span [class]=\"(step().classLabel || '') + ' libs-ui-font-h5r ml-[12px]'\">{{ step().label }}</span>\n }\n </div>\n }\n </div>\n }\n\n @case ('separate') {\n @for (step of constHtmlSteps; track step()) {\n @let constHtmlStepPercent = (step().value / constHtmlTotalValue) * 100;\n @let constHtmlShowPercent = step().showPercent ?? config().showPercent;\n @let constHtmlPercentClass = (step().percentClass ?? config().percentClass) || '';\n\n <div\n [class]=\"(config().classInclude || '') + ' flex w-full shrink-0 items-center relative my-[8px]'\"\n [style.width]=\"width()\"\n [style.height]=\"height()\">\n <div class=\"flex w-full h-full relative\">\n <div class=\"flex absolute w-full h-full\">\n <div\n class=\"libs-ui-process-bar-standard\"\n [style.backgroundColor]=\"backgroundColor()\"\n [style.borderRadius]=\"radius()\">\n <div\n class=\"flex h-full\"\n [style.backgroundColor]=\"step().color\"\n [style.width]=\"constHtmlStepPercent + '%'\"\n [style.borderRadius]=\"radius()\"\n [class]=\"step().classInclude\"></div>\n @if (step().label) {\n <div class=\"absolute top-0 left-0 w-full h-full flex items-center\">\n <span [class]=\"(step().classLabel || '') + ' libs-ui-font-h5r ml-[12px]'\">{{ step().label }}</span>\n </div>\n }\n </div>\n </div>\n </div>\n @if (constHtmlShowPercent) {\n <div [class]=\"constHtmlPercentClass + 'libs-ui-font-h5m ml-[8px]'\">{{ constHtmlStepPercent | LibsUiPipesFormatNumberPipe: true : step().percentFixed ?? percentFixed() }}{{ '%' }}</div>\n }\n </div>\n }\n }\n }\n}\n", styles: [".libs-ui-process-bar-standard{display:flex;position:relative;flex-shrink:0;flex-grow:0;align-items:center;overflow:hidden;width:100%;height:100%}\n"] }]
|
|
17
19
|
}] });
|
|
18
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
20
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJvY2Vzcy1iYXItc3RhbmRhcmQuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vbGlicy11aS9jb21wb25lbnRzL3Byb2Nlc3MtYmFyL3N0YW5kYXJkL3NyYy9wcm9jZXNzLWJhci1zdGFuZGFyZC5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi8uLi9saWJzLXVpL2NvbXBvbmVudHMvcHJvY2Vzcy1iYXIvc3RhbmRhcmQvc3JjL3Byb2Nlc3MtYmFyLXN0YW5kYXJkLmNvbXBvbmVudC5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSx1QkFBdUIsRUFBRSxTQUFTLEVBQUUsUUFBUSxFQUFFLE1BQU0sRUFBRSxLQUFLLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFDNUYsT0FBTyxFQUFFLDJCQUEyQixFQUFFLE1BQU0sOEJBQThCLENBQUM7QUFDM0UsT0FBTyxFQUFFLGdEQUFnRCxFQUFFLE1BQU0sZ0JBQWdCLENBQUM7O0FBV2xGLE1BQU0sT0FBTywyQ0FBMkM7SUFDNUMsS0FBSyxHQUFHLFFBQVEsQ0FBQyxHQUFHLEVBQUUsQ0FBQyxJQUFJLENBQUMsTUFBTSxFQUFFLENBQUMsS0FBSyxJQUFJLElBQUksQ0FBQyx1QkFBdUIsRUFBRSxLQUFLLElBQUksTUFBTSxDQUFDLENBQUM7SUFDN0YsTUFBTSxHQUFHLFFBQVEsQ0FBQyxHQUFHLEVBQUUsQ0FBQyxJQUFJLENBQUMsTUFBTSxFQUFFLENBQUMsTUFBTSxJQUFJLElBQUksQ0FBQyx1QkF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XRlIHctZnVsbCBoLWZ1bGxcIj5cbiAgICAgICAgICAgICAgPGRpdlxuICAgICAgICAgICAgICAgIGNsYXNzPVwibGlicy11aS1wcm9jZXNzLWJhci1zdGFuZGFyZFwiXG4gICAgICAgICAgICAgICAgW3N0eWxlLmJhY2tncm91bmRDb2xvcl09XCJiYWNrZ3JvdW5kQ29sb3IoKVwiXG4gICAgICAgICAgICAgICAgW3N0eWxlLmJvcmRlclJhZGl1c109XCJyYWRpdXMoKVwiPlxuICAgICAgICAgICAgICAgIDxkaXZcbiAgICAgICAgICAgICAgICAgIGNsYXNzPVwiZmxleCBoLWZ1bGxcIlxuICAgICAgICAgICAgICAgICAgW3N0eWxlLmJhY2tncm91bmRDb2xvcl09XCJzdGVwKCkuY29sb3JcIlxuICAgICAgICAgICAgICAgICAgW3N0eWxlLndpZHRoXT1cImNvbnN0SHRtbFN0ZXBQZXJjZW50ICsgJyUnXCJcbiAgICAgICAgICAgICAgICAgIFtzdHlsZS5ib3JkZXJSYWRpdXNdPVwicmFkaXVzKClcIlxuICAgICAgICAgICAgICAgICAgW2NsYXNzXT1cInN0ZXAoKS5jbGFzc0luY2x1ZGVcIj48L2Rpdj5cbiAgICAgICAgICAgICAgICBAaWYgKHN0ZXAoKS5sYWJlbCkge1xuICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cImFic29sdXRlIHRvcC0wIGxlZnQtMCB3LWZ1bGwgaC1mdWxsIGZsZXggaXRlbXMtY2VudGVyXCI+XG4gICAgICAgICAgICAgICAgICAgIDxzcGFuIFtjbGFzc109XCIoc3RlcCgpLmNsYXNzTGFiZWwgfHwgJycpICsgJyBsaWJzLXVpLWZvbnQtaDVyIG1sLVsxMnB4XSdcIj57eyBzdGVwKCkubGFiZWwgfX08L3NwYW4+XG4gICAgICAgICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgQGlmIChjb25zdEh0bWxTaG93UGVyY2VudCkge1xuICAgICAgICAgICAgPGRpdiBbY2xhc3NdPVwiY29uc3RIdG1sUGVyY2VudENsYXNzICsgJ2xpYnMtdWktZm9udC1oNW0gbWwtWzhweF0nXCI+e3sgY29uc3RIdG1sU3RlcFBlcmNlbnQgfCBMaWJzVWlQaXBlc0Zvcm1hdE51bWJlclBpcGU6IHRydWUgOiBzdGVwKCkucGVyY2VudEZpeGVkID8/IHBlcmNlbnRGaXhlZCgpIH19e3sgJyUnIH19PC9kaXY+XG4gICAgICAgICAgfVxuICAgICAgICA8L2Rpdj5cbiAgICAgIH1cbiAgICB9XG4gIH1cbn1cbiJdfQ==
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export {};
|
|
2
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJvY2Vzcy1iYXItc3RhbmRhcmQuaW50ZXJmYWNlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vbGlicy11aS9jb21wb25lbnRzL3Byb2Nlc3MtYmFyL3N0YW5kYXJkL3NyYy9wcm9jZXNzLWJhci1zdGFuZGFyZC5pbnRlcmZhY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IFdyaXRhYmxlU2lnbmFsIH0gZnJvbSAnQGFuZ3VsYXIvY29yZSc7XG5cbmV4cG9ydCBpbnRlcmZhY2UgSVByb2Nlc3NCYXJTdGFuZGFyZENvbmZpZ0RlZmF1bHRJbnRlcmZhY2Uge1xuICB3aWR0aD86IHN0cmluZztcbiAgaGVpZ2h0Pzogc3RyaW5nO1xuICBiYWNrZ3JvdW5kQ29sb3I/
|
|
2
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJvY2Vzcy1i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MC4wMCAtPiA1MCkuIEBkZWZhdWx0IDIgKi9cbiAgcGVyY2VudEZpeGVkPzogbnVtYmVyO1xuICBzdGVwczogV3JpdGFibGVTaWduYWw8QXJyYXk8V3JpdGFibGVTaWduYWw8SVByb2Nlc3NCYXJTdGFuZGFyZFN0ZXBJbnRlcmZhY2U+Pj47XG59XG5cbmV4cG9ydCBpbnRlcmZhY2UgSVByb2Nlc3NCYXJTdGFuZGFyZFN0ZXBJbnRlcmZhY2Uge1xuICBjbGFzc0luY2x1ZGU/OiBzdHJpbmc7XG4gIGxhYmVsPzogc3RyaW5nO1xuICBjbGFzc0xhYmVsPzogc3RyaW5nO1xuICB2YWx1ZTogbnVtYmVyO1xuICBjb2xvcjogc3RyaW5nO1xuICBzaG93UGVyY2VudD86IGJvb2xlYW47XG4gIHBlcmNlbnRDbGFzcz86IHN0cmluZztcbiAgLyoqIE92ZXJyaWRlIHPhu5EgY2jhu68gc+G7kSB0aOG6rXAgcGjDom4gY+G7p2EgcGjhuqduIHRyxINtIGNobyByacOqbmcgc3RlcCBuw6B5ICovXG4gIHBlcmNlbnRGaXhlZD86IG51bWJlcjtcbn1cbiJdfQ==
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { computed, input, inject, Component, ChangeDetectionStrategy } from '@angular/core';
|
|
3
|
+
import { LibsUiPipesFormatNumberPipe } from '@libs-ui/pipes-format-number';
|
|
3
4
|
import { PROCESS_BAR_STANDARD_CONFIG_DEFAULT_TOKEN_INJECT } from '@libs-ui/utils';
|
|
4
5
|
|
|
5
6
|
class LibsUiComponentsProcessBarStandardComponent {
|
|
@@ -7,14 +8,15 @@ class LibsUiComponentsProcessBarStandardComponent {
|
|
|
7
8
|
height = computed(() => this.config().height ?? this.processBarConfigDefault?.height ?? '12px');
|
|
8
9
|
backgroundColor = computed(() => this.config().backgroundColor ?? this.processBarConfigDefault?.backgroundColor ?? '#F8F9FA');
|
|
9
10
|
radius = computed(() => `${this.config().radius ?? this.processBarConfigDefault?.radius ?? 20}px`);
|
|
11
|
+
percentFixed = computed(() => this.config().percentFixed ?? this.processBarConfigDefault?.percentFixed ?? 2);
|
|
10
12
|
config = input.required();
|
|
11
13
|
processBarConfigDefault = inject(PROCESS_BAR_STANDARD_CONFIG_DEFAULT_TOKEN_INJECT, { optional: true });
|
|
12
14
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: LibsUiComponentsProcessBarStandardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
13
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: LibsUiComponentsProcessBarStandardComponent, isStandalone: true, selector: "libs_ui-components-process_bar-standard", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "@let constHtmlSteps = config().steps() || [];\n@let constHtmlMode = config().mode || 'stack';\n@let constHtmlTotalValue = config().totalValue;\n\n@if (constHtmlSteps.length > 0 && constHtmlTotalValue) {\n @switch (constHtmlMode) {\n @case ('stack') {\n <div\n [class]=\"(config().classInclude || '') + ' libs-ui-process-bar-standard'\"\n [style.width]=\"width()\"\n [style.height]=\"height()\"\n [style.backgroundColor]=\"backgroundColor()\"\n [style.borderRadius]=\"radius()\">\n @for (step of constHtmlSteps; track step()) {\n @let constHtmlStepPercent = (step().value / constHtmlTotalValue) * 100;\n <div\n class=\"flex h-full items-center\"\n [style.backgroundColor]=\"step().color\"\n [style.width]=\"constHtmlStepPercent + '%'\">\n @if (step().label) {\n <span [class]=\"(step().classLabel || '') + ' libs-ui-font-h5r ml-[12px]'\">{{ step().label }}</span>\n }\n </div>\n }\n </div>\n }\n\n @case ('separate') {\n @for (step of constHtmlSteps; track step()) {\n @let constHtmlStepPercent = (step().value / constHtmlTotalValue) * 100;\n @let constHtmlShowPercent = step().showPercent ?? config().showPercent;\n @let constHtmlPercentClass = (step().percentClass ?? config().percentClass) || '';\n\n <div\n [class]=\"(config().classInclude || '') + ' flex w-full shrink-0 items-center relative my-[8px]'\"\n [style.width]=\"width()\"\n [style.height]=\"height()\">\n <div class=\"flex w-full h-full relative\">\n <div class=\"flex absolute w-full h-full\">\n <div\n class=\"libs-ui-process-bar-standard\"\n [style.backgroundColor]=\"backgroundColor()\"\n [style.borderRadius]=\"radius()\">\n <div\n class=\"flex h-full\"\n [style.backgroundColor]=\"step().color\"\n [style.width]=\"constHtmlStepPercent + '%'\"\n [style.borderRadius]=\"radius()\"\n [class]=\"step().classInclude\"></div>\n @if (step().label) {\n <div class=\"absolute top-0 left-0 w-full h-full flex items-center\">\n <span [class]=\"(step().classLabel || '') + ' libs-ui-font-h5r ml-[12px]'\">{{ step().label }}</span>\n </div>\n }\n </div>\n </div>\n </div>\n @if (constHtmlShowPercent) {\n <div [class]=\"constHtmlPercentClass + 'libs-ui-font-
|
|
15
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: LibsUiComponentsProcessBarStandardComponent, isStandalone: true, selector: "libs_ui-components-process_bar-standard", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "@let constHtmlSteps = config().steps() || [];\n@let constHtmlMode = config().mode || 'stack';\n@let constHtmlTotalValue = config().totalValue;\n\n@if (constHtmlSteps.length > 0 && constHtmlTotalValue) {\n @switch (constHtmlMode) {\n @case ('stack') {\n <div\n [class]=\"(config().classInclude || '') + ' libs-ui-process-bar-standard'\"\n [style.width]=\"width()\"\n [style.height]=\"height()\"\n [style.backgroundColor]=\"backgroundColor()\"\n [style.borderRadius]=\"radius()\">\n @for (step of constHtmlSteps; track step()) {\n @let constHtmlStepPercent = (step().value / constHtmlTotalValue) * 100;\n <div\n class=\"flex h-full items-center\"\n [style.backgroundColor]=\"step().color\"\n [style.width]=\"constHtmlStepPercent + '%'\">\n @if (step().label) {\n <span [class]=\"(step().classLabel || '') + ' libs-ui-font-h5r ml-[12px]'\">{{ step().label }}</span>\n }\n </div>\n }\n </div>\n }\n\n @case ('separate') {\n @for (step of constHtmlSteps; track step()) {\n @let constHtmlStepPercent = (step().value / constHtmlTotalValue) * 100;\n @let constHtmlShowPercent = step().showPercent ?? config().showPercent;\n @let constHtmlPercentClass = (step().percentClass ?? config().percentClass) || '';\n\n <div\n [class]=\"(config().classInclude || '') + ' flex w-full shrink-0 items-center relative my-[8px]'\"\n [style.width]=\"width()\"\n [style.height]=\"height()\">\n <div class=\"flex w-full h-full relative\">\n <div class=\"flex absolute w-full h-full\">\n <div\n class=\"libs-ui-process-bar-standard\"\n [style.backgroundColor]=\"backgroundColor()\"\n [style.borderRadius]=\"radius()\">\n <div\n class=\"flex h-full\"\n [style.backgroundColor]=\"step().color\"\n [style.width]=\"constHtmlStepPercent + '%'\"\n [style.borderRadius]=\"radius()\"\n [class]=\"step().classInclude\"></div>\n @if (step().label) {\n <div class=\"absolute top-0 left-0 w-full h-full flex items-center\">\n <span [class]=\"(step().classLabel || '') + ' libs-ui-font-h5r ml-[12px]'\">{{ step().label }}</span>\n </div>\n }\n </div>\n </div>\n </div>\n @if (constHtmlShowPercent) {\n <div [class]=\"constHtmlPercentClass + 'libs-ui-font-h5m ml-[8px]'\">{{ constHtmlStepPercent | LibsUiPipesFormatNumberPipe: true : step().percentFixed ?? percentFixed() }}{{ '%' }}</div>\n }\n </div>\n }\n }\n }\n}\n", styles: [".libs-ui-process-bar-standard{display:flex;position:relative;flex-shrink:0;flex-grow:0;align-items:center;overflow:hidden;width:100%;height:100%}\n"], dependencies: [{ kind: "pipe", type: LibsUiPipesFormatNumberPipe, name: "LibsUiPipesFormatNumberPipe" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
14
16
|
}
|
|
15
17
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: LibsUiComponentsProcessBarStandardComponent, decorators: [{
|
|
16
18
|
type: Component,
|
|
17
|
-
args: [{ selector: 'libs_ui-components-process_bar-standard', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "@let constHtmlSteps = config().steps() || [];\n@let constHtmlMode = config().mode || 'stack';\n@let constHtmlTotalValue = config().totalValue;\n\n@if (constHtmlSteps.length > 0 && constHtmlTotalValue) {\n @switch (constHtmlMode) {\n @case ('stack') {\n <div\n [class]=\"(config().classInclude || '') + ' libs-ui-process-bar-standard'\"\n [style.width]=\"width()\"\n [style.height]=\"height()\"\n [style.backgroundColor]=\"backgroundColor()\"\n [style.borderRadius]=\"radius()\">\n @for (step of constHtmlSteps; track step()) {\n @let constHtmlStepPercent = (step().value / constHtmlTotalValue) * 100;\n <div\n class=\"flex h-full items-center\"\n [style.backgroundColor]=\"step().color\"\n [style.width]=\"constHtmlStepPercent + '%'\">\n @if (step().label) {\n <span [class]=\"(step().classLabel || '') + ' libs-ui-font-h5r ml-[12px]'\">{{ step().label }}</span>\n }\n </div>\n }\n </div>\n }\n\n @case ('separate') {\n @for (step of constHtmlSteps; track step()) {\n @let constHtmlStepPercent = (step().value / constHtmlTotalValue) * 100;\n @let constHtmlShowPercent = step().showPercent ?? config().showPercent;\n @let constHtmlPercentClass = (step().percentClass ?? config().percentClass) || '';\n\n <div\n [class]=\"(config().classInclude || '') + ' flex w-full shrink-0 items-center relative my-[8px]'\"\n [style.width]=\"width()\"\n [style.height]=\"height()\">\n <div class=\"flex w-full h-full relative\">\n <div class=\"flex absolute w-full h-full\">\n <div\n class=\"libs-ui-process-bar-standard\"\n [style.backgroundColor]=\"backgroundColor()\"\n [style.borderRadius]=\"radius()\">\n <div\n class=\"flex h-full\"\n [style.backgroundColor]=\"step().color\"\n [style.width]=\"constHtmlStepPercent + '%'\"\n [style.borderRadius]=\"radius()\"\n [class]=\"step().classInclude\"></div>\n @if (step().label) {\n <div class=\"absolute top-0 left-0 w-full h-full flex items-center\">\n <span [class]=\"(step().classLabel || '') + ' libs-ui-font-h5r ml-[12px]'\">{{ step().label }}</span>\n </div>\n }\n </div>\n </div>\n </div>\n @if (constHtmlShowPercent) {\n <div [class]=\"constHtmlPercentClass + 'libs-ui-font-
|
|
19
|
+
args: [{ selector: 'libs_ui-components-process_bar-standard', standalone: true, imports: [LibsUiPipesFormatNumberPipe], changeDetection: ChangeDetectionStrategy.OnPush, template: "@let constHtmlSteps = config().steps() || [];\n@let constHtmlMode = config().mode || 'stack';\n@let constHtmlTotalValue = config().totalValue;\n\n@if (constHtmlSteps.length > 0 && constHtmlTotalValue) {\n @switch (constHtmlMode) {\n @case ('stack') {\n <div\n [class]=\"(config().classInclude || '') + ' libs-ui-process-bar-standard'\"\n [style.width]=\"width()\"\n [style.height]=\"height()\"\n [style.backgroundColor]=\"backgroundColor()\"\n [style.borderRadius]=\"radius()\">\n @for (step of constHtmlSteps; track step()) {\n @let constHtmlStepPercent = (step().value / constHtmlTotalValue) * 100;\n <div\n class=\"flex h-full items-center\"\n [style.backgroundColor]=\"step().color\"\n [style.width]=\"constHtmlStepPercent + '%'\">\n @if (step().label) {\n <span [class]=\"(step().classLabel || '') + ' libs-ui-font-h5r ml-[12px]'\">{{ step().label }}</span>\n }\n </div>\n }\n </div>\n }\n\n @case ('separate') {\n @for (step of constHtmlSteps; track step()) {\n @let constHtmlStepPercent = (step().value / constHtmlTotalValue) * 100;\n @let constHtmlShowPercent = step().showPercent ?? config().showPercent;\n @let constHtmlPercentClass = (step().percentClass ?? config().percentClass) || '';\n\n <div\n [class]=\"(config().classInclude || '') + ' flex w-full shrink-0 items-center relative my-[8px]'\"\n [style.width]=\"width()\"\n [style.height]=\"height()\">\n <div class=\"flex w-full h-full relative\">\n <div class=\"flex absolute w-full h-full\">\n <div\n class=\"libs-ui-process-bar-standard\"\n [style.backgroundColor]=\"backgroundColor()\"\n [style.borderRadius]=\"radius()\">\n <div\n class=\"flex h-full\"\n [style.backgroundColor]=\"step().color\"\n [style.width]=\"constHtmlStepPercent + '%'\"\n [style.borderRadius]=\"radius()\"\n [class]=\"step().classInclude\"></div>\n @if (step().label) {\n <div class=\"absolute top-0 left-0 w-full h-full flex items-center\">\n <span [class]=\"(step().classLabel || '') + ' libs-ui-font-h5r ml-[12px]'\">{{ step().label }}</span>\n </div>\n }\n </div>\n </div>\n </div>\n @if (constHtmlShowPercent) {\n <div [class]=\"constHtmlPercentClass + 'libs-ui-font-h5m ml-[8px]'\">{{ constHtmlStepPercent | LibsUiPipesFormatNumberPipe: true : step().percentFixed ?? percentFixed() }}{{ '%' }}</div>\n }\n </div>\n }\n }\n }\n}\n", styles: [".libs-ui-process-bar-standard{display:flex;position:relative;flex-shrink:0;flex-grow:0;align-items:center;overflow:hidden;width:100%;height:100%}\n"] }]
|
|
18
20
|
}] });
|
|
19
21
|
|
|
20
22
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"libs-ui-components-process-bar-standard.mjs","sources":["../../../../../../libs-ui/components/process-bar/standard/src/process-bar-standard.component.ts","../../../../../../libs-ui/components/process-bar/standard/src/process-bar-standard.component.html","../../../../../../libs-ui/components/process-bar/standard/src/libs-ui-components-process-bar-standard.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, computed, inject, input } from '@angular/core';\nimport { PROCESS_BAR_STANDARD_CONFIG_DEFAULT_TOKEN_INJECT } from '@libs-ui/utils';\nimport { IProcessBarStandardConfigDefaultInterface, IProcessBarStandardInterface } from './process-bar-standard.interface';\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'libs_ui-components-process_bar-standard',\n standalone: true,\n templateUrl: './process-bar-standard.component.html',\n styleUrl: './process-bar-standard.component.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class LibsUiComponentsProcessBarStandardComponent {\n protected width = computed(() => this.config().width ?? this.processBarConfigDefault?.width ?? '100%');\n protected height = computed(() => this.config().height ?? this.processBarConfigDefault?.height ?? '12px');\n protected backgroundColor = computed(() => this.config().backgroundColor ?? this.processBarConfigDefault?.backgroundColor ?? '#F8F9FA');\n protected radius = computed(() => `${this.config().radius ?? this.processBarConfigDefault?.radius ?? 20}px`);\n\n readonly config = input.required<IProcessBarStandardInterface>();\n\n private readonly processBarConfigDefault = inject<IProcessBarStandardConfigDefaultInterface>(PROCESS_BAR_STANDARD_CONFIG_DEFAULT_TOKEN_INJECT, { optional: true });\n}\n","@let constHtmlSteps = config().steps() || [];\n@let constHtmlMode = config().mode || 'stack';\n@let constHtmlTotalValue = config().totalValue;\n\n@if (constHtmlSteps.length > 0 && constHtmlTotalValue) {\n @switch (constHtmlMode) {\n @case ('stack') {\n <div\n [class]=\"(config().classInclude || '') + ' libs-ui-process-bar-standard'\"\n [style.width]=\"width()\"\n [style.height]=\"height()\"\n [style.backgroundColor]=\"backgroundColor()\"\n [style.borderRadius]=\"radius()\">\n @for (step of constHtmlSteps; track step()) {\n @let constHtmlStepPercent = (step().value / constHtmlTotalValue) * 100;\n <div\n class=\"flex h-full items-center\"\n [style.backgroundColor]=\"step().color\"\n [style.width]=\"constHtmlStepPercent + '%'\">\n @if (step().label) {\n <span [class]=\"(step().classLabel || '') + ' libs-ui-font-h5r ml-[12px]'\">{{ step().label }}</span>\n }\n </div>\n }\n </div>\n }\n\n @case ('separate') {\n @for (step of constHtmlSteps; track step()) {\n @let constHtmlStepPercent = (step().value / constHtmlTotalValue) * 100;\n @let constHtmlShowPercent = step().showPercent ?? config().showPercent;\n @let constHtmlPercentClass = (step().percentClass ?? config().percentClass) || '';\n\n <div\n [class]=\"(config().classInclude || '') + ' flex w-full shrink-0 items-center relative my-[8px]'\"\n [style.width]=\"width()\"\n [style.height]=\"height()\">\n <div class=\"flex w-full h-full relative\">\n <div class=\"flex absolute w-full h-full\">\n <div\n class=\"libs-ui-process-bar-standard\"\n [style.backgroundColor]=\"backgroundColor()\"\n [style.borderRadius]=\"radius()\">\n <div\n class=\"flex h-full\"\n [style.backgroundColor]=\"step().color\"\n [style.width]=\"constHtmlStepPercent + '%'\"\n [style.borderRadius]=\"radius()\"\n [class]=\"step().classInclude\"></div>\n @if (step().label) {\n <div class=\"absolute top-0 left-0 w-full h-full flex items-center\">\n <span [class]=\"(step().classLabel || '') + ' libs-ui-font-h5r ml-[12px]'\">{{ step().label }}</span>\n </div>\n }\n </div>\n </div>\n </div>\n @if (constHtmlShowPercent) {\n <div [class]=\"constHtmlPercentClass + 'libs-ui-font-
|
|
1
|
+
{"version":3,"file":"libs-ui-components-process-bar-standard.mjs","sources":["../../../../../../libs-ui/components/process-bar/standard/src/process-bar-standard.component.ts","../../../../../../libs-ui/components/process-bar/standard/src/process-bar-standard.component.html","../../../../../../libs-ui/components/process-bar/standard/src/libs-ui-components-process-bar-standard.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, computed, inject, input } from '@angular/core';\nimport { LibsUiPipesFormatNumberPipe } from '@libs-ui/pipes-format-number';\nimport { PROCESS_BAR_STANDARD_CONFIG_DEFAULT_TOKEN_INJECT } from '@libs-ui/utils';\nimport { IProcessBarStandardConfigDefaultInterface, IProcessBarStandardInterface } from './process-bar-standard.interface';\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'libs_ui-components-process_bar-standard',\n standalone: true,\n imports: [LibsUiPipesFormatNumberPipe],\n templateUrl: './process-bar-standard.component.html',\n styleUrl: './process-bar-standard.component.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class LibsUiComponentsProcessBarStandardComponent {\n protected width = computed(() => this.config().width ?? this.processBarConfigDefault?.width ?? '100%');\n protected height = computed(() => this.config().height ?? this.processBarConfigDefault?.height ?? '12px');\n protected backgroundColor = computed(() => this.config().backgroundColor ?? this.processBarConfigDefault?.backgroundColor ?? '#F8F9FA');\n protected radius = computed(() => `${this.config().radius ?? this.processBarConfigDefault?.radius ?? 20}px`);\n protected percentFixed = computed(() => this.config().percentFixed ?? this.processBarConfigDefault?.percentFixed ?? 2);\n\n readonly config = input.required<IProcessBarStandardInterface>();\n\n private readonly processBarConfigDefault = inject<IProcessBarStandardConfigDefaultInterface>(PROCESS_BAR_STANDARD_CONFIG_DEFAULT_TOKEN_INJECT, { optional: true });\n}\n","@let constHtmlSteps = config().steps() || [];\n@let constHtmlMode = config().mode || 'stack';\n@let constHtmlTotalValue = config().totalValue;\n\n@if (constHtmlSteps.length > 0 && constHtmlTotalValue) {\n @switch (constHtmlMode) {\n @case ('stack') {\n <div\n [class]=\"(config().classInclude || '') + ' libs-ui-process-bar-standard'\"\n [style.width]=\"width()\"\n [style.height]=\"height()\"\n [style.backgroundColor]=\"backgroundColor()\"\n [style.borderRadius]=\"radius()\">\n @for (step of constHtmlSteps; track step()) {\n @let constHtmlStepPercent = (step().value / constHtmlTotalValue) * 100;\n <div\n class=\"flex h-full items-center\"\n [style.backgroundColor]=\"step().color\"\n [style.width]=\"constHtmlStepPercent + '%'\">\n @if (step().label) {\n <span [class]=\"(step().classLabel || '') + ' libs-ui-font-h5r ml-[12px]'\">{{ step().label }}</span>\n }\n </div>\n }\n </div>\n }\n\n @case ('separate') {\n @for (step of constHtmlSteps; track step()) {\n @let constHtmlStepPercent = (step().value / constHtmlTotalValue) * 100;\n @let constHtmlShowPercent = step().showPercent ?? config().showPercent;\n @let constHtmlPercentClass = (step().percentClass ?? config().percentClass) || '';\n\n <div\n [class]=\"(config().classInclude || '') + ' flex w-full shrink-0 items-center relative my-[8px]'\"\n [style.width]=\"width()\"\n [style.height]=\"height()\">\n <div class=\"flex w-full h-full relative\">\n <div class=\"flex absolute w-full h-full\">\n <div\n class=\"libs-ui-process-bar-standard\"\n [style.backgroundColor]=\"backgroundColor()\"\n [style.borderRadius]=\"radius()\">\n <div\n class=\"flex h-full\"\n [style.backgroundColor]=\"step().color\"\n [style.width]=\"constHtmlStepPercent + '%'\"\n [style.borderRadius]=\"radius()\"\n [class]=\"step().classInclude\"></div>\n @if (step().label) {\n <div class=\"absolute top-0 left-0 w-full h-full flex items-center\">\n <span [class]=\"(step().classLabel || '') + ' libs-ui-font-h5r ml-[12px]'\">{{ step().label }}</span>\n </div>\n }\n </div>\n </div>\n </div>\n @if (constHtmlShowPercent) {\n <div [class]=\"constHtmlPercentClass + 'libs-ui-font-h5m ml-[8px]'\">{{ constHtmlStepPercent | LibsUiPipesFormatNumberPipe: true : step().percentFixed ?? percentFixed() }}{{ '%' }}</div>\n }\n </div>\n }\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;MAaa,2CAA2C,CAAA;IAC5C,KAAK,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,MAAM,EAAE,CAAC,KAAK,IAAI,IAAI,CAAC,uBAAuB,EAAE,KAAK,IAAI,MAAM,CAAC,CAAC;IAC7F,MAAM,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,MAAM,EAAE,CAAC,MAAM,IAAI,IAAI,CAAC,uBAAuB,EAAE,MAAM,IAAI,MAAM,CAAC,CAAC;IAChG,eAAe,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,MAAM,EAAE,CAAC,eAAe,IAAI,IAAI,CAAC,uBAAuB,EAAE,eAAe,IAAI,SAAS,CAAC,CAAC;IAC9H,MAAM,GAAG,QAAQ,CAAC,MAAM,CAAA,EAAG,IAAI,CAAC,MAAM,EAAE,CAAC,MAAM,IAAI,IAAI,CAAC,uBAAuB,EAAE,MAAM,IAAI,EAAE,CAAI,EAAA,CAAA,CAAC,CAAC;IACnG,YAAY,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,MAAM,EAAE,CAAC,YAAY,IAAI,IAAI,CAAC,uBAAuB,EAAE,YAAY,IAAI,CAAC,CAAC,CAAC;AAE9G,IAAA,MAAM,GAAG,KAAK,CAAC,QAAQ,EAAgC,CAAC;IAEhD,uBAAuB,GAAG,MAAM,CAA4C,gDAAgD,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;wGATxJ,2CAA2C,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;4FAA3C,2CAA2C,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,yCAAA,EAAA,MAAA,EAAA,EAAA,MAAA,EAAA,EAAA,iBAAA,EAAA,QAAA,EAAA,UAAA,EAAA,QAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECbxD,4xFAiEA,EAAA,MAAA,EAAA,CAAA,qJAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EDzDY,2BAA2B,EAAA,IAAA,EAAA,6BAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;4FAK1B,2CAA2C,EAAA,UAAA,EAAA,CAAA;kBATvD,SAAS;+BAEE,yCAAyC,EAAA,UAAA,EACvC,IAAI,EACP,OAAA,EAAA,CAAC,2BAA2B,CAAC,EAAA,eAAA,EAGrB,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,4xFAAA,EAAA,MAAA,EAAA,CAAA,qJAAA,CAAA,EAAA,CAAA;;;AEXjD;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@libs-ui/components-process-bar-standard",
|
|
3
|
-
"version": "0.2.357-
|
|
3
|
+
"version": "0.2.357-31",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@angular/core": ">=18.0.0",
|
|
6
|
-
"@libs-ui/utils": "0.2.357-
|
|
6
|
+
"@libs-ui/utils": "0.2.357-31"
|
|
7
7
|
},
|
|
8
8
|
"sideEffects": false,
|
|
9
9
|
"module": "fesm2022/libs-ui-components-process-bar-standard.mjs",
|
|
@@ -5,6 +5,7 @@ export declare class LibsUiComponentsProcessBarStandardComponent {
|
|
|
5
5
|
protected height: import("@angular/core").Signal<string>;
|
|
6
6
|
protected backgroundColor: import("@angular/core").Signal<string>;
|
|
7
7
|
protected radius: import("@angular/core").Signal<string>;
|
|
8
|
+
protected percentFixed: import("@angular/core").Signal<number>;
|
|
8
9
|
readonly config: import("@angular/core").InputSignal<IProcessBarStandardInterface>;
|
|
9
10
|
private readonly processBarConfigDefault;
|
|
10
11
|
static ɵfac: i0.ɵɵFactoryDeclaration<LibsUiComponentsProcessBarStandardComponent, never>;
|
|
@@ -4,6 +4,7 @@ export interface IProcessBarStandardConfigDefaultInterface {
|
|
|
4
4
|
height?: string;
|
|
5
5
|
backgroundColor?: string;
|
|
6
6
|
radius?: number;
|
|
7
|
+
percentFixed?: number;
|
|
7
8
|
}
|
|
8
9
|
export interface IProcessBarStandardInterface {
|
|
9
10
|
width?: string;
|
|
@@ -15,6 +16,8 @@ export interface IProcessBarStandardInterface {
|
|
|
15
16
|
classInclude?: string;
|
|
16
17
|
showPercent?: boolean;
|
|
17
18
|
percentClass?: string;
|
|
19
|
+
/** Số chữ số thập phân của phần trăm hiển thị. Số 0 thừa được cắt (50.00 -> 50). @default 2 */
|
|
20
|
+
percentFixed?: number;
|
|
18
21
|
steps: WritableSignal<Array<WritableSignal<IProcessBarStandardStepInterface>>>;
|
|
19
22
|
}
|
|
20
23
|
export interface IProcessBarStandardStepInterface {
|
|
@@ -25,4 +28,6 @@ export interface IProcessBarStandardStepInterface {
|
|
|
25
28
|
color: string;
|
|
26
29
|
showPercent?: boolean;
|
|
27
30
|
percentClass?: string;
|
|
31
|
+
/** Override số chữ số thập phân của phần trăm cho riêng step này */
|
|
32
|
+
percentFixed?: number;
|
|
28
33
|
}
|