@nixweb/nixloc-ui 0.0.128 → 0.0.129

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 (84) hide show
  1. package/package.json +87 -79
  2. package/src/App.vue +13 -13
  3. package/src/component/forms/Button.vue +171 -170
  4. package/src/component/forms/ButtonGroup.vue +57 -0
  5. package/src/component/forms/ButtonSub.vue +98 -0
  6. package/src/component/forms/CheckboxGroup.vue +73 -72
  7. package/src/component/forms/CheckboxSimple.vue +46 -46
  8. package/src/component/forms/Color.vue +38 -38
  9. package/src/component/forms/DateTime.vue +167 -167
  10. package/src/component/forms/Dropdown.vue +242 -218
  11. package/src/component/forms/EditorHtml.vue +126 -126
  12. package/src/component/forms/FileUpload.vue +185 -185
  13. package/src/component/forms/IncrementDecrement.vue +7 -2
  14. package/src/component/forms/InputDecimal.vue +150 -142
  15. package/src/component/forms/InputDecimalDiscount.vue +92 -0
  16. package/src/component/forms/InputNumber.vue +160 -154
  17. package/src/component/forms/InputPassword.vue +135 -135
  18. package/src/component/forms/InputText.vue +174 -162
  19. package/src/component/forms/InputTextEdit.vue +68 -0
  20. package/src/component/forms/Modal.vue +65 -65
  21. package/src/component/forms/RadioGroup.vue +50 -50
  22. package/src/component/forms/Select.vue +351 -349
  23. package/src/component/forms/SelectStatic.vue +127 -127
  24. package/src/component/forms/Slider.vue +18 -18
  25. package/src/component/forms/TextArea.vue +126 -126
  26. package/src/component/forms/Toggle.vue +3 -1
  27. package/src/component/layout/Account.vue +3 -3
  28. package/src/component/layout/Alert.vue +92 -92
  29. package/src/component/layout/Badge.vue +104 -103
  30. package/src/component/layout/FixedBar.vue +100 -100
  31. package/src/component/layout/Gantt.vue +130 -0
  32. package/src/component/layout/Header.vue +38 -38
  33. package/src/component/layout/IconMolded.vue +48 -0
  34. package/src/component/layout/LoadingFullPage.vue +27 -27
  35. package/src/component/layout/Menu.vue +213 -210
  36. package/src/component/layout/Molded.vue +28 -28
  37. package/src/component/layout/Panel.vue +140 -140
  38. package/src/component/layout/Popover.vue +126 -126
  39. package/src/component/layout/ScrollBar.vue +42 -42
  40. package/src/component/layout/Wizard.vue +211 -211
  41. package/src/component/rental/DisplayCalculatePeriod.vue +49 -0
  42. package/src/component/rental/DisplayPeriodRent.vue +19 -44
  43. package/src/component/rental/DisplayTotalization.vue +11 -2
  44. package/src/component/shared/Collapse.vue +131 -131
  45. package/src/component/shared/Confirmation.vue +21 -2
  46. package/src/component/shared/DocumentPreview.vue +2 -1
  47. package/src/component/shared/ExportPDF.vue +116 -116
  48. package/src/component/shared/FullCalendar.vue +159 -0
  49. package/src/component/shared/HorizontalFilter.vue +59 -59
  50. package/src/component/shared/Loading.vue +107 -107
  51. package/src/component/shared/LoadingMoreButton.vue +23 -23
  52. package/src/component/shared/Messages.vue +81 -81
  53. package/src/component/shared/PDFViewer.vue +22 -22
  54. package/src/component/shared/Pagination.vue +52 -52
  55. package/src/component/shared/ProgressBar.vue +22 -22
  56. package/src/component/shared/QueryButton.vue +66 -66
  57. package/src/component/shared/SaveCancel.vue +3 -2
  58. package/src/component/shared/Search.vue +154 -154
  59. package/src/component/shared/Table.vue +163 -163
  60. package/src/component/shared/TableButton.vue +36 -36
  61. package/src/component/shared/TableTotalization.vue +47 -47
  62. package/src/component/shared/TimeLine.vue +47 -0
  63. package/src/component/shared/Tip.vue +42 -42
  64. package/src/component/shared/Toast.vue +54 -54
  65. package/src/component/shared/VerticalFilter.vue +97 -97
  66. package/src/component/shared/query-builder/AddRule.vue +181 -181
  67. package/src/component/shared/query-builder/DynamicComponentList.vue +73 -73
  68. package/src/component/shared/query-builder/QueryBuilder.vue +69 -69
  69. package/src/component/shared/query-builder/utilities.js +21 -21
  70. package/src/component/template/ListViewWithDataHandler.vue +260 -260
  71. package/src/component/template/ViewTemplateConfiguration.vue +64 -64
  72. package/src/component/template/ViewTemplateReportList.vue +1 -1
  73. package/src/component/template/ViewTemplateReportPreview.vue +0 -1
  74. package/src/component/template/ViewTemplateWithSalveCancel.vue +32 -32
  75. package/src/component/template/ViewTemplateWithTable.vue +56 -56
  76. package/src/config/axios.js +9 -9
  77. package/src/config/dicas.js +14 -14
  78. package/src/config/router.js +13 -13
  79. package/src/config/token.js +14 -14
  80. package/src/main.js +23 -23
  81. package/src/store/modules/generic.js +543 -512
  82. package/src/store/modules/user.js +3 -0
  83. package/src/store/modules/validation.js +38 -38
  84. package/src/store/store.js +13 -13
@@ -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>
@@ -2,7 +2,9 @@
2
2
  <div>
3
3
  <div class="wrapper">
4
4
  <span class="minus" @click="decrement">-</span>
5
- <span class="num" @click="showEdit = true" v-if="!showEdit">{{ number }}</span>
5
+ <span class="num" @click="showEdit = true" v-if="!showEdit">{{
6
+ number
7
+ }}</span>
6
8
  <input
7
9
  class="input"
8
10
  type="number"
@@ -28,6 +30,9 @@ export default {
28
30
  showEdit: false,
29
31
  };
30
32
  },
33
+ mounted() {
34
+ this.number = this.value;
35
+ },
31
36
  methods: {
32
37
  increment() {
33
38
  this.number++;
@@ -57,7 +62,7 @@ export default {
57
62
  };
58
63
  </script>
59
64
 
60
- <style scope>
65
+ <style scoped>
61
66
  .input {
62
67
  width: 40px;
63
68
  border: none;