@paris-ias/list 1.0.104 → 1.0.106

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/dist/module.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@paris-ias/list",
3
3
  "configKey": "list",
4
- "version": "1.0.104",
4
+ "version": "1.0.106",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.0",
7
7
  "unbuild": "3.5.0"
@@ -4,7 +4,7 @@
4
4
  class="cursor-pointer highlight-on-hover"
5
5
  @click="$router.push(localePath('/activities/events/' + item.slug[locale]))"
6
6
  >
7
- <v-col align-self="center" cols="2">
7
+ <v-col align-self="center" cols="auto">
8
8
  {{
9
9
  new Date(item.start).toLocaleDateString(locale, {
10
10
  year: "numeric",
@@ -115,7 +115,7 @@ const results = computed(() => {
115
115
  });
116
116
  const search = computed({
117
117
  get() {
118
- return props.type === "all" ? rootStore.search : $stores[props.type].search;
118
+ return rootStore.search;
119
119
  },
120
120
  set: await useDebounceFn(async function(v) {
121
121
  await rootStore.updateSearch({
@@ -0,0 +1,59 @@
1
+ <template>
2
+ <v-divider />
3
+ <div class="d-flex align-center justify-space-between my-6">
4
+ <div class="d-flex flex-column">
5
+ <div class="text-h4">
6
+ {{ capitalize($t("items." + props.type, 2)) }}
7
+ </div>
8
+ <div class="text-overline">
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
+ </div>
29
+ </div>
30
+ <v-spacer />
31
+ <v-btn
32
+ class="ma-2"
33
+ color="default"
34
+ variant="outlined"
35
+ rounded="0"
36
+ :to="localePath(type === 'people' ? '/people' : '/activities/' + type)"
37
+ @click="$emit('add')"
38
+ >
39
+ {{ $t("list.pls-x-more", [$stores[type].total]) }}
40
+ </v-btn>
41
+ </div>
42
+ </template>
43
+
44
+ <script setup>
45
+ import { useNuxtApp, useLocalePath } from "#imports";
46
+ const localePath = useLocalePath();
47
+ const { $stores } = useNuxtApp();
48
+ const props = defineProps({
49
+ type: {
50
+ type: String,
51
+ required: true
52
+ },
53
+ feminine: {
54
+ type: Boolean,
55
+ required: false,
56
+ default: false
57
+ }
58
+ });
59
+ </script>
@@ -0,0 +1,57 @@
1
+ <template>
2
+ <ListMoleculesResultsHeader :type="props.type" />
3
+ <div class="results-container">
4
+ <component
5
+ :is="itemTemplate"
6
+ v-for="(item, index) in items"
7
+ :key="index"
8
+ :item="item"
9
+ :index="index"
10
+ />
11
+ </div>
12
+ </template>
13
+
14
+ <script setup>
15
+ import { useRootStore } from "../../../stores/root";
16
+ import { capitalize } from "../../../composables/useUtils";
17
+ import {
18
+ useNuxtApp,
19
+ resolveComponent,
20
+ computed,
21
+ onBeforeUnmount,
22
+ onMounted,
23
+ useI18n
24
+ } from "#imports";
25
+ const { $stores } = useNuxtApp();
26
+ const { locale } = useI18n();
27
+ const rootStore = useRootStore();
28
+ const props = defineProps({
29
+ type: {
30
+ type: String,
31
+ default: "people",
32
+ required: true
33
+ },
34
+ items: [Object]
35
+ });
36
+ const itemTemplate = computed(
37
+ () => resolveComponent(
38
+ (capitalize(props.type) + capitalize($stores[props.type].view.name) + "Item").toString()
39
+ )
40
+ );
41
+ const items = computed(() => $stores[props.type].items);
42
+ onMounted(() => {
43
+ console.log("mounted list");
44
+ });
45
+ try {
46
+ await rootStore.update(props.type, locale.value);
47
+ } catch (error) {
48
+ console.log("error fetching update list: ", error);
49
+ }
50
+ onBeforeUnmount(() => {
51
+ rootStore.resetState(props.type, locale.value);
52
+ });
53
+ </script>
54
+
55
+ <style scoped>
56
+ .results-container{display:flex;flex-direction:column;gap:8px;margin-left:8px}
57
+ </style>
@@ -2,13 +2,10 @@
2
2
  <v-row
3
3
  v-ripple
4
4
  class="cursor-pointer highlight-on-hover"
5
- @click="$router.push(localePath('/news/' + item.slug[locale]))"
5
+ @click="$router.push(localePath('/activities/news/' + item.slug[locale]))"
6
6
  >
7
7
  <v-col align-self="center" cols="7" class="text-h6 dense">
8
- <v-skeleton-loader
9
- v-if="rootStore.loading || $stores[type].loading"
10
- type="heading"
11
- />
8
+ <v-skeleton-loader v-if="rootStore.loading" type="heading" />
12
9
  <template v-else>
13
10
  {{ item.name }}
14
11
  </template>
@@ -16,7 +13,7 @@
16
13
 
17
14
  <v-col align-self="center" cols="5" class="dense">
18
15
  <v-skeleton-loader
19
- v-if="rootStore.loading || $stores[type].loading"
16
+ v-if="rootStore.loading"
20
17
  :type="
21
18
  ['chip', 'chip@2', 'chip@3', 'chip@4', 'chip@4', 'chip@4'][
22
19
  ['xs', 'sm', 'md', 'lg', 'xl', 'xxl'].indexOf(name || 'md')
@@ -77,7 +77,7 @@
77
77
  size="small"
78
78
  :to="
79
79
  localePath({
80
- name: 'news-slug',
80
+ name: 'activities-news-slug',
81
81
  params: { slug: item.slug[locale] },
82
82
  })
83
83
  "
@@ -114,7 +114,7 @@
114
114
  tile
115
115
  :to="
116
116
  localePath({
117
- name: 'news-slug',
117
+ name: 'activities-news-slug',
118
118
  params: { slug: item.slug[locale] },
119
119
  })
120
120
  "
@@ -5,14 +5,26 @@
5
5
  class="cursor-pointer highlight-on-hover"
6
6
  @click="$router.push(localePath('/people/' + item.slug))"
7
7
  >
8
- <v-col align-self="center" class="text-h6 pl-2">
9
- <v-skeleton-loader
10
- v-if="rootStore.loading || $stores[type].loading"
11
- type="heading"
8
+ <v-col v-if="mdAndUp" align-self="center" cols="1">
9
+ <MiscAtomsImageContainer
10
+ cover
11
+ :loading="$stores.people.loading"
12
+ :src="item.image.url ? item.image : '/default.png'"
13
+ :ratio="1 / 1"
14
+ :name="item.lastname + ' ' + item.firstname"
15
+ :slug="item.slug"
16
+ link="people-slug"
17
+ width="50"
12
18
  />
13
- <template v-else>
19
+ </v-col>
20
+ <v-col align-self="center" class="text-h6 pl-2">
21
+ <v-skeleton-loader v-if="rootStore.loading" type="heading" />
22
+ <div v-else class="text-h5">
14
23
  {{ item.firstname + " " + item.lastname }}
15
- </template>
24
+ </div>
25
+ <div class="mt-2 text-body-2 font-weight-light">
26
+ {{ item.groups.vintage ? item.groups.vintage[0].theme : "" }}
27
+ </div>
16
28
  </v-col>
17
29
  <v-col align-self="center">
18
30
  <PeopleGroupBadges :item="item" />
@@ -23,6 +35,8 @@
23
35
  <script setup>
24
36
  import { useRootStore } from "../../stores/root";
25
37
  import { useNuxtApp, useLocalePath } from "#imports";
38
+ import { useDisplay } from "vuetify";
39
+ const { mdAndUp } = useDisplay();
26
40
  const { $stores } = useNuxtApp();
27
41
  const localePath = useLocalePath();
28
42
  const rootStore = useRootStore();
@@ -4,39 +4,37 @@
4
4
  v-if="rootStore.loading || $stores.people.loading"
5
5
  type="chip"
6
6
  />
7
+ <template v-else-if="item.groups">
8
+ <template v-for="(value, key, index) in item.groups" :key="key + index">
9
+ <template v-if="value && key === 'vintage'">
10
+ <v-chip
11
+ v-for="(vintage, index2) in item.groups.vintage"
12
+ :key="index2"
13
+ class="mt-3 mr-3"
14
+ variant="outlined"
15
+ tile
16
+ style="background-color: white; color: black"
17
+ >
18
+ {{ $t("vintage", [vintage.year]) }}
19
+ </v-chip>
20
+ </template>
7
21
 
8
- <template
9
- v-for="(value, key, index) in item.groups"
10
- v-else
11
- :key="key + index"
12
- >
13
- <template v-if="value && key === 'vintage'">
14
22
  <v-chip
15
- v-for="(vintage, index2) in item.groups.vintage"
16
- :key="index2"
23
+ v-if="
24
+ value &&
25
+ key !== 'fellows' &&
26
+ ((!item.groups.vintage && key === 'vintage') ||
27
+ !['vintage', '__typename'].includes(key))
28
+ "
17
29
  class="mt-3 mr-3"
18
- variant="outlined"
19
- tile
30
+ color="black"
20
31
  style="background-color: white; color: black"
32
+ tile
33
+ variant="outlined"
21
34
  >
22
- {{ $t("vintage", [vintage.year]) }}
35
+ {{ $t("list.filters.people.groups." + key) }}
23
36
  </v-chip>
24
37
  </template>
25
-
26
- <v-chip
27
- v-if="
28
- value &&
29
- ((!item.groups.vintage && key === 'vintage') ||
30
- !['vintage', '__typename'].includes(key))
31
- "
32
- class="mt-3 mr-3"
33
- color="black"
34
- style="background-color: white; color: black"
35
- tile
36
- variant="outlined"
37
- >
38
- {{ $t("list.filters.people.groups." + key) }}
39
- </v-chip>
40
38
  </template>
41
39
  </div>
42
40
  </template>
@@ -49,7 +47,8 @@ const { $stores } = useNuxtApp();
49
47
  const props = defineProps({
50
48
  item: {
51
49
  type: Object,
52
- required: true
50
+ required: true,
51
+ default: () => ({})
53
52
  }
54
53
  });
55
54
  </script>
@@ -0,0 +1,57 @@
1
+ <template>
2
+ <v-row
3
+ v-ripple
4
+ class="cursor-pointer highlight-on-hover"
5
+ @click="$router.push(localePath('/projects/' + item.slug[locale]))"
6
+ >
7
+ <v-col align-self="center" cols="7" class="text-h6 dense">
8
+ <v-skeleton-loader v-if="rootStore.loading" type="heading" />
9
+ <template v-else>
10
+ {{ item.name }}
11
+ </template>
12
+ </v-col>
13
+
14
+ <v-col align-self="center" cols="5" class="dense">
15
+ <v-skeleton-loader
16
+ v-if="rootStore.loading"
17
+ :type="
18
+ ['chip', 'chip@2', 'chip@3', 'chip@4', 'chip@4', 'chip@4'][
19
+ ['xs', 'sm', 'md', 'lg', 'xl', 'xxl'].indexOf(name || 'md')
20
+ ]
21
+ "
22
+ />
23
+
24
+ <template v-else>
25
+ <MiscMoleculesChipContainer :items="item.tags" size="small" />
26
+ </template>
27
+ </v-col>
28
+ </v-row>
29
+ </template>
30
+
31
+ <script setup>
32
+ import { useDisplay } from "vuetify";
33
+ import { useRootStore } from "../../stores/root";
34
+ import { computed, useNuxtApp, useI18n, useLocalePath } from "#imports";
35
+ const { $stores } = useNuxtApp();
36
+ const { name } = useDisplay();
37
+ const localePath = useLocalePath();
38
+ const { locale } = useI18n();
39
+ const rootStore = useRootStore();
40
+ const props = defineProps({
41
+ item: {
42
+ type: Object,
43
+ required: true
44
+ },
45
+ index: {
46
+ type: Number,
47
+ required: true
48
+ }
49
+ });
50
+ const eventCategory = computed(() => {
51
+ if (props.item.category) {
52
+ return "list.filters.news.category." + props.item.category;
53
+ } else {
54
+ return "list.filters.news.category.others";
55
+ }
56
+ });
57
+ </script>
@@ -0,0 +1,62 @@
1
+ <template>
2
+ <v-row
3
+ v-ripple
4
+ class="cursor-pointer highlight-on-hover"
5
+ @click="
6
+ $router.push(localePath('/activities/publications/' + item.slug[locale]))
7
+ "
8
+ >
9
+ <v-col align-self="center" cols="7" class="text-h6 dense">
10
+ <v-skeleton-loader v-if="rootStore.loading" type="heading" />
11
+ <template v-else>
12
+ {{ item.name }}
13
+ </template>
14
+ </v-col>
15
+
16
+ <v-col align-self="center" cols="5" class="dense">
17
+ <v-skeleton-loader
18
+ v-if="rootStore.loading"
19
+ :type="
20
+ ['chip', 'chip@2', 'chip@3', 'chip@4', 'chip@4', 'chip@4'][
21
+ ['xs', 'sm', 'md', 'lg', 'xl', 'xxl'].indexOf(name || 'md')
22
+ ]
23
+ "
24
+ />
25
+
26
+ <template v-else>
27
+ <v-chip class="ma-2" style="background-color: white; color: black">
28
+ {{ $t(eventCategory) }}
29
+ </v-chip>
30
+ <MiscMoleculesChipContainer :items="item.tags" size="small" />
31
+ </template>
32
+ </v-col>
33
+ </v-row>
34
+ </template>
35
+
36
+ <script setup>
37
+ import { useDisplay } from "vuetify";
38
+ import { useRootStore } from "../../stores/root";
39
+ import { computed, useNuxtApp, useI18n, useLocalePath } from "#imports";
40
+ const { $stores } = useNuxtApp();
41
+ const { name } = useDisplay();
42
+ const localePath = useLocalePath();
43
+ const { locale } = useI18n();
44
+ const rootStore = useRootStore();
45
+ const props = defineProps({
46
+ item: {
47
+ type: Object,
48
+ required: true
49
+ },
50
+ index: {
51
+ type: Number,
52
+ required: true
53
+ }
54
+ });
55
+ const eventCategory = computed(() => {
56
+ if (props.item.category) {
57
+ return "list.filters.news.category." + props.item.category;
58
+ } else {
59
+ return "list.filters.news.category.others";
60
+ }
61
+ });
62
+ </script>
@@ -108,7 +108,6 @@ export default defineNuxtPlugin(async (nuxtApp) => {
108
108
  const queries = {};
109
109
  const models = {};
110
110
  const builtFilters = await import("../public/filters.json");
111
- console.log("Filters loaded successfully:", builtFilters);
112
111
  console.log("INITIALIZING STORES");
113
112
  await Promise.all(
114
113
  appConfig.list.modules.map(async (type) => {
@@ -329,7 +329,7 @@
329
329
  "upcoming-events": "Upcoming events",
330
330
  "videos": "Videos",
331
331
  "view-larger-map": "View on a larger map",
332
- "vintage": "Year {0}",
332
+ "vintage": "{0} Fellow",
333
333
  "visit": "Visit us",
334
334
  "visit-the-project-website": "Visit the project website",
335
335
  "watch-the-replay": "Watch the replay",
@@ -330,7 +330,7 @@
330
330
  "upcoming-events": "Événements à venir",
331
331
  "videos": "Vidéos",
332
332
  "view-larger-map": "Afficher sur une carte plus grande",
333
- "vintage": "Année {0}",
333
+ "vintage": "Résident {0}",
334
334
  "visit": "Nous rendre visite",
335
335
  "visit-the-project-website": "Visiter le site web",
336
336
  "groups": "Catégorie",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "license": "AGPL-3.0-only",
3
3
  "main": "./dist/module.mjs",
4
- "version": "1.0.104",
4
+ "version": "1.0.106",
5
5
  "name": "@paris-ias/list",
6
6
  "repository": {
7
7
  "url": "git+https://github.com/IEA-Paris/list.git",
@@ -24,7 +24,7 @@
24
24
  "@nuxtjs/apollo": "^5.0.0-alpha.14",
25
25
  "@nuxtjs/i18n": "^9.5.2",
26
26
  "@nuxtjs/mdc": "0.16.1",
27
- "@paris-ias/data": "^1.8.5",
27
+ "@paris-ias/data": "^1.8.25",
28
28
  "@pinia/nuxt": "^0.5.4",
29
29
  "@types/node": "latest",
30
30
  "@urql/exchange-execute": "2.3.1",