@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,157 +1,162 @@
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
- .success {
146
- color: #94aa2a;
147
- font-size: 14px;
148
- }
149
- .invalid {
150
- color: #f0134d;
151
- font-size: 14px;
152
- }
153
-
154
- .margin-button {
155
- margin-top: -3px;
156
- }
157
- </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
+ <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,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
+ <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>