@nixweb/nixloc-ui 1.10.0 → 1.12.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/@nixweb/nixloc-ui/package.json +88 -88
- package/@nixweb/nixloc-ui/src/App.vue +13 -13
- package/@nixweb/nixloc-ui/src/component/forms/Button.vue +163 -163
- package/@nixweb/nixloc-ui/src/component/forms/CheckboxGroup.vue +69 -69
- package/@nixweb/nixloc-ui/src/component/forms/CheckboxServer.vue +192 -192
- package/@nixweb/nixloc-ui/src/component/forms/CheckboxSimple.vue +60 -60
- package/@nixweb/nixloc-ui/src/component/forms/Color.vue +38 -38
- package/@nixweb/nixloc-ui/src/component/forms/DateTime.vue +170 -170
- package/@nixweb/nixloc-ui/src/component/forms/Dropdown.vue +236 -236
- package/@nixweb/nixloc-ui/src/component/forms/EditorHtml.vue +132 -132
- package/@nixweb/nixloc-ui/src/component/forms/FileUpload.vue +170 -170
- package/@nixweb/nixloc-ui/src/component/forms/InputDecimal.vue +153 -153
- package/@nixweb/nixloc-ui/src/component/forms/InputNumber.vue +160 -160
- package/@nixweb/nixloc-ui/src/component/forms/InputPassword.vue +148 -148
- package/@nixweb/nixloc-ui/src/component/forms/InputText.vue +174 -174
- package/@nixweb/nixloc-ui/src/component/forms/Modal.vue +57 -57
- package/@nixweb/nixloc-ui/src/component/forms/RadioGroup.vue +91 -91
- package/@nixweb/nixloc-ui/src/component/forms/Select.vue +378 -378
- package/@nixweb/nixloc-ui/src/component/forms/SelectStatic.vue +198 -198
- package/@nixweb/nixloc-ui/src/component/forms/Slider.vue +18 -18
- package/@nixweb/nixloc-ui/src/component/forms/TextArea.vue +138 -138
- package/@nixweb/nixloc-ui/src/component/layout/Alert.vue +88 -88
- package/@nixweb/nixloc-ui/src/component/layout/Badge.vue +111 -111
- package/@nixweb/nixloc-ui/src/component/layout/FixedBar.vue +103 -103
- package/@nixweb/nixloc-ui/src/component/layout/Header.vue +56 -56
- package/@nixweb/nixloc-ui/src/component/layout/LoadingFullPage.vue +27 -27
- package/@nixweb/nixloc-ui/src/component/layout/Menu.vue +287 -287
- package/@nixweb/nixloc-ui/src/component/layout/Molded.vue +30 -30
- package/@nixweb/nixloc-ui/src/component/layout/Panel.vue +185 -185
- package/@nixweb/nixloc-ui/src/component/layout/Popover.vue +126 -126
- package/@nixweb/nixloc-ui/src/component/layout/ScrollBar.vue +57 -57
- package/@nixweb/nixloc-ui/src/component/layout/Wizard.vue +211 -211
- package/@nixweb/nixloc-ui/src/component/shared/Collapse.vue +131 -131
- package/@nixweb/nixloc-ui/src/component/shared/ExportPDF.vue +116 -116
- package/@nixweb/nixloc-ui/src/component/shared/HorizontalFilter.vue +64 -64
- package/@nixweb/nixloc-ui/src/component/shared/Loading.vue +107 -107
- package/@nixweb/nixloc-ui/src/component/shared/LoadingMoreButton.vue +23 -23
- package/@nixweb/nixloc-ui/src/component/shared/Messages.vue +109 -109
- package/@nixweb/nixloc-ui/src/component/shared/PDFViewer.vue +24 -24
- package/@nixweb/nixloc-ui/src/component/shared/Pagination.vue +108 -108
- package/@nixweb/nixloc-ui/src/component/shared/ProgressBar.vue +25 -25
- package/@nixweb/nixloc-ui/src/component/shared/QueryButton.vue +66 -66
- package/@nixweb/nixloc-ui/src/component/shared/Search.vue +174 -174
- package/@nixweb/nixloc-ui/src/component/shared/Table.vue +174 -174
- package/@nixweb/nixloc-ui/src/component/shared/TableButton.vue +36 -36
- package/@nixweb/nixloc-ui/src/component/shared/TableTotalization.vue +47 -47
- package/@nixweb/nixloc-ui/src/component/shared/Tip.vue +42 -42
- package/@nixweb/nixloc-ui/src/component/shared/Toast.vue +69 -69
- package/@nixweb/nixloc-ui/src/component/shared/VerticalFilter.vue +97 -97
- package/@nixweb/nixloc-ui/src/component/shared/query-builder/AddRule.vue +203 -203
- package/@nixweb/nixloc-ui/src/component/shared/query-builder/DynamicComponentList.vue +70 -70
- package/@nixweb/nixloc-ui/src/component/shared/query-builder/QueryBuilder.vue +69 -69
- package/@nixweb/nixloc-ui/src/component/shared/query-builder/utilities.js +21 -21
- package/@nixweb/nixloc-ui/src/component/template/ListViewWithDataHandler.vue +429 -429
- package/@nixweb/nixloc-ui/src/component/template/ViewTemplateConfiguration.vue +64 -64
- package/@nixweb/nixloc-ui/src/component/template/ViewTemplateWithSalveCancel.vue +32 -32
- package/@nixweb/nixloc-ui/src/component/template/ViewTemplateWithTable.vue +62 -62
- package/@nixweb/nixloc-ui/src/config/axios.js +9 -9
- package/@nixweb/nixloc-ui/src/config/dicas.js +14 -14
- package/@nixweb/nixloc-ui/src/config/router.js +13 -13
- package/@nixweb/nixloc-ui/src/config/token.js +14 -14
- package/@nixweb/nixloc-ui/src/main.js +23 -23
- package/@nixweb/nixloc-ui/src/store/modules/generic.js +815 -815
- package/@nixweb/nixloc-ui/src/store/modules/validation.js +38 -38
- package/@nixweb/nixloc-ui/src/store/store.js +13 -13
- package/package.json +1 -1
- package/src/component/forms/InputDecimal.vue +18 -5
- package/src/component/training/CourseView.vue +16 -7
- package/src/component/value-objects/Address.vue +35 -19
- package/src/store/modules/generic.js +0 -1
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
export default {
|
|
2
|
-
namespaced: true,
|
|
3
|
-
state: {
|
|
4
|
-
formDirty: false,
|
|
5
|
-
validations: [],
|
|
6
|
-
resetForm: {
|
|
7
|
-
name: undefined,
|
|
8
|
-
dateTime: undefined
|
|
9
|
-
}
|
|
10
|
-
},
|
|
11
|
-
getters: {
|
|
12
|
-
isFormValid: (state) => (formName) => {
|
|
13
|
-
var hasNotification = state.validations.find(obj => {
|
|
14
|
-
return obj.formName === formName
|
|
15
|
-
})
|
|
16
|
-
if (hasNotification != undefined) return false;
|
|
17
|
-
return true;
|
|
18
|
-
}
|
|
19
|
-
},
|
|
20
|
-
mutations: {
|
|
21
|
-
addValidation: (state, obj) => {
|
|
22
|
-
state.validations.push(obj);
|
|
23
|
-
},
|
|
24
|
-
removeValidation: (state, obj) => {
|
|
25
|
-
let filter = state.validations.filter(v => v.key != obj.key);
|
|
26
|
-
state.validations = filter;
|
|
27
|
-
},
|
|
28
|
-
resetValidation: (state, formName) => {
|
|
29
|
-
state.resetForm.dateTime = new Date();
|
|
30
|
-
state.resetForm.name = formName;
|
|
31
|
-
},
|
|
32
|
-
updateFormDirty: (state, formDirty) => {
|
|
33
|
-
state.formDirty = formDirty;
|
|
34
|
-
},
|
|
35
|
-
removeFormDirty: (state) => {
|
|
36
|
-
state.formDirty = false;
|
|
37
|
-
}
|
|
38
|
-
},
|
|
1
|
+
export default {
|
|
2
|
+
namespaced: true,
|
|
3
|
+
state: {
|
|
4
|
+
formDirty: false,
|
|
5
|
+
validations: [],
|
|
6
|
+
resetForm: {
|
|
7
|
+
name: undefined,
|
|
8
|
+
dateTime: undefined
|
|
9
|
+
}
|
|
10
|
+
},
|
|
11
|
+
getters: {
|
|
12
|
+
isFormValid: (state) => (formName) => {
|
|
13
|
+
var hasNotification = state.validations.find(obj => {
|
|
14
|
+
return obj.formName === formName
|
|
15
|
+
})
|
|
16
|
+
if (hasNotification != undefined) return false;
|
|
17
|
+
return true;
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
mutations: {
|
|
21
|
+
addValidation: (state, obj) => {
|
|
22
|
+
state.validations.push(obj);
|
|
23
|
+
},
|
|
24
|
+
removeValidation: (state, obj) => {
|
|
25
|
+
let filter = state.validations.filter(v => v.key != obj.key);
|
|
26
|
+
state.validations = filter;
|
|
27
|
+
},
|
|
28
|
+
resetValidation: (state, formName) => {
|
|
29
|
+
state.resetForm.dateTime = new Date();
|
|
30
|
+
state.resetForm.name = formName;
|
|
31
|
+
},
|
|
32
|
+
updateFormDirty: (state, formDirty) => {
|
|
33
|
+
state.formDirty = formDirty;
|
|
34
|
+
},
|
|
35
|
+
removeFormDirty: (state) => {
|
|
36
|
+
state.formDirty = false;
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
39
|
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import Vue from 'vue';
|
|
2
|
-
import Vuex from 'vuex';
|
|
3
|
-
|
|
4
|
-
import user from './modules/user'
|
|
5
|
-
import generic from './modules/generic'
|
|
6
|
-
import validation from './modules/validation'
|
|
7
|
-
|
|
8
|
-
Vue.use(Vuex)
|
|
9
|
-
|
|
10
|
-
export default new Vuex.Store({
|
|
11
|
-
modules: {
|
|
12
|
-
generic, validation, user
|
|
13
|
-
}
|
|
1
|
+
import Vue from 'vue';
|
|
2
|
+
import Vuex from 'vuex';
|
|
3
|
+
|
|
4
|
+
import user from './modules/user'
|
|
5
|
+
import generic from './modules/generic'
|
|
6
|
+
import validation from './modules/validation'
|
|
7
|
+
|
|
8
|
+
Vue.use(Vuex)
|
|
9
|
+
|
|
10
|
+
export default new Vuex.Store({
|
|
11
|
+
modules: {
|
|
12
|
+
generic, validation, user
|
|
13
|
+
}
|
|
14
14
|
})
|
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>
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
|
-
<
|
|
3
|
+
<Loading type="line" :center="true" v-if="loading" />
|
|
4
|
+
<div v-if="!loading && courseModules.length == 0">
|
|
4
5
|
Nenhum curso cadastrado!
|
|
5
6
|
</div>
|
|
6
7
|
<div v-for="(module, moduleIndex) in courseModules" :key="moduleIndex">
|
|
@@ -70,25 +71,27 @@
|
|
|
70
71
|
</Modal>
|
|
71
72
|
</div>
|
|
72
73
|
</template>
|
|
73
|
-
|
|
74
|
+
|
|
74
75
|
<script>
|
|
75
76
|
|
|
76
77
|
import Molded from "@nixweb/nixloc-ui/src/component/layout/Molded";
|
|
77
78
|
import Modal from "@nixweb/nixloc-ui/src/component/forms/Modal";
|
|
79
|
+
import Loading from "@nixweb/nixloc-ui/src/component/shared/Loading.vue";
|
|
78
80
|
|
|
79
|
-
import axios from "
|
|
81
|
+
import axios from "axios";
|
|
80
82
|
|
|
81
83
|
import { mapGetters, mapMutations } from "vuex";
|
|
82
84
|
|
|
83
85
|
export default {
|
|
84
86
|
components: {
|
|
85
|
-
Molded, Modal
|
|
87
|
+
Molded, Modal, Loading
|
|
86
88
|
},
|
|
87
89
|
data() {
|
|
88
90
|
return {
|
|
89
91
|
urlGet: "",
|
|
90
92
|
environment: "",
|
|
91
93
|
courseModules: [],
|
|
94
|
+
loading: true,
|
|
92
95
|
moduleSelected: "",
|
|
93
96
|
selectedLesson: {}
|
|
94
97
|
};
|
|
@@ -114,17 +117,24 @@ export default {
|
|
|
114
117
|
this.openModal("play");
|
|
115
118
|
},
|
|
116
119
|
get() {
|
|
120
|
+
this.loading = true;
|
|
117
121
|
axios.get(this.urlGet, {})
|
|
118
122
|
.then(response => {
|
|
119
123
|
if (response.data.success) {
|
|
120
124
|
this.courseModules = JSON.parse(response.data.content.course);
|
|
121
125
|
}
|
|
122
126
|
})
|
|
127
|
+
.catch(error => {
|
|
128
|
+
console.error(error);
|
|
129
|
+
})
|
|
130
|
+
.finally(() => {
|
|
131
|
+
this.loading = false;
|
|
132
|
+
});
|
|
123
133
|
},
|
|
124
134
|
},
|
|
125
135
|
};
|
|
126
136
|
</script>
|
|
127
|
-
|
|
137
|
+
|
|
128
138
|
<style scoped>
|
|
129
139
|
.div-title {
|
|
130
140
|
margin-bottom: 10px;
|
|
@@ -186,5 +196,4 @@ export default {
|
|
|
186
196
|
cursor: pointer;
|
|
187
197
|
margin-left: 10px;
|
|
188
198
|
}
|
|
189
|
-
</style>
|
|
190
|
-
|
|
199
|
+
</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,41 +11,45 @@
|
|
|
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
|
|
|
42
44
|
<script>
|
|
45
|
+
|
|
43
46
|
import Button from "@nixweb/nixloc-ui/src/component/forms/Button";
|
|
44
47
|
import InputText from "@nixweb/nixloc-ui/src/component/forms/InputText";
|
|
45
48
|
import SelectStatic from "@nixweb/nixloc-ui/src/component/forms/SelectStatic";
|
|
46
|
-
|
|
47
49
|
import Address from "@nixweb/nixloc-ui/src/component/value-objects/Address.js";
|
|
48
50
|
|
|
51
|
+
import axios from "axios";
|
|
52
|
+
|
|
49
53
|
import { mapGetters, mapMutations } from "vuex";
|
|
50
54
|
|
|
51
55
|
export default {
|
|
@@ -60,6 +64,18 @@ export default {
|
|
|
60
64
|
type: Boolean,
|
|
61
65
|
default: false,
|
|
62
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
|
+
},
|
|
63
79
|
value: Object,
|
|
64
80
|
},
|
|
65
81
|
components: { InputText, Button, SelectStatic },
|
|
@@ -113,7 +129,7 @@ export default {
|
|
|
113
129
|
searchZipCode() {
|
|
114
130
|
let zipCode = this.address.zipCode.replace(/\.|\-/g, "");
|
|
115
131
|
let url = `https://viacep.com.br/ws/${zipCode}/json/`;
|
|
116
|
-
|
|
132
|
+
axios.get(url).then((response) => {
|
|
117
133
|
let self = this;
|
|
118
134
|
setTimeout(function () {
|
|
119
135
|
self.loadData(response.data);
|