@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
@@ -1,254 +1,163 @@
1
- <template>
2
- <div>
3
- <table class="table table-responsive-xs">
4
- <thead>
5
- <tr>
6
- <th class="td-checkbox" v-if="showChecks">
7
- <div>
8
- <b-form-checkbox v-model="selectAll" @change="select" />
9
- </div>
10
- </th>
11
- <th v-for="(obj, ind) in header" :key="ind">
12
- <div class="title-margem" :class="obj.classCssTitle">
13
- <i class="fas fa-search" v-if="obj.iconSearch"></i>
14
- <span class="title-header"> {{ obj.title }}</span>
15
- </div>
16
- </th>
17
- </tr>
18
- </thead>
19
- <tbody>
20
- <tr v-for="(row, index) in data" :key="index" :style="row.rowCss">
21
- <td class="td-checkbox" v-if="showChecks">
22
- <div :class="{ 'center-vertical': row.photo != null }">
23
- <b-form-checkbox v-model="selected" :value="row.id" />
24
- </div>
25
- </td>
26
- <td v-for="(obj, ind) in header" :key="ind">
27
- <div
28
- :class="convertClass(row[obj.fieldComparison], obj.classCssBody)"
29
- v-if="obj.type === 'text'"
30
- >
31
- {{ row[obj.field] }}
32
- </div>
33
- <div
34
- :class="convertClass(row[obj.fieldComparison], obj.classCssBody)"
35
- v-if="obj.type === 'image'"
36
- >
37
- <img
38
- :style="'width:60;height:50px'"
39
- :src="
40
- 'https://espaco.blob.core.windows.net/nixloc-photo-product/' +
41
- row[obj.field]
42
- "
43
- />
44
- </div>
45
- <div class="text-center center-vertical" v-if="obj.type === 'class'">
46
- <div :class="convertClass(row[obj.fieldComparison], obj.classCssBody)">
47
- {{ row[obj.field] }}
48
- </div>
49
- </div>
50
- <div
51
- :class="convertClass(row[obj.fieldComparison], obj.classCssBody)"
52
- v-if="obj.type === 'html'"
53
- >
54
- <div v-if="row[obj.field]" v-html="row[obj.field]"></div>
55
- <div v-else v-html="obj.html"></div>
56
- </div>
57
- <div
58
- :class="convertClass(row[obj.fieldComparison], obj.classCssBody)"
59
- v-if="obj.type === 'select'"
60
- >
61
- {{ row[obj.field].content }}
62
- </div>
63
- <div
64
- :class="convertClass(row[obj.fieldComparison], obj.classCssBody)"
65
- v-if="obj.type === 'date'"
66
- >
67
- {{ row[obj.field] | moment("DD/MM/YYYY") }}
68
- </div>
69
- <div
70
- :class="convertClass(row[obj.fieldComparison], obj.classCssBody)"
71
- v-if="obj.type === 'dateTime'"
72
- >
73
- {{ row[obj.field] | moment("DD/MM/YYYY HH:mm") }}
74
- </div>
75
- <div
76
- :class="convertClass(row[obj.fieldComparison], obj.classCssBody)"
77
- v-if="obj.type === 'currency'"
78
- >
79
- {{ row[obj.field] | currency }}
80
- </div>
81
- <div
82
- :class="convertClass(row[obj.fieldComparison], obj.classCssBody)"
83
- v-if="obj.type === 'button'"
84
- >
85
- <TableButton :obj="obj" :row="row" />
86
- </div>
87
- <div
88
- class="link"
89
- :class="convertClass(row[obj.fieldComparison], obj.classCssBody)"
90
- v-if="obj.type === 'link'"
91
- @click="navegateTo(obj, row)"
92
- >
93
- <span> {{ row[obj.field] }}</span>
94
- </div>
95
- </td>
96
- </tr>
97
- </tbody>
98
- <tbody v-show="data.length == 0">
99
- <tr>
100
- <td colspan="12">
101
- <span>Nenhum registro encontrado!</span>
102
- </td>
103
- </tr>
104
- </tbody>
105
- </table>
106
- </div>
107
- </template>
108
-
109
- <script>
110
- import TableButton from "@nixweb/nixloc-ui/src/component/shared/TableButton.vue";
111
- import draggable from "@nixweb/nixloc-ui/vuedraggable";
112
-
113
- import { mapState, mapMutations, mapActions } from "vuex";
114
-
115
- export default {
116
- components: { TableButton },
117
- props: {
118
- header: Array,
119
- data: Array,
120
- showChecks: {
121
- type: Boolean,
122
- default: true,
123
- },
124
- },
125
- data() {
126
- return {
127
- selectAll: false,
128
- };
129
- },
130
- computed: {
131
- ...mapState("generic", ["selected"]),
132
- selected: {
133
- get() {
134
- return this.$store.state.generic.selected;
135
- },
136
- set(value) {
137
- this.addSelected(value);
138
- },
139
- },
140
- },
141
- methods: {
142
- ...mapMutations("generic", ["addSelected", "addEvent"]),
143
- ...mapActions("generic", ["pdfApi"]),
144
- select() {
145
- this.addSelected([]);
146
- if (this.selectAll) {
147
- for (let i in this.data) {
148
- this.selected.push(this.data[i].id);
149
- }
150
- }
151
- },
152
- convertClass(fieldComparison, classCssBody) {
153
- if (Array.isArray(classCssBody)) {
154
- let ret = [];
155
- classCssBody.forEach(function (value) {
156
- let classCss = value.classCss;
157
- let condition = value.fieldComparison == fieldComparison;
158
- let obj = { [classCss]: condition };
159
- ret.push(obj);
160
- });
161
- return ret;
162
- } else {
163
- return classCssBody;
164
- }
165
- },
166
- navegateTo(obj, row) {
167
- if (obj.routeName) {
168
- this.$router.push({
169
- name: obj.routeName,
170
- params: { id: row.id, type: row.type },
171
- });
172
- } else {
173
- this.addEvent({
174
- name: obj.eventName,
175
- data: row,
176
- });
177
- }
178
- },
179
- },
180
- beforeDestroy() {
181
- this.addSelected([]);
182
- },
183
- };
184
- </script>
185
-
186
- <style scoped>
187
- table tbody tr td {
188
- max-width: 350px;
189
- }
190
-
191
- .table th,
192
- .table td {
193
- height: 10px !important;
194
- padding-left: 5px !important;
195
- padding-top: 7px !important;
196
- padding-bottom: 5px !important;
197
- padding-right: 5px !important;
198
- border-bottom: 0px !important;
199
- }
200
-
201
- .td-checkbox {
202
- width: 30px;
203
- }
204
-
205
- tr:hover {
206
- background-color: #fafafc;
207
- }
208
-
209
- .title-header {
210
- font-size: 13px;
211
- color: #757d8c;
212
- font-weight: 400;
213
- text-transform: uppercase;
214
- }
215
-
216
- .table-number {
217
- font-size: 14px;
218
- font-weight: bold;
219
- }
220
-
221
- .table-main {
222
- color: #757d8c;
223
- max-width: 200px;
224
- }
225
-
226
- .table-currency {
227
- font-size: 14px;
228
- min-width: 100px;
229
- }
230
-
231
- .link {
232
- color: #3f529b;
233
- font-size: 14px;
234
- font-weight: 400;
235
- cursor: pointer;
236
- }
237
-
238
- .link:hover {
239
- text-decoration: underline;
240
- transition: 0.1s;
241
- }
242
-
243
- .icon-link:hover {
244
- font-size: 12.5px;
245
- }
246
-
247
- .center-vertical {
248
- padding-top: 10px;
249
- }
250
-
251
- .badge-center {
252
- margin: auto !important;
253
- }
254
- </style>
1
+ <template>
2
+ <div>
3
+ <table class="table table-responsive-xs">
4
+ <thead>
5
+ <tr>
6
+ <th class="td-checkbox" v-if="showChecks">
7
+ <div>
8
+ <b-form-checkbox v-model="selectAll" @change="select" />
9
+ </div>
10
+ </th>
11
+ <th v-for="(obj, ind) in header" :key="ind">
12
+ <div class="title-margem" :class="obj.classCssTitle">
13
+ <i class="fas fa-search" v-if="obj.iconSearch"></i>
14
+ <span class="title-header"> {{ obj.title }}</span>
15
+ </div>
16
+ </th>
17
+ </tr>
18
+ </thead>
19
+ <draggable
20
+ v-model="data"
21
+ tag="tbody"
22
+ @change="checkMove"
23
+ :options="{ disabled: !dragAndDrop }"
24
+ >
25
+ <tr v-for="(row, index) in data" :key="index" :style="row.rowCss">
26
+ <td class="td-checkbox" v-if="showChecks">
27
+ <div :class="{ 'center-vertical': row.photo != null }">
28
+ <b-form-checkbox v-model="selected" :value="row.id" />
29
+ </div>
30
+ </td>
31
+ <td
32
+ v-for="(obj, ind) in header"
33
+ :key="ind"
34
+ :class="{ 'drag-and-drop': dragAndDrop }"
35
+ >
36
+ <TableItem :obj="obj" :row="row" />
37
+ </td>
38
+ </tr>
39
+ </draggable>
40
+ <tbody v-show="data.length == 0">
41
+ <tr>
42
+ <td colspan="12">
43
+ <span>Nenhum registro encontrado!</span>
44
+ </td>
45
+ </tr>
46
+ </tbody>
47
+ </table>
48
+ </div>
49
+ </template>
50
+
51
+ <script>
52
+ import TableItem from "@nixweb/nixloc-ui/src/component/shared/TableItem.vue";
53
+
54
+ import draggable from "vuedraggable";
55
+
56
+ import { mapState, mapMutations, mapActions } from "vuex";
57
+
58
+ export default {
59
+ components: { draggable, TableItem },
60
+ props: {
61
+ header: Array,
62
+ data: Array,
63
+ showChecks: {
64
+ type: Boolean,
65
+ default: true,
66
+ },
67
+ dragAndDrop: {
68
+ type: Boolean,
69
+ default: false,
70
+ },
71
+ },
72
+ data() {
73
+ return {
74
+ selectAll: false,
75
+ dataDragging: [],
76
+ };
77
+ },
78
+ computed: {
79
+ ...mapState("generic", ["selected"]),
80
+ selected: {
81
+ get() {
82
+ return this.$store.state.generic.selected;
83
+ },
84
+ set(value) {
85
+ this.addSelected(value);
86
+ },
87
+ },
88
+ },
89
+ methods: {
90
+ ...mapMutations("generic", ["addSelected", "addEvent"]),
91
+ ...mapActions("generic", ["pdfApi"]),
92
+ select() {
93
+ this.addSelected([]);
94
+ if (this.selectAll) {
95
+ for (let i in this.data) {
96
+ this.selected.push(this.data[i].id);
97
+ }
98
+ }
99
+ },
100
+ checkMove() {
101
+ if (this.dragAndDrop) {
102
+ var listIds = [];
103
+ this.data.forEach((item) => {
104
+ listIds.push(item.id);
105
+ });
106
+
107
+ this.addEvent({
108
+ name: "tableDragAndDrop",
109
+ data: { listIds: listIds },
110
+ });
111
+ }
112
+ },
113
+ },
114
+ beforeDestroy() {
115
+ this.addSelected([]);
116
+ },
117
+ };
118
+ </script>
119
+
120
+ <style scoped>
121
+ table tbody tr td {
122
+ max-width: 350px;
123
+ }
124
+
125
+ .table th,
126
+ .table td {
127
+ height: 10px !important;
128
+ padding-left: 5px !important;
129
+ padding-top: 7px !important;
130
+ padding-bottom: 5px !important;
131
+ padding-right: 5px !important;
132
+ border-bottom: 0px !important;
133
+ }
134
+
135
+ .td-checkbox {
136
+ width: 30px;
137
+ }
138
+
139
+ tr:hover {
140
+ background-color: #fafafc;
141
+ }
142
+
143
+ .title-header {
144
+ font-size: 13px;
145
+ color: #757d8c;
146
+ font-weight: 400;
147
+ text-transform: uppercase;
148
+ }
149
+
150
+ .table-number {
151
+ font-size: 14px;
152
+ font-weight: bold;
153
+ }
154
+
155
+ .table-main {
156
+ color: #757d8c;
157
+ max-width: 200px;
158
+ }
159
+
160
+ .drag-and-drop {
161
+ cursor: move;
162
+ }
163
+ </style>
@@ -1,36 +1,36 @@
1
- <template>
2
- <div>
3
- <Button
4
- v-if="obj.qualBotao == 'button'"
5
- :key="row.id"
6
- :title="obj.button.title"
7
- :type="obj.button.type"
8
- :size="obj.button.size"
9
- :classIcon="obj.button.classIcon"
10
- :eventName="obj.button.eventName"
11
- :eventData="row"
12
- />
13
- <Dropdown
14
- v-if="obj.qualBotao == 'botaodropdown'"
15
- :title="obj.button.title"
16
- :type="obj.button.type"
17
- :size="obj.button.size"
18
- :classIcon="obj.button.classIcon"
19
- :eventData="row"
20
- :items="obj.button.items"
21
- />
22
- </div>
23
- </template>
24
-
25
- <script>
26
- import Dropdown from "../forms/Dropdown";
27
- import Button from "../forms/Button";
28
- export default {
29
- name: "TableButton",
30
- components: { Button, Dropdown },
31
- props: {
32
- obj: Object,
33
- row: Object,
34
- },
35
- };
36
- </script>
1
+ <template>
2
+ <div>
3
+ <Button
4
+ v-if="obj.qualBotao == 'button'"
5
+ :key="row.id"
6
+ :title="obj.button.title"
7
+ :type="obj.button.type"
8
+ :size="obj.button.size"
9
+ :classIcon="obj.button.classIcon"
10
+ :eventName="obj.button.eventName"
11
+ :eventData="row"
12
+ />
13
+ <Dropdown
14
+ v-if="obj.qualBotao == 'botaodropdown'"
15
+ :title="obj.button.title"
16
+ :type="obj.button.type"
17
+ :size="obj.button.size"
18
+ :classIcon="obj.button.classIcon"
19
+ :eventData="row"
20
+ :items="obj.button.items"
21
+ />
22
+ </div>
23
+ </template>
24
+
25
+ <script>
26
+ import Dropdown from "../forms/Dropdown";
27
+ import Button from "../forms/Button";
28
+ export default {
29
+ name: "TableButton",
30
+ components: { Button, Dropdown },
31
+ props: {
32
+ obj: Object,
33
+ row: Object,
34
+ },
35
+ };
36
+ </script>
@@ -0,0 +1,127 @@
1
+ <template>
2
+ <div>
3
+ <div class="margin">
4
+ <Button
5
+ _key="btnCancelTableDraggable"
6
+ title="Cancelar"
7
+ type="danger"
8
+ size="small"
9
+ :clicked="cancel"
10
+ />
11
+ <Button
12
+ _key="btnCheckMoveTableDraggable"
13
+ title="Confirmar"
14
+ type="success"
15
+ size="small"
16
+ :clicked="checkMove"
17
+ />
18
+ </div>
19
+ <i class="fa-regular fa-maximize icon-order"></i> Clique e arraste para ordenar
20
+ <table class="table table-responsive-xs">
21
+ <thead>
22
+ <tr>
23
+ <th>
24
+ <span class="title-header">Nome</span>
25
+ </th>
26
+ </tr>
27
+ </thead>
28
+ <draggable v-model="dataLocal" tag="tbody">
29
+ <tr v-for="item in dataLocal">
30
+ <td class="item">
31
+ <i class="fa-solid fa-grip-lines icon-order"></i>
32
+ <span v-if="item.name"> {{ item.name }}</span>
33
+ <span class="without-group" v-else> Sem grupo</span>
34
+ </td>
35
+ </tr>
36
+ </draggable>
37
+ <tbody v-show="dataLocal.length == 0">
38
+ <tr>
39
+ <td colspan="12">
40
+ <span>Nenhum registro encontrado!</span>
41
+ </td>
42
+ </tr>
43
+ </tbody>
44
+ </table>
45
+ </div>
46
+ </template>
47
+ <script>
48
+ import Button from "@nixweb/nixloc-ui/src/component/forms/Button";
49
+ import draggable from "vuedraggable";
50
+
51
+ import { mapMutations, mapActions } from "vuex";
52
+
53
+ export default {
54
+ name: "TableDraggable",
55
+ components: { Button, draggable },
56
+ props: {
57
+ data: Array,
58
+ propsParam: Object,
59
+ urlOrderAllApi: String,
60
+ },
61
+ data() {
62
+ return {
63
+ dataLocal: [],
64
+ };
65
+ },
66
+ mounted() {
67
+ this.dataLocal = this.data;
68
+ },
69
+ methods: {
70
+ ...mapMutations("generic", ["addEvent", "removeLoading"]),
71
+ ...mapActions("generic", ["orderAllApi"]),
72
+ checkMove() {
73
+ let listIds = [];
74
+
75
+ this.dataLocal.forEach((item) => {
76
+ listIds.push(item.id);
77
+ });
78
+
79
+ let obj = { ...this.propsParam, listIds: listIds };
80
+ let params = { url: this.urlOrderAllApi, obj: obj };
81
+
82
+ this.orderAllApi(params).then((response) => {
83
+ this.removeLoading(["btnCheckMoveTableDraggable"]);
84
+ this.addEvent({ name: "confirmedTableDraggable" });
85
+ });
86
+ },
87
+ cancel() {
88
+ this.addEvent({ name: "cancelTableDraggable" });
89
+ this.removeLoading(["btnCancelTableDraggable"]);
90
+ },
91
+ },
92
+ };
93
+ </script>
94
+ <style scoped>
95
+ .table th,
96
+ .table td {
97
+ height: 10px !important;
98
+ padding-left: 5px !important;
99
+ padding-top: 7px !important;
100
+ padding-bottom: 5px !important;
101
+ padding-right: 5px !important;
102
+ padding-left: 10px !important;
103
+ border-bottom: 0px !important;
104
+ }
105
+
106
+ .title-header {
107
+ font-size: 14px;
108
+ color: #757d8c;
109
+ font-weight: 400;
110
+ text-transform: uppercase;
111
+ }
112
+
113
+ .item {
114
+ background-color: #f1f4f9;
115
+ cursor: move;
116
+ }
117
+
118
+ .without-group {
119
+ font-size: 13px;
120
+ font-style: italic;
121
+ color: grey;
122
+ }
123
+
124
+ .margin {
125
+ margin-bottom: 10px;
126
+ }
127
+ </style>