@nixweb/nixloc-ui 1.11.0 → 1.13.0
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
|
@@ -6,15 +6,16 @@
|
|
|
6
6
|
<Tip :field="field" :formName="formName" />
|
|
7
7
|
</label>
|
|
8
8
|
<div class="inner-addon right-addon">
|
|
9
|
-
<div class="required glyphicon" v-if="notifications.length > 0 && formDirty">
|
|
10
|
-
<i class="fas fa-exclamation-triangle"></i>
|
|
11
|
-
</div>
|
|
12
|
-
<slot v-else></slot>
|
|
13
9
|
<vue-numeric :style="_style" class="form-control" v-on:keyup.enter.native="pressedEnter"
|
|
14
10
|
:class="{ 'is-invalid': notifications.length > 0 && formDirty }" :placeholder="placeholder" :disabled="disabled"
|
|
15
11
|
currency="R$" separator="." :minus="allowNegative" v-bind:precision="precision" v-model="valueLocal">
|
|
16
12
|
</vue-numeric>
|
|
17
|
-
|
|
13
|
+
<span class="currency-icon" v-if="notifications.length == 0 || !formDirty">
|
|
14
|
+
<i class="fa-light fa-circle-dollar"></i>
|
|
15
|
+
</span>
|
|
16
|
+
<div class="required glyphicon" v-if="notifications.length > 0 && formDirty">
|
|
17
|
+
<i class="fas fa-exclamation-triangle"></i>
|
|
18
|
+
</div>
|
|
18
19
|
</div>
|
|
19
20
|
<div v-if="formDirty">
|
|
20
21
|
<div v-for="message in notifications" :key="message">
|
|
@@ -150,4 +151,16 @@ export default {
|
|
|
150
151
|
color: #f0134d;
|
|
151
152
|
font-size: 14px;
|
|
152
153
|
}
|
|
154
|
+
|
|
155
|
+
.currency-icon {
|
|
156
|
+
color: #5f5f5f;
|
|
157
|
+
font-size: 17px;
|
|
158
|
+
position: absolute;
|
|
159
|
+
right: 1px;
|
|
160
|
+
top: 50%;
|
|
161
|
+
transform: translateY(-50%);
|
|
162
|
+
background: #F3F4F6;
|
|
163
|
+
padding: 1px 12px;
|
|
164
|
+
border-radius: 0 4px 4px 0;
|
|
165
|
+
}
|
|
153
166
|
</style>
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
<div>
|
|
3
3
|
<b-row>
|
|
4
4
|
<b-col xs="12" sm="12" md="12" lg="3" xl="3">
|
|
5
|
-
<InputText title="CEP" field="zipCode" :formName="formName" :
|
|
6
|
-
:required="required" :markFormDirty="markFormDirty" v-model="address.zipCode">
|
|
5
|
+
<InputText title="CEP" field="zipCode" :formName="formName" :disabled="disabled" :mask="'#####-###'"
|
|
6
|
+
:maxLength="9" :required="required" :markFormDirty="markFormDirty" v-model="address.zipCode">
|
|
7
7
|
<div class="glyphicon margin-button">
|
|
8
8
|
<Button _key="searchZipCode" type="success" classIcon="fas fa-search" size="small"
|
|
9
9
|
:disabled="address.zipCode.length < 9" :clicked="searchZipCode" />
|
|
@@ -11,31 +11,33 @@
|
|
|
11
11
|
</InputText>
|
|
12
12
|
</b-col>
|
|
13
13
|
<b-col xs="12" sm="12" md="12" lg="5" xl="5">
|
|
14
|
-
<InputText title="Endereço" field="street" :formName="formName" :
|
|
15
|
-
:markFormDirty="markFormDirty" v-model="address.street" />
|
|
14
|
+
<InputText title="Endereço" field="street" :formName="formName" :disabled="disabled" :maxLength="150"
|
|
15
|
+
:required="required" :markFormDirty="markFormDirty" v-model="address.street" />
|
|
16
16
|
</b-col>
|
|
17
17
|
<b-col xs="12" sm="12" md="12" lg="2" xl="2">
|
|
18
|
-
<InputText title="Número" field="number" :formName="formName" :
|
|
19
|
-
v-model="address.number" />
|
|
18
|
+
<InputText title="Número" field="number" :formName="formName" :disabled="disabled" :maxLength="20"
|
|
19
|
+
:markFormDirty="markFormDirty" v-model="address.number" />
|
|
20
20
|
</b-col>
|
|
21
21
|
<b-col xs="12" sm="12" md="12" lg="2" xl="2">
|
|
22
|
-
<InputText title="Complemento" field="complement" :formName="formName" :maxLength="50"
|
|
22
|
+
<InputText title="Complemento" field="complement" :formName="formName" :disabled="disabled" :maxLength="50"
|
|
23
23
|
:markFormDirty="markFormDirty" v-model="address.complement" />
|
|
24
24
|
</b-col>
|
|
25
25
|
<br />
|
|
26
26
|
</b-row>
|
|
27
27
|
<b-row>
|
|
28
|
-
<b-col xs="12" sm="12" md="12" lg="5" xl="5">
|
|
29
|
-
<InputText title="Bairro" field="province" :formName="formName" :
|
|
30
|
-
:markFormDirty="markFormDirty" v-model="address.province" />
|
|
31
|
-
</b-col><b-col xs="12" sm="12" md="12" lg="5" xl="5">
|
|
32
|
-
<InputText title="Cidade" field="city" :formName="formName" :maxLength="100" :required="required"
|
|
33
|
-
:markFormDirty="markFormDirty" v-model="address.city" />
|
|
28
|
+
<b-col xs="12" sm="12" md="12" :lg="showCity ? '5' : '12'" :xl="showCity ? '5' : '12'">
|
|
29
|
+
<InputText title="Bairro" field="province" :formName="formName" :disabled="disabled" :maxLength="100"
|
|
30
|
+
:required="required" :markFormDirty="markFormDirty" v-model="address.province" />
|
|
34
31
|
</b-col>
|
|
35
|
-
<b-col xs="12" sm="12" md="12" lg="
|
|
36
|
-
<
|
|
37
|
-
:markFormDirty="markFormDirty" v-model="address.
|
|
38
|
-
</b-col
|
|
32
|
+
<b-col xs="12" sm="12" md="12" lg="5" xl="5" v-if="showCity">
|
|
33
|
+
<InputText title="Cidade" field="city" :formName="formName" :disabled="disabled" :maxLength="100"
|
|
34
|
+
:required="required" :markFormDirty="markFormDirty" v-model="address.city" />
|
|
35
|
+
</b-col>
|
|
36
|
+
<b-col xs="12" sm="12" md="12" lg="2" xl="2" v-if="showState">
|
|
37
|
+
<SelectStatic title="UF" :formName="formName" field="uf" fieldTarget="uf" :disabled="disabled"
|
|
38
|
+
:required="required" :markFormDirty="markFormDirty" v-model="address.state" :data="states" />
|
|
39
|
+
</b-col>
|
|
40
|
+
</b-row>
|
|
39
41
|
</div>
|
|
40
42
|
</template>
|
|
41
43
|
|
|
@@ -62,6 +64,18 @@ export default {
|
|
|
62
64
|
type: Boolean,
|
|
63
65
|
default: false,
|
|
64
66
|
},
|
|
67
|
+
disabled: {
|
|
68
|
+
type: Boolean,
|
|
69
|
+
default: false,
|
|
70
|
+
},
|
|
71
|
+
showCity: {
|
|
72
|
+
type: Boolean,
|
|
73
|
+
default: true,
|
|
74
|
+
},
|
|
75
|
+
showState: {
|
|
76
|
+
type: Boolean,
|
|
77
|
+
default: true,
|
|
78
|
+
},
|
|
65
79
|
value: Object,
|
|
66
80
|
},
|
|
67
81
|
components: { InputText, Button, SelectStatic },
|
|
@@ -51,6 +51,7 @@ import Button from "@nixweb/nixloc-ui/src/component/forms/Button";
|
|
|
51
51
|
import InputText from "@nixweb/nixloc-ui/src/component/forms/InputText";
|
|
52
52
|
import RadioGroup from "@nixweb/nixloc-ui/src/component/forms/RadioGroup";
|
|
53
53
|
import Person from "@nixweb/nixloc-ui/src/component/value-objects/Person.js";
|
|
54
|
+
import axios from "axios";
|
|
54
55
|
|
|
55
56
|
import { mapMutations } from "vuex";
|
|
56
57
|
|
|
@@ -93,7 +94,7 @@ export default {
|
|
|
93
94
|
]),
|
|
94
95
|
searchDocumentFederalRecipe() {
|
|
95
96
|
let url = `https://ws.hubdodesenvolvedor.com.br/v2/cnpj/?cnpj=${this.person.document}&token=94473735FzLqpNKajP170569464`;
|
|
96
|
-
|
|
97
|
+
axios.post(url, {}, {}).then((response) => {
|
|
97
98
|
if (response.data.return == "OK") {
|
|
98
99
|
this.addEvent({
|
|
99
100
|
name: "searchDocumentFederalRecipe",
|