@paris-ias/list 1.1.10 → 1.1.12

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.1.10",
4
+ "version": "1.1.12",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "0.8.4",
7
7
  "unbuild": "2.0.0"
@@ -97,6 +97,15 @@ const props = defineProps({
97
97
  required: true,
98
98
  },
99
99
 
100
+ // Logical view selector (e.g. "fellows", "media", "tools"). Fixed per page,
101
+ // resolved server-side into additional filters. Not persisted to the URL or
102
+ // exposed in the filter UI.
103
+ modifier: {
104
+ type: String,
105
+ required: false,
106
+ default: undefined,
107
+ },
108
+
100
109
  addButton: {
101
110
  type: Boolean,
102
111
  required: false,
@@ -113,7 +122,7 @@ rootStore.loadRouteQuery(props.type)
113
122
 
114
123
  // Apollo: reactive query using variables computed from store
115
124
  const variables = computed(() => {
116
- return rootStore.buildListVariables(props.type, locale.value)
125
+ return rootStore.buildListVariables(props.type, locale.value, props.modifier)
117
126
  })
118
127
 
119
128
  // Computed properties for dynamic components
@@ -28,7 +28,11 @@
28
28
  class="dense"
29
29
  :class="expanded ? 'ml-md-8' : 'ml-md-2'"
30
30
  >
31
+ <div class="text-overline" v-if="item.groups && item.groups.team">
32
+ {{ item.latest.role[locale] }}
33
+ </div>
31
34
  <v-skeleton-loader v-if="loading" type="heading" />
35
+
32
36
  <div
33
37
  v-else
34
38
  class="d-flex justify-space-between text-title align-center pt-md-2"
@@ -130,6 +134,7 @@ import { computed, ref, useRoute, useNuxtApp, useLocalePath } from "#imports"
130
134
  import { useDisplay } from "vuetify"
131
135
  const { name } = useRoute()
132
136
  const localePath = useLocalePath()
137
+ const { locale } = useI18n()
133
138
 
134
139
  const { mdAndUp, name: displayName } = useDisplay()
135
140
  const rootStore = useRootStore()
@@ -55,7 +55,7 @@ export declare const useRootStore: import("pinia").StoreDefinition<"rootStore",
55
55
  lang: string;
56
56
  writeUrl?: boolean;
57
57
  }): void;
58
- buildListVariables(type: string, lang?: string): any;
58
+ buildListVariables(type: string, lang?: string, modifier?: string): any;
59
59
  applyListResult(type: string, data: Record<string, any>, itemsPerPageOverride?: number): void;
60
60
  }>;
61
61
  export {};
@@ -206,7 +206,7 @@ export const useRootStore = defineStore("rootStore", {
206
206
  }
207
207
  if (writeUrl) this.updateRouteQuery(type);
208
208
  },
209
- buildListVariables(type, lang = "en") {
209
+ buildListVariables(type, lang = "en", modifier) {
210
210
  const { $stores } = useNuxtApp();
211
211
  const itemsPerPage = type === "all" ? 3 : $stores[type]?.itemsPerPage || 10;
212
212
  const filters = {};
@@ -226,6 +226,9 @@ export const useRootStore = defineStore("rootStore", {
226
226
  skip: +$stores[type]?.page === 1 ? 0 : (+$stores[type]?.page - 1) * itemsPerPage,
227
227
  limit: itemsPerPage,
228
228
  ...type !== "all" && localSearch?.length && { search: localSearch },
229
+ // Logical view selector resolved server-side into additional
230
+ // filters. Travels inside `options` alongside filters/sort.
231
+ ...modifier ? { modifier } : {},
229
232
  filters,
230
233
  sort: $stores[type]?.sortKey || ($stores[type]?.sort ? Object.keys($stores[type].sort).find(
231
234
  (key) => $stores[type].sort[key].default
@@ -184,6 +184,7 @@
184
184
  "fellows": "Fellows",
185
185
  "sab": "Scientific Advisory Board",
186
186
  "sponsor": "Sponsor",
187
+ "ethics": "Ethics and Professional Conduct Committee",
187
188
  "team": "Team"
188
189
  },
189
190
  "member": {
@@ -265,6 +266,7 @@
265
266
  "BOOK_CHAPTER": "Book chapter",
266
267
  "CONFERENCE_PAPER": "Conference paper",
267
268
  "DATA": "Data",
269
+ "NEWS": "News",
268
270
  "PODCAST": "Podcast",
269
271
  "REPORT": "Report",
270
272
  "SOFTWARE": "Software",
@@ -176,6 +176,7 @@
176
176
  "fellows": "Résidents",
177
177
  "sab": "Conseil scientifique",
178
178
  "sponsor": "Mécènes",
179
+ "ethics": "Conseil éthique et déontologique",
179
180
  "team": "Équipe"
180
181
  },
181
182
  "member": {
@@ -255,6 +256,7 @@
255
256
  "BOOK_CHAPTER": "Chapitre de livre",
256
257
  "CONFERENCE_PAPER": "Actes de conférence",
257
258
  "DATA": "Données",
259
+ "NEWS": "Actualités",
258
260
  "PODCAST": "Podcast",
259
261
  "REPORT": "Rapport",
260
262
  "SOFTWARE": "Logiciel",
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.1.10",
4
+ "version": "1.1.12",
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.1.6"
11
+ "@paris-ias/trees": "^2.2.1"
12
12
  },
13
13
  "description": "Paris IAS List Module",
14
14
  "peerDependencies": {