@paris-ias/list 1.0.136 → 1.0.138

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.
Files changed (78) hide show
  1. package/dist/module.json +1 -1
  2. package/dist/runtime/components/actions/DenseItem.vue +64 -0
  3. package/dist/runtime/components/actions/ExpandedItem.vue +17 -10
  4. package/dist/runtime/components/actions/RowsItem.vue +57 -7
  5. package/dist/runtime/components/actions/View.vue +5 -17
  6. package/dist/runtime/components/affiliation/DenseItem.vue +26 -6
  7. package/dist/runtime/components/affiliation/ExpandedItem.vue +4 -0
  8. package/dist/runtime/components/affiliation/RowsItem.vue +27 -7
  9. package/dist/runtime/components/affiliation/View.vue +4 -4
  10. package/dist/runtime/components/apps/DenseItem.vue +26 -6
  11. package/dist/runtime/components/apps/ExpandedItem.vue +5 -1
  12. package/dist/runtime/components/apps/RowsItem.vue +27 -7
  13. package/dist/runtime/components/apps/View.vue +4 -4
  14. package/dist/runtime/components/disciplines/DenseItem.vue +26 -6
  15. package/dist/runtime/components/disciplines/ExpandedItem.vue +4 -0
  16. package/dist/runtime/components/disciplines/RowsItem.vue +27 -7
  17. package/dist/runtime/components/disciplines/View.vue +4 -4
  18. package/dist/runtime/components/events/Badges.vue +8 -12
  19. package/dist/runtime/components/events/DenseItem.vue +26 -16
  20. package/dist/runtime/components/events/ExpandedItem.vue +4 -0
  21. package/dist/runtime/components/events/RelatedItem.vue +4 -13
  22. package/dist/runtime/components/events/RowsItem.vue +20 -20
  23. package/dist/runtime/components/events/SlidingItem.vue +39 -47
  24. package/dist/runtime/components/events/View.vue +1 -1
  25. package/dist/runtime/components/fellowships/Badges.vue +15 -11
  26. package/dist/runtime/components/fellowships/DenseItem.vue +22 -11
  27. package/dist/runtime/components/fellowships/ExpandedItem.vue +8 -1
  28. package/dist/runtime/components/fellowships/RowsItem.vue +22 -15
  29. package/dist/runtime/components/fellowships/View.vue +2 -2
  30. package/dist/runtime/components/files/DenseItem.vue +26 -6
  31. package/dist/runtime/components/files/ExpandedItem.vue +4 -0
  32. package/dist/runtime/components/files/RowsItem.vue +27 -7
  33. package/dist/runtime/components/files/View.vue +4 -4
  34. package/dist/runtime/components/list/atoms/FiltersMenu.vue +9 -0
  35. package/dist/runtime/components/list/atoms/PerPage.vue +3 -2
  36. package/dist/runtime/components/list/atoms/ResetButton.vue +5 -1
  37. package/dist/runtime/components/list/atoms/SearchInput.vue +15 -2
  38. package/dist/runtime/components/list/atoms/SearchString.vue +169 -133
  39. package/dist/runtime/components/list/atoms/SortMenu.vue +22 -18
  40. package/dist/runtime/components/list/atoms/ViewMenu.vue +26 -14
  41. package/dist/runtime/components/list/molecules/Filters.vue +8 -8
  42. package/dist/runtime/components/list/molecules/Header.vue +10 -19
  43. package/dist/runtime/components/list/molecules/Pagination.vue +51 -48
  44. package/dist/runtime/components/list/organisms/List.vue +104 -69
  45. package/dist/runtime/components/mailing/DenseItem.vue +4 -0
  46. package/dist/runtime/components/mailing/ExpandedItem.vue +4 -0
  47. package/dist/runtime/components/mailing/RowsItem.vue +27 -7
  48. package/dist/runtime/components/mailing/View.vue +4 -4
  49. package/dist/runtime/components/misc/atoms/ImageContainer.vue +3 -45
  50. package/dist/runtime/components/misc/molecules/Related.vue +1 -1
  51. package/dist/runtime/components/news/DenseItem.vue +63 -54
  52. package/dist/runtime/components/news/ExpandedItem.vue +11 -17
  53. package/dist/runtime/components/news/RelatedItem.vue +4 -13
  54. package/dist/runtime/components/news/RowsItem.vue +21 -42
  55. package/dist/runtime/components/news/View.vue +7 -7
  56. package/dist/runtime/components/people/DenseItem.vue +16 -20
  57. package/dist/runtime/components/people/RelatedItem.vue +4 -14
  58. package/dist/runtime/components/people/RowsItem.vue +14 -23
  59. package/dist/runtime/components/projects/DenseItem.vue +17 -17
  60. package/dist/runtime/components/projects/RelatedItem.vue +4 -13
  61. package/dist/runtime/components/projects/RowsItem.vue +16 -16
  62. package/dist/runtime/components/projects/View.vue +6 -6
  63. package/dist/runtime/components/publications/DenseItem.vue +17 -15
  64. package/dist/runtime/components/publications/RelatedItem.vue +4 -13
  65. package/dist/runtime/components/publications/RowsItem.vue +18 -18
  66. package/dist/runtime/components/tags/DenseItem.vue +4 -0
  67. package/dist/runtime/components/tags/ExpandedItem.vue +4 -0
  68. package/dist/runtime/components/tags/RowsItem.vue +24 -7
  69. package/dist/runtime/components/tags/View.vue +4 -4
  70. package/dist/runtime/components/users/DenseItem.vue +24 -6
  71. package/dist/runtime/components/users/ExpandedItem.vue +5 -1
  72. package/dist/runtime/components/users/RowsItem.vue +25 -7
  73. package/dist/runtime/components/users/View.vue +4 -4
  74. package/dist/runtime/composables/useUtils.js +1 -1
  75. package/dist/runtime/plugins/pinia.js +5 -2
  76. package/dist/runtime/stores/root.d.ts +10 -9
  77. package/dist/runtime/stores/root.js +83 -119
  78. package/package.json +3 -4
@@ -3,31 +3,21 @@
3
3
  v-ripple
4
4
  no-gutters
5
5
  class="cursor-pointer highlight-on-hover"
6
- @click="
7
- $router.push(
8
- localePath({
9
- name: 'activities-projects-slug',
10
- params: { slug: item.slug[locale] },
11
- }),
12
- )
13
- "
6
+ @click="$router.push(pathPrefix)"
14
7
  >
15
8
  <v-col v-if="mdAndUp" align-self="center" cols="1">
16
9
  <MiscAtomsImageContainer
17
10
  cover
18
- :loading="$stores.projects.loading"
11
+ :loading="isLoading"
19
12
  :src="
20
13
  item && item.image && item.image.url ? item.image.url : '/default.png'
21
14
  "
22
15
  :ratio="1 / 1"
23
- :name="item.name"
24
- :slug="item.slug && item.slug[locale]"
25
- link="activities-projects-slug"
26
16
  :width="50"
27
17
  />
28
18
  </v-col>
29
19
  <v-col align-self="center" class="text-h5 dense pl-2">
30
- <v-skeleton-loader v-if="rootStore.loading" type="heading" />
20
+ <v-skeleton-loader v-if="isLoading" type="heading" />
31
21
  <span
32
22
  v-else
33
23
  v-html="
@@ -37,14 +27,14 @@
37
27
  "
38
28
  />
39
29
  <v-skeleton-loader
40
- v-if="rootStore.loading"
30
+ v-if="isLoading"
41
31
  :type="
42
32
  ['chip', 'chip@2', 'chip@3', 'chip@4', 'chip@4', 'chip@4'][
43
33
  ['xs', 'sm', 'md', 'lg', 'xl', 'xxl'].indexOf(name || 'md')
44
34
  ]
45
35
  "
46
36
  />
47
- <MiscMoleculesChipContainer :items="item.tags" size="small" />
37
+ <MiscMoleculesChipContainer :items="item.tags || []" size="small" />
48
38
 
49
39
  <MDC
50
40
  v-if="item.summary"
@@ -58,11 +48,10 @@
58
48
  <script setup>
59
49
  import { useDisplay } from "vuetify"
60
50
  import { useRootStore } from "../../stores/root"
61
- import { computed, useNuxtApp, useI18n, useLocalePath } from "#imports"
51
+ import { computed, useNuxtApp, useI18n } from "#imports"
62
52
 
63
53
  const { $stores } = useNuxtApp()
64
54
  const { name, mdAndUp } = useDisplay()
65
- const localePath = useLocalePath()
66
55
  const { locale } = useI18n()
67
56
 
68
57
  const rootStore = useRootStore()
@@ -75,6 +64,15 @@ const props = defineProps({
75
64
  type: Number,
76
65
  required: true,
77
66
  },
67
+ pathPrefix: {
68
+ type: String,
69
+ required: true,
70
+ },
71
+ loading: {
72
+ type: Boolean,
73
+ required: false,
74
+ default: false,
75
+ },
78
76
  })
79
77
  const eventCategory = computed(() => {
80
78
  if (props.item.category) {
@@ -83,4 +81,6 @@ const eventCategory = computed(() => {
83
81
  return "list.filters.news.category.others"
84
82
  }
85
83
  })
84
+
85
+ const isLoading = computed(() => props.loading)
86
86
  </script>
@@ -1,12 +1,5 @@
1
1
  <template>
2
- <v-sheet
3
- :to="
4
- localePath({
5
- name: 'activities-projects-slug',
6
- params: { slug: item.name },
7
- })
8
- "
9
- >
2
+ <v-sheet :to="pathPrefix">
10
3
  <v-row>
11
4
  <v-col v-if="lgAndUp" cols="3">
12
5
  <MiscAtomsImageContainer
@@ -14,8 +7,6 @@
14
7
  :src="item.image"
15
8
  :loading="rootStore.loading"
16
9
  :ratio="1 / 1"
17
- :link="item.name"
18
- name="activities-projects-slug"
19
10
  />
20
11
  </v-col>
21
12
  <v-col cols="12" lg="9">
@@ -36,11 +27,11 @@
36
27
  <script setup>
37
28
  import { useDisplay } from "vuetify"
38
29
  import { useRootStore } from "../../stores/root"
39
- import { useLocalePath } from "#imports"
40
30
 
41
- const localePath = useLocalePath()
42
31
  const rootStore = useRootStore()
43
32
  const { lgAndUp } = useDisplay()
44
33
 
45
- const props = defineProps({ item: { type: Object, required: true } })
34
+ const props = defineProps({
35
+ item: { type: Object, required: true },
36
+ })
46
37
  </script>
@@ -4,11 +4,8 @@
4
4
  <MiscAtomsImageContainer
5
5
  contain
6
6
  :src="item.image"
7
- :loading="$stores.projects.loading"
7
+ :loading="isLoading"
8
8
  :ratio="1 / 1"
9
- :title="item.name"
10
- link="activities-projects-slug"
11
- :slug="item.slug[locale]"
12
9
  />
13
10
  </v-col>
14
11
  <v-col
@@ -19,12 +16,10 @@
19
16
  lg="9"
20
17
  xl="10"
21
18
  class="px-6 cursor-pointer"
22
- @click="
23
- router.push(localePath('/activities/projects/' + item.slug[locale]))
24
- "
19
+ @click="router.push(pathPrefix)"
25
20
  >
26
21
  <v-skeleton-loader
27
- v-if="rootStore.loading"
22
+ v-if="isLoading"
28
23
  type="heading,ossein,text@8,ossein,button,button"
29
24
  />
30
25
 
@@ -49,12 +44,7 @@
49
44
  class="mt-4"
50
45
  variant="outlined"
51
46
  tile
52
- :to="
53
- localePath({
54
- name: 'project-slug',
55
- params: { slug: item.slug[locale] },
56
- })
57
- "
47
+ :to="pathPrefix"
58
48
  :size="
59
49
  ['small', 'small', 'small', 'default', 'default', 'large'][
60
50
  ['xs', 'sm', 'md', 'lg', 'xl', 'xxl'].indexOf(name || 'md')
@@ -85,7 +75,7 @@
85
75
  <script setup>
86
76
  import { useDisplay } from "vuetify"
87
77
  import { useRootStore } from "../../stores/root"
88
- import { useRouter, useLocalePath, useI18n } from "#imports"
78
+ import { useRouter, useI18n, computed } from "#imports"
89
79
 
90
80
  const { locale } = useI18n()
91
81
 
@@ -93,7 +83,6 @@ const { name } = useDisplay()
93
83
 
94
84
  const rootStore = useRootStore()
95
85
  const router = useRouter()
96
- const localePath = useLocalePath()
97
86
 
98
87
  const props = defineProps({
99
88
  item: {
@@ -103,7 +92,18 @@ const props = defineProps({
103
92
  },
104
93
  required: true,
105
94
  },
95
+ pathPrefix: {
96
+ type: String,
97
+ required: true,
98
+ },
99
+ loading: {
100
+ type: Boolean,
101
+ required: false,
102
+ default: false,
103
+ },
106
104
  })
105
+
106
+ const isLoading = computed(() => rootStore.loading || props.loading)
107
107
  </script>
108
108
 
109
109
  <style lang="scss"></style>
@@ -111,11 +111,11 @@
111
111
  </template>
112
112
 
113
113
  <script setup>
114
- import { useDisplay } from "vuetify";
115
- import { useNuxtApp } from "#imports";
114
+ import { useDisplay } from "vuetify"
115
+ import { useNuxtApp } from "#imports"
116
116
 
117
- const { $stores } = useNuxtApp();
118
- const { name } = useDisplay();
117
+ const { $stores } = useNuxtApp()
118
+ const { name } = useDisplay()
119
119
  const props = defineProps({
120
120
  item: {
121
121
  type: Object,
@@ -126,6 +126,6 @@ const props = defineProps({
126
126
  required: false,
127
127
  default: false,
128
128
  },
129
- });
130
- $stores.projects.loading = false;
129
+ })
130
+ $stores.projects.loading = false
131
131
  </script>
@@ -3,28 +3,23 @@
3
3
  v-ripple
4
4
  no-gutters
5
5
  class="cursor-pointer highlight-on-hover my-2"
6
- @click="
7
- $router.push(localePath('/activities/publications/' + item.slug[locale]))
8
- "
6
+ @click="$router.push(pathPrefix)"
9
7
  >
10
8
  <v-col v-if="mdAndUp" cols="1" class="align-center">
11
9
  <MiscAtomsImageContainer
12
10
  cover
13
- :loading="$stores.people.loading"
11
+ :loading="isLoading"
14
12
  :src="
15
13
  item && item.image && item.image.url ? item.image.url : '/default.png'
16
14
  "
17
15
  :ratio="1 / 1"
18
- :name="item.lastname + ' ' + item.firstname"
19
- :slug="item.slug && item.slug[locale]"
20
- link="activities-publications-slug"
21
16
  width="80px"
22
17
  />
23
18
  </v-col>
24
19
  <v-col class="pl-2">
25
20
  <div class="inline-flex flex-row flex-wrap">
26
21
  <v-skeleton-loader
27
- v-if="rootStore.loading"
22
+ v-if="isLoading"
28
23
  :type="
29
24
  ['chip', 'chip@2', 'chip@3', 'chip@4', 'chip@4', 'chip@4'][
30
25
  ['xs', 'sm', 'md', 'lg', 'xl', 'xxl'].indexOf(name || 'md')
@@ -52,11 +47,11 @@
52
47
  </v-chip>
53
48
  <MiscMoleculesChipContainer
54
49
  v-if="item.tags && item.tags.length"
55
- :items="item.tags"
50
+ :items="item.tags || []"
56
51
  size="small"
57
52
  />
58
53
  </template>
59
- <v-skeleton-loader v-if="rootStore.loading" type="heading" />
54
+ <v-skeleton-loader v-if="isLoading" type="heading" />
60
55
  <span
61
56
  v-else
62
57
  class="text-h5 dense paragraph"
@@ -81,12 +76,10 @@
81
76
  <script setup>
82
77
  import { useDisplay } from "vuetify"
83
78
  import { useRootStore } from "../../stores/root"
84
- import { computed, useNuxtApp, useI18n, useLocalePath } from "#imports"
79
+ import { computed, useI18n } from "#imports"
85
80
  const rootStore = useRootStore()
86
81
 
87
- const { $stores } = useNuxtApp()
88
82
  const { name, mdAndUp } = useDisplay()
89
- const localePath = useLocalePath()
90
83
  const { locale } = useI18n()
91
84
  const props = defineProps({
92
85
  item: {
@@ -97,11 +90,19 @@ const props = defineProps({
97
90
  type: Number,
98
91
  required: true,
99
92
  },
93
+ pathPrefix: {
94
+ type: String,
95
+ required: true,
96
+ },
97
+ loading: {
98
+ type: Boolean,
99
+ required: false,
100
+ default: false,
101
+ },
100
102
  })
101
103
 
102
104
  const eventCategory = computed(() => {
103
105
  if (props.item.category) {
104
- console.log("props.item.category: ", props.item.category)
105
106
  return "list.filters.publications.category." + props.item.category
106
107
  } else {
107
108
  return false
@@ -109,10 +110,11 @@ const eventCategory = computed(() => {
109
110
  })
110
111
  const eventType = computed(() => {
111
112
  if (props.item.type) {
112
- console.log("props.item.type: ", props.item.type)
113
113
  return "list.filters.publications.type." + props.item.type
114
114
  } else {
115
115
  return false
116
116
  }
117
117
  })
118
+
119
+ const isLoading = computed(() => props.loading)
118
120
  </script>
@@ -1,12 +1,5 @@
1
1
  <template>
2
- <v-sheet
3
- :to="
4
- localePath({
5
- name: 'activities-publicationss-slug',
6
- params: { slug: item.name },
7
- })
8
- "
9
- >
2
+ <v-sheet>
10
3
  <v-row>
11
4
  <v-col v-if="lgAndUp" cols="3">
12
5
  <MiscAtomsImageContainer
@@ -14,8 +7,6 @@
14
7
  :src="item.image"
15
8
  :loading="rootStore.loading"
16
9
  :ratio="1 / 1"
17
- :link="item.name"
18
- name="activities-publicationss-slug"
19
10
  />
20
11
  </v-col>
21
12
  <v-col cols="12" lg="9">
@@ -36,11 +27,11 @@
36
27
  <script setup>
37
28
  import { useDisplay } from "vuetify"
38
29
  import { useRootStore } from "../../stores/root"
39
- import { useLocalePath } from "#imports"
40
30
 
41
- const localePath = useLocalePath()
42
31
  const rootStore = useRootStore()
43
32
  const { lgAndUp } = useDisplay()
44
33
 
45
- const props = defineProps({ item: { type: Object, required: true } })
34
+ const props = defineProps({
35
+ item: { type: Object, required: true },
36
+ })
46
37
  </script>
@@ -3,11 +3,8 @@
3
3
  <MiscAtomsImageContainer
4
4
  contain
5
5
  :src="item.image.url ? item.image : '/default.png'"
6
- :loading="$stores.publications.loading"
6
+ :loading="isLoading"
7
7
  :ratio="1 / 1"
8
- :title="item.name"
9
- link="activities-publications-slug"
10
- :slug="item.slug[locale]"
11
8
  />
12
9
  </v-col>
13
10
  <v-col
@@ -18,13 +15,11 @@
18
15
  lg="9"
19
16
  xl="10"
20
17
  class="px-6 cursor-pointer"
21
- @click="
22
- router.push(localePath('/activities/publications/' + item.slug[locale]))
23
- "
18
+ @click="router.push(pathPrefix)"
24
19
  >
25
20
  <div>
26
21
  <v-skeleton-loader
27
- v-if="$stores.publications.loading"
22
+ v-if="isLoading"
28
23
  type="heading,ossein,text@8,ossein,button,button"
29
24
  />
30
25
 
@@ -49,12 +44,7 @@
49
44
  class="mt-4"
50
45
  variant="outlined"
51
46
  tile
52
- :to="
53
- localePath({
54
- name: 'publications-slug',
55
- params: { slug: item.slug[locale] },
56
- })
57
- "
47
+ :to="pathPrefix"
58
48
  :size="
59
49
  ['small', 'small', 'small', 'default', 'default', 'large'][
60
50
  ['xs', 'sm', 'md', 'lg', 'xl', 'xxl'].indexOf(name || 'md')
@@ -87,13 +77,12 @@
87
77
 
88
78
  <script setup>
89
79
  import { useDisplay } from "vuetify"
90
- import { useNuxtApp, useI18n, useLocalePath, useRouter } from "#imports"
80
+ import { useRouter, computed } from "#imports"
81
+ import { useRootStore } from "../../stores/root"
91
82
 
92
83
  const { name } = useDisplay()
93
- const { locale } = useI18n()
94
- const { $stores } = useNuxtApp()
84
+ const rootStore = useRootStore()
95
85
  const router = useRouter()
96
- const localePath = useLocalePath()
97
86
  const props = defineProps({
98
87
  item: {
99
88
  type: Object,
@@ -102,7 +91,18 @@ const props = defineProps({
102
91
  },
103
92
  required: true,
104
93
  },
94
+ pathPrefix: {
95
+ type: String,
96
+ required: true,
97
+ },
98
+ loading: {
99
+ type: Boolean,
100
+ required: false,
101
+ default: false,
102
+ },
105
103
  })
104
+
105
+ const isLoading = computed(() => rootStore.loading || props.loading)
106
106
  </script>
107
107
 
108
108
  <style lang="scss"></style>
@@ -8,6 +8,10 @@ defineProps({
8
8
  type: Object,
9
9
  required: true,
10
10
  },
11
+ pathPrefix: {
12
+ type: String,
13
+ required: true,
14
+ },
11
15
  })
12
16
  </script>
13
17
 
@@ -10,6 +10,10 @@ const props = defineProps({
10
10
  type: Object,
11
11
  required: true,
12
12
  },
13
+ pathPrefix: {
14
+ type: String,
15
+ required: true,
16
+ },
13
17
  })
14
18
  </script>
15
19
 
@@ -1,14 +1,31 @@
1
1
  <template>
2
- {{ item }}
2
+ <v-row
3
+ class="highlight-on-hover pa-3"
4
+ no-gutters
5
+ @click="$router.push(pathPrefix)"
6
+ >
7
+ <v-col cols="12" class="px-6">
8
+ <v-skeleton-loader v-if="isLoading" type="heading, text@6" />
9
+ <template v-else>
10
+ <div class="text-h6">{{ item.name }}</div>
11
+ </template>
12
+ </v-col>
13
+ </v-row>
14
+ <v-divider />
3
15
  </template>
4
16
 
5
17
  <script setup>
6
- defineProps({
7
- item: {
8
- type: Object,
9
- required: true,
10
- },
11
- });
18
+ import { computed } from "#imports"
19
+ import { useRootStore } from "../../stores/root"
20
+
21
+ const rootStore = useRootStore()
22
+ const props = defineProps({
23
+ item: { type: Object, required: true },
24
+ pathPrefix: { type: String, required: true },
25
+ loading: { type: Boolean, default: false },
26
+ })
27
+
28
+ const isLoading = computed(() => rootStore.loading || props.loading)
12
29
  </script>
13
30
 
14
31
  <style></style>
@@ -3,9 +3,9 @@
3
3
  </template>
4
4
 
5
5
  <script setup>
6
- import { useNuxtApp } from "#imports";
6
+ import { useNuxtApp } from "#imports"
7
7
 
8
- const { $stores } = useNuxtApp();
8
+ const { $stores } = useNuxtApp()
9
9
  defineProps({
10
10
  item: {
11
11
  type: Object,
@@ -16,7 +16,7 @@ defineProps({
16
16
  required: false,
17
17
  default: false,
18
18
  },
19
- });
19
+ })
20
20
 
21
- $stores.tags.loading = false;
21
+ $stores.tags.loading = false
22
22
  </script>
@@ -1,14 +1,32 @@
1
1
  <template>
2
- {{ item }}
2
+ <v-row
3
+ class="my-2 highlight-on-hover"
4
+ no-gutters
5
+ @click="$router.push(pathPrefix)"
6
+ >
7
+ <v-col cols="12" class="px-4">
8
+ <v-skeleton-loader v-if="isLoading" type="heading, text@6" />
9
+ <template v-else>
10
+ <div class="text-h6">{{ item.name }}</div>
11
+ <div v-if="item.email" class="text-body-2 mt-1">{{ item.email }}</div>
12
+ </template>
13
+ </v-col>
14
+ </v-row>
15
+ <v-divider />
3
16
  </template>
4
17
 
5
18
  <script setup>
6
- defineProps({
7
- item: {
8
- type: Object,
9
- required: true,
10
- },
19
+ import { computed } from "#imports"
20
+ import { useRootStore } from "../../stores/root"
21
+
22
+ const rootStore = useRootStore()
23
+ const props = defineProps({
24
+ item: { type: Object, required: true },
25
+ pathPrefix: { type: String, required: true },
26
+ loading: { type: Boolean, default: false },
11
27
  })
28
+
29
+ const isLoading = computed(() => rootStore.loading || props.loading)
12
30
  </script>
13
31
 
14
32
  <style></style>
@@ -10,7 +10,11 @@ const props = defineProps({
10
10
  type: Object,
11
11
  required: true,
12
12
  },
13
- });
13
+ pathPrefix: {
14
+ type: String,
15
+ required: true,
16
+ },
17
+ })
14
18
  </script>
15
19
 
16
20
  <style></style>
@@ -1,14 +1,32 @@
1
1
  <template>
2
- {{ item }}
2
+ <v-row
3
+ class="highlight-on-hover pa-3"
4
+ no-gutters
5
+ @click="$router.push(pathPrefix)"
6
+ >
7
+ <v-col cols="12" class="px-6">
8
+ <v-skeleton-loader v-if="isLoading" type="heading, text@8, button" />
9
+ <template v-else>
10
+ <div class="text-h6">{{ item.name }}</div>
11
+ <div v-if="item.email" class="text-body-2 mt-1">{{ item.email }}</div>
12
+ </template>
13
+ </v-col>
14
+ </v-row>
15
+ <v-divider />
3
16
  </template>
4
17
 
5
18
  <script setup>
6
- defineProps({
7
- item: {
8
- type: Object,
9
- required: true,
10
- },
11
- });
19
+ import { computed } from "#imports"
20
+ import { useRootStore } from "../../stores/root"
21
+
22
+ const rootStore = useRootStore()
23
+ const props = defineProps({
24
+ item: { type: Object, required: true },
25
+ pathPrefix: { type: String, required: true },
26
+ loading: { type: Boolean, default: false },
27
+ })
28
+
29
+ const isLoading = computed(() => rootStore.loading || props.loading)
12
30
  </script>
13
31
 
14
32
  <style></style>
@@ -3,9 +3,9 @@
3
3
  </template>
4
4
 
5
5
  <script setup>
6
- import { useNuxtApp } from "#imports";
6
+ import { useNuxtApp } from "#imports"
7
7
 
8
- const { $stores } = useNuxtApp();
8
+ const { $stores } = useNuxtApp()
9
9
  defineProps({
10
10
  item: {
11
11
  type: Object,
@@ -16,7 +16,7 @@ defineProps({
16
16
  required: false,
17
17
  default: false,
18
18
  },
19
- });
19
+ })
20
20
 
21
- $stores.users.loading = false;
21
+ $stores.users.loading = false
22
22
  </script>
@@ -49,7 +49,7 @@ export const formatDateValue = (date, locale) => {
49
49
  export const highlightAndTruncate = (stop, text, query) => {
50
50
  try {
51
51
  if (!text) {
52
- return "toto";
52
+ return "";
53
53
  }
54
54
  if (query?.length && query[0]?.length) {
55
55
  if (text.length > stop) {
@@ -1,6 +1,6 @@
1
1
  import { createDynamicStore } from "../stores/factory.js";
2
2
  import { useRootStore } from "../stores/root.js";
3
- import { defineNuxtPlugin, useAppConfig } from "#app";
3
+ import { defineNuxtPlugin, useAppConfig } from "#imports";
4
4
  export default defineNuxtPlugin(async (nuxtApp) => {
5
5
  const appConfig = useAppConfig();
6
6
  const moduleImports = {
@@ -107,6 +107,8 @@ export default defineNuxtPlugin(async (nuxtApp) => {
107
107
  const stores = {};
108
108
  const queries = {};
109
109
  const models = {};
110
+ const rootStore = useRootStore();
111
+ rootStore.setLoading(true);
110
112
  const builtFilters = await import("../public/filters.json");
111
113
  console.log("INITIALIZING STORES");
112
114
  await Promise.all(
@@ -125,7 +127,8 @@ export default defineNuxtPlugin(async (nuxtApp) => {
125
127
  }
126
128
  })
127
129
  );
128
- const rootStore = useRootStore();
130
+ console.log(" STORES LOADED");
131
+ rootStore.setLoading(false);
129
132
  nuxtApp.provide("models", models);
130
133
  nuxtApp.provide("rootStore", rootStore);
131
134
  nuxtApp.provide("stores", stores);