@kigi/components 1.17.1-beta.2 → 1.17.1-beta.3
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/package.json
CHANGED
|
@@ -38,16 +38,15 @@ class MbgAddressManualController {
|
|
|
38
38
|
public EX,
|
|
39
39
|
public notFound,
|
|
40
40
|
public address,
|
|
41
|
-
) {
|
|
41
|
+
) {}
|
|
42
42
|
|
|
43
|
-
|
|
43
|
+
$onInit() {
|
|
44
44
|
this.navigatorData = detect()
|
|
45
45
|
this.createAutocompleteDisabled()
|
|
46
|
-
|
|
46
|
+
this.loadStates()
|
|
47
47
|
this.loadCountries()
|
|
48
48
|
if (this.address) {
|
|
49
49
|
this.entity = this.address
|
|
50
|
-
this.searchAddressByCEP()
|
|
51
50
|
}
|
|
52
51
|
}
|
|
53
52
|
|
|
@@ -117,9 +116,9 @@ class MbgAddressManualController {
|
|
|
117
116
|
this.entity = {
|
|
118
117
|
zipCode: this.entity.zipCode.replace('-', ''),
|
|
119
118
|
neighbourhood: response.data.bairro ? response.data.bairro.trim() : 'Centro',
|
|
120
|
-
localization:
|
|
121
|
-
?
|
|
122
|
-
:
|
|
119
|
+
localization: this.entity.localization
|
|
120
|
+
? this.entity.localization
|
|
121
|
+
: (response.data.localidade || '').trim(),
|
|
123
122
|
premisse: premisse || 'CEP Único',
|
|
124
123
|
number: this.entity.number || '',
|
|
125
124
|
information: this.entity.information || '',
|
|
@@ -149,9 +148,8 @@ class MbgAddressManualController {
|
|
|
149
148
|
)
|
|
150
149
|
}
|
|
151
150
|
|
|
152
|
-
|
|
153
151
|
loadStates = () => {
|
|
154
|
-
|
|
152
|
+
this.$http.get(`https://servicodados.ibge.gov.br/api/v1/localidades/estados`).then((resp) => {
|
|
155
153
|
this.states = resp.data.map((city) => {
|
|
156
154
|
return {
|
|
157
155
|
id: city.id,
|
|
@@ -56,7 +56,7 @@ class MbgSelectController {
|
|
|
56
56
|
public $timeout,
|
|
57
57
|
public $compile,
|
|
58
58
|
public $transclude,
|
|
59
|
-
) {
|
|
59
|
+
) {}
|
|
60
60
|
|
|
61
61
|
$onInit() {
|
|
62
62
|
this.fixedValue = this.ngValue || 'id'
|
|
@@ -409,8 +409,7 @@ class MbgSelectController {
|
|
|
409
409
|
item = isNaN(this.inputValue) ? this.inputValue : Number(this.inputValue)
|
|
410
410
|
}
|
|
411
411
|
}
|
|
412
|
-
this.
|
|
413
|
-
return
|
|
412
|
+
await this.updateModelValue(this.ngValue ? item[this.ngValue] : item)
|
|
414
413
|
}
|
|
415
414
|
} else {
|
|
416
415
|
await this.updateModelValue(this.inputValue)
|
|
@@ -459,7 +458,6 @@ class MbgSelectController {
|
|
|
459
458
|
value &&
|
|
460
459
|
(!angular.equals(value, this.ngModel) || !angular.equals(value, this.inputValue))
|
|
461
460
|
) {
|
|
462
|
-
this.inputValue = ''
|
|
463
461
|
this.updateInputValue()
|
|
464
462
|
}
|
|
465
463
|
}
|