edvoyui-component-library-test-flight 0.0.199 → 0.0.201
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/dist/components/select/EUISelect.vue +38 -40
- package/dist/components/table/EUIDashboardTable.d.ts +2 -2
- package/dist/components/table/EUIDashboardTable.vue +1 -1
- package/dist/components/table/EUITable.d.ts +2 -2
- package/dist/components/table/EUITable.vue +1 -1
- package/dist/components/table/GrowthTable.d.ts +6 -6
- package/dist/components/table/GrowthTable.vue +113 -75
- package/dist/components/table/GrowthTableView.vue +5 -2
- package/dist/edvoy-ui.cjs.js +12 -12
- package/dist/edvoy-ui.css +1 -1
- package/dist/edvoy-ui.es.js +3063 -3046
- package/dist/edvoy-ui.umd.js +8 -8
- package/package.json +1 -1
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
:loading="loading"
|
|
28
28
|
:disabled="disabled"
|
|
29
29
|
:selectable="selectedLimit"
|
|
30
|
-
class="eui-
|
|
30
|
+
class="eui-style"
|
|
31
31
|
:class="[
|
|
32
32
|
isUseCustomSelect
|
|
33
33
|
? 'customselect'
|
|
@@ -614,7 +614,7 @@ const offsetValue = computed(() => props.customOffset);
|
|
|
614
614
|
const withPopper = (
|
|
615
615
|
dropdownList: HTMLElement,
|
|
616
616
|
component: { $refs: { toggle: Element | VirtualElement } },
|
|
617
|
-
{ width, maxHeight }: any
|
|
617
|
+
{ width, maxHeight }: any,
|
|
618
618
|
) => {
|
|
619
619
|
const newwidth = selectWidth.value || width; //setcustom width '400px'
|
|
620
620
|
const newHeight = selectMaxHeight.value || width; //setcustom maxHeight '600px'
|
|
@@ -643,7 +643,7 @@ const withPopper = (
|
|
|
643
643
|
|
|
644
644
|
const fuseSearch = (
|
|
645
645
|
options: readonly unknown[],
|
|
646
|
-
search: string | any[] | Fuse.Expression
|
|
646
|
+
search: string | any[] | Fuse.Expression,
|
|
647
647
|
) => {
|
|
648
648
|
const fuse: any = new Fuse(options, {
|
|
649
649
|
keys: keys.value,
|
|
@@ -687,7 +687,7 @@ const slectedChipHeight = computed(() =>
|
|
|
687
687
|
? "fit-content"
|
|
688
688
|
: props.inputFilled
|
|
689
689
|
? ""
|
|
690
|
-
: "auto"
|
|
690
|
+
: "auto",
|
|
691
691
|
);
|
|
692
692
|
|
|
693
693
|
const dropDownIcon = computed(() => (props.clearable ? "flex" : "none"));
|
|
@@ -735,20 +735,20 @@ const selectFocus = computed(() =>
|
|
|
735
735
|
? "8px"
|
|
736
736
|
: props.inputFilled
|
|
737
737
|
? "8px"
|
|
738
|
-
: "0px"
|
|
738
|
+
: "0px",
|
|
739
739
|
);
|
|
740
740
|
const searchMargin = computed(() =>
|
|
741
741
|
props.multiple && props.inputFilled
|
|
742
742
|
? "10px"
|
|
743
743
|
: props.inputFilled
|
|
744
744
|
? "10px"
|
|
745
|
-
: "0px"
|
|
745
|
+
: "0px",
|
|
746
746
|
);
|
|
747
747
|
|
|
748
748
|
const selectRequited = computed(() =>
|
|
749
749
|
props.required
|
|
750
750
|
? "-webkit-linear-gradient(left, #374151 0%, #374151 92%,red 8%,red 100%)"
|
|
751
|
-
: "-webkit-linear-gradient(left, #374151 50%, #374151 50%)"
|
|
751
|
+
: "-webkit-linear-gradient(left, #374151 50%, #374151 50%)",
|
|
752
752
|
);
|
|
753
753
|
|
|
754
754
|
interface Iflag {
|
|
@@ -1050,44 +1050,42 @@ const open = () => {
|
|
|
1050
1050
|
-webkit-text-fill-color: transparent;
|
|
1051
1051
|
}
|
|
1052
1052
|
}
|
|
1053
|
-
|
|
1054
|
-
.
|
|
1055
|
-
|
|
1056
|
-
|
|
1053
|
+
// .style-chooser use this class for customize select style
|
|
1054
|
+
.selectall__input {
|
|
1055
|
+
@apply size-4 flex-shrink-0 border border-solid border-gray-200 bg-white appearance-none inline-block select-none cursor-pointer align-middle rounded relative before:content-[''] before:transform before:translate-x-1/2 before:-translate-y-1/2 before:z-[-1] before:absolute before:top-1/2 before:right-1/2 before:block before:size-9 before:rounded-full before:bg-violet-100 before:opacity-0 before:transition-opacity hover:before:opacity-75;
|
|
1056
|
+
&::after {
|
|
1057
|
+
@apply absolute hidden border-solid inset-0 -ml-px -mt-px size-4 scale-90;
|
|
1058
|
+
content: "";
|
|
1059
|
+
background-image: url(data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M5%2012.7132L10.0168%2017.7247L10.4177%2017.0238C12.5668%2013.2658%2015.541%2010.0448%2019.1161%207.60354L20%207%22%20stroke%3D%22%23ffffff%22%20stroke-width%3D%223%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E);
|
|
1060
|
+
background-size: contain;
|
|
1061
|
+
transition: all 0.2s ease;
|
|
1062
|
+
}
|
|
1063
|
+
&:hover {
|
|
1064
|
+
@apply bg-violet-100 border-violet-500;
|
|
1065
|
+
}
|
|
1066
|
+
&:checked {
|
|
1067
|
+
transition: all 0.3s ease;
|
|
1068
|
+
transform: translate3d(0, 1, 0);
|
|
1069
|
+
@apply bg-violet-700 border-violet-700;
|
|
1057
1070
|
&::after {
|
|
1058
|
-
@apply
|
|
1059
|
-
content: "";
|
|
1060
|
-
background-image: url(data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M5%2012.7132L10.0168%2017.7247L10.4177%2017.0238C12.5668%2013.2658%2015.541%2010.0448%2019.1161%207.60354L20%207%22%20stroke%3D%22%23ffffff%22%20stroke-width%3D%223%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E);
|
|
1061
|
-
background-size: contain;
|
|
1062
|
-
transition: all 0.2s ease;
|
|
1071
|
+
@apply block border-white;
|
|
1063
1072
|
}
|
|
1064
|
-
&:
|
|
1065
|
-
@apply bg-violet-
|
|
1073
|
+
&:focus {
|
|
1074
|
+
@apply bg-violet-700;
|
|
1075
|
+
}
|
|
1076
|
+
}
|
|
1077
|
+
&:focus {
|
|
1078
|
+
@apply outline-none border border-violet-700 bg-violet-200;
|
|
1079
|
+
}
|
|
1080
|
+
&:disabled {
|
|
1081
|
+
@apply bg-gray-300 border-gray-100 cursor-not-allowed;
|
|
1082
|
+
& ~ span {
|
|
1083
|
+
@apply cursor-not-allowed;
|
|
1066
1084
|
}
|
|
1067
1085
|
&:checked {
|
|
1068
|
-
|
|
1069
|
-
transform: translate3d(0, 1, 0);
|
|
1070
|
-
@apply bg-violet-700 border-violet-700;
|
|
1086
|
+
@apply bg-white border-white;
|
|
1071
1087
|
&::after {
|
|
1072
|
-
@apply block border-
|
|
1073
|
-
}
|
|
1074
|
-
&:focus {
|
|
1075
|
-
@apply bg-violet-700;
|
|
1076
|
-
}
|
|
1077
|
-
}
|
|
1078
|
-
&:focus {
|
|
1079
|
-
@apply outline-none border border-violet-700 bg-violet-200;
|
|
1080
|
-
}
|
|
1081
|
-
&:disabled {
|
|
1082
|
-
@apply bg-gray-300 border-gray-100 cursor-not-allowed;
|
|
1083
|
-
& ~ span {
|
|
1084
|
-
@apply cursor-not-allowed;
|
|
1085
|
-
}
|
|
1086
|
-
&:checked {
|
|
1087
|
-
@apply bg-white border-white;
|
|
1088
|
-
&::after {
|
|
1089
|
-
@apply block border-gray-100;
|
|
1090
|
-
}
|
|
1088
|
+
@apply block border-gray-100;
|
|
1091
1089
|
}
|
|
1092
1090
|
}
|
|
1093
1091
|
}
|
|
@@ -58,7 +58,7 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
58
58
|
};
|
|
59
59
|
checkedRows: {
|
|
60
60
|
type: ArrayConstructor;
|
|
61
|
-
default: () =>
|
|
61
|
+
default: () => never[];
|
|
62
62
|
required: false;
|
|
63
63
|
};
|
|
64
64
|
headers: {
|
|
@@ -146,7 +146,7 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
146
146
|
};
|
|
147
147
|
checkedRows: {
|
|
148
148
|
type: ArrayConstructor;
|
|
149
|
-
default: () =>
|
|
149
|
+
default: () => never[];
|
|
150
150
|
required: false;
|
|
151
151
|
};
|
|
152
152
|
headers: {
|
|
@@ -223,7 +223,7 @@ const props = defineProps({
|
|
|
223
223
|
paginated: { type: Boolean, default: false },
|
|
224
224
|
tableExpanded: { type: Boolean, default: false },
|
|
225
225
|
backendPagination: { type: Boolean, default: false },
|
|
226
|
-
checkedRows: { type: Array, default: () =>
|
|
226
|
+
checkedRows: { type: Array, default: () => [], required: false },
|
|
227
227
|
headers: {
|
|
228
228
|
type: Array as PropType<Header[]>,
|
|
229
229
|
default: () => ({}),
|
|
@@ -59,7 +59,7 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
59
59
|
};
|
|
60
60
|
checkedRows: {
|
|
61
61
|
type: ArrayConstructor;
|
|
62
|
-
default: () =>
|
|
62
|
+
default: () => never[];
|
|
63
63
|
required: true;
|
|
64
64
|
};
|
|
65
65
|
headers: {
|
|
@@ -151,7 +151,7 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
151
151
|
};
|
|
152
152
|
checkedRows: {
|
|
153
153
|
type: ArrayConstructor;
|
|
154
|
-
default: () =>
|
|
154
|
+
default: () => never[];
|
|
155
155
|
required: true;
|
|
156
156
|
};
|
|
157
157
|
headers: {
|
|
@@ -269,7 +269,7 @@ const props = defineProps({
|
|
|
269
269
|
paginated: { type: Boolean, default: false },
|
|
270
270
|
tableExpanded: { type: Boolean, default: false },
|
|
271
271
|
backendPagination: { type: Boolean, default: false },
|
|
272
|
-
checkedRows: { type: Array, default: () =>
|
|
272
|
+
checkedRows: { type: Array, default: () => [], required: true },
|
|
273
273
|
headers: {
|
|
274
274
|
type: Array as PropType<Header[]>,
|
|
275
275
|
default: () => ({}),
|
|
@@ -16,15 +16,15 @@ declare function __VLS_template(): {
|
|
|
16
16
|
row: unknown;
|
|
17
17
|
rowIndex: number;
|
|
18
18
|
}) => any>> & {
|
|
19
|
-
loader?(_: {
|
|
20
|
-
loading: true;
|
|
21
|
-
height: string;
|
|
22
|
-
}): any;
|
|
23
19
|
header?(_: {
|
|
24
20
|
header: Header;
|
|
25
21
|
index: number;
|
|
26
22
|
}): any;
|
|
27
23
|
headerOptionalItem?(_: {}): any;
|
|
24
|
+
loader?(_: {
|
|
25
|
+
loading: true;
|
|
26
|
+
height: string;
|
|
27
|
+
}): any;
|
|
28
28
|
expanded?(_: {
|
|
29
29
|
row: unknown;
|
|
30
30
|
rowIndex: number;
|
|
@@ -62,7 +62,7 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
62
62
|
};
|
|
63
63
|
checkedRows: {
|
|
64
64
|
type: ArrayConstructor;
|
|
65
|
-
default: () =>
|
|
65
|
+
default: () => never[];
|
|
66
66
|
required: true;
|
|
67
67
|
};
|
|
68
68
|
headers: {
|
|
@@ -154,7 +154,7 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
154
154
|
};
|
|
155
155
|
checkedRows: {
|
|
156
156
|
type: ArrayConstructor;
|
|
157
|
-
default: () =>
|
|
157
|
+
default: () => never[];
|
|
158
158
|
required: true;
|
|
159
159
|
};
|
|
160
160
|
headers: {
|
|
@@ -1,34 +1,17 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
3
|
<Transition name="fade" mode="out-in">
|
|
4
|
-
<
|
|
5
|
-
<slot name="loader" :loading="loading" :height="tableHeight">
|
|
6
|
-
<div
|
|
7
|
-
:class="[
|
|
8
|
-
'overflow-hidden relative z-0 isolate bg-white backdrop-blur transition-colors duration-150 ease-in-out rounded-xl border border-gray-50',
|
|
9
|
-
tableHeight
|
|
10
|
-
? tableHeight
|
|
11
|
-
: 'h-[calc(100svh-9rem)] max-h-[calc(100svh-9rem)]',
|
|
12
|
-
]"
|
|
13
|
-
>
|
|
14
|
-
<div
|
|
15
|
-
class="absolute flex items-center z-[calc(infinity)] w-full h-auto pointer-events-none inset-0"
|
|
16
|
-
>
|
|
17
|
-
<EUICircleLoader />
|
|
18
|
-
</div>
|
|
19
|
-
</div>
|
|
20
|
-
</slot>
|
|
21
|
-
</template>
|
|
22
|
-
|
|
23
|
-
<div v-else class="relative w-full mx-auto overflow-hidden">
|
|
4
|
+
<div class="relative w-full mx-auto overflow-hidden">
|
|
24
5
|
<div
|
|
25
6
|
id="growth-table"
|
|
26
7
|
:class="[
|
|
27
8
|
'scrollbar--thin overscroll-auto',
|
|
28
|
-
computedItems.length === 0
|
|
9
|
+
computedItems.length === 0 || loading
|
|
10
|
+
? 'overflow-hidden'
|
|
11
|
+
: 'overflow-auto',
|
|
29
12
|
tableHeight
|
|
30
13
|
? tableHeight
|
|
31
|
-
: 'h-[calc(
|
|
14
|
+
: 'h-[calc(100vh_-_13rem)] max-h-[calc(100vh_-_13rem)]',
|
|
32
15
|
]"
|
|
33
16
|
ref="tableContainer"
|
|
34
17
|
@scroll="handleScroll"
|
|
@@ -104,51 +87,93 @@
|
|
|
104
87
|
</tr>
|
|
105
88
|
</thead>
|
|
106
89
|
<tbody>
|
|
107
|
-
<template
|
|
108
|
-
|
|
109
|
-
v-for="(row, rowIndex) in computedItems"
|
|
110
|
-
:key="`table-row-${rowIndex}`"
|
|
111
|
-
>
|
|
112
|
-
<tr
|
|
113
|
-
@mouseenter="
|
|
114
|
-
$attrs.mouseenter
|
|
115
|
-
? $emit('mouseenter', row, rowIndex)
|
|
116
|
-
: null
|
|
117
|
-
"
|
|
118
|
-
@mouseleave="
|
|
119
|
-
$attrs.mouseleave
|
|
120
|
-
? $emit('mouseleave', row, rowIndex)
|
|
121
|
-
: null
|
|
122
|
-
"
|
|
123
|
-
>
|
|
124
|
-
<template v-if="checkable">
|
|
125
|
-
<td class="checkable">
|
|
126
|
-
<EUITableCheckbox
|
|
127
|
-
:disabled="!isRowCheckable(row)"
|
|
128
|
-
:checked="isRowChecked(row)"
|
|
129
|
-
@change="($event:boolean) => checkRow(row, rowIndex, $event)"
|
|
130
|
-
/>
|
|
131
|
-
</td>
|
|
132
|
-
</template>
|
|
90
|
+
<template v-if="loading">
|
|
91
|
+
<tr class="norecords">
|
|
133
92
|
<td
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
isScrolled && headerIndex === 0 ? stickyClass.body : '',
|
|
138
|
-
]"
|
|
93
|
+
:colspan="
|
|
94
|
+
checkable === true ? headers.length + 1 : headers.length
|
|
95
|
+
"
|
|
139
96
|
>
|
|
140
97
|
<slot
|
|
141
|
-
|
|
142
|
-
:
|
|
143
|
-
:
|
|
98
|
+
name="loader"
|
|
99
|
+
:loading="loading"
|
|
100
|
+
:height="tableHeight"
|
|
144
101
|
>
|
|
145
|
-
|
|
102
|
+
<div
|
|
103
|
+
:class="[
|
|
104
|
+
'overflow-hidden relative z-0 isolate bg-white backdrop-blur transition-colors duration-150 ease-in-out rounded-xl max-w-screen-xl w-full',
|
|
105
|
+
tableHeight
|
|
106
|
+
? tableHeight
|
|
107
|
+
: 'h-[calc(100vh-22rem)] max-h-[calc(100vh-22rem)]',
|
|
108
|
+
]"
|
|
109
|
+
>
|
|
110
|
+
<div
|
|
111
|
+
class="absolute flex items-center justify-center z-[calc(infinity)] w-full h-auto pointer-events-none inset-0"
|
|
112
|
+
>
|
|
113
|
+
<EUICircleLoader />
|
|
114
|
+
</div>
|
|
115
|
+
</div>
|
|
146
116
|
</slot>
|
|
147
117
|
</td>
|
|
148
118
|
</tr>
|
|
149
|
-
|
|
150
|
-
|
|
119
|
+
</template>
|
|
120
|
+
<template v-else-if="computedItems.length > 0">
|
|
121
|
+
<template
|
|
122
|
+
v-for="(row, rowIndex) in computedItems"
|
|
123
|
+
:key="`table-row-${rowIndex}`"
|
|
124
|
+
>
|
|
125
|
+
<tr
|
|
126
|
+
@mouseenter="
|
|
127
|
+
$attrs.mouseenter
|
|
128
|
+
? $emit('mouseenter', row, rowIndex)
|
|
129
|
+
: null
|
|
130
|
+
"
|
|
131
|
+
@mouseleave="
|
|
132
|
+
$attrs.mouseleave
|
|
133
|
+
? $emit('mouseleave', row, rowIndex)
|
|
134
|
+
: null
|
|
135
|
+
"
|
|
136
|
+
>
|
|
137
|
+
<template v-if="checkable">
|
|
138
|
+
<td class="checkable">
|
|
139
|
+
<EUITableCheckbox
|
|
140
|
+
:disabled="!isRowCheckable(row)"
|
|
141
|
+
:checked="isRowChecked(row)"
|
|
142
|
+
@change="($event:boolean) => checkRow(row, rowIndex, $event)"
|
|
143
|
+
/>
|
|
144
|
+
</td>
|
|
145
|
+
</template>
|
|
146
|
+
<td
|
|
147
|
+
v-for="(header, headerIndex) in headers"
|
|
148
|
+
:key="headerIndex"
|
|
149
|
+
:class="[
|
|
150
|
+
isScrolled && headerIndex === 0 ? stickyClass.body : '',
|
|
151
|
+
]"
|
|
152
|
+
>
|
|
153
|
+
<slot
|
|
154
|
+
:name="`item.${header.value}`"
|
|
155
|
+
:row="row"
|
|
156
|
+
:rowIndex="rowIndex"
|
|
157
|
+
>
|
|
158
|
+
{{ getValueByPath(row, header?.value) }}
|
|
159
|
+
</slot>
|
|
160
|
+
</td>
|
|
161
|
+
</tr>
|
|
162
|
+
<template v-if="tableExpanded">
|
|
163
|
+
<slot
|
|
164
|
+
name="expanded"
|
|
165
|
+
:row="row"
|
|
166
|
+
:rowIndex="rowIndex"
|
|
167
|
+
></slot>
|
|
168
|
+
</template>
|
|
151
169
|
</template>
|
|
170
|
+
<!-- Filler row to push footer to bottom when items are few -->
|
|
171
|
+
<tr class="filler-row">
|
|
172
|
+
<td
|
|
173
|
+
:colspan="checkable ? headers.length + 1 : headers.length"
|
|
174
|
+
class="!p-0 !h-auto !border-none"
|
|
175
|
+
></td>
|
|
176
|
+
</tr>
|
|
152
177
|
</template>
|
|
153
178
|
<template v-else-if="computedItems.length === 0">
|
|
154
179
|
<tr class="norecords">
|
|
@@ -159,7 +184,7 @@
|
|
|
159
184
|
>
|
|
160
185
|
<slot name="no-records">
|
|
161
186
|
<div
|
|
162
|
-
class="flex items-center justify-center text-xl font-medium text-gray-500 h-[calc(
|
|
187
|
+
class="flex items-center justify-center border text-xl font-medium text-gray-500 h-[calc(100vh_-_23rem)] max-w-screen-xl"
|
|
163
188
|
>
|
|
164
189
|
No matching records found
|
|
165
190
|
</div>
|
|
@@ -170,7 +195,7 @@
|
|
|
170
195
|
</tbody>
|
|
171
196
|
<tfoot
|
|
172
197
|
v-if="footers.length"
|
|
173
|
-
class="sticky bottom-0
|
|
198
|
+
class="sticky bottom-0 z-50 bg-[#FEF3C7]"
|
|
174
199
|
>
|
|
175
200
|
<template
|
|
176
201
|
v-if="footers.length > 0"
|
|
@@ -201,8 +226,14 @@
|
|
|
201
226
|
</table>
|
|
202
227
|
</div>
|
|
203
228
|
<div
|
|
204
|
-
v-if="paginated
|
|
205
|
-
class="sticky bottom-0 left-0 z-50 flex items-center justify-between px-2 py-2 bg-gray-100"
|
|
229
|
+
v-if="paginated"
|
|
230
|
+
class="sticky bottom-0 left-0 z-50 flex items-center justify-between px-2 py-2 bg-gray-100 mt-2"
|
|
231
|
+
:class="[
|
|
232
|
+
{
|
|
233
|
+
'opacity-50 pointer-events-none cursor-none select-none':
|
|
234
|
+
computedItems.length === 0,
|
|
235
|
+
},
|
|
236
|
+
]"
|
|
206
237
|
>
|
|
207
238
|
<slot name="tableCount">
|
|
208
239
|
<div class="inline-flex items-center gap-x-10">
|
|
@@ -273,7 +304,7 @@ const props = defineProps({
|
|
|
273
304
|
paginated: { type: Boolean, default: false },
|
|
274
305
|
tableExpanded: { type: Boolean, default: false },
|
|
275
306
|
backendPagination: { type: Boolean, default: false },
|
|
276
|
-
checkedRows: { type: Array, default: () =>
|
|
307
|
+
checkedRows: { type: Array, default: () => [], required: true },
|
|
277
308
|
headers: {
|
|
278
309
|
type: Array as PropType<Header[]>,
|
|
279
310
|
default: () => ({}),
|
|
@@ -330,9 +361,9 @@ const filteredItems = computed(() => {
|
|
|
330
361
|
props.some((prop) =>
|
|
331
362
|
defaultFilter(
|
|
332
363
|
getValueByPath(item, prop),
|
|
333
|
-
search.value.toString().toLowerCase()
|
|
334
|
-
)
|
|
335
|
-
)
|
|
364
|
+
search.value.toString().toLowerCase(),
|
|
365
|
+
),
|
|
366
|
+
),
|
|
336
367
|
);
|
|
337
368
|
}
|
|
338
369
|
return filteredItems;
|
|
@@ -364,7 +395,7 @@ const sortClass = computed(() => (header: any) => {
|
|
|
364
395
|
|
|
365
396
|
const isIndeterminate = computed(() => {
|
|
366
397
|
const validVisibleData = computedItems.value.filter((row) =>
|
|
367
|
-
isRowCheckable.value(row)
|
|
398
|
+
isRowCheckable.value(row),
|
|
368
399
|
);
|
|
369
400
|
return (
|
|
370
401
|
newCheckedRows.value.length > 0 &&
|
|
@@ -381,7 +412,7 @@ const isAllChecked = computed(() => {
|
|
|
381
412
|
|
|
382
413
|
const isAllUncheckable = computed(() => {
|
|
383
414
|
const validVisibleData = computedItems.value?.filter((row) =>
|
|
384
|
-
isRowCheckable.value!(row)
|
|
415
|
+
isRowCheckable.value!(row),
|
|
385
416
|
);
|
|
386
417
|
return validVisibleData.length === 0;
|
|
387
418
|
});
|
|
@@ -439,7 +470,7 @@ const checkAll = () => {
|
|
|
439
470
|
} else {
|
|
440
471
|
// Check all rows
|
|
441
472
|
const rowsToCheck = computedItems.value.filter(
|
|
442
|
-
(row) => !newCheckedRows.value.includes(row)
|
|
473
|
+
(row) => !newCheckedRows.value.includes(row),
|
|
443
474
|
);
|
|
444
475
|
newCheckedRows.value.push(...rowsToCheck);
|
|
445
476
|
}
|
|
@@ -467,7 +498,7 @@ watch(
|
|
|
467
498
|
(newVal) => {
|
|
468
499
|
newCurrentPage.value = newVal;
|
|
469
500
|
},
|
|
470
|
-
{ immediate: true }
|
|
501
|
+
{ immediate: true },
|
|
471
502
|
);
|
|
472
503
|
|
|
473
504
|
watch(
|
|
@@ -477,7 +508,7 @@ watch(
|
|
|
477
508
|
},
|
|
478
509
|
{
|
|
479
510
|
immediate: true,
|
|
480
|
-
}
|
|
511
|
+
},
|
|
481
512
|
);
|
|
482
513
|
|
|
483
514
|
// table scroll to add class
|
|
@@ -529,7 +560,7 @@ watch(() => tableContainer.value?.clientWidth, checkOverflow);
|
|
|
529
560
|
#growth-table {
|
|
530
561
|
& table {
|
|
531
562
|
// border-spacing: 0 0.5rem;
|
|
532
|
-
@apply min-w-full text-sm font-light text-left table table-auto
|
|
563
|
+
@apply min-w-full text-sm font-light text-left w-full table table-auto -mt-2 box-border border-separate border-spacing-y-2 relative min-h-full;
|
|
533
564
|
thead tr {
|
|
534
565
|
@apply snap-x snap-mandatory;
|
|
535
566
|
th {
|
|
@@ -542,7 +573,7 @@ watch(() => tableContainer.value?.clientWidth, checkOverflow);
|
|
|
542
573
|
}
|
|
543
574
|
tbody {
|
|
544
575
|
@apply snap-y snap-mandatory snap-always;
|
|
545
|
-
tr:not(.norecords) {
|
|
576
|
+
tr:not(.norecords, .filler-row) {
|
|
546
577
|
@apply text-gray-500 transition-all duration-150 rounded-xl bg-white snap-start ease-in-out snap-x snap-mandatory;
|
|
547
578
|
&:hover {
|
|
548
579
|
@apply shadow-[1px_2px_40px_0px_#03022912] ring-1 ring-gray-100 ring-inset z-30;
|
|
@@ -560,13 +591,20 @@ watch(() => tableContainer.value?.clientWidth, checkOverflow);
|
|
|
560
591
|
}
|
|
561
592
|
}
|
|
562
593
|
}
|
|
594
|
+
tr.filler-row {
|
|
595
|
+
@apply h-full pointer-events-none;
|
|
596
|
+
td {
|
|
597
|
+
padding: 0 !important;
|
|
598
|
+
@apply h-auto border-none bg-transparent;
|
|
599
|
+
}
|
|
600
|
+
}
|
|
563
601
|
}
|
|
564
602
|
tfoot tr {
|
|
565
603
|
@apply snap-x snap-mandatory;
|
|
566
604
|
th {
|
|
567
605
|
@apply snap-always snap-start last-of-type:rounded-r-xl first-of-type:rounded-l-xl font-semibold;
|
|
568
606
|
&:first-of-type.empty {
|
|
569
|
-
@apply table-cell min-h-10 px-2 max-w-
|
|
607
|
+
@apply table-cell min-h-10 px-2 max-w-11 w-11 sticky left-0 top-0 z-20 bg-[#FEF3C7];
|
|
570
608
|
}
|
|
571
609
|
}
|
|
572
610
|
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
<!-- <template>
|
|
2
|
-
<div class="max-w-screen-xl mx-auto">
|
|
3
|
-
|
|
2
|
+
<div class="max-w-screen-xl pb-10 mx-auto">
|
|
3
|
+
<pre class="text-[0.5rem] p-2 border border-gray-300 rounded-lg max-h-72 overflow-y-auto">{{ selectedRows?.map(x => x?._id)}}</pre>
|
|
4
4
|
<GrowthTable
|
|
5
5
|
checkable
|
|
6
6
|
paginated
|
|
7
|
+
v-model:selectedRows.sync="selectedRows"
|
|
7
8
|
:checked-rows.sync="checkedRows"
|
|
8
9
|
backend-pagination
|
|
9
10
|
:per-page="limit"
|
|
@@ -14,6 +15,7 @@
|
|
|
14
15
|
:default-sort-direction="defaultSortOrder"
|
|
15
16
|
default-sort="introducer_details"
|
|
16
17
|
:current-page="offset"
|
|
18
|
+
:table-loading="false"
|
|
17
19
|
@sort="onSort"
|
|
18
20
|
@mouseenter="select"
|
|
19
21
|
@mouseleave="(selectedIndex = null), (selected = null)"
|
|
@@ -80,6 +82,7 @@ import { growthTableData, growthTableFooter, growthTableHeaders } from "../../da
|
|
|
80
82
|
import GrowthTable from "./GrowthTable.vue";
|
|
81
83
|
|
|
82
84
|
//TODO: Dashboard Table
|
|
85
|
+
const selectedRows = ref([]);
|
|
83
86
|
const checkedRows = ref([]);
|
|
84
87
|
const defaultSortOrder = ref("asc");
|
|
85
88
|
const limit = ref(5);
|