@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,154 +1,154 @@
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
+ 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,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>