@nixweb/nixloc-ui 0.0.125 → 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 (111) hide show
  1. package/docs/src/component/template/ViewTemplateReportPreview.drawio +210 -0
  2. package/package.json +79 -77
  3. package/src/App.vue +13 -13
  4. package/src/component/forms/Button.vue +170 -169
  5. package/src/component/forms/CheckboxGroup.vue +72 -63
  6. package/src/component/forms/CheckboxSimple.vue +46 -27
  7. package/src/component/forms/Color.vue +38 -38
  8. package/src/component/forms/DateTime.vue +167 -177
  9. package/src/component/forms/Dropdown.vue +218 -224
  10. package/src/component/forms/EditorHtml.vue +126 -123
  11. package/src/component/forms/FileUpload.vue +185 -189
  12. package/src/component/forms/ImageUpload.vue +230 -0
  13. package/src/component/forms/IncrementDecrement.vue +101 -0
  14. package/src/component/forms/InputDecimal.vue +142 -137
  15. package/src/component/forms/InputNumber.vue +154 -149
  16. package/src/component/forms/InputPassword.vue +135 -135
  17. package/src/component/forms/InputText.vue +162 -157
  18. package/src/component/forms/Modal.vue +65 -60
  19. package/src/component/forms/RadioGroup.vue +50 -50
  20. package/src/component/forms/Select.vue +349 -337
  21. package/src/component/forms/SelectStatic.vue +127 -120
  22. package/src/component/forms/Slider.vue +18 -18
  23. package/src/component/forms/TextArea.vue +126 -126
  24. package/src/component/layout/Alert.vue +92 -92
  25. package/src/component/layout/Badge.vue +103 -103
  26. package/src/component/layout/FixedBar.vue +100 -68
  27. package/src/component/layout/Header.vue +38 -35
  28. package/src/component/layout/LoadingFullPage.vue +27 -27
  29. package/src/component/layout/Menu.vue +210 -214
  30. package/src/component/layout/Molded.vue +28 -27
  31. package/src/component/layout/Panel.vue +140 -142
  32. package/src/component/layout/Popover.vue +126 -126
  33. package/src/component/layout/ScrollBar.vue +42 -43
  34. package/src/component/layout/Tab.vue +135 -0
  35. package/src/component/layout/Tag.vue +3 -3
  36. package/src/component/layout/Wizard.vue +211 -213
  37. package/src/component/rental/DisplayPeriodRent.vue +81 -0
  38. package/src/component/rental/DisplayTotalization.vue +47 -0
  39. package/src/component/shared/Collapse.vue +131 -131
  40. package/src/component/shared/Confirmation.vue +2 -2
  41. package/src/component/shared/DocumentEditor.vue +1 -1
  42. package/src/component/shared/DocumentPreview.vue +1 -1
  43. package/src/component/shared/DocumentPublic.vue +34 -0
  44. package/src/component/shared/ExportExcel.vue +1 -8
  45. package/src/component/shared/ExportPDF.vue +116 -116
  46. package/src/component/shared/{HeaderPrint.vue → HeaderReport.vue} +4 -4
  47. package/src/component/shared/HorizontalFilter.vue +59 -59
  48. package/src/component/shared/Loading.vue +107 -107
  49. package/src/component/shared/LoadingMoreButton.vue +23 -23
  50. package/src/component/shared/Messages.vue +81 -83
  51. package/src/component/shared/PDFViewer.vue +22 -22
  52. package/src/component/shared/Pagination.vue +52 -53
  53. package/src/component/shared/{LegendaParametro.vue → ParameterLegend.vue} +22 -26
  54. package/src/component/shared/ProgressBar.vue +22 -21
  55. package/src/component/shared/QueryButton.vue +66 -66
  56. package/src/component/shared/Report.vue +187 -0
  57. package/src/component/shared/SaveCancel.vue +26 -5
  58. package/src/component/shared/Search.vue +154 -154
  59. package/src/component/shared/SelectOption.vue +146 -0
  60. package/src/component/shared/Table.vue +163 -243
  61. package/src/component/shared/TableButton.vue +36 -36
  62. package/src/component/shared/TableDraggable.vue +127 -0
  63. package/src/component/shared/TableItem.vue +177 -0
  64. package/src/component/shared/TableTotalRecords.vue +9 -10
  65. package/src/component/shared/TableTotalization.vue +47 -47
  66. package/src/component/shared/Tip.vue +42 -42
  67. package/src/component/shared/Toast.vue +54 -54
  68. package/src/component/shared/TotalizationReport.vue +59 -0
  69. package/src/component/shared/VerticalFilter.vue +97 -145
  70. package/src/component/shared/query-builder/AddRule.vue +181 -187
  71. package/src/component/shared/query-builder/ConvertToOdata.js +34 -43
  72. package/src/component/shared/query-builder/DynamicComponent.vue +21 -16
  73. package/src/component/shared/query-builder/DynamicComponentList.vue +73 -0
  74. package/src/component/shared/query-builder/Fields.vue +29 -63
  75. package/src/component/shared/query-builder/QueryBuilder.vue +69 -69
  76. package/src/component/shared/query-builder/Rules.vue +2 -14
  77. package/src/component/shared/query-builder/SelectRule.vue +15 -15
  78. package/src/component/shared/query-builder/Tags.vue +24 -8
  79. package/src/component/shared/query-builder/utilities.js +21 -21
  80. package/src/component/template/{ListViewWithHandlerData.vue → ListViewWithDataHandler.vue} +260 -231
  81. package/src/component/template/{AddEditReport.vue → ReportCreateUpdate.vue} +40 -22
  82. package/src/component/template/ViewTemplateConfiguration.vue +64 -69
  83. package/src/component/template/ViewTemplateDocumentView.vue +22 -25
  84. package/src/component/template/ViewTemplateReportList.vue +39 -57
  85. package/src/component/template/ViewTemplateReportPreview.vue +270 -341
  86. package/src/component/template/ViewTemplateReportPreviewCOPIASEGURANCA.vue +497 -0
  87. package/src/component/template/ViewTemplateSelectOption.vue +60 -0
  88. package/src/component/template/ViewTemplateWithSalveCancel.vue +32 -32
  89. package/src/component/template/ViewTemplateWithTable.vue +56 -49
  90. package/src/component/template/model/Report.js +2 -2
  91. package/src/component/value-objects/Address.js +11 -0
  92. package/src/component/value-objects/{Endereco.vue → Address.vue} +39 -40
  93. package/src/component/value-objects/{DadosContato.js → Contact.js} +2 -2
  94. package/src/component/value-objects/{DadosContato.vue → Contact.vue} +24 -17
  95. package/src/component/value-objects/Person.js +10 -0
  96. package/src/component/value-objects/{DadosPessoa.vue → Person.vue} +50 -35
  97. package/src/config/axios.js +9 -9
  98. package/src/config/dicas.js +14 -14
  99. package/src/config/router.js +13 -13
  100. package/src/config/token.js +14 -14
  101. package/src/main.js +23 -23
  102. package/src/store/modules/generic.js +512 -488
  103. package/src/store/modules/report.js +156 -127
  104. package/src/store/modules/user.js +6 -0
  105. package/src/store/modules/validation.js +38 -38
  106. package/src/store/store.js +13 -13
  107. package/docs/src/component/template/ModeloRelatorioView.drawio +0 -160
  108. package/src/component/shared/query-builder/ListDynamicComponent.vue +0 -42
  109. package/src/component/shared/query-builder/Totalization.vue +0 -38
  110. package/src/component/value-objects/DadosPessoa.js +0 -10
  111. package/src/component/value-objects/Endereco.js +0 -11
@@ -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.nome == 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,60 +1,65 @@
1
- <template>
2
- <div>
3
- <vodal
4
- :duration="50"
5
- :show="modal.open"
6
- @hide="hideModal()"
7
- :width="width"
8
- :height="height"
9
- :closeOnEsc="fecharBotao"
10
- :closeButton="fecharBotao"
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
- },
45
- components: { Messages, Vodal },
46
- computed: {
47
- ...mapState("generic", ["modal", "vodal"]),
48
- },
49
- methods: {
50
- ...mapMutations("generic", ["hideModal"]),
51
- },
52
- };
53
- </script>
54
-
55
- <style scoped>
56
- .title {
57
- font-size: 18px;
58
- margin-bottom: 5px;
59
- }
60
- </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>