@nixweb/nixloc-ui 0.0.300 → 0.0.301

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 (158) hide show
  1. package/package.json +1 -1
  2. package/src/App.vue +13 -0
  3. package/src/component/forms/Button.vue +163 -0
  4. package/src/component/forms/ButtonFilter.vue +75 -0
  5. package/src/component/forms/ButtonGroup.vue +67 -0
  6. package/src/component/forms/ButtonSub.vue +98 -0
  7. package/src/component/forms/ButtonToggle.vue +77 -0
  8. package/src/component/forms/CheckboxGroup.vue +69 -0
  9. package/src/component/forms/CheckboxServer.vue +192 -0
  10. package/src/component/forms/CheckboxSimple.vue +60 -0
  11. package/src/component/forms/Color.vue +38 -0
  12. package/src/component/forms/DateTime.vue +170 -0
  13. package/src/component/forms/DateYearMonth.vue +193 -0
  14. package/src/component/forms/Dropdown.vue +236 -0
  15. package/src/component/forms/EditorHtml.vue +132 -0
  16. package/src/component/forms/FileUpload.vue +170 -0
  17. package/src/component/forms/ImageUpload.vue +214 -0
  18. package/src/component/forms/IncrementDecrement.vue +148 -0
  19. package/src/component/forms/InputAddressGoogle.vue +171 -0
  20. package/src/component/forms/InputCallToAction.vue +135 -0
  21. package/src/component/forms/InputDecimal.vue +153 -0
  22. package/src/component/forms/InputDecimalDiscount.vue +78 -0
  23. package/src/component/forms/InputNumber.vue +160 -0
  24. package/src/component/forms/InputPassword.vue +148 -0
  25. package/src/component/forms/InputTag.vue +125 -0
  26. package/src/component/forms/InputText.vue +174 -0
  27. package/src/component/forms/InputTextEdit.vue +69 -0
  28. package/src/component/forms/InputWhatsApp.vue +48 -0
  29. package/src/component/forms/Modal.vue +57 -0
  30. package/src/component/forms/RadioGroup.vue +91 -0
  31. package/src/component/forms/Select.vue +378 -0
  32. package/src/component/forms/SelectStatic.vue +198 -0
  33. package/src/component/forms/SideBar.vue +100 -0
  34. package/src/component/forms/Slider.vue +18 -0
  35. package/src/component/forms/TextArea.vue +138 -0
  36. package/src/component/forms/Toggle.vue +72 -0
  37. package/src/component/layout/Account.vue +131 -0
  38. package/src/component/layout/Alert.vue +88 -0
  39. package/src/component/layout/Badge.vue +111 -0
  40. package/src/component/layout/BarFloating.vue +68 -0
  41. package/src/component/layout/FixedBar.vue +103 -0
  42. package/src/component/layout/Gantt.vue +128 -0
  43. package/src/component/layout/Header.vue +56 -0
  44. package/src/component/layout/HideShow.vue +62 -0
  45. package/src/component/layout/IconMolded.vue +59 -0
  46. package/src/component/layout/LoadingFullPage.vue +27 -0
  47. package/src/component/layout/Menu.vue +287 -0
  48. package/src/component/layout/Molded.vue +30 -0
  49. package/src/component/layout/NewAccount.vue +136 -0
  50. package/src/component/layout/NewHeader.vue +60 -0
  51. package/src/component/layout/NewIconMolded.vue +71 -0
  52. package/src/component/layout/NewMenu.vue +456 -0
  53. package/src/component/layout/Panel.vue +185 -0
  54. package/src/component/layout/Popover.vue +126 -0
  55. package/src/component/layout/ScrollBar.vue +57 -0
  56. package/src/component/layout/Tab.vue +135 -0
  57. package/src/component/layout/Tag.vue +97 -0
  58. package/src/component/layout/Wizard.vue +211 -0
  59. package/src/component/rental/DisplayCalculatePeriod.vue +49 -0
  60. package/src/component/rental/DisplayPeriodRent.vue +55 -0
  61. package/src/component/rental/DisplayTotalization.vue +86 -0
  62. package/src/component/report/Fields.vue +109 -0
  63. package/src/component/report/Report.vue +314 -0
  64. package/src/component/report/ReportTable.vue +112 -0
  65. package/src/component/report/Totalization.vue +34 -0
  66. package/src/component/shared/CodeEditor.vue +128 -0
  67. package/src/component/shared/Collapse.vue +131 -0
  68. package/src/component/shared/Confirmation.vue +74 -0
  69. package/src/component/shared/DocumentEditor.vue +99 -0
  70. package/src/component/shared/DocumentPreview.vue +81 -0
  71. package/src/component/shared/DocumentPublic.vue +33 -0
  72. package/src/component/shared/ExportExcel.vue +56 -0
  73. package/src/component/shared/ExportPDF.vue +116 -0
  74. package/src/component/shared/FullCalendar.vue +174 -0
  75. package/src/component/shared/HeaderReport.vue +47 -0
  76. package/src/component/shared/HorizontalFilter.vue +64 -0
  77. package/src/component/shared/ListNotifications.vue +70 -0
  78. package/src/component/shared/Loading.vue +107 -0
  79. package/src/component/shared/LoadingCard.vue +65 -0
  80. package/src/component/shared/LoadingMoreButton.vue +23 -0
  81. package/src/component/shared/Messages.vue +109 -0
  82. package/src/component/shared/PDFViewer.vue +24 -0
  83. package/src/component/shared/Pagination.vue +108 -0
  84. package/src/component/shared/ParameterLegend.vue +169 -0
  85. package/src/component/shared/ProgressBar.vue +25 -0
  86. package/src/component/shared/QueryButton.vue +66 -0
  87. package/src/component/shared/Report.vue +200 -0
  88. package/src/component/shared/SaveCancel.vue +99 -0
  89. package/src/component/shared/Search.vue +174 -0
  90. package/src/component/shared/SelectOption.vue +162 -0
  91. package/src/component/shared/Table.vue +174 -0
  92. package/src/component/shared/TableButton.vue +36 -0
  93. package/src/component/shared/TableDraggable.vue +117 -0
  94. package/src/component/shared/TableImport.vue +93 -0
  95. package/src/component/shared/TableItem.vue +214 -0
  96. package/src/component/shared/TableTotalPerPage.vue +78 -0
  97. package/src/component/shared/TableTotalRecords.vue +44 -0
  98. package/src/component/shared/TableTotalization.vue +47 -0
  99. package/src/component/shared/TimeLine.vue +42 -0
  100. package/src/component/shared/Timer.vue +78 -0
  101. package/src/component/shared/Tip.vue +42 -0
  102. package/src/component/shared/Toast.vue +69 -0
  103. package/src/component/shared/ToggleTheme.vue +128 -0
  104. package/src/component/shared/TotalizationReport.vue +86 -0
  105. package/src/component/shared/VerticalFilter.vue +97 -0
  106. package/src/component/shared/automation/ActivitiesList.vue +44 -0
  107. package/src/component/shared/automation/AddRule.vue +61 -0
  108. package/src/component/shared/automation/AutomationBuilder.vue +27 -0
  109. package/src/component/shared/automation/DynamicComponentList.vue +86 -0
  110. package/src/component/shared/automation/SelectRule.vue +98 -0
  111. package/src/component/shared/automation/components/BillingByRent.vue +98 -0
  112. package/src/component/shared/automation/components/SendEmail.vue +94 -0
  113. package/src/component/shared/file-manager/FileManager.vue +391 -0
  114. package/src/component/shared/filter-builder/FilterBuilder.vue +221 -0
  115. package/src/component/shared/filter-builder/FilterQuery.vue +94 -0
  116. package/src/component/shared/query-builder/AddRule.vue +203 -0
  117. package/src/component/shared/query-builder/ConvertToOdata.js +86 -0
  118. package/src/component/shared/query-builder/DynamicComponent.vue +161 -0
  119. package/src/component/shared/query-builder/DynamicComponentList.vue +70 -0
  120. package/src/component/shared/query-builder/Fields.vue +93 -0
  121. package/src/component/shared/query-builder/QueryBuilder.vue +69 -0
  122. package/src/component/shared/query-builder/Rules.vue +68 -0
  123. package/src/component/shared/query-builder/SelectRule.vue +97 -0
  124. package/src/component/shared/query-builder/Tags.vue +59 -0
  125. package/src/component/shared/query-builder/utilities.js +22 -0
  126. package/src/component/signature/Payment.vue +161 -0
  127. package/src/component/signature/Warning.vue +76 -0
  128. package/src/component/template/ListViewWithDataHandler.vue +429 -0
  129. package/src/component/template/ReportCreateUpdate.vue +110 -0
  130. package/src/component/template/ViewTemplateConfiguration.vue +64 -0
  131. package/src/component/template/ViewTemplateDocumentView.vue +213 -0
  132. package/src/component/template/ViewTemplateImportFile.vue +347 -0
  133. package/src/component/template/ViewTemplateReportList.vue +217 -0
  134. package/src/component/template/ViewTemplateReportPreview.vue +432 -0
  135. package/src/component/template/ViewTemplateSelectOption.vue +46 -0
  136. package/src/component/template/ViewTemplateWithSalveCancel.vue +32 -0
  137. package/src/component/template/ViewTemplateWithTable.vue +62 -0
  138. package/src/component/template/model/Report.js +6 -0
  139. package/src/component/training/Course.vue +344 -0
  140. package/src/component/training/CourseView.vue +190 -0
  141. package/src/component/value-objects/Address.js +11 -0
  142. package/src/component/value-objects/Address.vue +157 -0
  143. package/src/component/value-objects/Contact.js +7 -0
  144. package/src/component/value-objects/Contact.vue +106 -0
  145. package/src/component/value-objects/Person.js +10 -0
  146. package/src/component/value-objects/Person.vue +129 -0
  147. package/src/config/axios.js +9 -0
  148. package/src/config/dicas.js +15 -0
  149. package/src/config/router.js +14 -0
  150. package/src/config/token.js +15 -0
  151. package/src/main.js +23 -0
  152. package/src/store/modules/automation.js +31 -0
  153. package/src/store/modules/generic.js +816 -0
  154. package/src/store/modules/report.js +278 -0
  155. package/src/store/modules/user.js +67 -0
  156. package/src/store/modules/util.js +26 -0
  157. package/src/store/modules/validation.js +39 -0
  158. package/src/store/store.js +14 -0
@@ -0,0 +1,378 @@
1
+ <template>
2
+ <div class="margin">
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
9
+ class="select"
10
+ :class="{
11
+ 'select-invalid': notifications.length > 0 && formDirty,
12
+ border: showBorder,
13
+ }"
14
+ >
15
+ <multiselect
16
+ @open="onOpen"
17
+ @select="onSelected"
18
+ @search-change="onSearch"
19
+ :options="data"
20
+ v-model.trim="currentValue"
21
+ :custom-label="label"
22
+ placeholder
23
+ :disabled="disabled"
24
+ :showLabels="true"
25
+ :noResult="false"
26
+ :maxHeight="250"
27
+ ref="multiselect"
28
+ selectLabel
29
+ deselectLabel
30
+ selectedLabel
31
+ >
32
+ <div slot="beforeList">
33
+ <vue-loading
34
+ v-if="loading"
35
+ type="bubbles"
36
+ color="#577696"
37
+ :size="{ width: '40px', height: '40px' }"
38
+ ></vue-loading>
39
+ <div class="before-list" v-if="!loading">
40
+ <Button
41
+ v-if="showNewRegister"
42
+ key="addNewRegister"
43
+ type="primary"
44
+ title="Novo"
45
+ size="small"
46
+ :clicked="addNewRegister"
47
+ />
48
+ <Button
49
+ key="cleanSelect"
50
+ title="Limpar"
51
+ type="warning"
52
+ classIcon="fas fa-broom"
53
+ size="small"
54
+ :clicked="cleanSelect"
55
+ />
56
+ </div>
57
+ </div>
58
+ <div
59
+ slot="afterList"
60
+ v-if="totalRecords > 20 && data.length < totalRecords"
61
+ >
62
+ <div class="after-list text-center">
63
+ <Button
64
+ key="loadingMore"
65
+ type="info"
66
+ title="Carregar mais..."
67
+ classIcon="fas fa-redo-alt"
68
+ size="small"
69
+ :clicked="loadingMore"
70
+ />
71
+ </div>
72
+ </div>
73
+ <div slot="noOptions">Lista está vazia</div>
74
+ <div slot="noResult">Nenhum registro encontrado</div>
75
+ </multiselect>
76
+ <div v-if="formDirty">
77
+ <div v-for="message in notifications" :key="message">
78
+ <span class="invalid">{{ message }}</span>
79
+ </div>
80
+ </div>
81
+ </div>
82
+
83
+ <vodal
84
+ v-if="nameNewRegister"
85
+ :duration="50"
86
+ :show="showVodal(nameNewRegister)"
87
+ @hide="hide()"
88
+ :width="widthNewRegister"
89
+ :height="heightNewRegister"
90
+ :closeOnEsc="true"
91
+ :closeButton="true"
92
+ >
93
+ <Messages v-if="vodal.open" />
94
+ <div class="title-new-form">{{ titleNewRegister }}</div>
95
+ <hr class="hr" />
96
+ <slot></slot>
97
+ </vodal>
98
+ </div>
99
+ </template>
100
+ <script>
101
+ import Tip from "../shared/Tip.vue";
102
+ import Messages from "../shared/Messages.vue";
103
+ import Multiselect from "vue-multiselect";
104
+
105
+ import Button from "./Button.vue";
106
+ import Vodal from "vodal";
107
+
108
+ import { mapState, mapActions, mapMutations, mapGetters } from "vuex";
109
+
110
+ export default {
111
+ name: "Select",
112
+ props: {
113
+ title: String,
114
+ field: String,
115
+ formName: String,
116
+ required: Boolean,
117
+ url: String,
118
+ disabled: Boolean,
119
+ initialFieldTarget: String,
120
+ fieldTarget: String,
121
+ propsParams: Object,
122
+ value: Object,
123
+ changed: Function,
124
+ nameNewRegister: String,
125
+ showNewRegister: {
126
+ type: Boolean,
127
+ default: true,
128
+ },
129
+ clickedNewRegister: Function,
130
+ titleNewRegister: String,
131
+ widthNewRegister: Number,
132
+ heightNewRegister: Number,
133
+ markFormDirty: {
134
+ type: Boolean,
135
+ default: true,
136
+ },
137
+ showBorder: {
138
+ type: Boolean,
139
+ default: true,
140
+ },
141
+ },
142
+ components: {
143
+ Multiselect,
144
+ Button,
145
+ Vodal,
146
+ Messages,
147
+ Tip,
148
+ },
149
+ data() {
150
+ return {
151
+ currentValue: {},
152
+ data: [],
153
+ totalRecords: 0,
154
+ baseParams: {
155
+ search: "",
156
+ currentPage: 1,
157
+ totalPerPage: 20,
158
+ },
159
+
160
+ registerNew: false,
161
+ loading: true,
162
+ notifications: [],
163
+ formDirty: false,
164
+ names: [],
165
+ };
166
+ },
167
+ created() {
168
+ this.validate();
169
+ if (this.value)
170
+ this.currentValue = { id: this.value.id, content: this.value.content };
171
+ },
172
+ mounted() {
173
+ let el = this.$el.getElementsByClassName("multiselect")[0];
174
+ if (el) {
175
+ el.tabIndex = 0;
176
+ }
177
+ },
178
+ computed: {
179
+ ...mapState("validation", ["resetForm", "vodal"]),
180
+ ...mapState("generic", ["vodal"]),
181
+ ...mapGetters("generic", ["showVodal", "event"]),
182
+ },
183
+ methods: {
184
+ ...mapActions("generic", ["getApi"]),
185
+ ...mapMutations("generic", [
186
+ "removeLoading",
187
+ "openVodal",
188
+ "hideVodal",
189
+ "removeNotificarions",
190
+ "addFilter",
191
+ ]),
192
+ ...mapMutations("validation", [
193
+ "addValidation",
194
+ "removeValidation",
195
+ "resetValidation",
196
+ "updateFormDirty",
197
+ ]),
198
+ onOpen() {
199
+ this.getAll();
200
+ },
201
+ onSelected(value) {
202
+ this.$emit("input", value);
203
+ if (this.changed) this.changed();
204
+ if (this.fieldTarget) {
205
+ let obj = {
206
+ tag: `${this.title}: ${value.content}`,
207
+ fieldTarget: this.fieldTarget,
208
+ value: value.id,
209
+ };
210
+ this.addFilter(obj);
211
+ }
212
+ },
213
+ onSearch(value) {
214
+ this.baseParams.search = value;
215
+ this.getAll();
216
+ },
217
+ label(value) {
218
+ if (value.content) return `${value.content}`;
219
+ },
220
+ getAll() {
221
+ let obj = { ...this.baseParams, ...this.propsParams };
222
+ let params = { url: this.url, obj: obj };
223
+ this.loading = true;
224
+ this.getApi(params).then((response) => {
225
+ this.totalRecords = response.content.totalRecords;
226
+ let self = this;
227
+ if (this.baseParams.currentPage == 1) {
228
+ this.data = [];
229
+ }
230
+ response.content.data.map(function (value, key) {
231
+ self.data.push(value);
232
+ });
233
+ this.loading = false;
234
+ this.removeLoading(["loadingMore"]);
235
+ });
236
+ },
237
+ addNewRegister() {
238
+ if (this.clickedNewRegister) {
239
+ this.clickedNewRegister();
240
+ } else {
241
+ this.openVodal(this.nameNewRegister);
242
+ this.resetValidation(this.nameNewRegister);
243
+ this.removeNotificarions();
244
+ this.$refs.multiselect.deactivate();
245
+ this.removeLoading(["addNewRegister"]);
246
+ }
247
+ },
248
+ hide() {
249
+ this.hideVodal(this.nameNewRegister);
250
+ },
251
+ cleanSelect() {
252
+ let obj = { id: "", content: "" };
253
+ this.currentValue = obj;
254
+ this.$emit("input", obj);
255
+ this.$refs.multiselect.deactivate();
256
+ this.removeLoading(["cleanSelect"]);
257
+
258
+ if (this.fieldTarget) {
259
+ let obj = { fieldTarget: this.fieldTarget, value: "" };
260
+ this.addFilter(obj);
261
+ }
262
+ },
263
+ loadingMore() {
264
+ this.baseParams.currentPage++;
265
+ this.getAll();
266
+ },
267
+ validate() {
268
+ this.notifications = [];
269
+ if (this.required && !this.value.id) {
270
+ var message = `${this.title} não pode ser vazio!`;
271
+ this.notifications.push(message);
272
+ }
273
+ },
274
+ },
275
+ watch: {
276
+ event: {
277
+ handler(event) {
278
+ if (event.name == "tagRemoved") {
279
+ if (this.fieldTarget == event.data) this.cleanSelect();
280
+ }
281
+ },
282
+ deep: true,
283
+ },
284
+ "value.id": function () {
285
+ this.validate();
286
+ this.formDirty = true;
287
+ if (this.markFormDirty) this.updateFormDirty(true);
288
+ this.currentValue = { id: this.value.id, content: this.value.content };
289
+ },
290
+ notifications() {
291
+ let self = this;
292
+ this.notifications.forEach(function (notification) {
293
+ let obj = {
294
+ key: self.field + "&" + self.formName,
295
+ formName: self.formName,
296
+ notification: notification,
297
+ };
298
+ self.addValidation(obj);
299
+ });
300
+
301
+ if (this.notifications.length == 0) {
302
+ let obj = {
303
+ key: self.field + "&" + self.formName,
304
+ formName: self.formName,
305
+ };
306
+ self.removeValidation(obj);
307
+ }
308
+ },
309
+ resetForm: {
310
+ handler(form) {
311
+ if (form.nome == this.formName) {
312
+ let obj = { id: "", content: "" };
313
+ this.currentValue = obj;
314
+ this.$emit("input", obj);
315
+ this.formDirty = false;
316
+ }
317
+ },
318
+ deep: true,
319
+ },
320
+ "vodal.open": function (value) {
321
+ if (!value) this.registerNew = false;
322
+ },
323
+ },
324
+ };
325
+ </script>
326
+
327
+ <style scoped>
328
+ .title {
329
+ font-size: 14px !important;
330
+ font-weight: 400 !important;
331
+ color: #0a0a0a;
332
+ letter-spacing: 0.5px !important;
333
+ }
334
+
335
+ .margin {
336
+ margin-bottom: 10px;
337
+ }
338
+
339
+ div.before-list {
340
+ padding: 8px;
341
+ }
342
+
343
+ div.after-list {
344
+ padding: 8px;
345
+ }
346
+
347
+ .invalid {
348
+ color: #f0134d;
349
+ font-size: 14px;
350
+ }
351
+
352
+ .select {
353
+ min-width: 300px;
354
+ height: 36px;
355
+ border-bottom: 1px solid #d6dadf;
356
+ border-radius: 0px !important;
357
+ z-index: 100;
358
+ }
359
+
360
+ .select-invalid {
361
+ border-bottom: 1px solid #ff5454;
362
+ }
363
+
364
+ .select-valid {
365
+ border-bottom: 1px solid #94aa2a;
366
+ }
367
+
368
+ .title-new-form {
369
+ font-size: 18px;
370
+ margin-bottom: 5px;
371
+ }
372
+
373
+ .border {
374
+ border: 1px solid #dbdee0 !important;
375
+ border-radius: 5px !important;
376
+ height: 38px !important;
377
+ }
378
+ </style>
@@ -0,0 +1,198 @@
1
+ <template>
2
+ <div>
3
+ <label>
4
+ <span class="title">{{ title }} </span>
5
+ <span class="required" v-if="required">*</span>
6
+ </label>
7
+ <div>
8
+ <div class="select" :class="{ border: showBorder, classCss }">
9
+ <multiselect @open="onOpen" @select="onSelected" @search-change="onSearch" :options="data"
10
+ v-model.trim="currentValue" :custom-label="label" :disabled="disabled" placeholder :showLabels="true"
11
+ :noResult="false" ref="multiselect" selectLabel deselectLabel selectedLabel>
12
+ <div slot="beforeList" class="after-list">
13
+ <Button v-if="showBtnClean" key="cleanSelect" title="Limpar" type="warning" classIcon="fas fa-broom"
14
+ size="small" :clicked="cleanSelectStatic" />
15
+ </div>
16
+ </multiselect>
17
+ </div>
18
+ </div>
19
+ </div>
20
+ </template>
21
+ <script>
22
+ import Multiselect from "vue-multiselect";
23
+ import Button from "./Button";
24
+
25
+ import { mapMutations, mapGetters } from "vuex";
26
+
27
+ export default {
28
+ name: "SelectStatic",
29
+ props: {
30
+ title: String,
31
+ formName: String,
32
+ classCss: String,
33
+ field: String,
34
+ initialFieldTarget: Object,
35
+ fieldTarget: String,
36
+ required: Boolean,
37
+ initialValue: Object,
38
+ disabled: {
39
+ type: Boolean,
40
+ default: false,
41
+ },
42
+ onlyQuery: {
43
+ type: Boolean,
44
+ default: false,
45
+ },
46
+ showBorder: {
47
+ type: Boolean,
48
+ default: true,
49
+ },
50
+ showBtnClean: {
51
+ type: Boolean,
52
+ default: false,
53
+ },
54
+ markFormDirty: {
55
+ type: Boolean,
56
+ default: false,
57
+ },
58
+ data: Array,
59
+ value: Object,
60
+ },
61
+ components: {
62
+ Multiselect,
63
+ Button,
64
+ },
65
+ data() {
66
+ return {
67
+ currentValue: this.initialValue,
68
+ notifications: [],
69
+ };
70
+ },
71
+ created() {
72
+ this.validate();
73
+ },
74
+ mounted() {
75
+ let el = this.$el.getElementsByClassName("multiselect")[0];
76
+ if (el) {
77
+ el.tabIndex = 0;
78
+ }
79
+
80
+ if (this.initialFieldTarget.id) {
81
+ let value = this.initialFieldTarget.id;
82
+ let obj = { tag: `${this.title}: ${value}`, fieldTarget: this.fieldTarget, value: value };
83
+ this.addFilter(obj);
84
+ }
85
+
86
+ },
87
+ computed: {
88
+ ...mapGetters("generic", ["event"]),
89
+ },
90
+ methods: {
91
+ ...mapMutations("generic", ["addFilter", "removeLoading"]),
92
+ ...mapMutations("validation", [
93
+ "addValidation",
94
+ "removeValidation",
95
+ "resetValidation",
96
+ "updateFormDirty",
97
+ ]),
98
+ onOpen() { },
99
+ onSelected(value) {
100
+ this.$emit("input", value);
101
+ let obj = { fieldTarget: this.fieldTarget, value: value.id };
102
+ if (!this.onlyQuery) this.addFilter(obj);
103
+ if (this.fieldTarget && this.fieldTarget != "totalPerPage") {
104
+ let obj = { tag: `${this.title}: ${value.content}`, fieldTarget: this.fieldTarget, value: value.id };
105
+ this.addFilter(obj);
106
+ }
107
+
108
+ if (this.markFormDirty) this.updateFormDirty(true);
109
+ },
110
+ onSearch(value) { },
111
+ label(value) {
112
+ return `${value.content}`;
113
+ },
114
+ cleanSelectStatic() {
115
+ let obj = { content: "", id: "" };
116
+ this.currentValue = obj;
117
+ this.$emit("input", obj);
118
+ this.$refs.multiselect.deactivate();
119
+ this.removeLoading(["cleanSelectStatic"]);
120
+
121
+ if (this.fieldTarget) {
122
+ let obj = { fieldTarget: this.fieldTarget, value: "" };
123
+ this.addFilter(obj);
124
+ }
125
+ },
126
+
127
+ validate() {
128
+ this.notifications = [];
129
+ if (this.required && !this.value.id) {
130
+ var message = `${this.title} não pode ser vazio!`;
131
+ this.notifications.push(message);
132
+ }
133
+ },
134
+ },
135
+ watch: {
136
+ event: {
137
+ handler(event) {
138
+ if (event.name == "tagRemoved") {
139
+ if (this.fieldTarget == event.data) this.cleanSelectStatic();
140
+ }
141
+
142
+ },
143
+ deep: true,
144
+ },
145
+ "value.id": function () {
146
+ this.validate();
147
+ this.formDirty = true;
148
+ if (this.markFormDirty) this.updateFormDirty(true);
149
+ this.currentValue = { id: this.value.id, content: this.value.content };
150
+ },
151
+ notifications() {
152
+ let self = this;
153
+ this.notifications.forEach(function (notification) {
154
+ let obj = {
155
+ key: self.field + "&" + self.formName,
156
+ formName: self.formName,
157
+ notification: notification,
158
+ };
159
+ self.addValidation(obj);
160
+ });
161
+
162
+ if (this.notifications.length == 0) {
163
+ let obj = {
164
+ key: self.field + "&" + self.formName,
165
+ formName: self.formName,
166
+ };
167
+ self.removeValidation(obj);
168
+ }
169
+ },
170
+ "initialValue.id": function () {
171
+ this.currentValue = { id: this.value.id, content: this.value.content };
172
+ },
173
+ },
174
+ };
175
+ </script>
176
+
177
+ <style scoped>
178
+ .title {
179
+ font-size: 14px !important;
180
+ font-weight: 400 !important;
181
+ color: #0a0a0a;
182
+ letter-spacing: 0.5px !important;
183
+ }
184
+
185
+ div.after-list {
186
+ padding: 8px;
187
+ }
188
+
189
+ .select {
190
+ height: 38px;
191
+ border-radius: 5px !important;
192
+ margin-bottom: 20px;
193
+ }
194
+
195
+ .border {
196
+ border: 1px solid #dbdee0 !important;
197
+ }
198
+ </style>
@@ -0,0 +1,100 @@
1
+ <template>
2
+ <div>
3
+ <b-sidebar id="my-sidebar" :title="title" width="90%" bg-variant="white" no-header right backdrop-variant="dark"
4
+ @hidden="hideSideBar" backdrop shadow>
5
+ <div class="margin-side-bar">
6
+ <div>
7
+ <Messages />
8
+ <b-row>
9
+ <b-col sm="6">
10
+ <div class="title-side-bar">{{ title }}</div>
11
+ </b-col>
12
+ <b-col sm="6">
13
+ <div class="text-right" @click="hideSideBar">
14
+ <i class="fa-solid fa-circle-xmark icon-side-bar"></i>
15
+ </div>
16
+ </b-col>
17
+ </b-row>
18
+ </div>
19
+ <br />
20
+ <slot></slot>
21
+ </div>
22
+ </b-sidebar>
23
+ </div>
24
+ </template>
25
+
26
+ <script>
27
+ import Messages from "@nixweb/nixloc-ui/src/component/shared/Messages";
28
+ import { mapState, mapMutations } from "vuex";
29
+
30
+ export default {
31
+ name: "SideBar",
32
+ components: {
33
+ Messages,
34
+ },
35
+ props: {
36
+ title: String,
37
+ },
38
+ computed: {
39
+ ...mapState("generic", ["sideBar"]),
40
+ },
41
+ methods: {
42
+ ...mapMutations("generic", ["hideSideBar"]),
43
+ hide() {
44
+ this.$root.$emit("bv::toggle::collapse", "my-sidebar");
45
+ this.hideSideBar();
46
+ },
47
+ },
48
+ watch: {
49
+ sideBar: {
50
+ handler(sideBar) {
51
+ this.$root.$emit("bv::toggle::collapse", "my-sidebar");
52
+ },
53
+ deep: true,
54
+ },
55
+ },
56
+ };
57
+ </script>
58
+ <style>
59
+ .b-sidebar {
60
+ border-radius: 15px 15px 0px 0px !important;
61
+ margin-top: 20px !important;
62
+ margin-right: 5% !important;
63
+ padding-top: 20px !important;
64
+ }
65
+
66
+ .b-sidebar>.b-sidebar-body {
67
+ overflow-y: scroll !important;
68
+ }
69
+
70
+ .b-sidebar>.b-sidebar-body::-webkit-scrollbar-track {
71
+ background-color: white;
72
+ border-radius: 20px;
73
+ }
74
+
75
+ .b-sidebar>.b-sidebar-body::-webkit-scrollbar {
76
+ width: 6px;
77
+ background-color: #b9babb;
78
+ border-radius: 20px;
79
+ }
80
+
81
+ .b-sidebar>.b-sidebar-body::-webkit-scrollbar-thumb {
82
+ background-color: #b9babb;
83
+ border-radius: 20px;
84
+ }
85
+
86
+ .title-side-bar {
87
+ font-size: 20px;
88
+ }
89
+
90
+ .icon-side-bar {
91
+ font-size: 30px;
92
+ cursor: pointer;
93
+ }
94
+
95
+ .margin-side-bar {
96
+ margin-top: 20px;
97
+ margin-left: 30px;
98
+ margin-right: 20px;
99
+ }
100
+ </style>
@@ -0,0 +1,18 @@
1
+ <template>
2
+ <div>
3
+ <vue-slider :data="[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]"></vue-slider>
4
+ </div>
5
+ </template>
6
+ <script>
7
+ import VueSlider from "vue-slider-component";
8
+
9
+ export default {
10
+ name: "Slider",
11
+ components: {
12
+ VueSlider,
13
+ },
14
+ data() {
15
+ return {};
16
+ },
17
+ };
18
+ </script>