@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,128 @@
1
+ <template>
2
+ <div class="toggle-container">
3
+ <label class="switch">
4
+ <input type="checkbox" v-model="isDarkMode" @change="toggleTheme">
5
+ <span class="slider round">
6
+ <div class="icon-theme-light" v-if="themeLabel == 'Dark'">
7
+ <i class="fa-solid fa-sun"></i>
8
+ </div>
9
+ <div class="icon-theme-dark" v-if="themeLabel == 'Light'">
10
+ <i class="fa-solid fa-moon"></i>
11
+ </div>
12
+ </span>
13
+ </label>
14
+ </div>
15
+ </template>
16
+
17
+ <script>
18
+ export default {
19
+ data() {
20
+ return {
21
+ isDarkMode: false,
22
+ };
23
+ },
24
+ computed: {
25
+ themeLabel() {
26
+ return this.isDarkMode ? 'Dark' : 'Light';
27
+ }
28
+ },
29
+ methods: {
30
+ toggleTheme() {
31
+ if (this.isDarkMode) {
32
+ document.body.classList.add('dark-theme');
33
+ document.body.classList.remove('light-theme');
34
+ } else {
35
+ document.body.classList.add('light-theme');
36
+ document.body.classList.remove('dark-theme');
37
+ }
38
+ },
39
+ },
40
+ mounted() {
41
+ if (localStorage.getItem('theme') === 'dark') {
42
+ this.isDarkMode = true;
43
+ document.body.classList.add('dark-theme');
44
+ document.body.classList.remove('light-theme');
45
+ } else {
46
+ this.isDarkMode = false;
47
+ document.body.classList.add('light-theme');
48
+ document.body.classList.remove('dark-theme');
49
+ }
50
+ },
51
+ watch: {
52
+ isDarkMode(newVal) {
53
+ localStorage.setItem('theme', newVal ? 'dark' : 'light');
54
+ }
55
+ }
56
+ };
57
+ </script>
58
+
59
+ <style scoped>
60
+ .icon-theme-dark {
61
+ margin-left: 26px;
62
+ margin-top: -2px;
63
+ }
64
+
65
+ .icon-theme-light {
66
+ margin-left: 6px;
67
+ margin-top: -3px;
68
+ color: white;
69
+ }
70
+
71
+
72
+ .toggle-container {
73
+ display: flex;
74
+ align-items: center;
75
+ gap: 10px;
76
+ }
77
+
78
+ .switch {
79
+ position: relative;
80
+ display: inline-block;
81
+ width: 45px;
82
+ height: 22px;
83
+ }
84
+
85
+ .switch input {
86
+ opacity: 0;
87
+ width: 0;
88
+ height: 0;
89
+ }
90
+
91
+ .slider {
92
+ position: absolute;
93
+ cursor: pointer;
94
+ top: 0;
95
+ left: 0;
96
+ right: 0;
97
+ bottom: 0;
98
+ background-color: #ccc;
99
+ transition: 0.4s;
100
+ border-radius: 34px;
101
+ }
102
+
103
+ .slider:before {
104
+ position: absolute;
105
+ content: "";
106
+ height: 14px;
107
+ width: 14px;
108
+ border-radius: 50%;
109
+ left: 4px;
110
+ bottom: 4px;
111
+ background-color: white;
112
+ transition: 0.4s;
113
+ }
114
+
115
+ input:checked+.slider {
116
+ background-color: #ccc;
117
+ }
118
+
119
+ input:checked+.slider:before {
120
+ transform: translateX(20px);
121
+ }
122
+
123
+ .theme-indicator {
124
+ font-size: 12px;
125
+ font-weight: bold;
126
+ color: #333;
127
+ }
128
+ </style>
@@ -0,0 +1,86 @@
1
+ <template>
2
+ <div>
3
+ <hr class="hr-report" />
4
+ <div class="text-right">
5
+ <b-row>
6
+ <b-col sm="10">
7
+ <span class="title-report-header"> Total de Registros .................. </span>
8
+ </b-col>
9
+ <b-col sm="2">
10
+ <span class="title-report-header value-report-header"> {{ totalRecords }} </span>
11
+ </b-col>
12
+ </b-row>
13
+ <!-- Utilizado para calculo do subReport -->
14
+ <b-row v-if="totalizationCustom">
15
+ <b-col sm="10">
16
+ <span class="title-report-header"> {{ totalizationCustom[0].title }} .................. </span>
17
+ </b-col>
18
+ <b-col sm="2">
19
+ <span class="title-report-header value-report-header"> {{ totalizationCustom[0].value | currency }} </span>
20
+ </b-col>
21
+ </b-row>
22
+ </div>
23
+ <div class="text-right" v-for="item in totalization" :key="item.title">
24
+ <b-row>
25
+ <b-col sm="10">
26
+ <span v-if="convertName(item[0]).type == 'currency'">
27
+ <span class="title-report-header">
28
+ {{ convertName(item[0]).title }} ..................
29
+ </span>
30
+ </span>
31
+ </b-col>
32
+ <b-col sm="2">
33
+ <span v-if="convertName(item[0]).type == 'currency'">
34
+ {{ item[1] | currency }}
35
+ </span>
36
+ <span v-if="convertName(item[0]).type == 'numeric'">
37
+ {{ Math.round(item[1]) }}
38
+ </span>
39
+ </b-col>
40
+ </b-row>
41
+ </div>
42
+ </div>
43
+ </template>
44
+ <script>
45
+ import { mapState } from "vuex";
46
+
47
+ export default {
48
+ name: "TotalizationReport",
49
+ props: ["totalization", "totalizationCustom", "totalRecords"],
50
+ computed: {
51
+ ...mapState("report", ["finalQueryFormatOData"]),
52
+ },
53
+ methods: {
54
+ convertName(value) {
55
+ var filter = this.finalQueryFormatOData.totalization.filter((item) => {
56
+ return item.value == value;
57
+ });
58
+ return Object.assign(filter[0]);
59
+ },
60
+ },
61
+ };
62
+ </script>
63
+
64
+ <style scoped>
65
+ .title-report-header {
66
+ font-size: 15px;
67
+ font-weight: 400;
68
+ }
69
+
70
+ .value-report-header {
71
+ margin-left: 50px;
72
+ }
73
+
74
+ .hr-report {
75
+ background: black !important;
76
+ height: 0px !important;
77
+ }
78
+
79
+ .receipt {
80
+ color: darkblue;
81
+ }
82
+
83
+ .div-title {
84
+ margin-right: 0px;
85
+ }
86
+ </style>
@@ -0,0 +1,97 @@
1
+ <template>
2
+ <div>
3
+ <div
4
+ class="molded-button"
5
+ :class="{ fechado: !showFilter, aberto: showFilter }"
6
+ v-show="!showFilter"
7
+ >
8
+ <i class="fas fa-arrow-circle-left"></i>
9
+ </div>
10
+
11
+ <transition name="slide-fade">
12
+ <div
13
+ class="molded-button button-recolher"
14
+ v-show="showFilter"
15
+ @click="showFilter = false"
16
+ >
17
+ <i class="fas fa-arrow-circle-right"></i>
18
+ </div>
19
+ </transition>
20
+
21
+ <transition name="slide-fade"> </transition>
22
+ </div>
23
+ </template>
24
+
25
+ <script>
26
+ import { mapMutations } from "vuex";
27
+
28
+ export default {
29
+ components: {},
30
+ data() {
31
+ return {
32
+ showFilter: false,
33
+ };
34
+ },
35
+ };
36
+ </script>
37
+
38
+ <style scoped>
39
+ .molded {
40
+ background: white;
41
+ border-left: solid 1px #dbdee0;
42
+ font-size: 13px;
43
+ height: 100%;
44
+ width: 350px;
45
+ right: 0px;
46
+ padding: 10px;
47
+ position: fixed;
48
+ -webkit-box-shadow: 20px 20px 20px 20px rgba(124, 125, 129, 0.53);
49
+ box-shadow: 20px 20px 20px 20px rgba(124, 125, 129, 0.53);
50
+ z-index: 999;
51
+ }
52
+
53
+ .molded-button {
54
+ font-size: 18px;
55
+ background: #ffffff;
56
+ border: solid 1px #dbdfe9;
57
+ border-radius: 5px;
58
+ color: #577696;
59
+ height: 40px;
60
+ width: 80px;
61
+ line-height: 32px;
62
+ padding-top: 3px;
63
+ padding-right: 35px;
64
+ text-align: center;
65
+ position: fixed;
66
+ top: 160px;
67
+ cursor: pointer;
68
+ z-index: 999;
69
+ }
70
+
71
+ .button-recolher {
72
+ padding-left: 12px;
73
+ padding-right: 418px;
74
+ right: -38px;
75
+ }
76
+
77
+ .aberto {
78
+ right: 365px;
79
+ }
80
+
81
+ .fechado {
82
+ right: -38px;
83
+ color: #577696;
84
+ }
85
+
86
+ .slide-fade-enter-active {
87
+ transition: all 0.2s ease;
88
+ }
89
+ .slide-fade-leave-active {
90
+ transition: all 0.2s cubic-bezier(1, 0.5, 0.8, 1);
91
+ }
92
+ .slide-fade-enter,
93
+ .slide-fade-leave-to {
94
+ transform: translateX(200px);
95
+ opacity: 0;
96
+ }
97
+ </style>
@@ -0,0 +1,44 @@
1
+ <template>
2
+ <div>
3
+ <div v-for="activity in listActivity(ruleId)">
4
+ <div class="div-molded">
5
+ <SendEmail :activity="activity" v-if="activity.name == 'mail'" v-model="activity.recipient" />
6
+ </div>
7
+ </div>
8
+ </div>
9
+ </template>
10
+ <script>
11
+
12
+ import SendEmail from '@nixweb/nixloc-ui/src/component/shared/automation/components/SendEmail.vue';
13
+
14
+
15
+ import { mapGetters } from 'vuex';
16
+
17
+
18
+ export default {
19
+ name: "ActivitiesList",
20
+ components: {
21
+ SendEmail
22
+ },
23
+ props: {
24
+ ruleId: String
25
+ },
26
+ computed: {
27
+ ...mapGetters("automation", ["listActivity"]),
28
+
29
+ }
30
+ }
31
+
32
+ </script>
33
+ <style scoped>
34
+ .div-molded {
35
+ padding: 10px;
36
+ margin-top: 10px;
37
+ margin-left: 50px;
38
+ margin-right: 50px;
39
+ min-height: 110px;
40
+ border-radius: 10px;
41
+ background-color: #FAFAFC;
42
+ border: 1px solid #E8EAED;
43
+ }
44
+ </style>
@@ -0,0 +1,61 @@
1
+ <template>
2
+ <div>
3
+ <b-row>
4
+ <b-col xs="12" sm="12" md="12" lg="5" xl="5">
5
+ <SelectRule :options="rules" v-model="selectedRule" />
6
+ </b-col>
7
+ <b-col sm="3">
8
+ <div class="div-btn">
9
+ <i class="fa-solid fa-circle-plus" @click="add"></i>
10
+ </div>
11
+ </b-col>
12
+ </b-row>
13
+ <DynamicComponentList />
14
+ </div>
15
+ </template>
16
+
17
+ <script>
18
+ import SelectRule from "./SelectRule.vue";
19
+ import DynamicComponentList from "./DynamicComponentList.vue";
20
+
21
+ import { mapMutations } from "vuex";
22
+
23
+ export default {
24
+ name: "AddRule",
25
+ components: {
26
+ SelectRule,
27
+ DynamicComponentList
28
+ },
29
+ props: {
30
+ rules: Array
31
+ },
32
+ data() {
33
+ return {
34
+ selectedRule: this.options[0],
35
+ };
36
+ },
37
+ methods: {
38
+ ...mapMutations("generic", ["addNotifications"]),
39
+ ...mapMutations("automation", ["addSelectedRules"]),
40
+ add() {
41
+ this.selectedRule.id = this.generateId();
42
+ var selectedRule = JSON.parse(JSON.stringify(this.selectedRule));
43
+ this.addSelectedRules(selectedRule);
44
+ },
45
+ generateId() {
46
+ return Math.random()
47
+ .toString(36)
48
+ .replace(/[^a-z]+/g, "")
49
+ .substr(0, 5);
50
+ },
51
+ }
52
+ };
53
+ </script>
54
+ <style scoped>
55
+ .div-btn {
56
+ margin-top: -3px;
57
+ font-size: 25px;
58
+ color: #577696;
59
+ cursor: pointer;
60
+ }
61
+ </style>
@@ -0,0 +1,27 @@
1
+ <template>
2
+ <div>
3
+ <AddRule :rules="rules" />
4
+ </div>
5
+ </template>
6
+
7
+ <script>
8
+ import AddRule from "./AddRule.vue";
9
+
10
+ import { mapState } from "vuex";
11
+
12
+ export default {
13
+ name: "AutomationBuilder",
14
+ components: {
15
+ AddRule,
16
+ },
17
+ props: {
18
+ rules: Array
19
+ },
20
+ data() {
21
+ return {
22
+
23
+ };
24
+ },
25
+ };
26
+ </script>
27
+
@@ -0,0 +1,86 @@
1
+ <template>
2
+ <div class="div-main">
3
+ <div v-for="(rule, index) in rules">
4
+ <div class="div-component">
5
+ <b-row>
6
+ <b-col sm="12">
7
+ <Molded>
8
+ <b-row>
9
+ <b-col sm="11">
10
+ <BillingByRent v-if="rule.name == 'billingByRent'" :rule="rule" />
11
+ </b-col>
12
+ <b-col sm="1">
13
+ <div class="icon-trash text-right" @click="remove(rule.id)">
14
+ <i class="fa-solid fa-trash"></i>
15
+ </div>
16
+ </b-col>
17
+ </b-row>
18
+ <div>
19
+ <ActivitiesList :ruleId="rule.id" />
20
+ </div>
21
+ </Molded>
22
+ <div v-if="index != (rules.length - 1) && rules.length > 1" class="div-icon text-center">
23
+ <i class="fa-solid fa-arrow-down-from-line"></i>
24
+ </div>
25
+ </b-col>
26
+ </b-row>
27
+ </div>
28
+ </div>
29
+ </div>
30
+ </template>
31
+
32
+ <script>
33
+
34
+ import Molded from "@nixweb/nixloc-ui/src/component/layout/Molded";
35
+ import SelectStatic from "@nixweb/nixloc-ui/src/component/forms/SelectStatic";
36
+ import BillingByRent from "./components/BillingByRent";
37
+ import ActivitiesList from "./ActivitiesList";
38
+
39
+ import { mapMutations, mapState } from "vuex";
40
+
41
+ export default {
42
+ name: "DynamicComponentList",
43
+ components: {
44
+ Molded, SelectStatic, BillingByRent, ActivitiesList
45
+ },
46
+ props: {
47
+ DynamicComponentList: Array
48
+ },
49
+ data() {
50
+ return {
51
+
52
+ };
53
+ },
54
+ computed: {
55
+ ...mapState("automation", ["rules"]),
56
+ },
57
+ methods: {
58
+ ...mapMutations("automation", ["removeRule"]),
59
+ remove(id) {
60
+ this.removeRule(id);
61
+ }
62
+ }
63
+ };
64
+ </script>
65
+ <style scoped>
66
+ .div-main {
67
+ margin-left: 100px;
68
+ margin-right: 100px;
69
+ margin-top: 40px;
70
+ }
71
+
72
+ .div-component {
73
+ margin-top: 20px
74
+ }
75
+
76
+ .div-icon {
77
+ font-size: 20px;
78
+ margin-top: 15px;
79
+ color: #347ADB;
80
+ }
81
+
82
+ .icon-trash {
83
+ color: red;
84
+ cursor: pointer;
85
+ }
86
+ </style>
@@ -0,0 +1,98 @@
1
+ <template>
2
+ <div class="selected-filter" @blur="open = false">
3
+ <div class="selected" :class="{ open: open }" @click="open = !open">
4
+ {{ selected }}
5
+ </div>
6
+ <div class="items" :class="{ hide: !open }">
7
+ <div v-for="(options, i) of options" :key="i">
8
+ <div @click="select(options)">
9
+ <span :class="options.classCss">
10
+ <i :class="options.icon"></i>
11
+ <span> {{ options.title }}</span>
12
+ </span>
13
+ </div>
14
+ </div>
15
+ </div>
16
+ </div>
17
+ </template>
18
+
19
+ <script>
20
+ export default {
21
+ props: ["options", "value"],
22
+ data() {
23
+ return {
24
+ selected: "Selecione uma opção",
25
+ open: false,
26
+ };
27
+ },
28
+ mounted() {
29
+ this.$emit("input", this.selected);
30
+ },
31
+ methods: {
32
+ select(options) {
33
+ this.$emit("input", options);
34
+ this.selected = options.title;
35
+ this.open = false;
36
+ },
37
+ },
38
+ };
39
+ </script>
40
+
41
+ <style scoped>
42
+ .selected-filter {
43
+ position: relative;
44
+ width: 100%;
45
+ text-align: left;
46
+ outline: none;
47
+ height: 40px;
48
+ line-height: 40px;
49
+ z-index: 2;
50
+ }
51
+
52
+ .selected-filter .selected {
53
+ background-color: white;
54
+ border: 1px solid #DBDEE0;
55
+ border-radius: 6px;
56
+ color: #495057;
57
+ padding-left: 1em;
58
+ cursor: pointer;
59
+ user-select: none;
60
+ }
61
+
62
+ .selected-filter .selected:after {
63
+ position: absolute;
64
+ content: "";
65
+ top: 19px;
66
+ right: 1em;
67
+ width: 0;
68
+ height: 0;
69
+ border: 5px solid transparent;
70
+ border-color: black transparent transparent transparent;
71
+ }
72
+
73
+ .selected-filter .items {
74
+ color: black;
75
+ border-radius: 0px 0px 6px 6px;
76
+ overflow: hidden;
77
+ position: absolute;
78
+ background-color: #fafafc;
79
+ left: 0;
80
+ right: 0;
81
+ z-index: 1;
82
+ height: 120px;
83
+ overflow-y: visible;
84
+ overflow-x: hidden;
85
+ }
86
+
87
+ .selected-filter .items div {
88
+ color: black;
89
+ padding-left: 1em;
90
+ cursor: pointer;
91
+ user-select: none;
92
+ }
93
+
94
+ .hide {
95
+ display: none;
96
+ }
97
+ </style>
98
+