@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,203 @@
1
+ <template>
2
+ <!-- {{ name }} -->
3
+ <v-row justify="center">
4
+ <v-col cols="12" sm="11" md="10" lg="9" xl="8">
5
+ <v-row
6
+ v-if="item && item.image && item.image.length"
7
+ class="justify-center"
8
+ >
9
+ <v-col cols="12" sm="10" md="6" lg="4" xl="3" class="text-center">
10
+ <!-- FELLOWSHIP IMAGE -->
11
+ <MiscAtomsImageContainer
12
+ contain
13
+ :loading
14
+ :src="item.image"
15
+ :ratio="1 / 1"
16
+ />
17
+ </v-col>
18
+ </v-row>
19
+ <v-row justify="center">
20
+ <v-col cols="12">
21
+ <v-skeleton-loader
22
+ v-if="loading"
23
+ :type="
24
+ [
25
+ 'avatar, paragraph',
26
+ 'avatar, paragraph',
27
+ 'heading, ossein, avatar, text, ossein, chip@3',
28
+ 'heading, ossein, avatar, text, ossein, chip@3',
29
+ 'heading, ossein, avatar, text, ossein, chip@3',
30
+ 'heading',
31
+ ][['xs', 'sm', 'md', 'lg', 'xl', 'xxl'].indexOf(name || 'md')]
32
+ "
33
+ />
34
+
35
+ <div v-else class="d-flex align-center flex-column mt-12">
36
+ <div class="d-flex text-center text-wrap text-h3 text-black">
37
+ {{ item.name }}
38
+ </div>
39
+ <v-divider width="154px" class="mb-1 mt-6" />
40
+ <v-divider width="154px" />
41
+ <div class="d-flex text-center text-wrap text-h5 text-black mt-6">
42
+ <MDC v-if="item.subtitle" :value="item.subtitle" />
43
+ </div>
44
+ <MiscMoleculesChipContainer
45
+ :items="[
46
+ $t(
47
+ 'list.filters.fellowships.fellowshipType.' +
48
+ item.fellowshipType
49
+ ),
50
+ ...(props.item && props.item.disciplines
51
+ ? props.item.disciplines.map((discipline) => discipline.name)
52
+ : []),
53
+ ]"
54
+ class="mt-2"
55
+ />
56
+ <div class="mt-5">
57
+ <FellowshipsBadges :item="item" :view="view" />
58
+ </div>
59
+ </div>
60
+ <div class="mx-6">
61
+ <!-- DIVIDERS -->
62
+ <v-responsive class="mx-auto my-9" width="120">
63
+ <v-divider class="mb-1" />
64
+ <v-divider />
65
+ </v-responsive>
66
+
67
+ <!-- FELLOWSHIP DESCRIPTION -->
68
+ <v-skeleton-loader
69
+ v-if="loading"
70
+ :type="
71
+ [
72
+ 'text@50',
73
+ 'text@50',
74
+ 'text@50',
75
+ 'text@50',
76
+ 'text@50',
77
+ 'text@50',
78
+ ][['xs', 'sm', 'md', 'lg', 'xl', 'xxl'].indexOf(name || 'md')]
79
+ "
80
+ />
81
+ <MDC v-if="item.description" :value="item.description" />
82
+
83
+ <v-responsive class="mx-auto my-9" width="120">
84
+ <v-divider class="mb-1" />
85
+ <v-divider />
86
+ </v-responsive>
87
+ <v-skeleton-loader v-if="loading" />
88
+ <v-expansion-panels
89
+ v-else
90
+ v-model="accordeon"
91
+ flat
92
+ ripple
93
+ variant="accordion"
94
+ class="py-8"
95
+ >
96
+ <v-expansion-panel
97
+ v-for="(value, key) in Object.keys(renderedDetails)"
98
+ :key="key + value"
99
+ class="border-thin text-black"
100
+ :color="key === accordeon ? 'light-grey' : 'white'"
101
+ >
102
+ <v-expansion-panel-title
103
+ collapse-icon="mdi-minus"
104
+ expand-icon="mdi-plus"
105
+ class="text-h6"
106
+ :class="{ 'font-weight-black': key === accordeon }"
107
+ >
108
+ {{ $t(value) }}
109
+ </v-expansion-panel-title>
110
+ <v-expansion-panel-text
111
+ class="py-2"
112
+ style="white-space: pre; text-wrap: auto"
113
+ >
114
+ <MDC
115
+ v-if="renderedDetails[value]"
116
+ :value="renderedDetails[value]"
117
+ />
118
+ </v-expansion-panel-text>
119
+ </v-expansion-panel>
120
+ </v-expansion-panels>
121
+
122
+ <v-responsive class="mx-auto my-9" width="120">
123
+ <v-divider class="mb-1" />
124
+ <v-divider />
125
+ </v-responsive>
126
+
127
+ <MiscAtomsSlidingCarousel
128
+ v-if="item && item.fellows && item.fellows.length"
129
+ key="people"
130
+ ref="fellows"
131
+ :items="item.fellows || []"
132
+ type="people"
133
+ lazy
134
+ :loading
135
+ >
136
+ <div :class="mdAndUp ? 'text-h5' : 'text-h6'">
137
+ {{ $t("this-fellowship-alumni") }}
138
+ </div>
139
+ </MiscAtomsSlidingCarousel>
140
+ </div>
141
+ </v-col>
142
+ <MiscMoleculesRelated
143
+ v-if="!loading && item && item.related"
144
+ :related="item.related"
145
+ />
146
+ </v-row>
147
+ </v-col>
148
+ </v-row>
149
+ </template>
150
+
151
+ <script setup>
152
+ import { useDisplay } from "vuetify";
153
+ import { ref } from "#imports";
154
+ const { name } = useDisplay();
155
+ const accordeon = ref(-1);
156
+ const props = defineProps({
157
+ item: {
158
+ type: Object,
159
+ required: true
160
+ },
161
+ loading: {
162
+ type: Boolean,
163
+ default: false,
164
+ required: true
165
+ }
166
+ });
167
+ const view = ref(true);
168
+ const renderedDetails = {
169
+ ...props.item?.fellowshipDetails?.type && {
170
+ type: props.item?.fellowshipDetails?.type
171
+ },
172
+ ...props.item?.fellowshipDetails?.fundingPeriod && {
173
+ fundingPeriod: props.item?.fellowshipDetails?.fundingPeriod
174
+ },
175
+ ...props.item?.fellowshipDetails?.profile && {
176
+ profile: props.item?.fellowshipDetails?.profile
177
+ },
178
+ ...props.item?.fellowshipDetails?.tasks && {
179
+ tasks: props.item?.fellowshipDetails?.tasks
180
+ },
181
+ ...props.item?.fellowshipDetails?.location && {
182
+ location: props.item?.fellowshipDetails?.location
183
+ },
184
+ ...props.item?.fellowshipDetails?.funding && {
185
+ funding: props.item?.fellowshipDetails?.funding
186
+ },
187
+ ...props.item?.fellowshipDetails?.housing && {
188
+ housing: props.item?.fellowshipDetails?.housing
189
+ },
190
+ ...props.item?.fellowshipDetails?.meals && {
191
+ meals: props.item?.fellowshipDetails?.meals
192
+ },
193
+ ...props.item?.fellowshipDetails?.applicationMaterials && {
194
+ applicationMaterials: props.item?.fellowshipDetails?.applicationMaterials
195
+ },
196
+ ...props.item?.fellowshipDetails?.selectionProcess && {
197
+ selectionProcess: props.item?.fellowshipDetails?.selectionProcess
198
+ },
199
+ ...props.item?.fellowshipDetails?.researchProcess && {
200
+ researchProcess: props.item?.fellowshipDetails?.researchProcess
201
+ }
202
+ };
203
+ </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.files.loading = false;
20
+ </script>
@@ -0,0 +1,44 @@
1
+ <template>
2
+ <v-tooltip location="top">
3
+ <template v-slot:activator="{ props: tooltip }">
4
+ <v-btn
5
+ x-large
6
+ outlined
7
+ tile
8
+ flat
9
+ :class="{
10
+ 'mt-3': isXsDisplay,
11
+ }"
12
+ v-bind="tooltip"
13
+ prepend-icon="mdi-tune-variant"
14
+ :append-icon="open ? 'mdi-chevron-down' : 'mdi-chevron-up'"
15
+ @click="$emit('open', !open)"
16
+ >
17
+ <!-- <v-icon>mdi-tune-variant</v-icon> -->
18
+ {{ $t("filters") }}
19
+ </v-btn>
20
+ </template>
21
+ <div
22
+ v-html="open ? $t('close-the-filter-panel') : $t('open-the-filter-panel')"
23
+ ></div>
24
+ </v-tooltip>
25
+ </template>
26
+
27
+ <script setup>
28
+ import { useDisplay } from "vuetify";
29
+ const {
30
+ name: nameDisplay,
31
+ xs: isXsDisplay,
32
+ mobile: isMobileDisplay,
33
+ smAndUp,
34
+ lgAndUp,
35
+ smAndDown
36
+ } = useDisplay();
37
+ const props = defineProps({
38
+ open: {
39
+ type: Boolean,
40
+ required: false,
41
+ default: false
42
+ }
43
+ });
44
+ </script>
@@ -0,0 +1,33 @@
1
+ <template>
2
+ <v-tooltip location="top">
3
+ <template #activator="{ props: tooltip }">
4
+ <v-btn
5
+ x-large
6
+ outlined
7
+ tile
8
+ flat
9
+ icon
10
+ class="ml-auto"
11
+ v-bind="tooltip"
12
+ @click="rootStore.resetState(type, locale)"
13
+ >
14
+ <v-icon>mdi-restore</v-icon>
15
+ </v-btn>
16
+ </template>
17
+ <span>{{ $t("list.reset-filters") }}</span>
18
+ </v-tooltip>
19
+ </template>
20
+
21
+ <script setup>
22
+ import { useRootStore } from "../../../stores/root";
23
+ import { useI18n } from "#imports";
24
+ const rootStore = useRootStore();
25
+ const { locale } = useI18n();
26
+ const props = defineProps({
27
+ type: {
28
+ type: String,
29
+ default: "articles",
30
+ required: true
31
+ }
32
+ });
33
+ </script>
@@ -0,0 +1,27 @@
1
+ <template>
2
+ <component
3
+ :is="itemTemplate"
4
+ v-for="(item, index) in $rootStore.results[type].items"
5
+ :key="index"
6
+ :item="item"
7
+ :index="index"
8
+ />
9
+ </template>
10
+
11
+ <script setup>
12
+ import { capitalize } from "../../../composables/useUtils";
13
+ import { useNuxtApp, resolveComponent, computed } from "#imports";
14
+ const { $stores, $rootStore } = useNuxtApp();
15
+ console.log("rootStore: ", $rootStore);
16
+ const props = defineProps({
17
+ type: {
18
+ type: String,
19
+ default: "people"
20
+ }
21
+ });
22
+ const itemTemplate = computed(
23
+ () => resolveComponent(
24
+ (capitalize(props.type) + capitalize($stores[props.type].view.name) + "Item").toString()
25
+ )
26
+ );
27
+ </script>
@@ -0,0 +1,59 @@
1
+ <template>
2
+ <div class="d-flex flex-grow-1 flex-column">
3
+ <v-text-field
4
+ v-model.trim="search"
5
+ :placeholder="$t('list.search-type', [$t('items.' + type, 2)])"
6
+ prepend-inner-icon="mdi-magnify"
7
+ single-line
8
+ class="transition-swing"
9
+ variant="outlined"
10
+ hide-details
11
+ clearable
12
+ tile
13
+ type="search"
14
+ :loading="rootStore.loading"
15
+ >
16
+ <!-- :loading="$nuxt.loading || $store.state.loading" :class="{ 'mt-3':
17
+ $store.state.scrolled }" -->
18
+ <template v-if="!search" #label>
19
+ <div class="searchLabel">
20
+ {{
21
+ type === "all"
22
+ ? $t("search")
23
+ : $t("list.search-type", [$t("items." + type, 2)])
24
+ }}
25
+ </div>
26
+ </template>
27
+ </v-text-field>
28
+ </div>
29
+ </template>
30
+
31
+ <script setup>
32
+ import { useDebounceFn } from "@vueuse/core";
33
+ import { useRootStore } from "../../../stores/root";
34
+ import { computed, useI18n } from "#imports";
35
+ const { locale } = useI18n();
36
+ const rootStore = useRootStore();
37
+ const props = defineProps({
38
+ type: {
39
+ type: String,
40
+ required: true
41
+ },
42
+ loading: {
43
+ type: Boolean,
44
+ default: false
45
+ }
46
+ });
47
+ const search = computed({
48
+ get() {
49
+ return rootStore.search;
50
+ },
51
+ set: await useDebounceFn(async function(v) {
52
+ await rootStore.updateSearch({
53
+ type: props.type,
54
+ search: v || "",
55
+ lang: locale.value
56
+ });
57
+ }, 300)
58
+ });
59
+ </script>
@@ -0,0 +1,65 @@
1
+ <template>
2
+ <v-list-item
3
+ :key="index.toString() + item.id"
4
+ :to="localePath(getPath(item.id))"
5
+ class="search-item py-2"
6
+ >
7
+ <template #item />
8
+ <template v-if="item.prependAvatar" #prepend>
9
+ <v-avatar rounded="0" :image="item.prependAvatar" />
10
+ </template>
11
+ <template #title>
12
+ <div class="text-black black-text" v-html="item.title" />
13
+ </template>
14
+ <template #subtitle>
15
+ <div class="text-black black-text" v-html="item.subtitle" />
16
+ </template>
17
+ <template #append>
18
+ <v-btn
19
+ icon="mdi-open-in-new"
20
+ variant="text"
21
+ :to="localePath(getPath((item.slug && item.slug[locale]) || item.id))"
22
+ target="_blank"
23
+ />
24
+ </template>
25
+ </v-list-item>
26
+ </template>
27
+
28
+ <script setup>
29
+ import { useLocalePath, useI18n } from "#imports";
30
+ const { locale } = useI18n();
31
+ const localePath = useLocalePath();
32
+ const props = defineProps({
33
+ item: {
34
+ type: Object,
35
+ required: true
36
+ },
37
+ type: {
38
+ type: String,
39
+ required: true
40
+ },
41
+ index: {
42
+ type: Number,
43
+ required: true
44
+ }
45
+ });
46
+ const getPath = (id) => {
47
+ switch (props.item.type) {
48
+ case "projects":
49
+ return "/activities/projects/" + id;
50
+ case "publications":
51
+ return "/activities/publications/" + id;
52
+ case "fellowship":
53
+ return "/activities/fellowships/" + id;
54
+ default:
55
+ return `/${props.type}/${id}`;
56
+ }
57
+ };
58
+ </script>
59
+
60
+ <style>
61
+ .search-item {
62
+ align-items: center;
63
+ height: 100%;
64
+ }
65
+ </style>
@@ -0,0 +1,160 @@
1
+ <template>
2
+ <div class="mt-4 font-weight-light">
3
+ <template
4
+ v-if="
5
+ (!$stores[type].search || $stores[type].search.length === 0) &&
6
+ $stores[type].filtersCount === 0
7
+ "
8
+ >
9
+ {{
10
+ feminine
11
+ ? $t(
12
+ "list.0-items-found-f",
13
+ [
14
+ $stores[type].total,
15
+ $t("items." + props.type, $stores[type].total),
16
+ ],
17
+ $stores[type].total,
18
+ )
19
+ : $t(
20
+ "list.0-items-found",
21
+ [
22
+ $stores[type].total,
23
+ $t("items." + props.type, $stores[type].total),
24
+ ],
25
+ $stores[type].total,
26
+ )
27
+ }}
28
+ </template>
29
+ <!-- searching for "XXX" -->
30
+ <template
31
+ v-else-if="
32
+ !(!$stores[type].search || $stores[type].search.length === 0) &&
33
+ $stores[type].filtersCount === 0
34
+ "
35
+ >
36
+ {{
37
+ feminine
38
+ ? $t(
39
+ "list.0-items-found-searching-for-f",
40
+ [
41
+ $stores[type].total,
42
+ $t(
43
+ "items." + props.type,
44
+ $stores[type].total,
45
+ $stores[type].total,
46
+ ),
47
+ $stores[type].search,
48
+ ],
49
+ $stores[type].total,
50
+ )
51
+ : $t(
52
+ "list.0-items-found-searching-for",
53
+ [
54
+ $stores[type].total,
55
+ $t(
56
+ "items." + props.type,
57
+ $stores[type].total,
58
+ $stores[type].total,
59
+ ),
60
+ $stores[type].search,
61
+ ],
62
+ $stores[type].total,
63
+ )
64
+ }}
65
+ </template>
66
+ <!-- with X filters -->
67
+ <template
68
+ v-else-if="
69
+ (!$stores[type].search || $stores[type].search.length === 0) &&
70
+ $stores[type].filtersCount > 0
71
+ "
72
+ >
73
+ {{
74
+ feminine
75
+ ? $t(
76
+ "list.0-items-found-with-1-filter-f",
77
+ [
78
+ $stores[type].total,
79
+ $t(
80
+ "items." + props.type,
81
+ $stores[type].total,
82
+ $stores[type].total,
83
+ ),
84
+ $stores[type].filtersCount,
85
+ $t("filters", $stores[type].filtersCount),
86
+ ],
87
+ $stores[type].total,
88
+ )
89
+ : $t(
90
+ "list.0-items-found-with-1-filter",
91
+ [
92
+ $stores[type].total,
93
+ $t("items." + type, $stores[type].total, $stores[type].total),
94
+ $stores[type].filtersCount,
95
+ $t("filters", $stores[type].filtersCount),
96
+ ],
97
+ $stores[type].total,
98
+ )
99
+ }}
100
+ </template>
101
+ <!-- searching for "XXX" with Y filters -->
102
+ <template
103
+ v-else-if="
104
+ $stores[type].search &&
105
+ $stores[type].search.length &&
106
+ $stores[type].filtersCount > 0
107
+ "
108
+ >
109
+ {{
110
+ feminine
111
+ ? $t(
112
+ "list.0-items-found-searching-for-with-1-filter-f",
113
+ [
114
+ $stores[type].total,
115
+ $t("items." + type, $stores[type].total),
116
+ $stores[type].search,
117
+ $stores[type].filtersCount,
118
+ $t("filters", $stores[type].filtersCount),
119
+ ],
120
+ $stores[type].total,
121
+ )
122
+ : $t(
123
+ "list.0-items-found-searching-for-with-1-filter",
124
+ [
125
+ $stores[type].total,
126
+ $t("items." + type, $stores[type].total),
127
+ $stores[type].search,
128
+ $stores[type].filtersCount,
129
+ $t("filters", $stores[type].filtersCount),
130
+ ],
131
+ $stores[type].total,
132
+ )
133
+ }}
134
+ </template>
135
+ <template v-if="$stores[type].numberOfPages > 1">
136
+ <!-- // Page X of Y -->
137
+ {{
138
+ $t("list.page-0-of-1", [
139
+ $stores[type].page || 1,
140
+ $stores[type].numberOfPages || 1,
141
+ ])
142
+ }}
143
+ </template>
144
+ <!-- X items per page -->
145
+ <!-- displayed by X -->
146
+ <!-- and sorted by X -->
147
+ </div>
148
+ </template>
149
+
150
+ <script setup>
151
+ import { useNuxtApp, ref } from "#imports";
152
+ const { $stores } = useNuxtApp();
153
+ const props = defineProps({
154
+ type: {
155
+ type: String,
156
+ required: true
157
+ }
158
+ });
159
+ const feminine = ref(["news", "publications", "people"].includes(props.type));
160
+ </script>