@paris-ias/list 1.0.134 → 1.0.136
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/DenseItem.vue +14 -0
- package/dist/runtime/components/apps/DenseItem.vue +14 -0
- package/dist/runtime/components/disciplines/DenseItem.vue +14 -0
- package/dist/runtime/components/events/View.vue +1 -3
- package/dist/runtime/components/fellowships/RowsItem.vue +0 -2
- package/dist/runtime/components/files/DenseItem.vue +14 -0
- package/dist/runtime/components/list/atoms/ResultsList.vue +3 -3
- package/dist/runtime/components/list/atoms/SearchInput.vue +1 -1
- package/dist/runtime/components/list/inputs/Select.vue +0 -4
- package/dist/runtime/components/list/molecules/Header.vue +10 -4
- package/dist/runtime/components/list/organisms/List.vue +5 -9
- package/dist/runtime/components/mailing/DenseItem.vue +14 -0
- package/dist/runtime/components/tags/DenseItem.vue +14 -0
- package/dist/runtime/components/users/DenseItem.vue +14 -0
- package/dist/runtime/stores/root.js +0 -54
- package/package.json +1 -1
package/dist/module.json
CHANGED
|
@@ -326,13 +326,11 @@ const props = defineProps({
|
|
|
326
326
|
},
|
|
327
327
|
})
|
|
328
328
|
|
|
329
|
-
console.log("item", props.item)
|
|
330
|
-
// UI components models
|
|
331
329
|
const panel = ref(["presentation"])
|
|
332
330
|
|
|
333
331
|
function redirectToMap(long, lat) {
|
|
334
332
|
router.push(
|
|
335
|
-
`https://www.openstreetmap.org/?mlat=${lat}&mlon=${long}#map=19/${lat}/${long}
|
|
333
|
+
`https://www.openstreetmap.org/?mlat=${lat}&mlon=${long}#map=19/${lat}/${long}`
|
|
336
334
|
)
|
|
337
335
|
}
|
|
338
336
|
</script>
|
|
@@ -13,7 +13,7 @@ import { useRootStore } from "../../../stores/root"
|
|
|
13
13
|
import { useNuxtApp, resolveComponent, computed } from "#imports"
|
|
14
14
|
const { $stores } = useNuxtApp()
|
|
15
15
|
const rootStore = useRootStore()
|
|
16
|
-
|
|
16
|
+
|
|
17
17
|
const props = defineProps({
|
|
18
18
|
type: {
|
|
19
19
|
type: String,
|
|
@@ -27,7 +27,7 @@ const itemTemplate = computed(() =>
|
|
|
27
27
|
capitalize(props.type) +
|
|
28
28
|
capitalize($stores[props.type].view.name) +
|
|
29
29
|
"Item"
|
|
30
|
-
).toString()
|
|
31
|
-
)
|
|
30
|
+
).toString()
|
|
31
|
+
)
|
|
32
32
|
)
|
|
33
33
|
</script>
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
<script setup>
|
|
33
33
|
import { useDebounceFn } from "@vueuse/core"
|
|
34
34
|
import { useRootStore } from "../../../stores/root"
|
|
35
|
-
import { computed, useI18n } from "#imports"
|
|
35
|
+
import { computed, useI18n, useNuxtApp } from "#imports"
|
|
36
36
|
const { $stores } = useNuxtApp()
|
|
37
37
|
|
|
38
38
|
const { locale } = useI18n()
|
|
@@ -15,10 +15,6 @@ const { $stores } = useNuxtApp()
|
|
|
15
15
|
const props = defineProps(["type", "items", "name"])
|
|
16
16
|
const val = computed({
|
|
17
17
|
get() {
|
|
18
|
-
console.log(
|
|
19
|
-
"$stores[props.type].filters[props.name]?.value: ",
|
|
20
|
-
$stores[props.type].filters[props.name]?.value,
|
|
21
|
-
)
|
|
22
18
|
return $stores[props.type].filters[props.name]?.value || []
|
|
23
19
|
},
|
|
24
20
|
set(value) {
|
|
@@ -7,7 +7,13 @@
|
|
|
7
7
|
@open="filtersOpen = $event"
|
|
8
8
|
/>
|
|
9
9
|
<v-spacer />
|
|
10
|
-
<ListAtomsResetButton
|
|
10
|
+
<ListAtomsResetButton
|
|
11
|
+
v-if="
|
|
12
|
+
$stores[type].filtersCount ||
|
|
13
|
+
($stores[type].search && $stores[type].search.trim() !== '')
|
|
14
|
+
"
|
|
15
|
+
:type
|
|
16
|
+
/>
|
|
11
17
|
<ListAtomsViewMenu :type />
|
|
12
18
|
<ListAtomsSortMenu :type />
|
|
13
19
|
</div>
|
|
@@ -32,16 +38,16 @@ const filtersOpen = ref(false)
|
|
|
32
38
|
const visible = computed(() => {
|
|
33
39
|
console.log(
|
|
34
40
|
"$stores[props.type]?.filtersCount > 0: ",
|
|
35
|
-
$stores[props.type]?.filtersCount > 0
|
|
41
|
+
$stores[props.type]?.filtersCount > 0
|
|
36
42
|
)
|
|
37
43
|
console.log(
|
|
38
44
|
"$stores[props.type]?.filtersCount: ",
|
|
39
|
-
$stores[props.type]?.filtersCount
|
|
45
|
+
$stores[props.type]?.filtersCount
|
|
40
46
|
)
|
|
41
47
|
console.log(
|
|
42
48
|
!!(
|
|
43
49
|
$stores[props.type]?.filtersCount && $stores[props.type]?.filtersCount > 0
|
|
44
|
-
)
|
|
50
|
+
)
|
|
45
51
|
)
|
|
46
52
|
return !!(
|
|
47
53
|
$stores[props.type]?.filtersCount && $stores[props.type]?.filtersCount > 0
|
|
@@ -43,6 +43,7 @@ import {
|
|
|
43
43
|
onMounted,
|
|
44
44
|
useI18n,
|
|
45
45
|
useRoute,
|
|
46
|
+
navigateTo,
|
|
46
47
|
} from "#imports"
|
|
47
48
|
const { $stores } = useNuxtApp()
|
|
48
49
|
const { locale } = useI18n()
|
|
@@ -87,7 +88,7 @@ const props = defineProps({
|
|
|
87
88
|
const view = computed(() =>
|
|
88
89
|
props.customView
|
|
89
90
|
? resolveComponent("ListViews" + capitalize(props.customView))
|
|
90
|
-
: resolveComponent("ListViews" + capitalize($stores[props.type].view.name))
|
|
91
|
+
: resolveComponent("ListViews" + capitalize($stores[props.type].view.name))
|
|
91
92
|
)
|
|
92
93
|
const itemTemplate = computed(() =>
|
|
93
94
|
resolveComponent(
|
|
@@ -95,8 +96,8 @@ const itemTemplate = computed(() =>
|
|
|
95
96
|
capitalize(props.type) +
|
|
96
97
|
capitalize($stores[props.type].view.name) +
|
|
97
98
|
"Item"
|
|
98
|
-
).toString()
|
|
99
|
-
)
|
|
99
|
+
).toString()
|
|
100
|
+
)
|
|
100
101
|
)
|
|
101
102
|
const numberOfPages = computed(() => $stores[props.type].numberOfPages)
|
|
102
103
|
|
|
@@ -128,11 +129,6 @@ onMounted(async () => {
|
|
|
128
129
|
console.error("Error fetching list:", e)
|
|
129
130
|
}
|
|
130
131
|
})
|
|
131
|
-
// try {
|
|
132
|
-
// await rootStore.update(props.type, locale.value);
|
|
133
|
-
// } catch (error) {
|
|
134
|
-
// console.log("error fetching update list: ", error);
|
|
135
|
-
// }
|
|
136
132
|
|
|
137
133
|
watch(
|
|
138
134
|
() => page.value,
|
|
@@ -144,7 +140,7 @@ watch(
|
|
|
144
140
|
navigateTo({ query }, { replace: true })
|
|
145
141
|
await nextTick()
|
|
146
142
|
window.scrollTo({ top: 0, behavior: "smooth" })
|
|
147
|
-
}
|
|
143
|
+
}
|
|
148
144
|
)
|
|
149
145
|
onBeforeUnmount(() => {
|
|
150
146
|
rootStore.resetState(props.type, locale.value)
|
|
@@ -39,19 +39,6 @@ export const useRootStore = defineStore("rootStore", {
|
|
|
39
39
|
this.scrolled = window.scrollY > 0;
|
|
40
40
|
}
|
|
41
41
|
},
|
|
42
|
-
/* saveFiltersToLocalStorage(type: string): void {
|
|
43
|
-
const { $stores } = useNuxtApp() as {
|
|
44
|
-
$stores: Record<string, ModuleStore>;
|
|
45
|
-
};
|
|
46
|
-
const filters = $stores[type]?.filters ?? {};
|
|
47
|
-
const values = Object.fromEntries(
|
|
48
|
-
Object.entries(filters).map(([key, filter]) => [key, filter.value])
|
|
49
|
-
);
|
|
50
|
-
|
|
51
|
-
const local = JSON.parse(localStorage.getItem("PARIS_IAS") || "{}");
|
|
52
|
-
local[`${type}_filters`] = values;
|
|
53
|
-
localStorage.setItem("PARIS_IAS", JSON.stringify(local));
|
|
54
|
-
}, */
|
|
55
42
|
loadRouteQuery(type) {
|
|
56
43
|
console.log("loadRouteQuery", type);
|
|
57
44
|
const { $stores } = useNuxtApp();
|
|
@@ -74,29 +61,6 @@ export const useRootStore = defineStore("rootStore", {
|
|
|
74
61
|
}
|
|
75
62
|
console.log("query loaded");
|
|
76
63
|
},
|
|
77
|
-
/* loadFiltersFromLocalStorage(type: string): void {
|
|
78
|
-
const { $stores } = useNuxtApp() as {
|
|
79
|
-
$stores: Record<string, ModuleStore>
|
|
80
|
-
}
|
|
81
|
-
const local = JSON.parse(localStorage.getItem("PARIS_IAS") || "{}")
|
|
82
|
-
const saved = local[`${type}_filters`] ?? null
|
|
83
|
-
|
|
84
|
-
if (!saved) {
|
|
85
|
-
console.log(`[${type}] No data to restore.`)
|
|
86
|
-
return
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
const filters = $stores[type]?.filters ?? {}
|
|
90
|
-
for (const [key, value] of Object.entries(saved)) {
|
|
91
|
-
if (filters[key]) {
|
|
92
|
-
filters[key].value = value
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
this.setFiltersCount(type)
|
|
97
|
-
this.updateRouteQuery(type)
|
|
98
|
-
console.log(`[${type}] Filters restored from localStorage`, saved)
|
|
99
|
-
}, */
|
|
100
64
|
setFiltersCount(type) {
|
|
101
65
|
console.log("setFiltersCount", type);
|
|
102
66
|
const { $stores } = useNuxtApp();
|
|
@@ -132,24 +96,6 @@ export const useRootStore = defineStore("rootStore", {
|
|
|
132
96
|
};
|
|
133
97
|
router.replace({ query: routeQuery });
|
|
134
98
|
},
|
|
135
|
-
// async resetState(type: string, lang: string): void {
|
|
136
|
-
// console.log("resetState", { type, lang })
|
|
137
|
-
// const { $stores, $models } = useNuxtApp() as NuxtAppExtended
|
|
138
|
-
// console.log("$models[type]: ", $models[type])
|
|
139
|
-
// console.log("$stores[type]: ", $stores[type])
|
|
140
|
-
// if ($models[type] && $stores[type]) {
|
|
141
|
-
// $stores[type].filters = $models[type].filters
|
|
142
|
-
// }
|
|
143
|
-
// console.log("resetState")
|
|
144
|
-
// this.search = ""
|
|
145
|
-
// this.page = 1
|
|
146
|
-
// this.scrolled = false
|
|
147
|
-
// this.loading = false
|
|
148
|
-
// this.total = 0
|
|
149
|
-
// this.skip = 0
|
|
150
|
-
// this.numberOfPages = 0
|
|
151
|
-
// await this.update(type, lang)
|
|
152
|
-
// },
|
|
153
99
|
async resetState(type, lang = "en") {
|
|
154
100
|
const { $stores, $models } = useNuxtApp();
|
|
155
101
|
const moduleState = $stores[type];
|