@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,149 +1,154 @@
1
- <template>
2
- <div class="form-group">
3
- <label>
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
- <slot v-else></slot>
14
- <input
15
- class="form-control"
16
- type="number"
17
- v-model="_value"
18
- @keyup.enter.prevent="pressedEnter"
19
- />
20
- </div>
21
-
22
- <div v-if="formDirty">
23
- <div v-for="message in notifications" :key="message">
24
- <span class="invalid">{{ message }}</span>
25
- </div>
26
- </div>
27
- </div>
28
- </template>
29
-
30
- <script>
31
- import Tip from "../shared/Tip.vue";
32
-
33
- import { mapState, mapMutations } from "vuex";
34
-
35
- export default {
36
- name: "InputNumber",
37
- components: { Tip },
38
- props: {
39
- title: String,
40
- field: String,
41
- placeholder: String,
42
- disabled: Boolean,
43
- formName: String,
44
- required: Boolean,
45
- maxLength: Number,
46
- type: {
47
- type: String,
48
- default: "float",
49
- },
50
- markFormDirty: {
51
- type: Boolean,
52
- default: true,
53
- },
54
- value: Number,
55
- changed: Function,
56
- enter: Function,
57
- },
58
- data() {
59
- return {
60
- notifications: [],
61
- formDirty: false,
62
- _value: 0,
63
- precision: 1,
64
- };
65
- },
66
- created() {
67
- // não carregar as validações iniciais para number
68
- this._value = this.value;
69
- },
70
-
71
- methods: {
72
- ...mapMutations("validation", ["addValidation", "removeValidation", "updateFormDirty"]),
73
- validate() {
74
- this.notifications = [];
75
- if (this.value == 0) return;
76
- if (this.required && !this.value) {
77
- var message = `${this.title} não pode ser vazio!`;
78
- this.notifications.push(message);
79
- }
80
-
81
- if (this._value.toString().length > this.maxLength) {
82
- var message = `Valor inválido!`;
83
- this.notifications.push(message);
84
- }
85
- },
86
- pressedEnter() {
87
- if (this.enter) this.enter();
88
- },
89
- },
90
- computed: {
91
- ...mapState("validation", ["resetForm"]),
92
- },
93
- watch: {
94
- value() {
95
- this._value = this.value;
96
- if (this.changed) this.changed();
97
- },
98
- _value() {
99
- this.validate();
100
-
101
- let _value;
102
- if (this.type === "int") _value = parseInt(this._value);
103
- if (this.type === "float") _value = parseFloat(this._value);
104
-
105
- this.$emit("input", _value);
106
- this.formDirty = true;
107
- if (this.markFormDirty) this.updateFormDirty(true);
108
-
109
- this._value = _value;
110
- },
111
- notifications() {
112
- let self = this;
113
- this.notifications.forEach(function (notification) {
114
- let obj = {
115
- key: self.field + "&" + self.formName,
116
- formName: self.formName,
117
- notification: notification,
118
- };
119
- self.addValidation(obj);
120
- });
121
-
122
- if (this.notifications.length == 0) {
123
- let obj = {
124
- key: self.field + "&" + self.formName,
125
- formName: self.formName,
126
- };
127
- self.removeValidation(obj);
128
- }
129
- },
130
- resetForm: {
131
- handler(form) {
132
- if (form.nome == this.formName) this.formDirty = false;
133
- },
134
- deep: true,
135
- },
136
- },
137
- };
138
- </script>
139
-
140
- <style scoped>
141
- .success {
142
- color: #94aa2a;
143
- font-size: 14px;
144
- }
145
- .invalid {
146
- color: #f0134d;
147
- font-size: 14px;
148
- }
149
- </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
+ <slot v-else></slot>
14
+ <input
15
+ class="form-control"
16
+ type="number"
17
+ v-model="valueLocal"
18
+ @keyup.enter.prevent="pressedEnter"
19
+ />
20
+ </div>
21
+
22
+ <div v-if="formDirty">
23
+ <div v-for="message in notifications" :key="message">
24
+ <span class="invalid">{{ message }}</span>
25
+ </div>
26
+ </div>
27
+ </div>
28
+ </template>
29
+
30
+ <script>
31
+ import Tip from "../shared/Tip.vue";
32
+
33
+ import { mapState, mapMutations } from "vuex";
34
+
35
+ export default {
36
+ name: "InputNumber",
37
+ components: { Tip },
38
+ props: {
39
+ title: String,
40
+ field: String,
41
+ placeholder: String,
42
+ disabled: Boolean,
43
+ formName: String,
44
+ required: Boolean,
45
+ maxLength: Number,
46
+ type: {
47
+ type: String,
48
+ default: "float",
49
+ },
50
+ markFormDirty: {
51
+ type: Boolean,
52
+ default: true,
53
+ },
54
+ params: Object,
55
+ value: Number,
56
+ changed: Function,
57
+ enter: Function,
58
+ },
59
+ data() {
60
+ return {
61
+ notifications: [],
62
+ formDirty: false,
63
+ valueLocal: 0,
64
+ precision: 1,
65
+ };
66
+ },
67
+ created() {
68
+ // não carregar as validações iniciais para number
69
+ this.valueLocal = this.value;
70
+ },
71
+
72
+ methods: {
73
+ ...mapMutations("validation", [
74
+ "addValidation",
75
+ "removeValidation",
76
+ "updateFormDirty",
77
+ ]),
78
+ validate() {
79
+ this.notifications = [];
80
+ if (this.value == 0) return;
81
+ if (this.required && !this.value) {
82
+ var message = `${this.title} não pode ser vazio!`;
83
+ this.notifications.push(message);
84
+ }
85
+
86
+ if (this.valueLocal.toString().length > this.maxLength) {
87
+ var message = `Valor inválido!`;
88
+ this.notifications.push(message);
89
+ }
90
+ },
91
+ pressedEnter() {
92
+ if (this.enter) this.enter(this.params);
93
+ },
94
+ },
95
+ computed: {
96
+ ...mapState("validation", ["resetForm"]),
97
+ },
98
+ watch: {
99
+ value() {
100
+ this.valueLocal = this.value;
101
+ if (this.changed) this.changed();
102
+ },
103
+ valueLocal() {
104
+ this.validate();
105
+
106
+ let valueLocal;
107
+ if (this.type === "int") valueLocal = parseInt(this.valueLocal);
108
+ if (this.type === "float") valueLocal = parseFloat(this.valueLocal);
109
+
110
+ this.$emit("input", valueLocal);
111
+ this.formDirty = true;
112
+ if (this.markFormDirty) this.updateFormDirty(true);
113
+
114
+ this.valueLocal = valueLocal;
115
+ },
116
+ notifications() {
117
+ let self = this;
118
+ this.notifications.forEach(function (notification) {
119
+ let obj = {
120
+ key: self.field + "&" + self.formName,
121
+ formName: self.formName,
122
+ notification: notification,
123
+ };
124
+ self.addValidation(obj);
125
+ });
126
+
127
+ if (this.notifications.length == 0) {
128
+ let obj = {
129
+ key: self.field + "&" + self.formName,
130
+ formName: self.formName,
131
+ };
132
+ self.removeValidation(obj);
133
+ }
134
+ },
135
+ resetForm: {
136
+ handler(form) {
137
+ if (form.name == this.formName) this.formDirty = false;
138
+ },
139
+ deep: true,
140
+ },
141
+ },
142
+ };
143
+ </script>
144
+
145
+ <style scoped>
146
+ .success {
147
+ color: #94aa2a;
148
+ font-size: 14px;
149
+ }
150
+ .invalid {
151
+ color: #f0134d;
152
+ font-size: 14px;
153
+ }
154
+ </style>
@@ -1,135 +1,135 @@
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
- <i
10
- v-if="notifications.length > 0 && formDirty"
11
- class="required glyphicon fas fa-exclamation-triangle"
12
- ></i>
13
- <slot v-else></slot>
14
- <input
15
- type="password"
16
- :placeholder="placeholder"
17
- v-mask="mask || withoutMask"
18
- v-bind:value="value"
19
- v-on:input="$emit('input', $event.target.value)"
20
- class="form-control"
21
- :class="{ required: notifications.length > 0 && formDirty }"
22
- />
23
- </div>
24
- <div v-if="formDirty">
25
- <div v-for="message in notifications" :key="message">
26
- <span class="invalid">{{ message }}</span>
27
- </div>
28
- </div>
29
- </div>
30
- </template>
31
-
32
- <script>
33
- import Tip from "../shared/Tip.vue";
34
- import { mapState, mapMutations } from "vuex";
35
-
36
- export default {
37
- components: { Tip },
38
- name: "InputPassword",
39
- mixins: [],
40
- props: [
41
- "title",
42
- "field",
43
- "titleColor",
44
- "placeholder",
45
- "mask",
46
- "formName",
47
- "required",
48
- "maxLength",
49
- "value",
50
- ],
51
- data() {
52
- return {
53
- notifications: [],
54
- formDirty: false,
55
- withoutMask: {
56
- mask: "*".repeat(255),
57
- tokens: {
58
- "*": { pattern: /./ },
59
- },
60
- },
61
- };
62
- },
63
- created() {
64
- this.validate();
65
- },
66
- methods: {
67
- ...mapMutations("validation", ["addValidation", "removeValidation", "updateFormDirty"]),
68
- validate() {
69
- this.notifications = [];
70
-
71
- if (this.required && this.value.length == 0) {
72
- var message = `${this.title} não pode ser vazio!`;
73
- this.notifications.push(message);
74
- }
75
-
76
- if (this.maxLength > 0) {
77
- if (this.value.length > this.maxLength) {
78
- var message = `Máximo de ${this.maxLength} caracteres!`;
79
- this.notifications.push(message);
80
- }
81
- }
82
- },
83
- },
84
- computed: {
85
- ...mapState("validation", ["resetForm", "validations"]),
86
- },
87
- watch: {
88
- value() {
89
- this.validate();
90
- this.formDirty = true;
91
- this.updateFormDirty(true);
92
- },
93
- notifications() {
94
- let self = this;
95
- this.notifications.forEach(function (notification) {
96
- let obj = {
97
- key: self.field + "&" + self.formName,
98
- formName: self.formName,
99
- notification: notification,
100
- };
101
- self.addValidation(obj);
102
- });
103
-
104
- if (this.notifications.length == 0) {
105
- let obj = {
106
- key: self.field + "&" + self.formName,
107
- formName: self.formName,
108
- };
109
- self.removeValidation(obj);
110
- }
111
- },
112
- resetForm: {
113
- handler(form) {
114
- if (form.nome == this.formName) this.formDirty = false;
115
- },
116
- deep: true,
117
- },
118
- },
119
- };
120
- </script>
121
-
122
- <style scoped>
123
- .success {
124
- color: #94aa2a;
125
- font-size: 14px;
126
- }
127
- .invalid {
128
- color: #f0134d;
129
- font-size: 14px;
130
- }
131
-
132
- .margin-button {
133
- margin-top: -10px;
134
- }
135
- </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
+ <i
10
+ v-if="notifications.length > 0 && formDirty"
11
+ class="required glyphicon fas fa-exclamation-triangle"
12
+ ></i>
13
+ <slot v-else></slot>
14
+ <input
15
+ type="password"
16
+ :placeholder="placeholder"
17
+ v-mask="mask || withoutMask"
18
+ v-bind:value="value"
19
+ v-on:input="$emit('input', $event.target.value)"
20
+ class="form-control"
21
+ :class="{ required: notifications.length > 0 && formDirty }"
22
+ />
23
+ </div>
24
+ <div v-if="formDirty">
25
+ <div v-for="message in notifications" :key="message">
26
+ <span class="invalid">{{ message }}</span>
27
+ </div>
28
+ </div>
29
+ </div>
30
+ </template>
31
+
32
+ <script>
33
+ import Tip from "../shared/Tip.vue";
34
+ import { mapState, mapMutations } from "vuex";
35
+
36
+ export default {
37
+ components: { Tip },
38
+ name: "InputPassword",
39
+ mixins: [],
40
+ props: [
41
+ "title",
42
+ "field",
43
+ "titleColor",
44
+ "placeholder",
45
+ "mask",
46
+ "formName",
47
+ "required",
48
+ "maxLength",
49
+ "value",
50
+ ],
51
+ data() {
52
+ return {
53
+ notifications: [],
54
+ formDirty: false,
55
+ withoutMask: {
56
+ mask: "*".repeat(255),
57
+ tokens: {
58
+ "*": { pattern: /./ },
59
+ },
60
+ },
61
+ };
62
+ },
63
+ created() {
64
+ this.validate();
65
+ },
66
+ methods: {
67
+ ...mapMutations("validation", ["addValidation", "removeValidation", "updateFormDirty"]),
68
+ validate() {
69
+ this.notifications = [];
70
+
71
+ if (this.required && this.value.length == 0) {
72
+ var message = `${this.title} não pode ser vazio!`;
73
+ this.notifications.push(message);
74
+ }
75
+
76
+ if (this.maxLength > 0) {
77
+ if (this.value.length > this.maxLength) {
78
+ var message = `Máximo de ${this.maxLength} caracteres!`;
79
+ this.notifications.push(message);
80
+ }
81
+ }
82
+ },
83
+ },
84
+ computed: {
85
+ ...mapState("validation", ["resetForm", "validations"]),
86
+ },
87
+ watch: {
88
+ value() {
89
+ this.validate();
90
+ this.formDirty = true;
91
+ this.updateFormDirty(true);
92
+ },
93
+ notifications() {
94
+ let self = this;
95
+ this.notifications.forEach(function (notification) {
96
+ let obj = {
97
+ key: self.field + "&" + self.formName,
98
+ formName: self.formName,
99
+ notification: notification,
100
+ };
101
+ self.addValidation(obj);
102
+ });
103
+
104
+ if (this.notifications.length == 0) {
105
+ let obj = {
106
+ key: self.field + "&" + self.formName,
107
+ formName: self.formName,
108
+ };
109
+ self.removeValidation(obj);
110
+ }
111
+ },
112
+ resetForm: {
113
+ handler(form) {
114
+ if (form.name == this.formName) this.formDirty = false;
115
+ },
116
+ deep: true,
117
+ },
118
+ },
119
+ };
120
+ </script>
121
+
122
+ <style scoped>
123
+ .success {
124
+ color: #94aa2a;
125
+ font-size: 14px;
126
+ }
127
+ .invalid {
128
+ color: #f0134d;
129
+ font-size: 14px;
130
+ }
131
+
132
+ .margin-button {
133
+ margin-top: -10px;
134
+ }
135
+ </style>