@paris-ias/list 1.0.111 → 1.0.113

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 (163) hide show
  1. package/dist/module.json +1 -1
  2. package/dist/runtime/components/events/DenseItem.vue +24 -15
  3. package/dist/runtime/components/fellowships/DenseItem.vue +1 -1
  4. package/dist/runtime/components/list/atoms/SearchInput.vue +4 -2
  5. package/dist/runtime/components/list/molecules/Pagination.vue +2 -0
  6. package/dist/runtime/components/list/organisms/List.vue +16 -2
  7. package/dist/runtime/components/list/views/Dense.vue +0 -1
  8. package/dist/runtime/components/news/DenseItem.vue +24 -23
  9. package/dist/runtime/components/people/Badges.vue +74 -0
  10. package/dist/runtime/components/people/DenseItem.vue +11 -8
  11. package/dist/runtime/components/people/RowsItem.vue +2 -2
  12. package/dist/runtime/components/people/View.vue +1 -1
  13. package/dist/runtime/components/publications/DenseItem.vue +14 -7
  14. package/dist/runtime/graphql/list/publications.gql +2 -0
  15. package/dist/runtime/runtime/components/actions/ExpandedItem.vue +14 -0
  16. package/dist/runtime/runtime/components/actions/RowsItem.vue +12 -0
  17. package/dist/runtime/runtime/components/actions/View.vue +20 -0
  18. package/dist/runtime/runtime/components/affiliations/ExpandedItem.vue +14 -0
  19. package/dist/runtime/runtime/components/affiliations/RowsItem.vue +12 -0
  20. package/dist/runtime/runtime/components/affiliations/View.vue +20 -0
  21. package/dist/runtime/runtime/components/apps/ExpandedItem.vue +14 -0
  22. package/dist/runtime/runtime/components/apps/RowsItem.vue +12 -0
  23. package/dist/runtime/runtime/components/apps/View.vue +20 -0
  24. package/dist/runtime/runtime/components/disciplines/ExpandedItem.vue +14 -0
  25. package/dist/runtime/runtime/components/disciplines/RowsItem.vue +12 -0
  26. package/dist/runtime/runtime/components/disciplines/View.vue +20 -0
  27. package/dist/runtime/runtime/components/events/Badges.vue +73 -0
  28. package/dist/runtime/runtime/components/events/DateTimePlace.vue +77 -0
  29. package/dist/runtime/runtime/components/events/DenseItem.vue +60 -0
  30. package/dist/runtime/runtime/components/events/ExpandedItem.vue +9 -0
  31. package/dist/runtime/runtime/components/events/RegisterModal.vue +50 -0
  32. package/dist/runtime/runtime/components/events/RelatedItem.vue +44 -0
  33. package/dist/runtime/runtime/components/events/RowsItem.vue +118 -0
  34. package/dist/runtime/runtime/components/events/SlidingItem.vue +63 -0
  35. package/dist/runtime/runtime/components/events/View.vue +333 -0
  36. package/dist/runtime/runtime/components/fellowships/Badges.vue +47 -0
  37. package/dist/runtime/runtime/components/fellowships/DenseItem.vue +42 -0
  38. package/dist/runtime/runtime/components/fellowships/ExpandedItem.vue +7 -0
  39. package/dist/runtime/runtime/components/fellowships/RegisterModal.vue +41 -0
  40. package/dist/runtime/runtime/components/fellowships/RowsItem.vue +58 -0
  41. package/dist/runtime/runtime/components/fellowships/View.vue +203 -0
  42. package/dist/runtime/runtime/components/files/ExpandedItem.vue +14 -0
  43. package/dist/runtime/runtime/components/files/RowsItem.vue +12 -0
  44. package/dist/runtime/runtime/components/files/View.vue +20 -0
  45. package/dist/runtime/runtime/components/list/atoms/FiltersMenu.vue +44 -0
  46. package/dist/runtime/runtime/components/list/atoms/ResetButton.vue +33 -0
  47. package/dist/runtime/runtime/components/list/atoms/ResultsList.vue +27 -0
  48. package/dist/runtime/runtime/components/list/atoms/SearchInput.vue +59 -0
  49. package/dist/runtime/runtime/components/list/atoms/SearchItem.vue +65 -0
  50. package/dist/runtime/runtime/components/list/atoms/SearchString.vue +160 -0
  51. package/dist/runtime/runtime/components/list/atoms/SortMenu.vue +80 -0
  52. package/dist/runtime/runtime/components/list/atoms/ViewMenu.vue +63 -0
  53. package/dist/runtime/runtime/components/list/atoms/itemsPerPage.vue +33 -0
  54. package/dist/runtime/runtime/components/list/inputs/AutoComplete.vue +24 -0
  55. package/dist/runtime/runtime/components/list/inputs/BooleanSwitch.vue +20 -0
  56. package/dist/runtime/runtime/components/list/inputs/Checkbox.vue +20 -0
  57. package/dist/runtime/runtime/components/list/inputs/Select.vue +28 -0
  58. package/dist/runtime/runtime/components/list/molecules/Filters.vue +98 -0
  59. package/dist/runtime/runtime/components/list/molecules/GlobalSearchInput.vue +131 -0
  60. package/dist/runtime/runtime/components/list/molecules/Header.vue +51 -0
  61. package/dist/runtime/runtime/components/list/molecules/Pagination.vue +194 -0
  62. package/dist/runtime/runtime/components/list/molecules/ResultsContainer.vue +78 -0
  63. package/dist/runtime/runtime/components/list/organisms/List.vue +110 -0
  64. package/dist/runtime/runtime/components/list/organisms/Results.vue +72 -0
  65. package/dist/runtime/runtime/components/list/organisms/Slider.vue +180 -0
  66. package/dist/runtime/runtime/components/list/views/Dense.vue +12 -0
  67. package/dist/runtime/runtime/components/list/views/Expanded.vue +10 -0
  68. package/dist/runtime/runtime/components/list/views/Grid.vue +13 -0
  69. package/dist/runtime/runtime/components/list/views/Rows.vue +12 -0
  70. package/dist/runtime/runtime/components/list/views/Slider.vue +147 -0
  71. package/dist/runtime/runtime/components/list/views/Table.vue +13 -0
  72. package/dist/runtime/runtime/components/mailing/ExpandedItem.vue +14 -0
  73. package/dist/runtime/runtime/components/mailing/RowsItem.vue +12 -0
  74. package/dist/runtime/runtime/components/mailing/View.vue +20 -0
  75. package/dist/runtime/runtime/components/misc/atoms/DateStamp.vue +101 -0
  76. package/dist/runtime/runtime/components/misc/atoms/ImageContainer.vue +127 -0
  77. package/dist/runtime/runtime/components/misc/atoms/ShareMenu.vue +61 -0
  78. package/dist/runtime/runtime/components/misc/atoms/Socials.vue +120 -0
  79. package/dist/runtime/runtime/components/misc/molecules/ChipContainer.vue +31 -0
  80. package/dist/runtime/runtime/components/misc/molecules/Related.vue +28 -0
  81. package/dist/runtime/runtime/components/misc/molecules/RelatedItems.vue +27 -0
  82. package/dist/runtime/runtime/components/misc/molecules/SearchItem.vue +26 -0
  83. package/dist/runtime/runtime/components/news/DenseItem.vue +73 -0
  84. package/dist/runtime/runtime/components/news/ExpandedItem.vue +145 -0
  85. package/dist/runtime/runtime/components/news/Header.vue +7 -0
  86. package/dist/runtime/runtime/components/news/RelatedItem.vue +44 -0
  87. package/dist/runtime/runtime/components/news/RowsItem.vue +182 -0
  88. package/dist/runtime/runtime/components/news/View.vue +174 -0
  89. package/dist/runtime/runtime/components/people/DenseItem.vue +60 -0
  90. package/dist/runtime/runtime/components/people/ExpandedItem.vue +14 -0
  91. package/dist/runtime/runtime/components/people/RelatedItem.vue +41 -0
  92. package/dist/runtime/runtime/components/people/RowsItem.vue +93 -0
  93. package/dist/runtime/runtime/components/people/View.vue +172 -0
  94. package/dist/runtime/runtime/components/projects/DenseItem.vue +77 -0
  95. package/dist/runtime/runtime/components/projects/ExpandedItem.vue +12 -0
  96. package/dist/runtime/runtime/components/projects/RelatedItem.vue +44 -0
  97. package/dist/runtime/runtime/components/projects/RowsItem.vue +103 -0
  98. package/dist/runtime/runtime/components/projects/View.vue +130 -0
  99. package/dist/runtime/runtime/components/publications/DenseItem.vue +89 -0
  100. package/dist/runtime/runtime/components/publications/RelatedItem.vue +44 -0
  101. package/dist/runtime/runtime/components/publications/RowsItem.vue +105 -0
  102. package/dist/runtime/runtime/components/publications/View.vue +132 -0
  103. package/dist/runtime/runtime/components/tags/ExpandedItem.vue +14 -0
  104. package/dist/runtime/runtime/components/tags/RowsItem.vue +12 -0
  105. package/dist/runtime/runtime/components/tags/View.vue +20 -0
  106. package/dist/runtime/runtime/components/users/ExpandedItem.vue +14 -0
  107. package/dist/runtime/runtime/components/users/RowsItem.vue +12 -0
  108. package/dist/runtime/runtime/components/users/View.vue +20 -0
  109. package/dist/runtime/runtime/composables/useFetchItem.d.ts +6 -0
  110. package/dist/runtime/runtime/composables/useFetchItem.js +49 -0
  111. package/dist/runtime/runtime/composables/useIcons.d.ts +1 -0
  112. package/dist/runtime/runtime/composables/useIcons.js +30 -0
  113. package/dist/runtime/runtime/composables/useUtils.d.ts +12 -0
  114. package/dist/runtime/runtime/composables/useUtils.js +48 -0
  115. package/dist/runtime/runtime/graphql/buildFiltersValues.gql +35 -0
  116. package/dist/runtime/runtime/graphql/item/action.gql +22 -0
  117. package/dist/runtime/runtime/graphql/item/affiliations.gql +37 -0
  118. package/dist/runtime/runtime/graphql/item/apps.gql +34 -0
  119. package/dist/runtime/runtime/graphql/item/disciplines.gql +17 -0
  120. package/dist/runtime/runtime/graphql/item/events.gql +120 -0
  121. package/dist/runtime/runtime/graphql/item/fellowships.gql +164 -0
  122. package/dist/runtime/runtime/graphql/item/files.gql +25 -0
  123. package/dist/runtime/runtime/graphql/item/mailing.gql +10 -0
  124. package/dist/runtime/runtime/graphql/item/news.gql +129 -0
  125. package/dist/runtime/runtime/graphql/item/people.gql +174 -0
  126. package/dist/runtime/runtime/graphql/item/projects.gql +171 -0
  127. package/dist/runtime/runtime/graphql/item/publications.gql +169 -0
  128. package/dist/runtime/runtime/graphql/item/tags.gql +13 -0
  129. package/dist/runtime/runtime/graphql/item/users.gql +14 -0
  130. package/dist/runtime/runtime/graphql/list/action.gql +31 -0
  131. package/dist/runtime/runtime/graphql/list/affiliations.gql +42 -0
  132. package/dist/runtime/runtime/graphql/list/apps.gql +42 -0
  133. package/dist/runtime/runtime/graphql/list/disciplines.gql +22 -0
  134. package/dist/runtime/runtime/graphql/list/events.gql +44 -0
  135. package/dist/runtime/runtime/graphql/list/fellowships.gql +53 -0
  136. package/dist/runtime/runtime/graphql/list/files.gql +37 -0
  137. package/dist/runtime/runtime/graphql/list/mailing.gql +22 -0
  138. package/dist/runtime/runtime/graphql/list/news.gql +40 -0
  139. package/dist/runtime/runtime/graphql/list/people.gql +50 -0
  140. package/dist/runtime/runtime/graphql/list/projects.gql +37 -0
  141. package/dist/runtime/runtime/graphql/list/publications.gql +38 -0
  142. package/dist/runtime/runtime/graphql/list/search.gql +161 -0
  143. package/dist/runtime/runtime/graphql/list/tags.gql +22 -0
  144. package/dist/runtime/runtime/graphql/list/users.gql +38 -0
  145. package/dist/runtime/runtime/graphql/login.gql +0 -0
  146. package/dist/runtime/runtime/plugins/pinia.d.ts +2 -0
  147. package/dist/runtime/runtime/plugins/pinia.js +134 -0
  148. package/dist/runtime/runtime/plugins/vuetify.d.ts +2 -0
  149. package/dist/runtime/runtime/plugins/vuetify.js +21 -0
  150. package/dist/runtime/runtime/public/default.png +0 -0
  151. package/dist/runtime/runtime/public/filters.json +72 -0
  152. package/dist/runtime/runtime/server/tsconfig.json +3 -0
  153. package/dist/runtime/runtime/stores/factory.d.ts +25 -0
  154. package/dist/runtime/runtime/stores/factory.js +19 -0
  155. package/dist/runtime/runtime/stores/root.d.ts +60 -0
  156. package/dist/runtime/runtime/stores/root.js +315 -0
  157. package/dist/runtime/runtime/translations/en.json +350 -0
  158. package/dist/runtime/runtime/translations/fr.json +349 -0
  159. package/dist/runtime/runtime/types/imports.d.ts +13 -0
  160. package/dist/runtime/runtime/types/stores.d.ts +11 -0
  161. package/dist/runtime/translations/en.json +1 -1
  162. package/package.json +2 -2
  163. /package/dist/runtime/{components → runtime/components}/people/GroupBadges.vue +0 -0
@@ -0,0 +1,130 @@
1
+ <template>
2
+ <!-- {{ name }} -->
3
+ <v-row justify="center">
4
+ <v-col cols="12" sm="11" md="8" lg="8" xl="6">
5
+ <v-row class="justify-center">
6
+ <v-col cols="12" sm="10" md="6" lg="4" xl="3" class="text-center">
7
+ <!-- PROJECT IMAGE -->
8
+ <v-skeleton-loader v-if="loading" height="100%" type="image" />
9
+
10
+ <MiscAtomsImageContainer
11
+ v-else
12
+ contain
13
+ :loading="loading"
14
+ :src="item.image.url ? item.image : '/default.png'"
15
+ :ratio="1 / 1"
16
+ />
17
+ </v-col>
18
+ </v-row>
19
+ <v-skeleton-loader
20
+ v-if="loading"
21
+ :type="
22
+ [
23
+ 'avatar, paragraph',
24
+ 'avatar, paragraph',
25
+ 'heading, ossein, avatar, text, ossein, chip@3',
26
+ 'heading, ossein, avatar, text, ossein, chip@3',
27
+ 'heading, ossein, avatar, text, ossein, chip@3',
28
+ 'heading',
29
+ ][['xs', 'sm', 'md', 'lg', 'xl', 'xxl'].indexOf(name || 'md')]
30
+ "
31
+ />
32
+
33
+ <div v-else class="d-flex align-center flex-column mt-12">
34
+ <div class="d-flex text-center text-wrap text-h3 text-black">
35
+ {{ item.name }}
36
+ </div>
37
+ <v-divider width="154px" class="mb-1 mt-6" />
38
+ <v-divider width="154px" />
39
+ <div
40
+ v-if="!loading"
41
+ class="d-flex text-center text-wrap text-h5 text-black mt-6"
42
+ >
43
+ <MDC v-if="item.subtitle" :value="item.subtitle" />
44
+ </div>
45
+ <MiscMoleculesChipContainer
46
+ v-if="item && item.tags"
47
+ :items="item.tags"
48
+ class="py-6 mt-4 align-self-center"
49
+ />
50
+ <v-btn-toggle variant="outlined">
51
+ <MiscAtomsShareMenu :item class="mt-6" />
52
+ </v-btn-toggle>
53
+ <v-btn
54
+ v-if="item.url"
55
+ class="my-6 d-flex"
56
+ variant="outlined"
57
+ :href="item.url"
58
+ target="_blank"
59
+ prepend-icon="mdi-link"
60
+ >
61
+ {{ $t("visit-this-project-website") }}
62
+ </v-btn>
63
+ </div>
64
+
65
+ <!-- DIVIDERS -->
66
+ <v-responsive class="mx-auto my-9" width="120">
67
+ <v-divider class="mb-1" />
68
+ <v-divider />
69
+ </v-responsive>
70
+
71
+ <!-- PROJECT DESCRIPTION -->
72
+ <v-skeleton-loader
73
+ v-if="loading"
74
+ :type="
75
+ ['text@50', 'text@50', 'text@50', 'text@50', 'text@50', 'text@50'][
76
+ ['xs', 'sm', 'md', 'lg', 'xl', 'xxl'].indexOf(name || 'md')
77
+ ]
78
+ "
79
+ />
80
+ <div v-if="item.description" class="mt-md-n2 mx-10 mx-md-0">
81
+ <MDC :value="item.description" />
82
+ </div>
83
+ </v-col>
84
+ </v-row>
85
+
86
+ <!-- DIVIDERS -->
87
+ <v-responsive class="mx-auto my-9" width="120">
88
+ <v-divider class="mb-1" />
89
+ <v-divider />
90
+ </v-responsive>
91
+ <!-- <MiscAtomsSlidingCarousel
92
+ v-if="item && item.gallery && item.gallery.length"
93
+ ref="MiscAtomsImage"
94
+ key="MiscAtomsImage"
95
+ :items="item.gallery"
96
+ type="MiscAtomsImage"
97
+ :loading="false"
98
+ :more="false"
99
+ >
100
+ <div :class="mdAndUp ? 'text-h5' : 'text-h6'">
101
+ {{ $t("gallery") }}
102
+ </div>
103
+ </MiscAtomsSlidingCarousel> -->
104
+ <!-- DIVIDERS -->
105
+ <v-responsive class="mx-auto my-9" width="120">
106
+ <v-divider class="mb-1" />
107
+ <v-divider />
108
+ </v-responsive>
109
+
110
+ <MiscMoleculesRelated v-if="item && item.related" :related="item.related" />
111
+ </template>
112
+
113
+ <script setup>
114
+ import { useDisplay } from "vuetify";
115
+ import { useNuxtApp } from "#imports";
116
+ const { $stores } = useNuxtApp();
117
+ const { name } = useDisplay();
118
+ const props = defineProps({
119
+ item: {
120
+ type: Object,
121
+ required: true
122
+ },
123
+ loading: {
124
+ type: Boolean,
125
+ required: false,
126
+ default: false
127
+ }
128
+ });
129
+ $stores.projects.loading = false;
130
+ </script>
@@ -0,0 +1,89 @@
1
+ <template>
2
+ <v-row
3
+ v-ripple
4
+ no-gutters
5
+ class="cursor-pointer highlight-on-hover my-2"
6
+ @click="
7
+ $router.push(localePath('/activities/publications/' + item.slug[locale]))
8
+ "
9
+ >
10
+ <v-col v-if="mdAndUp" align-self="center" cols="1">
11
+ <MiscAtomsImageContainer
12
+ cover
13
+ :loading="$stores.people.loading"
14
+ :src="item.image.url ? item.image : '/default.png'"
15
+ :ratio="1 / 1"
16
+ :name="item.lastname + ' ' + item.firstname"
17
+ :slug="item.slug[locale]"
18
+ link="activities-publications-slug"
19
+ width="80px"
20
+ />
21
+ </v-col>
22
+ <v-col align-self="center" class="text-h5 dense pl-2">
23
+ <v-skeleton-loader v-if="rootStore.loading" type="heading" />
24
+ <template v-else>
25
+ {{ item.name }}
26
+ <div class="text-body-2">
27
+ {{ item.summary }}
28
+ </div>
29
+ </template>
30
+ </v-col>
31
+
32
+ <v-col align-self="center">
33
+ <v-skeleton-loader
34
+ v-if="rootStore.loading"
35
+ :type="
36
+ ['chip', 'chip@2', 'chip@3', 'chip@4', 'chip@4', 'chip@4'][
37
+ ['xs', 'sm', 'md', 'lg', 'xl', 'xxl'].indexOf(name || 'md')
38
+ ]
39
+ "
40
+ />
41
+
42
+ <template v-else>
43
+ <v-chip class="ma-2" style="background-color: white; color: black">
44
+ {{ $t(eventCategory) }} </v-chip
45
+ ><v-chip class="ma-2" style="background-color: white; color: black">
46
+ {{ $t(eventType) }}
47
+ </v-chip>
48
+ <MiscMoleculesChipContainer :items="item.tags" size="small" />
49
+ </template>
50
+ </v-col>
51
+ </v-row>
52
+ </template>
53
+
54
+ <script setup>
55
+ import { useDisplay } from "vuetify";
56
+ import { useRootStore } from "../../stores/root";
57
+ import { computed, useNuxtApp, useI18n, useLocalePath } from "#imports";
58
+ const { $stores } = useNuxtApp();
59
+ const { name, mdAndUp } = useDisplay();
60
+ const localePath = useLocalePath();
61
+ const { locale } = useI18n();
62
+ const rootStore = useRootStore();
63
+ const props = defineProps({
64
+ item: {
65
+ type: Object,
66
+ required: true
67
+ },
68
+ index: {
69
+ type: Number,
70
+ required: true
71
+ }
72
+ });
73
+ const eventCategory = computed(() => {
74
+ if (props.item.category) {
75
+ console.log("props.item.category: ", props.item.category);
76
+ return "list.filters.publications.category." + props.item.category;
77
+ } else {
78
+ return "list.filters.publications.category.OTHERS";
79
+ }
80
+ });
81
+ const eventType = computed(() => {
82
+ if (props.item.type) {
83
+ console.log("props.item.type: ", props.item.type);
84
+ return "list.filters.publications.type." + props.item.type;
85
+ } else {
86
+ return "list.filters.publications.type.OTHERS";
87
+ }
88
+ });
89
+ </script>
@@ -0,0 +1,44 @@
1
+ <template>
2
+ <v-sheet
3
+ :to="
4
+ localePath({
5
+ name: 'activities-publicationss-slug',
6
+ params: { slug: item.name },
7
+ })
8
+ "
9
+ >
10
+ <v-row>
11
+ <v-col v-if="lgAndUp" cols="3">
12
+ <MiscAtomsImageContainer
13
+ contain
14
+ :src="item.image"
15
+ :loading="rootStore.loading"
16
+ :ratio="1 / 1"
17
+ :link="item.name"
18
+ name="activities-publicationss-slug"
19
+ />
20
+ </v-col>
21
+ <v-col cols="12" lg="9">
22
+ <v-skeleton-loader v-if="rootStore.loading" type="heading, text@3" />
23
+ <template v-else>
24
+ <div class="text-h6">
25
+ {{ item.name }}
26
+ </div>
27
+ <div class="text-body-1">
28
+ {{ item.shortDescription }}
29
+ </div>
30
+ </template>
31
+ </v-col>
32
+ </v-row>
33
+ </v-sheet>
34
+ </template>
35
+
36
+ <script setup>
37
+ import { useDisplay } from "vuetify";
38
+ import { useRootStore } from "../../stores/root";
39
+ import { useLocalePath } from "#imports";
40
+ const localePath = useLocalePath();
41
+ const rootStore = useRootStore();
42
+ const { lgAndUp } = useDisplay();
43
+ const props = defineProps({ item: { type: Object, required: true } });
44
+ </script>
@@ -0,0 +1,105 @@
1
+ <template>
2
+ <v-col v-ripple cols="12" sm="6" md="4" lg="3" xl="2">
3
+ <MiscAtomsImageContainer
4
+ contain
5
+ :src="item.image.url ? item.image : '/default.png'"
6
+ :loading="$stores.publications.loading"
7
+ :ratio="1 / 1"
8
+ :title="item.name"
9
+ link="activities-publications-slug"
10
+ :slug="item.slug[locale]"
11
+ />
12
+ </v-col>
13
+ <v-col
14
+ v-ripple
15
+ cols="12"
16
+ sm="6"
17
+ md="8"
18
+ lg="9"
19
+ xl="10"
20
+ class="px-6 cursor-pointer"
21
+ @click="
22
+ router.push(localePath('/activities/publications/' + item.slug[locale]))
23
+ "
24
+ >
25
+ <div>
26
+ <v-skeleton-loader
27
+ v-if="$stores.publications.loading"
28
+ type="heading,ossein,text@8,ossein,button,button"
29
+ />
30
+
31
+ <template v-else>
32
+ <div v-if="item.type" class="text-overline">{{ $t(item.type) }}</div>
33
+ <div class="text-h5 text-sm-h3 text-md-h4 text-md-h4 my-6">
34
+ {{ item.name }}
35
+ </div>
36
+ <div
37
+ v-if="item.summary"
38
+ class="text-wrap clamped-text"
39
+ :style="
40
+ '-webkit-line-clamp:' +
41
+ [5, 5, 5, 10, 12, 14][
42
+ ['xs', 'sm', 'md', 'lg', 'xl', 'xxl'].indexOf(name || 'md')
43
+ ]
44
+ "
45
+ >
46
+ <MDC :value="item.summary" />
47
+ </div>
48
+ <v-btn
49
+ class="mt-4"
50
+ variant="outlined"
51
+ tile
52
+ :to="
53
+ localePath({
54
+ name: 'publications-slug',
55
+ params: { slug: item.slug[locale] },
56
+ })
57
+ "
58
+ :size="
59
+ ['small', 'small', 'small', 'default', 'default', 'large'][
60
+ ['xs', 'sm', 'md', 'lg', 'xl', 'xxl'].indexOf(name || 'md')
61
+ ]
62
+ "
63
+ >
64
+ {{ $t("read-more") }}
65
+ </v-btn>
66
+ <v-btn
67
+ v-if="item.url"
68
+ variant="outlined"
69
+ tile
70
+ target="_blank"
71
+ :href="item.url"
72
+ class="mt-4 ml-4"
73
+ prepend-icon="mdi-web"
74
+ :size="
75
+ ['small', 'small', 'small', 'default', 'default', 'large'][
76
+ ['xs', 'sm', 'md', 'lg', 'xl', 'xxl'].indexOf(name || 'md')
77
+ ]
78
+ "
79
+ >
80
+ {{ $t("visit-the-publications-website") }}
81
+ </v-btn>
82
+ </template>
83
+ </div>
84
+ </v-col>
85
+ <v-divider />
86
+ </template>
87
+
88
+ <script setup>
89
+ import { useDisplay } from "vuetify";
90
+ import { useNuxtApp, useI18n, useLocalePath, useRouter } from "#imports";
91
+ const { name } = useDisplay();
92
+ const { locale } = useI18n();
93
+ const { $stores } = useNuxtApp();
94
+ const router = useRouter();
95
+ const localePath = useLocalePath();
96
+ const props = defineProps({
97
+ item: {
98
+ type: Object,
99
+ default: () => {
100
+ return {};
101
+ },
102
+ required: true
103
+ }
104
+ });
105
+ </script>
@@ -0,0 +1,132 @@
1
+ <template>
2
+ <!-- {{ name }} -->
3
+ <v-row justify="center">
4
+ <v-col cols="12" sm="11" md="8" lg="8" xl="6">
5
+ <v-row class="justify-center">
6
+ <v-col cols="12" sm="10" md="6" lg="4" xl="3" class="text-center">
7
+ <!-- PUBLICATIONS IMAGE -->
8
+
9
+ <v-skeleton-loader v-if="loading" height="100%" type="image" />
10
+
11
+ <MiscAtomsImageContainer
12
+ v-else
13
+ contain
14
+ :loading="$stores.publications.loading"
15
+ :src="item.image.url ? item.image : '/default.png'"
16
+ :ratio="1 / 1"
17
+ />
18
+ </v-col>
19
+ </v-row>
20
+ <v-skeleton-loader
21
+ v-if="loading"
22
+ :type="
23
+ [
24
+ 'avatar, paragraph',
25
+ 'avatar, paragraph',
26
+ 'heading, ossein, avatar, text, ossein, chip@3',
27
+ 'heading, ossein, avatar, text, ossein, chip@3',
28
+ 'heading, ossein, avatar, text, ossein, chip@3',
29
+ 'heading',
30
+ ][['xs', 'sm', 'md', 'lg', 'xl', 'xxl'].indexOf(name || 'md')]
31
+ "
32
+ />
33
+
34
+ <div v-else class="d-flex align-center flex-column mt-12">
35
+ <div class="d-flex text-center text-wrap text-h3 text-black">
36
+ {{ item.name }}
37
+ </div>
38
+ <v-divider width="154px" class="mb-1 mt-6" />
39
+ <v-divider width="154px" />
40
+ <div class="overline my-2">
41
+ {{ formatDateValue(item.date, locale) }}
42
+ </div>
43
+ <MiscMoleculesChipContainer
44
+ v-if="item.tags && item.tags.length"
45
+ :items="item.tags"
46
+ class="py-6 mt-4 align-self-center"
47
+ />
48
+ <v-btn-toggle variant="outlined">
49
+ <MiscAtomsShareMenu :item class="mt-6" />
50
+ <v-btn
51
+ v-if="item.url"
52
+ class="my-6 d-flex"
53
+ variant="outlined"
54
+ :href="item.url"
55
+ target="_blank"
56
+ prepend-icon="mdi-link"
57
+ >
58
+ {{ $t("visit-this-publications-website") }}
59
+ </v-btn>
60
+ </v-btn-toggle>
61
+ </div>
62
+
63
+ <!-- DIVIDERS -->
64
+ <v-responsive class="mx-auto my-9" width="120">
65
+ <v-divider class="mb-1" />
66
+ <v-divider />
67
+ </v-responsive>
68
+
69
+ <!-- PUBLICATIONS DESCRIPTION -->
70
+ <v-skeleton-loader
71
+ v-if="loading"
72
+ :type="
73
+ ['text@50', 'text@50', 'text@50', 'text@50', 'text@50', 'text@50'][
74
+ ['xs', 'sm', 'md', 'lg', 'xl', 'xxl'].indexOf(name || 'md')
75
+ ]
76
+ "
77
+ />
78
+ <div v-if="item.description" class="mt-md-n2 mx-10 mx-md-0">
79
+ <MDC :value="item.description" />
80
+ </div>
81
+ </v-col>
82
+ </v-row>
83
+
84
+ <!-- DIVIDERS -->
85
+ <v-responsive class="mx-auto my-9" width="120">
86
+ <v-divider class="mb-1" />
87
+ <v-divider />
88
+ </v-responsive>
89
+ <!-- <MiscAtomsSlidingCarousel
90
+ v-if="item && item.gallery && item.gallery.length"
91
+ ref="MiscAtomsImage"
92
+ key="MiscAtomsImage"
93
+ :items="item.gallery"
94
+ type="MiscAtomsImage"
95
+ :loading="false"
96
+ :more="false"
97
+ >
98
+ <div :class="mdAndUp ? 'text-h5' : 'text-h6'">
99
+ {{ $t("gallery") }}
100
+ </div>
101
+ </MiscAtomsSlidingCarousel> -->
102
+ <!-- DIVIDERS -->
103
+ <v-responsive class="mx-auto my-9" width="120">
104
+ <v-divider class="mb-1" />
105
+ <v-divider />
106
+ </v-responsive>
107
+
108
+ <MiscMoleculesRelated
109
+ v-if="!loading && item && item.related"
110
+ :related="item.related"
111
+ />
112
+ </template>
113
+
114
+ <script setup>
115
+ import { useDisplay } from "vuetify";
116
+ import { useNuxtApp, useI18n } from "#imports";
117
+ const { $stores } = useNuxtApp();
118
+ const { name } = useDisplay();
119
+ const { locale } = useI18n();
120
+ const props = defineProps({
121
+ item: {
122
+ type: Object,
123
+ required: true
124
+ },
125
+ loading: {
126
+ type: Boolean,
127
+ required: false,
128
+ default: false
129
+ }
130
+ });
131
+ $stores.publications.loading = false;
132
+ </script>
@@ -0,0 +1,14 @@
1
+ <template>
2
+ <div>
3
+ {{ item.name }}
4
+ </div>
5
+ </template>
6
+
7
+ <script setup>
8
+ const props = defineProps({
9
+ item: {
10
+ type: Object,
11
+ required: true
12
+ }
13
+ });
14
+ </script>
@@ -0,0 +1,12 @@
1
+ <template>
2
+ {{ item }}
3
+ </template>
4
+
5
+ <script setup>
6
+ defineProps({
7
+ item: {
8
+ type: Object,
9
+ required: true
10
+ }
11
+ });
12
+ </script>
@@ -0,0 +1,20 @@
1
+ <template>
2
+ {{ item }}
3
+ </template>
4
+
5
+ <script setup>
6
+ import { useNuxtApp } from "#imports";
7
+ const { $stores } = useNuxtApp();
8
+ defineProps({
9
+ item: {
10
+ type: Object,
11
+ required: true
12
+ },
13
+ loading: {
14
+ type: Boolean,
15
+ required: false,
16
+ default: false
17
+ }
18
+ });
19
+ $stores.tags.loading = false;
20
+ </script>
@@ -0,0 +1,14 @@
1
+ <template>
2
+ <div>
3
+ {{ item }}
4
+ </div>
5
+ </template>
6
+
7
+ <script setup>
8
+ const props = defineProps({
9
+ item: {
10
+ type: Object,
11
+ required: true
12
+ }
13
+ });
14
+ </script>
@@ -0,0 +1,12 @@
1
+ <template>
2
+ {{ item }}
3
+ </template>
4
+
5
+ <script setup>
6
+ defineProps({
7
+ item: {
8
+ type: Object,
9
+ required: true
10
+ }
11
+ });
12
+ </script>
@@ -0,0 +1,20 @@
1
+ <template>
2
+ {{ item }}
3
+ </template>
4
+
5
+ <script setup>
6
+ import { useNuxtApp } from "#imports";
7
+ const { $stores } = useNuxtApp();
8
+ defineProps({
9
+ item: {
10
+ type: Object,
11
+ required: true
12
+ },
13
+ loading: {
14
+ type: Boolean,
15
+ required: false,
16
+ default: false
17
+ }
18
+ });
19
+ $stores.users.loading = false;
20
+ </script>
@@ -0,0 +1,6 @@
1
+ export declare const useFetchItem: () => {
2
+ fetchItem: <T>(payload: {
3
+ query: string;
4
+ key: string;
5
+ }) => Promise<T>;
6
+ };
@@ -0,0 +1,49 @@
1
+ import { useRoute, useAsyncQuery, useI18n, useSetI18nParams } from "#imports";
2
+ export const useFetchItem = () => {
3
+ const fetchItem = async (payload) => {
4
+ try {
5
+ const { locale } = useI18n();
6
+ const route = useRoute();
7
+ const variables = {
8
+ itemId: route.params.slug?.toString().trim(),
9
+ appId: "iea",
10
+ lang: locale.value
11
+ };
12
+ const { data, error } = await useAsyncQuery(payload.query, variables);
13
+ if (error.value) {
14
+ console.error("GraphQL error:", error.value);
15
+ throw error.value;
16
+ }
17
+ const item = data?.value[payload.key];
18
+ if (!item) {
19
+ throw createError({
20
+ statusCode: 404,
21
+ message: "Item not found in response"
22
+ });
23
+ }
24
+ const setI18nParams = useSetI18nParams();
25
+ if (!route.name.includes("people")) {
26
+ setI18nParams({
27
+ en: { slug: item.slug.en },
28
+ fr: { slug: item.slug.fr }
29
+ });
30
+ } else {
31
+ setI18nParams({
32
+ en: { slug: item.slug },
33
+ fr: { slug: item.slug }
34
+ });
35
+ }
36
+ return item;
37
+ } catch (error) {
38
+ console.error("Error fetching item:", error);
39
+ throw createError({
40
+ statusCode: 404,
41
+ message: "Item not found",
42
+ cause: error
43
+ });
44
+ }
45
+ };
46
+ return {
47
+ fetchItem
48
+ };
49
+ };
@@ -0,0 +1 @@
1
+ export default function getFileIcon(fileName: string): string;
@@ -0,0 +1,30 @@
1
+ export default function getFileIcon(fileName) {
2
+ console.log("fileName: ", fileName);
3
+ const fileExtension = fileName.split(".").pop();
4
+ console.log("fileExtension: ", fileExtension);
5
+ switch (fileExtension) {
6
+ case "pdf":
7
+ return "mdi-file-pdf-box";
8
+ case "doc":
9
+ case "docx":
10
+ return "mdi-file-word";
11
+ case "xls":
12
+ case "xlsx":
13
+ return "mdi-file-excel";
14
+ case "ppt":
15
+ case "pptx":
16
+ return "mdi-file-powerpoint";
17
+ case "jpg":
18
+ case "jpeg":
19
+ case "png":
20
+ case "gif":
21
+ return "mdi-file-image";
22
+ case "zip":
23
+ case "rar":
24
+ return "mdi-folder-zip";
25
+ case "txt":
26
+ return "mdi-file-document";
27
+ default:
28
+ return "mdi-file";
29
+ }
30
+ }