@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
@@ -0,0 +1,101 @@
1
+ <template>
2
+ <div>
3
+ <div class="wrapper">
4
+ <span class="minus" @click="decrement">-</span>
5
+ <span class="num" @click="showEdit = true" v-if="!showEdit">{{ number }}</span>
6
+ <input
7
+ class="input"
8
+ type="number"
9
+ @keyup.enter.prevent="showEdit = false"
10
+ v-model="number"
11
+ v-if="showEdit"
12
+ />
13
+ <span @click="showEdit = false" v-if="showEdit"
14
+ ><i class="fa-solid fa-check"></i
15
+ ></span>
16
+ <span class="plus" @click="increment">+</span>
17
+ </div>
18
+ </div>
19
+ </template>
20
+
21
+ <script>
22
+ export default {
23
+ name: "IncrementDecrement",
24
+ props: ["value", "min", "max"],
25
+ data() {
26
+ return {
27
+ number: 1,
28
+ showEdit: false,
29
+ };
30
+ },
31
+ methods: {
32
+ increment() {
33
+ this.number++;
34
+ },
35
+ decrement() {
36
+ this.number--;
37
+ },
38
+ },
39
+ watch: {
40
+ number: {
41
+ handler(number) {
42
+ if (this.min)
43
+ if (this.number < this.min) {
44
+ this.number = this.min;
45
+ return;
46
+ }
47
+ if (this.max)
48
+ if (this.number > this.max) {
49
+ this.number = this.max;
50
+ return;
51
+ }
52
+ this.$emit("input", this.number);
53
+ },
54
+ deep: true,
55
+ },
56
+ },
57
+ };
58
+ </script>
59
+
60
+ <style scope>
61
+ .input {
62
+ width: 40px;
63
+ border: none;
64
+ text-align: center;
65
+ }
66
+
67
+ .wrapper {
68
+ height: 37px;
69
+ width: 100%;
70
+ display: flex;
71
+ align-items: center;
72
+ justify-content: center;
73
+ background: #fff;
74
+ border-radius: 8px;
75
+ border: 1px solid #eaedf3;
76
+ box-shadow: 0px 10px 20px -6px rgb(0 0 0 / 3%);
77
+ }
78
+ .wrapper span {
79
+ width: 100%;
80
+ text-align: center;
81
+ font-size: 15px;
82
+ font-weight: 600;
83
+ cursor: pointer;
84
+ user-select: none;
85
+ }
86
+ .wrapper span.num {
87
+ font-size: 17px;
88
+ border-right: 1px solid #eaedf3;
89
+ border-left: 1px solid #eaedf3;
90
+ cursor: pointer;
91
+ color: #3f529b;
92
+ font-size: 14px;
93
+ font-weight: 400;
94
+ cursor: pointer;
95
+ }
96
+
97
+ .wrapper span.num:hover {
98
+ text-decoration: underline;
99
+ transition: 0.1s;
100
+ }
101
+ </style>
@@ -1,138 +1,142 @@
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
- <vue-numeric
14
- class="form-control"
15
- v-on:keyup.enter.native="pressedEnter"
16
- :class="{ 'is-invalid': notifications.length > 0 && formDirty }"
17
- :placeholder="placeholder"
18
- :disabled="disabled"
19
- currency="R$"
20
- separator="."
21
- v-bind:precision="2"
22
- v-model="valueLocal"
23
- ></vue-numeric>
24
- </div>
25
-
26
- <div v-if="formDirty">
27
- <div v-for="message in notifications" :key="message">
28
- <span class="invalid">{{ message }}</span>
29
- </div>
30
- </div>
31
- </div>
32
- </template>
33
-
34
- <script>
35
- import Tip from "../shared/Tip.vue";
36
- import VueNumeric from "vue-numeric";
37
-
38
- import { mapState, mapMutations } from "vuex";
39
-
40
- export default {
41
- name: "InputDecimal",
42
- mixins: [],
43
- props: {
44
- title: String,
45
- field: String,
46
- disabled: Boolean,
47
- placeholder: String,
48
- formName: String,
49
- required: Boolean,
50
- value: Number,
51
- enter: Function,
52
- },
53
- components: {
54
- VueNumeric,
55
- Tip,
56
- },
57
- data() {
58
- return {
59
- notifications: [],
60
- formDirty: false,
61
- _value: 0,
62
- valueLocal: 20,
63
- };
64
- },
65
- created() {
66
- // não carregar as validações iniciais para number
67
- this.valueLocal = this.value;
68
- },
69
- methods: {
70
- ...mapMutations("validation", [
71
- "addValidation",
72
- "removeValidation",
73
- "updateFormDirty",
74
- ]),
75
- validate() {
76
- this.notifications = [];
77
- if (this.valueLocal == 0) return;
78
- if (this.required && !this.valueLocal) {
79
- var message = `${this.title} não pode ser vazio!`;
80
- this.notifications.push(message);
81
- }
82
- },
83
- pressedEnter() {
84
- if (this.enter) this.enter();
85
- },
86
- },
87
- computed: {
88
- ...mapState("validation", ["resetForm"]),
89
- },
90
- watch: {
91
- value() {
92
- this.valueLocal = this.value;
93
- },
94
- valueLocal() {
95
- this.validate();
96
- this.formDirty = true;
97
- this.updateFormDirty(true);
98
- this.$emit("input", this.valueLocal);
99
- },
100
- notifications() {
101
- let self = this;
102
- this.notifications.forEach(function (notification) {
103
- let obj = {
104
- key: self.field + "&" + self.formName,
105
- formName: self.formName,
106
- notification: notification,
107
- };
108
- self.addValidation(obj);
109
- });
110
-
111
- if (this.notifications.length == 0) {
112
- let obj = {
113
- key: self.field + "&" + self.formName,
114
- formName: self.formName,
115
- };
116
- self.removeValidation(obj);
117
- }
118
- },
119
- resetForm: {
120
- handler(form) {
121
- if (form.name == this.formName) this.formDirty = false;
122
- },
123
- deep: true,
124
- },
125
- },
126
- };
127
- </script>
128
-
129
- <style scoped>
130
- .success {
131
- color: #94aa2a;
132
- font-size: 14px;
133
- }
134
- .invalid {
135
- color: #f0134d;
136
- font-size: 14px;
137
- }
138
- </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
+ <vue-numeric
14
+ class="form-control"
15
+ v-on:keyup.enter.native="pressedEnter"
16
+ :class="{ 'is-invalid': notifications.length > 0 && formDirty }"
17
+ :placeholder="placeholder"
18
+ :disabled="disabled"
19
+ currency="R$"
20
+ separator="."
21
+ v-bind:precision="2"
22
+ v-model="valueLocal"
23
+ ></vue-numeric>
24
+ </div>
25
+
26
+ <div v-if="formDirty">
27
+ <div v-for="message in notifications" :key="message">
28
+ <span class="invalid">{{ message }}</span>
29
+ </div>
30
+ </div>
31
+ </div>
32
+ </template>
33
+
34
+ <script>
35
+ import Tip from "../shared/Tip.vue";
36
+ import VueNumeric from "vue-numeric";
37
+
38
+ import { mapState, mapMutations } from "vuex";
39
+
40
+ export default {
41
+ name: "InputDecimal",
42
+ mixins: [],
43
+ props: {
44
+ title: String,
45
+ field: String,
46
+ disabled: Boolean,
47
+ placeholder: String,
48
+ formName: String,
49
+ markFormDirty: {
50
+ type: Boolean,
51
+ default: true,
52
+ },
53
+ required: Boolean,
54
+ value: Number,
55
+ enter: Function,
56
+ },
57
+ components: {
58
+ VueNumeric,
59
+ Tip,
60
+ },
61
+ data() {
62
+ return {
63
+ notifications: [],
64
+ formDirty: false,
65
+ _value: 0,
66
+ valueLocal: 20,
67
+ };
68
+ },
69
+ created() {
70
+ // não carregar as validações iniciais para number
71
+ this.valueLocal = this.value;
72
+ },
73
+ methods: {
74
+ ...mapMutations("validation", [
75
+ "addValidation",
76
+ "removeValidation",
77
+ "updateFormDirty",
78
+ ]),
79
+ validate() {
80
+ this.notifications = [];
81
+ if (this.valueLocal == 0) return;
82
+ if (this.required && !this.valueLocal) {
83
+ var message = `${this.title} não pode ser vazio!`;
84
+ this.notifications.push(message);
85
+ }
86
+ },
87
+ pressedEnter() {
88
+ if (this.enter) this.enter();
89
+ },
90
+ },
91
+ computed: {
92
+ ...mapState("validation", ["resetForm"]),
93
+ },
94
+ watch: {
95
+ value() {
96
+ this.valueLocal = this.value;
97
+ },
98
+ valueLocal() {
99
+ this.validate();
100
+ this.$emit("input", this.valueLocal);
101
+ this.formDirty = true;
102
+ if (this.markFormDirty) this.updateFormDirty(true);
103
+ },
104
+ notifications() {
105
+ let self = this;
106
+ this.notifications.forEach(function (notification) {
107
+ let obj = {
108
+ key: self.field + "&" + self.formName,
109
+ formName: self.formName,
110
+ notification: notification,
111
+ };
112
+ self.addValidation(obj);
113
+ });
114
+
115
+ if (this.notifications.length == 0) {
116
+ let obj = {
117
+ key: self.field + "&" + self.formName,
118
+ formName: self.formName,
119
+ };
120
+ self.removeValidation(obj);
121
+ }
122
+ },
123
+ resetForm: {
124
+ handler(form) {
125
+ if (form.name == this.formName) this.formDirty = false;
126
+ },
127
+ deep: true,
128
+ },
129
+ },
130
+ };
131
+ </script>
132
+
133
+ <style scoped>
134
+ .success {
135
+ color: #94aa2a;
136
+ font-size: 14px;
137
+ }
138
+ .invalid {
139
+ color: #f0134d;
140
+ font-size: 14px;
141
+ }
142
+ </style>