@ferhaps/easy-ui-lib 0.0.1 → 0.0.3
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 +146 -3
- package/fesm2022/ferhaps-easy-ui-lib.mjs +540 -0
- package/fesm2022/ferhaps-easy-ui-lib.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/lib/components/chip/chip.component.d.ts +10 -0
- package/lib/components/default-dialog/default-dialog.component.d.ts +11 -0
- package/lib/components/error-dispaly.component.d.ts +10 -0
- package/lib/components/error-handler/error-handler.component.d.ts +12 -0
- package/lib/components/error-handler/error-popup/error-popup.component.d.ts +9 -0
- package/lib/components/global-loader/global-loader.component.d.ts +7 -0
- package/lib/components/search-bar.component.d.ts +10 -0
- package/lib/components/table/table.component.d.ts +46 -0
- package/lib/components/table-sort-header/table-sort-header.component.d.ts +10 -0
- package/lib/directives/fields-match-validator.directive.d.ts +10 -0
- package/lib/directives/phone-validation.directive.d.ts +7 -0
- package/lib/pipes/blank-filler.pipe.d.ts +7 -0
- package/lib/pipes/snake-case-parser.pipe.d.ts +7 -0
- package/lib/services/error.service.d.ts +9 -0
- package/lib/services/loader.service.d.ts +8 -0
- package/lib/utils/animations.d.ts +3 -0
- package/{src/lib/utils/types.ts → lib/utils/types.d.ts} +2 -3
- package/lib/utils/utils.d.ts +1 -0
- package/package.json +22 -4
- package/{src/public-api.ts → public-api.d.ts} +16 -20
- package/ng-package.json +0 -7
- package/src/lib/components/chip/chip.component.html +0 -3
- package/src/lib/components/chip/chip.component.scss +0 -19
- package/src/lib/components/chip/chip.component.ts +0 -23
- package/src/lib/components/default-dialog/default-dialog.component.html +0 -19
- package/src/lib/components/default-dialog/default-dialog.component.scss +0 -41
- package/src/lib/components/default-dialog/default-dialog.component.ts +0 -23
- package/src/lib/components/error-dispaly.component.ts +0 -48
- package/src/lib/components/error-handler/error-handler.component.html +0 -0
- package/src/lib/components/error-handler/error-handler.component.scss +0 -0
- package/src/lib/components/error-handler/error-handler.component.ts +0 -44
- package/src/lib/components/error-handler/error-popup/error-popup.component.html +0 -13
- package/src/lib/components/error-handler/error-popup/error-popup.component.scss +0 -19
- package/src/lib/components/error-handler/error-popup/error-popup.component.ts +0 -21
- package/src/lib/components/global-loader/global-loader.component.html +0 -5
- package/src/lib/components/global-loader/global-loader.component.scss +0 -12
- package/src/lib/components/global-loader/global-loader.component.ts +0 -17
- package/src/lib/components/search-bar.component.ts +0 -70
- package/src/lib/components/table/table.component.html +0 -121
- package/src/lib/components/table/table.component.scss +0 -116
- package/src/lib/components/table/table.component.ts +0 -105
- package/src/lib/components/table-sort-header/table-sort-header.component.html +0 -7
- package/src/lib/components/table-sort-header/table-sort-header.component.scss +0 -17
- package/src/lib/components/table-sort-header/table-sort-header.component.ts +0 -31
- package/src/lib/directives/fields-match-validator.directive.ts +0 -35
- package/src/lib/directives/password-validator.directive.ts +0 -26
- package/src/lib/directives/phone-validation.directive.ts +0 -24
- package/src/lib/pipes/blank-filler.pipe.ts +0 -13
- package/src/lib/pipes/snake-case-parser.pipe.ts +0 -17
- package/src/lib/services/error.service.ts +0 -15
- package/src/lib/services/loader.service.ts +0 -14
- package/src/lib/utils/animations.ts +0 -29
- package/src/lib/utils/utils.ts +0 -65
- package/tsconfig.lib.json +0 -14
- package/tsconfig.lib.prod.json +0 -10
- package/tsconfig.spec.json +0 -14
package/README.md
CHANGED
|
@@ -1,8 +1,151 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @ferhaps/easy-ui-lib
|
|
2
2
|
|
|
3
|
-
A
|
|
3
|
+
A comprehensive Angular UI library providing reusable components, directives, and pipes built with Angular Material.
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
npm install @easy-ui-lib
|
|
8
|
+
npm install @ferhaps/easy-ui-lib
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Dependencies
|
|
12
|
+
|
|
13
|
+
This library requires:
|
|
14
|
+
- Angular ^19.0.0
|
|
15
|
+
- Angular Material ^19.0.0
|
|
16
|
+
- Angular CDK ^19.0.0
|
|
17
|
+
|
|
18
|
+
## Components
|
|
19
|
+
|
|
20
|
+
### ChipComponent
|
|
21
|
+
A selectable chip component for displaying tags or filters.
|
|
22
|
+
```typescript
|
|
23
|
+
<lib-chip
|
|
24
|
+
[value]="value"
|
|
25
|
+
[isSelected]="isSelected"
|
|
26
|
+
[text]="displayText"
|
|
27
|
+
(selected)="onChipSelected($event)">
|
|
28
|
+
</lib-chip>
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
### TableComponent
|
|
32
|
+
A feature-rich table component supporting:
|
|
33
|
+
- Sorting
|
|
34
|
+
- Row selection
|
|
35
|
+
- Drag & drop rows
|
|
36
|
+
- Custom options menu
|
|
37
|
+
- Infinite scroll
|
|
38
|
+
- Customizable styles
|
|
39
|
+
|
|
40
|
+
```typescript
|
|
41
|
+
<lib-table
|
|
42
|
+
[config]="{
|
|
43
|
+
data: items,
|
|
44
|
+
title: 'Users Table',
|
|
45
|
+
dataProps: ['id', 'name', 'email'],
|
|
46
|
+
tableHeadings: ['ID', 'Name', 'Email'],
|
|
47
|
+
options: ['Edit', 'Delete'],
|
|
48
|
+
withAdd: true,
|
|
49
|
+
selectableRows: true,
|
|
50
|
+
sortable: true,
|
|
51
|
+
draggable: true
|
|
52
|
+
}"
|
|
53
|
+
(action)="handleTableAction($event)">
|
|
54
|
+
</lib-table>
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### SearchBarComponent
|
|
58
|
+
A styled search input with debounce functionality.
|
|
59
|
+
```typescript
|
|
60
|
+
<lib-search-bar
|
|
61
|
+
[for]="'users'"
|
|
62
|
+
(search)="onSearch($event)">
|
|
63
|
+
</lib-search-bar>
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### DefaultDialogComponent
|
|
67
|
+
A customizable dialog component with optional back button.
|
|
68
|
+
```typescript
|
|
69
|
+
<lib-default-dialog
|
|
70
|
+
[dialogTitle]="'User Details'"
|
|
71
|
+
[height]="'400px'"
|
|
72
|
+
[withBack]="true"
|
|
73
|
+
(back)="onBack()">
|
|
74
|
+
<div class="dialog-content">
|
|
75
|
+
<!-- Your content here -->
|
|
76
|
+
</div>
|
|
77
|
+
</lib-default-dialog>
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
### GlobalLoaderComponent
|
|
81
|
+
A centered spinner overlay for loading states.
|
|
82
|
+
```typescript
|
|
83
|
+
<lib-global-loader></lib-global-loader>
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
### ErrorHandlerComponent
|
|
87
|
+
Displays error messages in a dialog format.
|
|
88
|
+
```typescript
|
|
89
|
+
<lib-error-handler></lib-error-handler>
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
## Directives
|
|
93
|
+
|
|
94
|
+
### FieldsMatchValidatorDirective
|
|
95
|
+
Validates if two form fields match (useful for password confirmation).
|
|
96
|
+
```typescript
|
|
97
|
+
<input type="password" />
|
|
98
|
+
<input type="password-repeat" [libFieldsMatchValidator]="'password'" />
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
### PasswordValidatorDirective
|
|
102
|
+
Ensures password meets complexity requirements.
|
|
103
|
+
```typescript
|
|
104
|
+
<input type="password" libPasswordValidator />
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
### PhoneValidationDirective
|
|
108
|
+
Formats and validates phone number input.
|
|
109
|
+
```typescript
|
|
110
|
+
<input type="tel" libPhoneValidation />
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
## Pipes
|
|
114
|
+
|
|
115
|
+
### BlankFillerPipe
|
|
116
|
+
Replaces empty values with a specified character.
|
|
117
|
+
```typescript
|
|
118
|
+
{{ someValue | blankFiller:'-' }}
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
### SnakeCaseParserPipe
|
|
122
|
+
Converts snake_case to Title Case text.
|
|
123
|
+
```typescript
|
|
124
|
+
{{ 'user_name' | snakeCaseParser }} <!-- Output: User name -->
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
## Services
|
|
128
|
+
|
|
129
|
+
### LoaderService
|
|
130
|
+
Manages global loading state.
|
|
131
|
+
```typescript
|
|
132
|
+
constructor(private loaderService: LoaderService) {
|
|
133
|
+
loaderService.setLoading(true);
|
|
134
|
+
// ... async operation
|
|
135
|
+
loaderService.setLoading(false);
|
|
136
|
+
}
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
### ErrorService
|
|
140
|
+
Handles global error display.
|
|
141
|
+
```typescript
|
|
142
|
+
constructor(private errorService: ErrorService) {
|
|
143
|
+
errorService.sendError(error);
|
|
144
|
+
}
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
## Contributing
|
|
148
|
+
Please read our contributing guidelines and code of conduct before submitting pull requests.
|
|
149
|
+
|
|
150
|
+
## License
|
|
151
|
+
MIT © [Ferhan Cherkez]
|