@kigi/components 1.17.0-beta.3 → 1.17.1-beta.1
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,12 +38,12 @@ 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
|
|
@@ -116,9 +116,9 @@ class MbgAddressManualController {
|
|
|
116
116
|
this.entity = {
|
|
117
117
|
zipCode: this.entity.zipCode.replace('-', ''),
|
|
118
118
|
neighbourhood: response.data.bairro ? response.data.bairro.trim() : 'Centro',
|
|
119
|
-
localization:
|
|
120
|
-
?
|
|
121
|
-
:
|
|
119
|
+
localization: this.entity.localization
|
|
120
|
+
? this.entity.localization
|
|
121
|
+
: (response.data.localidade || '').trim(),
|
|
122
122
|
premisse: premisse || 'CEP Único',
|
|
123
123
|
number: this.entity.number || '',
|
|
124
124
|
information: this.entity.information || '',
|
|
@@ -148,9 +148,8 @@ class MbgAddressManualController {
|
|
|
148
148
|
)
|
|
149
149
|
}
|
|
150
150
|
|
|
151
|
-
|
|
152
151
|
loadStates = () => {
|
|
153
|
-
|
|
152
|
+
this.$http.get(`https://servicodados.ibge.gov.br/api/v1/localidades/estados`).then((resp) => {
|
|
154
153
|
this.states = resp.data.map((city) => {
|
|
155
154
|
return {
|
|
156
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
|
}
|