itube-specs 0.0.224 → 0.0.225

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.
@@ -43,8 +43,8 @@
43
43
  <SButton
44
44
  theme="secondary"
45
45
  wide
46
- :disabled="!isFiltered"
47
46
  @click="reset"
47
+ :disabled="!isFiltered"
48
48
  >{{ t('reset_all') }}
49
49
  </SButton>
50
50
  <SButton
@@ -137,7 +137,9 @@ function saveResult() {
137
137
  }
138
138
 
139
139
  function reset() {
140
- closePopup();
140
+ durationValue.value = '';
141
+ addedValue.value = '';
142
+ filterValue.value = {};
141
143
  router.push({
142
144
  query: {
143
145
  categories: null,
@@ -153,5 +155,5 @@ const filterTitle = computed(() => {
153
155
  return count > 0 ? `${filterText}: ${count}` : t('filter')
154
156
  })
155
157
 
156
- const isFiltered = computed(() => !!route.query[ 'categories' ]);
158
+ const isFiltered = computed(() => !!route.query[ 'categories' ] || Object.keys(filterValue.value).length > 0);
157
159
  </script>
@@ -25,14 +25,13 @@
25
25
  class="s-select__button"
26
26
  :class="{'--icon': icon}"
27
27
  :name="name"
28
- @change="onChange"
28
+ v-model="proxy"
29
29
  required
30
30
  >
31
31
  <option
32
32
  v-if="placeholder"
33
33
  class="s-select__option"
34
34
  value=""
35
- selected
36
35
  disabled
37
36
  >{{ capitalize(placeholder) }}</option>
38
37
  <option
@@ -40,7 +39,6 @@
40
39
  :value="item.value"
41
40
  class="s-select__option"
42
41
  :key="`s-select-${name}-${index}`"
43
- :selected="isSelected(item)"
44
42
  >{{ capitalize(item.title as string || item.name as string) }}</option>
45
43
  </select>
46
44
  <SIcon
@@ -72,21 +70,20 @@ const props = withDefaults(defineProps<{
72
70
  })
73
71
 
74
72
  const emit = defineEmits<{
75
- (eventName: 'update:modelValue', value: Event): void
76
- (eventName: 'change', value: Event): void
73
+ (eventName: 'update:modelValue', value: string): void
74
+ (eventName: 'change', value: string): void
77
75
  }>()
78
76
 
79
- function onChange(event: Event) {
80
- emit('update:modelValue', event.target?.value)
81
- emit('change', event.target?.value)
82
- }
77
+ const proxy = computed({
78
+ get: () => props.modelValue ?? '',
79
+ set: (val: string) => {
80
+ emit('update:modelValue', val)
81
+ emit('change', val)
82
+ }
83
+ })
83
84
 
84
85
  function capitalize(text: string) {
85
86
  if (!text) return '';
86
87
  return text.charAt(0).toUpperCase() + text.slice(1);
87
88
  }
88
-
89
- function isSelected(item: ISelectItem | LocaleObject) {
90
- return String(item.value).toLowerCase() === String(props.modelValue).toLowerCase() && item.value !== props.placeholder
91
- }
92
89
  </script>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "itube-specs",
3
3
  "type": "module",
4
- "version": "0.0.224",
4
+ "version": "0.0.225",
5
5
  "main": "./nuxt.config.ts",
6
6
  "types": "./types/index.d.ts",
7
7
  "scripts": {