@paris-ias/list 1.0.163 → 1.0.165
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 +1 -1
- package/dist/runtime/components/actions/View.vue +5 -2
- package/dist/runtime/components/affiliations/DenseItem.vue +29 -0
- package/dist/runtime/components/affiliations/ExpandedItem.vue +16 -0
- package/dist/runtime/components/affiliations/RowsItem.vue +29 -0
- package/dist/runtime/components/affiliations/View.vue +22 -0
- package/dist/runtime/components/list/molecules/Filters.vue +5 -4
- package/dist/runtime/composables/useFetchItem.js +18 -15
- package/dist/runtime/stores/factory.d.ts +1 -1
- package/dist/runtime/translations/en.json +18 -6
- package/dist/runtime/translations/fr.json +17 -3
- package/package.json +2 -2
package/dist/module.json
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<v-row no-gutters>
|
|
3
|
-
|
|
3
|
+
{{ item }}
|
|
4
4
|
</v-row>
|
|
5
5
|
<v-divider />
|
|
6
6
|
</template>
|
|
7
7
|
|
|
8
8
|
<script setup>
|
|
9
|
-
defineProps({
|
|
9
|
+
defineProps({
|
|
10
|
+
loading: { type: Boolean, default: false },
|
|
11
|
+
item: { type: Object, required: true },
|
|
12
|
+
})
|
|
10
13
|
</script>
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<v-row class="my-2 highlight-on-hover" no-gutters>
|
|
3
|
+
<v-col cols="12" class="px-4">
|
|
4
|
+
<v-skeleton-loader v-if="isLoading" type="heading, text@6" />
|
|
5
|
+
<template v-else>
|
|
6
|
+
<div class="text-h5">{{ item.name }}</div>
|
|
7
|
+
<div v-if="item.summary" class="text-body-1 mt-1">
|
|
8
|
+
<MDC :value="item.summary" />
|
|
9
|
+
</div>
|
|
10
|
+
</template>
|
|
11
|
+
</v-col>
|
|
12
|
+
</v-row>
|
|
13
|
+
<v-divider />
|
|
14
|
+
</template>
|
|
15
|
+
|
|
16
|
+
<script setup>
|
|
17
|
+
import { computed } from "#imports"
|
|
18
|
+
import { useRootStore } from "../../stores/root"
|
|
19
|
+
|
|
20
|
+
const rootStore = useRootStore()
|
|
21
|
+
const props = defineProps({
|
|
22
|
+
item: { type: Object, required: true },
|
|
23
|
+
loading: { type: Boolean, default: false },
|
|
24
|
+
})
|
|
25
|
+
|
|
26
|
+
const isLoading = computed(() => rootStore.loading || props.loading)
|
|
27
|
+
</script>
|
|
28
|
+
|
|
29
|
+
<style></style>
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<v-row class="highlight-on-hover pa-3" no-gutters>
|
|
3
|
+
<v-col cols="12" class="px-6">
|
|
4
|
+
<v-skeleton-loader v-if="isLoading" type="heading, text@8, button" />
|
|
5
|
+
<template v-else>
|
|
6
|
+
<div class="text-h5">{{ item.name }}</div>
|
|
7
|
+
<div v-if="item.summary" class="mt-2">
|
|
8
|
+
<MDC :value="item.summary" />
|
|
9
|
+
</div>
|
|
10
|
+
</template>
|
|
11
|
+
</v-col>
|
|
12
|
+
</v-row>
|
|
13
|
+
<v-divider />
|
|
14
|
+
</template>
|
|
15
|
+
|
|
16
|
+
<script setup>
|
|
17
|
+
import { computed } from "#imports"
|
|
18
|
+
import { useRootStore } from "../../stores/root"
|
|
19
|
+
|
|
20
|
+
const rootStore = useRootStore()
|
|
21
|
+
const props = defineProps({
|
|
22
|
+
item: { type: Object, required: true },
|
|
23
|
+
loading: { type: Boolean, default: false },
|
|
24
|
+
})
|
|
25
|
+
|
|
26
|
+
const isLoading = computed(() => rootStore.loading || props.loading)
|
|
27
|
+
</script>
|
|
28
|
+
|
|
29
|
+
<style></style>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
{{ item }}
|
|
3
|
+
</template>
|
|
4
|
+
|
|
5
|
+
<script setup>
|
|
6
|
+
import { useNuxtApp } from "#imports"
|
|
7
|
+
|
|
8
|
+
const { $stores } = useNuxtApp()
|
|
9
|
+
defineProps({
|
|
10
|
+
item: {
|
|
11
|
+
type: Object,
|
|
12
|
+
required: true,
|
|
13
|
+
},
|
|
14
|
+
loading: {
|
|
15
|
+
type: Boolean,
|
|
16
|
+
required: false,
|
|
17
|
+
default: false,
|
|
18
|
+
},
|
|
19
|
+
})
|
|
20
|
+
|
|
21
|
+
$stores.affiliations.loading = false
|
|
22
|
+
</script>
|
|
@@ -65,10 +65,11 @@ const getItems = (name) => {
|
|
|
65
65
|
value: item,
|
|
66
66
|
}))
|
|
67
67
|
}
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
68
|
+
|
|
69
|
+
if (!messages.value[locale.value].list.filters[props.type]?.[name]) {
|
|
70
|
+
console.log(
|
|
71
|
+
`translations missing for the filter ${name} of the type ${props.type}`
|
|
72
|
+
)
|
|
72
73
|
return []
|
|
73
74
|
}
|
|
74
75
|
// TODO replace with package based values
|
|
@@ -1,25 +1,30 @@
|
|
|
1
|
-
import { useRoute,
|
|
1
|
+
import { useRoute, useI18n, useSetI18nParams, useNuxtApp } from "#imports";
|
|
2
2
|
export const useFetchItem = () => {
|
|
3
3
|
const fetchItem = async (payload) => {
|
|
4
4
|
try {
|
|
5
5
|
const { locale } = useI18n();
|
|
6
6
|
const route = useRoute();
|
|
7
|
+
const { $apollo } = useNuxtApp();
|
|
8
|
+
console.log("query: ", payload.query);
|
|
9
|
+
console.log("key: ", payload.key);
|
|
7
10
|
const variables = {
|
|
8
11
|
itemId: route.params.slug?.toString().trim(),
|
|
9
12
|
appId: "iea",
|
|
10
13
|
lang: locale.value
|
|
11
14
|
};
|
|
12
|
-
const
|
|
13
|
-
if (
|
|
14
|
-
|
|
15
|
-
throw error.value;
|
|
15
|
+
const apolloClient = $apollo?.clients?.default;
|
|
16
|
+
if (!apolloClient) {
|
|
17
|
+
throw new Error("Apollo client is not available");
|
|
16
18
|
}
|
|
17
|
-
|
|
19
|
+
console.log("variables: ", variables);
|
|
20
|
+
const { data } = await apolloClient.query({
|
|
21
|
+
query: payload.query,
|
|
22
|
+
variables
|
|
23
|
+
});
|
|
24
|
+
console.log("data: ", data);
|
|
25
|
+
const item = data?.[payload.key];
|
|
18
26
|
if (!item) {
|
|
19
|
-
throw
|
|
20
|
-
statusCode: 404,
|
|
21
|
-
message: "Item not found in response"
|
|
22
|
-
});
|
|
27
|
+
throw new Error("Item not found in response");
|
|
23
28
|
}
|
|
24
29
|
const setI18nParams = useSetI18nParams();
|
|
25
30
|
if (!route.name.includes("people")) {
|
|
@@ -36,11 +41,9 @@ export const useFetchItem = () => {
|
|
|
36
41
|
return item;
|
|
37
42
|
} catch (error) {
|
|
38
43
|
console.error("Error fetching item:", error);
|
|
39
|
-
throw
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
cause: error
|
|
43
|
-
});
|
|
44
|
+
throw new Error(
|
|
45
|
+
`Item not found: ${error instanceof Error ? error.message : String(error)}`
|
|
46
|
+
);
|
|
44
47
|
}
|
|
45
48
|
};
|
|
46
49
|
return {
|
|
@@ -6,7 +6,7 @@ export declare const createDynamicStore: (storeName: string, moduleState: object
|
|
|
6
6
|
numberOfPages: import("vue").Ref<number, number>;
|
|
7
7
|
search: import("vue").Ref<string, string>;
|
|
8
8
|
error: import("vue").Ref<string | null, string | null>;
|
|
9
|
-
}, "
|
|
9
|
+
}, "search" | "loading" | "total" | "skip" | "page" | "numberOfPages" | "error">, Pick<{
|
|
10
10
|
loading: import("vue").Ref<boolean, boolean>;
|
|
11
11
|
total: import("vue").Ref<number, number>;
|
|
12
12
|
skip: import("vue").Ref<number, number>;
|
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
"details-0": "Details",
|
|
8
8
|
"document": "Documents",
|
|
9
9
|
"events": {
|
|
10
|
-
"key": "Events",
|
|
11
10
|
"register": "Register to this event",
|
|
12
11
|
"register-me": "Register",
|
|
13
12
|
"see-more": "See more events"
|
|
@@ -19,16 +18,23 @@
|
|
|
19
18
|
"inscription-gratuite-et-obligatoire": " Free and mandatory registration",
|
|
20
19
|
"inscription-ouverte": "Registration Open",
|
|
21
20
|
"items": {
|
|
22
|
-
"all": "all | all | all",
|
|
23
|
-
"activities": "activity | activity | activities",
|
|
24
21
|
"about": "about | about | about",
|
|
22
|
+
"activities": "activity | activity | activities",
|
|
23
|
+
"affiliations": "affiliation | affiliation | affiliations",
|
|
24
|
+
"all": "all | all | all",
|
|
25
|
+
"app": "application | application | applications",
|
|
26
|
+
"disciplines": "discipline | discipline | disciplines",
|
|
25
27
|
"events": "event | event | events",
|
|
26
28
|
"fellow": "fellow | fellow | fellows",
|
|
27
29
|
"fellowships": "fellowship | fellowship | fellowships",
|
|
30
|
+
"file": "document | document | documents",
|
|
31
|
+
"mailing": "mailing | mailing | mailings",
|
|
28
32
|
"news": "news | news | news",
|
|
29
33
|
"people": "one | person | people",
|
|
30
34
|
"projects": "project | project | projects",
|
|
31
|
-
"publications": "publication | publication | publications"
|
|
35
|
+
"publications": "publication | publication | publications",
|
|
36
|
+
"tags": "tag | tag | tags",
|
|
37
|
+
"user": "user | user | users"
|
|
32
38
|
},
|
|
33
39
|
"learn-more": "read more",
|
|
34
40
|
"list": {
|
|
@@ -252,8 +258,14 @@
|
|
|
252
258
|
"OTHERS": "Others"
|
|
253
259
|
}
|
|
254
260
|
},
|
|
255
|
-
"
|
|
256
|
-
"label": "Affiliations"
|
|
261
|
+
"affiliations": {
|
|
262
|
+
"label": "Affiliations",
|
|
263
|
+
"category": {
|
|
264
|
+
"MEMBER": "Members",
|
|
265
|
+
"SPONSOR": "Sponsors",
|
|
266
|
+
"PARTNER": "Partners",
|
|
267
|
+
"OTHER": "Others"
|
|
268
|
+
}
|
|
257
269
|
},
|
|
258
270
|
"disciplines": {
|
|
259
271
|
"label": "Discipline"
|
|
@@ -26,7 +26,15 @@
|
|
|
26
26
|
"news": "actualité | actualités | actualités",
|
|
27
27
|
"people": "personne | personne | personnes",
|
|
28
28
|
"projects": "projet | projet | projets",
|
|
29
|
-
"publications": "publication | publications | publications"
|
|
29
|
+
"publications": "publication | publications | publications",
|
|
30
|
+
"activities": "activité | activité | activités",
|
|
31
|
+
"affiliations": "affiliation | affiliation | affiliations",
|
|
32
|
+
"app": "application | application | applications",
|
|
33
|
+
"disciplines": "discipline | discipline | disciplines",
|
|
34
|
+
"file": "document | document | documents",
|
|
35
|
+
"mailing": "mailing | mailing | mailings",
|
|
36
|
+
"tags": "tag | tag | tags",
|
|
37
|
+
"user": "utilisateur | utilisateur | utilisateurs"
|
|
30
38
|
},
|
|
31
39
|
"learn-more": "En savoir plus",
|
|
32
40
|
"list": {
|
|
@@ -251,8 +259,14 @@
|
|
|
251
259
|
"OTHERS": "Autres"
|
|
252
260
|
}
|
|
253
261
|
},
|
|
254
|
-
"
|
|
255
|
-
"label": "Affiliations"
|
|
262
|
+
"affiliations": {
|
|
263
|
+
"label": "Affiliations",
|
|
264
|
+
"category": {
|
|
265
|
+
"MEMBER": "Members",
|
|
266
|
+
"SPONSOR": "Sponsors",
|
|
267
|
+
"PARTNER": "Partners",
|
|
268
|
+
"OTHER": "Others"
|
|
269
|
+
}
|
|
256
270
|
},
|
|
257
271
|
"disciplines": {
|
|
258
272
|
"label": "Discipline"
|
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"license": "AGPL-3.0-only",
|
|
3
3
|
"main": "./dist/module.mjs",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.165",
|
|
5
5
|
"name": "@paris-ias/list",
|
|
6
6
|
"repository": {
|
|
7
7
|
"url": "git+https://github.com/IEA-Paris/list.git",
|
|
8
8
|
"type": "git"
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@paris-ias/trees": "^2.0.
|
|
11
|
+
"@paris-ias/trees": "^2.0.32"
|
|
12
12
|
},
|
|
13
13
|
"description": "Paris IAS List Module",
|
|
14
14
|
"peerDependencies": {
|