@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,154 +1,160 @@
1
- <template>
2
- <div class="form-group">
3
- <label v-if="title">
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
- <slot v-else></slot>
14
- <input
15
- class="form-control"
16
- type="number"
17
- v-model="valueLocal"
18
- @keyup.enter.prevent="pressedEnter"
19
- />
20
- </div>
21
-
22
- <div v-if="formDirty">
23
- <div v-for="message in notifications" :key="message">
24
- <span class="invalid">{{ message }}</span>
25
- </div>
26
- </div>
27
- </div>
28
- </template>
29
-
30
- <script>
31
- import Tip from "../shared/Tip.vue";
32
-
33
- import { mapState, mapMutations } from "vuex";
34
-
35
- export default {
36
- name: "InputNumber",
37
- components: { Tip },
38
- props: {
39
- title: String,
40
- field: String,
41
- placeholder: String,
42
- disabled: Boolean,
43
- formName: String,
44
- required: Boolean,
45
- maxLength: Number,
46
- type: {
47
- type: String,
48
- default: "float",
49
- },
50
- markFormDirty: {
51
- type: Boolean,
52
- default: true,
53
- },
54
- params: Object,
55
- value: Number,
56
- changed: Function,
57
- enter: Function,
58
- },
59
- data() {
60
- return {
61
- notifications: [],
62
- formDirty: false,
63
- valueLocal: 0,
64
- precision: 1,
65
- };
66
- },
67
- created() {
68
- // não carregar as validações iniciais para number
69
- this.valueLocal = this.value;
70
- },
71
-
72
- methods: {
73
- ...mapMutations("validation", [
74
- "addValidation",
75
- "removeValidation",
76
- "updateFormDirty",
77
- ]),
78
- validate() {
79
- this.notifications = [];
80
- if (this.value == 0) return;
81
- if (this.required && !this.value) {
82
- var message = `${this.title} não pode ser vazio!`;
83
- this.notifications.push(message);
84
- }
85
-
86
- if (this.valueLocal.toString().length > this.maxLength) {
87
- var message = `Valor inválido!`;
88
- this.notifications.push(message);
89
- }
90
- },
91
- pressedEnter() {
92
- if (this.enter) this.enter(this.params);
93
- },
94
- },
95
- computed: {
96
- ...mapState("validation", ["resetForm"]),
97
- },
98
- watch: {
99
- value() {
100
- this.valueLocal = this.value;
101
- if (this.changed) this.changed();
102
- },
103
- valueLocal() {
104
- this.validate();
105
-
106
- let valueLocal;
107
- if (this.type === "int") valueLocal = parseInt(this.valueLocal);
108
- if (this.type === "float") valueLocal = parseFloat(this.valueLocal);
109
-
110
- this.$emit("input", valueLocal);
111
- this.formDirty = true;
112
- if (this.markFormDirty) this.updateFormDirty(true);
113
-
114
- this.valueLocal = valueLocal;
115
- },
116
- notifications() {
117
- let self = this;
118
- this.notifications.forEach(function (notification) {
119
- let obj = {
120
- key: self.field + "&" + self.formName,
121
- formName: self.formName,
122
- notification: notification,
123
- };
124
- self.addValidation(obj);
125
- });
126
-
127
- if (this.notifications.length == 0) {
128
- let obj = {
129
- key: self.field + "&" + self.formName,
130
- formName: self.formName,
131
- };
132
- self.removeValidation(obj);
133
- }
134
- },
135
- resetForm: {
136
- handler(form) {
137
- if (form.name == this.formName) this.formDirty = false;
138
- },
139
- deep: true,
140
- },
141
- },
142
- };
143
- </script>
144
-
145
- <style scoped>
146
- .success {
147
- color: #94aa2a;
148
- font-size: 14px;
149
- }
150
- .invalid {
151
- color: #f0134d;
152
- font-size: 14px;
153
- }
154
- </style>
1
+ <template>
2
+ <div class="form-group">
3
+ <label v-if="title">
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
+ <slot v-else></slot>
14
+ <input
15
+ :style="_style"
16
+ class="form-control"
17
+ type="number"
18
+ :disabled="disabled"
19
+ v-model="valueLocal"
20
+ @keyup.enter.prevent="pressedEnter"
21
+ />
22
+ </div>
23
+
24
+ <div v-if="formDirty">
25
+ <div v-for="message in notifications" :key="message">
26
+ <span class="invalid">{{ message }}</span>
27
+ </div>
28
+ </div>
29
+ </div>
30
+ </template>
31
+
32
+ <script>
33
+ import Tip from "../shared/Tip.vue";
34
+
35
+ import { mapState, mapMutations } from "vuex";
36
+
37
+ export default {
38
+ name: "InputNumber",
39
+ components: { Tip },
40
+ props: {
41
+ title: String,
42
+ field: String,
43
+ _style: String,
44
+ placeholder: String,
45
+ disabled: Boolean,
46
+ formName: String,
47
+ required: Boolean,
48
+ maxLength: Number,
49
+ type: {
50
+ type: String,
51
+ default: "float",
52
+ },
53
+ markFormDirty: {
54
+ type: Boolean,
55
+ default: true,
56
+ },
57
+ params: Object,
58
+ value: Number,
59
+ changed: Function,
60
+ enter: Function,
61
+ },
62
+ data() {
63
+ return {
64
+ notifications: [],
65
+ formDirty: false,
66
+ valueLocal: 0,
67
+ precision: 1,
68
+ };
69
+ },
70
+ created() {
71
+ // não carregar as validações iniciais para number
72
+ this.valueLocal = this.value;
73
+ },
74
+
75
+ methods: {
76
+ ...mapMutations("validation", [
77
+ "addValidation",
78
+ "removeValidation",
79
+ "updateFormDirty",
80
+ ]),
81
+ validate() {
82
+ this.notifications = [];
83
+ if (this.value == 0) return;
84
+ if (this.required && !this.value) {
85
+ var message = `${this.title} não pode ser vazio!`;
86
+ this.notifications.push(message);
87
+ }
88
+
89
+ if (this.valueLocal.toString().length > this.maxLength) {
90
+ var message = `Valor inválido!`;
91
+ this.notifications.push(message);
92
+ }
93
+ },
94
+ pressedEnter() {
95
+ if (this.enter) this.enter(this.params);
96
+ },
97
+ },
98
+ computed: {
99
+ ...mapState("validation", ["resetForm"]),
100
+ },
101
+ watch: {
102
+ value() {
103
+ this.valueLocal = this.value;
104
+ if (this.changed) this.changed();
105
+ },
106
+ valueLocal() {
107
+ this.validate();
108
+
109
+ let valueLocal;
110
+ if (this.type === "int") valueLocal = parseInt(this.valueLocal);
111
+ if (this.type === "float") valueLocal = parseFloat(this.valueLocal);
112
+
113
+ this.$emit("input", valueLocal);
114
+ this.formDirty = true;
115
+ if (this.markFormDirty) this.updateFormDirty(true);
116
+
117
+ this.valueLocal = valueLocal;
118
+ },
119
+ notifications() {
120
+ let self = this;
121
+ this.notifications.forEach(function (notification) {
122
+ let obj = {
123
+ key: self.field + "&" + self.formName,
124
+ formName: self.formName,
125
+ notification: notification,
126
+ };
127
+ self.addValidation(obj);
128
+ });
129
+
130
+ if (this.notifications.length == 0) {
131
+ let obj = {
132
+ key: self.field + "&" + self.formName,
133
+ formName: self.formName,
134
+ };
135
+ self.removeValidation(obj);
136
+ }
137
+ },
138
+ resetForm: {
139
+ handler(form) {
140
+ if (form.name == this.formName) this.formDirty = false;
141
+ },
142
+ deep: true,
143
+ },
144
+ },
145
+ };
146
+ </script>
147
+
148
+ <style scoped>
149
+ .success {
150
+ color: #94aa2a;
151
+ font-size: 14px;
152
+ }
153
+ .invalid {
154
+ color: #f0134d;
155
+ font-size: 14px;
156
+ }
157
+ .margin-button {
158
+ margin-top: -2px;
159
+ }
160
+ </style>
@@ -1,135 +1,135 @@
1
- <template>
2
- <div class="form-group">
3
- <label>
4
- <span class="title" :style="'color: ' + titleColor">{{ 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
- <slot v-else></slot>
14
- <input
15
- type="password"
16
- :placeholder="placeholder"
17
- v-mask="mask || withoutMask"
18
- v-bind:value="value"
19
- v-on:input="$emit('input', $event.target.value)"
20
- class="form-control"
21
- :class="{ required: notifications.length > 0 && formDirty }"
22
- />
23
- </div>
24
- <div v-if="formDirty">
25
- <div v-for="message in notifications" :key="message">
26
- <span class="invalid">{{ message }}</span>
27
- </div>
28
- </div>
29
- </div>
30
- </template>
31
-
32
- <script>
33
- import Tip from "../shared/Tip.vue";
34
- import { mapState, mapMutations } from "vuex";
35
-
36
- export default {
37
- components: { Tip },
38
- name: "InputPassword",
39
- mixins: [],
40
- props: [
41
- "title",
42
- "field",
43
- "titleColor",
44
- "placeholder",
45
- "mask",
46
- "formName",
47
- "required",
48
- "maxLength",
49
- "value",
50
- ],
51
- data() {
52
- return {
53
- notifications: [],
54
- formDirty: false,
55
- withoutMask: {
56
- mask: "*".repeat(255),
57
- tokens: {
58
- "*": { pattern: /./ },
59
- },
60
- },
61
- };
62
- },
63
- created() {
64
- this.validate();
65
- },
66
- methods: {
67
- ...mapMutations("validation", ["addValidation", "removeValidation", "updateFormDirty"]),
68
- validate() {
69
- this.notifications = [];
70
-
71
- if (this.required && this.value.length == 0) {
72
- var message = `${this.title} não pode ser vazio!`;
73
- this.notifications.push(message);
74
- }
75
-
76
- if (this.maxLength > 0) {
77
- if (this.value.length > this.maxLength) {
78
- var message = `Máximo de ${this.maxLength} caracteres!`;
79
- this.notifications.push(message);
80
- }
81
- }
82
- },
83
- },
84
- computed: {
85
- ...mapState("validation", ["resetForm", "validations"]),
86
- },
87
- watch: {
88
- value() {
89
- this.validate();
90
- this.formDirty = true;
91
- this.updateFormDirty(true);
92
- },
93
- notifications() {
94
- let self = this;
95
- this.notifications.forEach(function (notification) {
96
- let obj = {
97
- key: self.field + "&" + self.formName,
98
- formName: self.formName,
99
- notification: notification,
100
- };
101
- self.addValidation(obj);
102
- });
103
-
104
- if (this.notifications.length == 0) {
105
- let obj = {
106
- key: self.field + "&" + self.formName,
107
- formName: self.formName,
108
- };
109
- self.removeValidation(obj);
110
- }
111
- },
112
- resetForm: {
113
- handler(form) {
114
- if (form.name == this.formName) this.formDirty = false;
115
- },
116
- deep: true,
117
- },
118
- },
119
- };
120
- </script>
121
-
122
- <style scoped>
123
- .success {
124
- color: #94aa2a;
125
- font-size: 14px;
126
- }
127
- .invalid {
128
- color: #f0134d;
129
- font-size: 14px;
130
- }
131
-
132
- .margin-button {
133
- margin-top: -10px;
134
- }
135
- </style>
1
+ <template>
2
+ <div class="form-group">
3
+ <label>
4
+ <span class="title" :style="'color: ' + titleColor">{{ 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
+ <slot v-else></slot>
14
+ <input
15
+ type="password"
16
+ :placeholder="placeholder"
17
+ v-mask="mask || withoutMask"
18
+ v-bind:value="value"
19
+ v-on:input="$emit('input', $event.target.value)"
20
+ class="form-control"
21
+ :class="{ required: notifications.length > 0 && formDirty }"
22
+ />
23
+ </div>
24
+ <div v-if="formDirty">
25
+ <div v-for="message in notifications" :key="message">
26
+ <span class="invalid">{{ message }}</span>
27
+ </div>
28
+ </div>
29
+ </div>
30
+ </template>
31
+
32
+ <script>
33
+ import Tip from "../shared/Tip.vue";
34
+ import { mapState, mapMutations } from "vuex";
35
+
36
+ export default {
37
+ components: { Tip },
38
+ name: "InputPassword",
39
+ mixins: [],
40
+ props: [
41
+ "title",
42
+ "field",
43
+ "titleColor",
44
+ "placeholder",
45
+ "mask",
46
+ "formName",
47
+ "required",
48
+ "maxLength",
49
+ "value",
50
+ ],
51
+ data() {
52
+ return {
53
+ notifications: [],
54
+ formDirty: false,
55
+ withoutMask: {
56
+ mask: "*".repeat(255),
57
+ tokens: {
58
+ "*": { pattern: /./ },
59
+ },
60
+ },
61
+ };
62
+ },
63
+ created() {
64
+ this.validate();
65
+ },
66
+ methods: {
67
+ ...mapMutations("validation", ["addValidation", "removeValidation", "updateFormDirty"]),
68
+ validate() {
69
+ this.notifications = [];
70
+
71
+ if (this.required && this.value.length == 0) {
72
+ var message = `${this.title} não pode ser vazio!`;
73
+ this.notifications.push(message);
74
+ }
75
+
76
+ if (this.maxLength > 0) {
77
+ if (this.value.length > this.maxLength) {
78
+ var message = `Máximo de ${this.maxLength} caracteres!`;
79
+ this.notifications.push(message);
80
+ }
81
+ }
82
+ },
83
+ },
84
+ computed: {
85
+ ...mapState("validation", ["resetForm", "validations"]),
86
+ },
87
+ watch: {
88
+ value() {
89
+ this.validate();
90
+ this.formDirty = true;
91
+ this.updateFormDirty(true);
92
+ },
93
+ notifications() {
94
+ let self = this;
95
+ this.notifications.forEach(function (notification) {
96
+ let obj = {
97
+ key: self.field + "&" + self.formName,
98
+ formName: self.formName,
99
+ notification: notification,
100
+ };
101
+ self.addValidation(obj);
102
+ });
103
+
104
+ if (this.notifications.length == 0) {
105
+ let obj = {
106
+ key: self.field + "&" + self.formName,
107
+ formName: self.formName,
108
+ };
109
+ self.removeValidation(obj);
110
+ }
111
+ },
112
+ resetForm: {
113
+ handler(form) {
114
+ if (form.name == this.formName) this.formDirty = false;
115
+ },
116
+ deep: true,
117
+ },
118
+ },
119
+ };
120
+ </script>
121
+
122
+ <style scoped>
123
+ .success {
124
+ color: #94aa2a;
125
+ font-size: 14px;
126
+ }
127
+ .invalid {
128
+ color: #f0134d;
129
+ font-size: 14px;
130
+ }
131
+
132
+ .margin-button {
133
+ margin-top: -10px;
134
+ }
135
+ </style>