@paris-ias/list 1.0.83 → 1.0.85

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.83",
4
+ "version": "1.0.85",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.0",
7
7
  "unbuild": "3.5.0"
@@ -24,7 +24,7 @@
24
24
  </template>
25
25
 
26
26
  <script setup>
27
- import { useNuxtApp, onMounted } from "#imports";
27
+ import { useNuxtApp, onMounted, computed } from "#imports";
28
28
  import { useRootStore } from "../../../stores/root";
29
29
  const { $stores } = useNuxtApp();
30
30
  const rootStore = useRootStore();
@@ -35,7 +35,4 @@ const props = defineProps({
35
35
  required: true
36
36
  }
37
37
  });
38
- onMounted(() => {
39
- console.log("store module", $stores[props.type]);
40
- });
41
38
  </script>
@@ -3,14 +3,11 @@
3
3
  <v-col cols="12">
4
4
  <div class="d-flex">
5
5
  <ListAtomsFiltersMenu
6
- :open="filtersOpen"
6
+ :open="filtersOpen || visible"
7
7
  @open="filtersOpen = $event"
8
8
  />
9
9
  <v-spacer />
10
- <ListAtomsResetButton
11
- v-if="$stores[type]?.filtersCount && $stores[type]?.filtersCount > 0"
12
- :type="type"
13
- />
10
+ <ListAtomsResetButton v-if="visible" :type="type" />
14
11
  <ListAtomsViewMenu :type="type" />
15
12
  <ListAtomsSortMenu :type="type" />
16
13
  </div>
@@ -26,10 +23,11 @@
26
23
  </template>
27
24
 
28
25
  <script setup>
29
- import { ref } from "vue";
30
- import { useRoute } from "#imports";
31
- const route = useRoute();
32
- const filtersOpen = ref(!!Object.keys(route.query)?.length);
26
+ import { ref, computed } from "vue";
27
+ const filtersOpen = ref(false);
28
+ const visible = computed(() => {
29
+ return $stores[type]?.filtersCount && $stores[type]?.filtersCount > 0;
30
+ });
33
31
  const props = defineProps({
34
32
  type: {
35
33
  type: String,
@@ -229,7 +229,7 @@ export const useRootStore = defineStore("rootStore", {
229
229
  this.results = data?.value?.[key];
230
230
  } else {
231
231
  const items = data?.value?.[key]?.items ?? [];
232
- this.total = data?.value?.[key]?.total;
232
+ $stores[type].total = data?.value?.[key]?.total;
233
233
  result = {
234
234
  ...data?.value?.[key],
235
235
  items: items.map(({ id, ...rest }) => ({
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.83",
4
+ "version": "1.0.85",
5
5
  "name": "@paris-ias/list",
6
6
  "repository": {
7
7
  "url": "git+https://github.com/IEA-Paris/list.git",