@nixweb/nixloc-ui 0.0.127 → 0.0.128

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 (88) hide show
  1. package/package.json +79 -79
  2. package/src/App.vue +13 -13
  3. package/src/component/forms/Button.vue +170 -170
  4. package/src/component/forms/CheckboxGroup.vue +72 -66
  5. package/src/component/forms/CheckboxSimple.vue +46 -42
  6. package/src/component/forms/Color.vue +38 -38
  7. package/src/component/forms/DateTime.vue +167 -163
  8. package/src/component/forms/Dropdown.vue +218 -224
  9. package/src/component/forms/EditorHtml.vue +126 -126
  10. package/src/component/forms/FileUpload.vue +185 -185
  11. package/src/component/forms/ImageUpload.vue +12 -4
  12. package/src/component/forms/IncrementDecrement.vue +101 -0
  13. package/src/component/forms/InputDecimal.vue +142 -138
  14. package/src/component/forms/InputNumber.vue +154 -154
  15. package/src/component/forms/InputPassword.vue +135 -135
  16. package/src/component/forms/InputText.vue +162 -157
  17. package/src/component/forms/Modal.vue +65 -65
  18. package/src/component/forms/RadioGroup.vue +50 -50
  19. package/src/component/forms/Select.vue +349 -340
  20. package/src/component/forms/SelectStatic.vue +127 -127
  21. package/src/component/forms/Slider.vue +18 -18
  22. package/src/component/forms/TextArea.vue +126 -126
  23. package/src/component/layout/Alert.vue +92 -92
  24. package/src/component/layout/Badge.vue +103 -103
  25. package/src/component/layout/FixedBar.vue +100 -68
  26. package/src/component/layout/Header.vue +38 -35
  27. package/src/component/layout/LoadingFullPage.vue +27 -27
  28. package/src/component/layout/Menu.vue +210 -215
  29. package/src/component/layout/Molded.vue +28 -27
  30. package/src/component/layout/Panel.vue +140 -140
  31. package/src/component/layout/Popover.vue +126 -126
  32. package/src/component/layout/ScrollBar.vue +42 -42
  33. package/src/component/layout/Tab.vue +135 -0
  34. package/src/component/layout/Wizard.vue +211 -211
  35. package/src/component/rental/DisplayPeriodRent.vue +81 -0
  36. package/src/component/rental/DisplayTotalization.vue +47 -0
  37. package/src/component/shared/Collapse.vue +131 -131
  38. package/src/component/shared/DocumentPreview.vue +1 -1
  39. package/src/component/shared/DocumentPublic.vue +34 -0
  40. package/src/component/shared/ExportPDF.vue +116 -116
  41. package/src/component/shared/HeaderReport.vue +1 -1
  42. package/src/component/shared/HorizontalFilter.vue +59 -59
  43. package/src/component/shared/Loading.vue +107 -107
  44. package/src/component/shared/LoadingMoreButton.vue +23 -23
  45. package/src/component/shared/Messages.vue +81 -81
  46. package/src/component/shared/PDFViewer.vue +22 -22
  47. package/src/component/shared/Pagination.vue +52 -52
  48. package/src/component/shared/ProgressBar.vue +22 -22
  49. package/src/component/shared/QueryButton.vue +66 -66
  50. package/src/component/shared/{BodyReport.vue → Report.vue} +8 -7
  51. package/src/component/shared/SaveCancel.vue +6 -1
  52. package/src/component/shared/Search.vue +154 -154
  53. package/src/component/shared/SelectOption.vue +18 -9
  54. package/src/component/shared/Table.vue +163 -254
  55. package/src/component/shared/TableButton.vue +36 -36
  56. package/src/component/shared/TableDraggable.vue +127 -0
  57. package/src/component/shared/TableItem.vue +177 -0
  58. package/src/component/shared/TableTotalization.vue +47 -47
  59. package/src/component/shared/Tip.vue +42 -42
  60. package/src/component/shared/Toast.vue +54 -54
  61. package/src/component/shared/TotalizationReport.vue +59 -0
  62. package/src/component/shared/VerticalFilter.vue +97 -97
  63. package/src/component/shared/query-builder/AddRule.vue +181 -181
  64. package/src/component/shared/query-builder/ConvertToOdata.js +3 -9
  65. package/src/component/shared/query-builder/DynamicComponent.vue +5 -1
  66. package/src/component/shared/query-builder/DynamicComponentList.vue +73 -62
  67. package/src/component/shared/query-builder/QueryBuilder.vue +69 -69
  68. package/src/component/shared/query-builder/utilities.js +21 -21
  69. package/src/component/template/ListViewWithDataHandler.vue +260 -238
  70. package/src/component/template/ReportCreateUpdate.vue +9 -2
  71. package/src/component/template/ViewTemplateConfiguration.vue +64 -63
  72. package/src/component/template/ViewTemplateDocumentView.vue +1 -0
  73. package/src/component/template/ViewTemplateReportPreview.vue +56 -12
  74. package/src/component/template/ViewTemplateWithSalveCancel.vue +32 -32
  75. package/src/component/template/ViewTemplateWithTable.vue +56 -56
  76. package/src/component/value-objects/Contact.vue +7 -0
  77. package/src/component/value-objects/Person.vue +15 -0
  78. package/src/config/axios.js +9 -9
  79. package/src/config/dicas.js +14 -14
  80. package/src/config/router.js +13 -13
  81. package/src/config/token.js +14 -14
  82. package/src/main.js +23 -23
  83. package/src/store/modules/generic.js +512 -494
  84. package/src/store/modules/report.js +37 -19
  85. package/src/store/modules/user.js +3 -0
  86. package/src/store/modules/validation.js +38 -38
  87. package/src/store/store.js +13 -13
  88. package/src/component/shared/query-builder/Totalization.vue +0 -38
@@ -85,14 +85,17 @@ export default {
85
85
  let totalization = "";
86
86
  let indexQuery = 0;
87
87
  let indexTotalization = 0;
88
- var size = state.finalQueryFormatOData.fields.length;
88
+ var sizeFields = state.finalQueryFormatOData.fields.length;
89
+ var sizeTotalization = state.finalQueryFormatOData.totalization.length;
89
90
  var andOr = [];
90
91
 
92
+
91
93
  state.finalQueryFormatOData.fields.forEach(function (rule) {
94
+
92
95
  if (rule.type == "field") {
93
- if (indexQuery == 0 && size > 0) query += `$filter=${rule.formatOdata}`;
96
+ if (indexQuery == 0 && sizeFields > 0) query += `$filter=${rule.formatOdata}`;
94
97
 
95
- if (indexQuery > 0 && size > 0) {
98
+ if (indexQuery > 0 && sizeFields > 0) {
96
99
  query += ` ${rule.andOr} ${rule.formatOdata}`;
97
100
  andOr.push(rule.andOr);
98
101
  }
@@ -116,6 +119,14 @@ export default {
116
119
  indexTotalization++;
117
120
  }
118
121
  });
122
+
123
+ state.finalQueryFormatOData.totalization.forEach(function (rule) {
124
+
125
+ if (indexTotalization == 0 && sizeTotalization > 0) totalization = `${rule.formatOdata}`;
126
+ if (indexTotalization > 0 && sizeTotalization > 0) totalization = `,${rule.formatOdata}`;
127
+ indexTotalization++;
128
+ });
129
+
119
130
  return { query, totalization };
120
131
  },
121
132
  tags: (state) => {
@@ -198,24 +209,31 @@ export default {
198
209
  // para ser consumido nos getters oDataSelect e oDataFilter
199
210
 
200
211
  state.finalQueryFormatOData = { fields: [], totalization: [] };
212
+ var convertToOdata = new ConvertToOdata();
201
213
 
202
214
  selectedRules.forEach(function (rule) {
203
- /* if (key.query.choices && key.query.type == "totalization") {
204
- key.query.choices.forEach(function (value) {
205
- let obj = {
206
- title: value.como.title,
207
- value: value.como.value,
208
- classCss: key.query.classCss,
209
- type: value.como.type,
210
- };
211
- state.totalization.push(obj);
212
- });
213
- }*/
214
-
215
-
216
- if (rule.value != null && rule.value != "" && rule.value != undefined) {
217
-
218
- let convertToOdata = new ConvertToOdata();
215
+
216
+ if (rule.value != null && rule.value != "" && rule.value != undefined && rule.type == "totalization") {
217
+ let formatOdata = convertToOdata.convertRule(rule);
218
+
219
+ rule.value.forEach(value => {
220
+ // adiciona no array somente a opção da regra selecionada
221
+ var ruleSelected = rule.options.filter(x => x.value == value);
222
+
223
+ let ruleOdata = {
224
+ title: ruleSelected[0].aggregate.title,
225
+ value: ruleSelected[0].aggregate.value,
226
+ classCss: ruleSelected[0].aggregate.classCss,
227
+ type: ruleSelected[0].aggregate.type,
228
+ formatOdata: formatOdata,
229
+ };
230
+
231
+ state.finalQueryFormatOData.totalization.push(ruleOdata);
232
+ });
233
+ }
234
+
235
+ if (rule.value != null && rule.value != "" && rule.value != undefined && rule.type == "field") {
236
+
219
237
  let formatOdata = convertToOdata.convertRule(rule);
220
238
 
221
239
  let ruleOdata = {
@@ -36,6 +36,9 @@ export default {
36
36
  },
37
37
  updateParameterRental: (state, parameterRental) => {
38
38
  state.userLogged.parameterRental = parameterRental;
39
+ },
40
+ updateToken: (state, token) => {
41
+ state.userLogged.token = token;
39
42
  }
40
43
  },
41
44
  }
@@ -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
  })
@@ -1,38 +0,0 @@
1
- <template>
2
- <div>
3
- <Molded>
4
- <div v-for="item in data" :key="item.title">
5
- <div :class="item.classCss">
6
- <b-row>
7
- <b-col class="text-right" sm="10">
8
- <span class="title">{{ item.title }}</span>
9
- </b-col>
10
- <b-col class="text-right" sm="2">
11
- <span class="title">{{ item.valor }}</span>
12
- </b-col>
13
- </b-row>
14
- </div>
15
- </div>
16
- </Molded>
17
- </div>
18
- </template>
19
- <script>
20
- import Molded from "@nixweb/nixloc-ui/src/component/layout/Molded";
21
-
22
- export default {
23
- name: "RodapeRelatorio",
24
- components: {
25
- Molded,
26
- },
27
- props: {
28
- data: Array,
29
- },
30
- };
31
- </script>
32
-
33
- <style scoped>
34
- .title {
35
- font-size: 15px;
36
- font-weight: 400;
37
- }
38
- </style>