@paris-ias/list 1.0.158 → 1.0.159

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.158",
4
+ "version": "1.0.159",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "0.8.4",
7
7
  "unbuild": "2.0.0"
@@ -10,10 +10,6 @@ const props = defineProps({
10
10
  type: Object,
11
11
  required: true,
12
12
  },
13
- pathPrefix: {
14
- type: String,
15
- required: true,
16
- },
17
13
  })
18
14
  </script>
19
15
 
@@ -29,10 +29,6 @@ import { computed } from "#imports"
29
29
  const props = defineProps({
30
30
  item: { type: Object, required: true },
31
31
  view: { type: Boolean, required: false, default: false },
32
- pathPrefix: {
33
- type: String,
34
- required: true,
35
- },
36
32
  })
37
33
 
38
34
  const registrationStatus = computed(() => {
@@ -43,11 +43,6 @@ const props = defineProps({
43
43
  type: Number,
44
44
  required: true,
45
45
  },
46
-
47
- pathPrefix: {
48
- type: String,
49
- required: true,
50
- },
51
46
  loading: {
52
47
  type: Boolean,
53
48
  required: false,
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <v-col cols="12" md="6" class="highlight-on-hover">
3
3
  <div v-ripple class="border-thin pa-6">
4
- <FellowshipsBadges />
4
+ <FellowshipsBadges :item />
5
5
  <div class="d-flex">
6
6
  <v-skeleton-loader v-if="isLoading" type="heading" />
7
7
  <div v-else class="text-h4 text-black text-wrap mt-4 pb-4">
@@ -127,13 +127,17 @@ rootStore.setLoading(true, props.type)
127
127
  // Initial route -> store (single source-of-truth on first load)
128
128
  rootStore.loadRouteQuery(props.type)
129
129
 
130
+ // Apollo: reactive query using variables computed from store
131
+ const variables = computed(() => {
132
+ console.log("computed variables loop")
133
+ return rootStore.buildListVariables(props.type, locale.value)
134
+ })
135
+
130
136
  // Computed properties for dynamic components
131
137
  const view = computed(() =>
132
- props.customView
133
- ? resolveComponent("ListViews" + capitalize(props.customView))
134
- : resolveComponent(
135
- "ListViews" + capitalize($stores[props.type]?.view?.name || "list"),
136
- ),
138
+ resolveComponent(
139
+ "ListViews" + capitalize($stores[props.type]?.view?.name || "list")
140
+ )
137
141
  )
138
142
  const itemTemplate = computed(() =>
139
143
  resolveComponent(
@@ -141,15 +145,9 @@ const itemTemplate = computed(() =>
141
145
  capitalize(props.type) +
142
146
  capitalize($stores[props.type]?.view?.name || "list") +
143
147
  "Item"
144
- ).toString(),
145
- ),
148
+ ).toString()
149
+ )
146
150
  )
147
-
148
- // Apollo: reactive query using variables computed from store
149
- const variables = computed(() => {
150
- console.log("computed variables loop")
151
- return rootStore.buildListVariables(props.type, locale.value)
152
- })
153
151
  console.log("Starting query for type: ", props.type)
154
152
  console.log("Using variables: ", variables.value)
155
153
 
@@ -160,7 +158,7 @@ const { data, pending, error, refresh } = await useAsyncQuery(
160
158
  {
161
159
  key: `list-${props.type}`, // Unique key for caching
162
160
  server: true, // Enable SSR
163
- },
161
+ }
164
162
  )
165
163
  if (error.value) {
166
164
  console.error("GraphQL query error: ", error.value)
@@ -190,7 +188,7 @@ watch(
190
188
  rootStore.setLoading(false, props.type)
191
189
  }
192
190
  },
193
- { deep: true },
191
+ { deep: true }
194
192
  )
195
193
 
196
194
  // Reactive items computed from the store (single source of truth)
@@ -10,10 +10,6 @@ const props = defineProps({
10
10
  type: Object,
11
11
  required: true,
12
12
  },
13
- pathPrefix: {
14
- type: String,
15
- required: true,
16
- },
17
13
  })
18
14
  </script>
19
15
 
@@ -1,9 +1,5 @@
1
1
  <template>
2
- <v-row
3
- class="highlight-on-hover pa-3"
4
- no-gutters
5
- @click="$router.push(pathPrefix)"
6
- >
2
+ <v-row class="highlight-on-hover pa-3" no-gutters>
7
3
  <v-col cols="12" class="px-6">
8
4
  <v-skeleton-loader v-if="isLoading" type="heading, text@8, button" />
9
5
  <template v-else>
@@ -43,7 +43,6 @@
43
43
  class="mt-4"
44
44
  variant="outlined"
45
45
  tile
46
- :to="pathPrefix"
47
46
  :size="
48
47
  ['small', 'small', 'small', 'default', 'default', 'large'][
49
48
  ['xs', 'sm', 'md', 'lg', 'xl', 'xxl'].indexOf(name || 'md')
@@ -213,7 +213,7 @@ export const useRootStore = defineStore("rootStore", {
213
213
  const storeFilters = $stores[type]?.filters ?? {};
214
214
  for (const filter in storeFilters) {
215
215
  const filterValue = storeFilters[filter]?.value;
216
- if (typeof filterValue !== "undefined" && filterValue !== null && (Array.isArray(filterValue) ? filterValue.length > 0 : true)) {
216
+ if (typeof filterValue !== "undefined" && filterValue !== "" && filterValue !== null && (Array.isArray(filterValue) ? filterValue.length > 0 : true)) {
217
217
  filters[filter] = filterValue;
218
218
  }
219
219
  }
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.158",
4
+ "version": "1.0.159",
5
5
  "name": "@paris-ias/list",
6
6
  "repository": {
7
7
  "url": "git+https://github.com/IEA-Paris/list.git",