@paris-ias/list 1.0.135 → 1.0.137
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/actions/ExpandedItem.vue +4 -0
- package/dist/runtime/components/actions/RowsItem.vue +5 -1
- package/dist/runtime/components/actions/View.vue +4 -4
- package/dist/runtime/components/affiliation/DenseItem.vue +4 -0
- package/dist/runtime/components/affiliation/ExpandedItem.vue +4 -0
- package/dist/runtime/components/affiliation/RowsItem.vue +5 -1
- package/dist/runtime/components/affiliation/View.vue +4 -4
- package/dist/runtime/components/apps/DenseItem.vue +4 -0
- package/dist/runtime/components/apps/ExpandedItem.vue +5 -1
- package/dist/runtime/components/apps/RowsItem.vue +5 -1
- package/dist/runtime/components/apps/View.vue +4 -4
- package/dist/runtime/components/disciplines/DenseItem.vue +4 -0
- package/dist/runtime/components/disciplines/ExpandedItem.vue +4 -0
- package/dist/runtime/components/disciplines/RowsItem.vue +5 -1
- package/dist/runtime/components/disciplines/View.vue +4 -4
- package/dist/runtime/components/events/Badges.vue +8 -12
- package/dist/runtime/components/events/DenseItem.vue +15 -14
- package/dist/runtime/components/events/ExpandedItem.vue +4 -0
- package/dist/runtime/components/events/RelatedItem.vue +4 -13
- package/dist/runtime/components/events/RowsItem.vue +9 -16
- package/dist/runtime/components/events/SlidingItem.vue +39 -47
- package/dist/runtime/components/events/View.vue +0 -2
- package/dist/runtime/components/fellowships/Badges.vue +15 -11
- package/dist/runtime/components/fellowships/DenseItem.vue +8 -11
- package/dist/runtime/components/fellowships/ExpandedItem.vue +8 -1
- package/dist/runtime/components/fellowships/RowsItem.vue +7 -16
- package/dist/runtime/components/files/DenseItem.vue +5 -0
- package/dist/runtime/components/files/ExpandedItem.vue +4 -0
- package/dist/runtime/components/files/RowsItem.vue +5 -1
- package/dist/runtime/components/files/View.vue +4 -4
- package/dist/runtime/components/list/atoms/ResultsList.vue +3 -3
- package/dist/runtime/components/list/inputs/Select.vue +0 -4
- package/dist/runtime/components/list/molecules/Filters.vue +5 -5
- package/dist/runtime/components/list/molecules/Header.vue +10 -4
- package/dist/runtime/components/list/organisms/List.vue +16 -5
- package/dist/runtime/components/mailing/DenseItem.vue +4 -0
- package/dist/runtime/components/mailing/ExpandedItem.vue +4 -0
- package/dist/runtime/components/mailing/RowsItem.vue +5 -1
- package/dist/runtime/components/mailing/View.vue +4 -4
- package/dist/runtime/components/misc/atoms/ImageContainer.vue +3 -45
- package/dist/runtime/components/misc/molecules/Related.vue +1 -1
- package/dist/runtime/components/news/DenseItem.vue +6 -11
- package/dist/runtime/components/news/ExpandedItem.vue +11 -17
- package/dist/runtime/components/news/RelatedItem.vue +4 -13
- package/dist/runtime/components/news/RowsItem.vue +10 -35
- package/dist/runtime/components/news/View.vue +7 -7
- package/dist/runtime/components/people/DenseItem.vue +7 -13
- package/dist/runtime/components/people/RelatedItem.vue +4 -14
- package/dist/runtime/components/people/RowsItem.vue +3 -21
- package/dist/runtime/components/projects/DenseItem.vue +6 -13
- package/dist/runtime/components/projects/RelatedItem.vue +4 -13
- package/dist/runtime/components/projects/RowsItem.vue +7 -14
- package/dist/runtime/components/projects/View.vue +6 -6
- package/dist/runtime/components/publications/DenseItem.vue +6 -8
- package/dist/runtime/components/publications/RelatedItem.vue +4 -13
- package/dist/runtime/components/publications/RowsItem.vue +7 -15
- package/dist/runtime/components/tags/DenseItem.vue +4 -0
- package/dist/runtime/components/tags/ExpandedItem.vue +4 -0
- package/dist/runtime/components/tags/RowsItem.vue +5 -1
- package/dist/runtime/components/tags/View.vue +4 -4
- package/dist/runtime/components/users/DenseItem.vue +4 -0
- package/dist/runtime/components/users/ExpandedItem.vue +5 -1
- package/dist/runtime/components/users/RowsItem.vue +5 -1
- package/dist/runtime/components/users/View.vue +4 -4
- package/dist/runtime/stores/root.js +1 -56
- package/package.json +3 -4
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineStore } from "pinia";
|
|
2
2
|
import SEARCH from "../graphql/list/search.gql";
|
|
3
|
-
import { useNuxtApp, useRouter
|
|
3
|
+
import { useNuxtApp, useRouter } from "#imports";
|
|
4
4
|
export const useRootStore = defineStore("rootStore", {
|
|
5
5
|
state: () => ({
|
|
6
6
|
scrolled: typeof window !== "undefined" ? window.scrollY > 0 : false,
|
|
@@ -39,26 +39,12 @@ 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();
|
|
58
45
|
const { currentRoute } = useRouter();
|
|
59
46
|
const query = currentRoute.value.query;
|
|
60
47
|
const filters = $stores[type]?.filters ?? {};
|
|
61
|
-
console.log("filters: ", filters);
|
|
62
48
|
if (Object.keys(query)?.length) {
|
|
63
49
|
Object.keys(query).forEach((filter) => {
|
|
64
50
|
if (filter in filters) {
|
|
@@ -74,29 +60,6 @@ export const useRootStore = defineStore("rootStore", {
|
|
|
74
60
|
}
|
|
75
61
|
console.log("query loaded");
|
|
76
62
|
},
|
|
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
63
|
setFiltersCount(type) {
|
|
101
64
|
console.log("setFiltersCount", type);
|
|
102
65
|
const { $stores } = useNuxtApp();
|
|
@@ -132,24 +95,6 @@ export const useRootStore = defineStore("rootStore", {
|
|
|
132
95
|
};
|
|
133
96
|
router.replace({ query: routeQuery });
|
|
134
97
|
},
|
|
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
98
|
async resetState(type, lang = "en") {
|
|
154
99
|
const { $stores, $models } = useNuxtApp();
|
|
155
100
|
const moduleState = $stores[type];
|
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.0.
|
|
4
|
+
"version": "1.0.137",
|
|
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/data": "^1.8.
|
|
11
|
+
"@paris-ias/data": "^1.8.54"
|
|
12
12
|
},
|
|
13
13
|
"description": "Paris IAS List Module",
|
|
14
14
|
"peerDependencies": {
|
|
@@ -19,7 +19,6 @@
|
|
|
19
19
|
"@nuxt/module-builder": "^0.8.4",
|
|
20
20
|
"@nuxt/schema": "^3.16.2",
|
|
21
21
|
"@nuxt/test-utils": "^3.17.2",
|
|
22
|
-
"@nuxtjs/apollo": "^5.0.0-alpha.14",
|
|
23
22
|
"@nuxtjs/i18n": "^9.5.2",
|
|
24
23
|
"@nuxtjs/mdc": "0.16.1",
|
|
25
24
|
"@pinia/nuxt": "^0.5.4",
|
|
@@ -69,6 +68,6 @@
|
|
|
69
68
|
},
|
|
70
69
|
"packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e",
|
|
71
70
|
"devDependencies": {
|
|
72
|
-
"@
|
|
71
|
+
"@nuxtjs/apollo": "^5.0.0-alpha.15"
|
|
73
72
|
}
|
|
74
73
|
}
|