@ferhaps/easy-ui-lib 1.0.0 → 1.1.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/fesm2022/ferhaps-easy-ui-lib.mjs +551 -0
- package/fesm2022/ferhaps-easy-ui-lib.mjs.map +1 -0
- package/index.d.ts +5 -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/password-validator.directive.d.ts +7 -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 +44 -26
- package/{src/public-api.ts → public-api.d.ts} +16 -20
- package/ng-package.json +0 -7
- 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
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { Directive, HostListener } from '@angular/core';
|
|
2
|
-
|
|
3
|
-
@Directive({
|
|
4
|
-
selector: '[libPhoneValidation]',
|
|
5
|
-
})
|
|
6
|
-
export class PhoneValidationDirective {
|
|
7
|
-
@HostListener('input', ['$event']) public onInput(event: InputEvent) {
|
|
8
|
-
const input = event.target as HTMLInputElement;
|
|
9
|
-
if (!input.value.includes('+')) {
|
|
10
|
-
input.value = `+${input.value}`;
|
|
11
|
-
}
|
|
12
|
-
const regex = /^[0-9+]*$/;
|
|
13
|
-
if (!regex.test(input.value)) {
|
|
14
|
-
input.value = input.value.replace(/[^0-9+]/g, '');
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
@HostListener('keydown', ['$event']) public onKeyDown(event: KeyboardEvent): void {
|
|
19
|
-
const inputValue = (event.target as HTMLInputElement).value;
|
|
20
|
-
if (event.key === 'Backspace' && inputValue === '+') {
|
|
21
|
-
event.preventDefault();
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { Pipe, PipeTransform } from "@angular/core";
|
|
2
|
-
|
|
3
|
-
@Pipe({
|
|
4
|
-
name: 'blankFiller',
|
|
5
|
-
})
|
|
6
|
-
export class WhiteSpaceFillerPipe implements PipeTransform {
|
|
7
|
-
public transform(value: any, fillWith: string = '-'): string {
|
|
8
|
-
if (value === 0) {
|
|
9
|
-
return '0';
|
|
10
|
-
}
|
|
11
|
-
return value ? value : fillWith;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { Pipe, PipeTransform } from '@angular/core';
|
|
2
|
-
|
|
3
|
-
@Pipe({
|
|
4
|
-
name: 'snakeCaseParser',
|
|
5
|
-
})
|
|
6
|
-
export class SnakeCaseParserPipe implements PipeTransform {
|
|
7
|
-
public transform(str: string | undefined): string {
|
|
8
|
-
if (str) {
|
|
9
|
-
let temp = str.split('_').map(word => {
|
|
10
|
-
return word.toLowerCase();
|
|
11
|
-
}).join(' ');
|
|
12
|
-
return temp.charAt(0).toUpperCase() + temp.slice(1);
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
return '';
|
|
16
|
-
}
|
|
17
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { HttpErrorResponse } from "@angular/common/http";
|
|
2
|
-
import { Injectable } from "@angular/core";
|
|
3
|
-
import { Subject } from "rxjs";
|
|
4
|
-
|
|
5
|
-
@Injectable({
|
|
6
|
-
providedIn: 'root'
|
|
7
|
-
})
|
|
8
|
-
export class ErrorService {
|
|
9
|
-
private errorSubject = new Subject<HttpErrorResponse>();
|
|
10
|
-
public error$ = this.errorSubject.asObservable();
|
|
11
|
-
|
|
12
|
-
public sendError(error: HttpErrorResponse) {
|
|
13
|
-
this.errorSubject.next(error);
|
|
14
|
-
}
|
|
15
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { Injectable } from '@angular/core';
|
|
2
|
-
import { BehaviorSubject } from 'rxjs';
|
|
3
|
-
|
|
4
|
-
@Injectable({
|
|
5
|
-
providedIn: 'root'
|
|
6
|
-
})
|
|
7
|
-
export class LoaderService {
|
|
8
|
-
private loadingSubject = new BehaviorSubject<boolean>(false);
|
|
9
|
-
public loading$ = this.loadingSubject.asObservable();
|
|
10
|
-
|
|
11
|
-
public setLoading(loadingState: boolean) {
|
|
12
|
-
this.loadingSubject.next(loadingState);
|
|
13
|
-
}
|
|
14
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { animate, state, style, transition, trigger } from "@angular/animations";
|
|
2
|
-
|
|
3
|
-
export const fader = trigger('fadeInOut', [
|
|
4
|
-
transition(':enter', [
|
|
5
|
-
style({ opacity: 0 }),
|
|
6
|
-
animate('200ms', style({ opacity: 1 })),
|
|
7
|
-
]),
|
|
8
|
-
transition(':leave', [
|
|
9
|
-
animate('200ms', style({ opacity: 0 })),
|
|
10
|
-
]),
|
|
11
|
-
]);
|
|
12
|
-
|
|
13
|
-
export const openDropdown = trigger('open-close-dropdown', [
|
|
14
|
-
transition(':enter', [
|
|
15
|
-
style({ height: 0, overflow: 'hidden' }),
|
|
16
|
-
animate('200ms ease', style({ height: '*' }))
|
|
17
|
-
]),
|
|
18
|
-
transition(':leave', [
|
|
19
|
-
style({ height: '*', overflow: 'hidden' }),
|
|
20
|
-
animate('200ms ease', style({ height: 0 }))
|
|
21
|
-
])
|
|
22
|
-
]);
|
|
23
|
-
|
|
24
|
-
export const textFader = trigger('textFader', [
|
|
25
|
-
state('void', style({ opacity: 0 })),
|
|
26
|
-
state('*', style({ opacity: 1 })),
|
|
27
|
-
transition('void => *', [animate('0.3s 0.3s ease-in')]),
|
|
28
|
-
transition('* => void', [animate('0.3s ease-in')])
|
|
29
|
-
]);
|
package/src/lib/utils/utils.ts
DELETED
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
export const HTTP_STATUS_CODES: any = {
|
|
2
|
-
100: 'Continue',
|
|
3
|
-
101: 'Switching Protocols',
|
|
4
|
-
102: 'Processing',
|
|
5
|
-
103: 'Early Hints',
|
|
6
|
-
200: 'OK',
|
|
7
|
-
201: 'Created',
|
|
8
|
-
202: 'Accepted',
|
|
9
|
-
203: 'Non-Authoritative Information',
|
|
10
|
-
204: 'No Content',
|
|
11
|
-
205: 'Reset Content',
|
|
12
|
-
206: 'Partial Content',
|
|
13
|
-
207: 'Multi-Status',
|
|
14
|
-
208: 'Already Reported',
|
|
15
|
-
226: 'IM Used',
|
|
16
|
-
300: 'Multiple Choices',
|
|
17
|
-
301: 'Moved Permanently',
|
|
18
|
-
302: 'Found',
|
|
19
|
-
303: 'See Other',
|
|
20
|
-
304: 'Not Modified',
|
|
21
|
-
305: 'Use Proxy',
|
|
22
|
-
306: '(Unused)',
|
|
23
|
-
307: 'Temporary Redirect',
|
|
24
|
-
308: 'Permanent Redirect',
|
|
25
|
-
400: 'Bad Request',
|
|
26
|
-
401: 'Unauthorized',
|
|
27
|
-
402: 'Payment Required',
|
|
28
|
-
403: 'Forbidden',
|
|
29
|
-
404: 'Not Found',
|
|
30
|
-
405: 'Method Not Allowed',
|
|
31
|
-
406: 'Not Acceptable',
|
|
32
|
-
407: 'Proxy Authentication Required',
|
|
33
|
-
408: 'Request Timeout',
|
|
34
|
-
409: 'Conflict',
|
|
35
|
-
410: 'Gone',
|
|
36
|
-
411: 'Length Required',
|
|
37
|
-
412: 'Precondition Failed',
|
|
38
|
-
413: 'Payload Too Large',
|
|
39
|
-
414: 'URI Too Long',
|
|
40
|
-
415: 'Unsupported Media Type',
|
|
41
|
-
416: 'Range Not Satisfiable',
|
|
42
|
-
417: 'Expectation Failed',
|
|
43
|
-
418: "I'm a teapot",
|
|
44
|
-
421: 'Misdirected Request',
|
|
45
|
-
422: 'Unprocessable Entity',
|
|
46
|
-
423: 'Locked',
|
|
47
|
-
424: 'Failed Dependency',
|
|
48
|
-
425: 'Too Early',
|
|
49
|
-
426: 'Upgrade Required',
|
|
50
|
-
428: 'Precondition Required',
|
|
51
|
-
429: 'Too Many Requests',
|
|
52
|
-
431: 'Request Header Fields Too Large',
|
|
53
|
-
451: 'Unavailable For Legal Reasons',
|
|
54
|
-
500: 'Internal Server Error',
|
|
55
|
-
501: 'Not Implemented',
|
|
56
|
-
502: 'Bad Gateway',
|
|
57
|
-
503: 'Service Unavailable',
|
|
58
|
-
504: 'Gateway Timeout',
|
|
59
|
-
505: 'HTTP Version Not Supported',
|
|
60
|
-
506: 'Variant Also Negotiates',
|
|
61
|
-
507: 'Insufficient Storage',
|
|
62
|
-
508: 'Loop Detected',
|
|
63
|
-
510: 'Not Extended',
|
|
64
|
-
511: 'Network Authentication Required'
|
|
65
|
-
};
|
package/tsconfig.lib.json
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/* To learn more about this file see: https://angular.io/config/tsconfig. */
|
|
2
|
-
{
|
|
3
|
-
"extends": "../../tsconfig.json",
|
|
4
|
-
"compilerOptions": {
|
|
5
|
-
"outDir": "../../out-tsc/lib",
|
|
6
|
-
"declaration": true,
|
|
7
|
-
"declarationMap": true,
|
|
8
|
-
"inlineSources": true,
|
|
9
|
-
"types": []
|
|
10
|
-
},
|
|
11
|
-
"exclude": [
|
|
12
|
-
"**/*.spec.ts"
|
|
13
|
-
]
|
|
14
|
-
}
|
package/tsconfig.lib.prod.json
DELETED
package/tsconfig.spec.json
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/* To learn more about this file see: https://angular.io/config/tsconfig. */
|
|
2
|
-
{
|
|
3
|
-
"extends": "../../tsconfig.json",
|
|
4
|
-
"compilerOptions": {
|
|
5
|
-
"outDir": "../../out-tsc/spec",
|
|
6
|
-
"types": [
|
|
7
|
-
"jasmine"
|
|
8
|
-
]
|
|
9
|
-
},
|
|
10
|
-
"include": [
|
|
11
|
-
"**/*.spec.ts",
|
|
12
|
-
"**/*.d.ts"
|
|
13
|
-
]
|
|
14
|
-
}
|