monkey-style-guide-v2 0.0.22 → 0.0.23
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/form-field/form-field.component.mjs +2 -2
- package/esm2022/lib/components/index.mjs +2 -1
- package/esm2022/lib/components/input-phone/index.mjs +7 -0
- package/esm2022/lib/components/input-phone/input-phone.component.mjs +324 -0
- package/esm2022/lib/components/modal/modal.component.mjs +2 -2
- package/esm2022/lib/tokens/index.mjs +2 -1
- package/fesm2022/monkey-style-guide-v2.mjs +1594 -1274
- package/fesm2022/monkey-style-guide-v2.mjs.map +1 -1
- package/lib/components/index.d.ts +1 -0
- package/lib/components/input-phone/index.d.ts +6 -0
- package/lib/components/input-phone/input-phone.component.d.ts +68 -0
- package/lib/tokens/index.d.ts +1 -0
- package/monkey-style-guide-v2-0.0.23.tgz +0 -0
- package/package.json +3 -2
- package/monkey-style-guide-v2-0.0.22.tgz +0 -0
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { AfterContentInit, ElementRef, OnChanges, OnDestroy, QueryList, SimpleChanges } from '@angular/core';
|
|
2
|
+
import { ControlValueAccessor, NgControl } from '@angular/forms';
|
|
3
|
+
import { Subject } from 'rxjs';
|
|
4
|
+
import { MonkeyFormFieldControl } from '../form-field';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
interface Country {
|
|
7
|
+
code: string;
|
|
8
|
+
name: string;
|
|
9
|
+
flag: string;
|
|
10
|
+
}
|
|
11
|
+
export declare class MonkeyInputPhoneComponent implements MonkeyFormFieldControl, ControlValueAccessor, AfterContentInit, OnDestroy, OnChanges {
|
|
12
|
+
placeholder: string;
|
|
13
|
+
tabIndex: number;
|
|
14
|
+
get disabled(): boolean;
|
|
15
|
+
set disabled(value: boolean);
|
|
16
|
+
_disabled: boolean;
|
|
17
|
+
get required(): boolean;
|
|
18
|
+
set required(value: boolean);
|
|
19
|
+
private _required;
|
|
20
|
+
set value(value: any);
|
|
21
|
+
get value(): any;
|
|
22
|
+
_value: string | null;
|
|
23
|
+
constructor();
|
|
24
|
+
ngControl: NgControl | null;
|
|
25
|
+
private readonly idGenerator;
|
|
26
|
+
private readonly countryCode;
|
|
27
|
+
private readonly locale;
|
|
28
|
+
readonly id: string;
|
|
29
|
+
readonly inputId: string;
|
|
30
|
+
focused: boolean;
|
|
31
|
+
readonly type: string;
|
|
32
|
+
readonly stateChanges: Subject<void>;
|
|
33
|
+
countries: Country[];
|
|
34
|
+
countriesFiltered: Country[];
|
|
35
|
+
selectedCallingCode: string;
|
|
36
|
+
phoneFormatted: string;
|
|
37
|
+
phoneValid: boolean;
|
|
38
|
+
inputs: QueryList<ElementRef<HTMLInputElement>>;
|
|
39
|
+
private getCountryNameFromCode;
|
|
40
|
+
private getCountryByCallingCode;
|
|
41
|
+
private isoToFlagEmoji;
|
|
42
|
+
private getCountryFromPhoneNumber;
|
|
43
|
+
private performValue;
|
|
44
|
+
private validateValue;
|
|
45
|
+
private formatValue;
|
|
46
|
+
disableToBeDirty?: boolean | undefined;
|
|
47
|
+
_onChange: any;
|
|
48
|
+
_onTouched: any;
|
|
49
|
+
ngAfterContentInit(): void;
|
|
50
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
51
|
+
ngOnDestroy(): void;
|
|
52
|
+
onContainerClick(event: MouseEvent): void;
|
|
53
|
+
_onFocus(): void;
|
|
54
|
+
_onBlur(): void;
|
|
55
|
+
registerOnChange(fn: any): void;
|
|
56
|
+
registerOnTouched(fn: any): void;
|
|
57
|
+
setDisabledState(isDisabled: boolean): void;
|
|
58
|
+
writeValue(value: any): void;
|
|
59
|
+
onInputChange(event: Event): void;
|
|
60
|
+
onCountryChange(): void;
|
|
61
|
+
getMaxLength(): number;
|
|
62
|
+
onHandleSearchSelect(query: string): void;
|
|
63
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MonkeyInputPhoneComponent, never>;
|
|
64
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MonkeyInputPhoneComponent, "monkey-input-phone", never, { "placeholder": { "alias": "placeholder"; "required": false; }; "tabIndex": { "alias": "tabIndex"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "required": { "alias": "required"; "required": false; }; "value": { "alias": "value"; "required": false; }; }, {}, never, never, true, never>;
|
|
65
|
+
static ngAcceptInputType_disabled: unknown;
|
|
66
|
+
static ngAcceptInputType_required: unknown;
|
|
67
|
+
}
|
|
68
|
+
export {};
|
package/lib/tokens/index.d.ts
CHANGED
|
@@ -2,3 +2,4 @@ import { InjectionToken } from '@angular/core';
|
|
|
2
2
|
import { BehaviorSubject } from 'rxjs';
|
|
3
3
|
export declare const MONKEY_I18N_WRAPPER: InjectionToken<BehaviorSubject<string>>;
|
|
4
4
|
export declare const MONKEY_POPOVER_OPTIONS: InjectionToken<unknown>;
|
|
5
|
+
export declare const MONKEY_COUNTRY_CODE: InjectionToken<string>;
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "monkey-style-guide-v2",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.23",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@angular/common": "^18.1.2",
|
|
6
6
|
"@angular/core": "^18.1.2",
|
|
@@ -10,7 +10,8 @@
|
|
|
10
10
|
"@angular/router": "^18.1.2",
|
|
11
11
|
"@angular/forms": "^18.1.2",
|
|
12
12
|
"rxjs": "~7.8.0",
|
|
13
|
-
"ngx-mask": "^19.0.6"
|
|
13
|
+
"ngx-mask": "^19.0.6",
|
|
14
|
+
"libphonenumber-js": "^1.12.9"
|
|
14
15
|
},
|
|
15
16
|
"dependencies": {
|
|
16
17
|
"date-fns": "^4.1.0",
|
|
Binary file
|