@paris-ias/list 1.0.179 → 1.0.180

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.179",
4
+ "version": "1.0.180",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "0.8.4",
7
7
  "unbuild": "2.0.0"
@@ -91,6 +91,7 @@
91
91
  import { useI18n, useNuxtApp, computed } from "#imports"
92
92
  import { useDisplay } from "vuetify"
93
93
  import { useRootStore } from "../../stores/root"
94
+ import { highlightAndTruncate } from "../../composables/useUtils"
94
95
  const { $rootStore } = useNuxtApp()
95
96
  const { smAndDown, mdAndUp } = useDisplay()
96
97
 
@@ -35,6 +35,7 @@
35
35
 
36
36
  <script setup>
37
37
  import { useNuxtApp } from "#imports"
38
+ import { highlightAndTruncate } from "../../composables/useUtils"
38
39
  const { $rootStore } = useNuxtApp()
39
40
 
40
41
  const props = defineProps({
@@ -147,7 +147,7 @@ const { data, pending, error, refresh } = await useAsyncQuery(
147
147
  if (error.value) {
148
148
  console.error("GraphQL query error: ", error.value)
149
149
  } else {
150
- console.log("Query result data: ", data.value)
150
+ /* console.log("Query result data: ", data.value) */
151
151
  }
152
152
 
153
153
  // Apply data to store immediately if available
@@ -84,7 +84,7 @@ const { data, pending, error, refresh } = await useAsyncQuery(
84
84
  if (error.value) {
85
85
  console.error("GraphQL query error: ", error.value)
86
86
  } else {
87
- console.log("Query result data: ", data.value.items?.length)
87
+ /* console.log("Query result data: ", data.value.items?.length) */
88
88
  }
89
89
 
90
90
  // Apply data to store immediately if available
@@ -118,6 +118,62 @@ const updateSearch = async (newSearch) => {
118
118
  onBeforeUnmount(() => {
119
119
  /* rootStore.resetState("all", locale.value) */
120
120
  })
121
+
122
+ const socioscope = {
123
+ appId: ["iea"],
124
+ url: "https://thesocioscope.org",
125
+ subtitle: {
126
+ en: "Seeing How Social Change Takes Shape",
127
+ fr: "Voir comment le changement social prend forme",
128
+ },
129
+ date: {
130
+ $date: "2023-03-18T00:00:00.000Z",
131
+ },
132
+ image: {
133
+ url: "https://cdn-yggdrasil-dev.s3.eu-west-2.amazonaws.com/iea/project/the_socioscope.svg",
134
+ },
135
+ summary: {
136
+ en: "Through large scale data collection around the world and LLM-driven research, the Socioscope analyses how behaviours, norms, and practices evolve within sustainable food transitions.\nWe're building a systemic way to help make complex social patterns measurable, comparable, and understandable.",
137
+ fr: "Grâce à la collecte de données à grande échelle dans le monde entier et à la recherche pilotée par LLM, le Socioscope analyse comment les comportements, normes et pratiques évoluent dans les transitions alimentaires durables.\nNous construisons une méthode systématique pour rendre les schémas sociaux complexes mesurables, comparables et compréhensibles.",
138
+ },
139
+ description: {
140
+ en: "The Socioscope is a transformative qualitative research project that maps how behaviours, norms, and communities influence the transition toward sustainable food systems.\nThe Socioscope serves as a comprehensive observatory of these efforts, making knowledge accessible to researchers, policymakers, and practitioners worldwide. Equally important is shining a light on local initiatives that lead change on the ground and drive the shift toward a more sustainable food system.",
141
+ fr: "Le Socioscope est un projet de recherche qualitative transformatif qui cartographie comment les comportements, normes et communautés influencent la transition vers des systèmes alimentaires durables.\nLe Socioscope sert d'observatoire complet de ces efforts, rendant les connaissances accessibles aux chercheurs, décideurs politiques et praticiens du monde entier. Tout aussi important, il met en lumière les initiatives locales qui mènent le changement sur le terrain et conduisent la transition vers un système alimentaire plus durable.",
142
+ },
143
+ name: {
144
+ en: "The Socioscope",
145
+ fr: "Le Socioscope",
146
+ },
147
+ related: {
148
+ people: [
149
+ {
150
+ firstname: "Antoine",
151
+ lastname: "Cordelois",
152
+ image: {
153
+ url: "https://cdn-yggdrasil-dev.s3.eu-west-2.amazonaws.com/iea/people/antoine_cordelois.jpg",
154
+ },
155
+ },
156
+ {
157
+ firstname: "Saadi",
158
+ lastname: "Lahlou",
159
+ image: {
160
+ url: "https://cdn-yggdrasil-dev.s3.eu-west-2.amazonaws.com/iea/people/lahlou_saadi.jpg",
161
+ },
162
+ },
163
+ {
164
+ firstname: "Paulius",
165
+ lastname: "Yamin",
166
+ image: {
167
+ url: "https://cdn-yggdrasil-dev.s3.eu-west-2.amazonaws.com/iea/people/Paulius_Yamin.jpg",
168
+ },
169
+ },
170
+ ],
171
+ },
172
+ slug: {
173
+ fr: "le-socioscope",
174
+ en: "the-socioscope",
175
+ },
176
+ }
121
177
  </script>
122
178
  <style scoped>
123
179
  .results-container{display:flex;flex-direction:column;gap:8px;margin-left:8px}
@@ -11,7 +11,7 @@
11
11
  <div class="overflow-hidden mw-100">
12
12
  <!-- TODO debug why the picture is not displaying/sizing properly -->
13
13
  <v-img
14
- v-if="src"
14
+ v-if="src && computedSrc"
15
15
  :aspect-ratio="ratio"
16
16
  :class="{ 'img-animation': animate }"
17
17
  :lazy-src="
@@ -43,7 +43,8 @@ import { computed, useImage } from "#imports"
43
43
  const img = useImage()
44
44
 
45
45
  const computedSrc = computed(() => {
46
- return typeof props.src === "string" ? props.src : props.src.url
46
+ if (!props.src) return null
47
+ return typeof props.src === "string" ? props.src : props.src?.url || null
47
48
  })
48
49
  const props = defineProps({
49
50
  src: {
@@ -68,17 +69,16 @@ const props = defineProps({
68
69
  animate: { type: Boolean, default: true },
69
70
  })
70
71
  const _srcset = computed(() => {
71
- return img.getSizes(
72
- typeof props.src === "string" ? props.src : props.src.url,
73
- {
74
- sizes: "xs:100vw sm:100vw md:100vw lg:100vw xl:100vw",
75
- modifiers: {
76
- format: "webp",
77
- quality: 70,
78
- ...(props.width && { width: props.width }),
79
- },
72
+ const srcUrl = typeof props.src === "string" ? props.src : props.src?.url
73
+ if (!srcUrl) return { srcset: "", sizes: "" }
74
+ return img.getSizes(srcUrl, {
75
+ sizes: "xs:100vw sm:100vw md:100vw lg:100vw xl:100vw",
76
+ modifiers: {
77
+ format: "webp",
78
+ quality: 70,
79
+ ...(props.width && { width: props.width }),
80
80
  },
81
- )
81
+ })
82
82
  })
83
83
  </script>
84
84
 
@@ -36,11 +36,11 @@
36
36
  </template>
37
37
  <div
38
38
  v-html="
39
- $rootStore.search.length
39
+ rootStore.search.length
40
40
  ? highlightAndTruncate(
41
41
  300,
42
42
  item.name,
43
- $rootStore.search.split(' '),
43
+ rootStore.search.split(' '),
44
44
  )
45
45
  : item.name
46
46
  "
@@ -52,9 +52,12 @@
52
52
 
53
53
  <script setup>
54
54
  import { useDisplay } from "vuetify"
55
+ import { useRootStore } from "../../stores/root"
56
+ import { highlightAndTruncate } from "../../composables/useUtils"
55
57
  import { computed } from "#imports"
56
58
 
57
59
  const { name, mdAndUp } = useDisplay()
60
+ const rootStore = useRootStore()
58
61
 
59
62
  const props = defineProps({
60
63
  item: {
@@ -20,7 +20,7 @@
20
20
  ? highlightAndTruncate(
21
21
  300,
22
22
  item.firstname + ' ' + item.lastname,
23
- $rootStore.search.split(' '),
23
+ rootStore.search.split(' '),
24
24
  )
25
25
  : item.firstname + ' ' + item.lastname
26
26
  "
@@ -36,7 +36,7 @@
36
36
  ? highlightAndTruncate(
37
37
  300,
38
38
  item.groups.vintage[0].theme,
39
- $rootStore.search.split(' '),
39
+ rootStore.search.split(' '),
40
40
  )
41
41
  : item.groups.vintage[0].theme
42
42
  "
@@ -47,6 +47,7 @@
47
47
 
48
48
  <script setup>
49
49
  import { useRootStore } from "../../stores/root"
50
+ import { highlightAndTruncate } from "../../composables/useUtils"
50
51
  import { computed } from "#imports"
51
52
  import { useDisplay } from "vuetify"
52
53
 
@@ -17,7 +17,7 @@
17
17
  v-else
18
18
  v-html="
19
19
  rootStore.search.length
20
- ? highlightAndTruncate(300, item.name, $rootStore.search.split(' '))
20
+ ? highlightAndTruncate(300, item.name, rootStore.search.split(' '))
21
21
  : item.name
22
22
  "
23
23
  />
@@ -46,6 +46,7 @@
46
46
  <script setup>
47
47
  import { useDisplay } from "vuetify"
48
48
  import { useRootStore } from "../../stores/root"
49
+ import { highlightAndTruncate } from "../../composables/useUtils"
49
50
 
50
51
  const { mdAndUp } = useDisplay()
51
52
 
@@ -48,7 +48,7 @@
48
48
  ? highlightAndTruncate(
49
49
  300,
50
50
  item.name,
51
- $rootStore.search.split(' '),
51
+ rootStore.search.split(' '),
52
52
  )
53
53
  : item.name
54
54
  "
@@ -71,6 +71,7 @@
71
71
  <script setup>
72
72
  import { useDisplay } from "vuetify"
73
73
  import { useRootStore } from "../../stores/root"
74
+ import { highlightAndTruncate } from "../../composables/useUtils"
74
75
  import { computed } from "#imports"
75
76
  const rootStore = useRootStore()
76
77
 
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.179",
4
+ "version": "1.0.180",
5
5
  "name": "@paris-ias/list",
6
6
  "repository": {
7
7
  "url": "git+https://github.com/IEA-Paris/list.git",