@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,126 +1,126 @@
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
+ <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,185 +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="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>
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>
@@ -14,8 +14,9 @@
14
14
  <b-col sm="12">
15
15
  <div class="div-preview">
16
16
  <img
17
- :style="'width:120;height:100px'"
18
- :src="'https://espaco.blob.core.windows.net/nixloc-photo-product/' + urlImage"
17
+ :class="classCss"
18
+ :style="'width:100px;height:100px'"
19
+ :src="'https://espaco.blob.core.windows.net/' + container + '/' + urlImage"
19
20
  />
20
21
  </div>
21
22
  <div>
@@ -31,7 +32,9 @@
31
32
  <div v-else>
32
33
  <div class="div-button">
33
34
  <button class="button small danger" v-if="!loadingAdd" @click="remove()">
34
- <span v-if="!loadingRemove"><i class="fas fa-camera"></i> Remover Foto</span>
35
+ <span v-if="!loadingRemove"
36
+ ><i class="fas fa-camera"></i> Remover Foto</span
37
+ >
35
38
  <vue-loading
36
39
  v-if="loadingRemove"
37
40
  type="bubbles"
@@ -70,6 +73,7 @@ export default {
70
73
  title: String,
71
74
  container: String,
72
75
  accepted: String,
76
+ classCss:String,
73
77
  urlPost: String,
74
78
  urlRemove: String,
75
79
  onLoad: Function,
@@ -216,7 +220,11 @@ export default {
216
220
  margin-bottom: 10px;
217
221
  }
218
222
 
223
+ .img-round {
224
+ border-radius: 50px;
225
+ }
226
+
219
227
  .div-button {
220
- margin-left: 18px;
228
+ margin-left: 5px;
221
229
  }
222
230
  </style>