Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR introduces a new AbpInputComponent as a secondary entry point for the ABP Angular components library, providing a reusable form input component with built-in validation display and localization support.
- Adds a new
AbpInputComponentthat implementsControlValueAccessorfor Angular reactive forms integration - Creates a secondary entry point
@abp/ng.components/abp-inputfor modular imports - Updates TypeScript configuration to support the new component structure
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| npm/ng-packs/tsconfig.base.json | Adds path mapping for the new abp-input secondary entry point |
| npm/ng-packs/packages/components/tsconfig.lib.json | Fixes exclude path for test-setup.ts |
| npm/ng-packs/packages/components/abp-input/src/public-api.ts | Exports the AbpInputComponent for public API |
| npm/ng-packs/packages/components/abp-input/src/lib/abp-input.component.ts | Main component implementation with form integration and validation |
| npm/ng-packs/packages/components/abp-input/src/lib/abp-input.component.html | Template with form controls, labels, and error display |
| npm/ng-packs/packages/components/abp-input/src/index.ts | Re-exports component from lib directory |
| npm/ng-packs/packages/components/abp-input/ng-package.json | Package configuration for Angular library build |
| npm/ng-packs/packages/components/abp-input/README.md | Documentation for the new secondary entry point |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| }); | ||
| } | ||
|
|
||
| writeValue(value: any[]): void { |
There was a problem hiding this comment.
The writeValue method expects an array type (any[]) but the component appears to handle single values based on the template and form control setup. This should be writeValue(value: any): void instead.
| writeValue(value: any[]): void { | |
| writeValue(value: any): void { |
| return [] | ||
| } | ||
| return [] |
There was a problem hiding this comment.
The errors getter always returns an empty array regardless of whether there are actual errors. It should return the actual error messages when this.control.errors exists.
| return [] | |
| } | |
| return [] | |
| return Object.keys(this.control.errors); | |
| } | |
| return []; |
| } | ||
| </div> | ||
| } | ||
| <div></div> |
There was a problem hiding this comment.
Empty div element serves no purpose and should be removed to keep the template clean.
| <div></div> |
| abpInputFormGroup: FormGroup; | ||
|
|
||
| ngOnInit() { | ||
|
|
There was a problem hiding this comment.
[nitpick] Extra blank line after method declaration should be removed for consistency.
# Conflicts: # npm/ng-packs/packages/components/tsconfig.lib.json
Description
Resolves #23955
Includes