asksuite-citrus 3.17.30-beta.1 → 3.17.30-beta.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.
- package/esm2022/lib/components/phone-ddi/phone-ddi.component.mjs +78 -44
- package/esm2022/lib/helpers/phone.helper.mjs +1 -3
- package/esm2022/shared/services/country-flag.service.mjs +9 -3
- package/fesm2022/asksuite-citrus.mjs +83 -46
- package/fesm2022/asksuite-citrus.mjs.map +1 -1
- package/lib/components/phone-ddi/phone-ddi.component.d.ts +9 -4
- package/lib/helpers/phone.helper.d.ts +1 -1
- package/package.json +1 -1
- package/shared/services/country-flag.service.d.ts +3 -1
|
@@ -5,6 +5,7 @@ import { AskDropdownDirective } from "../../directives";
|
|
|
5
5
|
import CountryFlagService from "../../../shared/services/country-flag.service";
|
|
6
6
|
import { CountryData } from "../../../shared/providers/flag.provider";
|
|
7
7
|
import { OverlayComponent } from "../../classes/overlay.component";
|
|
8
|
+
import { NgxMaskDirective } from 'ngx-mask';
|
|
8
9
|
import * as i0 from "@angular/core";
|
|
9
10
|
export declare class PhoneDdiComponent extends OverlayComponent implements OnInit, ControlValueAccessor {
|
|
10
11
|
private countryFlagService;
|
|
@@ -21,6 +22,8 @@ export declare class PhoneDdiComponent extends OverlayComponent implements OnIni
|
|
|
21
22
|
wrapper: ElementRef | undefined;
|
|
22
23
|
menuContainer: ElementRef | undefined;
|
|
23
24
|
overlayContent: TemplateRef<any> | undefined;
|
|
25
|
+
inputMask?: NgxMaskDirective;
|
|
26
|
+
inputElement?: ElementRef;
|
|
24
27
|
dropdownList?: QueryList<AskDropdownDirective>;
|
|
25
28
|
_selectedFlag?: CountryData;
|
|
26
29
|
set selectedFlag(item: CountryData | undefined);
|
|
@@ -29,13 +32,17 @@ export declare class PhoneDdiComponent extends OverlayComponent implements OnIni
|
|
|
29
32
|
onChange: (value?: any) => void;
|
|
30
33
|
onTouch: () => void;
|
|
31
34
|
protected closed: boolean;
|
|
32
|
-
|
|
35
|
+
set inputValue(value: string);
|
|
36
|
+
get inputValue(): string;
|
|
37
|
+
get prefix(): string;
|
|
33
38
|
protected searchFieldControl: FormControl<string | null>;
|
|
34
39
|
protected filteredOptions: any[];
|
|
35
40
|
private _destroy;
|
|
36
41
|
private scrollSub?;
|
|
37
42
|
constructor(overlay: Overlay, viewContainerRef: ViewContainerRef, countryFlagService: CountryFlagService, destroyRef: DestroyRef);
|
|
38
43
|
ngOnInit(): void;
|
|
44
|
+
private loadCountries;
|
|
45
|
+
private getFullValue;
|
|
39
46
|
onPaste(event: any): void;
|
|
40
47
|
handleOptionSelected(item: any): void;
|
|
41
48
|
display(option: any): string;
|
|
@@ -44,7 +51,7 @@ export declare class PhoneDdiComponent extends OverlayComponent implements OnIni
|
|
|
44
51
|
handleFlagClick(event?: Event): void;
|
|
45
52
|
showOptions(): void;
|
|
46
53
|
hideOptions(): void;
|
|
47
|
-
onChangePhoneNumber(number: string, removeDdi?: boolean): void;
|
|
54
|
+
onChangePhoneNumber(number: string, removeDdi?: boolean, changeValue?: boolean): void;
|
|
48
55
|
private normalizePhoneInput;
|
|
49
56
|
private removeDdiFromNumber;
|
|
50
57
|
registerOnChange(fn: any): void;
|
|
@@ -52,11 +59,9 @@ export declare class PhoneDdiComponent extends OverlayComponent implements OnIni
|
|
|
52
59
|
writeValue(value: any): void;
|
|
53
60
|
protected readonly displayFn: (countryFlag: any) => string;
|
|
54
61
|
protected readonly filterFn: (search: string) => CountryData[];
|
|
55
|
-
private addAvailableFlags;
|
|
56
62
|
private initSelectedFlag;
|
|
57
63
|
private getDefaultCountryFlag;
|
|
58
64
|
private handleInputChange;
|
|
59
|
-
handlePhoneChange(event: any): void;
|
|
60
65
|
static ɵfac: i0.ɵɵFactoryDeclaration<PhoneDdiComponent, never>;
|
|
61
66
|
static ɵcmp: i0.ɵɵComponentDeclaration<PhoneDdiComponent, "ask-phone-ddi", never, { "disabled": { "alias": "disabled"; "required": false; }; "value": { "alias": "value"; "required": false; }; "useCountryCode": { "alias": "useCountryCode"; "required": false; }; "disableMask": { "alias": "disableMask"; "required": false; }; "inferCountryCodeByNumber": { "alias": "inferCountryCodeByNumber"; "required": false; }; }, { "valueChange": "valueChange"; "onChangeFlag": "onChangeFlag"; }, never, never, false, never>;
|
|
62
67
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function getCountryFromPhone(phone: string): string
|
|
1
|
+
export declare function getCountryFromPhone(phone: string): string;
|
package/package.json
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { CountryData } from "../providers/flag.provider";
|
|
2
2
|
import { HttpClient } from "@angular/common/http";
|
|
3
|
+
import { Observable } from "rxjs";
|
|
3
4
|
import { TranslateService } from "@ngx-translate/core";
|
|
4
5
|
import * as i0 from "@angular/core";
|
|
5
6
|
export default class CountryFlagService {
|
|
@@ -9,8 +10,9 @@ export default class CountryFlagService {
|
|
|
9
10
|
private defaultCountryCode;
|
|
10
11
|
private defaultCountryLanguage;
|
|
11
12
|
private cacheList;
|
|
13
|
+
private listCache$?;
|
|
12
14
|
constructor(flagUrl: string, http: HttpClient, translateService: TranslateService);
|
|
13
|
-
list: () =>
|
|
15
|
+
list: () => Observable<CountryData[]>;
|
|
14
16
|
getDefaultCountryFlag(searchData: CountryData[], useCountryCode?: string): CountryData;
|
|
15
17
|
getCountryDataForFlag(searchData: CountryData[], countryCode: string): CountryData;
|
|
16
18
|
private getDefaultCountryLanguage;
|