mis-crystal-design-system 14.0.43 → 14.0.44
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/esm2020/phone-input/phone-input.component.mjs +13 -82
- package/fesm2015/mis-crystal-design-system-phone-input.mjs +10 -84
- package/fesm2015/mis-crystal-design-system-phone-input.mjs.map +1 -1
- package/fesm2020/mis-crystal-design-system-phone-input.mjs +10 -79
- package/fesm2020/mis-crystal-design-system-phone-input.mjs.map +1 -1
- package/package.json +1 -1
- package/phone-input/phone-input.component.d.ts +11 -25
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import { Component, EventEmitter, Input, Output } from
|
|
2
|
-
import { FormControl } from
|
|
3
|
-
import { PhoneNumberUtil } from 'google-libphonenumber';
|
|
4
|
-
import { getCountries, getCountryCallingCode } from 'libphonenumber-js';
|
|
1
|
+
import { Component, EventEmitter, Input, Output } from "@angular/core";
|
|
2
|
+
import { FormControl } from "@angular/forms";
|
|
5
3
|
import * as i0 from "@angular/core";
|
|
6
4
|
import * as i1 from "@angular/common";
|
|
7
5
|
import * as i2 from "@angular/forms";
|
|
@@ -9,90 +7,29 @@ import * as i3 from "mis-crystal-design-system/dropdown";
|
|
|
9
7
|
const _c0 = function (a0) { return { "height": a0 }; };
|
|
10
8
|
export class PhoneInputComponent {
|
|
11
9
|
constructor() {
|
|
12
|
-
this.dropdownHeight = '';
|
|
13
|
-
this.dropdownWidth = '';
|
|
14
10
|
this.dropdownData = [];
|
|
15
|
-
this.dropdownSelectedItem = { value:
|
|
11
|
+
this.dropdownSelectedItem = { value: "", label: "" };
|
|
16
12
|
this.inputPlaceholder = 'Enter';
|
|
17
13
|
this.inputFormControl = new FormControl();
|
|
18
14
|
this.onDropdownSelection = new EventEmitter();
|
|
19
|
-
this.
|
|
20
|
-
this.
|
|
21
|
-
this.
|
|
22
|
-
this.searchEnabled = true;
|
|
23
|
-
this.inputType = 'number';
|
|
24
|
-
this.searchLabel = 'Search Keyword';
|
|
25
|
-
this.defaultCountry = 'IN';
|
|
26
|
-
this.phoneValidator = true;
|
|
27
|
-
this.countryCodes = [{ label: '', value: '', countryCode: '' }];
|
|
28
|
-
this.selectedCountryName = '';
|
|
29
|
-
this.validationMessage = '';
|
|
30
|
-
this.phoneUtil = PhoneNumberUtil.getInstance();
|
|
15
|
+
this.searchEnabled = false;
|
|
16
|
+
this.inputType = "number";
|
|
17
|
+
this.searchLabel = "Search Keyword";
|
|
31
18
|
}
|
|
32
19
|
ngOnInit() {
|
|
33
|
-
if (this.phoneValidator) {
|
|
34
|
-
this.loadCountryCodes();
|
|
35
|
-
this.dropdownData = this.countryCodes;
|
|
36
|
-
const countryCodeToSelect = this.defaultCountry;
|
|
37
|
-
const def = this.countryCodes.find(item => item.countryCode === countryCodeToSelect);
|
|
38
|
-
if (def) {
|
|
39
|
-
this.dropdownSelectedItem = def;
|
|
40
|
-
this.selectedCountryName = def.label;
|
|
41
|
-
}
|
|
42
|
-
this.validatePhoneNumber(this.inputFormControl?.value, this.dropdownSelectedItem?.countryCode);
|
|
43
|
-
}
|
|
44
|
-
this.inputFormControl.valueChanges.subscribe((value) => {
|
|
45
|
-
this.validatePhoneNumber(value, this.dropdownSelectedItem?.countryCode);
|
|
46
|
-
});
|
|
47
20
|
}
|
|
48
21
|
handleDropdownSelection(item) {
|
|
49
|
-
this.
|
|
50
|
-
this.onDropdownSelection.emit(item.countryCode);
|
|
51
|
-
this.selectedCountryName = item.label;
|
|
52
|
-
this.validatePhoneNumber(this.inputFormControl?.value, this.dropdownSelectedItem?.countryCode);
|
|
53
|
-
this.inputFormControl.patchValue({ countryCode: item.countryCode }, { emitEvent: false });
|
|
54
|
-
}
|
|
55
|
-
loadCountryCodes() {
|
|
56
|
-
const countries = getCountries();
|
|
57
|
-
this.countryCodes = countries.map((countryCode) => ({
|
|
58
|
-
value: getCountryCallingCode(countryCode).toString(),
|
|
59
|
-
label: `${countryCode} (+${getCountryCallingCode(countryCode)})`,
|
|
60
|
-
countryCode: countryCode,
|
|
61
|
-
}));
|
|
62
|
-
}
|
|
63
|
-
validatePhoneNumber(value, countryCode) {
|
|
64
|
-
const phoneNumber = value?.phoneNumber || value;
|
|
65
|
-
if (phoneNumber && countryCode) {
|
|
66
|
-
try {
|
|
67
|
-
const number = this.phoneUtil.parseAndKeepRawInput(phoneNumber, countryCode);
|
|
68
|
-
const isValid = this.phoneUtil.isValidNumberForRegion(number, countryCode);
|
|
69
|
-
if (isValid) {
|
|
70
|
-
this.validationMessage = null;
|
|
71
|
-
this.onInvalidPhoneNumber.emit('');
|
|
72
|
-
}
|
|
73
|
-
else {
|
|
74
|
-
this.validationMessage = `Phone number invalid for country code: +${this.dropdownSelectedItem?.value}(${this.dropdownSelectedItem?.countryCode})`;
|
|
75
|
-
this.onInvalidPhoneNumber.emit(this.validationMessage);
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
catch (error) {
|
|
79
|
-
this.validationMessage = 'Invalid input';
|
|
80
|
-
this.onInvalidPhoneNumber.emit(this.validationMessage);
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
onBlur() {
|
|
85
|
-
this.validatePhoneNumber(this.inputFormControl?.value, this.dropdownSelectedItem?.countryCode);
|
|
22
|
+
this.onDropdownSelection.emit(item);
|
|
86
23
|
}
|
|
87
24
|
}
|
|
88
25
|
PhoneInputComponent.ɵfac = function PhoneInputComponent_Factory(t) { return new (t || PhoneInputComponent)(); };
|
|
89
|
-
PhoneInputComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: PhoneInputComponent, selectors: [["mis-phone-input"]], inputs: { dropdownHeight: "dropdownHeight", dropdownWidth: "dropdownWidth", inputHeight: "inputHeight", dropdownData: "dropdownData", dropdownSelectedItem: "dropdownSelectedItem", label: "label", inputPlaceholder: "inputPlaceholder", inputFormControl: "inputFormControl", dropdownListWidth: "dropdownListWidth", dropdownListHeight: "dropdownListHeight", searchEnabled: "searchEnabled", inputType: "inputType", searchLabel: "searchLabel"
|
|
26
|
+
PhoneInputComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: PhoneInputComponent, selectors: [["mis-phone-input"]], inputs: { dropdownHeight: "dropdownHeight", dropdownWidth: "dropdownWidth", inputHeight: "inputHeight", dropdownData: "dropdownData", dropdownSelectedItem: "dropdownSelectedItem", label: "label", inputPlaceholder: "inputPlaceholder", inputFormControl: "inputFormControl", dropdownListWidth: "dropdownListWidth", dropdownListHeight: "dropdownListHeight", searchEnabled: "searchEnabled", inputType: "inputType", searchLabel: "searchLabel" }, outputs: { onDropdownSelection: "onDropdownSelection" }, decls: 5, vars: 16, consts: [[1, "main-container-phone"], [3, "height", "dropdownListWidth", "dropdownListHeight", "width", "data", "selectedItem", "label", "searchEnabled", "multiLine", "searchLabel", "onChange"], [1, "details-field"], [1, "input-box"], [1, "black-text", 3, "ngStyle", "placeholder", "formControl", "type"]], template: function PhoneInputComponent_Template(rf, ctx) { if (rf & 1) {
|
|
90
27
|
i0.ɵɵelementStart(0, "div", 0)(1, "mis-dropdown", 1);
|
|
91
28
|
i0.ɵɵlistener("onChange", function PhoneInputComponent_Template_mis_dropdown_onChange_1_listener($event) { return ctx.handleDropdownSelection($event); });
|
|
92
29
|
i0.ɵɵelementEnd();
|
|
93
|
-
i0.ɵɵelementStart(2, "div", 2)(3, "div", 3)
|
|
94
|
-
i0.ɵɵ
|
|
95
|
-
i0.ɵɵelementEnd()()()
|
|
30
|
+
i0.ɵɵelementStart(2, "div", 2)(3, "div", 3);
|
|
31
|
+
i0.ɵɵelement(4, "input", 4);
|
|
32
|
+
i0.ɵɵelementEnd()()();
|
|
96
33
|
} if (rf & 2) {
|
|
97
34
|
i0.ɵɵadvance(1);
|
|
98
35
|
i0.ɵɵproperty("height", ctx.dropdownHeight)("dropdownListWidth", ctx.dropdownListWidth)("dropdownListHeight", ctx.dropdownListHeight)("width", ctx.dropdownWidth)("data", ctx.dropdownData)("selectedItem", ctx.dropdownSelectedItem)("label", ctx.label)("searchEnabled", ctx.searchEnabled)("multiLine", false)("searchLabel", ctx.searchLabel);
|
|
@@ -101,7 +38,7 @@ PhoneInputComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: PhoneIn
|
|
|
101
38
|
} }, dependencies: [i1.NgStyle, i2.DefaultValueAccessor, i2.NgControlStatus, i2.FormControlDirective, i3.DropdownComponent], styles: [".main-container-phone[_ngcontent-%COMP%]{display:flex;border:1px solid #E0E0E0;border-radius:6px}.details-field[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{display:inline-block;min-width:224px;margin-right:24px}.details-field[_ngcontent-%COMP%] .input-box[_ngcontent-%COMP%]{width:100%}.details-field[_ngcontent-%COMP%] .input-box[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{width:100%;height:32px}input[_ngcontent-%COMP%]{padding:10px 16px;border:none;outline:none;color:#181f33;line-height:24px;font-size:16px;width:100%;height:auto;border-radius:6px}.black-text[_ngcontent-%COMP%]{color:#181f33;font-size:16px;line-height:24px}input[_ngcontent-%COMP%]::-webkit-outer-spin-button, input[_ngcontent-%COMP%]::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.main-container-phone[_ngcontent-%COMP%] .item{padding:8px!important}.main-container-phone[_ngcontent-%COMP%] .dropdown{border:unset!important}"] });
|
|
102
39
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(PhoneInputComponent, [{
|
|
103
40
|
type: Component,
|
|
104
|
-
args: [{ selector: "mis-phone-input", template: "<div class=\"main-container-phone\">\n <mis-dropdown
|
|
41
|
+
args: [{ selector: "mis-phone-input", template: "<div class=\"main-container-phone\">\n <mis-dropdown [height]=\"dropdownHeight\" [dropdownListWidth]=\"dropdownListWidth\"[dropdownListHeight]=\"dropdownListHeight\" [width]=\"dropdownWidth\" [data]=\"dropdownData\" [selectedItem]=\"dropdownSelectedItem\" [label]=\"label\" [searchEnabled]=\"searchEnabled\" [multiLine]=\"false\" (onChange)=\"handleDropdownSelection($event)\" [searchLabel]=\"searchLabel\"></mis-dropdown>\n <div class=\"details-field\">\n <div class=\"input-box\">\n <input\n [ngStyle]=\"{'height': inputHeight }\"\n class=\"black-text\"\n [placeholder]=\"inputPlaceholder\"\n [formControl]=\"inputFormControl\" \n [type]=\"inputType\"\n />\n </div>\n </div>\n</div>\n", styles: [".main-container-phone{display:flex;border:1px solid #E0E0E0;border-radius:6px}.details-field label{display:inline-block;min-width:224px;margin-right:24px}.details-field .input-box{width:100%}.details-field .input-box input{width:100%;height:32px}input{padding:10px 16px;border:none;outline:none;color:#181f33;line-height:24px;font-size:16px;width:100%;height:auto;border-radius:6px}.black-text{color:#181f33;font-size:16px;line-height:24px}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.main-container-phone ::ng-deep .item{padding:8px!important}.main-container-phone ::ng-deep .dropdown{border:unset!important}\n"] }]
|
|
105
42
|
}], function () { return []; }, { dropdownHeight: [{
|
|
106
43
|
type: Input
|
|
107
44
|
}], dropdownWidth: [{
|
|
@@ -120,8 +57,6 @@ PhoneInputComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: PhoneIn
|
|
|
120
57
|
type: Input
|
|
121
58
|
}], onDropdownSelection: [{
|
|
122
59
|
type: Output
|
|
123
|
-
}], onInvalidPhoneNumber: [{
|
|
124
|
-
type: Output
|
|
125
60
|
}], dropdownListWidth: [{
|
|
126
61
|
type: Input
|
|
127
62
|
}], dropdownListHeight: [{
|
|
@@ -132,9 +67,5 @@ PhoneInputComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: PhoneIn
|
|
|
132
67
|
type: Input
|
|
133
68
|
}], searchLabel: [{
|
|
134
69
|
type: Input
|
|
135
|
-
}], defaultCountry: [{
|
|
136
|
-
type: Input
|
|
137
|
-
}], phoneValidator: [{
|
|
138
|
-
type: Input
|
|
139
70
|
}] }); })();
|
|
140
|
-
//# sourceMappingURL=data:application/json;base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IiBbbGFiZWxdPVwibGFiZWxcIiBbc2VhcmNoRW5hYmxlZF09XCJzZWFyY2hFbmFibGVkXCIgW211bHRpTGluZV09XCJmYWxzZVwiIChvbkNoYW5nZSk9XCJoYW5kbGVEcm9wZG93blNlbGVjdGlvbigkZXZlbnQpXCIgW3NlYXJjaExhYmVsXT1cInNlYXJjaExhYmVsXCI+PC9taXMtZHJvcGRvd24+XG4gIDxkaXYgY2xhc3M9XCJkZXRhaWxzLWZpZWxkXCI+XG4gICAgPGRpdiBjbGFzcz1cImlucHV0LWJveFwiPlxuICAgICAgPGlucHV0XG4gICAgICBbbmdTdHlsZV09XCJ7J2hlaWdodCc6IGlucHV0SGVpZ2h0IH1cIlxuICAgICAgICBjbGFzcz1cImJsYWNrLXRleHRcIlxuICAgICAgICBbcGxhY2Vob2xkZXJdPVwiaW5wdXRQbGFjZWhvbGRlclwiXG4gICAgICAgIFtmb3JtQ29udHJvbF09XCJpbnB1dEZvcm1Db250cm9sXCIgXG4gICAgICAgIFt0eXBlXT1cImlucHV0VHlwZVwiXG4gICAgICAvPlxuICAgIDwvZGl2PlxuICA8L2Rpdj5cbjwvZGl2PlxuIl19
|
|
@@ -2,8 +2,6 @@ import * as i0 from '@angular/core';
|
|
|
2
2
|
import { EventEmitter, Component, Input, Output, NgModule } from '@angular/core';
|
|
3
3
|
import * as i2 from '@angular/forms';
|
|
4
4
|
import { FormControl, ReactiveFormsModule, FormsModule } from '@angular/forms';
|
|
5
|
-
import { PhoneNumberUtil } from 'google-libphonenumber';
|
|
6
|
-
import { getCountries, getCountryCallingCode } from 'libphonenumber-js';
|
|
7
5
|
import * as i1 from '@angular/common';
|
|
8
6
|
import { CommonModule } from '@angular/common';
|
|
9
7
|
import * as i3 from 'mis-crystal-design-system/dropdown';
|
|
@@ -14,96 +12,30 @@ import { ScrollingModule } from '@angular/cdk-experimental/scrolling';
|
|
|
14
12
|
const _c0 = function (a0) { return { "height": a0 }; };
|
|
15
13
|
class PhoneInputComponent {
|
|
16
14
|
constructor() {
|
|
17
|
-
this.dropdownHeight = '';
|
|
18
|
-
this.dropdownWidth = '';
|
|
19
15
|
this.dropdownData = [];
|
|
20
|
-
this.dropdownSelectedItem = { value:
|
|
16
|
+
this.dropdownSelectedItem = { value: "", label: "" };
|
|
21
17
|
this.inputPlaceholder = 'Enter';
|
|
22
18
|
this.inputFormControl = new FormControl();
|
|
23
19
|
this.onDropdownSelection = new EventEmitter();
|
|
24
|
-
this.
|
|
25
|
-
this.
|
|
26
|
-
this.
|
|
27
|
-
this.searchEnabled = true;
|
|
28
|
-
this.inputType = 'number';
|
|
29
|
-
this.searchLabel = 'Search Keyword';
|
|
30
|
-
this.defaultCountry = 'IN';
|
|
31
|
-
this.phoneValidator = true;
|
|
32
|
-
this.countryCodes = [{ label: '', value: '', countryCode: '' }];
|
|
33
|
-
this.selectedCountryName = '';
|
|
34
|
-
this.validationMessage = '';
|
|
35
|
-
this.phoneUtil = PhoneNumberUtil.getInstance();
|
|
20
|
+
this.searchEnabled = false;
|
|
21
|
+
this.inputType = "number";
|
|
22
|
+
this.searchLabel = "Search Keyword";
|
|
36
23
|
}
|
|
37
24
|
ngOnInit() {
|
|
38
|
-
var _a, _b;
|
|
39
|
-
if (this.phoneValidator) {
|
|
40
|
-
this.loadCountryCodes();
|
|
41
|
-
this.dropdownData = this.countryCodes;
|
|
42
|
-
const countryCodeToSelect = this.defaultCountry;
|
|
43
|
-
const def = this.countryCodes.find(item => item.countryCode === countryCodeToSelect);
|
|
44
|
-
if (def) {
|
|
45
|
-
this.dropdownSelectedItem = def;
|
|
46
|
-
this.selectedCountryName = def.label;
|
|
47
|
-
}
|
|
48
|
-
this.validatePhoneNumber((_a = this.inputFormControl) === null || _a === void 0 ? void 0 : _a.value, (_b = this.dropdownSelectedItem) === null || _b === void 0 ? void 0 : _b.countryCode);
|
|
49
|
-
}
|
|
50
|
-
this.inputFormControl.valueChanges.subscribe((value) => {
|
|
51
|
-
var _a;
|
|
52
|
-
this.validatePhoneNumber(value, (_a = this.dropdownSelectedItem) === null || _a === void 0 ? void 0 : _a.countryCode);
|
|
53
|
-
});
|
|
54
25
|
}
|
|
55
26
|
handleDropdownSelection(item) {
|
|
56
|
-
|
|
57
|
-
this.dropdownSelectedItem = item;
|
|
58
|
-
this.onDropdownSelection.emit(item.countryCode);
|
|
59
|
-
this.selectedCountryName = item.label;
|
|
60
|
-
this.validatePhoneNumber((_a = this.inputFormControl) === null || _a === void 0 ? void 0 : _a.value, (_b = this.dropdownSelectedItem) === null || _b === void 0 ? void 0 : _b.countryCode);
|
|
61
|
-
this.inputFormControl.patchValue({ countryCode: item.countryCode }, { emitEvent: false });
|
|
62
|
-
}
|
|
63
|
-
loadCountryCodes() {
|
|
64
|
-
const countries = getCountries();
|
|
65
|
-
this.countryCodes = countries.map((countryCode) => ({
|
|
66
|
-
value: getCountryCallingCode(countryCode).toString(),
|
|
67
|
-
label: `${countryCode} (+${getCountryCallingCode(countryCode)})`,
|
|
68
|
-
countryCode: countryCode,
|
|
69
|
-
}));
|
|
70
|
-
}
|
|
71
|
-
validatePhoneNumber(value, countryCode) {
|
|
72
|
-
var _a, _b;
|
|
73
|
-
const phoneNumber = (value === null || value === void 0 ? void 0 : value.phoneNumber) || value;
|
|
74
|
-
if (phoneNumber && countryCode) {
|
|
75
|
-
try {
|
|
76
|
-
const number = this.phoneUtil.parseAndKeepRawInput(phoneNumber, countryCode);
|
|
77
|
-
const isValid = this.phoneUtil.isValidNumberForRegion(number, countryCode);
|
|
78
|
-
if (isValid) {
|
|
79
|
-
this.validationMessage = null;
|
|
80
|
-
this.onInvalidPhoneNumber.emit('');
|
|
81
|
-
}
|
|
82
|
-
else {
|
|
83
|
-
this.validationMessage = `Phone number invalid for country code: +${(_a = this.dropdownSelectedItem) === null || _a === void 0 ? void 0 : _a.value}(${(_b = this.dropdownSelectedItem) === null || _b === void 0 ? void 0 : _b.countryCode})`;
|
|
84
|
-
this.onInvalidPhoneNumber.emit(this.validationMessage);
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
catch (error) {
|
|
88
|
-
this.validationMessage = 'Invalid input';
|
|
89
|
-
this.onInvalidPhoneNumber.emit(this.validationMessage);
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
onBlur() {
|
|
94
|
-
var _a, _b;
|
|
95
|
-
this.validatePhoneNumber((_a = this.inputFormControl) === null || _a === void 0 ? void 0 : _a.value, (_b = this.dropdownSelectedItem) === null || _b === void 0 ? void 0 : _b.countryCode);
|
|
27
|
+
this.onDropdownSelection.emit(item);
|
|
96
28
|
}
|
|
97
29
|
}
|
|
98
30
|
PhoneInputComponent.ɵfac = function PhoneInputComponent_Factory(t) { return new (t || PhoneInputComponent)(); };
|
|
99
|
-
PhoneInputComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: PhoneInputComponent, selectors: [["mis-phone-input"]], inputs: { dropdownHeight: "dropdownHeight", dropdownWidth: "dropdownWidth", inputHeight: "inputHeight", dropdownData: "dropdownData", dropdownSelectedItem: "dropdownSelectedItem", label: "label", inputPlaceholder: "inputPlaceholder", inputFormControl: "inputFormControl", dropdownListWidth: "dropdownListWidth", dropdownListHeight: "dropdownListHeight", searchEnabled: "searchEnabled", inputType: "inputType", searchLabel: "searchLabel"
|
|
31
|
+
PhoneInputComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: PhoneInputComponent, selectors: [["mis-phone-input"]], inputs: { dropdownHeight: "dropdownHeight", dropdownWidth: "dropdownWidth", inputHeight: "inputHeight", dropdownData: "dropdownData", dropdownSelectedItem: "dropdownSelectedItem", label: "label", inputPlaceholder: "inputPlaceholder", inputFormControl: "inputFormControl", dropdownListWidth: "dropdownListWidth", dropdownListHeight: "dropdownListHeight", searchEnabled: "searchEnabled", inputType: "inputType", searchLabel: "searchLabel" }, outputs: { onDropdownSelection: "onDropdownSelection" }, decls: 5, vars: 16, consts: [[1, "main-container-phone"], [3, "height", "dropdownListWidth", "dropdownListHeight", "width", "data", "selectedItem", "label", "searchEnabled", "multiLine", "searchLabel", "onChange"], [1, "details-field"], [1, "input-box"], [1, "black-text", 3, "ngStyle", "placeholder", "formControl", "type"]], template: function PhoneInputComponent_Template(rf, ctx) {
|
|
100
32
|
if (rf & 1) {
|
|
101
33
|
i0.ɵɵelementStart(0, "div", 0)(1, "mis-dropdown", 1);
|
|
102
34
|
i0.ɵɵlistener("onChange", function PhoneInputComponent_Template_mis_dropdown_onChange_1_listener($event) { return ctx.handleDropdownSelection($event); });
|
|
103
35
|
i0.ɵɵelementEnd();
|
|
104
|
-
i0.ɵɵelementStart(2, "div", 2)(3, "div", 3)
|
|
105
|
-
i0.ɵɵ
|
|
106
|
-
i0.ɵɵelementEnd()()()
|
|
36
|
+
i0.ɵɵelementStart(2, "div", 2)(3, "div", 3);
|
|
37
|
+
i0.ɵɵelement(4, "input", 4);
|
|
38
|
+
i0.ɵɵelementEnd()()();
|
|
107
39
|
}
|
|
108
40
|
if (rf & 2) {
|
|
109
41
|
i0.ɵɵadvance(1);
|
|
@@ -115,7 +47,7 @@ PhoneInputComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: PhoneIn
|
|
|
115
47
|
(function () {
|
|
116
48
|
(typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(PhoneInputComponent, [{
|
|
117
49
|
type: Component,
|
|
118
|
-
args: [{ selector: "mis-phone-input", template: "<div class=\"main-container-phone\">\n <mis-dropdown
|
|
50
|
+
args: [{ selector: "mis-phone-input", template: "<div class=\"main-container-phone\">\n <mis-dropdown [height]=\"dropdownHeight\" [dropdownListWidth]=\"dropdownListWidth\"[dropdownListHeight]=\"dropdownListHeight\" [width]=\"dropdownWidth\" [data]=\"dropdownData\" [selectedItem]=\"dropdownSelectedItem\" [label]=\"label\" [searchEnabled]=\"searchEnabled\" [multiLine]=\"false\" (onChange)=\"handleDropdownSelection($event)\" [searchLabel]=\"searchLabel\"></mis-dropdown>\n <div class=\"details-field\">\n <div class=\"input-box\">\n <input\n [ngStyle]=\"{'height': inputHeight }\"\n class=\"black-text\"\n [placeholder]=\"inputPlaceholder\"\n [formControl]=\"inputFormControl\" \n [type]=\"inputType\"\n />\n </div>\n </div>\n</div>\n", styles: [".main-container-phone{display:flex;border:1px solid #E0E0E0;border-radius:6px}.details-field label{display:inline-block;min-width:224px;margin-right:24px}.details-field .input-box{width:100%}.details-field .input-box input{width:100%;height:32px}input{padding:10px 16px;border:none;outline:none;color:#181f33;line-height:24px;font-size:16px;width:100%;height:auto;border-radius:6px}.black-text{color:#181f33;font-size:16px;line-height:24px}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.main-container-phone ::ng-deep .item{padding:8px!important}.main-container-phone ::ng-deep .dropdown{border:unset!important}\n"] }]
|
|
119
51
|
}], function () { return []; }, { dropdownHeight: [{
|
|
120
52
|
type: Input
|
|
121
53
|
}], dropdownWidth: [{
|
|
@@ -134,8 +66,6 @@ PhoneInputComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: PhoneIn
|
|
|
134
66
|
type: Input
|
|
135
67
|
}], onDropdownSelection: [{
|
|
136
68
|
type: Output
|
|
137
|
-
}], onInvalidPhoneNumber: [{
|
|
138
|
-
type: Output
|
|
139
69
|
}], dropdownListWidth: [{
|
|
140
70
|
type: Input
|
|
141
71
|
}], dropdownListHeight: [{
|
|
@@ -146,10 +76,6 @@ PhoneInputComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: PhoneIn
|
|
|
146
76
|
type: Input
|
|
147
77
|
}], searchLabel: [{
|
|
148
78
|
type: Input
|
|
149
|
-
}], defaultCountry: [{
|
|
150
|
-
type: Input
|
|
151
|
-
}], phoneValidator: [{
|
|
152
|
-
type: Input
|
|
153
79
|
}] });
|
|
154
80
|
})();
|
|
155
81
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mis-crystal-design-system-phone-input.mjs","sources":["../../../projects/mis-components/phone-input/phone-input.component.ts","../../../projects/mis-components/phone-input/phone-input.component.html","../../../projects/mis-components/phone-input/phone-input.module.ts","../../../projects/mis-components/phone-input/mis-crystal-design-system-phone-input.ts"],"sourcesContent":["import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport { PhoneNumberUtil } from 'google-libphonenumber';\nimport { getCountries, getCountryCallingCode, CountryCode } from 'libphonenumber-js';\nimport { DropdownItem } from 'mis-crystal-design-system/dropdown';\n\ninterface CustomDropdownItem extends DropdownItem {\n countryCode: string;\n}\n\n@Component({\n selector: \"mis-phone-input\",\n templateUrl: \"./phone-input.component.html\",\n styleUrls: [\"./phone-input.component.scss\"]\n})\nexport class PhoneInputComponent implements OnInit {\n @Input() dropdownHeight?: string = '';\n @Input() dropdownWidth?: string = '';\n @Input() inputHeight?;\n @Input() dropdownData: CustomDropdownItem[] = [];\n @Input() dropdownSelectedItem: CustomDropdownItem = { value: '', label: '', countryCode: '' };\n @Input() label: string;\n @Input() inputPlaceholder: string = 'Enter';\n @Input() inputFormControl: FormControl = new FormControl();\n @Output() onDropdownSelection = new EventEmitter<string>();\n @Output() onInvalidPhoneNumber = new EventEmitter<string>();\n @Input() dropdownListWidth = '';\n @Input() dropdownListHeight = '';\n @Input() searchEnabled: boolean = true;\n @Input() inputType: string = 'number';\n @Input() searchLabel: string = 'Search Keyword';\n @Input() defaultCountry: string = 'IN';\n @Input() phoneValidator? = true;\n\n countryCodes: CustomDropdownItem[] = [{ label: '', value: '', countryCode: '' }];\n selectedCountryName: string = '';\n validationMessage: string = '';\n private phoneUtil: PhoneNumberUtil;\n\n constructor() {\n this.phoneUtil = PhoneNumberUtil.getInstance();\n }\n\n ngOnInit() {\n if (this.phoneValidator) {\n this.loadCountryCodes();\n this.dropdownData = this.countryCodes;\n const countryCodeToSelect = this.defaultCountry;\n const def = this.countryCodes.find(item => item.countryCode === countryCodeToSelect);\n if (def) {\n this.dropdownSelectedItem = def;\n this.selectedCountryName = def.label;\n }\n this.validatePhoneNumber(this.inputFormControl?.value, this.dropdownSelectedItem?.countryCode);\n }\n\n this.inputFormControl.valueChanges.subscribe((value) => {\n this.validatePhoneNumber(value, this.dropdownSelectedItem?.countryCode);\n });\n }\n\n handleDropdownSelection(item: CustomDropdownItem) {\n this.dropdownSelectedItem = item;\n this.onDropdownSelection.emit(item.countryCode);\n this.selectedCountryName = item.label;\n this.validatePhoneNumber(this.inputFormControl?.value, this.dropdownSelectedItem?.countryCode);\n this.inputFormControl.patchValue({ countryCode: item.countryCode }, { emitEvent: false });\n }\n\n loadCountryCodes() {\n const countries = getCountries();\n this.countryCodes = countries.map((countryCode) => ({\n value: getCountryCallingCode(countryCode).toString(),\n label: `${countryCode} (+${getCountryCallingCode(countryCode)})`,\n countryCode: countryCode,\n }));\n }\n\n public validatePhoneNumber(value: any, countryCode: string) {\n const phoneNumber = value?.phoneNumber || value;\n if (phoneNumber && countryCode) {\n try {\n const number = this.phoneUtil.parseAndKeepRawInput(phoneNumber, countryCode);\n const isValid = this.phoneUtil.isValidNumberForRegion(number, countryCode);\n if (isValid) {\n this.validationMessage = null;\n this.onInvalidPhoneNumber.emit('');\n } else {\n this.validationMessage = `Phone number invalid for country code: +${this.dropdownSelectedItem?.value}(${this.dropdownSelectedItem?.countryCode})`;\n this.onInvalidPhoneNumber.emit(this.validationMessage);\n }\n } catch (error) {\n this.validationMessage = 'Invalid input';\n this.onInvalidPhoneNumber.emit(this.validationMessage);\n }\n }\n }\n\n onBlur() {\n this.validatePhoneNumber(this.inputFormControl?.value, this.dropdownSelectedItem?.countryCode);\n }\n}\n","<div class=\"main-container-phone\">\n <mis-dropdown \n [height]=\"dropdownHeight\" \n [dropdownListWidth]=\"dropdownListWidth\"\n [dropdownListHeight]=\"dropdownListHeight\" \n [width]=\"dropdownWidth\" \n [data]=\"dropdownData\"\n [selectedItem]=\"dropdownSelectedItem\" \n [label]=\"label\" \n [searchEnabled]=\"searchEnabled\" \n [multiLine]=\"false\"\n (onChange)=\"handleDropdownSelection($event)\" \n [searchLabel]=\"searchLabel\">\n </mis-dropdown>\n <div class=\"details-field\">\n <div class=\"input-box\">\n <input\n [ngStyle]=\"{'height': inputHeight }\"\n class=\"black-text\" \n [placeholder]=\"inputPlaceholder\"\n [formControl]=\"inputFormControl\" \n [type]=\"inputType\"\n (blur)=\"onBlur()\"\n />\n </div>\n </div>\n</div>\n","import { CommonModule } from \"@angular/common\";\nimport { FormsModule } from \"@angular/forms\";\nimport { NgModule, ModuleWithProviders } from \"@angular/core\";\nimport { PhoneInputComponent } from \"./phone-input.component\";\nimport { OverlayModule } from \"@angular/cdk/overlay\";\nimport { ScrollingModule } from \"@angular/cdk-experimental/scrolling\";\nimport { DropdownModule } from \"mis-crystal-design-system/dropdown\";\nimport { ReactiveFormsModule } from \"@angular/forms\";\n\n\n@NgModule({\n declarations: [PhoneInputComponent],\n imports: [CommonModule,ReactiveFormsModule, FormsModule, OverlayModule, ScrollingModule, DropdownModule],\n exports: [PhoneInputComponent]\n})\nexport class PhoneInputModule {\n static forRoot(): ModuleWithProviders<PhoneInputModule> {\n return { ngModule: PhoneInputModule, providers: [] };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;MAea,mBAAmB,CAAA;AAwB9B,IAAA,WAAA,GAAA;AAvBS,QAAA,IAAc,CAAA,cAAA,GAAY,EAAE,CAAC;AAC7B,QAAA,IAAa,CAAA,aAAA,GAAY,EAAE,CAAC;AAE5B,QAAA,IAAY,CAAA,YAAA,GAAyB,EAAE,CAAC;AACxC,QAAA,IAAA,CAAA,oBAAoB,GAAuB,EAAE,KAAK,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,WAAW,EAAE,EAAE,EAAE,CAAC;AAErF,QAAA,IAAgB,CAAA,gBAAA,GAAW,OAAO,CAAC;AACnC,QAAA,IAAA,CAAA,gBAAgB,GAAgB,IAAI,WAAW,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../projects/mis-components/phone-input/phone-input.component.ts","../../../projects/mis-components/phone-input/phone-input.component.html","../../../projects/mis-components/phone-input/phone-input.module.ts","../../../projects/mis-components/phone-input/mis-crystal-design-system-phone-input.ts"],"sourcesContent":["import { Component, EventEmitter, Input, OnInit, Output } from \"@angular/core\";\nimport { FormControl } from \"@angular/forms\";\nimport { DropdownItem } from \"mis-crystal-design-system/dropdown\";\n\n@Component({\n selector: \"mis-phone-input\",\n templateUrl: \"./phone-input.component.html\",\n styleUrls: [\"./phone-input.component.scss\"]\n})\nexport class PhoneInputComponent implements OnInit {\n @Input() dropdownHeight?: string;\n @Input() dropdownWidth?: string;\n @Input() inputHeight?: string;\n @Input() dropdownData: DropdownItem[] = [];\n @Input() dropdownSelectedItem:DropdownItem = { value: \"\", label: \"\" } \n @Input() label: string;\n\n @Input() inputPlaceholder: string = 'Enter';\n @Input() inputFormControl: FormControl = new FormControl();\n\n @Output() onDropdownSelection = new EventEmitter<any>();\n @Input() dropdownListWidth;\n @Input() dropdownListHeight;\n @Input() searchEnabled:boolean=false;\n @Input() inputType: string = \"number\";\n @Input() searchLabel:string = \"Search Keyword\"\n \n constructor() {}\n ngOnInit() {\n }\n\n handleDropdownSelection(item: DropdownItem){\n this.onDropdownSelection.emit(item);\n }\n\n}\n","<div class=\"main-container-phone\">\n <mis-dropdown [height]=\"dropdownHeight\" [dropdownListWidth]=\"dropdownListWidth\"[dropdownListHeight]=\"dropdownListHeight\" [width]=\"dropdownWidth\" [data]=\"dropdownData\" [selectedItem]=\"dropdownSelectedItem\" [label]=\"label\" [searchEnabled]=\"searchEnabled\" [multiLine]=\"false\" (onChange)=\"handleDropdownSelection($event)\" [searchLabel]=\"searchLabel\"></mis-dropdown>\n <div class=\"details-field\">\n <div class=\"input-box\">\n <input\n [ngStyle]=\"{'height': inputHeight }\"\n class=\"black-text\"\n [placeholder]=\"inputPlaceholder\"\n [formControl]=\"inputFormControl\" \n [type]=\"inputType\"\n />\n </div>\n </div>\n</div>\n","import { CommonModule } from \"@angular/common\";\nimport { FormsModule } from \"@angular/forms\";\nimport { NgModule, ModuleWithProviders } from \"@angular/core\";\nimport { PhoneInputComponent } from \"./phone-input.component\";\nimport { OverlayModule } from \"@angular/cdk/overlay\";\nimport { ScrollingModule } from \"@angular/cdk-experimental/scrolling\";\nimport { DropdownModule } from \"mis-crystal-design-system/dropdown\";\nimport { ReactiveFormsModule } from \"@angular/forms\";\n\n\n@NgModule({\n declarations: [PhoneInputComponent],\n imports: [CommonModule,ReactiveFormsModule, FormsModule, OverlayModule, ScrollingModule, DropdownModule],\n exports: [PhoneInputComponent]\n})\nexport class PhoneInputModule {\n static forRoot(): ModuleWithProviders<PhoneInputModule> {\n return { ngModule: PhoneInputModule, providers: [] };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;MASa,mBAAmB,CAAA;AAkB9B,IAAA,WAAA,GAAA;AAdS,QAAA,IAAY,CAAA,YAAA,GAAmB,EAAE,CAAC;AAClC,QAAA,IAAoB,CAAA,oBAAA,GAAgB,EAAE,KAAK,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,CAAA;AAG5D,QAAA,IAAgB,CAAA,gBAAA,GAAW,OAAO,CAAC;AACnC,QAAA,IAAA,CAAA,gBAAgB,GAAgB,IAAI,WAAW,EAAE,CAAC;AAEjD,QAAA,IAAA,CAAA,mBAAmB,GAAG,IAAI,YAAY,EAAO,CAAC;AAG/C,QAAA,IAAa,CAAA,aAAA,GAAS,KAAK,CAAC;AAC5B,QAAA,IAAS,CAAA,SAAA,GAAW,QAAQ,CAAC;AAC7B,QAAA,IAAW,CAAA,WAAA,GAAU,gBAAgB,CAAA;KAE9B;IAChB,QAAQ,GAAA;KACP;AAED,IAAA,uBAAuB,CAAC,IAAkB,EAAA;AACxC,QAAA,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;KACrC;;sFAxBU,mBAAmB,GA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AAA,YAAY,EAAC,mBAAmB,EAAE,WAAW,EAAE,aAAa,EAAE,eAAe,EAAE,cAAc,aAC7F,mBAAmB,CAAA,EAAA,CAAA,CAAA,EAAA,GAAA;;ACb/B;;AAEG;;;;"}
|
|
@@ -2,8 +2,6 @@ import * as i0 from '@angular/core';
|
|
|
2
2
|
import { EventEmitter, Component, Input, Output, NgModule } from '@angular/core';
|
|
3
3
|
import * as i2 from '@angular/forms';
|
|
4
4
|
import { FormControl, ReactiveFormsModule, FormsModule } from '@angular/forms';
|
|
5
|
-
import { PhoneNumberUtil } from 'google-libphonenumber';
|
|
6
|
-
import { getCountries, getCountryCallingCode } from 'libphonenumber-js';
|
|
7
5
|
import * as i1 from '@angular/common';
|
|
8
6
|
import { CommonModule } from '@angular/common';
|
|
9
7
|
import * as i3 from 'mis-crystal-design-system/dropdown';
|
|
@@ -14,90 +12,29 @@ import { ScrollingModule } from '@angular/cdk-experimental/scrolling';
|
|
|
14
12
|
const _c0 = function (a0) { return { "height": a0 }; };
|
|
15
13
|
class PhoneInputComponent {
|
|
16
14
|
constructor() {
|
|
17
|
-
this.dropdownHeight = '';
|
|
18
|
-
this.dropdownWidth = '';
|
|
19
15
|
this.dropdownData = [];
|
|
20
|
-
this.dropdownSelectedItem = { value:
|
|
16
|
+
this.dropdownSelectedItem = { value: "", label: "" };
|
|
21
17
|
this.inputPlaceholder = 'Enter';
|
|
22
18
|
this.inputFormControl = new FormControl();
|
|
23
19
|
this.onDropdownSelection = new EventEmitter();
|
|
24
|
-
this.
|
|
25
|
-
this.
|
|
26
|
-
this.
|
|
27
|
-
this.searchEnabled = true;
|
|
28
|
-
this.inputType = 'number';
|
|
29
|
-
this.searchLabel = 'Search Keyword';
|
|
30
|
-
this.defaultCountry = 'IN';
|
|
31
|
-
this.phoneValidator = true;
|
|
32
|
-
this.countryCodes = [{ label: '', value: '', countryCode: '' }];
|
|
33
|
-
this.selectedCountryName = '';
|
|
34
|
-
this.validationMessage = '';
|
|
35
|
-
this.phoneUtil = PhoneNumberUtil.getInstance();
|
|
20
|
+
this.searchEnabled = false;
|
|
21
|
+
this.inputType = "number";
|
|
22
|
+
this.searchLabel = "Search Keyword";
|
|
36
23
|
}
|
|
37
24
|
ngOnInit() {
|
|
38
|
-
if (this.phoneValidator) {
|
|
39
|
-
this.loadCountryCodes();
|
|
40
|
-
this.dropdownData = this.countryCodes;
|
|
41
|
-
const countryCodeToSelect = this.defaultCountry;
|
|
42
|
-
const def = this.countryCodes.find(item => item.countryCode === countryCodeToSelect);
|
|
43
|
-
if (def) {
|
|
44
|
-
this.dropdownSelectedItem = def;
|
|
45
|
-
this.selectedCountryName = def.label;
|
|
46
|
-
}
|
|
47
|
-
this.validatePhoneNumber(this.inputFormControl?.value, this.dropdownSelectedItem?.countryCode);
|
|
48
|
-
}
|
|
49
|
-
this.inputFormControl.valueChanges.subscribe((value) => {
|
|
50
|
-
this.validatePhoneNumber(value, this.dropdownSelectedItem?.countryCode);
|
|
51
|
-
});
|
|
52
25
|
}
|
|
53
26
|
handleDropdownSelection(item) {
|
|
54
|
-
this.
|
|
55
|
-
this.onDropdownSelection.emit(item.countryCode);
|
|
56
|
-
this.selectedCountryName = item.label;
|
|
57
|
-
this.validatePhoneNumber(this.inputFormControl?.value, this.dropdownSelectedItem?.countryCode);
|
|
58
|
-
this.inputFormControl.patchValue({ countryCode: item.countryCode }, { emitEvent: false });
|
|
59
|
-
}
|
|
60
|
-
loadCountryCodes() {
|
|
61
|
-
const countries = getCountries();
|
|
62
|
-
this.countryCodes = countries.map((countryCode) => ({
|
|
63
|
-
value: getCountryCallingCode(countryCode).toString(),
|
|
64
|
-
label: `${countryCode} (+${getCountryCallingCode(countryCode)})`,
|
|
65
|
-
countryCode: countryCode,
|
|
66
|
-
}));
|
|
67
|
-
}
|
|
68
|
-
validatePhoneNumber(value, countryCode) {
|
|
69
|
-
const phoneNumber = value?.phoneNumber || value;
|
|
70
|
-
if (phoneNumber && countryCode) {
|
|
71
|
-
try {
|
|
72
|
-
const number = this.phoneUtil.parseAndKeepRawInput(phoneNumber, countryCode);
|
|
73
|
-
const isValid = this.phoneUtil.isValidNumberForRegion(number, countryCode);
|
|
74
|
-
if (isValid) {
|
|
75
|
-
this.validationMessage = null;
|
|
76
|
-
this.onInvalidPhoneNumber.emit('');
|
|
77
|
-
}
|
|
78
|
-
else {
|
|
79
|
-
this.validationMessage = `Phone number invalid for country code: +${this.dropdownSelectedItem?.value}(${this.dropdownSelectedItem?.countryCode})`;
|
|
80
|
-
this.onInvalidPhoneNumber.emit(this.validationMessage);
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
catch (error) {
|
|
84
|
-
this.validationMessage = 'Invalid input';
|
|
85
|
-
this.onInvalidPhoneNumber.emit(this.validationMessage);
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
onBlur() {
|
|
90
|
-
this.validatePhoneNumber(this.inputFormControl?.value, this.dropdownSelectedItem?.countryCode);
|
|
27
|
+
this.onDropdownSelection.emit(item);
|
|
91
28
|
}
|
|
92
29
|
}
|
|
93
30
|
PhoneInputComponent.ɵfac = function PhoneInputComponent_Factory(t) { return new (t || PhoneInputComponent)(); };
|
|
94
|
-
PhoneInputComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: PhoneInputComponent, selectors: [["mis-phone-input"]], inputs: { dropdownHeight: "dropdownHeight", dropdownWidth: "dropdownWidth", inputHeight: "inputHeight", dropdownData: "dropdownData", dropdownSelectedItem: "dropdownSelectedItem", label: "label", inputPlaceholder: "inputPlaceholder", inputFormControl: "inputFormControl", dropdownListWidth: "dropdownListWidth", dropdownListHeight: "dropdownListHeight", searchEnabled: "searchEnabled", inputType: "inputType", searchLabel: "searchLabel"
|
|
31
|
+
PhoneInputComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: PhoneInputComponent, selectors: [["mis-phone-input"]], inputs: { dropdownHeight: "dropdownHeight", dropdownWidth: "dropdownWidth", inputHeight: "inputHeight", dropdownData: "dropdownData", dropdownSelectedItem: "dropdownSelectedItem", label: "label", inputPlaceholder: "inputPlaceholder", inputFormControl: "inputFormControl", dropdownListWidth: "dropdownListWidth", dropdownListHeight: "dropdownListHeight", searchEnabled: "searchEnabled", inputType: "inputType", searchLabel: "searchLabel" }, outputs: { onDropdownSelection: "onDropdownSelection" }, decls: 5, vars: 16, consts: [[1, "main-container-phone"], [3, "height", "dropdownListWidth", "dropdownListHeight", "width", "data", "selectedItem", "label", "searchEnabled", "multiLine", "searchLabel", "onChange"], [1, "details-field"], [1, "input-box"], [1, "black-text", 3, "ngStyle", "placeholder", "formControl", "type"]], template: function PhoneInputComponent_Template(rf, ctx) { if (rf & 1) {
|
|
95
32
|
i0.ɵɵelementStart(0, "div", 0)(1, "mis-dropdown", 1);
|
|
96
33
|
i0.ɵɵlistener("onChange", function PhoneInputComponent_Template_mis_dropdown_onChange_1_listener($event) { return ctx.handleDropdownSelection($event); });
|
|
97
34
|
i0.ɵɵelementEnd();
|
|
98
|
-
i0.ɵɵelementStart(2, "div", 2)(3, "div", 3)
|
|
99
|
-
i0.ɵɵ
|
|
100
|
-
i0.ɵɵelementEnd()()()
|
|
35
|
+
i0.ɵɵelementStart(2, "div", 2)(3, "div", 3);
|
|
36
|
+
i0.ɵɵelement(4, "input", 4);
|
|
37
|
+
i0.ɵɵelementEnd()()();
|
|
101
38
|
} if (rf & 2) {
|
|
102
39
|
i0.ɵɵadvance(1);
|
|
103
40
|
i0.ɵɵproperty("height", ctx.dropdownHeight)("dropdownListWidth", ctx.dropdownListWidth)("dropdownListHeight", ctx.dropdownListHeight)("width", ctx.dropdownWidth)("data", ctx.dropdownData)("selectedItem", ctx.dropdownSelectedItem)("label", ctx.label)("searchEnabled", ctx.searchEnabled)("multiLine", false)("searchLabel", ctx.searchLabel);
|
|
@@ -106,7 +43,7 @@ PhoneInputComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: PhoneIn
|
|
|
106
43
|
} }, dependencies: [i1.NgStyle, i2.DefaultValueAccessor, i2.NgControlStatus, i2.FormControlDirective, i3.DropdownComponent], styles: [".main-container-phone[_ngcontent-%COMP%]{display:flex;border:1px solid #E0E0E0;border-radius:6px}.details-field[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{display:inline-block;min-width:224px;margin-right:24px}.details-field[_ngcontent-%COMP%] .input-box[_ngcontent-%COMP%]{width:100%}.details-field[_ngcontent-%COMP%] .input-box[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{width:100%;height:32px}input[_ngcontent-%COMP%]{padding:10px 16px;border:none;outline:none;color:#181f33;line-height:24px;font-size:16px;width:100%;height:auto;border-radius:6px}.black-text[_ngcontent-%COMP%]{color:#181f33;font-size:16px;line-height:24px}input[_ngcontent-%COMP%]::-webkit-outer-spin-button, input[_ngcontent-%COMP%]::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.main-container-phone[_ngcontent-%COMP%] .item{padding:8px!important}.main-container-phone[_ngcontent-%COMP%] .dropdown{border:unset!important}"] });
|
|
107
44
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(PhoneInputComponent, [{
|
|
108
45
|
type: Component,
|
|
109
|
-
args: [{ selector: "mis-phone-input", template: "<div class=\"main-container-phone\">\n <mis-dropdown
|
|
46
|
+
args: [{ selector: "mis-phone-input", template: "<div class=\"main-container-phone\">\n <mis-dropdown [height]=\"dropdownHeight\" [dropdownListWidth]=\"dropdownListWidth\"[dropdownListHeight]=\"dropdownListHeight\" [width]=\"dropdownWidth\" [data]=\"dropdownData\" [selectedItem]=\"dropdownSelectedItem\" [label]=\"label\" [searchEnabled]=\"searchEnabled\" [multiLine]=\"false\" (onChange)=\"handleDropdownSelection($event)\" [searchLabel]=\"searchLabel\"></mis-dropdown>\n <div class=\"details-field\">\n <div class=\"input-box\">\n <input\n [ngStyle]=\"{'height': inputHeight }\"\n class=\"black-text\"\n [placeholder]=\"inputPlaceholder\"\n [formControl]=\"inputFormControl\" \n [type]=\"inputType\"\n />\n </div>\n </div>\n</div>\n", styles: [".main-container-phone{display:flex;border:1px solid #E0E0E0;border-radius:6px}.details-field label{display:inline-block;min-width:224px;margin-right:24px}.details-field .input-box{width:100%}.details-field .input-box input{width:100%;height:32px}input{padding:10px 16px;border:none;outline:none;color:#181f33;line-height:24px;font-size:16px;width:100%;height:auto;border-radius:6px}.black-text{color:#181f33;font-size:16px;line-height:24px}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.main-container-phone ::ng-deep .item{padding:8px!important}.main-container-phone ::ng-deep .dropdown{border:unset!important}\n"] }]
|
|
110
47
|
}], function () { return []; }, { dropdownHeight: [{
|
|
111
48
|
type: Input
|
|
112
49
|
}], dropdownWidth: [{
|
|
@@ -125,8 +62,6 @@ PhoneInputComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: PhoneIn
|
|
|
125
62
|
type: Input
|
|
126
63
|
}], onDropdownSelection: [{
|
|
127
64
|
type: Output
|
|
128
|
-
}], onInvalidPhoneNumber: [{
|
|
129
|
-
type: Output
|
|
130
65
|
}], dropdownListWidth: [{
|
|
131
66
|
type: Input
|
|
132
67
|
}], dropdownListHeight: [{
|
|
@@ -137,10 +72,6 @@ PhoneInputComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: PhoneIn
|
|
|
137
72
|
type: Input
|
|
138
73
|
}], searchLabel: [{
|
|
139
74
|
type: Input
|
|
140
|
-
}], defaultCountry: [{
|
|
141
|
-
type: Input
|
|
142
|
-
}], phoneValidator: [{
|
|
143
|
-
type: Input
|
|
144
75
|
}] }); })();
|
|
145
76
|
|
|
146
77
|
class PhoneInputModule {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mis-crystal-design-system-phone-input.mjs","sources":["../../../projects/mis-components/phone-input/phone-input.component.ts","../../../projects/mis-components/phone-input/phone-input.component.html","../../../projects/mis-components/phone-input/phone-input.module.ts","../../../projects/mis-components/phone-input/mis-crystal-design-system-phone-input.ts"],"sourcesContent":["import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport { PhoneNumberUtil } from 'google-libphonenumber';\nimport { getCountries, getCountryCallingCode, CountryCode } from 'libphonenumber-js';\nimport { DropdownItem } from 'mis-crystal-design-system/dropdown';\n\ninterface CustomDropdownItem extends DropdownItem {\n countryCode: string;\n}\n\n@Component({\n selector: \"mis-phone-input\",\n templateUrl: \"./phone-input.component.html\",\n styleUrls: [\"./phone-input.component.scss\"]\n})\nexport class PhoneInputComponent implements OnInit {\n @Input() dropdownHeight?: string = '';\n @Input() dropdownWidth?: string = '';\n @Input() inputHeight?;\n @Input() dropdownData: CustomDropdownItem[] = [];\n @Input() dropdownSelectedItem: CustomDropdownItem = { value: '', label: '', countryCode: '' };\n @Input() label: string;\n @Input() inputPlaceholder: string = 'Enter';\n @Input() inputFormControl: FormControl = new FormControl();\n @Output() onDropdownSelection = new EventEmitter<string>();\n @Output() onInvalidPhoneNumber = new EventEmitter<string>();\n @Input() dropdownListWidth = '';\n @Input() dropdownListHeight = '';\n @Input() searchEnabled: boolean = true;\n @Input() inputType: string = 'number';\n @Input() searchLabel: string = 'Search Keyword';\n @Input() defaultCountry: string = 'IN';\n @Input() phoneValidator? = true;\n\n countryCodes: CustomDropdownItem[] = [{ label: '', value: '', countryCode: '' }];\n selectedCountryName: string = '';\n validationMessage: string = '';\n private phoneUtil: PhoneNumberUtil;\n\n constructor() {\n this.phoneUtil = PhoneNumberUtil.getInstance();\n }\n\n ngOnInit() {\n if (this.phoneValidator) {\n this.loadCountryCodes();\n this.dropdownData = this.countryCodes;\n const countryCodeToSelect = this.defaultCountry;\n const def = this.countryCodes.find(item => item.countryCode === countryCodeToSelect);\n if (def) {\n this.dropdownSelectedItem = def;\n this.selectedCountryName = def.label;\n }\n this.validatePhoneNumber(this.inputFormControl?.value, this.dropdownSelectedItem?.countryCode);\n }\n\n this.inputFormControl.valueChanges.subscribe((value) => {\n this.validatePhoneNumber(value, this.dropdownSelectedItem?.countryCode);\n });\n }\n\n handleDropdownSelection(item: CustomDropdownItem) {\n this.dropdownSelectedItem = item;\n this.onDropdownSelection.emit(item.countryCode);\n this.selectedCountryName = item.label;\n this.validatePhoneNumber(this.inputFormControl?.value, this.dropdownSelectedItem?.countryCode);\n this.inputFormControl.patchValue({ countryCode: item.countryCode }, { emitEvent: false });\n }\n\n loadCountryCodes() {\n const countries = getCountries();\n this.countryCodes = countries.map((countryCode) => ({\n value: getCountryCallingCode(countryCode).toString(),\n label: `${countryCode} (+${getCountryCallingCode(countryCode)})`,\n countryCode: countryCode,\n }));\n }\n\n public validatePhoneNumber(value: any, countryCode: string) {\n const phoneNumber = value?.phoneNumber || value;\n if (phoneNumber && countryCode) {\n try {\n const number = this.phoneUtil.parseAndKeepRawInput(phoneNumber, countryCode);\n const isValid = this.phoneUtil.isValidNumberForRegion(number, countryCode);\n if (isValid) {\n this.validationMessage = null;\n this.onInvalidPhoneNumber.emit('');\n } else {\n this.validationMessage = `Phone number invalid for country code: +${this.dropdownSelectedItem?.value}(${this.dropdownSelectedItem?.countryCode})`;\n this.onInvalidPhoneNumber.emit(this.validationMessage);\n }\n } catch (error) {\n this.validationMessage = 'Invalid input';\n this.onInvalidPhoneNumber.emit(this.validationMessage);\n }\n }\n }\n\n onBlur() {\n this.validatePhoneNumber(this.inputFormControl?.value, this.dropdownSelectedItem?.countryCode);\n }\n}\n","<div class=\"main-container-phone\">\n <mis-dropdown \n [height]=\"dropdownHeight\" \n [dropdownListWidth]=\"dropdownListWidth\"\n [dropdownListHeight]=\"dropdownListHeight\" \n [width]=\"dropdownWidth\" \n [data]=\"dropdownData\"\n [selectedItem]=\"dropdownSelectedItem\" \n [label]=\"label\" \n [searchEnabled]=\"searchEnabled\" \n [multiLine]=\"false\"\n (onChange)=\"handleDropdownSelection($event)\" \n [searchLabel]=\"searchLabel\">\n </mis-dropdown>\n <div class=\"details-field\">\n <div class=\"input-box\">\n <input\n [ngStyle]=\"{'height': inputHeight }\"\n class=\"black-text\" \n [placeholder]=\"inputPlaceholder\"\n [formControl]=\"inputFormControl\" \n [type]=\"inputType\"\n (blur)=\"onBlur()\"\n />\n </div>\n </div>\n</div>\n","import { CommonModule } from \"@angular/common\";\nimport { FormsModule } from \"@angular/forms\";\nimport { NgModule, ModuleWithProviders } from \"@angular/core\";\nimport { PhoneInputComponent } from \"./phone-input.component\";\nimport { OverlayModule } from \"@angular/cdk/overlay\";\nimport { ScrollingModule } from \"@angular/cdk-experimental/scrolling\";\nimport { DropdownModule } from \"mis-crystal-design-system/dropdown\";\nimport { ReactiveFormsModule } from \"@angular/forms\";\n\n\n@NgModule({\n declarations: [PhoneInputComponent],\n imports: [CommonModule,ReactiveFormsModule, FormsModule, OverlayModule, ScrollingModule, DropdownModule],\n exports: [PhoneInputComponent]\n})\nexport class PhoneInputModule {\n static forRoot(): ModuleWithProviders<PhoneInputModule> {\n return { ngModule: PhoneInputModule, providers: [] };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;MAea,mBAAmB,CAAA;AAwB9B,IAAA,WAAA,GAAA;QAvBS,IAAc,CAAA,cAAA,GAAY,EAAE,CAAC;QAC7B,IAAa,CAAA,aAAA,GAAY,EAAE,CAAC;QAE5B,IAAY,CAAA,YAAA,GAAyB,EAAE,CAAC;AACxC,QAAA,IAAA,CAAA,oBAAoB,GAAuB,EAAE,KAAK,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,WAAW,EAAE,EAAE,EAAE,CAAC;QAErF,IAAgB,CAAA,gBAAA,GAAW,OAAO,CAAC;AACnC,QAAA,IAAA,CAAA,gBAAgB,GAAgB,IAAI,WAAW,EAAE,CAAC;AACjD,QAAA,IAAA,CAAA,mBAAmB,GAAG,IAAI,YAAY,EAAU,CAAC;AACjD,QAAA,IAAA,CAAA,oBAAoB,GAAG,IAAI,YAA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AAW,EAAE,aAAa,EAAE,eAAe,EAAE,cAAc,aAC7F,mBAAmB,CAAA,EAAA,CAAA,CAAA,EAAA,GAAA;;ACb/B;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"mis-crystal-design-system-phone-input.mjs","sources":["../../../projects/mis-components/phone-input/phone-input.component.ts","../../../projects/mis-components/phone-input/phone-input.component.html","../../../projects/mis-components/phone-input/phone-input.module.ts","../../../projects/mis-components/phone-input/mis-crystal-design-system-phone-input.ts"],"sourcesContent":["import { Component, EventEmitter, Input, OnInit, Output } from \"@angular/core\";\nimport { FormControl } from \"@angular/forms\";\nimport { DropdownItem } from \"mis-crystal-design-system/dropdown\";\n\n@Component({\n selector: \"mis-phone-input\",\n templateUrl: \"./phone-input.component.html\",\n styleUrls: [\"./phone-input.component.scss\"]\n})\nexport class PhoneInputComponent implements OnInit {\n @Input() dropdownHeight?: string;\n @Input() dropdownWidth?: string;\n @Input() inputHeight?: string;\n @Input() dropdownData: DropdownItem[] = [];\n @Input() dropdownSelectedItem:DropdownItem = { value: \"\", label: \"\" } \n @Input() label: string;\n\n @Input() inputPlaceholder: string = 'Enter';\n @Input() inputFormControl: FormControl = new FormControl();\n\n @Output() onDropdownSelection = new EventEmitter<any>();\n @Input() dropdownListWidth;\n @Input() dropdownListHeight;\n @Input() searchEnabled:boolean=false;\n @Input() inputType: string = \"number\";\n @Input() searchLabel:string = \"Search Keyword\"\n \n constructor() {}\n ngOnInit() {\n }\n\n handleDropdownSelection(item: DropdownItem){\n this.onDropdownSelection.emit(item);\n }\n\n}\n","<div class=\"main-container-phone\">\n <mis-dropdown [height]=\"dropdownHeight\" [dropdownListWidth]=\"dropdownListWidth\"[dropdownListHeight]=\"dropdownListHeight\" [width]=\"dropdownWidth\" [data]=\"dropdownData\" [selectedItem]=\"dropdownSelectedItem\" [label]=\"label\" [searchEnabled]=\"searchEnabled\" [multiLine]=\"false\" (onChange)=\"handleDropdownSelection($event)\" [searchLabel]=\"searchLabel\"></mis-dropdown>\n <div class=\"details-field\">\n <div class=\"input-box\">\n <input\n [ngStyle]=\"{'height': inputHeight }\"\n class=\"black-text\"\n [placeholder]=\"inputPlaceholder\"\n [formControl]=\"inputFormControl\" \n [type]=\"inputType\"\n />\n </div>\n </div>\n</div>\n","import { CommonModule } from \"@angular/common\";\nimport { FormsModule } from \"@angular/forms\";\nimport { NgModule, ModuleWithProviders } from \"@angular/core\";\nimport { PhoneInputComponent } from \"./phone-input.component\";\nimport { OverlayModule } from \"@angular/cdk/overlay\";\nimport { ScrollingModule } from \"@angular/cdk-experimental/scrolling\";\nimport { DropdownModule } from \"mis-crystal-design-system/dropdown\";\nimport { ReactiveFormsModule } from \"@angular/forms\";\n\n\n@NgModule({\n declarations: [PhoneInputComponent],\n imports: [CommonModule,ReactiveFormsModule, FormsModule, OverlayModule, ScrollingModule, DropdownModule],\n exports: [PhoneInputComponent]\n})\nexport class PhoneInputModule {\n static forRoot(): ModuleWithProviders<PhoneInputModule> {\n return { ngModule: PhoneInputModule, providers: [] };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;MASa,mBAAmB,CAAA;AAkB9B,IAAA,WAAA,GAAA;QAdS,IAAY,CAAA,YAAA,GAAmB,EAAE,CAAC;QAClC,IAAoB,CAAA,oBAAA,GAAgB,EAAE,KAAK,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,CAAA;QAG5D,IAAgB,CAAA,gBAAA,GAAW,OAAO,CAAC;AACnC,QAAA,IAAA,CAAA,gBAAgB,GAAgB,IAAI,WAAW,EAAE,CAAC;AAEjD,QAAA,IAAA,CAAA,mBAAmB,GAAG,IAAI,YAAY,EAAO,CAAC;QAG/C,IAAa,CAAA,aAAA,GAAS,KAAK,CAAC;QAC5B,IAAS,CAAA,SAAA,GAAW,QAAQ,CAAC;QAC7B,IAAW,CAAA,WAAA,GAAU,gBAAgB,CAAA;KAE9B;IAChB,QAAQ,GAAA;KACP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AA,CAAA,kBAAA,CAAA,gBAAgB,EAJZ,EAAA,YAAA,EAAA,CAAA,mBAAmB,CACxB,EAAA,OAAA,EAAA,CAAA,YAAY,EAAC,mBAAmB,EAAE,WAAW,EAAE,aAAa,EAAE,eAAe,EAAE,cAAc,aAC7F,mBAAmB,CAAA,EAAA,CAAA,CAAA,EAAA,GAAA;;ACb/B;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -1,39 +1,25 @@
|
|
|
1
|
-
import { EventEmitter, OnInit } from
|
|
2
|
-
import { FormControl } from
|
|
3
|
-
import { DropdownItem } from
|
|
1
|
+
import { EventEmitter, OnInit } from "@angular/core";
|
|
2
|
+
import { FormControl } from "@angular/forms";
|
|
3
|
+
import { DropdownItem } from "mis-crystal-design-system/dropdown";
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
|
-
interface CustomDropdownItem extends DropdownItem {
|
|
6
|
-
countryCode: string;
|
|
7
|
-
}
|
|
8
5
|
export declare class PhoneInputComponent implements OnInit {
|
|
9
6
|
dropdownHeight?: string;
|
|
10
7
|
dropdownWidth?: string;
|
|
11
|
-
inputHeight?:
|
|
12
|
-
dropdownData:
|
|
13
|
-
dropdownSelectedItem:
|
|
8
|
+
inputHeight?: string;
|
|
9
|
+
dropdownData: DropdownItem[];
|
|
10
|
+
dropdownSelectedItem: DropdownItem;
|
|
14
11
|
label: string;
|
|
15
12
|
inputPlaceholder: string;
|
|
16
13
|
inputFormControl: FormControl;
|
|
17
|
-
onDropdownSelection: EventEmitter<
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
dropdownListHeight: string;
|
|
14
|
+
onDropdownSelection: EventEmitter<any>;
|
|
15
|
+
dropdownListWidth: any;
|
|
16
|
+
dropdownListHeight: any;
|
|
21
17
|
searchEnabled: boolean;
|
|
22
18
|
inputType: string;
|
|
23
19
|
searchLabel: string;
|
|
24
|
-
defaultCountry: string;
|
|
25
|
-
phoneValidator?: boolean;
|
|
26
|
-
countryCodes: CustomDropdownItem[];
|
|
27
|
-
selectedCountryName: string;
|
|
28
|
-
validationMessage: string;
|
|
29
|
-
private phoneUtil;
|
|
30
20
|
constructor();
|
|
31
21
|
ngOnInit(): void;
|
|
32
|
-
handleDropdownSelection(item:
|
|
33
|
-
loadCountryCodes(): void;
|
|
34
|
-
validatePhoneNumber(value: any, countryCode: string): void;
|
|
35
|
-
onBlur(): void;
|
|
22
|
+
handleDropdownSelection(item: DropdownItem): void;
|
|
36
23
|
static ɵfac: i0.ɵɵFactoryDeclaration<PhoneInputComponent, never>;
|
|
37
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<PhoneInputComponent, "mis-phone-input", never, { "dropdownHeight": "dropdownHeight"; "dropdownWidth": "dropdownWidth"; "inputHeight": "inputHeight"; "dropdownData": "dropdownData"; "dropdownSelectedItem": "dropdownSelectedItem"; "label": "label"; "inputPlaceholder": "inputPlaceholder"; "inputFormControl": "inputFormControl"; "dropdownListWidth": "dropdownListWidth"; "dropdownListHeight": "dropdownListHeight"; "searchEnabled": "searchEnabled"; "inputType": "inputType"; "searchLabel": "searchLabel";
|
|
24
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PhoneInputComponent, "mis-phone-input", never, { "dropdownHeight": "dropdownHeight"; "dropdownWidth": "dropdownWidth"; "inputHeight": "inputHeight"; "dropdownData": "dropdownData"; "dropdownSelectedItem": "dropdownSelectedItem"; "label": "label"; "inputPlaceholder": "inputPlaceholder"; "inputFormControl": "inputFormControl"; "dropdownListWidth": "dropdownListWidth"; "dropdownListHeight": "dropdownListHeight"; "searchEnabled": "searchEnabled"; "inputType": "inputType"; "searchLabel": "searchLabel"; }, { "onDropdownSelection": "onDropdownSelection"; }, never, never, false>;
|
|
38
25
|
}
|
|
39
|
-
export {};
|