@nixweb/nixloc-ui 0.0.125 → 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 (111) hide show
  1. package/docs/src/component/template/ViewTemplateReportPreview.drawio +210 -0
  2. package/package.json +79 -77
  3. package/src/App.vue +13 -13
  4. package/src/component/forms/Button.vue +170 -169
  5. package/src/component/forms/CheckboxGroup.vue +72 -63
  6. package/src/component/forms/CheckboxSimple.vue +46 -27
  7. package/src/component/forms/Color.vue +38 -38
  8. package/src/component/forms/DateTime.vue +167 -177
  9. package/src/component/forms/Dropdown.vue +218 -224
  10. package/src/component/forms/EditorHtml.vue +126 -123
  11. package/src/component/forms/FileUpload.vue +185 -189
  12. package/src/component/forms/ImageUpload.vue +230 -0
  13. package/src/component/forms/IncrementDecrement.vue +101 -0
  14. package/src/component/forms/InputDecimal.vue +142 -137
  15. package/src/component/forms/InputNumber.vue +154 -149
  16. package/src/component/forms/InputPassword.vue +135 -135
  17. package/src/component/forms/InputText.vue +162 -157
  18. package/src/component/forms/Modal.vue +65 -60
  19. package/src/component/forms/RadioGroup.vue +50 -50
  20. package/src/component/forms/Select.vue +349 -337
  21. package/src/component/forms/SelectStatic.vue +127 -120
  22. package/src/component/forms/Slider.vue +18 -18
  23. package/src/component/forms/TextArea.vue +126 -126
  24. package/src/component/layout/Alert.vue +92 -92
  25. package/src/component/layout/Badge.vue +103 -103
  26. package/src/component/layout/FixedBar.vue +100 -68
  27. package/src/component/layout/Header.vue +38 -35
  28. package/src/component/layout/LoadingFullPage.vue +27 -27
  29. package/src/component/layout/Menu.vue +210 -214
  30. package/src/component/layout/Molded.vue +28 -27
  31. package/src/component/layout/Panel.vue +140 -142
  32. package/src/component/layout/Popover.vue +126 -126
  33. package/src/component/layout/ScrollBar.vue +42 -43
  34. package/src/component/layout/Tab.vue +135 -0
  35. package/src/component/layout/Tag.vue +3 -3
  36. package/src/component/layout/Wizard.vue +211 -213
  37. package/src/component/rental/DisplayPeriodRent.vue +81 -0
  38. package/src/component/rental/DisplayTotalization.vue +47 -0
  39. package/src/component/shared/Collapse.vue +131 -131
  40. package/src/component/shared/Confirmation.vue +2 -2
  41. package/src/component/shared/DocumentEditor.vue +1 -1
  42. package/src/component/shared/DocumentPreview.vue +1 -1
  43. package/src/component/shared/DocumentPublic.vue +34 -0
  44. package/src/component/shared/ExportExcel.vue +1 -8
  45. package/src/component/shared/ExportPDF.vue +116 -116
  46. package/src/component/shared/{HeaderPrint.vue → HeaderReport.vue} +4 -4
  47. package/src/component/shared/HorizontalFilter.vue +59 -59
  48. package/src/component/shared/Loading.vue +107 -107
  49. package/src/component/shared/LoadingMoreButton.vue +23 -23
  50. package/src/component/shared/Messages.vue +81 -83
  51. package/src/component/shared/PDFViewer.vue +22 -22
  52. package/src/component/shared/Pagination.vue +52 -53
  53. package/src/component/shared/{LegendaParametro.vue → ParameterLegend.vue} +22 -26
  54. package/src/component/shared/ProgressBar.vue +22 -21
  55. package/src/component/shared/QueryButton.vue +66 -66
  56. package/src/component/shared/Report.vue +187 -0
  57. package/src/component/shared/SaveCancel.vue +26 -5
  58. package/src/component/shared/Search.vue +154 -154
  59. package/src/component/shared/SelectOption.vue +146 -0
  60. package/src/component/shared/Table.vue +163 -243
  61. package/src/component/shared/TableButton.vue +36 -36
  62. package/src/component/shared/TableDraggable.vue +127 -0
  63. package/src/component/shared/TableItem.vue +177 -0
  64. package/src/component/shared/TableTotalRecords.vue +9 -10
  65. package/src/component/shared/TableTotalization.vue +47 -47
  66. package/src/component/shared/Tip.vue +42 -42
  67. package/src/component/shared/Toast.vue +54 -54
  68. package/src/component/shared/TotalizationReport.vue +59 -0
  69. package/src/component/shared/VerticalFilter.vue +97 -145
  70. package/src/component/shared/query-builder/AddRule.vue +181 -187
  71. package/src/component/shared/query-builder/ConvertToOdata.js +34 -43
  72. package/src/component/shared/query-builder/DynamicComponent.vue +21 -16
  73. package/src/component/shared/query-builder/DynamicComponentList.vue +73 -0
  74. package/src/component/shared/query-builder/Fields.vue +29 -63
  75. package/src/component/shared/query-builder/QueryBuilder.vue +69 -69
  76. package/src/component/shared/query-builder/Rules.vue +2 -14
  77. package/src/component/shared/query-builder/SelectRule.vue +15 -15
  78. package/src/component/shared/query-builder/Tags.vue +24 -8
  79. package/src/component/shared/query-builder/utilities.js +21 -21
  80. package/src/component/template/{ListViewWithHandlerData.vue → ListViewWithDataHandler.vue} +260 -231
  81. package/src/component/template/{AddEditReport.vue → ReportCreateUpdate.vue} +40 -22
  82. package/src/component/template/ViewTemplateConfiguration.vue +64 -69
  83. package/src/component/template/ViewTemplateDocumentView.vue +22 -25
  84. package/src/component/template/ViewTemplateReportList.vue +39 -57
  85. package/src/component/template/ViewTemplateReportPreview.vue +270 -341
  86. package/src/component/template/ViewTemplateReportPreviewCOPIASEGURANCA.vue +497 -0
  87. package/src/component/template/ViewTemplateSelectOption.vue +60 -0
  88. package/src/component/template/ViewTemplateWithSalveCancel.vue +32 -32
  89. package/src/component/template/ViewTemplateWithTable.vue +56 -49
  90. package/src/component/template/model/Report.js +2 -2
  91. package/src/component/value-objects/Address.js +11 -0
  92. package/src/component/value-objects/{Endereco.vue → Address.vue} +39 -40
  93. package/src/component/value-objects/{DadosContato.js → Contact.js} +2 -2
  94. package/src/component/value-objects/{DadosContato.vue → Contact.vue} +24 -17
  95. package/src/component/value-objects/Person.js +10 -0
  96. package/src/component/value-objects/{DadosPessoa.vue → Person.vue} +50 -35
  97. package/src/config/axios.js +9 -9
  98. package/src/config/dicas.js +14 -14
  99. package/src/config/router.js +13 -13
  100. package/src/config/token.js +14 -14
  101. package/src/main.js +23 -23
  102. package/src/store/modules/generic.js +512 -488
  103. package/src/store/modules/report.js +156 -127
  104. package/src/store/modules/user.js +6 -0
  105. package/src/store/modules/validation.js +38 -38
  106. package/src/store/store.js +13 -13
  107. package/docs/src/component/template/ModeloRelatorioView.drawio +0 -160
  108. package/src/component/shared/query-builder/ListDynamicComponent.vue +0 -42
  109. package/src/component/shared/query-builder/Totalization.vue +0 -38
  110. package/src/component/value-objects/DadosPessoa.js +0 -10
  111. package/src/component/value-objects/Endereco.js +0 -11
@@ -0,0 +1,177 @@
1
+ <template>
2
+ <div>
3
+ <div
4
+ v-if="obj.type === 'period-rent'"
5
+ class="period-rent"
6
+ @click="navegateTo(obj, row)"
7
+ :class="convertClass(row[obj.fieldComparison], obj.classCssBody)"
8
+ >
9
+ <DisplayPeriodRent :periodRent="row[obj.field]" :fontSize="14" :showDeliveryDevolution="true" />
10
+ </div>
11
+ <div
12
+ v-if="obj.type === 'text'"
13
+ :class="convertClass(row[obj.fieldComparison], obj.classCssBody)"
14
+ >
15
+ {{ row[obj.field] }}
16
+ <div>{{ row[obj.fieldSecond] }}</div>
17
+ </div>
18
+ <div v-if="obj.type === 'image'">
19
+ <img
20
+ :class="convertClass(row[obj.fieldComparison], obj.classCssBody)"
21
+ class="img"
22
+ :src="urlImage + obj.container + '/' + row[obj.field]"
23
+ />
24
+ </div>
25
+ <div v-if="obj.type === 'class'" class="text-center">
26
+ <div :class="convertClass(row[obj.fieldComparison], obj.classCssBody)">
27
+ {{ row[obj.field] }}
28
+ </div>
29
+ </div>
30
+ <div
31
+ v-if="obj.type === 'html'"
32
+ :class="convertClass(row[obj.fieldComparison], obj.classCssBody)"
33
+ >
34
+ <div v-if="row[obj.field]" v-html="row[obj.field]"></div>
35
+ <div v-else v-html="obj.html"></div>
36
+ </div>
37
+ <div
38
+ v-if="obj.type === 'select'"
39
+ :class="convertClass(row[obj.fieldComparison], obj.classCssBody)"
40
+ >
41
+ {{ row[obj.field].content }}
42
+ </div>
43
+ <div
44
+ v-if="obj.type === 'date'"
45
+ :class="convertClass(row[obj.fieldComparison], obj.classCssBody)"
46
+ >
47
+ {{ row[obj.field] | moment("DD/MM/YYYY") }}
48
+ </div>
49
+ <div
50
+ v-if="obj.type === 'dateTime'"
51
+ :class="convertClass(row[obj.fieldComparison], obj.classCssBody)"
52
+ >
53
+ {{ row[obj.field] | moment("DD/MM/YYYY HH:mm") }}
54
+ </div>
55
+ <div
56
+ v-if="obj.type === 'currency'"
57
+ :class="convertClass(row[obj.fieldComparison], obj.classCssBody)"
58
+ >
59
+ {{ row[obj.field] | currency }}
60
+ </div>
61
+ <div
62
+ v-if="obj.type === 'button'"
63
+ :class="convertClass(row[obj.fieldComparison], obj.classCssBody)"
64
+ >
65
+ <TableButton :obj="obj" :row="row" />
66
+ </div>
67
+ <div
68
+ v-if="obj.type === 'link'"
69
+ class="link"
70
+ :class="convertClass(row[obj.fieldComparison], obj.classCssBody)"
71
+ @click="navegateTo(obj, row)"
72
+ >
73
+ <span> {{ row[obj.field] }}</span>
74
+ <div class="field-second">{{ row[obj.fieldSecond] }}</div>
75
+ </div>
76
+ </div>
77
+ </template>
78
+ <script>
79
+ import TableButton from "@nixweb/nixloc-ui/src/component/shared/TableButton.vue";
80
+ import DisplayPeriodRent from "@nixweb/nixloc-ui/src/component/rental/DisplayPeriodRent";
81
+
82
+ import { mapMutations } from "vuex";
83
+
84
+ export default {
85
+ name: "TableItem",
86
+ components: { TableButton, DisplayPeriodRent },
87
+ props: {
88
+ obj: Object,
89
+ row: Object,
90
+ },
91
+ data() {
92
+ return {};
93
+ },
94
+ computed: {
95
+ urlImage() {
96
+ return "https://espaco.blob.core.windows.net/";
97
+ },
98
+ },
99
+ methods: {
100
+ ...mapMutations("generic", ["addSelected", "addEvent"]),
101
+ convertClass(fieldComparison, classCssBody) {
102
+ if (Array.isArray(classCssBody)) {
103
+ let ret = [];
104
+ classCssBody.forEach(function (value) {
105
+ let classCss = value.classCss;
106
+ let condition = value.fieldComparison == fieldComparison;
107
+ let obj = { [classCss]: condition };
108
+ ret.push(obj);
109
+ });
110
+ return ret;
111
+ } else {
112
+ return classCssBody;
113
+ }
114
+ },
115
+ navegateTo(obj, row) {
116
+ if (obj.routeName) {
117
+ this.$router.push({
118
+ name: obj.routeName,
119
+ params: { id: row.id, type: row.type },
120
+ });
121
+ } else {
122
+ this.addEvent({
123
+ name: obj.eventName,
124
+ data: row,
125
+ });
126
+ }
127
+ },
128
+ },
129
+ };
130
+ </script>
131
+ <style scoped>
132
+ .field-second {
133
+ color: rgb(83, 82, 82) !important;
134
+ }
135
+
136
+ .table-currency {
137
+ font-size: 14px;
138
+ min-width: 100px;
139
+ }
140
+
141
+ .link {
142
+ color: #3f529b;
143
+ font-size: 14px;
144
+ font-weight: 400;
145
+ cursor: pointer;
146
+ }
147
+
148
+ .link:hover {
149
+ text-decoration: underline;
150
+ transition: 0.1s;
151
+ }
152
+
153
+ .icon-link:hover {
154
+ font-size: 12.5px;
155
+ }
156
+
157
+ .center-vertical {
158
+ padding-top: 10px;
159
+ }
160
+
161
+ .badge-center {
162
+ margin: auto !important;
163
+ }
164
+
165
+ .img {
166
+ width: 50px;
167
+ height: 50px;
168
+ }
169
+
170
+ .img-round {
171
+ border-radius: 30px;
172
+ }
173
+
174
+ .period-rent {
175
+ cursor: pointer;
176
+ }
177
+ </style>
@@ -3,10 +3,10 @@
3
3
  <div class="col-sm-12 text-right">
4
4
  <span class="c-title">
5
5
  Total de
6
- <b-badge variant="warning">
7
- <span class="c-total">{{ totalRecords }}</span>
8
- </b-badge>
9
- <span class="records">registros</span>
6
+ <div class="badge">
7
+ <span class="total-records">{{ totalRecords }}</span>
8
+ </div>
9
+ <span class="records">registro(s)</span>
10
10
  </span>
11
11
  </div>
12
12
  </div>
@@ -33,13 +33,12 @@ export default {
33
33
  font-size: 14px;
34
34
  }
35
35
 
36
- .c-total {
37
- color: white;
38
- font-size: 14px;
36
+ .total-records {
37
+ font-size: 16px;
38
+ font-weight: 600;
39
39
  }
40
40
 
41
- .records{
41
+ .records {
42
42
  margin-left: 5px;
43
43
  }
44
-
45
- </style>
44
+ </style>
@@ -1,47 +1,47 @@
1
- <template>
2
- <div>
3
- <div
4
- class="badge-side-by-side text-center"
5
- v-for="item in totalization"
6
- :key="item.title"
7
- >
8
- <div class="badge-totalization" :class="item.classCss">
9
- <span>{{ item.title }}</span>
10
- <span>{{ item.value }}</span>
11
- </div>
12
- </div>
13
- </div>
14
- </template>
15
-
16
- <script>
17
- export default {
18
- name: "TableTotalization",
19
- props: {
20
- totalization: Array,
21
- },
22
- };
23
- </script>
24
-
25
- <style scoped>
26
- .badge-side-by-side {
27
- display: inline-block;
28
- margin-right: 3px;
29
- margin-bottom: 10px;
30
- }
31
-
32
- .badge-totalization {
33
- border: 1px solid #dbdee0;
34
- padding-left: 5px;
35
- padding-right: 5px;
36
- border-radius: 30px;
37
- font-size: 15px;
38
- }
39
-
40
- .receita {
41
- color: darkblue;
42
- }
43
-
44
- .despesa {
45
- color: red;
46
- }
47
- </style>
1
+ <template>
2
+ <div>
3
+ <div
4
+ class="badge-side-by-side text-center"
5
+ v-for="item in totalization"
6
+ :key="item.title"
7
+ >
8
+ <div class="badge-totalization" :class="item.classCss">
9
+ <span>{{ item.title }}</span>
10
+ <span>{{ item.value }}</span>
11
+ </div>
12
+ </div>
13
+ </div>
14
+ </template>
15
+
16
+ <script>
17
+ export default {
18
+ name: "TableTotalization",
19
+ props: {
20
+ totalization: Array,
21
+ },
22
+ };
23
+ </script>
24
+
25
+ <style scoped>
26
+ .badge-side-by-side {
27
+ display: inline-block;
28
+ margin-right: 3px;
29
+ margin-bottom: 10px;
30
+ }
31
+
32
+ .badge-totalization {
33
+ border: 1px solid #dbdee0;
34
+ padding-left: 5px;
35
+ padding-right: 5px;
36
+ border-radius: 30px;
37
+ font-size: 15px;
38
+ }
39
+
40
+ .receita {
41
+ color: darkblue;
42
+ }
43
+
44
+ .despesa {
45
+ color: red;
46
+ }
47
+ </style>
@@ -1,42 +1,42 @@
1
- <template>
2
- <span class="tip" v-if="title">
3
- <i
4
- class="fal fa-exclamation-circle"
5
- :title="title"
6
- v-b-popover.hover.top="description"
7
- ></i>
8
- </span>
9
- </template>
10
- <script>
11
- import { mapGetters } from "vuex";
12
-
13
- export default {
14
- name: "Tip",
15
- props: {
16
- field: String,
17
- formName: String,
18
- },
19
- data() {
20
- return {
21
- title: "",
22
- description: "",
23
- };
24
- },
25
- mounted() {
26
- let tip = this.tip({ field: this.field, formName: this.formName });
27
- if (tip) {
28
- this.title = tip.title;
29
- this.description = tip.description;
30
- }
31
- },
32
- computed: {
33
- ...mapGetters("generic", ["tip"]),
34
- },
35
- };
36
- </script>
37
-
38
- <style scoped>
39
- .tip {
40
- cursor: pointer;
41
- }
42
- </style>
1
+ <template>
2
+ <span class="tip" v-if="title">
3
+ <i
4
+ class="fal fa-exclamation-circle"
5
+ :title="title"
6
+ v-b-popover.hover.top="description"
7
+ ></i>
8
+ </span>
9
+ </template>
10
+ <script>
11
+ import { mapGetters } from "vuex";
12
+
13
+ export default {
14
+ name: "Tip",
15
+ props: {
16
+ field: String,
17
+ formName: String,
18
+ },
19
+ data() {
20
+ return {
21
+ title: "",
22
+ description: "",
23
+ };
24
+ },
25
+ mounted() {
26
+ let tip = this.tip({ field: this.field, formName: this.formName });
27
+ if (tip) {
28
+ this.title = tip.title;
29
+ this.description = tip.description;
30
+ }
31
+ },
32
+ computed: {
33
+ ...mapGetters("generic", ["tip"]),
34
+ },
35
+ };
36
+ </script>
37
+
38
+ <style scoped>
39
+ .tip {
40
+ cursor: pointer;
41
+ }
42
+ </style>
@@ -1,54 +1,54 @@
1
- <template></template>
2
-
3
- <script>
4
- import { mapState } from "vuex";
5
-
6
- export default {
7
- name: "Notificacao",
8
- computed: {
9
- ...mapState("generic", ["toast"]),
10
- },
11
- watch: {
12
- toast: {
13
- handler(value) {
14
- this.notifica(value);
15
- },
16
- deep: true,
17
- },
18
- },
19
- methods: {
20
- notifica(value) {
21
- if (value.type == "postApi" || value.type == "putApi")
22
- this.$toasted.show("Salvo com success", {
23
- type: "success",
24
- });
25
- if (value.type == "postApiError" || value.type == "putApiErro") {
26
- this.$toasted.show("Ops! Algo deu errado", {
27
- type: "error",
28
- });
29
- this.voltarParaTopo();
30
- }
31
-
32
- if (value.type == "removerTodosApiSucesso")
33
- this.$toasted.show("Removido com success", {
34
- type: "success",
35
- });
36
- if (value.type == "removerTodosApiErro") {
37
- this.$toasted.show("Ops! Algo deu errado", {
38
- type: "error",
39
- });
40
- this.voltarParaTopo();
41
- }
42
- if (value.type == "falhaGenerica") {
43
- this.$toasted.show("Ops! Algo deu errado", {
44
- type: "error",
45
- });
46
- this.voltarParaTopo();
47
- }
48
- },
49
- voltarParaTopo() {
50
- window.scrollTo(0, 0);
51
- },
52
- },
53
- };
54
- </script>
1
+ <template></template>
2
+
3
+ <script>
4
+ import { mapState } from "vuex";
5
+
6
+ export default {
7
+ name: "Notificacao",
8
+ computed: {
9
+ ...mapState("generic", ["toast"]),
10
+ },
11
+ watch: {
12
+ toast: {
13
+ handler(value) {
14
+ this.notifica(value);
15
+ },
16
+ deep: true,
17
+ },
18
+ },
19
+ methods: {
20
+ notifica(value) {
21
+ if (value.type == "postApi" || value.type == "putApi")
22
+ this.$toasted.show("Salvo com sucesso", {
23
+ type: "success",
24
+ });
25
+ if (value.type == "postApiError" || value.type == "putApiErro") {
26
+ this.$toasted.show("Ops! Algo deu errado", {
27
+ type: "error",
28
+ });
29
+ this.voltarParaTopo();
30
+ }
31
+
32
+ if (value.type == "removerTodosApiSucesso")
33
+ this.$toasted.show("Removido com sucesso", {
34
+ type: "success",
35
+ });
36
+ if (value.type == "removerTodosApiErro") {
37
+ this.$toasted.show("Ops! Algo deu errado", {
38
+ type: "error",
39
+ });
40
+ this.voltarParaTopo();
41
+ }
42
+ if (value.type == "falhaGenerica") {
43
+ this.$toasted.show("Ops! Algo deu errado", {
44
+ type: "error",
45
+ });
46
+ this.voltarParaTopo();
47
+ }
48
+ },
49
+ voltarParaTopo() {
50
+ window.scrollTo(0, 0);
51
+ },
52
+ },
53
+ };
54
+ </script>
@@ -0,0 +1,59 @@
1
+ <template>
2
+ <div>
3
+ <hr class="hr-report" />
4
+ <div class="text-right">
5
+ <span class="title"> Total de Registro(s) </span>
6
+ <span class="title value"> {{ totalRecords }} </span>
7
+ </div>
8
+ <div class="text-right" v-for="item in totalization" :key="item.title">
9
+ <span :class="convertName(item[0]).classCss">
10
+ <span class="title">
11
+ {{ convertName(item[0]).title }}
12
+ <span class="title value">
13
+ <span v-if="convertName(item[0]).type == 'currency'">
14
+ {{ item[1] | currency }}
15
+ </span>
16
+ <span v-if="convertName(item[0]).type == 'numeric'">
17
+ {{ Math.round(item[1]) }}
18
+ </span>
19
+ </span>
20
+ </span>
21
+ </span>
22
+ </div>
23
+ </div>
24
+ </template>
25
+ <script>
26
+ import { mapState, mapGetters, mapActions, mapMutations } from "vuex";
27
+
28
+ export default {
29
+ name: "TotalizationReport",
30
+ props: ["totalization", "totalRecords"],
31
+ computed: {
32
+ ...mapState("report", ["finalQueryFormatOData"]),
33
+ },
34
+ methods: {
35
+ convertName(value) {
36
+ var filter = this.finalQueryFormatOData.totalization.filter((item) => {
37
+ return item.value == value;
38
+ });
39
+ return Object.assign(filter[0]);
40
+ },
41
+ },
42
+ };
43
+ </script>
44
+
45
+ <style scoped>
46
+ .title {
47
+ font-size: 15px;
48
+ font-weight: 400;
49
+ }
50
+
51
+ .value {
52
+ margin-left: 50px;
53
+ }
54
+
55
+ .hr-report {
56
+ background: black !important;
57
+ height: 0px !important;
58
+ }
59
+ </style>