@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
@@ -1,123 +1,126 @@
1
- <template>
2
- <div>
3
- <label>
4
- <span class="title">{{ title }}</span>
5
- <span class="required" v-if="required">*</span>
6
- <Tip :field="field" :formName="formName" />
7
- </label>
8
- <div class="inner-addon right-addon">
9
- <i
10
- v-if="notifications.length > 0 && formDirty"
11
- class="required glyphicon fas fa-exclamation-triangle"
12
- ></i>
13
- <vue-editor v-model.trim="value" :editorToolbar="customToolbar"></vue-editor>
14
- </div>
15
-
16
- <div v-if="formDirty">
17
- <div v-for="message in notifications" :key="message">
18
- <span class="invalid">{{ message }}</span>
19
- </div>
20
- </div>
21
- </div>
22
- </template>
23
-
24
- <script>
25
- import Tip from "../shared/Tip.vue";
26
- import { VueEditor } from "vue2-editor";
27
-
28
- import { mapState, mapMutations } from "vuex";
29
-
30
- export default {
31
- components: { Tip, VueEditor },
32
- name: "EditorHtml",
33
- mixins: [],
34
- props: {
35
- title: String,
36
- field: String,
37
- formName: String,
38
- required: Boolean,
39
- maxLength: Number,
40
- value: String,
41
- },
42
- data() {
43
- return {
44
- notifications: [],
45
- formDirty: false,
46
- textoEditor: "",
47
- customToolbar: [
48
- ["bold", "italic", "underline"],
49
- [{ list: "ordered" }, { list: "bullet" }],
50
- [{ align: "" }, { align: "center" }, { align: "right" }, { align: "justify" }],
51
- [{ header: [false] }],
52
- ],
53
- };
54
- },
55
- created() {
56
- this.validate();
57
- },
58
- methods: {
59
- ...mapMutations("validation", ["addValidation", "removeValidation"]),
60
- validate() {
61
- this.notifications = [];
62
-
63
- if (this.required && this.value.length == 0) {
64
- var message = `${this.title} não pode ser vazio!`;
65
- this.notifications.push(message);
66
- }
67
-
68
- if (this.maxLength > 0) {
69
- if (this.value.length > this.maxLength) {
70
- var message = `Máximo de ${this.maxLength} caracteres!`;
71
- this.notifications.push(message);
72
- }
73
- }
74
- },
75
- },
76
- computed: {
77
- ...mapState("validation", ["resetForm", "validations"]),
78
- },
79
- watch: {
80
- value() {
81
- this.validate();
82
- this.formDirty = true;
83
- this.$emit("input", this.value);
84
- },
85
- notifications() {
86
- let self = this;
87
- this.notifications.forEach(function (notification) {
88
- let obj = {
89
- key: self.field + "&" + self.formName,
90
- formName: self.formName,
91
- notification: notification,
92
- };
93
- self.addValidation(obj);
94
- });
95
-
96
- if (this.notifications.length == 0) {
97
- let obj = {
98
- key: self.field + "&" + self.formName,
99
- formName: self.formName,
100
- };
101
- self.removeValidation(obj);
102
- }
103
- },
104
- resetForm: {
105
- handler(form) {
106
- if (form.nome == this.formName) this.formDirty = false;
107
- },
108
- deep: true,
109
- },
110
- },
111
- };
112
- </script>
113
-
114
- <style scoped>
115
- .success {
116
- color: #94aa2a;
117
- font-size: 14px;
118
- }
119
- .invalid {
120
- color: #f0134d;
121
- font-size: 14px;
122
- }
123
- </style>
1
+ <template>
2
+ <div class="div-main">
3
+ <label>
4
+ <span class="title">{{ title }}</span>
5
+ <span class="required" v-if="required">*</span>
6
+ <Tip :field="field" :formName="formName" />
7
+ </label>
8
+ <div class="inner-addon right-addon">
9
+ <i
10
+ v-if="notifications.length > 0 && formDirty"
11
+ class="required glyphicon fas fa-exclamation-triangle"
12
+ ></i>
13
+ <vue-editor v-model.trim="value" :editorToolbar="customToolbar"></vue-editor>
14
+ </div>
15
+
16
+ <div v-if="formDirty">
17
+ <div v-for="message in notifications" :key="message">
18
+ <span class="invalid">{{ message }}</span>
19
+ </div>
20
+ </div>
21
+ </div>
22
+ </template>
23
+
24
+ <script>
25
+ import Tip from "../shared/Tip.vue";
26
+ import { VueEditor } from "vue2-editor";
27
+
28
+ import { mapState, mapMutations } from "vuex";
29
+
30
+ export default {
31
+ components: { Tip, VueEditor },
32
+ name: "EditorHtml",
33
+ mixins: [],
34
+ props: {
35
+ title: String,
36
+ field: String,
37
+ formName: String,
38
+ required: Boolean,
39
+ maxLength: Number,
40
+ value: String,
41
+ },
42
+ data() {
43
+ return {
44
+ notifications: [],
45
+ formDirty: false,
46
+ textoEditor: "",
47
+ customToolbar: [
48
+ ["bold", "italic", "underline"],
49
+ ],
50
+ };
51
+ },
52
+ created() {
53
+ this.validate();
54
+ },
55
+ methods: {
56
+ ...mapMutations("validation", ["addValidation", "removeValidation", "updateFormDirty"]),
57
+ validate() {
58
+ this.notifications = [];
59
+
60
+ if (this.required && this.value.length == 0) {
61
+ var message = `${this.title} não pode ser vazio!`;
62
+ this.notifications.push(message);
63
+ }
64
+
65
+ if (this.maxLength > 0) {
66
+ if (this.value.length > this.maxLength) {
67
+ var message = `Máximo de ${this.maxLength} caracteres!`;
68
+ this.notifications.push(message);
69
+ }
70
+ }
71
+ },
72
+ },
73
+ computed: {
74
+ ...mapState("validation", ["resetForm", "validations"]),
75
+ },
76
+ watch: {
77
+ value() {
78
+ this.validate();
79
+ this.formDirty = true;
80
+ this.$emit("input", this.value);
81
+ this.updateFormDirty(true);
82
+ },
83
+ notifications() {
84
+ let self = this;
85
+ this.notifications.forEach(function (notification) {
86
+ let obj = {
87
+ key: self.field + "&" + self.formName,
88
+ formName: self.formName,
89
+ notification: notification,
90
+ };
91
+ self.addValidation(obj);
92
+ });
93
+
94
+ if (this.notifications.length == 0) {
95
+ let obj = {
96
+ key: self.field + "&" + self.formName,
97
+ formName: self.formName,
98
+ };
99
+ self.removeValidation(obj);
100
+ }
101
+ },
102
+ resetForm: {
103
+ handler(form) {
104
+ if (form.nome == this.formName) this.formDirty = false;
105
+ },
106
+ deep: true,
107
+ },
108
+ },
109
+ };
110
+ </script>
111
+
112
+ <style scoped>
113
+ .div-main {
114
+ margin-top: 10px;
115
+ margin-bottom: 10px;
116
+ }
117
+
118
+ .success {
119
+ color: #94aa2a;
120
+ font-size: 14px;
121
+ }
122
+ .invalid {
123
+ color: #f0134d;
124
+ font-size: 14px;
125
+ }
126
+ </style>
@@ -1,189 +1,185 @@
1
- <template>
2
- <div>
3
- <div>
4
- <div class="file" v-if="!value">
5
- <button class="button small primary">
6
- <span v-if="!loadingAdd">
7
- <i class="fas fa-cloud-upload-alt"></i> {{ title }}</span
8
- >
9
- <vue-loading
10
- v-if="loadingAdd"
11
- type="bubbles"
12
- color="#fff"
13
- :size="{ width: '20px', height: '20px' }"
14
- ></vue-loading>
15
- </button>
16
- <input
17
- type="file"
18
- name="myfile"
19
- ref="file"
20
- :accept="accepted"
21
- v-on:change="upload()"
22
- />
23
- </div>
24
- <div v-if="value">
25
- <button class="button small success" @click="download()" v-if="!loadingAdd">
26
- <i class="fas fa-cloud-download-alt"></i> Baixar
27
- </button>
28
- <button class="button small danger" v-if="!loadingAdd" @click="remove()">
29
- <span v-if="!loadingRemove"></span>
30
- <vue-loading
31
- v-if="loadingRemove"
32
- type="bubbles"
33
- color="#fff"
34
- :size="{ width: '20px', height: '20px' }"
35
- ></vue-loading>
36
- </button>
37
- </div>
38
- <div class="div-alert">
39
- <Alert type="info" v-if="value">
40
- <span>{{ message }}</span>
41
- </Alert>
42
- </div>
43
- </div>
44
- </div>
45
- </template>
46
-
47
- <script>
48
- import Alert from "../layout/Alert.vue";
49
-
50
- import { mapActions } from "vuex";
51
-
52
- export default {
53
- name: "FileUpload",
54
- components: { Alert },
55
- props: {
56
- title: String,
57
- name: String,
58
- container: String,
59
- accepted: String,
60
- message: String,
61
- urlPost: String,
62
- urlRemove: String,
63
- nameDataBase: String,
64
- onLoad: Function,
65
- value: String,
66
- },
67
- data() {
68
- return {
69
- file: "",
70
- loadingAdd: false,
71
- loadingRemove: false,
72
- urlAzure: "https://espaco.blob.core.windows.net",
73
- };
74
- },
75
- methods: {
76
- ...mapActions("generic", ["postFileApi", "deleteFileApi"]),
77
- upload() {
78
- this.file = this.$refs.file.files[0];
79
- let params = {
80
- url: this.urlPost,
81
- file: this.file,
82
- container: this.container,
83
- name: this.name,
84
- accepted: this.accepted,
85
- };
86
- this.loadingAdd = true;
87
- this.postFileApi(params).then((response) => {
88
- if (response.success) {
89
- if (this.onLoad) this.onLoad();
90
- this.$emit("input", response.content);
91
- } else {
92
- this.clear();
93
- }
94
- this.loadingAdd = false;
95
- });
96
- },
97
- remove() {
98
- let props = {
99
- url: this.urlRemove,
100
- container: this.container,
101
- name: this.nameDataBase,
102
- };
103
- this.loadingRemove = true;
104
- let params = { url: this.urlRemove, obj: props };
105
- this.deleteFileApi(params).then((response) => {
106
- if (response.success) {
107
- if (this.onLoad) this.onLoad();
108
- this.clear();
109
- this.$emit("input", "");
110
- }
111
- this.loadingRemove = false;
112
- });
113
- },
114
- clear() {
115
- this.file = "";
116
- },
117
- download() {
118
- const url = `${this.urlAzure}/${this.container}/${this.nameDataBase}`;
119
- window.location.href = url;
120
- },
121
- },
122
- };
123
- </script>
124
-
125
- <style scoped>
126
- .file {
127
- position: relative;
128
- overflow: hidden;
129
- display: inline-block;
130
- cursor: pointer;
131
- }
132
-
133
- .button {
134
- padding: 8px 12px;
135
- cursor: pointer;
136
- border: none;
137
- border-radius: 40px !important;
138
- font-size: 14px;
139
- font-weight: 400;
140
- }
141
-
142
- .primary {
143
- background: #577696;
144
- border-color: #577696;
145
- color: #fff;
146
- }
147
-
148
- .primary:hover {
149
- background: #355472;
150
- }
151
-
152
- .success {
153
- color: #fff;
154
- background: #94aa2a;
155
- border-color: #94aa2a;
156
- }
157
-
158
- .success:hover {
159
- background: #6d7e1c;
160
- }
161
-
162
- .danger {
163
- color: #fff;
164
- border-color: #f0134d;
165
- background: #f0134d;
166
- margin-left: 5px;
167
- }
168
-
169
- .danger:hover {
170
- background: #c70f40;
171
- }
172
-
173
- .small {
174
- padding: 5px 10px;
175
- font-size: 13px;
176
- }
177
-
178
- .file input[type="file"] {
179
- font-size: 100px;
180
- position: absolute;
181
- left: 0;
182
- top: 0;
183
- opacity: 0;
184
- }
185
-
186
- .div-alert {
187
- margin-top: 15px;
188
- }
189
- </style>
1
+ <template>
2
+ <div>
3
+ <div>
4
+ <div class="file" v-if="!value">
5
+ <button class="button small primary">
6
+ <span v-if="!loadingAdd">
7
+ <i class="fas fa-cloud-upload-alt"></i> {{ title }}</span
8
+ >
9
+ <vue-loading
10
+ v-if="loadingAdd"
11
+ type="bubbles"
12
+ color="#fff"
13
+ :size="{ width: '20px', height: '20px' }"
14
+ ></vue-loading>
15
+ </button>
16
+ <input
17
+ type="file"
18
+ name="myfile"
19
+ ref="file"
20
+ :accept="allowed"
21
+ v-on:change="upload()"
22
+ />
23
+ </div>
24
+ <div v-if="value">
25
+ <button class="button small success" @click="download()" v-if="!loadingAdd">
26
+ <i class="fas fa-cloud-download-alt"></i> Baixar
27
+ </button>
28
+ <button class="button small danger" v-if="!loadingAdd" @click="remove()">
29
+ <span v-if="!loadingRemove">Remover</span>
30
+ <vue-loading
31
+ v-if="loadingRemove"
32
+ type="bubbles"
33
+ color="#fff"
34
+ :size="{ width: '20px', height: '20px' }"
35
+ ></vue-loading>
36
+ </button>
37
+ </div>
38
+ </div>
39
+ </div>
40
+ </template>
41
+
42
+ <script>
43
+ import { mapActions } from "vuex";
44
+
45
+ export default {
46
+ name: "FileUpload",
47
+ props: {
48
+ title: String,
49
+ container: String,
50
+ allowed: String,
51
+ accepted: String,
52
+ message: String,
53
+ urlPost: String,
54
+ urlRemove: String,
55
+ nameDataBase: String,
56
+ onLoad: Function,
57
+ value: String,
58
+ },
59
+ data() {
60
+ return {
61
+ file: "",
62
+ loadingAdd: false,
63
+ loadingRemove: false,
64
+ urlAzure: "https://espaco.blob.core.windows.net",
65
+ };
66
+ },
67
+ methods: {
68
+ ...mapActions("generic", ["postFileApi", "deleteFileApi"]),
69
+ upload() {
70
+ this.file = this.$refs.file.files[0];
71
+ let params = {
72
+ url: this.urlPost,
73
+ file: this.file,
74
+ container: this.container,
75
+ name: this.name,
76
+ accepted: this.accepted,
77
+ };
78
+ this.loadingAdd = true;
79
+ this.postFileApi(params).then((response) => {
80
+ if (response.success) {
81
+ if (this.onLoad) this.onLoad();
82
+ this.$emit("input", response.content);
83
+ } else {
84
+ this.clear();
85
+ }
86
+ this.loadingAdd = false;
87
+ });
88
+ },
89
+ remove() {
90
+ let props = {
91
+ url: this.urlRemove,
92
+ container: this.container,
93
+ name: this.nameDataBase,
94
+ };
95
+ this.loadingRemove = true;
96
+ let params = { url: this.urlRemove, obj: props };
97
+ this.deleteFileApi(params).then((response) => {
98
+ if (response.success) {
99
+ if (this.onLoad) this.onLoad();
100
+ this.clear();
101
+ this.$emit("input", "");
102
+ }
103
+ this.loadingRemove = false;
104
+ });
105
+ },
106
+ clear() {
107
+ this.file = "";
108
+ },
109
+ download() {
110
+ const url = `${this.urlAzure}/${this.container}/${this.nameDataBase}`;
111
+ window.location.href = url;
112
+ },
113
+ },
114
+ };
115
+ </script>
116
+
117
+ <style scoped>
118
+ .file {
119
+ position: relative;
120
+ overflow: hidden;
121
+ display: inline-block;
122
+ cursor: pointer;
123
+ }
124
+
125
+ .button {
126
+ padding: 8px 12px;
127
+ cursor: pointer;
128
+ border: none;
129
+ border-radius: 40px !important;
130
+ font-size: 14px;
131
+ font-weight: 400;
132
+ }
133
+
134
+ .primary {
135
+ background: #577696;
136
+ border-color: #577696;
137
+ color: #fff;
138
+ }
139
+
140
+ .primary:hover {
141
+ background: #355472;
142
+ }
143
+
144
+ .success {
145
+ color: #fff;
146
+ background: #94aa2a;
147
+ border-color: #94aa2a;
148
+ }
149
+
150
+ .success:hover {
151
+ background: #6d7e1c;
152
+ }
153
+
154
+ .danger {
155
+ color: #fff;
156
+ border-color: #f0134d;
157
+ background: #f0134d;
158
+ margin-left: 5px;
159
+ }
160
+
161
+ .danger:hover {
162
+ background: #c70f40;
163
+ }
164
+
165
+ .small {
166
+ padding: 5px 10px;
167
+ font-size: 13px;
168
+ }
169
+
170
+ .file input[type="file"] {
171
+ font-size: 100px;
172
+ position: absolute;
173
+ left: 0;
174
+ top: 0;
175
+ opacity: 0;
176
+ }
177
+
178
+ .div-alert {
179
+ margin-top: 15px;
180
+ }
181
+
182
+ .div-image {
183
+ margin-bottom: 10px;
184
+ }
185
+ </style>