@snteam/amplify-angular-core 1.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 +95 -0
- package/fesm2022/snteam-amplify-angular-core.mjs +1764 -0
- package/fesm2022/snteam-amplify-angular-core.mjs.map +1 -0
- package/index.d.ts +406 -0
- package/package.json +52 -0
package/README.md
ADDED
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
# @snteam/amplify-angular-core
|
|
2
|
+
|
|
3
|
+
Angular 20 components for building dynamic forms and list views with AWS Amplify Data.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- **DynamicFormComponent**: Generates dynamic forms based on Amplify Data models
|
|
8
|
+
- **ListViewComponent**: Displays paginated lists of Amplify Data model items
|
|
9
|
+
- **Standalone Components**: Built with Angular 20 standalone architecture
|
|
10
|
+
- **TypeScript Support**: Full TypeScript support with type definitions
|
|
11
|
+
- **AWS Amplify Integration**: Seamless integration with AWS Amplify Data
|
|
12
|
+
|
|
13
|
+
## Installation
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
npm install @snteam/amplify-angular-core
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Peer Dependencies
|
|
20
|
+
|
|
21
|
+
This package requires the following peer dependencies:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
npm install @angular/core@^20.3.0 @angular/common@^20.3.0 @angular/forms@^20.3.0 @angular/material@^20.3.0 @angular/cdk@^20.3.0 aws-amplify@^6.0.0 @aws-amplify/ui-angular@^6.0.0 rxjs@~7.8.0
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Usage
|
|
28
|
+
|
|
29
|
+
### DynamicFormComponent
|
|
30
|
+
|
|
31
|
+
```typescript
|
|
32
|
+
import { DynamicFormComponent } from '@snteam/amplify-angular-core';
|
|
33
|
+
|
|
34
|
+
@Component({
|
|
35
|
+
selector: 'app-example',
|
|
36
|
+
standalone: true,
|
|
37
|
+
imports: [DynamicFormComponent],
|
|
38
|
+
template: `
|
|
39
|
+
<snteam-dynamic-form
|
|
40
|
+
[model]="'User'"
|
|
41
|
+
[itemId]="userId"
|
|
42
|
+
(itemOutput)="onItemOutput($event)">
|
|
43
|
+
</snteam-dynamic-form>
|
|
44
|
+
`
|
|
45
|
+
})
|
|
46
|
+
export class ExampleComponent {
|
|
47
|
+
userId = 'user-123';
|
|
48
|
+
|
|
49
|
+
onItemOutput(item: any) {
|
|
50
|
+
console.log('Form output:', item);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### ListViewComponent
|
|
56
|
+
|
|
57
|
+
```typescript
|
|
58
|
+
import { ListViewComponent } from '@snteam/amplify-angular-core';
|
|
59
|
+
|
|
60
|
+
@Component({
|
|
61
|
+
selector: 'app-list',
|
|
62
|
+
standalone: true,
|
|
63
|
+
imports: [ListViewComponent],
|
|
64
|
+
template: `
|
|
65
|
+
<snteam-list-view [modelName]="'User'"></snteam-list-view>
|
|
66
|
+
`
|
|
67
|
+
})
|
|
68
|
+
export class ListComponent {}
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
## Components
|
|
72
|
+
|
|
73
|
+
- **DynamicFormComponent**: Main form component for creating/editing Amplify Data models
|
|
74
|
+
- **ListViewComponent**: Main list component for displaying Amplify Data models
|
|
75
|
+
- **DynamicFormQuestionComponent**: Renders individual form fields
|
|
76
|
+
- **DynamicFormGroupComponent**: Handles nested form groups
|
|
77
|
+
- **RecordRelationshipsComponent**: Manages model relationships
|
|
78
|
+
|
|
79
|
+
## Services
|
|
80
|
+
|
|
81
|
+
- **AmplifyModelService**: Centralized service for Amplify Data operations
|
|
82
|
+
- **AmplifyFormBuilderService**: Generates Angular reactive forms from Amplify schemas
|
|
83
|
+
- **QuestionControlService**: Converts model fields to question objects
|
|
84
|
+
|
|
85
|
+
## License
|
|
86
|
+
|
|
87
|
+
MIT
|
|
88
|
+
|
|
89
|
+
## Contributing
|
|
90
|
+
|
|
91
|
+
Please read our contributing guidelines before submitting pull requests.
|
|
92
|
+
|
|
93
|
+
## Support
|
|
94
|
+
|
|
95
|
+
For issues and questions, please use the GitHub issue tracker.
|