ngx-techlify-core 18.85.0 → 18.87.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.
@@ -9,6 +9,8 @@ import { ErrorHandlerService } from '../../core/error-handler.service';
9
9
  import { TechlifyTaggerTagFormConfigModel } from "../../tag/techlify-tagger-tag-form-field/techlify-tagger-tag-form-config.model";
10
10
  import { TechlifyListComponent } from '../../base-model';
11
11
  import { NgxPermissionsService } from 'ngx-permissions';
12
+ import { FormConfigurationFormService } from '../../form-configuration/form-configuration-form.service';
13
+ import { FormConfigurationUtilityService } from '../../form-configuration/form-configuration-utility.service';
12
14
  import * as i0 from "@angular/core";
13
15
  /**
14
16
  * We are using both app-entity-file-list and app-entity-files-view-all
@@ -21,6 +23,7 @@ export declare class EntityFileListComponent extends TechlifyListComponent imple
21
23
  private fb;
22
24
  private errorHandler;
23
25
  private permissionsService;
26
+ private formConfigService;
24
27
  entityId: number;
25
28
  entityType: string;
26
29
  viewOnly: boolean;
@@ -58,7 +61,8 @@ export declare class EntityFileListComponent extends TechlifyListComponent imple
58
61
  delete: string;
59
62
  read: string;
60
63
  };
61
- constructor(service: EntityFileService, alertService: AlertService, fb: UntypedFormBuilder, errorHandler: ErrorHandlerService, permissionsService: NgxPermissionsService);
64
+ formConfigurationUtilityService: FormConfigurationUtilityService;
65
+ constructor(service: EntityFileService, alertService: AlertService, fb: UntypedFormBuilder, errorHandler: ErrorHandlerService, permissionsService: NgxPermissionsService, formConfigService: FormConfigurationFormService);
62
66
  ngOnInit(): Promise<void>;
63
67
  loadData(): void;
64
68
  fileChanged(event: any): Promise<void>;
@@ -0,0 +1,12 @@
1
+ import { TechlifyService } from '../base-model/techlify-service';
2
+ import { HttpService } from '../core/http.service';
3
+ import { Observable } from 'rxjs';
4
+ import * as i0 from "@angular/core";
5
+ export declare class CountryService extends TechlifyService {
6
+ protected http: HttpService;
7
+ private countries?;
8
+ constructor(http: HttpService);
9
+ getCountriesObservable(reload?: boolean): Observable<any[]>;
10
+ static ɵfac: i0.ɵɵFactoryDeclaration<CountryService, never>;
11
+ static ɵprov: i0.ɵɵInjectableDeclaration<CountryService>;
12
+ }
@@ -0,0 +1,47 @@
1
+ import { OnDestroy, OnInit } from '@angular/core';
2
+ import { ControlValueAccessor, FormControl, FormGroup } from '@angular/forms';
3
+ import { CountryService } from './country.service';
4
+ import * as i0 from "@angular/core";
5
+ export declare class PhoneNumberSelectorComponent implements ControlValueAccessor, OnInit, OnDestroy {
6
+ private service;
7
+ label: import("@angular/core").InputSignal<string>;
8
+ placeholder: import("@angular/core").InputSignal<string>;
9
+ required: import("@angular/core").InputSignal<boolean>;
10
+ countries: import("@angular/core").WritableSignal<any[]>;
11
+ readonly phoneGroup: FormGroup<{
12
+ country_code: FormControl<string>;
13
+ number: FormControl<string>;
14
+ }>;
15
+ private onChange;
16
+ protected onTouched: () => void;
17
+ private destroy$;
18
+ /**
19
+ * Used to validate inline that the number entered is valid based on the
20
+ * selected country's phone length, with or without its calling code.
21
+ * Countries without a phone length are not validated yet
22
+ */
23
+ private readonly phoneFormatValidator;
24
+ constructor(service: CountryService);
25
+ ngOnInit(): void;
26
+ ngOnDestroy(): void;
27
+ writeValue(value: string | null): void;
28
+ registerOnChange(fn: (value: string) => void): void;
29
+ registerOnTouched(fn: () => void): void;
30
+ setDisabledState(isDisabled: boolean): void;
31
+ /**
32
+ * Adjust the number to be sent to the api in the correct format
33
+ */
34
+ private normalizeForApi;
35
+ private getCountry;
36
+ /**
37
+ * Returns the digits of the number without the country's calling code
38
+ */
39
+ private toLocalDigits;
40
+ /**
41
+ * Finds the country from the calling code the number starts with.
42
+ * +1 is shared by several countries, so it defaults to US like before
43
+ */
44
+ private detectCountry;
45
+ static ɵfac: i0.ɵɵFactoryDeclaration<PhoneNumberSelectorComponent, never>;
46
+ static ɵcmp: i0.ɵɵComponentDeclaration<PhoneNumberSelectorComponent, "app-phone-number-selector", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
47
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ngx-techlify-core",
3
- "version": "18.85.0",
3
+ "version": "18.87.0",
4
4
  "peerDependencies": {
5
5
  "@angular/common": ">=18",
6
6
  "@angular/core": ">=18",
package/public-api.d.ts CHANGED
@@ -138,6 +138,8 @@ export * from './lib/file-dragdrop-uploader/file-dragdrop-uploader/file-dragdrop
138
138
  export * from './lib/file-dragdrop-uploader/file-dragdrop-uploader.module';
139
139
  export * from './lib/number-input-button';
140
140
  export * from './lib/number-selector/number-selector.component';
141
+ export * from './lib/phone-number-selector/phone-number-selector.component';
142
+ export * from './lib/phone-number-selector/country.service';
141
143
  export * from './lib/column-selector';
142
144
  export * from './lib/reset-password';
143
145
  export * from './lib/reset-password/reset-password.module';