@libs-ui/components-inputs-keyboard 0.2.357-7 → 0.2.357-9
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 +3 -19
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -76,21 +76,13 @@ import { LibsUiComponentsInputsKeyboardComponent } from '@libs-ui/components-inp
|
|
|
76
76
|
templateUrl: './pin-entry.component.html',
|
|
77
77
|
})
|
|
78
78
|
export class PinEntryComponent {
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
79
|
+
// Lưu ý: outKeyCodeSelected emit thẳng string, không phải DOM Event
|
|
80
|
+
handlerKeySelect(code: string): void {
|
|
81
|
+
console.log('Phím được nhấn:', code);
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
84
|
```
|
|
85
85
|
|
|
86
|
-
> Vì `outKeyCodeSelected` emit kiểu `string` (không phải `Event`), handler nhận thẳng `string`:
|
|
87
|
-
|
|
88
|
-
```typescript
|
|
89
|
-
handlerKeySelect(code: string): void {
|
|
90
|
-
console.log('Phím được nhấn:', code);
|
|
91
|
-
}
|
|
92
|
-
```
|
|
93
|
-
|
|
94
86
|
### Ví dụ 2 — Xây dựng chuỗi PIN
|
|
95
87
|
|
|
96
88
|
Tích lũy các phím đã nhấn để tạo chuỗi PIN, kết hợp nút xóa.
|
|
@@ -249,14 +241,6 @@ const keys: IKeyCode[] = keypadConfig();
|
|
|
249
241
|
|
|
250
242
|
⚠️ **Không có `@Input()` cấu hình phím**: Cấu hình danh sách phím hiện tại được hardcode nội bộ qua `keypadConfig()`. Không thể tùy biến danh sách phím từ bên ngoài thông qua input binding.
|
|
251
243
|
|
|
252
|
-
## Demo
|
|
253
|
-
|
|
254
|
-
```bash
|
|
255
|
-
npx nx serve core-ui
|
|
256
|
-
```
|
|
257
|
-
|
|
258
|
-
Truy cập: http://localhost:4500/inputs/keyboard
|
|
259
|
-
|
|
260
244
|
## Unit Tests
|
|
261
245
|
|
|
262
246
|
```bash
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@libs-ui/components-inputs-keyboard",
|
|
3
|
-
"version": "0.2.357-
|
|
3
|
+
"version": "0.2.357-9",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@angular/core": ">=18.0.0",
|
|
6
|
-
"@libs-ui/interfaces-types": "0.2.357-
|
|
6
|
+
"@libs-ui/interfaces-types": "0.2.357-9",
|
|
7
7
|
"rxjs": "~7.8.0"
|
|
8
8
|
},
|
|
9
9
|
"sideEffects": false,
|