@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 +1 -1
- package/dist/runtime/components/affiliation/ExpandedItem.vue +0 -4
- package/dist/runtime/components/fellowships/Badges.vue +0 -4
- package/dist/runtime/components/fellowships/DenseItem.vue +0 -5
- package/dist/runtime/components/fellowships/RowsItem.vue +1 -1
- package/dist/runtime/components/list/organisms/List.vue +13 -15
- package/dist/runtime/components/mailing/ExpandedItem.vue +0 -4
- package/dist/runtime/components/mailing/RowsItem.vue +1 -5
- package/dist/runtime/components/projects/RowsItem.vue +0 -1
- package/dist/runtime/stores/root.js +1 -1
- package/package.json +1 -1
package/dist/module.json
CHANGED
|
@@ -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(() => {
|
|
@@ -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
|
-
|
|
133
|
-
|
|
134
|
-
|
|
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)
|
|
@@ -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>
|
|
@@ -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
|
}
|