@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,162 +1,174 @@
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
- <div class="required glyphicon" v-if="notifications.length > 0 && formDirty">
10
- <i class="fas fa-exclamation-triangle"></i>
11
- </div>
12
- <slot v-else></slot>
13
- <input
14
- type="text"
15
- :style="_style"
16
- :placeholder="placeholder"
17
- :disabled="disabled"
18
- @keyup.enter.prevent="pressedEnter"
19
- @keyup="cleanedField"
20
- @blur="outField"
21
- v-mask="mask || withoutMask"
22
- v-bind:value="value"
23
- v-on:input="$emit('input', $event.target.value)"
24
- class="form-control"
25
- :class="{ required: notifications.length > 0 && formDirty }"
26
- />
27
- </div>
28
- <div v-if="formDirty">
29
- <div v-for="message in notifications" :key="message">
30
- <span class="invalid">{{ message }}</span>
31
- </div>
32
- </div>
33
- </div>
34
- </template>
35
-
36
- <script>
37
- import Tip from "../shared/Tip.vue";
38
- import { mapState, mapMutations } from "vuex";
39
-
40
- export default {
41
- components: { Tip },
42
- name: "InputText",
43
- props: [
44
- "title",
45
- "field",
46
- "placeholder",
47
- "disabled",
48
- "titleColor",
49
- "mask",
50
- "_style",
51
- "formName",
52
- "required",
53
- "maxLength",
54
- "value",
55
- "enter",
56
- "cleaned",
57
- "exited",
58
- "markFormDirty",
59
- ],
60
- data() {
61
- return {
62
- notifications: [],
63
- formDirty: false,
64
- withoutMask: {
65
- mask: "*".repeat(255),
66
- tokens: {
67
- "*": { pattern: /./ },
68
- },
69
- },
70
- };
71
- },
72
- created() {
73
- this.validate();
74
- },
75
- methods: {
76
- ...mapMutations("validation", ["addValidation", "removeValidation", "updateFormDirty"]),
77
- validate() {
78
- this.notifications = [];
79
-
80
- if (this.required && this.value.length == 0) {
81
- var message = `${this.title} não pode ser vazio!`;
82
- this.notifications.push(message);
83
- }
84
-
85
- if (this.maxLength > 0) {
86
- if (this.value.length > this.maxLength) {
87
- var message = `Máximo de ${this.maxLength} caracteres!`;
88
- this.notifications.push(message);
89
- }
90
- }
91
- },
92
- pressedEnter() {
93
- if (this.enter) this.enter();
94
- },
95
- outField() {
96
- if (this.exited) this.exited();
97
- },
98
- cleanedField() {
99
- if (this.value.length == 0) {
100
- if (this.cleaned) this.cleaned();
101
- }
102
- },
103
- },
104
- computed: {
105
- ...mapState("validation", ["resetForm", "validations"]),
106
- },
107
- watch: {
108
- value() {
109
- this.validate();
110
- this.formDirty = true;
111
- // inverti a validação devido não colocar o default como true no props
112
- var _value = this.markFormDirty == undefined ? true : this.markFormDirty;
113
- if (_value) this.updateFormDirty(true);
114
- },
115
- notifications() {
116
- let self = this;
117
- this.notifications.forEach(function (notification) {
118
- let obj = {
119
- key: self.field + "&" + self.formName,
120
- formName: self.formName,
121
- notification: notification,
122
- };
123
- self.addValidation(obj);
124
- });
125
-
126
- if (this.notifications.length == 0) {
127
- let obj = {
128
- key: self.field + "&" + self.formName,
129
- formName: self.formName,
130
- };
131
- self.removeValidation(obj);
132
- }
133
- },
134
- resetForm: {
135
- handler(form) {
136
- if (form.name == this.formName) this.formDirty = false;
137
- },
138
- deep: true,
139
- },
140
- },
141
- };
142
- </script>
143
-
144
- <style scoped>
145
-
146
- .title{
147
- font-size: 14px !important;
148
- }
149
-
150
- .success {
151
- color: #94aa2a;
152
- font-size: 14px;
153
- }
154
- .invalid {
155
- color: #f0134d;
156
- font-size: 14px;
157
- }
158
-
159
- .margin-button {
160
- margin-top: -3px;
161
- }
162
- </style>
1
+ <template>
2
+ <div class="form-group">
3
+ <label>
4
+ <i class="title class-icon-title" :class="classIconTitle"></i>
5
+ <span class="title" :style="'color: ' + titleColor">{{ title }} </span>
6
+ <span class="required" v-if="required">*</span>
7
+ <Tip :field="field" :formName="formName" />
8
+ </label>
9
+ <div class="inner-addon right-addon">
10
+ <div
11
+ class="required glyphicon"
12
+ v-if="notifications.length > 0 && formDirty"
13
+ >
14
+ <i class="fas fa-exclamation-triangle"></i>
15
+ </div>
16
+ <slot v-else></slot>
17
+ <input
18
+ type="text"
19
+ :style="_style"
20
+ :placeholder="placeholder"
21
+ :disabled="disabled"
22
+ @keyup.enter.prevent="pressedEnter"
23
+ @keyup="cleanedField"
24
+ @blur="outField"
25
+ v-mask="mask || withoutMask"
26
+ v-bind:value="value"
27
+ v-on:input="$emit('input', $event.target.value)"
28
+ class="form-control"
29
+ :class="{ required: notifications.length > 0 && formDirty }"
30
+ />
31
+ </div>
32
+ <div v-if="formDirty">
33
+ <div v-for="message in notifications" :key="message">
34
+ <span class="invalid">{{ message }}</span>
35
+ </div>
36
+ </div>
37
+ </div>
38
+ </template>
39
+
40
+ <script>
41
+ import Tip from "../shared/Tip.vue";
42
+ import { mapState, mapMutations } from "vuex";
43
+
44
+ export default {
45
+ components: { Tip },
46
+ name: "InputText",
47
+ props: [
48
+ "title",
49
+ "classIconTitle",
50
+ "field",
51
+ "placeholder",
52
+ "disabled",
53
+ "titleColor",
54
+ "mask",
55
+ "_style",
56
+ "formName",
57
+ "required",
58
+ "maxLength",
59
+ "value",
60
+ "enter",
61
+ "cleaned",
62
+ "exited",
63
+ "markFormDirty",
64
+ ],
65
+ data() {
66
+ return {
67
+ notifications: [],
68
+ formDirty: false,
69
+ withoutMask: {
70
+ mask: "*".repeat(255),
71
+ tokens: {
72
+ "*": { pattern: /./ },
73
+ },
74
+ },
75
+ };
76
+ },
77
+ created() {
78
+ this.validate();
79
+ },
80
+ methods: {
81
+ ...mapMutations("validation", [
82
+ "addValidation",
83
+ "removeValidation",
84
+ "updateFormDirty",
85
+ ]),
86
+ validate() {
87
+ this.notifications = [];
88
+
89
+ if (this.required && this.value.length == 0) {
90
+ var message = `${this.title} não pode ser vazio!`;
91
+ this.notifications.push(message);
92
+ }
93
+
94
+ if (this.maxLength > 0) {
95
+ if (this.value.length > this.maxLength) {
96
+ var message = `Máximo de ${this.maxLength} caracteres!`;
97
+ this.notifications.push(message);
98
+ }
99
+ }
100
+ },
101
+ pressedEnter() {
102
+ if (this.enter) this.enter();
103
+ },
104
+ outField() {
105
+ if (this.exited) this.exited();
106
+ },
107
+ cleanedField() {
108
+ if (this.value.length == 0) {
109
+ if (this.cleaned) this.cleaned();
110
+ }
111
+ },
112
+ },
113
+ computed: {
114
+ ...mapState("validation", ["resetForm", "validations"]),
115
+ },
116
+ watch: {
117
+ value() {
118
+ this.validate();
119
+ this.formDirty = true;
120
+ // inverti a validação devido não colocar o default como true no props
121
+ var _value = this.markFormDirty == undefined ? true : this.markFormDirty;
122
+ if (_value) this.updateFormDirty(true);
123
+ },
124
+ notifications() {
125
+ let self = this;
126
+ this.notifications.forEach(function (notification) {
127
+ let obj = {
128
+ key: self.field + "&" + self.formName,
129
+ formName: self.formName,
130
+ notification: notification,
131
+ };
132
+ self.addValidation(obj);
133
+ });
134
+
135
+ if (this.notifications.length == 0) {
136
+ let obj = {
137
+ key: self.field + "&" + self.formName,
138
+ formName: self.formName,
139
+ };
140
+ self.removeValidation(obj);
141
+ }
142
+ },
143
+ resetForm: {
144
+ handler(form) {
145
+ if (form.name == this.formName) this.formDirty = false;
146
+ },
147
+ deep: true,
148
+ },
149
+ },
150
+ };
151
+ </script>
152
+
153
+ <style scoped>
154
+ .title {
155
+ font-size: 14px !important;
156
+ }
157
+
158
+ .class-icon-title {
159
+ margin-right: 5px;
160
+ }
161
+
162
+ .success {
163
+ color: #94aa2a;
164
+ font-size: 14px;
165
+ }
166
+ .invalid {
167
+ color: #f0134d;
168
+ font-size: 14px;
169
+ }
170
+
171
+ .margin-button {
172
+ margin-top: -3px;
173
+ }
174
+ </style>
@@ -0,0 +1,68 @@
1
+ <template>
2
+ <div>
3
+ <span class="num" @click="showEdit = true" v-if="!showEdit">
4
+ {{ value }}
5
+ <i class="icon-edit fa-solid fa-pen-to-square"></i>
6
+ </span>
7
+ <div class="wrapper" v-if="showEdit">
8
+ <input
9
+ class="input"
10
+ type="text"
11
+ placeholder="Digite seu texto"
12
+ @keyup.enter.prevent="showEdit = false"
13
+ v-bind:value="value"
14
+ v-on:input="$emit('input', $event.target.value)"
15
+ v-if="showEdit"
16
+ />
17
+ <span @click="showEdit = false" v-if="showEdit">
18
+ <i class="fa-solid fa-check"></i>
19
+ </span>
20
+ </div>
21
+ </div>
22
+ </template>
23
+
24
+ <script>
25
+ export default {
26
+ name: "InputTextEdit",
27
+ props: ["value"],
28
+ data() {
29
+ return {
30
+ showEdit: false,
31
+ };
32
+ },
33
+ };
34
+ </script>
35
+
36
+ <style scoped>
37
+ .input {
38
+ width: 150px;
39
+ border: none;
40
+ text-align: center;
41
+ }
42
+
43
+ .wrapper {
44
+ height: 37px;
45
+ width: 100%;
46
+ display: flex;
47
+ align-items: center;
48
+ justify-content: center;
49
+ background: #fff;
50
+ border-radius: 8px;
51
+ border: 1px solid #eaedf3;
52
+ box-shadow: 0px 10px 20px -6px rgb(0 0 0 / 3%);
53
+ }
54
+ .wrapper span {
55
+ width: 10px;
56
+ text-align: center;
57
+ font-size: 14px;
58
+ font-weight: 600;
59
+ cursor: pointer;
60
+ user-select: none;
61
+ }
62
+
63
+ .icon-edit {
64
+ margin-left: 0px;
65
+ color: rgb(128, 127, 127);
66
+ cursor: pointer;
67
+ }
68
+ </style>
@@ -1,65 +1,65 @@
1
- <template>
2
- <div>
3
- <vodal
4
- :duration="80"
5
- :show="modal.open"
6
- @hide="hide()"
7
- :width="width"
8
- :height="height"
9
- :closeOnEsc="closeOnEsc"
10
- :closeButton="closeButton"
11
- :closeOnClickMask="false"
12
- >
13
- <div class="d-block text-left">
14
- <Messages v-if="!vodal.open" />
15
- <div class="title">{{ title }}</div>
16
- <hr class="hr" />
17
- <slot></slot>
18
- </div>
19
- <div slot="modal-footer"></div>
20
- </vodal>
21
- </div>
22
- </template>
23
-
24
- <script>
25
- import Messages from "@nixweb/nixloc-ui/src/component/shared/Messages";
26
- import Vodal from "vodal";
27
-
28
- import { mapState, mapMutations } from "vuex";
29
-
30
- export default {
31
- name: "Modal",
32
- props: {
33
- title: String,
34
- width: Number,
35
- height: Number,
36
- closeOnEsc: {
37
- type: Boolean,
38
- default: true,
39
- },
40
- closeButton: {
41
- type: Boolean,
42
- default: true,
43
- },
44
- onHideModal: Function,
45
- },
46
- components: { Messages, Vodal },
47
- computed: {
48
- ...mapState("generic", ["modal", "vodal"]),
49
- },
50
- methods: {
51
- ...mapMutations("generic", ["hideModal"]),
52
- hide() {
53
- if (this.onHideModal) this.onHideModal();
54
- this.hideModal();
55
- },
56
- },
57
- };
58
- </script>
59
-
60
- <style scoped>
61
- .title {
62
- font-size: 18px;
63
- margin-bottom: 5px;
64
- }
65
- </style>
1
+ <template>
2
+ <div>
3
+ <vodal
4
+ :duration="80"
5
+ :show="modal.open"
6
+ @hide="hide()"
7
+ :width="width"
8
+ :height="height"
9
+ :closeOnEsc="closeOnEsc"
10
+ :closeButton="closeButton"
11
+ :closeOnClickMask="false"
12
+ >
13
+ <div class="d-block text-left">
14
+ <Messages v-if="!vodal.open" />
15
+ <div class="title">{{ title }}</div>
16
+ <hr class="hr" />
17
+ <slot></slot>
18
+ </div>
19
+ <div slot="modal-footer"></div>
20
+ </vodal>
21
+ </div>
22
+ </template>
23
+
24
+ <script>
25
+ import Messages from "@nixweb/nixloc-ui/src/component/shared/Messages";
26
+ import Vodal from "vodal";
27
+
28
+ import { mapState, mapMutations } from "vuex";
29
+
30
+ export default {
31
+ name: "Modal",
32
+ props: {
33
+ title: String,
34
+ width: Number,
35
+ height: Number,
36
+ closeOnEsc: {
37
+ type: Boolean,
38
+ default: true,
39
+ },
40
+ closeButton: {
41
+ type: Boolean,
42
+ default: true,
43
+ },
44
+ onHideModal: Function,
45
+ },
46
+ components: { Messages, Vodal },
47
+ computed: {
48
+ ...mapState("generic", ["modal", "vodal"]),
49
+ },
50
+ methods: {
51
+ ...mapMutations("generic", ["hideModal"]),
52
+ hide() {
53
+ if (this.onHideModal) this.onHideModal();
54
+ this.hideModal();
55
+ },
56
+ },
57
+ };
58
+ </script>
59
+
60
+ <style scoped>
61
+ .title {
62
+ font-size: 18px;
63
+ margin-bottom: 5px;
64
+ }
65
+ </style>
@@ -1,50 +1,50 @@
1
- <template>
2
- <div>
3
- <span class="title">{{ title }}</span>
4
- <Tip :field="field" :formName="formName" />
5
- <div class="options">
6
- <b-form-group>
7
- <b-form-radio-group
8
- v-model="selected"
9
- :options="options"
10
- :disabled="disabled"
11
- ></b-form-radio-group>
12
- </b-form-group>
13
- </div>
14
- </div>
15
- </template>
16
-
17
- <script>
18
- import Tip from "../shared/Tip.vue";
19
-
20
- import { mapMutations } from "vuex";
21
-
22
- export default {
23
- components: { Tip },
24
- name: "options",
25
- props: ["title", "options", "value", "changed", "field", "formName", "disabled"],
26
- data() {
27
- return {
28
- selected: this.value,
29
- };
30
- },
31
- methods: {
32
- ...mapMutations("validation", ["updateFormDirty"]),
33
- },
34
- watch: {
35
- value() {
36
- this.selected = this.value;
37
- },
38
- selected() {
39
- this.$emit("input", this.selected);
40
- this.updateFormDirty(true);
41
- if (this.changed) this.changed();
42
- },
43
- },
44
- };
45
- </script>
46
- <style scoped>
47
- .options {
48
- margin-top: 5px;
49
- }
50
- </style>
1
+ <template>
2
+ <div>
3
+ <span class="title">{{ title }}</span>
4
+ <div class="options">
5
+ <b-form-group>
6
+ <b-form-radio-group
7
+ v-model="selected"
8
+ :options="options"
9
+ :disabled="disabled"
10
+ :stacked="stacked"
11
+ ></b-form-radio-group>
12
+ </b-form-group>
13
+ </div>
14
+ </div>
15
+ </template>
16
+
17
+ <script>
18
+ import Tip from "../shared/Tip.vue";
19
+
20
+ import { mapMutations } from "vuex";
21
+
22
+ export default {
23
+ components: { Tip },
24
+ name: "options",
25
+ props: ["title", "options", "disabled", "value", "stacked", "markFormDirty"],
26
+ data() {
27
+ return {
28
+ selected: this.value,
29
+ };
30
+ },
31
+ methods: {
32
+ ...mapMutations("validation", ["updateFormDirty"]),
33
+ },
34
+ watch: {
35
+ value() {
36
+ this.selected = this.value;
37
+ },
38
+ selected() {
39
+ this.$emit("input", this.selected);
40
+ this.updateFormDirty(true);
41
+ if (this.changed) this.changed();
42
+ },
43
+ },
44
+ };
45
+ </script>
46
+ <style scoped>
47
+ .options {
48
+ margin-top: 5px;
49
+ }
50
+ </style>