@data-fair/lib-vuetify 1.12.0 → 1.12.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@data-fair/lib-vuetify",
3
- "version": "1.12.0",
3
+ "version": "1.12.2",
4
4
  "description": "Components based on the Vuetify 3 UI lib for the data-fair stack.",
5
5
  "main": "index.js",
6
6
  "files": [
@@ -1,16 +1,36 @@
1
+ <template>
2
+ <v-autocomplete
3
+ v-model="address"
4
+ :items="addressesList"
5
+ :loading="loadingAddresses"
6
+ no-filter
7
+ :clearable="true"
8
+ return-object
9
+ hide-no-data
10
+ hide-details
11
+ label="Adresse"
12
+ placeholder="Saisissez une adresse"
13
+ :variant="variant"
14
+ density="compact"
15
+ menu-icon=""
16
+ @update:search="(search: string) => findAdresses(search)"
17
+ />
18
+ </template>
19
+
20
+
1
21
  <script setup lang="ts">
2
- import { VAutocomplete } from 'vuetify/components/VAutocomplete'
22
+ import type { VAutocomplete } from 'vuetify/components/VAutocomplete'
3
23
  import { ref, watch } from 'vue'
4
24
  import { ofetch } from 'ofetch'
5
25
  import { useDebounceFn } from '@vueuse/core'
6
26
 
7
- defineProps<{variant?: VAutocomplete['variant']}>()
27
+ defineProps({variant: String as () => VAutocomplete['variant']})
8
28
  const emit = defineEmits(['selected'])
9
29
  const model = defineModel({ type: String })
10
30
 
11
- const addressesList = ref([] as any[])
31
+ const addressesList = ref<any[]>([])
12
32
  const loadingAddresses = ref(false)
13
- const address = ref(null as any)
33
+ const address = ref<any>(null)
14
34
 
15
35
  const findAdressesFn = async (search: string, selectedId?: string) => {
16
36
  loadingAddresses.value = true
@@ -53,23 +73,4 @@ watch(
53
73
  emit('selected', addr ? addr.value : undefined)
54
74
  }
55
75
  )
56
- </script>
57
-
58
- <template>
59
- <v-autocomplete
60
- v-model="address"
61
- :items="addressesList"
62
- :loading="loadingAddresses"
63
- no-filter
64
- :clearable="true"
65
- return-object
66
- hide-no-data
67
- hide-details
68
- label="Adresse"
69
- placeholder="Saisissez une adresse"
70
- :variant="variant"
71
- density="compact"
72
- menu-icon=""
73
- @update:search="(search: string) => findAdresses(search)"
74
- />
75
- </template>
76
+ </script>
@@ -1,14 +1,17 @@
1
- import { VAutocomplete } from 'vuetify/components/VAutocomplete';
2
- declare let __VLS_typeProps: {
3
- variant?: VAutocomplete['variant'];
4
- };
5
- declare const model: import("vue").ModelRef<string | undefined, string, string | undefined, string | undefined>;
6
- type __VLS_PublicProps = {
7
- modelValue?: typeof model['value'];
8
- } & typeof __VLS_typeProps;
9
- declare const _default: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
1
+ import type { VAutocomplete } from 'vuetify/components/VAutocomplete';
2
+ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
3
+ variant: () => VAutocomplete["variant"];
4
+ modelValue: {
5
+ type: import("vue").PropType<string>;
6
+ };
7
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
10
8
  selected: (...args: any[]) => void;
11
- }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
9
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
10
+ variant: () => VAutocomplete["variant"];
11
+ modelValue: {
12
+ type: import("vue").PropType<string>;
13
+ };
14
+ }>> & Readonly<{
12
15
  onSelected?: ((...args: any[]) => any) | undefined;
13
- }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
16
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
14
17
  export default _default;
@@ -1,11 +1,9 @@
1
1
  /// <reference types=".vue-global-types/vue_3.5_false.d.ts" />
2
- import { VAutocomplete } from 'vuetify/components/VAutocomplete';
3
2
  import { ref, watch } from 'vue';
4
3
  import { ofetch } from 'ofetch';
5
4
  import { useDebounceFn } from '@vueuse/core';
6
5
  const { defineProps, defineSlots, defineEmits, defineExpose, defineModel, defineOptions, withDefaults, } = await import('vue');
7
- let __VLS_typeProps;
8
- const __VLS_props = defineProps();
6
+ const __VLS_props = defineProps({ variant: String });
9
7
  const emit = defineEmits(['selected']);
10
8
  const model = defineModel({ type: String });
11
9
  const addressesList = ref([]);
@@ -49,6 +47,7 @@ watch(address, (addr) => {
49
47
  emit('selected', addr ? addr.value : undefined);
50
48
  });
51
49
  const __VLS_fnComponent = (await import('vue')).defineComponent({
50
+ props: { variant: String },
52
51
  emits: {
53
52
  ...{},
54
53
  ...{},
@@ -98,7 +97,6 @@ function __VLS_template() {
98
97
  const __VLS_self = (await import('vue')).defineComponent({
99
98
  setup() {
100
99
  return {
101
- VAutocomplete: VAutocomplete,
102
100
  addressesList: addressesList,
103
101
  loadingAddresses: loadingAddresses,
104
102
  address: address,
@@ -109,7 +107,10 @@ const __VLS_self = (await import('vue')).defineComponent({
109
107
  ...{},
110
108
  ...{},
111
109
  },
112
- __typeProps: {},
110
+ props: {
111
+ ...{},
112
+ ...{ variant: String },
113
+ },
113
114
  });
114
115
  export default (await import('vue')).defineComponent({
115
116
  setup() {
@@ -119,7 +120,10 @@ export default (await import('vue')).defineComponent({
119
120
  ...{},
120
121
  ...{},
121
122
  },
122
- __typeProps: {},
123
+ props: {
124
+ ...{},
125
+ ...{ variant: String },
126
+ },
123
127
  });
124
128
  ;
125
129
  //# sourceMappingURL=search-address.vue.js.map