@nixweb/nixloc-ui 1.9.0 → 1.11.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.
Files changed (68) hide show
  1. package/@nixweb/nixloc-ui/package.json +88 -88
  2. package/@nixweb/nixloc-ui/src/App.vue +13 -13
  3. package/@nixweb/nixloc-ui/src/component/forms/Button.vue +163 -163
  4. package/@nixweb/nixloc-ui/src/component/forms/CheckboxGroup.vue +69 -69
  5. package/@nixweb/nixloc-ui/src/component/forms/CheckboxServer.vue +192 -192
  6. package/@nixweb/nixloc-ui/src/component/forms/CheckboxSimple.vue +60 -60
  7. package/@nixweb/nixloc-ui/src/component/forms/Color.vue +38 -38
  8. package/@nixweb/nixloc-ui/src/component/forms/DateTime.vue +170 -170
  9. package/@nixweb/nixloc-ui/src/component/forms/Dropdown.vue +236 -236
  10. package/@nixweb/nixloc-ui/src/component/forms/EditorHtml.vue +132 -132
  11. package/@nixweb/nixloc-ui/src/component/forms/FileUpload.vue +170 -170
  12. package/@nixweb/nixloc-ui/src/component/forms/InputDecimal.vue +153 -153
  13. package/@nixweb/nixloc-ui/src/component/forms/InputNumber.vue +160 -160
  14. package/@nixweb/nixloc-ui/src/component/forms/InputPassword.vue +148 -148
  15. package/@nixweb/nixloc-ui/src/component/forms/InputText.vue +174 -174
  16. package/@nixweb/nixloc-ui/src/component/forms/Modal.vue +57 -57
  17. package/@nixweb/nixloc-ui/src/component/forms/RadioGroup.vue +91 -91
  18. package/@nixweb/nixloc-ui/src/component/forms/Select.vue +378 -378
  19. package/@nixweb/nixloc-ui/src/component/forms/SelectStatic.vue +198 -198
  20. package/@nixweb/nixloc-ui/src/component/forms/Slider.vue +18 -18
  21. package/@nixweb/nixloc-ui/src/component/forms/TextArea.vue +138 -138
  22. package/@nixweb/nixloc-ui/src/component/layout/Alert.vue +88 -88
  23. package/@nixweb/nixloc-ui/src/component/layout/Badge.vue +111 -111
  24. package/@nixweb/nixloc-ui/src/component/layout/FixedBar.vue +103 -103
  25. package/@nixweb/nixloc-ui/src/component/layout/Header.vue +56 -56
  26. package/@nixweb/nixloc-ui/src/component/layout/LoadingFullPage.vue +27 -27
  27. package/@nixweb/nixloc-ui/src/component/layout/Menu.vue +287 -287
  28. package/@nixweb/nixloc-ui/src/component/layout/Molded.vue +30 -30
  29. package/@nixweb/nixloc-ui/src/component/layout/Panel.vue +185 -185
  30. package/@nixweb/nixloc-ui/src/component/layout/Popover.vue +126 -126
  31. package/@nixweb/nixloc-ui/src/component/layout/ScrollBar.vue +57 -57
  32. package/@nixweb/nixloc-ui/src/component/layout/Wizard.vue +211 -211
  33. package/@nixweb/nixloc-ui/src/component/shared/Collapse.vue +131 -131
  34. package/@nixweb/nixloc-ui/src/component/shared/ExportPDF.vue +116 -116
  35. package/@nixweb/nixloc-ui/src/component/shared/HorizontalFilter.vue +64 -64
  36. package/@nixweb/nixloc-ui/src/component/shared/Loading.vue +107 -107
  37. package/@nixweb/nixloc-ui/src/component/shared/LoadingMoreButton.vue +23 -23
  38. package/@nixweb/nixloc-ui/src/component/shared/Messages.vue +109 -109
  39. package/@nixweb/nixloc-ui/src/component/shared/PDFViewer.vue +24 -24
  40. package/@nixweb/nixloc-ui/src/component/shared/Pagination.vue +108 -108
  41. package/@nixweb/nixloc-ui/src/component/shared/ProgressBar.vue +25 -25
  42. package/@nixweb/nixloc-ui/src/component/shared/QueryButton.vue +66 -66
  43. package/@nixweb/nixloc-ui/src/component/shared/Search.vue +174 -174
  44. package/@nixweb/nixloc-ui/src/component/shared/Table.vue +174 -174
  45. package/@nixweb/nixloc-ui/src/component/shared/TableButton.vue +36 -36
  46. package/@nixweb/nixloc-ui/src/component/shared/TableTotalization.vue +47 -47
  47. package/@nixweb/nixloc-ui/src/component/shared/Tip.vue +42 -42
  48. package/@nixweb/nixloc-ui/src/component/shared/Toast.vue +69 -69
  49. package/@nixweb/nixloc-ui/src/component/shared/VerticalFilter.vue +97 -97
  50. package/@nixweb/nixloc-ui/src/component/shared/query-builder/AddRule.vue +203 -203
  51. package/@nixweb/nixloc-ui/src/component/shared/query-builder/DynamicComponentList.vue +70 -70
  52. package/@nixweb/nixloc-ui/src/component/shared/query-builder/QueryBuilder.vue +69 -69
  53. package/@nixweb/nixloc-ui/src/component/shared/query-builder/utilities.js +21 -21
  54. package/@nixweb/nixloc-ui/src/component/template/ListViewWithDataHandler.vue +429 -429
  55. package/@nixweb/nixloc-ui/src/component/template/ViewTemplateConfiguration.vue +64 -64
  56. package/@nixweb/nixloc-ui/src/component/template/ViewTemplateWithSalveCancel.vue +32 -32
  57. package/@nixweb/nixloc-ui/src/component/template/ViewTemplateWithTable.vue +62 -62
  58. package/@nixweb/nixloc-ui/src/config/axios.js +9 -9
  59. package/@nixweb/nixloc-ui/src/config/dicas.js +14 -14
  60. package/@nixweb/nixloc-ui/src/config/router.js +13 -13
  61. package/@nixweb/nixloc-ui/src/config/token.js +14 -14
  62. package/@nixweb/nixloc-ui/src/main.js +23 -23
  63. package/@nixweb/nixloc-ui/src/store/modules/generic.js +815 -815
  64. package/@nixweb/nixloc-ui/src/store/modules/validation.js +38 -38
  65. package/@nixweb/nixloc-ui/src/store/store.js +13 -13
  66. package/package.json +1 -1
  67. package/src/component/training/CourseView.vue +16 -7
  68. package/src/component/value-objects/Address.vue +4 -2
@@ -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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nixweb/nixloc-ui",
3
- "version": "1.9.0",
3
+ "version": "1.11.0",
4
4
  "description": "Componentes UI",
5
5
  "author": "Fábio Ávila <fabio@nixweb.com.br>",
6
6
  "private": false,
@@ -1,6 +1,7 @@
1
1
  <template>
2
2
  <div>
3
- <div v-if="courseModules.length == 0">
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 "@/config/axios";
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>
@@ -40,12 +40,14 @@
40
40
  </template>
41
41
 
42
42
  <script>
43
+
43
44
  import Button from "@nixweb/nixloc-ui/src/component/forms/Button";
44
45
  import InputText from "@nixweb/nixloc-ui/src/component/forms/InputText";
45
46
  import SelectStatic from "@nixweb/nixloc-ui/src/component/forms/SelectStatic";
46
-
47
47
  import Address from "@nixweb/nixloc-ui/src/component/value-objects/Address.js";
48
48
 
49
+ import axios from "axios";
50
+
49
51
  import { mapGetters, mapMutations } from "vuex";
50
52
 
51
53
  export default {
@@ -113,7 +115,7 @@ export default {
113
115
  searchZipCode() {
114
116
  let zipCode = this.address.zipCode.replace(/\.|\-/g, "");
115
117
  let url = `https://viacep.com.br/ws/${zipCode}/json/`;
116
- this.$http.get(url).then((response) => {
118
+ axios.get(url).then((response) => {
117
119
  let self = this;
118
120
  setTimeout(function () {
119
121
  self.loadData(response.data);