@nixweb/nixloc-ui 1.19.0 → 1.21.0
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.
- package/package.json +1 -1
- package/src/component/forms/ButtonFilter.vue +104 -104
- package/src/component/forms/ButtonGroup.vue +66 -66
- package/src/component/forms/ButtonGroupInline.vue +210 -210
- package/src/component/forms/ButtonSub.vue +97 -97
- package/src/component/forms/ButtonToggle.vue +76 -76
- package/src/component/forms/DateYearMonth.vue +192 -192
- package/src/component/forms/ImageUpload.vue +214 -214
- package/src/component/forms/IncrementDecrement.vue +151 -151
- package/src/component/forms/InputAddressGoogle.vue +171 -171
- package/src/component/forms/InputCallToAction.vue +135 -135
- package/src/component/forms/InputDecimalDiscount.vue +146 -146
- package/src/component/forms/InputTag.vue +124 -124
- package/src/component/forms/InputTextEdit.vue +69 -69
- package/src/component/forms/InputWhatsApp.vue +47 -47
- package/src/component/forms/SideBar.vue +99 -99
- package/src/component/forms/Toggle.vue +72 -72
- package/src/component/layout/Account.vue +131 -131
- package/src/component/layout/AnimatedPhrase.vue +68 -68
- package/src/component/layout/BarFloating.vue +67 -67
- package/src/component/layout/BottomActionsBar.vue +205 -205
- package/src/component/layout/ColorPicker.vue +175 -175
- package/src/component/layout/Gantt.vue +128 -128
- package/src/component/layout/HideShow.vue +61 -61
- package/src/component/layout/IconMolded.vue +58 -58
- package/src/component/layout/IconPicker.vue +161 -161
- package/src/component/layout/NewAccount.vue +136 -136
- package/src/component/layout/NewHeader.vue +59 -59
- package/src/component/layout/NewIconMolded.vue +70 -70
- package/src/component/layout/NewMenu.vue +472 -472
- package/src/component/layout/Tab.vue +259 -259
- package/src/component/layout/Tag.vue +97 -97
- package/src/component/layout/Tooltip.vue +155 -155
- package/src/component/layout/Zoom.vue +111 -111
- package/src/component/rental/DisplayCalculatePeriod.vue +48 -48
- package/src/component/rental/DisplayPeriodRent.vue +55 -55
- package/src/component/rental/DisplayTotalization.vue +86 -86
- package/src/component/report/Fields.vue +108 -108
- package/src/component/report/Report.vue +377 -377
- package/src/component/report/ReportTable.vue +111 -111
- package/src/component/report/Totalization.vue +33 -33
- package/src/component/shared/CodeEditor.vue +128 -128
- package/src/component/shared/Confirmation.vue +74 -74
- package/src/component/shared/DocumentEditor.vue +99 -99
- package/src/component/shared/DocumentPreview.vue +117 -105
- package/src/component/shared/DocumentPublic.vue +33 -33
- package/src/component/shared/ExportExcel.vue +56 -56
- package/src/component/shared/FullCalendar.vue +175 -175
- package/src/component/shared/HeaderReport.vue +47 -47
- package/src/component/shared/ListNotifications.vue +70 -70
- package/src/component/shared/Loading.vue +1 -4
- package/src/component/shared/LoadingCard.vue +64 -64
- package/src/component/shared/ParameterLegend.vue +169 -169
- package/src/component/shared/Report.vue +250 -250
- package/src/component/shared/SaveCancel.vue +99 -117
- package/src/component/shared/SelectOption.vue +162 -162
- package/src/component/shared/TableDraggable.vue +117 -117
- package/src/component/shared/TableImport.vue +93 -93
- package/src/component/shared/TableItem.vue +228 -228
- package/src/component/shared/TableTotalPerPage.vue +114 -114
- package/src/component/shared/TableTotalRecords.vue +44 -44
- package/src/component/shared/TimeLine.vue +41 -41
- package/src/component/shared/Timer.vue +77 -77
- package/src/component/shared/ToggleTheme.vue +127 -127
- package/src/component/shared/TotalizationReport.vue +86 -86
- package/src/component/shared/actions/ActionButtons.vue +53 -53
- package/src/component/shared/actions/ActionErrorContent.vue +103 -103
- package/src/component/shared/actions/ActionFooter.vue +93 -99
- package/src/component/shared/actions/ActionHeader.vue +110 -110
- package/src/component/shared/actions/ActionItemList.vue +143 -143
- package/src/component/shared/actions/ActionsOptions.vue +209 -209
- package/src/component/shared/actions/ActionsSelected.vue +262 -262
- package/src/component/shared/automation/ActivitiesList.vue +43 -43
- package/src/component/shared/automation/AddRule.vue +60 -60
- package/src/component/shared/automation/AutomationBuilder.vue +26 -26
- package/src/component/shared/automation/DynamicComponentList.vue +85 -85
- package/src/component/shared/automation/SelectRule.vue +97 -97
- package/src/component/shared/automation/components/BillingByRent.vue +97 -97
- package/src/component/shared/automation/components/SendEmail.vue +93 -93
- package/src/component/shared/file-manager/FileManager.vue +390 -390
- package/src/component/shared/filter-builder/FilterBuilder.vue +220 -220
- package/src/component/shared/filter-builder/FilterQuery.vue +95 -95
- package/src/component/shared/query-builder/ConvertToOdata.js +86 -86
- package/src/component/shared/query-builder/DynamicComponent.vue +161 -161
- package/src/component/shared/query-builder/Fields.vue +93 -93
- package/src/component/shared/query-builder/Rules.vue +68 -68
- package/src/component/shared/query-builder/SelectRule.vue +97 -97
- package/src/component/shared/query-builder/Tags.vue +59 -59
- package/src/component/signature/Payment.vue +160 -160
- package/src/component/signature/Warning.vue +75 -75
- package/src/component/template/ReportCreateUpdate.vue +110 -110
- package/src/component/template/ViewTemplateDocumentView.vue +213 -213
- package/src/component/template/ViewTemplateImportFile.vue +347 -347
- package/src/component/template/ViewTemplateReportList.vue +240 -240
- package/src/component/template/ViewTemplateReportPreview.vue +521 -521
- package/src/component/template/ViewTemplateSelectOption.vue +46 -46
- package/src/component/template/model/Report.js +5 -5
- package/src/component/training/Course.vue +343 -343
- package/src/component/training/CourseView.vue +198 -198
- package/src/component/value-objects/Address.js +10 -10
- package/src/component/value-objects/Address.vue +173 -173
- package/src/component/value-objects/Contact.js +6 -6
- package/src/component/value-objects/Contact.vue +106 -106
- package/src/component/value-objects/Person.js +10 -10
- package/src/component/value-objects/Person.vue +130 -130
- package/src/store/modules/automation.js +30 -30
- package/src/store/modules/generic.js +16 -6
- package/src/store/modules/report.js +277 -277
- package/src/store/modules/user.js +69 -69
- package/src/store/modules/util.js +25 -25
|
@@ -1,61 +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
|
-
}
|
|
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
61
|
</style>
|
|
@@ -1,27 +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>
|
|
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
27
|
|
|
@@ -1,86 +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
|
-
}
|
|
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
86
|
</style>
|
|
@@ -1,98 +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>
|
|
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
98
|
|