edvoyui-component-library-test-flight 0.0.30 → 0.0.32

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "edvoyui-component-library-test-flight",
3
3
  "private": false,
4
- "version": "0.0.30",
4
+ "version": "0.0.32",
5
5
  "type": "module",
6
6
  "files": [
7
7
  "dist/",
@@ -13,8 +13,8 @@
13
13
  <div class="h-[clac(100svh-64px)] w-full px-10 py-8 max-w-screen-xl mx-auto">
14
14
  <h1 class="mb-2 font-semibold text-gray-900 tetx-lg">Edvoy UI Componnet</h1>
15
15
 
16
- <Delete />
17
16
 
17
+ <Delete />
18
18
  <div class="grid gap-4 sm:grid-cols-2 place-items-start">
19
19
  <div
20
20
  class="w-full max-w-screen-xl col-span-2 p-4 bg-white border border-gray-200 border-solid rounded-lg hover:ring-2 ring-purple-500 ring-offset-1"
@@ -827,6 +827,7 @@
827
827
  <div class="py-4">
828
828
  <EUITable
829
829
  :checkable="true"
830
+ :table-loading="loading"
830
831
  paginated
831
832
  :checked-rows.sync="checkedRows"
832
833
  backend-pagination
@@ -837,6 +838,7 @@
837
838
  :default-sort-direction="defaultSortOrder"
838
839
  default-sort=""
839
840
  :current-page="offset"
841
+ @changePage="onPageChange"
840
842
  @sort="onSort"
841
843
  @mouseenter="select"
842
844
  @mouseleave="(selectedIndex = null), (selected = null)"
@@ -896,9 +898,9 @@ import { capitalizeText } from "../utils/lodash";
896
898
  import ChevronDownStroke from '../assets/svg/ChevronDownStroke.vue';
897
899
  import EUIMultiDropdown from './dropdown/EUIMultiDropdown.vue';
898
900
  import Delete from "./delete.vue";
899
-
900
901
  const mobileNumber = ref("+91 8667444951");
901
902
  const datepicker = ref(new Date());
903
+ const loading = ref(false)
902
904
 
903
905
  const form = reactive({
904
906
  input: "Lorem ipsum dolor sit",
@@ -930,6 +932,15 @@ const onSort = (field: string, order: string) => {
930
932
  });
931
933
  };
932
934
 
935
+ const onPageChange = (offsetData: number) => {
936
+ offset.value = offsetData;
937
+ loading.value = true
938
+ console.log("@changePage:", offsetData);
939
+ setTimeout(() => {
940
+ loading.value = false
941
+ }, 500);
942
+ };
943
+
933
944
  // TODO: Multi dropdown menu clicked access
934
945
  const menubar = ref([
935
946
  { text: "Students" },
@@ -138,18 +138,19 @@ const { modelValue, isUtc, clearIcon } = toRefs(props);
138
138
 
139
139
  // const datepicker = ref( props.modelValue ? props.modelValue : props.timePicker ? time.value : props.range ? [startDate.value, endDate.value] : startDate.value);
140
140
 
141
- const datepicker = ref(props.modelValue)
141
+ const datepicker = ref(props.modelValue || (props.range ? [] : null))
142
142
 
143
143
  //Date clear
144
144
  watch(
145
145
  () => props.modelValue,
146
146
  (newValue) => {
147
- if (!newValue || newValue.length === 0) {
148
- datepicker.value = [];
147
+ if (newValue === null || newValue === undefined || (Array.isArray(newValue) && newValue.length === 0)) {
148
+ datepicker.value = props.range ? [] : null;;
149
149
  } else {
150
150
  datepicker.value = newValue;
151
151
  }
152
- }
152
+ },
153
+ { immediate: true }
153
154
  );
154
155
 
155
156
  watch(
@@ -33,6 +33,7 @@
33
33
  :icon="CalendarIcon"
34
34
  iconType="startIcon"
35
35
  />
36
+ <EUIButton @click="resetFilter">Reset</EUIButton>
36
37
  </div>
37
38
 
38
39
  <div>
@@ -165,7 +166,8 @@ import EUITable from "./table/EUITable.vue";
165
166
  import EUITooltip from "./tooltip/EUITooltip.vue";
166
167
  import EUISearch from "./searchInput/EUISearch.vue";
167
168
  import EUIDatepicker from "./datepicker/EUIDatepicker.vue";
168
- import { CalculatorIcon, CalendarIcon } from "@heroicons/vue/24/solid";
169
+ import { CalendarIcon } from "@heroicons/vue/24/solid";
170
+ import EUIButton from "./button/EUIButton.vue";
169
171
 
170
172
  // TODO: Datepicker
171
173
  const datepickerRange = ref([
@@ -215,6 +217,10 @@ const onSort = (field: string, order: string) => {
215
217
  return 0;
216
218
  });
217
219
  };
220
+
221
+ const resetFilter = () => {
222
+ datepickerRange.value = []
223
+ }
218
224
  </script>
219
225
 
220
226
  <style scoped></style> -->
@@ -1,6 +1,13 @@
1
1
  <template>
2
2
  <div>
3
- <div class="relative w-full mx-auto overflow-hidden">
3
+ <template v-if="loading">
4
+ <div :class="['overflow-hidden relative z-0 isolate bg-white backdrop-blur border border-gray-200 rounded-xl transition-colors duration-150 ease-in-out', tableHeight ? tableHeight : 'h-[calc(100svh-9rem)] max-h-[calc(100svh-9rem)]']">
5
+ <div class="absolute flex items-center z-[calc(infinity)] w-full h-auto pointer-events-none inset-0">
6
+ <EUICircleLoader />
7
+ </div>
8
+ </div>
9
+ </template>
10
+ <div v-else class="relative w-full mx-auto overflow-hidden">
4
11
  <div
5
12
  id="student-table"
6
13
  :class="['overflow-auto scrollbar--thin overscroll-none', tableHeight ? tableHeight : 'h-[calc(100svh-12rem)] max-h-[calc(100svh-12rem)]']"
@@ -88,20 +95,8 @@
88
95
  </tr>
89
96
  </thead>
90
97
  <tbody>
91
- <template v-if="loading">
92
- <tr class="norecords">
93
- <td :colspan="headers.length">
94
- <div
95
- class="flex items-center justify-center min-h-96"
96
- >
97
- <EUICircleLoader />
98
- </div>
99
- </td>
100
- </tr>
101
- </template>
102
-
103
98
  <template
104
- v-else-if="computedItems.length > 0"
99
+ v-if="computedItems.length > 0"
105
100
  v-for="(row, rowIndex) in computedItems"
106
101
  :key="`table-row-${rowIndex}`"
107
102
  >