ng-ipa-library 0.7.2 → 0.7.6

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 (135) hide show
  1. package/karma.conf.js +44 -0
  2. package/ng-package.json +43 -0
  3. package/package.json +24 -31
  4. package/src/lib/core/components/loading/loading.component.html +3 -0
  5. package/src/lib/core/components/loading/loading.component.scss +3 -0
  6. package/src/lib/core/components/loading/loading.component.ts +23 -0
  7. package/src/lib/core/interceptors/error.interceptor.ts +61 -0
  8. package/src/lib/core/interceptors/loading.interceptor.ts +69 -0
  9. package/src/lib/core/interceptors/token.interceptor.ts +77 -0
  10. package/src/lib/core/services/auth.service.ts +48 -0
  11. package/src/lib/core/services/error.service.ts +19 -0
  12. package/src/lib/core/services/loader.service.ts +21 -0
  13. package/src/lib/generate-form/generate-form.component.html +85 -0
  14. package/src/lib/generate-form/generate-form.component.scss +0 -0
  15. package/src/lib/generate-form/generate-form.component.ts +119 -0
  16. package/src/lib/ipa-form/datepicker/datepicker.component.html +21 -0
  17. package/src/lib/ipa-form/datepicker/datepicker.component.scss +13 -0
  18. package/src/lib/ipa-form/datepicker/datepicker.component.ts +67 -0
  19. package/src/lib/ipa-form/datepicker/gregorian-datepicker/gregorian-datepicker.component.ts +15 -0
  20. package/src/lib/ipa-form/datepicker/gregorian-datepicker/gregorian18n.ts +38 -0
  21. package/src/lib/ipa-form/datepicker/hijri-datepicker/IslamicI18n.ts +38 -0
  22. package/src/lib/ipa-form/datepicker/hijri-datepicker/hijri-datepicker.component.ts +14 -0
  23. package/src/lib/ipa-form/dropdown-input/dropdown-input.component.html +22 -0
  24. package/src/lib/ipa-form/dropdown-input/dropdown-input.component.scss +0 -0
  25. package/src/lib/ipa-form/dropdown-input/dropdown-input.component.ts +68 -0
  26. package/src/lib/ipa-form/file-upload/file-upload.component.html +37 -0
  27. package/src/lib/ipa-form/file-upload/file-upload.component.scss +45 -0
  28. package/src/lib/ipa-form/file-upload/file-upload.component.ts +109 -0
  29. package/src/lib/ipa-form/ipa-form.service.ts +294 -0
  30. package/src/lib/ipa-form/recaptcha/recaptcha.component.html +3 -0
  31. package/src/lib/ipa-form/recaptcha/recaptcha.component.scss +0 -0
  32. package/src/lib/ipa-form/recaptcha/recaptcha.component.ts +42 -0
  33. package/src/lib/ipa-form/text-input/text-input.component.html +10 -0
  34. package/src/lib/ipa-form/text-input/text-input.component.scss +0 -0
  35. package/src/lib/ipa-form/text-input/text-input.component.ts +69 -0
  36. package/src/lib/ipa-form/textarea-input/textarea-input.component.html +11 -0
  37. package/src/lib/ipa-form/textarea-input/textarea-input.component.scss +0 -0
  38. package/src/lib/ipa-form/textarea-input/textarea-input.component.ts +69 -0
  39. package/{lib/models/apiException.d.ts → src/lib/models/apiException.ts} +2 -1
  40. package/src/lib/models/apiResponse.ts +4 -0
  41. package/src/lib/models/breadcrumbs.model.ts +4 -0
  42. package/src/lib/models/decodedToken.model.ts +6 -0
  43. package/src/lib/models/exceptionUrl.model.ts +4 -0
  44. package/src/lib/models/generateForm.model.ts +29 -0
  45. package/src/lib/models/pagedResult.ts +4 -0
  46. package/src/lib/models/user.model.ts +7 -0
  47. package/src/lib/ng-ipa-library.component.ts +15 -0
  48. package/src/lib/ng-ipa-library.module.ts +63 -0
  49. package/src/lib/pipes/hijri-date.pipe.ts +15 -0
  50. package/src/lib/pipes/pipes.module.ts +8 -0
  51. package/src/lib/services/breadcrumbs.service.ts +189 -0
  52. package/src/lib/services/common.service.ts +63 -0
  53. package/src/lib/share-button/share-button.component.html +3 -0
  54. package/src/lib/share-button/share-button.component.scss +0 -0
  55. package/src/lib/share-button/share-button.component.ts +23 -0
  56. package/src/lib/share-button/share-button.module.ts +32 -0
  57. package/{public-api.d.ts → src/public-api.ts} +16 -1
  58. package/src/test.ts +26 -0
  59. package/tsconfig.lib.json +20 -0
  60. package/tsconfig.lib.prod.json +10 -0
  61. package/tsconfig.spec.json +17 -0
  62. package/bundles/ng-ipa-library.umd.js +0 -2101
  63. package/bundles/ng-ipa-library.umd.js.map +0 -1
  64. package/esm2015/lib/core/components/loading/loading.component.js +0 -27
  65. package/esm2015/lib/core/interceptors/error.interceptor.js +0 -46
  66. package/esm2015/lib/core/interceptors/loading.interceptor.js +0 -58
  67. package/esm2015/lib/core/interceptors/token.interceptor.js +0 -69
  68. package/esm2015/lib/core/services/auth.service.js +0 -48
  69. package/esm2015/lib/core/services/error.service.js +0 -22
  70. package/esm2015/lib/core/services/loader.service.js +0 -24
  71. package/esm2015/lib/generate-form/generate-form.component.js +0 -120
  72. package/esm2015/lib/ipa-form/datepicker/datepicker.component.js +0 -70
  73. package/esm2015/lib/ipa-form/datepicker/gregorian-datepicker/gregorian-datepicker.component.js +0 -28
  74. package/esm2015/lib/ipa-form/datepicker/gregorian-datepicker/gregorian18n.js +0 -38
  75. package/esm2015/lib/ipa-form/datepicker/hijri-datepicker/IslamicI18n.js +0 -38
  76. package/esm2015/lib/ipa-form/datepicker/hijri-datepicker/hijri-datepicker.component.js +0 -28
  77. package/esm2015/lib/ipa-form/dropdown-input/dropdown-input.component.js +0 -81
  78. package/esm2015/lib/ipa-form/file-upload/file-upload.component.js +0 -128
  79. package/esm2015/lib/ipa-form/ipa-form.service.js +0 -251
  80. package/esm2015/lib/ipa-form/recaptcha/recaptcha.component.js +0 -59
  81. package/esm2015/lib/ipa-form/text-input/text-input.component.js +0 -76
  82. package/esm2015/lib/ipa-form/textarea-input/textarea-input.component.js +0 -73
  83. package/esm2015/lib/models/apiException.js +0 -2
  84. package/esm2015/lib/models/apiResponse.js +0 -2
  85. package/esm2015/lib/models/breadcrumbs.model.js +0 -2
  86. package/esm2015/lib/models/decodedToken.model.js +0 -2
  87. package/esm2015/lib/models/exceptionUrl.model.js +0 -2
  88. package/esm2015/lib/models/generateForm.model.js +0 -2
  89. package/esm2015/lib/models/pagedResult.js +0 -2
  90. package/esm2015/lib/models/user.model.js +0 -2
  91. package/esm2015/lib/ng-ipa-library.module.js +0 -112
  92. package/esm2015/lib/pipes/hijri-date.pipe.js +0 -18
  93. package/esm2015/lib/pipes/pipes.module.js +0 -16
  94. package/esm2015/lib/services/breadcrumbs.service.js +0 -151
  95. package/esm2015/lib/services/common.service.js +0 -66
  96. package/esm2015/lib/share-button/share-button.component.js +0 -37
  97. package/esm2015/lib/share-button/share-button.module.js +0 -52
  98. package/esm2015/ng-ipa-library.js +0 -5
  99. package/esm2015/public-api.js +0 -40
  100. package/fesm2015/ng-ipa-library.js +0 -1633
  101. package/fesm2015/ng-ipa-library.js.map +0 -1
  102. package/lib/core/components/loading/loading.component.d.ts +0 -12
  103. package/lib/core/interceptors/error.interceptor.d.ts +0 -14
  104. package/lib/core/interceptors/loading.interceptor.d.ts +0 -14
  105. package/lib/core/interceptors/token.interceptor.d.ts +0 -15
  106. package/lib/core/services/auth.service.d.ts +0 -15
  107. package/lib/core/services/error.service.d.ts +0 -10
  108. package/lib/core/services/loader.service.d.ts +0 -12
  109. package/lib/generate-form/generate-form.component.d.ts +0 -32
  110. package/lib/ipa-form/datepicker/datepicker.component.d.ts +0 -31
  111. package/lib/ipa-form/datepicker/gregorian-datepicker/gregorian-datepicker.component.d.ts +0 -6
  112. package/lib/ipa-form/datepicker/gregorian-datepicker/gregorian18n.d.ts +0 -11
  113. package/lib/ipa-form/datepicker/hijri-datepicker/IslamicI18n.d.ts +0 -11
  114. package/lib/ipa-form/datepicker/hijri-datepicker/hijri-datepicker.component.d.ts +0 -6
  115. package/lib/ipa-form/dropdown-input/dropdown-input.component.d.ts +0 -31
  116. package/lib/ipa-form/file-upload/file-upload.component.d.ts +0 -36
  117. package/lib/ipa-form/ipa-form.service.d.ts +0 -49
  118. package/lib/ipa-form/recaptcha/recaptcha.component.d.ts +0 -22
  119. package/lib/ipa-form/text-input/text-input.component.d.ts +0 -30
  120. package/lib/ipa-form/textarea-input/textarea-input.component.d.ts +0 -29
  121. package/lib/models/apiResponse.d.ts +0 -4
  122. package/lib/models/breadcrumbs.model.d.ts +0 -4
  123. package/lib/models/decodedToken.model.d.ts +0 -6
  124. package/lib/models/exceptionUrl.model.d.ts +0 -4
  125. package/lib/models/generateForm.model.d.ts +0 -27
  126. package/lib/models/pagedResult.d.ts +0 -4
  127. package/lib/models/user.model.d.ts +0 -7
  128. package/lib/ng-ipa-library.module.d.ts +0 -25
  129. package/lib/pipes/hijri-date.pipe.d.ts +0 -7
  130. package/lib/pipes/pipes.module.d.ts +0 -7
  131. package/lib/services/breadcrumbs.service.d.ts +0 -18
  132. package/lib/services/common.service.d.ts +0 -8
  133. package/lib/share-button/share-button.component.d.ts +0 -11
  134. package/lib/share-button/share-button.module.d.ts +0 -13
  135. package/ng-ipa-library.d.ts +0 -5
@@ -1,22 +0,0 @@
1
- import { OnInit } from '@angular/core';
2
- import { FormControl, NgControl } from '@angular/forms';
3
- import * as i0 from "@angular/core";
4
- export declare class RecaptchaComponent implements OnInit {
5
- controlDir: NgControl;
6
- siteKey: string;
7
- recaptchaSize: 'compact' | 'normal';
8
- lang: string;
9
- recaptchaType: 'image' | 'audio';
10
- theme: 'light' | 'dark';
11
- useGlobalDomain: boolean;
12
- formControl: FormControl;
13
- constructor(controlDir: NgControl);
14
- ngOnInit(): void;
15
- onChange(event: any): void;
16
- onTouched(): void;
17
- writeValue(obj: any): void;
18
- registerOnChange(fn: any): void;
19
- registerOnTouched(fn: any): void;
20
- static ɵfac: i0.ɵɵFactoryDeclaration<RecaptchaComponent, [{ self: true; }]>;
21
- static ɵcmp: i0.ɵɵComponentDeclaration<RecaptchaComponent, "ipa-recaptcha", never, { "siteKey": "siteKey"; "recaptchaSize": "recaptchaSize"; "lang": "lang"; "recaptchaType": "recaptchaType"; "theme": "theme"; "useGlobalDomain": "useGlobalDomain"; }, {}, never, never>;
22
- }
@@ -1,30 +0,0 @@
1
- import { ElementRef, OnInit } from '@angular/core';
2
- import { FormControl, NgControl } from '@angular/forms';
3
- import { IPAFormService } from '../ipa-form.service';
4
- import * as i0 from "@angular/core";
5
- export declare class TextInputComponent implements OnInit {
6
- private validationService;
7
- controlDir: NgControl;
8
- input: ElementRef;
9
- id: string;
10
- type: string;
11
- placeholder: string;
12
- label: string;
13
- required: boolean;
14
- patternErrorMsg: string;
15
- pattern: string;
16
- classes: string;
17
- containerClasses: string;
18
- formControl: FormControl;
19
- errorMsg: string | null;
20
- constructor(validationService: IPAFormService, controlDir: NgControl);
21
- ngOnInit(): void;
22
- onChange(event: any): void;
23
- onTouched(): void;
24
- writeValue(obj: any): void;
25
- registerOnChange(fn: any): void;
26
- registerOnTouched(fn: any): void;
27
- get errorMessage(): string | null;
28
- static ɵfac: i0.ɵɵFactoryDeclaration<TextInputComponent, [null, { self: true; }]>;
29
- static ɵcmp: i0.ɵɵComponentDeclaration<TextInputComponent, "ipa-text-input", never, { "id": "id"; "type": "type"; "placeholder": "placeholder"; "label": "label"; "required": "required"; "patternErrorMsg": "patternErrorMsg"; "pattern": "pattern"; "classes": "classes"; "containerClasses": "containerClasses"; }, {}, never, never>;
30
- }
@@ -1,29 +0,0 @@
1
- import { ElementRef, OnInit } from '@angular/core';
2
- import { FormControl, NgControl } from '@angular/forms';
3
- import { IPAFormService } from '../ipa-form.service';
4
- import * as i0 from "@angular/core";
5
- export declare class TextareaInputComponent implements OnInit {
6
- private validationService;
7
- controlDir: NgControl;
8
- input: ElementRef<any>;
9
- id: string;
10
- placeholder: string;
11
- label: string;
12
- required: boolean;
13
- patternErrorMsg: string;
14
- pattern: string;
15
- classes: string;
16
- containerClasses: string;
17
- formControl: FormControl;
18
- errorMsg: string | null;
19
- constructor(validationService: IPAFormService, controlDir: NgControl);
20
- ngOnInit(): void;
21
- onChange(event: any): void;
22
- onTouched(): void;
23
- writeValue(obj: any): void;
24
- registerOnChange(fn: any): void;
25
- registerOnTouched(fn: any): void;
26
- get errorMessage(): string | null;
27
- static ɵfac: i0.ɵɵFactoryDeclaration<TextareaInputComponent, [null, { self: true; }]>;
28
- static ɵcmp: i0.ɵɵComponentDeclaration<TextareaInputComponent, "ipa-textarea-input", never, { "id": "id"; "placeholder": "placeholder"; "label": "label"; "required": "required"; "patternErrorMsg": "patternErrorMsg"; "pattern": "pattern"; "classes": "classes"; "containerClasses": "containerClasses"; }, {}, never, never>;
29
- }
@@ -1,4 +0,0 @@
1
- export interface ApiResponse {
2
- statusCode: number;
3
- message: string;
4
- }
@@ -1,4 +0,0 @@
1
- export interface Breadcrumbs {
2
- nodeName: string;
3
- nodeUrl: string | null;
4
- }
@@ -1,6 +0,0 @@
1
- export interface DecodedToken {
2
- nameid?: string;
3
- given_name?: string;
4
- email?: string;
5
- exp?: number;
6
- }
@@ -1,4 +0,0 @@
1
- export interface ExceptionUrl {
2
- path: string;
3
- method: string;
4
- }
@@ -1,27 +0,0 @@
1
- export interface GenerateForm {
2
- columns: Column[];
3
- }
4
- export interface Column {
5
- arabicLabel: string;
6
- englishName: string;
7
- validationPattern?: string;
8
- inputClasses?: string;
9
- containerClasses?: string;
10
- valueField?: string;
11
- textField?: string;
12
- patternErrorMsg?: string;
13
- type: string;
14
- size?: number;
15
- required: boolean;
16
- data?: Data[] | any[];
17
- acceptedFiles?: string;
18
- multipleFile?: number;
19
- apiUrl?: string;
20
- autoUploadFile?: boolean;
21
- apiURlMethod?: string;
22
- authorization?: string;
23
- }
24
- export interface Data {
25
- id: number;
26
- description: string;
27
- }
@@ -1,4 +0,0 @@
1
- export interface PagedResult<T> {
2
- data: T[];
3
- count: number;
4
- }
@@ -1,7 +0,0 @@
1
- export interface User {
2
- id: string;
3
- email: string;
4
- displayName: string;
5
- token: string;
6
- imageUrl: string;
7
- }
@@ -1,25 +0,0 @@
1
- import * as i0 from "@angular/core";
2
- import * as i1 from "./ipa-form/text-input/text-input.component";
3
- import * as i2 from "./ipa-form/textarea-input/textarea-input.component";
4
- import * as i3 from "./ipa-form/dropdown-input/dropdown-input.component";
5
- import * as i4 from "./core/components/loading/loading.component";
6
- import * as i5 from "./generate-form/generate-form.component";
7
- import * as i6 from "./ipa-form/file-upload/file-upload.component";
8
- import * as i7 from "./ipa-form/datepicker/datepicker.component";
9
- import * as i8 from "./ipa-form/datepicker/hijri-datepicker/hijri-datepicker.component";
10
- import * as i9 from "./ipa-form/datepicker/gregorian-datepicker/gregorian-datepicker.component";
11
- import * as i10 from "./ipa-form/recaptcha/recaptcha.component";
12
- import * as i11 from "@angular/common";
13
- import * as i12 from "@angular/forms";
14
- import * as i13 from "ngx-toastr";
15
- import * as i14 from "ngx-dropzone-wrapper";
16
- import * as i15 from "ngx-captcha";
17
- import * as i16 from "./pipes/pipes.module";
18
- import * as i17 from "@ng-bootstrap/ng-bootstrap";
19
- import * as i18 from "./share-button/share-button.module";
20
- import * as i19 from "@ng-select/ng-select";
21
- export declare class NgIPALibraryModule {
22
- static ɵfac: i0.ɵɵFactoryDeclaration<NgIPALibraryModule, never>;
23
- static ɵmod: i0.ɵɵNgModuleDeclaration<NgIPALibraryModule, [typeof i1.TextInputComponent, typeof i2.TextareaInputComponent, typeof i3.DropdownInputComponent, typeof i4.LoaderComponent, typeof i5.GenerateFormComponent, typeof i6.FileUploadComponent, typeof i7.DatepickerComponent, typeof i8.HijriDatepickerComponent, typeof i9.GregorianDatepickerComponent, typeof i10.RecaptchaComponent], [typeof i11.CommonModule, typeof i12.FormsModule, typeof i12.ReactiveFormsModule, typeof i13.ToastrModule, typeof i14.DropzoneModule, typeof i15.NgxCaptchaModule, typeof i16.PipesModule, typeof i17.NgbDatepickerModule, typeof i18.ShareButtonModule, typeof i19.NgSelectModule], [typeof i1.TextInputComponent, typeof i2.TextareaInputComponent, typeof i3.DropdownInputComponent, typeof i4.LoaderComponent, typeof i5.GenerateFormComponent, typeof i6.FileUploadComponent, typeof i16.PipesModule, typeof i8.HijriDatepickerComponent, typeof i9.GregorianDatepickerComponent, typeof i18.ShareButtonModule, typeof i10.RecaptchaComponent, typeof i19.NgSelectModule]>;
24
- static ɵinj: i0.ɵɵInjectorDeclaration<NgIPALibraryModule>;
25
- }
@@ -1,7 +0,0 @@
1
- import { PipeTransform } from '@angular/core';
2
- import * as i0 from "@angular/core";
3
- export declare class HijriDatePipe implements PipeTransform {
4
- transform(date: string, format?: string, lang?: 'ar' | 'en'): string;
5
- static ɵfac: i0.ɵɵFactoryDeclaration<HijriDatePipe, never>;
6
- static ɵpipe: i0.ɵɵPipeDeclaration<HijriDatePipe, "hijriDate">;
7
- }
@@ -1,7 +0,0 @@
1
- import * as i0 from "@angular/core";
2
- import * as i1 from "./hijri-date.pipe";
3
- export declare class PipesModule {
4
- static ɵfac: i0.ɵɵFactoryDeclaration<PipesModule, never>;
5
- static ɵmod: i0.ɵɵNgModuleDeclaration<PipesModule, [typeof i1.HijriDatePipe], never, [typeof i1.HijriDatePipe]>;
6
- static ɵinj: i0.ɵɵInjectorDeclaration<PipesModule>;
7
- }
@@ -1,18 +0,0 @@
1
- import { Breadcrumbs } from '../models/breadcrumbs.model';
2
- import * as i0 from "@angular/core";
3
- export declare class BreadcrumbsService {
4
- constructor();
5
- setPageTitle(text: string): void;
6
- setMainPageTitle(text: string, url: string): void;
7
- addBreadcrumb(nodeName: string, spanClasses?: string, linkClasses?: string): void;
8
- addBreadcrumbList(nodeList: Breadcrumbs[], spanClasses?: string, linkClasses?: string): void;
9
- createBreadcrumbs(nodeList: Breadcrumbs[], spanClasses?: string, linkClasses?: string): void;
10
- removeLastBreadcrumb(): void;
11
- removeBreadcrumbByNodeName(nodeName: string): void;
12
- removeLastBreadcrumbsByLength(length: number): void;
13
- private createLink;
14
- private createSpan;
15
- private setCurrentNode;
16
- static ɵfac: i0.ɵɵFactoryDeclaration<BreadcrumbsService, never>;
17
- static ɵprov: i0.ɵɵInjectableDeclaration<BreadcrumbsService>;
18
- }
@@ -1,8 +0,0 @@
1
- import * as i0 from "@angular/core";
2
- export declare class CommonService {
3
- constructor();
4
- print(element: string, title: string, classes?: string): void;
5
- private getElementTag;
6
- static ɵfac: i0.ɵɵFactoryDeclaration<CommonService, never>;
7
- static ɵprov: i0.ɵɵInjectableDeclaration<CommonService>;
8
- }
@@ -1,11 +0,0 @@
1
- import { AfterViewInit } from '@angular/core';
2
- import * as i0 from "@angular/core";
3
- export declare class ShareButtonComponent implements AfterViewInit {
4
- title: string;
5
- description: string;
6
- btnLabel: string;
7
- constructor();
8
- ngAfterViewInit(): void;
9
- static ɵfac: i0.ɵɵFactoryDeclaration<ShareButtonComponent, never>;
10
- static ɵcmp: i0.ɵɵComponentDeclaration<ShareButtonComponent, "ipa-share-button", never, { "title": "title"; "description": "description"; "btnLabel": "btnLabel"; }, {}, never, never>;
11
- }
@@ -1,13 +0,0 @@
1
- import { FaIconLibrary } from '@fortawesome/angular-fontawesome';
2
- import * as i0 from "@angular/core";
3
- import * as i1 from "./share-button.component";
4
- import * as i2 from "ngx-sharebuttons/icons";
5
- import * as i3 from "ngx-sharebuttons/popup";
6
- import * as i4 from "@angular/cdk/overlay";
7
- import * as i5 from "@fortawesome/angular-fontawesome";
8
- export declare class ShareButtonModule {
9
- constructor(library: FaIconLibrary);
10
- static ɵfac: i0.ɵɵFactoryDeclaration<ShareButtonModule, never>;
11
- static ɵmod: i0.ɵɵNgModuleDeclaration<ShareButtonModule, [typeof i1.ShareButtonComponent], [typeof i2.ShareIconsModule, typeof i3.ShareButtonsPopupModule, typeof i4.OverlayModule, typeof i5.FontAwesomeModule], [typeof i1.ShareButtonComponent, typeof i2.ShareIconsModule, typeof i3.ShareButtonsPopupModule, typeof i4.OverlayModule, typeof i5.FontAwesomeModule]>;
12
- static ɵinj: i0.ɵɵInjectorDeclaration<ShareButtonModule>;
13
- }
@@ -1,5 +0,0 @@
1
- /**
2
- * Generated bundle index. Do not edit.
3
- */
4
- /// <amd-module name="ng-ipa-library" />
5
- export * from './public-api';