@ferhaps/easy-ui-lib 0.0.1 → 0.0.2

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.
Files changed (61) hide show
  1. package/README.md +146 -3
  2. package/fesm2022/ferhaps-easy-ui-lib.mjs +610 -0
  3. package/fesm2022/ferhaps-easy-ui-lib.mjs.map +1 -0
  4. package/index.d.ts +5 -0
  5. package/lib/components/chip/chip.component.d.ts +10 -0
  6. package/lib/components/default-dialog/default-dialog.component.d.ts +11 -0
  7. package/lib/components/error-dispaly.component.d.ts +10 -0
  8. package/lib/components/error-handler/error-handler.component.d.ts +12 -0
  9. package/lib/components/error-handler/error-popup/error-popup.component.d.ts +9 -0
  10. package/lib/components/global-loader/global-loader.component.d.ts +7 -0
  11. package/lib/components/search-bar.component.d.ts +10 -0
  12. package/lib/components/table/table.component.d.ts +46 -0
  13. package/lib/components/table-sort-header/table-sort-header.component.d.ts +10 -0
  14. package/lib/directives/fields-match-validator.directive.d.ts +10 -0
  15. package/lib/directives/phone-validation.directive.d.ts +7 -0
  16. package/lib/pipes/blank-filler.pipe.d.ts +7 -0
  17. package/lib/pipes/snake-case-parser.pipe.d.ts +7 -0
  18. package/lib/services/error.service.d.ts +9 -0
  19. package/lib/services/loader.service.d.ts +8 -0
  20. package/lib/utils/animations.d.ts +3 -0
  21. package/{src/lib/utils/types.ts → lib/utils/types.d.ts} +2 -3
  22. package/lib/utils/utils.d.ts +1 -0
  23. package/package.json +22 -4
  24. package/public-api.d.ts +16 -0
  25. package/ng-package.json +0 -7
  26. package/src/lib/components/chip/chip.component.html +0 -3
  27. package/src/lib/components/chip/chip.component.scss +0 -19
  28. package/src/lib/components/chip/chip.component.ts +0 -23
  29. package/src/lib/components/default-dialog/default-dialog.component.html +0 -19
  30. package/src/lib/components/default-dialog/default-dialog.component.scss +0 -41
  31. package/src/lib/components/default-dialog/default-dialog.component.ts +0 -23
  32. package/src/lib/components/error-dispaly.component.ts +0 -48
  33. package/src/lib/components/error-handler/error-handler.component.html +0 -0
  34. package/src/lib/components/error-handler/error-handler.component.scss +0 -0
  35. package/src/lib/components/error-handler/error-handler.component.ts +0 -44
  36. package/src/lib/components/error-handler/error-popup/error-popup.component.html +0 -13
  37. package/src/lib/components/error-handler/error-popup/error-popup.component.scss +0 -19
  38. package/src/lib/components/error-handler/error-popup/error-popup.component.ts +0 -21
  39. package/src/lib/components/global-loader/global-loader.component.html +0 -5
  40. package/src/lib/components/global-loader/global-loader.component.scss +0 -12
  41. package/src/lib/components/global-loader/global-loader.component.ts +0 -17
  42. package/src/lib/components/search-bar.component.ts +0 -70
  43. package/src/lib/components/table/table.component.html +0 -121
  44. package/src/lib/components/table/table.component.scss +0 -116
  45. package/src/lib/components/table/table.component.ts +0 -105
  46. package/src/lib/components/table-sort-header/table-sort-header.component.html +0 -7
  47. package/src/lib/components/table-sort-header/table-sort-header.component.scss +0 -17
  48. package/src/lib/components/table-sort-header/table-sort-header.component.ts +0 -31
  49. package/src/lib/directives/fields-match-validator.directive.ts +0 -35
  50. package/src/lib/directives/password-validator.directive.ts +0 -26
  51. package/src/lib/directives/phone-validation.directive.ts +0 -24
  52. package/src/lib/pipes/blank-filler.pipe.ts +0 -13
  53. package/src/lib/pipes/snake-case-parser.pipe.ts +0 -17
  54. package/src/lib/services/error.service.ts +0 -15
  55. package/src/lib/services/loader.service.ts +0 -14
  56. package/src/lib/utils/animations.ts +0 -29
  57. package/src/lib/utils/utils.ts +0 -65
  58. package/src/public-api.ts +0 -20
  59. package/tsconfig.lib.json +0 -14
  60. package/tsconfig.lib.prod.json +0 -10
  61. 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
- ]);
@@ -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/src/public-api.ts DELETED
@@ -1,20 +0,0 @@
1
- /*
2
- * Public API Surface of ui-lib
3
- */
4
-
5
- export * from './lib/pipes/blank-filler.pipe';
6
- export * from './lib/pipes/snake-case-parser.pipe';
7
- export * from './lib/directives/fields-match-validator.directive';
8
- export * from './lib/directives/phone-validation.directive';
9
- export * from './lib/components/default-dialog/default-dialog.component';
10
- export * from './lib/components/error-dispaly.component';
11
- export * from './lib/components/search-bar.component';
12
- export * from './lib/utils/types';
13
- export * from './lib/utils/animations';
14
- export * from './lib/components/table-sort-header/table-sort-header.component';
15
- export * from './lib/components/table/table.component';
16
- export * from './lib/components/global-loader/global-loader.component';
17
- export * from './lib/services/loader.service';
18
- export * from './lib/services/error.service';
19
- export * from './lib/components/error-handler/error-handler.component';
20
- export * from './lib/components/chip/chip.component';
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
- }
@@ -1,10 +0,0 @@
1
- /* To learn more about this file see: https://angular.io/config/tsconfig. */
2
- {
3
- "extends": "./tsconfig.lib.json",
4
- "compilerOptions": {
5
- "declarationMap": false
6
- },
7
- "angularCompilerOptions": {
8
- "compilationMode": "partial"
9
- }
10
- }
@@ -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
- }