ng-ipa-library 4.0.21 → 4.0.22
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/esm2022/lib/generate-form/generate-form.component.mjs +5 -5
- package/esm2022/lib/ipa-form/datepicker/datepicker.component.mjs +34 -13
- package/esm2022/lib/ipa-form/datepicker/gregorian-datepicker/gregorian-datepicker.component.mjs +3 -3
- package/esm2022/lib/ipa-form/datepicker/hijri-datepicker/hijri-datepicker.component.mjs +3 -3
- package/esm2022/lib/ipa-form/dropdown-input/dropdown-input.component.mjs +7 -6
- package/esm2022/lib/ipa-form/file-upload/file-upload.component.mjs +6 -5
- package/esm2022/lib/ipa-form/recaptcha/recaptcha.component.mjs +6 -4
- package/esm2022/lib/ipa-form/text-input/text-input.component.mjs +41 -17
- package/esm2022/lib/ipa-form/textarea-input/textarea-input.component.mjs +5 -4
- package/esm2022/lib/ng-ipa-library.module.mjs +26 -38
- package/esm2022/public-api.mjs +1 -3
- package/fesm2022/ng-ipa-library.mjs +235 -257
- package/fesm2022/ng-ipa-library.mjs.map +1 -1
- package/lib/ipa-form/datepicker/datepicker.component.d.ts +13 -8
- package/lib/ipa-form/dropdown-input/dropdown-input.component.d.ts +1 -1
- package/lib/ipa-form/file-upload/file-upload.component.d.ts +1 -1
- package/lib/ipa-form/recaptcha/recaptcha.component.d.ts +1 -1
- package/lib/ipa-form/text-input/text-input.component.d.ts +13 -7
- package/lib/ipa-form/textarea-input/textarea-input.component.d.ts +1 -1
- package/lib/ng-ipa-library.module.d.ts +17 -21
- package/package.json +1 -1
- package/public-api.d.ts +0 -1
- package/esm2022/lib/directives/host-control-directive.directive.mjs +0 -61
- package/lib/directives/host-control-directive.directive.d.ts +0 -15
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { AfterContentChecked, ChangeDetectorRef, OnInit } from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { UntypedFormControl, NgControl } from '@angular/forms';
|
|
3
|
+
import { NgbCalendar, NgbDateStruct, NgbInputDatepicker, NgbInputDatepickerConfig } from '@ng-bootstrap/ng-bootstrap';
|
|
3
4
|
import { IPAFormService } from '../ipa-form.service';
|
|
4
|
-
import { HostControlDirectiveDirective } from '../../directives/host-control-directive.directive';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
|
-
import * as i1 from "../../directives/host-control-directive.directive";
|
|
7
6
|
export declare class DatepickerComponent implements OnInit, AfterContentChecked {
|
|
8
7
|
private ipaFormService;
|
|
9
8
|
private calendar;
|
|
9
|
+
controlDir: NgControl;
|
|
10
10
|
private cd;
|
|
11
11
|
datepicker: NgbInputDatepicker;
|
|
12
12
|
id: string;
|
|
@@ -19,15 +19,20 @@ export declare class DatepickerComponent implements OnInit, AfterContentChecked
|
|
|
19
19
|
containerClasses: string;
|
|
20
20
|
isArabicForm: boolean;
|
|
21
21
|
isHijriDatepicker: boolean;
|
|
22
|
-
today: NgbDate;
|
|
23
|
-
formControl:
|
|
22
|
+
today: import("@ng-bootstrap/ng-bootstrap").NgbDate;
|
|
23
|
+
formControl: UntypedFormControl;
|
|
24
24
|
errorMsg: string | null;
|
|
25
|
-
constructor(ipaFormService: IPAFormService, calendar: NgbCalendar, config: NgbInputDatepickerConfig, cd: ChangeDetectorRef);
|
|
25
|
+
constructor(ipaFormService: IPAFormService, calendar: NgbCalendar, controlDir: NgControl, config: NgbInputDatepickerConfig, cd: ChangeDetectorRef);
|
|
26
26
|
ngAfterContentChecked(): void;
|
|
27
27
|
ngOnInit(): void;
|
|
28
|
+
onChange(event: any): void;
|
|
29
|
+
onTouched(): void;
|
|
30
|
+
writeValue(obj: any): void;
|
|
31
|
+
registerOnChange(fn: any): void;
|
|
32
|
+
registerOnTouched(fn: any): void;
|
|
28
33
|
openDatepicker(event: Event): void;
|
|
29
34
|
get errorMessage(): string | null;
|
|
30
35
|
private changeDatepickerTitles;
|
|
31
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DatepickerComponent,
|
|
32
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<DatepickerComponent, "ipa-datepicker", never, { "id": { "alias": "id"; "required": false; }; "label": { "alias": "label"; "required": false; }; "patternErrorMsg": { "alias": "patternErrorMsg"; "required": false; }; "required": { "alias": "required"; "required": false; }; "maxDate": { "alias": "maxDate"; "required": false; }; "minDate": { "alias": "minDate"; "required": false; }; "classes": { "alias": "classes"; "required": false; }; "containerClasses": { "alias": "containerClasses"; "required": false; }; "isArabicForm": { "alias": "isArabicForm"; "required": false; }; }, {}, never, never, false,
|
|
36
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DatepickerComponent, [null, null, { self: true; }, null, null]>;
|
|
37
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DatepickerComponent, "ipa-datepicker", never, { "id": { "alias": "id"; "required": false; }; "label": { "alias": "label"; "required": false; }; "patternErrorMsg": { "alias": "patternErrorMsg"; "required": false; }; "required": { "alias": "required"; "required": false; }; "maxDate": { "alias": "maxDate"; "required": false; }; "minDate": { "alias": "minDate"; "required": false; }; "classes": { "alias": "classes"; "required": false; }; "containerClasses": { "alias": "containerClasses"; "required": false; }; "isArabicForm": { "alias": "isArabicForm"; "required": false; }; }, {}, never, never, false, never>;
|
|
33
38
|
}
|
|
@@ -30,5 +30,5 @@ export declare class DropdownInputComponent implements OnInit {
|
|
|
30
30
|
registerOnTouched(fn: any): void;
|
|
31
31
|
get errorMessage(): string | null;
|
|
32
32
|
static ɵfac: i0.ɵɵFactoryDeclaration<DropdownInputComponent, [null, { self: true; }]>;
|
|
33
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<DropdownInputComponent, "ipa-dropdown-input", never, { "id": { "alias": "id"; "required": false; }; "label": { "alias": "label"; "required": false; }; "items": { "alias": "items"; "required": false; }; "textField": { "alias": "textField"; "required": false; }; "valueField": { "alias": "valueField"; "required": false; }; "required": { "alias": "required"; "required": false; }; "firstItemLabel": { "alias": "firstItemLabel"; "required": false; }; "searchable": { "alias": "searchable"; "required": false; }; "notFoundText": { "alias": "notFoundText"; "required": false; }; "classes": { "alias": "classes"; "required": false; }; "containerClasses": { "alias": "containerClasses"; "required": false; }; "isArabicForm": { "alias": "isArabicForm"; "required": false; }; "fromGenerateForm": { "alias": "fromGenerateForm"; "required": false; }; }, {}, never, never,
|
|
33
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DropdownInputComponent, "ipa-dropdown-input", never, { "id": { "alias": "id"; "required": false; }; "label": { "alias": "label"; "required": false; }; "items": { "alias": "items"; "required": false; }; "textField": { "alias": "textField"; "required": false; }; "valueField": { "alias": "valueField"; "required": false; }; "required": { "alias": "required"; "required": false; }; "firstItemLabel": { "alias": "firstItemLabel"; "required": false; }; "searchable": { "alias": "searchable"; "required": false; }; "notFoundText": { "alias": "notFoundText"; "required": false; }; "classes": { "alias": "classes"; "required": false; }; "containerClasses": { "alias": "containerClasses"; "required": false; }; "isArabicForm": { "alias": "isArabicForm"; "required": false; }; "fromGenerateForm": { "alias": "fromGenerateForm"; "required": false; }; }, {}, never, never, true, never>;
|
|
34
34
|
}
|
|
@@ -36,5 +36,5 @@ export declare class FileUploadComponent implements OnInit {
|
|
|
36
36
|
deleteFile(file: any): void;
|
|
37
37
|
private setConfiguration;
|
|
38
38
|
static ɵfac: i0.ɵɵFactoryDeclaration<FileUploadComponent, never>;
|
|
39
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<FileUploadComponent, "ipa-file-upload", never, { "isArabicForm": { "alias": "isArabicForm"; "required": false; }; "label": { "alias": "label"; "required": false; }; "required": { "alias": "required"; "required": false; }; "acceptedFiles": { "alias": "acceptedFiles"; "required": false; }; "multiple": { "alias": "multiple"; "required": false; }; "maxFileSize": { "alias": "maxFileSize"; "required": false; }; "method": { "alias": "method"; "required": false; }; "autoUpload": { "alias": "autoUpload"; "required": false; }; "apiUrl": { "alias": "apiUrl"; "required": false; }; "authorization": { "alias": "authorization"; "required": false; }; }, { "successUpload": "successUpload"; "fileAdded": "fileAdded"; "fileDeleted": "fileDeleted"; }, never, never,
|
|
39
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FileUploadComponent, "ipa-file-upload", never, { "isArabicForm": { "alias": "isArabicForm"; "required": false; }; "label": { "alias": "label"; "required": false; }; "required": { "alias": "required"; "required": false; }; "acceptedFiles": { "alias": "acceptedFiles"; "required": false; }; "multiple": { "alias": "multiple"; "required": false; }; "maxFileSize": { "alias": "maxFileSize"; "required": false; }; "method": { "alias": "method"; "required": false; }; "autoUpload": { "alias": "autoUpload"; "required": false; }; "apiUrl": { "alias": "apiUrl"; "required": false; }; "authorization": { "alias": "authorization"; "required": false; }; }, { "successUpload": "successUpload"; "fileAdded": "fileAdded"; "fileDeleted": "fileDeleted"; }, never, never, true, never>;
|
|
40
40
|
}
|
|
@@ -18,5 +18,5 @@ export declare class RecaptchaComponent implements OnInit {
|
|
|
18
18
|
registerOnChange(fn: any): void;
|
|
19
19
|
registerOnTouched(fn: any): void;
|
|
20
20
|
static ɵfac: i0.ɵɵFactoryDeclaration<RecaptchaComponent, [{ self: true; }]>;
|
|
21
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<RecaptchaComponent, "ipa-recaptcha", never, { "siteKey": { "alias": "siteKey"; "required": false; }; "recaptchaSize": { "alias": "recaptchaSize"; "required": false; }; "lang": { "alias": "lang"; "required": false; }; "recaptchaType": { "alias": "recaptchaType"; "required": false; }; "theme": { "alias": "theme"; "required": false; }; "useGlobalDomain": { "alias": "useGlobalDomain"; "required": false; }; }, {}, never, never,
|
|
21
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<RecaptchaComponent, "ipa-recaptcha", never, { "siteKey": { "alias": "siteKey"; "required": false; }; "recaptchaSize": { "alias": "recaptchaSize"; "required": false; }; "lang": { "alias": "lang"; "required": false; }; "recaptchaType": { "alias": "recaptchaType"; "required": false; }; "theme": { "alias": "theme"; "required": false; }; "useGlobalDomain": { "alias": "useGlobalDomain"; "required": false; }; }, {}, never, never, true, never>;
|
|
22
22
|
}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { AfterContentChecked, ChangeDetectorRef, OnInit } from '@angular/core';
|
|
1
|
+
import { AfterContentChecked, ChangeDetectorRef, ElementRef, OnInit } from '@angular/core';
|
|
2
|
+
import { UntypedFormControl, NgControl } from '@angular/forms';
|
|
2
3
|
import { IPAFormService } from '../ipa-form.service';
|
|
3
|
-
import { HostControlDirectiveDirective } from '../../directives/host-control-directive.directive';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
|
-
import * as i1 from "../../directives/host-control-directive.directive";
|
|
6
5
|
export declare class TextInputComponent implements OnInit, AfterContentChecked {
|
|
7
6
|
private validationService;
|
|
7
|
+
controlDir: NgControl;
|
|
8
8
|
private cd;
|
|
9
|
+
input: ElementRef;
|
|
9
10
|
id: string;
|
|
10
11
|
type: string;
|
|
11
12
|
placeholder: string;
|
|
@@ -17,13 +18,18 @@ export declare class TextInputComponent implements OnInit, AfterContentChecked {
|
|
|
17
18
|
classes: string;
|
|
18
19
|
containerClasses: string;
|
|
19
20
|
isArabicForm: boolean;
|
|
20
|
-
formControl:
|
|
21
|
+
formControl: UntypedFormControl;
|
|
21
22
|
errorMsg: string | null;
|
|
22
|
-
constructor(validationService: IPAFormService, cd: ChangeDetectorRef);
|
|
23
|
+
constructor(validationService: IPAFormService, controlDir: NgControl, cd: ChangeDetectorRef);
|
|
23
24
|
ngAfterContentChecked(): void;
|
|
24
25
|
ngOnInit(): void;
|
|
26
|
+
onChange(event: any): void;
|
|
27
|
+
onTouched(): void;
|
|
28
|
+
writeValue(obj: any): void;
|
|
29
|
+
registerOnChange(fn: any): void;
|
|
30
|
+
registerOnTouched(fn: any): void;
|
|
25
31
|
checkIsNumber(event: Event): void;
|
|
26
32
|
get errorMessage(): string | null;
|
|
27
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<TextInputComponent,
|
|
28
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TextInputComponent, "ipa-text-input", never, { "id": { "alias": "id"; "required": false; }; "type": { "alias": "type"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "label": { "alias": "label"; "required": false; }; "required": { "alias": "required"; "required": false; }; "patternErrorMsg": { "alias": "patternErrorMsg"; "required": false; }; "onlyNumber": { "alias": "onlyNumber"; "required": false; }; "pattern": { "alias": "pattern"; "required": false; }; "classes": { "alias": "classes"; "required": false; }; "containerClasses": { "alias": "containerClasses"; "required": false; }; "isArabicForm": { "alias": "isArabicForm"; "required": false; }; }, {}, never, never,
|
|
33
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TextInputComponent, [null, { self: true; }, null]>;
|
|
34
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TextInputComponent, "ipa-text-input", never, { "id": { "alias": "id"; "required": false; }; "type": { "alias": "type"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "label": { "alias": "label"; "required": false; }; "required": { "alias": "required"; "required": false; }; "patternErrorMsg": { "alias": "patternErrorMsg"; "required": false; }; "onlyNumber": { "alias": "onlyNumber"; "required": false; }; "pattern": { "alias": "pattern"; "required": false; }; "classes": { "alias": "classes"; "required": false; }; "containerClasses": { "alias": "containerClasses"; "required": false; }; "isArabicForm": { "alias": "isArabicForm"; "required": false; }; }, {}, never, never, true, never>;
|
|
29
35
|
}
|
|
@@ -28,5 +28,5 @@ export declare class TextareaInputComponent implements OnInit, AfterContentCheck
|
|
|
28
28
|
registerOnTouched(fn: any): void;
|
|
29
29
|
get errorMessage(): string | null;
|
|
30
30
|
static ɵfac: i0.ɵɵFactoryDeclaration<TextareaInputComponent, [null, { self: true; }, null]>;
|
|
31
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TextareaInputComponent, "ipa-textarea-input", never, { "id": { "alias": "id"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "label": { "alias": "label"; "required": false; }; "required": { "alias": "required"; "required": false; }; "patternErrorMsg": { "alias": "patternErrorMsg"; "required": false; }; "pattern": { "alias": "pattern"; "required": false; }; "classes": { "alias": "classes"; "required": false; }; "containerClasses": { "alias": "containerClasses"; "required": false; }; "isArabicForm": { "alias": "isArabicForm"; "required": false; }; }, {}, never, never,
|
|
31
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TextareaInputComponent, "ipa-textarea-input", never, { "id": { "alias": "id"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "label": { "alias": "label"; "required": false; }; "required": { "alias": "required"; "required": false; }; "patternErrorMsg": { "alias": "patternErrorMsg"; "required": false; }; "pattern": { "alias": "pattern"; "required": false; }; "classes": { "alias": "classes"; "required": false; }; "containerClasses": { "alias": "containerClasses"; "required": false; }; "isArabicForm": { "alias": "isArabicForm"; "required": false; }; }, {}, never, never, true, never>;
|
|
32
32
|
}
|
|
@@ -1,26 +1,22 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
|
-
import * as i1 from "./
|
|
3
|
-
import * as i2 from "./ipa-form/
|
|
4
|
-
import * as i3 from "./ipa-form/
|
|
5
|
-
import * as i4 from "./
|
|
6
|
-
import * as i5 from "./
|
|
7
|
-
import * as i6 from "
|
|
8
|
-
import * as i7 from "
|
|
9
|
-
import * as i8 from "
|
|
10
|
-
import * as i9 from "./
|
|
11
|
-
import * as i10 from "
|
|
12
|
-
import * as i11 from "
|
|
13
|
-
import * as i12 from "
|
|
14
|
-
import * as i13 from "
|
|
15
|
-
import * as i14 from "
|
|
16
|
-
import * as i15 from "
|
|
17
|
-
import * as i16 from "./
|
|
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
|
-
import * as i20 from "./directives/host-control-directive.directive";
|
|
2
|
+
import * as i1 from "./generate-form/generate-form.component";
|
|
3
|
+
import * as i2 from "./ipa-form/datepicker/datepicker.component";
|
|
4
|
+
import * as i3 from "./ipa-form/datepicker/hijri-datepicker/hijri-datepicker.component";
|
|
5
|
+
import * as i4 from "./ipa-form/datepicker/gregorian-datepicker/gregorian-datepicker.component";
|
|
6
|
+
import * as i5 from "./core/components/loading/loading.component";
|
|
7
|
+
import * as i6 from "@angular/common";
|
|
8
|
+
import * as i7 from "@angular/forms";
|
|
9
|
+
import * as i8 from "ngx-toastr";
|
|
10
|
+
import * as i9 from "./pipes/pipes.module";
|
|
11
|
+
import * as i10 from "@ng-bootstrap/ng-bootstrap";
|
|
12
|
+
import * as i11 from "./share-button/share-button.module";
|
|
13
|
+
import * as i12 from "./ipa-form/textarea-input/textarea-input.component";
|
|
14
|
+
import * as i13 from "./ipa-form/text-input/text-input.component";
|
|
15
|
+
import * as i14 from "./ipa-form/recaptcha/recaptcha.component";
|
|
16
|
+
import * as i15 from "./ipa-form/file-upload/file-upload.component";
|
|
17
|
+
import * as i16 from "./ipa-form/dropdown-input/dropdown-input.component";
|
|
22
18
|
export declare class NgIPALibraryModule {
|
|
23
19
|
static ɵfac: i0.ɵɵFactoryDeclaration<NgIPALibraryModule, never>;
|
|
24
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<NgIPALibraryModule, [typeof i1.
|
|
20
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<NgIPALibraryModule, [typeof i1.GenerateFormComponent, typeof i2.DatepickerComponent, typeof i3.HijriDatepickerComponent, typeof i4.GregorianDatepickerComponent, typeof i5.LoaderComponent], [typeof i6.CommonModule, typeof i7.FormsModule, typeof i7.ReactiveFormsModule, typeof i8.ToastrModule, typeof i9.PipesModule, typeof i10.NgbDatepickerModule, typeof i11.ShareButtonModule, typeof i12.TextareaInputComponent, typeof i13.TextInputComponent, typeof i14.RecaptchaComponent, typeof i15.FileUploadComponent, typeof i16.DropdownInputComponent], [typeof i9.PipesModule, typeof i11.ShareButtonModule, typeof i13.TextInputComponent, typeof i12.TextareaInputComponent, typeof i16.DropdownInputComponent, typeof i1.GenerateFormComponent, typeof i15.FileUploadComponent, typeof i3.HijriDatepickerComponent, typeof i4.GregorianDatepickerComponent, typeof i14.RecaptchaComponent, typeof i5.LoaderComponent]>;
|
|
25
21
|
static ɵinj: i0.ɵɵInjectorDeclaration<NgIPALibraryModule>;
|
|
26
22
|
}
|
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
|
@@ -26,7 +26,6 @@ export * from './lib/ipa-form/ipa-form.service';
|
|
|
26
26
|
export * from './lib/services/breadcrumbs.service';
|
|
27
27
|
export * from './lib/services/common.service';
|
|
28
28
|
export * from './lib/pipes/hijri-date.pipe';
|
|
29
|
-
export * from './lib/directives/host-control-directive.directive';
|
|
30
29
|
export * from './lib/models/pagedResult';
|
|
31
30
|
export * from './lib/models/apiException';
|
|
32
31
|
export * from './lib/models/apiResponse';
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { Directive, inject, Injector } from '@angular/core';
|
|
2
|
-
import { ControlContainer, FormControl, FormControlDirective, FormControlName, NG_VALUE_ACCESSOR, NgControl, NgModel, } from '@angular/forms';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
export class HostControlDirectiveDirective {
|
|
5
|
-
constructor() {
|
|
6
|
-
this.injector = inject(Injector);
|
|
7
|
-
}
|
|
8
|
-
ngOnInit() {
|
|
9
|
-
const ngControl = this.injector.get(NgControl, null, {
|
|
10
|
-
self: true,
|
|
11
|
-
optional: true,
|
|
12
|
-
});
|
|
13
|
-
if (ngControl instanceof NgModel) {
|
|
14
|
-
this.control = ngControl.control;
|
|
15
|
-
this.subscription = this.control.valueChanges.subscribe((value) => {
|
|
16
|
-
if (ngControl.model !== value || ngControl.viewModel !== value) {
|
|
17
|
-
ngControl.viewToModelUpdate(value);
|
|
18
|
-
}
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
else if (ngControl instanceof FormControlDirective) {
|
|
22
|
-
this.control = ngControl.control;
|
|
23
|
-
}
|
|
24
|
-
else if (ngControl instanceof FormControlName) {
|
|
25
|
-
const container = this.injector.get(ControlContainer)
|
|
26
|
-
.control;
|
|
27
|
-
this.control = container.controls[ngControl.name];
|
|
28
|
-
}
|
|
29
|
-
else {
|
|
30
|
-
this.control = new FormControl();
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
writeValue() { }
|
|
34
|
-
registerOnChange() { }
|
|
35
|
-
registerOnTouched() { }
|
|
36
|
-
ngOnDestroy() {
|
|
37
|
-
this.subscription?.unsubscribe();
|
|
38
|
-
}
|
|
39
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: HostControlDirectiveDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
40
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.11", type: HostControlDirectiveDirective, isStandalone: true, providers: [
|
|
41
|
-
{
|
|
42
|
-
provide: NG_VALUE_ACCESSOR,
|
|
43
|
-
multi: true,
|
|
44
|
-
useExisting: HostControlDirectiveDirective,
|
|
45
|
-
},
|
|
46
|
-
], ngImport: i0 }); }
|
|
47
|
-
}
|
|
48
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: HostControlDirectiveDirective, decorators: [{
|
|
49
|
-
type: Directive,
|
|
50
|
-
args: [{
|
|
51
|
-
standalone: true,
|
|
52
|
-
providers: [
|
|
53
|
-
{
|
|
54
|
-
provide: NG_VALUE_ACCESSOR,
|
|
55
|
-
multi: true,
|
|
56
|
-
useExisting: HostControlDirectiveDirective,
|
|
57
|
-
},
|
|
58
|
-
],
|
|
59
|
-
}]
|
|
60
|
-
}] });
|
|
61
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaG9zdC1jb250cm9sLWRpcmVjdGl2ZS5kaXJlY3RpdmUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9uZy1pcGEtbGlicmFyeS9zcmMvbGliL2RpcmVjdGl2ZXMvaG9zdC1jb250cm9sLWRpc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XHJcbiAgd3JpdGVWYWx1ZSgpOiB2b2lkIHt9XHJcbiAgcmVnaXN0ZXJPbkNoYW5nZSgpOiB2b2lkIHt9XHJcbiAgcmVnaXN0ZXJPblRvdWNoZWQoKTogdm9pZCB7fVxyXG5cclxuICBuZ09uRGVzdHJveSgpOiB2b2lkIHtcclxuICAgIHRoaXMuc3Vic2NyaXB0aW9uPy51bnN1YnNjcmliZSgpO1xyXG4gIH1cclxufVxyXG4iXX0=
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { OnDestroy, OnInit } from '@angular/core';
|
|
2
|
-
import { ControlValueAccessor, FormControl } from '@angular/forms';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class HostControlDirectiveDirective implements ControlValueAccessor, OnInit, OnDestroy {
|
|
5
|
-
control: FormControl;
|
|
6
|
-
private injector;
|
|
7
|
-
private subscription?;
|
|
8
|
-
ngOnInit(): void;
|
|
9
|
-
writeValue(): void;
|
|
10
|
-
registerOnChange(): void;
|
|
11
|
-
registerOnTouched(): void;
|
|
12
|
-
ngOnDestroy(): void;
|
|
13
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<HostControlDirectiveDirective, never>;
|
|
14
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<HostControlDirectiveDirective, never, never, {}, {}, never, never, true, never>;
|
|
15
|
-
}
|