itube-specs 0.0.382 → 0.0.385

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.
@@ -5,7 +5,7 @@
5
5
  {'--first-hidden': hideFirstRow},
6
6
  ]"
7
7
  >
8
- <slot name="gird-start" />
8
+ <slot name="grid-start" />
9
9
  <FVideoCard
10
10
  v-for="(item, index) in items"
11
11
  class="s-grid-videos__card"
@@ -17,7 +17,7 @@
17
17
  :playlist-id="playlistId"
18
18
  :playlist="playlist"
19
19
  />
20
- <slot name="gird-end" />
20
+ <slot name="grid-end" />
21
21
  <slot></slot>
22
22
  </div>
23
23
  </template>
@@ -9,7 +9,7 @@
9
9
  v-for="(group, index) in groups"
10
10
  :key="`filter-group-${index}`"
11
11
  class="s-filter-page__group"
12
- :open="index === 0 || activeGroup === group?.order"
12
+ :open="index === 0 || activeGroup === group?.order || !isMobile(breakpoints).value"
13
13
  >
14
14
  <summary
15
15
  v-if="filters.length > 0"
@@ -17,7 +17,7 @@
17
17
  >
18
18
  {{ group?.title }}
19
19
  <SIcon
20
- class="s-filter-page__group-title-icon"
20
+ class="s-filter-page__group-title-icon _to-sm"
21
21
  size="32"
22
22
  name="chevron-down"
23
23
  />
@@ -61,10 +61,10 @@
61
61
  </template>
62
62
 
63
63
  <script setup lang="ts">
64
- import type { IModelFilter, IModelFilterOptions } from '../../types';
64
+ import type { IModelFilter, IModelFilterOptions, CssBreakpoints } from '../../types';
65
65
 
66
66
  import { useRoute, useRouter } from 'vue-router';
67
- import { getMonth } from '../../runtime';
67
+ import { getMonth, isMobile } from '../../runtime';
68
68
 
69
69
  const props = defineProps<{
70
70
  filters: IModelFilter[]
@@ -77,6 +77,8 @@ const route = useRoute();
77
77
  const router = useRouter();
78
78
  const activeGroup = computed(() => Number(route.query[ 'group' ]));
79
79
 
80
+ const breakpoints = useAppConfig().cssBreakpoints as Record<CssBreakpoints, number>;
81
+
80
82
  const groups = computed(() => {
81
83
  const uniqueNames = [...new Set(props.filters.map(item => item.group.title))];
82
84
  return uniqueNames.map(name => {
@@ -4,7 +4,7 @@
4
4
  class="s-sort__button"
5
5
  v-for="(item, index) in items"
6
6
  :key="`sort-item-${index}`"
7
- :to="linkTo(item, index)"
7
+ :to="item.query ? linkTo(item, index) : item.value"
8
8
  :active="isActive(item, index)"
9
9
  :size="size"
10
10
  :theme="theme"
@@ -52,6 +52,10 @@ function isActive(item: IChipsItem, index: number) {
52
52
  return true;
53
53
  }
54
54
 
55
- return route.query[item.key?.toLowerCase() || ''] === String(item.value)?.toLowerCase()
55
+ if (item.key && item.query) {
56
+ return route.query[item.key?.toLowerCase() || ''] === String(item.value)?.toLowerCase()
57
+ }
58
+
59
+ return route.path === item.value;
56
60
  }
57
61
  </script>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "itube-specs",
3
3
  "type": "module",
4
- "version": "0.0.382",
4
+ "version": "0.0.385",
5
5
  "main": "./nuxt.config.ts",
6
6
  "types": "./types/index.d.ts",
7
7
  "scripts": {