edvoyui-component-library-test-flight 0.0.168 → 0.0.170
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 +10 -3
- package/src/App.vue +0 -16
- package/src/assets/svg/CheckTick.vue +0 -21
- package/src/assets/svg/ChevronBigDown.vue +0 -22
- package/src/assets/svg/ChevronDownSolid.vue +0 -19
- package/src/assets/svg/ChevronDownStroke.vue +0 -22
- package/src/assets/svg/ChevronDownStrokeSolid.vue +0 -19
- package/src/assets/svg/SearchBigZoomIn.vue +0 -21
- package/src/assets/svg/SortArrow.vue +0 -24
- package/src/assets/svg/Student.vue +0 -30
- package/src/assets/svg/partner.vue +0 -33
- package/src/assets/svg/people.vue +0 -25
- package/src/components/HelloWorld.vue +0 -1974
- package/src/components/accordion/EUIAccordion.vue +0 -152
- package/src/components/alerts/EUIAlerts.vue +0 -194
- package/src/components/avatar/EUIAvatar.vue +0 -96
- package/src/components/breadcrumb/EUIBreadcrumb.vue +0 -59
- package/src/components/button/EUIButton.vue +0 -154
- package/src/components/button/EUIButtonGroup.vue +0 -287
- package/src/components/button/buttonAnimateTab.vue +0 -74
- package/src/components/checkbox/EUICheckbox.vue +0 -110
- package/src/components/datepicker/EUIDatepicker.vue +0 -295
- package/src/components/delete.vue +0 -262
- package/src/components/dragModal/EUIDrag.vue +0 -179
- package/src/components/dropdown/EUIMultiDropdown.vue +0 -174
- package/src/components/errorMessage/EUIErrorMessage.vue +0 -25
- package/src/components/input/EUIInput.vue +0 -223
- package/src/components/input/EUINumberInput.vue +0 -250
- package/src/components/loader/EUICircleLoader.vue +0 -31
- package/src/components/loader/EUICubeLoader.vue +0 -237
- package/src/components/loader/EUILoader.vue +0 -17
- package/src/components/loader/EUISquareLoader.vue +0 -47
- package/src/components/modal/EUIModal.vue +0 -224
- package/src/components/pillSelect/EUIPillSelect.vue +0 -149
- package/src/components/popover/EUIPopover.vue +0 -297
- package/src/components/radio/EUIRadio.vue +0 -75
- package/src/components/searchInput/EUISearch.vue +0 -223
- package/src/components/searchTagSelect/EUISearchTagSelect.vue +0 -642
- package/src/components/searchTagSelect/SearchInput.vue +0 -167
- package/src/components/searchexpand/EUISearchExpand.vue +0 -148
- package/src/components/searchexpand/EUISearchToggle.vue +0 -86
- package/src/components/select/EUISelect.vue +0 -1092
- package/src/components/selectSearch/EUISelectSearch.vue +0 -23
- package/src/components/slideover/EUISlideover.vue +0 -207
- package/src/components/stepperTimeline/EUIStepperHorizontal.vue +0 -242
- package/src/components/stepperTimeline/EUIStepperTimeline.vue +0 -16
- package/src/components/stepperTimeline/EUIStepperVertical.vue +0 -112
- package/src/components/table/ColumnResizeTable.vue +0 -740
- package/src/components/table/EUIDashboardTable.vue +0 -514
- package/src/components/table/EUIPageLimit.vue +0 -66
- package/src/components/table/EUIPagination.vue +0 -175
- package/src/components/table/EUIStudentPagination.vue +0 -172
- package/src/components/table/EUITable.vue +0 -559
- package/src/components/table/EUITableCheckbox.vue +0 -98
- package/src/components/table/GrowthTable.vue +0 -575
- package/src/components/table/GrowthTableView.vue +0 -108
- package/src/components/table/ResizeTableview.vue +0 -198
- package/src/components/table/UCheckbox.vue +0 -169
- package/src/components/table/UTable.vue +0 -611
- package/src/components/table/UTableview.vue +0 -189
- package/src/components/tabs/EUITabOutline.vue +0 -263
- package/src/components/tabs/EUITabs.vue +0 -226
- package/src/components/tag/EUITag.vue +0 -88
- package/src/components/telephone/EUITelephone.vue +0 -299
- package/src/components/textArea/EUITextArea.vue +0 -155
- package/src/components/timeLine/EUITimeLine.vue +0 -148
- package/src/components/toggle/EUIToggle.vue +0 -101
- package/src/components/tooltip/EUITooltip.vue +0 -111
- package/src/components/uidemo/select-com.vue +0 -120
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<label for="label" class="mb-4 text-xs font-medium text-gray-400">{{selected?.length < 3}} - {{ selected?.length < 3 }}</label>
|
|
4
|
-
<v-select
|
|
5
|
-
v-model="selected"
|
|
6
|
-
multiple
|
|
7
|
-
placeholder="Choose up to 3 books!"
|
|
8
|
-
label="title"
|
|
9
|
-
:options="dataBooks"
|
|
10
|
-
:selectable="() => selected?.length < 3"
|
|
11
|
-
/>
|
|
12
|
-
</div>
|
|
13
|
-
</template>
|
|
14
|
-
|
|
15
|
-
<script setup lang="ts">
|
|
16
|
-
import { computed, ref } from "vue";
|
|
17
|
-
import vSelect from "vue-select";
|
|
18
|
-
import "vue-select/dist/vue-select.css";
|
|
19
|
-
const selected = ref([]);
|
|
20
|
-
import books from "../../data/books";
|
|
21
|
-
|
|
22
|
-
const dataBooks = computed(() => books);
|
|
23
|
-
</script>
|
|
@@ -1,207 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<Teleport defer to="body">
|
|
3
|
-
<Transition :duration="550" appear name="slideover">
|
|
4
|
-
<div
|
|
5
|
-
v-if="isVisible"
|
|
6
|
-
:class="[
|
|
7
|
-
'fixed z-50 transition-all duration-100 ease-in',
|
|
8
|
-
slideClass.modal,
|
|
9
|
-
]"
|
|
10
|
-
@click.self="closeSlideover"
|
|
11
|
-
>
|
|
12
|
-
<div
|
|
13
|
-
class="backdrop fixed inset-0 z-[-1] w-screen h-screen bg-black/20 pointer-events-none overflow-hidden"
|
|
14
|
-
></div>
|
|
15
|
-
<div
|
|
16
|
-
:class="[
|
|
17
|
-
'relative flex flex-col justify-between w-full overflow-hidden bg-white divide-gray-200 divide-y shadow-lg h-full',
|
|
18
|
-
slideClass.width,
|
|
19
|
-
]"
|
|
20
|
-
>
|
|
21
|
-
<template v-if="$slots.header">
|
|
22
|
-
<slot name="header"></slot>
|
|
23
|
-
</template>
|
|
24
|
-
<div
|
|
25
|
-
v-else
|
|
26
|
-
class="sticky top-0 flex items-center justify-between flex-initial px-4 py-3"
|
|
27
|
-
>
|
|
28
|
-
<h3 :class="['text-lg font-semibold text-gray-900', titleClass]">
|
|
29
|
-
<slot name="title">{{ title || "Slideover Title" }}</slot>
|
|
30
|
-
</h3>
|
|
31
|
-
<div v-if="visibleClose">
|
|
32
|
-
<button
|
|
33
|
-
type="button"
|
|
34
|
-
class="flex items-center justify-center text-gray-400 bg-white hover:bg-gray-50 rounded-3xl hover:text-gray-600 size-8"
|
|
35
|
-
@click="closeSlideover"
|
|
36
|
-
>
|
|
37
|
-
<span class="sr-only">Close</span>
|
|
38
|
-
<svg
|
|
39
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
40
|
-
fill="none"
|
|
41
|
-
viewBox="0 0 24 24"
|
|
42
|
-
stroke-width="2"
|
|
43
|
-
stroke="currentColor"
|
|
44
|
-
aria-hidden="true"
|
|
45
|
-
class="w-5 h-5"
|
|
46
|
-
>
|
|
47
|
-
<path
|
|
48
|
-
stroke-linecap="round"
|
|
49
|
-
stroke-linejoin="round"
|
|
50
|
-
d="M6 18L18 6M6 6l12 12"
|
|
51
|
-
></path>
|
|
52
|
-
</svg>
|
|
53
|
-
</button>
|
|
54
|
-
</div>
|
|
55
|
-
</div>
|
|
56
|
-
|
|
57
|
-
<template v-if="$slots.content">
|
|
58
|
-
<slot name="content"></slot>
|
|
59
|
-
</template>
|
|
60
|
-
<div
|
|
61
|
-
v-else
|
|
62
|
-
class="flex-1 p-4 max-h-[calc(100svh-3rem)] overflow-y-auto"
|
|
63
|
-
>
|
|
64
|
-
<slot></slot>
|
|
65
|
-
</div>
|
|
66
|
-
|
|
67
|
-
<template v-if="$slots.footer">
|
|
68
|
-
<slot name="footer"></slot>
|
|
69
|
-
</template>
|
|
70
|
-
<div
|
|
71
|
-
v-else
|
|
72
|
-
class="sticky bottom-0 flex items-center justify-end flex-none gap-2 px-4 py-3"
|
|
73
|
-
>
|
|
74
|
-
<EUIButton size="md" color="white" @click="closeSlideover"
|
|
75
|
-
>Cancel</EUIButton
|
|
76
|
-
>
|
|
77
|
-
<EUIButton size="md" color="purple" @click="$emit('confirm')"
|
|
78
|
-
>Slideover</EUIButton
|
|
79
|
-
>
|
|
80
|
-
</div>
|
|
81
|
-
</div>
|
|
82
|
-
</div>
|
|
83
|
-
</Transition>
|
|
84
|
-
</Teleport>
|
|
85
|
-
</template>
|
|
86
|
-
|
|
87
|
-
<script lang="ts">
|
|
88
|
-
import { computed, defineComponent, PropType, watchEffect } from "vue";
|
|
89
|
-
import EUIButton from "../button/EUIButton.vue";
|
|
90
|
-
|
|
91
|
-
export default defineComponent({
|
|
92
|
-
name: "Slideover",
|
|
93
|
-
components: {
|
|
94
|
-
EUIButton,
|
|
95
|
-
},
|
|
96
|
-
props: {
|
|
97
|
-
isVisible: {
|
|
98
|
-
type: Boolean,
|
|
99
|
-
default: false,
|
|
100
|
-
},
|
|
101
|
-
title: {
|
|
102
|
-
type: String,
|
|
103
|
-
default: "",
|
|
104
|
-
},
|
|
105
|
-
visibleClose: {
|
|
106
|
-
type: Boolean,
|
|
107
|
-
default: true,
|
|
108
|
-
},
|
|
109
|
-
titleClass: {
|
|
110
|
-
type: String,
|
|
111
|
-
default: "",
|
|
112
|
-
},
|
|
113
|
-
slidePosition: {
|
|
114
|
-
type: String as PropType<"left" | "center" | "right">,
|
|
115
|
-
default: "right",
|
|
116
|
-
},
|
|
117
|
-
size: {
|
|
118
|
-
type: String as PropType<"xs" | "sm" | "md" | "lg" | "full">,
|
|
119
|
-
default: "xs",
|
|
120
|
-
},
|
|
121
|
-
},
|
|
122
|
-
emits: ["update:isVisible", "confirm"],
|
|
123
|
-
methods: {
|
|
124
|
-
closeSlideover() {
|
|
125
|
-
this.$emit("update:isVisible", false);
|
|
126
|
-
},
|
|
127
|
-
},
|
|
128
|
-
setup(props) {
|
|
129
|
-
const slideClass = computed(() => {
|
|
130
|
-
const sizeClass = {
|
|
131
|
-
full: "max-w-screen",
|
|
132
|
-
lg: "max-w-screen-lg min-w-[100svw] sm:min-w-[1024px]",
|
|
133
|
-
md: "max-w-2xl min-w-[100svw] sm:min-w-[42rem]",
|
|
134
|
-
sm: "max-w-xl min-w-[100svw] sm:min-w-[36rem]",
|
|
135
|
-
xs: "max-w-md min-w-[100svw] sm:min-w-[28rem]",
|
|
136
|
-
};
|
|
137
|
-
|
|
138
|
-
const positionClasses = {
|
|
139
|
-
left:
|
|
140
|
-
props.size === "full"
|
|
141
|
-
? "inset-2 rounded-xl overflow-hidden"
|
|
142
|
-
: "top-0 left-0 h-svh",
|
|
143
|
-
center:
|
|
144
|
-
props.size === "full"
|
|
145
|
-
? "inset-2 rounded-xl overflow-hidden"
|
|
146
|
-
: "inset-0 flex flex-col items-center justify-center",
|
|
147
|
-
right:
|
|
148
|
-
props.size === "full"
|
|
149
|
-
? "inset-2 rounded-xl overflow-hidden"
|
|
150
|
-
: "top-0 right-0 h-svh",
|
|
151
|
-
};
|
|
152
|
-
|
|
153
|
-
const addClass = positionClasses[props.slidePosition];
|
|
154
|
-
const slideWidth = sizeClass[props.size];
|
|
155
|
-
return {
|
|
156
|
-
modal: addClass,
|
|
157
|
-
width: slideWidth,
|
|
158
|
-
};
|
|
159
|
-
});
|
|
160
|
-
|
|
161
|
-
watchEffect(() => {
|
|
162
|
-
if (props.isVisible) {
|
|
163
|
-
document.body.style.overflow = "hidden";
|
|
164
|
-
} else {
|
|
165
|
-
document.body.style.overflow = "";
|
|
166
|
-
}
|
|
167
|
-
});
|
|
168
|
-
return {
|
|
169
|
-
slideClass,
|
|
170
|
-
};
|
|
171
|
-
},
|
|
172
|
-
beforeUnmount() {
|
|
173
|
-
document.body.style.overflow = "";
|
|
174
|
-
},
|
|
175
|
-
});
|
|
176
|
-
</script>
|
|
177
|
-
|
|
178
|
-
<style lang="scss" scoped>
|
|
179
|
-
.slideover-enter-active,
|
|
180
|
-
.slideover-leave-active {
|
|
181
|
-
transition: transform 0.5s ease, opacity 0.5s ease;
|
|
182
|
-
}
|
|
183
|
-
.slideover-enter-from,
|
|
184
|
-
.slideover-leave-to {
|
|
185
|
-
transform: translateX(100%);
|
|
186
|
-
opacity: 0;
|
|
187
|
-
}
|
|
188
|
-
.slideover-enter-to,
|
|
189
|
-
.slideover-leave-from {
|
|
190
|
-
transform: translateX(0);
|
|
191
|
-
opacity: 1;
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
.backdrop {
|
|
195
|
-
transition: opacity 0.8s ease;
|
|
196
|
-
}
|
|
197
|
-
.slideover-enter-from .backdrop,
|
|
198
|
-
.slideover-leave-to .backdrop {
|
|
199
|
-
transform: translateX(100%);
|
|
200
|
-
opacity: 0;
|
|
201
|
-
}
|
|
202
|
-
.slideover-enter-to .backdrop,
|
|
203
|
-
.slideover-leave-from .backdrop {
|
|
204
|
-
transform: translateX(0);
|
|
205
|
-
opacity: 0.3;
|
|
206
|
-
}
|
|
207
|
-
</style>
|
|
@@ -1,242 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<nav aria-label="Progress" class="relative z-50 h-16 max-w-full mx-auto">
|
|
4
|
-
<ol
|
|
5
|
-
role="list"
|
|
6
|
-
class="flex flex-row items-start justify-center w-full py-2 ps-2 pe-2"
|
|
7
|
-
>
|
|
8
|
-
<li
|
|
9
|
-
v-for="(step, stepIdx) in lifeCycleEntries"
|
|
10
|
-
:key="step.value"
|
|
11
|
-
:class="[
|
|
12
|
-
stepIdx !== lifeCycleEntries.length - 1 ? 'pe-6' : '',
|
|
13
|
-
'relative flex items-center w-full max-w-36 pt-6 group',
|
|
14
|
-
getStatus(step.key, stepIdx) === 'upcoming'
|
|
15
|
-
? 'pointer-events-none'
|
|
16
|
-
: 'cursor-pointer',
|
|
17
|
-
]"
|
|
18
|
-
>
|
|
19
|
-
<template v-if="getStatus(step.key, stepIdx) === 'complete'">
|
|
20
|
-
<div
|
|
21
|
-
v-if="stepIdx !== lifeCycleEntries.length - 1"
|
|
22
|
-
class="absolute bg-green-500 w-full start-0 top-2.5 h-[0.0875rem] z-0"
|
|
23
|
-
/>
|
|
24
|
-
<div
|
|
25
|
-
class="absolute top-0 flex items-center text-green-500 bg-white rounded-full start-0 size-5"
|
|
26
|
-
>
|
|
27
|
-
<svg
|
|
28
|
-
width="22"
|
|
29
|
-
height="22"
|
|
30
|
-
viewBox="0 0 22 22"
|
|
31
|
-
fill="none"
|
|
32
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
33
|
-
class="transform scale-110"
|
|
34
|
-
>
|
|
35
|
-
<path
|
|
36
|
-
fill-rule="evenodd"
|
|
37
|
-
clip-rule="evenodd"
|
|
38
|
-
d="M0.849609 10.9996C0.849609 5.39392 5.39392 0.849609 10.9996 0.849609C16.6053 0.849609 21.1496 5.39392 21.1496 10.9996C21.1496 16.6053 16.6053 21.1496 10.9996 21.1496C5.39392 21.1496 0.849609 16.6053 0.849609 10.9996ZM15.0634 9.67153C15.5195 9.36008 15.6368 8.73787 15.3253 8.28178C15.0139 7.82569 14.3917 7.70843 13.9356 8.01988L13.8343 8.08904C12.1934 9.20953 10.779 10.6239 9.66046 12.257L8.20624 10.8044C7.81551 10.4141 7.18234 10.4144 6.79203 10.8051C6.40171 11.1959 6.40205 11.829 6.79278 12.2193L9.13398 14.558C9.35437 14.7782 9.66477 14.8831 9.97353 14.8417C10.2823 14.8003 10.5541 14.6174 10.7088 14.347C11.7597 12.5094 13.214 10.9344 14.9621 9.7407L15.0634 9.67153Z"
|
|
39
|
-
fill="currentColor"
|
|
40
|
-
/>
|
|
41
|
-
</svg>
|
|
42
|
-
</div>
|
|
43
|
-
<div
|
|
44
|
-
class="flex flex-col items-start justify-between w-full max-w-full p-1 transition-opacity duration-200 ease-in group-hover:invisible group-hover:opacity-0"
|
|
45
|
-
>
|
|
46
|
-
<slot name="default">
|
|
47
|
-
<span class="text-xs font-semibold text-gray-900">{{
|
|
48
|
-
startCase(step.value)
|
|
49
|
-
}}</span>
|
|
50
|
-
</slot>
|
|
51
|
-
</div>
|
|
52
|
-
|
|
53
|
-
<div
|
|
54
|
-
class="absolute left-0 flex flex-col items-start justify-between invisible max-w-full p-2 break-all transition-all duration-300 ease-in-out origin-top-left translate-y-1 bg-white rounded-md shadow-md opacity-0 group-hover:visible group-hover:opacity-100 w-44 top-6 group-hover:pointer-events-auto group-hover:translate-y-0"
|
|
55
|
-
>
|
|
56
|
-
<span class="text-xs font-semibold text-gray-900">
|
|
57
|
-
<slot name="title">
|
|
58
|
-
{{ startCase(step.value) }}
|
|
59
|
-
</slot>
|
|
60
|
-
</span>
|
|
61
|
-
<span class="font-medium text-gray-700 text-xss">
|
|
62
|
-
<slot name="date">
|
|
63
|
-
{{ getFormattedDate(step.value) }}
|
|
64
|
-
</slot>
|
|
65
|
-
</span>
|
|
66
|
-
<span class="font-medium text-gray-500 text-xss">
|
|
67
|
-
<slot name="updatedBy">
|
|
68
|
-
{{ getUpdatedByEmail(step.value) }}
|
|
69
|
-
</slot>
|
|
70
|
-
</span>
|
|
71
|
-
</div>
|
|
72
|
-
</template>
|
|
73
|
-
<template v-else-if="getStatus(step.key, stepIdx) === 'current'">
|
|
74
|
-
<div
|
|
75
|
-
class="absolute bg-orange-500 w-full start-0 top-2.5 h-[0.0875rem] z-0"
|
|
76
|
-
/>
|
|
77
|
-
<div
|
|
78
|
-
class="absolute start-0 top-0 flex items-center justify-center size-5 rounded-full bg-white border-[1.5px] border-orange-500"
|
|
79
|
-
>
|
|
80
|
-
<div class="size-2.5 bg-orange-400 rounded-full" />
|
|
81
|
-
</div>
|
|
82
|
-
<div
|
|
83
|
-
class="flex flex-col items-start justify-between w-full max-w-full p-1 transition-opacity duration-200 ease-in-out group-hover:invisible group-hover:opacity-0"
|
|
84
|
-
>
|
|
85
|
-
<slot name="default">
|
|
86
|
-
<span class="text-xs font-semibold text-gray-900"
|
|
87
|
-
>{{ startCase(step.value) }}
|
|
88
|
-
</span>
|
|
89
|
-
</slot>
|
|
90
|
-
</div>
|
|
91
|
-
<div
|
|
92
|
-
class="absolute left-0 flex flex-col items-start justify-between invisible max-w-full p-2 break-all transition-all duration-300 ease-in-out origin-top-left translate-y-1 bg-white rounded-md shadow-md opacity-0 group-hover:visible group-hover:opacity-100 w-44 top-6 group-hover:pointer-events-auto group-hover:translate-y-0"
|
|
93
|
-
>
|
|
94
|
-
<span class="text-xs font-semibold text-gray-900">
|
|
95
|
-
<slot name="title">
|
|
96
|
-
{{ startCase(step.value) }}
|
|
97
|
-
</slot>
|
|
98
|
-
</span>
|
|
99
|
-
<span class="font-medium text-gray-700 text-xss">
|
|
100
|
-
<slot name="date">
|
|
101
|
-
{{ getFormattedDate(step.value) }}
|
|
102
|
-
</slot>
|
|
103
|
-
</span>
|
|
104
|
-
<span class="font-medium text-gray-500 text-xss">
|
|
105
|
-
<slot name="updatedBy">
|
|
106
|
-
{{ getUpdatedByEmail(step.value) }}
|
|
107
|
-
</slot>
|
|
108
|
-
</span>
|
|
109
|
-
</div>
|
|
110
|
-
</template>
|
|
111
|
-
<template v-else-if="getStatus(step.key, stepIdx) === 'upcoming'">
|
|
112
|
-
<div
|
|
113
|
-
v-if="stepIdx !== lifeCycleEntries.length - 1"
|
|
114
|
-
class="absolute bg-gray-300 w-full start-0 top-2.5 h-[0.0875rem] z-0"
|
|
115
|
-
/>
|
|
116
|
-
<div
|
|
117
|
-
class="absolute top-0 start-0 flex items-center justify-center size-5 rounded-full bg-gray-100 border-gray-300 border-[1.5px]"
|
|
118
|
-
>
|
|
119
|
-
<div class="bg-gray-200 rounded-full size-3" />
|
|
120
|
-
</div>
|
|
121
|
-
<div
|
|
122
|
-
class="flex flex-col items-start justify-between w-full max-w-full p-1"
|
|
123
|
-
>
|
|
124
|
-
<slot name="default">
|
|
125
|
-
<span
|
|
126
|
-
class="text-xs font-semibold text-gray-900 whitespace-nowrap"
|
|
127
|
-
>{{ startCase(step.value) }}
|
|
128
|
-
</span>
|
|
129
|
-
</slot>
|
|
130
|
-
</div>
|
|
131
|
-
</template>
|
|
132
|
-
</li>
|
|
133
|
-
</ol>
|
|
134
|
-
</nav>
|
|
135
|
-
</div>
|
|
136
|
-
</template>
|
|
137
|
-
<script setup lang="ts">
|
|
138
|
-
import { startCase } from "lodash";
|
|
139
|
-
import { computed, PropType } from "vue";
|
|
140
|
-
|
|
141
|
-
const props = defineProps({
|
|
142
|
-
stepStatus: {
|
|
143
|
-
type: String,
|
|
144
|
-
default: "contact",
|
|
145
|
-
},
|
|
146
|
-
steps: {
|
|
147
|
-
type: Array as PropType<string[]>,
|
|
148
|
-
default: () => [
|
|
149
|
-
"contact",
|
|
150
|
-
"MQL",
|
|
151
|
-
"SAL",
|
|
152
|
-
"SQL",
|
|
153
|
-
"opportunity",
|
|
154
|
-
"Prospect",
|
|
155
|
-
"Prospect Paid",
|
|
156
|
-
"Prospect Enrolled",
|
|
157
|
-
"Customer",
|
|
158
|
-
],
|
|
159
|
-
},
|
|
160
|
-
history: {
|
|
161
|
-
type: Array as PropType<
|
|
162
|
-
Array<{ lifecycleStage?: string; updatedAt?: string; updatedBy?: { email?: string } }>
|
|
163
|
-
>,
|
|
164
|
-
default: () => [],
|
|
165
|
-
},
|
|
166
|
-
});
|
|
167
|
-
|
|
168
|
-
const stepStatusEnum = computed(() => props.steps);
|
|
169
|
-
|
|
170
|
-
const lifeCycleEntries = computed(() => {
|
|
171
|
-
return Object.entries(stepStatusEnum.value).map((x) => {
|
|
172
|
-
return { key: x[0], value: x[1] };
|
|
173
|
-
});
|
|
174
|
-
});
|
|
175
|
-
|
|
176
|
-
const lifeCycleState = computed(() => {
|
|
177
|
-
return currentStatus.value;
|
|
178
|
-
});
|
|
179
|
-
|
|
180
|
-
const currentStatus = computed(() => props.stepStatus);
|
|
181
|
-
|
|
182
|
-
const status = computed(() => lifeCycleState.value);
|
|
183
|
-
|
|
184
|
-
const lifeCycle = computed(() => {
|
|
185
|
-
return lifeCycleEntries.value.findIndex((e) => e.value === status.value);
|
|
186
|
-
});
|
|
187
|
-
|
|
188
|
-
const getStatus = computed(() => {
|
|
189
|
-
return (status: string, index: number) => {
|
|
190
|
-
if (index && lifeCycle.value === lifeCycleEntries.value.length - 1) {
|
|
191
|
-
return "complete";
|
|
192
|
-
}
|
|
193
|
-
if (index === lifeCycle.value) {
|
|
194
|
-
return "current";
|
|
195
|
-
}
|
|
196
|
-
if (index < lifeCycle.value) {
|
|
197
|
-
return "complete";
|
|
198
|
-
}
|
|
199
|
-
if (index > lifeCycle.value) {
|
|
200
|
-
return "upcoming";
|
|
201
|
-
}
|
|
202
|
-
return {
|
|
203
|
-
status,
|
|
204
|
-
};
|
|
205
|
-
};
|
|
206
|
-
});
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
function getFormattedDate(stepValue: string) {
|
|
210
|
-
const match = props.history.find(
|
|
211
|
-
(h) => h.lifecycleStage === stepValue
|
|
212
|
-
);
|
|
213
|
-
if (!match?.updatedAt) return "";
|
|
214
|
-
try {
|
|
215
|
-
const date = new Date(match.updatedAt);
|
|
216
|
-
return (
|
|
217
|
-
date.toLocaleDateString("en-GB", {
|
|
218
|
-
day: "numeric",
|
|
219
|
-
month: "short",
|
|
220
|
-
year: "numeric",
|
|
221
|
-
}) +
|
|
222
|
-
" at " +
|
|
223
|
-
date.toLocaleTimeString("en-US", {
|
|
224
|
-
hour: "numeric",
|
|
225
|
-
minute: "2-digit",
|
|
226
|
-
hour12: true,
|
|
227
|
-
})
|
|
228
|
-
);
|
|
229
|
-
} catch {
|
|
230
|
-
return "";
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
function getUpdatedByEmail(stepValue: string) {
|
|
235
|
-
const match = props.history.find(
|
|
236
|
-
(h) => h.lifecycleStage === stepValue
|
|
237
|
-
);
|
|
238
|
-
const email = match?.updatedBy?.email as string | undefined;
|
|
239
|
-
return email ? `Updated by ${email}` : "";
|
|
240
|
-
}
|
|
241
|
-
</script>
|
|
242
|
-
<style lang="scss"></style>
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<EUIStepperHorizontal stepStatus="opportunity" />
|
|
4
|
-
<hr />
|
|
5
|
-
<EUIStepperVertical stepStatus="opportunity" />
|
|
6
|
-
</div>
|
|
7
|
-
</template>
|
|
8
|
-
|
|
9
|
-
<script setup lang="ts">
|
|
10
|
-
import EUIStepperHorizontal from './EUIStepperHorizontal.vue';
|
|
11
|
-
import EUIStepperVertical from './EUIStepperVertical.vue';
|
|
12
|
-
</script>
|
|
13
|
-
|
|
14
|
-
<style scoped>
|
|
15
|
-
|
|
16
|
-
</style>
|
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<nav aria-label="Progress" class="relative z-10">
|
|
3
|
-
<ol role="list" class="flex flex-col items-start justify-center w-full py-4 ps-4 pe-2">
|
|
4
|
-
<li
|
|
5
|
-
v-for="(step, stepIdx) in lifeCycleEntries"
|
|
6
|
-
:key="step.value"
|
|
7
|
-
:class="[
|
|
8
|
-
stepIdx !== lifeCycleEntries.length - 1 ? 'pb-8' : '',
|
|
9
|
-
'relative flex items-center w-full ps-5',
|
|
10
|
-
getStatus(step.key, stepIdx) === 'upcoming'
|
|
11
|
-
? 'pointer-events-none'
|
|
12
|
-
: '',
|
|
13
|
-
]"
|
|
14
|
-
>
|
|
15
|
-
<template v-if="getStatus(step.key, stepIdx) === 'complete'">
|
|
16
|
-
<div
|
|
17
|
-
v-if="stepIdx !== lifeCycleEntries.length - 1"
|
|
18
|
-
class="absolute bg-green-500 h-full start-px top-0 w-[0.0875rem] z-0"
|
|
19
|
-
/>
|
|
20
|
-
<div class="absolute top-0 -start-2 flex items-center size-5 bg-green-500 rounded-full border-[1.5px] border-green-500" >
|
|
21
|
-
<svg fill="currentColor" width="16" height="16" viewBox="0 0 24 24" class="text-white size-4"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"><title>Check icon</title></path></svg>
|
|
22
|
-
</div>
|
|
23
|
-
<div class="flex items-start justify-between max-w-full w-full py-0.5">
|
|
24
|
-
<span class="text-xs font-semibold text-gray-900">{{ startCase(step.value) }}</span>
|
|
25
|
-
<span class="text-xs font-medium text-gray-500">{{'26-05-2024 18:47'}}</span>
|
|
26
|
-
</div>
|
|
27
|
-
</template>
|
|
28
|
-
<template v-else-if="getStatus(step.key, stepIdx) === 'current'">
|
|
29
|
-
<div
|
|
30
|
-
class="absolute bg-orange-500 h-full start-px top-0 w-[0.0875rem] z-0"
|
|
31
|
-
/>
|
|
32
|
-
<div class="absolute -start-2 top-0 flex items-center justify-center size-5 rounded-full bg-white border-[1.5px] border-orange-500">
|
|
33
|
-
<div class="size-2.5 bg-orange-400 rounded-full" />
|
|
34
|
-
</div>
|
|
35
|
-
<div class="flex items-start justify-between max-w-full w-full py-0.5">
|
|
36
|
-
<span class="text-xs font-semibold text-gray-900">{{ startCase(step.value) }}</span>
|
|
37
|
-
<span class="text-xs font-medium text-gray-500">{{'26-05-2024 18:47'}}</span>
|
|
38
|
-
</div>
|
|
39
|
-
</template>
|
|
40
|
-
<template v-else-if="getStatus(step.key, stepIdx) === 'upcoming'">
|
|
41
|
-
<div
|
|
42
|
-
v-if="stepIdx !== lifeCycleEntries.length - 1"
|
|
43
|
-
class="absolute bg-gray-300 h-full start-px top-0 w-[0.0875rem] z-0"
|
|
44
|
-
/>
|
|
45
|
-
<div class="absolute top-0 -start-2 flex items-center justify-center size-5 rounded-full bg-gray-100 border-gray-300 border-[1.5px]">
|
|
46
|
-
<div class="bg-gray-200 rounded-full size-3" />
|
|
47
|
-
</div>
|
|
48
|
-
<div class="flex items-start justify-between max-w-full w-full py-0.5">
|
|
49
|
-
<span class="text-xs font-semibold text-gray-900">{{ startCase(step.value) }}</span>
|
|
50
|
-
<span class="text-xs font-medium text-gray-500">{{'26-05-2024 18:47'}}</span>
|
|
51
|
-
</div>
|
|
52
|
-
</template>
|
|
53
|
-
</li>
|
|
54
|
-
</ol>
|
|
55
|
-
</nav>
|
|
56
|
-
</template>
|
|
57
|
-
<script setup lang="ts">
|
|
58
|
-
import { startCase } from 'lodash';
|
|
59
|
-
import { computed, PropType } from 'vue';
|
|
60
|
-
|
|
61
|
-
const props = defineProps({
|
|
62
|
-
stepStatus: {
|
|
63
|
-
type: String as PropType<"contact" | "MQL" | 'SQL' | 'opportunity' | 'Prospect' | 'Prospect Paid' | 'Prospect Enrolled' | 'Customer'>,
|
|
64
|
-
default: 'contact'
|
|
65
|
-
}
|
|
66
|
-
})
|
|
67
|
-
|
|
68
|
-
const stepStatusEnum = ["contact" , "MQL" , 'SQL' , 'opportunity' , 'Prospect' , 'Prospect Paid' , 'Prospect Enrolled' , 'Customer']
|
|
69
|
-
|
|
70
|
-
const lifeCycleEntries = computed(() => {
|
|
71
|
-
return Object.entries(stepStatusEnum).map((x) => {
|
|
72
|
-
return { key: x[0], value: x[1] }
|
|
73
|
-
})
|
|
74
|
-
})
|
|
75
|
-
|
|
76
|
-
const lifeCycleState = computed(() => {
|
|
77
|
-
return currentStatus.value
|
|
78
|
-
})
|
|
79
|
-
|
|
80
|
-
const currentStatus = computed(() => props.stepStatus)
|
|
81
|
-
|
|
82
|
-
const status = computed(() => lifeCycleState.value)
|
|
83
|
-
|
|
84
|
-
const lifeCycle = computed(() => {
|
|
85
|
-
return lifeCycleEntries.value.findIndex((e) => e.value === status.value)
|
|
86
|
-
})
|
|
87
|
-
|
|
88
|
-
const getStatus = computed(() => {
|
|
89
|
-
return (status: string, index: number) => {
|
|
90
|
-
if (
|
|
91
|
-
index &&
|
|
92
|
-
lifeCycle.value === lifeCycleEntries.value.length - 1
|
|
93
|
-
) {
|
|
94
|
-
return 'complete'
|
|
95
|
-
}
|
|
96
|
-
if (index === lifeCycle.value) {
|
|
97
|
-
return 'current'
|
|
98
|
-
}
|
|
99
|
-
if (index < lifeCycle.value) {
|
|
100
|
-
return 'complete'
|
|
101
|
-
}
|
|
102
|
-
if (index > lifeCycle.value) {
|
|
103
|
-
return 'upcoming'
|
|
104
|
-
}
|
|
105
|
-
return {
|
|
106
|
-
status,
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
})
|
|
110
|
-
</script>
|
|
111
|
-
<style lang="scss">
|
|
112
|
-
</style>
|