ngx-cho-components 2.0.0 → 4.0.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/README.md CHANGED
@@ -1,111 +1,49 @@
1
- # NgxChoComponents
2
-
3
- This library provides reusable Angular components for CHO applications.
4
-
5
- Generated with [Angular CLI](https://github.com/angular/angular-cli) version 19.2.26.
6
-
7
- ## Overview
8
-
9
- NgxChoComponents includes:
10
- - `ChoAddressInfoComponent` - Address display and editing
11
- - `ChoDetailsCardComponent` - Information card layout
12
- - `ChoEmailInfoComponent` - Email display and validation
13
- - `ChoPhoneInfoComponent` - Phone number display and formatting
14
- - `ChoRadioGroupComponent` - Radio button group with validation
15
- - `ChoReviewStatusAlertComponent` - Status alert messages
16
-
17
- ## Dependencies
1
+ # NgxChoComponents
18
2
 
19
- This library depends on:
20
- - **ngx-cho-common** (must be built first)
21
-
22
- This library does not require Bootstrap, ng-bootstrap, Popper, or PrimeNG.
3
+ `ngx-cho-components` is the canonical home for reusable rendered UI across CHO Angular applications. Version 4 targets Angular 19 and PrimeNG 19 and has no Bootstrap, ng-bootstrap, PrimeFlex, Tailwind-presentation, toast, or spinner dependency.
23
4
 
24
5
  ## Installation
25
6
 
26
7
  ```bash
27
- npm install ngx-cho-components ngx-cho-common
8
+ npm install --save-exact ngx-cho-common@4.0.0 ngx-cho-components@4.0.0
28
9
  ```
29
10
 
30
- ## Breaking Changes
11
+ Applications must provide compatible Angular Common, Core, and Forms packages plus PrimeNG 19.
31
12
 
32
- `ChoModalComponent` and the `<cho-modal>` selector have been removed. Applications should replace modal usage with an app-local dialog implementation, such as a native dialog or a PrimeNG dialog/drawer. This package no longer declares `bootstrap` or `@ng-bootstrap/ng-bootstrap` as peer dependencies.
33
-
34
- ## Build
35
-
36
- **Important**: Build `ngx-cho-common` first before building this library.
37
-
38
- ```bash
39
- # Build dependencies first
40
- ng build ngx-cho-common
41
-
42
- # Then build this library
43
- ng build ngx-cho-components
44
- ```
45
-
46
- Build artifacts will be stored in the `dist/ngx-cho-components` directory.
47
-
48
- ## Development
49
-
50
- ### Code Scaffolding
51
-
52
- ```bash
53
- ng generate component component-name --project ngx-cho-components
54
- ng generate service service-name --project ngx-cho-components
55
- ```
56
-
57
- > Note: Always include `--project ngx-cho-components` or the component will be added to the default project.
58
-
59
- ### Running Tests
60
-
61
- ```bash
62
- ng test ngx-cho-components
63
- ```
64
-
65
- ## Publishing
13
+ Import component styles once in the application root stylesheet, after the Common foundation:
66
14
 
67
- 1. **Update version** in `projects/ngx-cho-components/package.json`. Use a major version for the modal-component and peer-dependency removal.
68
- 2. **Build dependencies and library**:
69
- ```bash
70
- ng build ngx-cho-common
71
- ng build ngx-cho-components --configuration production
72
- ```
73
- 3. **Publish to npm**:
74
- ```bash
75
- cd dist/ngx-cho-components
76
- npm publish
77
- ```
78
-
79
- ## Usage
80
-
81
- Import the components module in your application:
82
-
83
- ```typescript
84
- import { NgxChoComponentsModule } from 'ngx-cho-components';
85
-
86
- @NgModule({
87
- imports: [NgxChoComponentsModule],
88
- // ...
89
- })
90
- export class AppModule {}
91
- ```
92
-
93
- Use components in your templates:
15
+ ```scss
16
+ @use 'ngx-cho-common/styles';
17
+ @use 'ngx-cho-components/styles';
18
+ ```
94
19
 
95
- ```html
96
- <cho-address-info [address]="userAddress"></cho-address-info>
20
+ ## Public UI
21
+
22
+ - `ChoSearchCardComponent` composes a consistent card, named toolbar/filter/tab/content templates, optional paging, semantic padding, embedding, and configurable heading levels.
23
+ - `ChoDetailPageComponent` composes a header/tabs card with a separate projected feature body, a configurable heading, semantic body padding, and an optional back action.
24
+ - `ChoPagerComponent` maps PrimeNG paginator events to immutable `PaginationInstance` values. Query synchronization is explicit and its dropdown overlay appends to `body` by default.
25
+ - `ChoCardComponent`, `ChoDetailsCardComponent`, contact display components, `ChoRadioGroupComponent`, and `ChoReviewStatusAlertComponent` provide the remaining reusable visual contracts.
26
+
27
+ Named slots are declared on `ng-template` elements:
97
28
 
98
- <cho-radio-group
99
- [options]="radioOptions"
100
- [(value)]="selectedValue">
101
- </cho-radio-group>
29
+ ```html
30
+ <cho-search-card cardTitle="Jobs" [pager]="pager" [syncPagerQueryParams]="false">
31
+ <ng-template choSearchCardFilters>...</ng-template>
32
+ <ng-template choSearchCardToolbar>...</ng-template>
33
+ <ng-template choSearchCardContent>...</ng-template>
34
+ </cho-search-card>
102
35
  ```
103
36
 
104
- ## Styling
37
+ Use `contentPadding="none"`, `compact`, or `comfortable`; wrap feature-specific layout in projected content instead of passing arbitrary classes into shared UI.
38
+ Embedded SearchCards omit their own header and tabs. They retain filters, named content, and paging so callers can place them inside an application-owned surface without nested card chrome.
39
+
40
+ ## Build and Validation
105
41
 
106
- Components are framework-neutral and do not require Bootstrap. Applications should provide their own layout, dialog, and theme styling.
107
-
108
- ## Further Help
42
+ ```bash
43
+ npm run build:components
44
+ npx ng test ngx-cho-components --watch=false --browsers=ChromeHeadless
45
+ npm run test:style-contract
46
+ npm run publish:components:dry
47
+ ```
109
48
 
110
- - [Angular CLI Overview and Command Reference](https://angular.io/cli)
111
- - [Angular Library Development Guide](https://angular.io/guide/creating-libraries)
49
+ The guarded build verifies the Sass interface, peer contract, export targets, and packed tarball. Publishing is intentionally limited to the `next` tag by the package-specific command.