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,295 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<label
|
|
4
|
-
v-if="!inputFilled && label"
|
|
5
|
-
:class="[
|
|
6
|
-
'text-xs w-full text-gray-500 cursor-pointer font-medium block mb-1',
|
|
7
|
-
required && `after:content-['*'] after:ml-0.5 after:text-red-500`,
|
|
8
|
-
]"
|
|
9
|
-
>
|
|
10
|
-
{{ label }}
|
|
11
|
-
</label>
|
|
12
|
-
<div
|
|
13
|
-
:class="[
|
|
14
|
-
{ 'pointer-events-none cursor-not-allowed': disabled },
|
|
15
|
-
inputFilled
|
|
16
|
-
? 'overflow-hidden border border-gray-100 cursor-pointer group h-14 rounded-2xl eui-datepicker'
|
|
17
|
-
: 'h-10 eui-datepicker normal',
|
|
18
|
-
'relative w-full mb-2',
|
|
19
|
-
]"
|
|
20
|
-
>
|
|
21
|
-
<label
|
|
22
|
-
v-if="inputFilled"
|
|
23
|
-
:class="[
|
|
24
|
-
getIconClass(),
|
|
25
|
-
datepicker
|
|
26
|
-
? 'top-3.5 text-xs text-gray-400 leading-none cursor-default'
|
|
27
|
-
: 'top-1/2 text-sm w-full text-gray-700 cursor-pointer h-14 pt-5 pb-4 bg-white',
|
|
28
|
-
disabled ? ' cursor-not-allowed' : '',
|
|
29
|
-
required && `after:content-['*'] after:ml-0.5 after:text-red-500`,
|
|
30
|
-
'absolute font-medium left-0 px-4 z-[1] -translate-y-1/2 group-focus-within:top-3.5 group-focus-within:text-xs group-focus-within:text-gray-400 rounded-2xl group-focus-within:bg-transparent group-hover:text-xs group-focus-within:h-auto group-focus-within:py-0 group-hover:top-3.5 group-hover:bg-transparent group-hover:h-auto group-hover:py-0 group-focus-within:-translate-y-1/2 group-hover:-translate-y-1/2 text-start first-letter:capitalize group-hover:rounded-none group-hover:text-gray-400 group-hover:w-max transition-all ease-in-out duration-300',
|
|
31
|
-
]"
|
|
32
|
-
>
|
|
33
|
-
{{ label || 'Datepicker' }}
|
|
34
|
-
</label>
|
|
35
|
-
<div
|
|
36
|
-
v-if="icon && iconType"
|
|
37
|
-
:class="[
|
|
38
|
-
iconType === 'startIcon' ? 'left-0 pl-3' : 'right-0 pr-3',
|
|
39
|
-
disabled ? 'cursor-not-allowed' : '',
|
|
40
|
-
inputFilled ? 'inset-y-0' : 'top-2',
|
|
41
|
-
'absolute z-10 flex items-center pointer-events-none',
|
|
42
|
-
]"
|
|
43
|
-
>
|
|
44
|
-
<component
|
|
45
|
-
:is="icon"
|
|
46
|
-
class="w-6 h-6 text-gray-400"
|
|
47
|
-
aria-hidden="true"
|
|
48
|
-
/>
|
|
49
|
-
</div>
|
|
50
|
-
<VueDatePicker
|
|
51
|
-
locale="en-US"
|
|
52
|
-
:name="name"
|
|
53
|
-
:placeholder="placeholder"
|
|
54
|
-
:model-value="datepicker"
|
|
55
|
-
:utc="isUtc"
|
|
56
|
-
:range="range"
|
|
57
|
-
:teleport="true"
|
|
58
|
-
:clearable="clearIcon"
|
|
59
|
-
:required="required"
|
|
60
|
-
:disabled="disabled"
|
|
61
|
-
:readonly="readonly"
|
|
62
|
-
:disabled-dates="disableDate ? disabledDates : undefined"
|
|
63
|
-
:time-picker="timePicker"
|
|
64
|
-
:enable-time-picker="false"
|
|
65
|
-
:enable-seconds="false"
|
|
66
|
-
:is-24="false"
|
|
67
|
-
:dark="false"
|
|
68
|
-
:inline="false"
|
|
69
|
-
:text-input="false"
|
|
70
|
-
:auto-apply="autoApply"
|
|
71
|
-
:hide-input-icon="true"
|
|
72
|
-
position="left"
|
|
73
|
-
:multi-calendars="multiCalendars"
|
|
74
|
-
:min-date="minDate"
|
|
75
|
-
:max-date="maxDate"
|
|
76
|
-
:format="format"
|
|
77
|
-
:config="config"
|
|
78
|
-
@update:model-value="handleDate"
|
|
79
|
-
/>
|
|
80
|
-
</div>
|
|
81
|
-
<template v-if="errors && Object.keys(errors).length">
|
|
82
|
-
<EUIErrorMessage :errors="errors" :name="name" class="mt-2" />
|
|
83
|
-
</template>
|
|
84
|
-
</div>
|
|
85
|
-
</template>
|
|
86
|
-
|
|
87
|
-
<script setup lang="ts">
|
|
88
|
-
import { computed, ref, toRefs, watch } from 'vue'
|
|
89
|
-
import type { PropType } from 'vue'
|
|
90
|
-
import VueDatePicker from '@vuepic/vue-datepicker'
|
|
91
|
-
import '@vuepic/vue-datepicker/dist/main.css'
|
|
92
|
-
import EUIErrorMessage from '../errorMessage/EUIErrorMessage.vue';
|
|
93
|
-
|
|
94
|
-
const props = defineProps({
|
|
95
|
-
modelValue: {
|
|
96
|
-
type: Date as any,
|
|
97
|
-
default: '',
|
|
98
|
-
},
|
|
99
|
-
format: {
|
|
100
|
-
type: [String, Function] as PropType<
|
|
101
|
-
string | ((date: Date) => string) | ((dates: Date[]) => string)
|
|
102
|
-
>,
|
|
103
|
-
default: 'dd/MM/yyyy', // Default format dd/MM/yyyy HH:mm
|
|
104
|
-
},
|
|
105
|
-
maxDate: {
|
|
106
|
-
type: Date as any,
|
|
107
|
-
default: '',
|
|
108
|
-
},
|
|
109
|
-
minDate: {
|
|
110
|
-
type: Date as any,
|
|
111
|
-
default: '',
|
|
112
|
-
},
|
|
113
|
-
name: {
|
|
114
|
-
type: String,
|
|
115
|
-
required: false,
|
|
116
|
-
default: 'date-picker',
|
|
117
|
-
},
|
|
118
|
-
isUtc: {
|
|
119
|
-
type: Boolean,
|
|
120
|
-
default: true,
|
|
121
|
-
},
|
|
122
|
-
clearIcon: {
|
|
123
|
-
type: Boolean,
|
|
124
|
-
default: true,
|
|
125
|
-
},
|
|
126
|
-
placeholder: {
|
|
127
|
-
type: String,
|
|
128
|
-
default: 'Choose your date',
|
|
129
|
-
},
|
|
130
|
-
label: {
|
|
131
|
-
type: String,
|
|
132
|
-
required: true,
|
|
133
|
-
default: '',
|
|
134
|
-
},
|
|
135
|
-
iconType: {
|
|
136
|
-
type: String as PropType<'startIcon' | 'endIcon'>,
|
|
137
|
-
default: '',
|
|
138
|
-
},
|
|
139
|
-
icon: {
|
|
140
|
-
type: [Object, String],
|
|
141
|
-
default: '',
|
|
142
|
-
},
|
|
143
|
-
errors: { type: Object, required: false, default: () => {} },
|
|
144
|
-
timePicker: Boolean,
|
|
145
|
-
quarter: Boolean,
|
|
146
|
-
disableDate: Boolean,
|
|
147
|
-
formatDate: Boolean,
|
|
148
|
-
readonly: Boolean,
|
|
149
|
-
disabled: Boolean,
|
|
150
|
-
required: Boolean,
|
|
151
|
-
range: Boolean,
|
|
152
|
-
multiCalendars: Boolean,
|
|
153
|
-
autoApply: {
|
|
154
|
-
type: Boolean,
|
|
155
|
-
default: true,
|
|
156
|
-
},
|
|
157
|
-
inputFilled: {
|
|
158
|
-
type: Boolean,
|
|
159
|
-
default: false,
|
|
160
|
-
},
|
|
161
|
-
config: {
|
|
162
|
-
type: Object,
|
|
163
|
-
required: false,
|
|
164
|
-
default: () => {},
|
|
165
|
-
},
|
|
166
|
-
})
|
|
167
|
-
const emit = defineEmits(['update:modelValue'])
|
|
168
|
-
const { isUtc, clearIcon } = toRefs(props)
|
|
169
|
-
// const startDate = ref(new Date());
|
|
170
|
-
// const endDate = ref(new Date(new Date().setDate(startDate.value.getDate() + 7)));
|
|
171
|
-
|
|
172
|
-
// const time = ref({
|
|
173
|
-
// hours: new Date().getHours(),
|
|
174
|
-
// minutes: new Date().getMinutes()
|
|
175
|
-
// });
|
|
176
|
-
|
|
177
|
-
// const datepicker = ref( props.modelValue ? props.modelValue : props.timePicker ? time.value : props.range ? [startDate.value, endDate.value] : startDate.value);
|
|
178
|
-
|
|
179
|
-
const datepicker = ref(props.modelValue || (props.range ? [] : null))
|
|
180
|
-
|
|
181
|
-
//Date clear
|
|
182
|
-
watch(
|
|
183
|
-
() => props.modelValue,
|
|
184
|
-
newValue => {
|
|
185
|
-
if (
|
|
186
|
-
newValue === null ||
|
|
187
|
-
newValue === undefined ||
|
|
188
|
-
(Array.isArray(newValue) && newValue.length === 0)
|
|
189
|
-
) {
|
|
190
|
-
datepicker.value = props.range ? [] : null
|
|
191
|
-
} else {
|
|
192
|
-
datepicker.value = newValue
|
|
193
|
-
}
|
|
194
|
-
},
|
|
195
|
-
{ immediate: true },
|
|
196
|
-
)
|
|
197
|
-
|
|
198
|
-
const handleDate = (modelData: any) => {
|
|
199
|
-
datepicker.value = modelData
|
|
200
|
-
emit('update:modelValue', modelData)
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
const disabledDates = (date: Date) => {
|
|
204
|
-
const today = new Date()
|
|
205
|
-
today.setHours(0, 0, 0, 0)
|
|
206
|
-
return date < today
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
const getIconClass = () => {
|
|
210
|
-
switch (props.iconType) {
|
|
211
|
-
case 'startIcon':
|
|
212
|
-
return 'pl-12 pr-4'
|
|
213
|
-
case 'endIcon':
|
|
214
|
-
return 'pr-12 pl-4'
|
|
215
|
-
default:
|
|
216
|
-
return 'px-4'
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
const iconshowLeft = computed(() =>
|
|
221
|
-
props.iconType === 'startIcon' ? '46px' : '16px',
|
|
222
|
-
)
|
|
223
|
-
const iconshowRight = computed(() =>
|
|
224
|
-
props.iconType === 'endIcon' ? '46px' : '16px',
|
|
225
|
-
)
|
|
226
|
-
const clearIconRight = computed(() =>
|
|
227
|
-
props.iconType === 'endIcon' ? '40px' : '0px',
|
|
228
|
-
)
|
|
229
|
-
</script>
|
|
230
|
-
|
|
231
|
-
<style lang="scss">
|
|
232
|
-
:root {
|
|
233
|
-
--dp-menu-width: 232px;
|
|
234
|
-
--dp-menu-min-width: 232px;
|
|
235
|
-
}
|
|
236
|
-
.dp__theme_light {
|
|
237
|
-
--dp-primary-color: rgba(139, 92, 246, 1);
|
|
238
|
-
--dp-row-margin: 2px 0;
|
|
239
|
-
--dp-cell-size: 36px;
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
.eui-datepicker {
|
|
243
|
-
@apply min-w-56;
|
|
244
|
-
.dp__main {
|
|
245
|
-
.dp__input {
|
|
246
|
-
@apply pb-2 pt-6 border-0 transition-colors duration-100 ease-in-out text-sm font-medium leading-6 placeholder:text-gray-400 placeholder:font-normal;
|
|
247
|
-
padding-left: v-bind(iconshowLeft);
|
|
248
|
-
padding-right: v-bind(iconshowRight);
|
|
249
|
-
}
|
|
250
|
-
.dp__input.dp__input_focus {
|
|
251
|
-
@apply ring-2 ring-purple-600 rounded-2xl ring-inset h-[3.365rem];
|
|
252
|
-
}
|
|
253
|
-
.dp--clear-btn {
|
|
254
|
-
right: v-bind(clearIconRight);
|
|
255
|
-
}
|
|
256
|
-
}
|
|
257
|
-
&.normal {
|
|
258
|
-
.dp__main {
|
|
259
|
-
.dp__input {
|
|
260
|
-
@apply py-2 ring-1 ring-gray-100;
|
|
261
|
-
}
|
|
262
|
-
.dp__input.dp__input_focus {
|
|
263
|
-
@apply ring-2 h-10 rounded-md ring-purple-600;
|
|
264
|
-
}
|
|
265
|
-
}
|
|
266
|
-
}
|
|
267
|
-
.dp__range_end,
|
|
268
|
-
.dp__range_start,
|
|
269
|
-
.dp__active_date {
|
|
270
|
-
background-color: var(--dp-primary-color);
|
|
271
|
-
color: #fff;
|
|
272
|
-
}
|
|
273
|
-
.dp__today {
|
|
274
|
-
border-color: var(--dp-primary-color);
|
|
275
|
-
}
|
|
276
|
-
.dp__action_select:hover {
|
|
277
|
-
background-color: var(--dp-primary-color);
|
|
278
|
-
color: #fff;
|
|
279
|
-
}
|
|
280
|
-
}
|
|
281
|
-
.dp__calendar_header {
|
|
282
|
-
@apply text-sm font-medium;
|
|
283
|
-
}
|
|
284
|
-
.dp__cell_inner {
|
|
285
|
-
height: var(--dp-cell-size);
|
|
286
|
-
width: var(--dp-cell-size);
|
|
287
|
-
@apply text-sm font-normal;
|
|
288
|
-
}
|
|
289
|
-
.dp__month_year_wrap {
|
|
290
|
-
@apply text-sm font-semibold;
|
|
291
|
-
}
|
|
292
|
-
.dp__calendar_row {
|
|
293
|
-
margin: var(--dp-row-margin);
|
|
294
|
-
}
|
|
295
|
-
</style>
|
|
@@ -1,262 +0,0 @@
|
|
|
1
|
-
<!-- <template>
|
|
2
|
-
<div class="py-4">
|
|
3
|
-
<div
|
|
4
|
-
class="flex flex-row items-center justify-end max-w-screen-xl gap-6 mx-auto mb-10"
|
|
5
|
-
>
|
|
6
|
-
<div class="flex-1">
|
|
7
|
-
Lorem ipsum dolor sit, amet consectetur adipisicing elit. Ad quibusdam
|
|
8
|
-
illo nisi recusandae impedit nulla possimus, et delectus necessitatibus
|
|
9
|
-
tempora maxime maiores dolores voluptates nemo ratione officia suscipit
|
|
10
|
-
voluptatum iure.
|
|
11
|
-
</div>
|
|
12
|
-
<div class="relative size-10">
|
|
13
|
-
<div class="absolute top-0 right-0"><EUISearchExpand /></div>
|
|
14
|
-
</div>
|
|
15
|
-
<div class="inline-flex flex-row gap-2">
|
|
16
|
-
<EUISearchToggle
|
|
17
|
-
v-model:model-value="inputSearch"
|
|
18
|
-
v-model:search-sync="showSearch"
|
|
19
|
-
/>
|
|
20
|
-
<EUIButton color="primary" rounded size="sm" @click="toggleSearch"
|
|
21
|
-
>Close</EUIButton
|
|
22
|
-
>
|
|
23
|
-
</div>
|
|
24
|
-
<div class="relative border border-red-500 rounded-full size-12">
|
|
25
|
-
<div class="absolute top-0 right-0"><EUISearch /></div>
|
|
26
|
-
</div>
|
|
27
|
-
<div>
|
|
28
|
-
<EUITooltip placement="top">
|
|
29
|
-
<template v-slot:default>
|
|
30
|
-
<button class="px-4 py-2 text-white bg-gray-800 rounded">
|
|
31
|
-
Hover here
|
|
32
|
-
</button>
|
|
33
|
-
</template>
|
|
34
|
-
<template v-slot:tooltip>
|
|
35
|
-
<div>You've got access to canvas. Collaborate with ChatGPT!</div>
|
|
36
|
-
</template>
|
|
37
|
-
</EUITooltip>
|
|
38
|
-
</div>
|
|
39
|
-
</div>
|
|
40
|
-
<div class="grid max-w-3xl gap-4 mx-auto mb-6 sm:grid-cols-3">
|
|
41
|
-
<div>
|
|
42
|
-
<EUIDatepicker
|
|
43
|
-
v-model:modelValue="datepickerRange"
|
|
44
|
-
label="Date Min and max"
|
|
45
|
-
placeholder="Select Date here..."
|
|
46
|
-
:range="true"
|
|
47
|
-
required
|
|
48
|
-
:icon="CalendarIcon"
|
|
49
|
-
iconType="startIcon"
|
|
50
|
-
:min-date="minDate"
|
|
51
|
-
:max-date="maxDate"
|
|
52
|
-
/>
|
|
53
|
-
</div>
|
|
54
|
-
<div>
|
|
55
|
-
<EUIDatepicker
|
|
56
|
-
v-model:modelValue="datepickerRange"
|
|
57
|
-
label="Datepicker Range multi"
|
|
58
|
-
placeholder="Select Date here..."
|
|
59
|
-
:range="true"
|
|
60
|
-
:multi-calendars="true"
|
|
61
|
-
required
|
|
62
|
-
:icon="CalendarIcon"
|
|
63
|
-
iconType="startIcon"
|
|
64
|
-
/>
|
|
65
|
-
<EUIButton @click="resetFilter">Reset</EUIButton>
|
|
66
|
-
</div>
|
|
67
|
-
<div>
|
|
68
|
-
<EUIDatepicker
|
|
69
|
-
v-model:modelValue="datepickerRange"
|
|
70
|
-
label="Datepicker Range"
|
|
71
|
-
placeholder="Select Date here..."
|
|
72
|
-
:range="true"
|
|
73
|
-
required
|
|
74
|
-
:icon="CalendarIcon"
|
|
75
|
-
iconType="startIcon"
|
|
76
|
-
/>
|
|
77
|
-
</div>
|
|
78
|
-
<div>
|
|
79
|
-
<EUIDatepicker
|
|
80
|
-
:disabled="false"
|
|
81
|
-
label="Datepicker Single"
|
|
82
|
-
v-model:modelValue="singleDate"
|
|
83
|
-
placeholder="Select your date"
|
|
84
|
-
:readonly="false"
|
|
85
|
-
required
|
|
86
|
-
:icon="CalendarIcon"
|
|
87
|
-
iconType="endIcon"
|
|
88
|
-
/>
|
|
89
|
-
</div>
|
|
90
|
-
<div>
|
|
91
|
-
<EUIDatepicker
|
|
92
|
-
v-model:modelValue="timepicker"
|
|
93
|
-
:disabled="false"
|
|
94
|
-
label="Time Picker"
|
|
95
|
-
placeholder="Select your time"
|
|
96
|
-
:readonly="false"
|
|
97
|
-
required
|
|
98
|
-
:timePicker="true"
|
|
99
|
-
/>
|
|
100
|
-
</div>
|
|
101
|
-
</div>
|
|
102
|
-
<div class="grid max-w-3xl gap-4 mx-auto mb-6 sm:grid-cols-3">
|
|
103
|
-
<div>
|
|
104
|
-
<EUIDatepicker
|
|
105
|
-
v-model:modelValue="datepickerRange"
|
|
106
|
-
label="Datepicker Range"
|
|
107
|
-
placeholder="Select Date here..."
|
|
108
|
-
:range="true"
|
|
109
|
-
required
|
|
110
|
-
inputFilled
|
|
111
|
-
:icon="CalendarIcon"
|
|
112
|
-
iconType="startIcon"
|
|
113
|
-
/>
|
|
114
|
-
</div>
|
|
115
|
-
|
|
116
|
-
<div>
|
|
117
|
-
<EUIDatepicker
|
|
118
|
-
:disabled="false"
|
|
119
|
-
label="Datepicker Single"
|
|
120
|
-
v-model:modelValue="singleDate"
|
|
121
|
-
placeholder="Select your date"
|
|
122
|
-
:readonly="false"
|
|
123
|
-
required
|
|
124
|
-
inputFilled
|
|
125
|
-
:icon="CalendarIcon"
|
|
126
|
-
iconType="endIcon"
|
|
127
|
-
/>
|
|
128
|
-
</div>
|
|
129
|
-
|
|
130
|
-
<div>
|
|
131
|
-
<EUIDatepicker
|
|
132
|
-
v-model:modelValue="timepicker"
|
|
133
|
-
:disabled="false"
|
|
134
|
-
label="Time Picker"
|
|
135
|
-
placeholder="Select your time"
|
|
136
|
-
:readonly="false"
|
|
137
|
-
:timePicker="true"
|
|
138
|
-
required
|
|
139
|
-
inputFilled
|
|
140
|
-
/>
|
|
141
|
-
</div>
|
|
142
|
-
</div>
|
|
143
|
-
|
|
144
|
-
<EUITable
|
|
145
|
-
:checkable="true"
|
|
146
|
-
paginated
|
|
147
|
-
:checked-rows.sync="checkedRows"
|
|
148
|
-
backend-pagination
|
|
149
|
-
:per-page="limit"
|
|
150
|
-
:headers="studentHeader"
|
|
151
|
-
:items="studentData"
|
|
152
|
-
:total="totalCount"
|
|
153
|
-
:default-sort-direction="defaultSortOrder"
|
|
154
|
-
default-sort=""
|
|
155
|
-
:current-page="offset"
|
|
156
|
-
table-height="h-[calc(100svh-20rem)] max-h-[calc(100svh-20rem)]"
|
|
157
|
-
@changePage="onPageChange"
|
|
158
|
-
@changeLimit="onChangeLimit"
|
|
159
|
-
@sort="onSort"
|
|
160
|
-
@mouseenter="select"
|
|
161
|
-
@mouseleave="(selectedIndex = null), (selected = null)"
|
|
162
|
-
>
|
|
163
|
-
<template #[`item.firstName`]="{ row, rowIndex }">
|
|
164
|
-
<div class="space-y-0.5">
|
|
165
|
-
<div class="block text-sm font-medium leading-snug">
|
|
166
|
-
{{
|
|
167
|
-
capitalizeText(row?.firstName) +
|
|
168
|
-
" " +
|
|
169
|
-
capitalizeText(row?.lastName)
|
|
170
|
-
}}
|
|
171
|
-
</div>
|
|
172
|
-
<div class="text-xs font-medium text-gray-900 leading-[normal]">
|
|
173
|
-
{{ row?.referenceId }}
|
|
174
|
-
</div>
|
|
175
|
-
</div>
|
|
176
|
-
</template>
|
|
177
|
-
<template #[`item.activeUser`]="{ row, rowIndex }">
|
|
178
|
-
{{ row?.activeUser?.user?.firstName }}
|
|
179
|
-
{{ row?.activeUser?.user?.lastName }}
|
|
180
|
-
</template>
|
|
181
|
-
</EUITable>
|
|
182
|
-
</div>
|
|
183
|
-
</template>
|
|
184
|
-
|
|
185
|
-
<script setup lang="ts">
|
|
186
|
-
import { computed, ref } from "vue";
|
|
187
|
-
import { studentData, studentHeader, tableData } from "../data/table";
|
|
188
|
-
import { capitalizeText } from "../utils/lodash";
|
|
189
|
-
import EUITable from "./table/EUITable.vue";
|
|
190
|
-
import EUITooltip from "./tooltip/EUITooltip.vue";
|
|
191
|
-
import EUISearch from "./searchInput/EUISearch.vue";
|
|
192
|
-
import EUIDatepicker from "./datepicker/EUIDatepicker.vue";
|
|
193
|
-
import { CalendarIcon } from "@heroicons/vue/24/solid";
|
|
194
|
-
import EUIButton from "./button/EUIButton.vue";
|
|
195
|
-
import EUISearchToggle from "./searchexpand/EUISearchToggle.vue";
|
|
196
|
-
import EUISearchExpand from "./searchexpand/EUISearchExpand.vue";
|
|
197
|
-
|
|
198
|
-
// TODO: Datepicker
|
|
199
|
-
const datepickerRange = ref([
|
|
200
|
-
new Date(),
|
|
201
|
-
new Date(new Date().setDate(new Date().getDate() + 7)),
|
|
202
|
-
]);
|
|
203
|
-
|
|
204
|
-
const singleDate = ref(new Date());
|
|
205
|
-
|
|
206
|
-
const inputSearch = ref("");
|
|
207
|
-
const showSearch = ref(true);
|
|
208
|
-
|
|
209
|
-
const toggleSearch = () => {
|
|
210
|
-
showSearch.value = !showSearch.value;
|
|
211
|
-
};
|
|
212
|
-
|
|
213
|
-
const timepicker = ref({
|
|
214
|
-
hours: new Date().getHours(),
|
|
215
|
-
minutes: new Date().getMinutes(),
|
|
216
|
-
});
|
|
217
|
-
|
|
218
|
-
//TODO: Dashboard Table
|
|
219
|
-
const checkedRows = ref([]);
|
|
220
|
-
const defaultSortOrder = ref("asc");
|
|
221
|
-
const limit = ref(5);
|
|
222
|
-
const offset = ref(0);
|
|
223
|
-
const selectedIndex = ref(null);
|
|
224
|
-
const selected: { index: string } = { index: "" };
|
|
225
|
-
|
|
226
|
-
const totalCount = computed(() => {
|
|
227
|
-
return studentData.length;
|
|
228
|
-
});
|
|
229
|
-
|
|
230
|
-
const select = (_item: any, index: any) => {
|
|
231
|
-
selectedIndex.value = index;
|
|
232
|
-
};
|
|
233
|
-
|
|
234
|
-
// onChangeLimit
|
|
235
|
-
const onChangeLimit = (page: number) => {
|
|
236
|
-
limit.value = page;
|
|
237
|
-
console.log("@onChangeLimit:", page);
|
|
238
|
-
};
|
|
239
|
-
|
|
240
|
-
const onPageChange = (offsetData: number) => {
|
|
241
|
-
offset.value = offsetData;
|
|
242
|
-
console.log("@changePage:", offsetData);
|
|
243
|
-
};
|
|
244
|
-
|
|
245
|
-
const onSort = (field: string, order: string) => {
|
|
246
|
-
const modifier = order === "desc" ? -1 : 1;
|
|
247
|
-
tableData.sort((a: any, b: any) => {
|
|
248
|
-
if (a[field] < b[field]) return -1 * modifier;
|
|
249
|
-
if (a[field] > b[field]) return 1 * modifier;
|
|
250
|
-
return 0;
|
|
251
|
-
});
|
|
252
|
-
};
|
|
253
|
-
|
|
254
|
-
const resetFilter = () => {
|
|
255
|
-
datepickerRange.value = [];
|
|
256
|
-
};
|
|
257
|
-
|
|
258
|
-
const minDate = ref(new Date(2024, 11));
|
|
259
|
-
const maxDate = ref(new Date());
|
|
260
|
-
</script>
|
|
261
|
-
|
|
262
|
-
<style scoped></style> -->
|