edvoyui-component-library-test-flight 0.0.164 → 0.0.166

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.
@@ -1,21 +1,24 @@
1
1
  <template>
2
2
  <div>
3
3
  <Transition name="fade" mode="out-in">
4
- <div
5
- v-if="loading"
6
- :class="[
7
- 'overflow-hidden relative z-0 isolate bg-white backdrop-blur transition-colors duration-150 ease-in-out rounded-xl border border-gray-50',
8
- tableHeight
9
- ? tableHeight
10
- : 'h-[calc(100svh-9rem)] max-h-[calc(100svh-9rem)]',
11
- ]"
12
- >
13
- <div
14
- class="absolute flex items-center z-[calc(infinity)] w-full h-auto pointer-events-none inset-0"
15
- >
16
- <EUICircleLoader />
17
- </div>
18
- </div>
4
+ <template v-if="loading">
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>
19
22
  <div v-else class="relative max-w-full mx-auto overflow-hidden">
20
23
  <div
21
24
  :class="[
@@ -72,7 +75,7 @@
72
75
  <div class="relative z-0 w-full">
73
76
  <div
74
77
  class="w-full text-sm font-bold text-current font-inter"
75
- :class="{'truncate':!header?.showHeaderInfoText}"
78
+ :class="{ truncate: !header?.showHeaderInfoText }"
76
79
  >
77
80
  <slot name="header" :header="header" :index="headerIndex">
78
81
  {{ capitalizeText(header?.text ?? header?.name ?? "") }}
@@ -81,14 +84,24 @@
81
84
  v-if="headerOptional"
82
85
  name="headerOptionalItem"
83
86
  ></slot>
84
- <EUITooltip v-if="header?.showInfoText" placement="top" class="inline-block ms-0.5">
85
- <template v-slot:default>
86
- <InformationCircleIcon class="inline-block text-gray-500 size-4" />
87
- </template>
88
- <template v-slot:tooltip>
89
- <div class="z-50 max-w-xs break-words whitespace-normal min-w-max">{{ header?.showHeaderInfoText }}</div>
90
- </template>
91
- </EUITooltip>
87
+ <EUITooltip
88
+ v-if="header?.showInfoText"
89
+ placement="top"
90
+ class="inline-block ms-0.5"
91
+ >
92
+ <template v-slot:default>
93
+ <InformationCircleIcon
94
+ class="inline-block text-gray-500 size-4"
95
+ />
96
+ </template>
97
+ <template v-slot:tooltip>
98
+ <div
99
+ class="z-50 max-w-xs break-words whitespace-normal min-w-max"
100
+ >
101
+ {{ header?.showHeaderInfoText }}
102
+ </div>
103
+ </template>
104
+ </EUITooltip>
92
105
  </div>
93
106
  <div
94
107
  v-if="header?.sortable"
@@ -184,14 +197,27 @@
184
197
  :rowIndex="rowIndex"
185
198
  :headerIndex="headerIndex"
186
199
  >
187
- <span class="block" :class="{'truncate':!header.showInfoText}">
200
+ <span
201
+ class="block"
202
+ :class="{ truncate: !header.showInfoText }"
203
+ >
188
204
  {{ getValueByPath(row, header?.value) }}
189
- <EUITooltip v-if="header?.showInfoText" placement="top" class="inline-block ms-0.5">
205
+ <EUITooltip
206
+ v-if="header?.showInfoText"
207
+ placement="top"
208
+ class="inline-block ms-0.5"
209
+ >
190
210
  <template v-slot:default>
191
- <InformationCircleIcon class="inline-block text-gray-500 size-4" />
211
+ <InformationCircleIcon
212
+ class="inline-block text-gray-500 size-4"
213
+ />
192
214
  </template>
193
215
  <template v-slot:tooltip>
194
- <div class="z-50 max-w-xs break-words whitespace-normal min-w-max">{{ header?.showInfoText }}</div>
216
+ <div
217
+ class="z-50 max-w-xs break-words whitespace-normal min-w-max"
218
+ >
219
+ {{ header?.showInfoText }}
220
+ </div>
195
221
  </template>
196
222
  </EUITooltip>
197
223
  </span>
@@ -214,30 +240,31 @@
214
240
  checkable === true ? headers.length + 1 : headers.length
215
241
  "
216
242
  >
217
- <slot name="no-records">
218
- <div
219
- class="flex items-center justify-center w-[calc(100vw-14rem)]"
220
- :class="[
221
- tableHeight
222
- ? tableHeight
223
- : 'h-[calc(100svh-12rem)] max-h-[calc(100svh-12rem)]',
224
- ]"
225
- >
226
- <div class="text-center">
227
- <div class="mx-auto overflow-hidden rounded-md size-56">
228
- <img
229
- src="@/assets/images/search-nodata.png"
230
- alt=""
231
- class="block object-contain object-center h-auto max-w-full opacity-90"
232
- />
233
- </div>
234
- <div class="my-2 text-xl font-medium text-gray-500">
235
- No matching records found
243
+ <slot name="no-records">
244
+ <div
245
+ class="flex items-center justify-center w-[calc(100vw-14rem)]"
246
+ :class="[
247
+ tableHeight
248
+ ? tableHeight
249
+ : 'h-[calc(100svh-12rem)] max-h-[calc(100svh-12rem)]',
250
+ ]"
251
+ >
252
+ <div class="text-center">
253
+ <div
254
+ class="mx-auto overflow-hidden rounded-md size-56"
255
+ >
256
+ <img
257
+ src="@/assets/images/search-nodata.png"
258
+ alt=""
259
+ class="block object-contain object-center h-auto max-w-full opacity-90"
260
+ />
261
+ </div>
262
+ <div class="my-2 text-xl font-medium text-gray-500">
263
+ No matching records found
264
+ </div>
236
265
  </div>
237
266
  </div>
238
- </div>
239
- </slot>
240
-
267
+ </slot>
241
268
  </td>
242
269
  </tr>
243
270
  </template>
@@ -441,7 +468,7 @@ const searchData = (_data: any) => {
441
468
 
442
469
  const changeLimit = (limitData: number) => {
443
470
  limit.value = limitData;
444
- newCurrentPage.value = 1;
471
+ newCurrentPage.value = 0;
445
472
  emit("update:currentPage", newCurrentPage.value);
446
473
  emit("changeLimit", limitData);
447
474
  };
@@ -61,7 +61,9 @@
61
61
  </textarea>
62
62
  </div>
63
63
  </div>
64
- <EUIErrorMessage :errors="errors" :name="name" />
64
+ <template v-if="errors && Object.keys(errors).length">
65
+ <EUIErrorMessage :errors="errors" :name="name" />
66
+ </template>
65
67
  </template>
66
68
  <script setup lang="ts">
67
69
  import { PropType, ref, watch, computed } from "vue";
@@ -17,7 +17,7 @@
17
17
  {{ label }}
18
18
  </span>
19
19
  </label>
20
- <template v-if="errors && errors.length">
20
+ <template v-if="errors && Object.keys(errors).length">
21
21
  <EUIErrorMessage :errors="errors" :name="name" />
22
22
  </template>
23
23
  </div>