monkey-style-guide-v2 0.0.22 → 0.0.25

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 (36) hide show
  1. package/esm2022/lib/components/form-field/form-field.component.mjs +2 -2
  2. package/esm2022/lib/components/index.mjs +7 -1
  3. package/esm2022/lib/components/input-phone/index.mjs +7 -0
  4. package/esm2022/lib/components/input-phone/input-phone.component.mjs +324 -0
  5. package/esm2022/lib/components/modal/components/confirmation.component.mjs +6 -1
  6. package/esm2022/lib/components/modal/modal.component.mjs +2 -2
  7. package/esm2022/lib/directives/index.mjs +6 -1
  8. package/esm2022/lib/directives/popover.mjs +8 -3
  9. package/esm2022/lib/interfaces/alert.mjs +1 -1
  10. package/esm2022/lib/interfaces/breadcrumb.mjs +1 -1
  11. package/esm2022/lib/interfaces/button.mjs +1 -1
  12. package/esm2022/lib/interfaces/index.mjs +6 -1
  13. package/esm2022/lib/interfaces/popover.mjs +1 -1
  14. package/esm2022/lib/interfaces/sizes.mjs +1 -1
  15. package/esm2022/lib/interfaces/table.mjs +1 -1
  16. package/esm2022/lib/interfaces/toast.mjs +1 -1
  17. package/esm2022/lib/services/dictionary.service.mjs +3 -3
  18. package/esm2022/lib/tokens/index.mjs +9 -3
  19. package/fesm2022/monkey-style-guide-v2.mjs +1602 -1249
  20. package/fesm2022/monkey-style-guide-v2.mjs.map +1 -1
  21. package/lib/components/index.d.ts +6 -0
  22. package/lib/components/input-phone/index.d.ts +6 -0
  23. package/lib/components/input-phone/input-phone.component.d.ts +68 -0
  24. package/lib/directives/index.d.ts +5 -0
  25. package/lib/interfaces/alert.d.ts +5 -0
  26. package/lib/interfaces/breadcrumb.d.ts +5 -0
  27. package/lib/interfaces/button.d.ts +5 -0
  28. package/lib/interfaces/index.d.ts +5 -0
  29. package/lib/interfaces/popover.d.ts +5 -0
  30. package/lib/interfaces/sizes.d.ts +5 -0
  31. package/lib/interfaces/table.d.ts +5 -0
  32. package/lib/interfaces/toast.d.ts +5 -0
  33. package/lib/tokens/index.d.ts +8 -2
  34. package/monkey-style-guide-v2-0.0.25.tgz +0 -0
  35. package/package.json +3 -2
  36. package/monkey-style-guide-v2-0.0.22.tgz +0 -0
@@ -1,3 +1,8 @@
1
+ /** ************************
2
+ * Copyright Monkey Exchange. All Rights Reserved
3
+ * This style guide was developed by Monkey Exchange Team
4
+ * MIT Licence
5
+ ************************* */
1
6
  export * from './accordion';
2
7
  export * from './action-bar';
3
8
  export * from './alert';
@@ -13,6 +18,7 @@ export * from './icon';
13
18
  export * from './icon-button';
14
19
  export * from './input';
15
20
  export * from './input-code';
21
+ export * from './input-phone';
16
22
  export * from './input-upload';
17
23
  export * from './modal';
18
24
  export * from './option';
@@ -0,0 +1,6 @@
1
+ /** ************************
2
+ * Copyright Monkey Exchange. All Rights Reserved
3
+ * This style guide was developed by Monkey Exchange Team
4
+ * MIT Licence
5
+ ************************* */
6
+ export * from './input-phone.component';
@@ -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 {};
@@ -1,3 +1,8 @@
1
+ /** ************************
2
+ * Copyright Monkey Exchange. All Rights Reserved
3
+ * This style guide was developed by Monkey Exchange Team
4
+ * MIT Licence
5
+ ************************* */
1
6
  export * from './badge';
2
7
  export * from './error';
3
8
  export * from './helper';
@@ -1 +1,6 @@
1
+ /** ************************
2
+ * Copyright Monkey Exchange. All Rights Reserved
3
+ * This style guide was developed by Monkey Exchange Team
4
+ * MIT Licence
5
+ ************************* */
1
6
  export type MonkeyAlertType = 'default' | 'info' | 'success' | 'alert' | 'error';
@@ -1,3 +1,8 @@
1
+ /** ************************
2
+ * Copyright Monkey Exchange. All Rights Reserved
3
+ * This style guide was developed by Monkey Exchange Team
4
+ * MIT Licence
5
+ ************************* */
1
6
  export interface MonkeyBreadcrumb {
2
7
  label: string;
3
8
  path?: string;
@@ -1 +1,6 @@
1
+ /** ************************
2
+ * Copyright Monkey Exchange. All Rights Reserved
3
+ * This style guide was developed by Monkey Exchange Team
4
+ * MIT Licence
5
+ ************************* */
1
6
  export type MonkeyButtonType = 'primary' | 'secondary' | 'tertiary';
@@ -1,3 +1,8 @@
1
+ /** ************************
2
+ * Copyright Monkey Exchange. All Rights Reserved
3
+ * This style guide was developed by Monkey Exchange Team
4
+ * MIT Licence
5
+ ************************* */
1
6
  export * from './alert';
2
7
  export * from './breadcrumb';
3
8
  export * from './button';
@@ -1,3 +1,8 @@
1
+ /** ************************
2
+ * Copyright Monkey Exchange. All Rights Reserved
3
+ * This style guide was developed by Monkey Exchange Team
4
+ * MIT Licence
5
+ ************************* */
1
6
  export type MonkeyPopoverDir = 'rtl' | 'ltr' | 'trtl' | 'tltr' | 'ct' | 'cc' | 'cr' | 'rt' | 'rb' | 'lt' | 'lb';
2
7
  export interface MonkeyPopoverOptions {
3
8
  dir?: MonkeyPopoverDir;
@@ -1 +1,6 @@
1
+ /** ************************
2
+ * Copyright Monkey Exchange. All Rights Reserved
3
+ * This style guide was developed by Monkey Exchange Team
4
+ * MIT Licence
5
+ ************************* */
1
6
  export type MonkeySize = 'xs' | 'sm' | 'md' | 'lg';
@@ -1,3 +1,8 @@
1
+ /** ************************
2
+ * Copyright Monkey Exchange. All Rights Reserved
3
+ * This style guide was developed by Monkey Exchange Team
4
+ * MIT Licence
5
+ ************************* */
1
6
  export interface MonkeyTableScrollConfig {
2
7
  x?: string;
3
8
  y?: string;
@@ -1,3 +1,8 @@
1
+ /** ************************
2
+ * Copyright Monkey Exchange. All Rights Reserved
3
+ * This style guide was developed by Monkey Exchange Team
4
+ * MIT Licence
5
+ ************************* */
1
6
  import { ComponentRef } from '@angular/core';
2
7
  import { MonkeyToastComponent } from '../components';
3
8
  export declare class MonkeyToastRef {
@@ -1,4 +1,10 @@
1
+ /** ************************
2
+ * Copyright Monkey Exchange. All Rights Reserved
3
+ * This style guide was developed by Monkey Exchange Team
4
+ * MIT Licence
5
+ ************************* */
1
6
  import { InjectionToken } from '@angular/core';
2
7
  import { BehaviorSubject } from 'rxjs';
3
- export declare const MONKEY_I18N_WRAPPER: InjectionToken<BehaviorSubject<string>>;
4
- export declare const MONKEY_POPOVER_OPTIONS: InjectionToken<unknown>;
8
+ export declare const MECX_I18N_WRAPPER: InjectionToken<BehaviorSubject<string>>;
9
+ export declare const MECX_POPOVER_OPTIONS: InjectionToken<unknown>;
10
+ export declare const MECX_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.22",
3
+ "version": "0.0.25",
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