@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,142 +1,150 @@
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>
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
+ <div
10
+ class="required glyphicon"
11
+ v-if="notifications.length > 0 && formDirty"
12
+ >
13
+ <i class="fas fa-exclamation-triangle"></i>
14
+ </div>
15
+ <slot v-else></slot>
16
+ <vue-numeric
17
+ :style="_style"
18
+ class="form-control"
19
+ v-on:keyup.enter.native="pressedEnter"
20
+ :class="{ 'is-invalid': notifications.length > 0 && formDirty }"
21
+ :placeholder="placeholder"
22
+ :disabled="disabled"
23
+ currency="R$"
24
+ separator="."
25
+ v-bind:precision="2"
26
+ v-model="valueLocal"
27
+ ></vue-numeric>
28
+ </div>
29
+
30
+ <div v-if="formDirty">
31
+ <div v-for="message in notifications" :key="message">
32
+ <span class="invalid">{{ message }}</span>
33
+ </div>
34
+ </div>
35
+ </div>
36
+ </template>
37
+
38
+ <script>
39
+ import Tip from "../shared/Tip.vue";
40
+ import VueNumeric from "vue-numeric";
41
+
42
+ import { mapState, mapMutations } from "vuex";
43
+
44
+ export default {
45
+ name: "InputDecimal",
46
+ mixins: [],
47
+ props: {
48
+ title: String,
49
+ field: String,
50
+ disabled: Boolean,
51
+ placeholder: String,
52
+ formName: String,
53
+ _style: String,
54
+ markFormDirty: {
55
+ type: Boolean,
56
+ default: true,
57
+ },
58
+ required: Boolean,
59
+ value: Number,
60
+ enter: Function,
61
+ },
62
+ components: {
63
+ VueNumeric,
64
+ Tip,
65
+ },
66
+ data() {
67
+ return {
68
+ notifications: [],
69
+ formDirty: false,
70
+ _value: 0,
71
+ valueLocal: 20,
72
+ };
73
+ },
74
+ created() {
75
+ // não carregar as validações iniciais para number
76
+ this.valueLocal = this.value;
77
+ },
78
+ methods: {
79
+ ...mapMutations("validation", [
80
+ "addValidation",
81
+ "removeValidation",
82
+ "updateFormDirty",
83
+ ]),
84
+ validate() {
85
+ this.notifications = [];
86
+ if (this.valueLocal == 0) return;
87
+ if (this.required && !this.valueLocal) {
88
+ var message = `${this.title} não pode ser vazio!`;
89
+ this.notifications.push(message);
90
+ }
91
+ },
92
+ pressedEnter() {
93
+ if (this.enter) this.enter();
94
+ },
95
+ },
96
+ computed: {
97
+ ...mapState("validation", ["resetForm"]),
98
+ },
99
+ watch: {
100
+ value() {
101
+ this.valueLocal = this.value;
102
+ },
103
+ valueLocal() {
104
+ this.validate();
105
+ this.$emit("input", this.valueLocal);
106
+ this.formDirty = true;
107
+ if (this.markFormDirty) this.updateFormDirty(true);
108
+ },
109
+ notifications() {
110
+ let self = this;
111
+ this.notifications.forEach(function (notification) {
112
+ let obj = {
113
+ key: self.field + "&" + self.formName,
114
+ formName: self.formName,
115
+ notification: notification,
116
+ };
117
+ self.addValidation(obj);
118
+ });
119
+
120
+ if (this.notifications.length == 0) {
121
+ let obj = {
122
+ key: self.field + "&" + self.formName,
123
+ formName: self.formName,
124
+ };
125
+ self.removeValidation(obj);
126
+ }
127
+ },
128
+ resetForm: {
129
+ handler(form) {
130
+ if (form.name == this.formName) this.formDirty = false;
131
+ },
132
+ deep: true,
133
+ },
134
+ },
135
+ };
136
+ </script>
137
+
138
+ <style scoped>
139
+ .success {
140
+ color: #94aa2a;
141
+ font-size: 14px;
142
+ }
143
+ .invalid {
144
+ color: #f0134d;
145
+ font-size: 14px;
146
+ }
147
+ .margin-button {
148
+ margin-top: -2px;
149
+ }
150
+ </style>
@@ -0,0 +1,92 @@
1
+ <template>
2
+ <div>
3
+ <InputDecimal
4
+ v-if="!discount.discountByPercentage"
5
+ :title="title"
6
+ field="discount"
7
+ :required="required"
8
+ :formName="formName"
9
+ _style="color:red;"
10
+ v-model="discount.discount"
11
+ >
12
+ <div class="glyphicon margin-button">
13
+ <Button
14
+ _key="btnDiscount"
15
+ title=""
16
+ type="primary"
17
+ classIcon="fa-solid fa-brazilian-real-sign"
18
+ size="small"
19
+ :clicked="change"
20
+ /></div
21
+ ></InputDecimal>
22
+ <InputNumber
23
+ v-if="discount.discountByPercentage"
24
+ :title="title"
25
+ field="discount"
26
+ :formName="formName"
27
+ :required="false"
28
+ _style="color:red;"
29
+ :maxLength="5"
30
+ type="float"
31
+ v-model="discount.discount"
32
+ ><div class="glyphicon margin-button">
33
+ <Button
34
+ _key="btnDiscount"
35
+ title=""
36
+ type="primary"
37
+ classIcon="fa-solid fa-percent"
38
+ size="small"
39
+ :clicked="change"
40
+ />
41
+ </div>
42
+ </InputNumber>
43
+ </div>
44
+ </template>
45
+
46
+ <script>
47
+ import InputNumber from "@nixweb/nixloc-ui/src/component/forms/InputNumber";
48
+ import InputDecimal from "@nixweb/nixloc-ui/src/component/forms/InputDecimal";
49
+ import Button from "@nixweb/nixloc-ui/src/component/forms/Button";
50
+
51
+ import { mapMutations } from "vuex";
52
+
53
+ export default {
54
+ name: "InputDecimalDiscount",
55
+ components: {
56
+ InputNumber,
57
+ InputDecimal,
58
+ Button,
59
+ },
60
+ props: ["formName", "disabled", "_style", "required", "value"],
61
+ data() {
62
+ return {
63
+ title: "Desconto em %",
64
+ discount: { discountByPercentage: false, discount: 0 },
65
+ };
66
+ },
67
+ methods: {
68
+ ...mapMutations("generic", ["removeLoading"]),
69
+ change() {
70
+ this.discount.discountByPercentage =
71
+ this.discount.discountByPercentage != true;
72
+ if (this.discount.discountByPercentage) this.title = "Desconto em %";
73
+ if (!this.discount.discountByPercentage) this.title = "Desconto em R$";
74
+ this.removeLoading(["btnDiscount"]);
75
+ },
76
+ },
77
+ watch: {
78
+ discount: {
79
+ handler(discount) {
80
+ this.$emit("input", discount);
81
+ },
82
+ deep: true,
83
+ },
84
+ value: {
85
+ handler(value) {
86
+ this.discount = value;
87
+ },
88
+ deep: true,
89
+ },
90
+ },
91
+ };
92
+ </script>