sprintify-ui 0.0.101 → 0.0.103
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/sprintify-ui.es.js +5821 -5728
- package/dist/types/src/components/BaseAutocomplete.vue.d.ts +2 -2
- package/dist/types/src/components/BaseAutocompleteFetch.vue.d.ts +9 -3
- package/dist/types/src/components/BaseBelongsTo.vue.d.ts +9 -3
- package/dist/types/src/components/BaseButtonGroup.vue.d.ts +2 -2
- package/dist/types/src/components/BaseCharacterCounter.vue.d.ts +2 -2
- package/dist/types/src/components/BaseColor.vue.d.ts +2 -2
- package/dist/types/src/components/BaseDatePicker.vue.d.ts +1 -1
- package/dist/types/src/components/BaseFieldI18n.vue.d.ts +1 -1
- package/dist/types/src/components/BaseFilePicker.vue.d.ts +1 -1
- package/dist/types/src/components/BaseFileUploader.vue.d.ts +1 -1
- package/dist/types/src/components/BaseFormField.d.ts +1 -1
- package/dist/types/src/components/BaseHasMany.vue.d.ts +9 -3
- package/dist/types/src/components/BaseInput.vue.d.ts +5 -5
- package/dist/types/src/components/BaseInputPercent.vue.d.ts +4 -4
- package/dist/types/src/components/BaseLocaleForm.vue.d.ts +2 -2
- package/dist/types/src/components/BaseMediaLibrary.vue.d.ts +4 -4
- package/dist/types/src/components/BaseNumberForm.vue.d.ts +2 -2
- package/dist/types/src/components/BasePassword.vue.d.ts +2 -2
- package/dist/types/src/components/BasePasswordForm.vue.d.ts +1 -1
- package/dist/types/src/components/BaseRadioGroup.vue.d.ts +1 -1
- package/dist/types/src/components/BaseRichText.vue.d.ts +2 -2
- package/dist/types/src/components/BaseSelect.vue.d.ts +2 -2
- package/dist/types/src/components/BaseTableColumn.vue.d.ts +1 -1
- package/dist/types/src/components/BaseTagAutocomplete.vue.d.ts +2 -2
- package/dist/types/src/components/BaseTagAutocompleteFetch.vue.d.ts +9 -3
- package/dist/types/src/components/BaseTextarea.vue.d.ts +3 -3
- package/dist/types/src/components/BaseTextareaAutoresize.vue.d.ts +2 -2
- package/dist/types/src/components/BaseTextareaForm.vue.d.ts +2 -2
- package/package.json +1 -1
- package/src/components/BaseAutocompleteDropdown.vue +24 -18
- package/src/components/BaseAutocompleteFetch.vue +13 -1
- package/src/components/BaseBelongsTo.vue +14 -1
- package/src/components/BaseHasMany.vue +15 -1
- package/src/components/BaseTagAutocompleteFetch.vue +13 -0
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<BaseTagAutocompleteFetch
|
|
3
|
+
ref="tagAutocompleteFetch"
|
|
3
4
|
:model-value="models"
|
|
4
5
|
:url="url"
|
|
5
6
|
:disabled="disabled"
|
|
@@ -25,7 +26,7 @@
|
|
|
25
26
|
</template>
|
|
26
27
|
|
|
27
28
|
<script lang="ts" setup>
|
|
28
|
-
import { PropType } from 'vue';
|
|
29
|
+
import { PropType, Ref } from 'vue';
|
|
29
30
|
import { Option } from '@/types';
|
|
30
31
|
import BaseTagAutocompleteFetch from './BaseTagAutocompleteFetch.vue';
|
|
31
32
|
|
|
@@ -80,6 +81,10 @@ const props = defineProps({
|
|
|
80
81
|
|
|
81
82
|
const emit = defineEmits(['update:modelValue']);
|
|
82
83
|
|
|
84
|
+
const tagAutocompleteFetch = ref(null) as Ref<InstanceType<
|
|
85
|
+
typeof BaseTagAutocompleteFetch
|
|
86
|
+
> | null>;
|
|
87
|
+
|
|
83
88
|
const models = ref(props.currentModels);
|
|
84
89
|
|
|
85
90
|
watch(
|
|
@@ -97,4 +102,13 @@ function onUpdate(newModels: Option[]) {
|
|
|
97
102
|
newModels.map((m) => m[props.primaryKey])
|
|
98
103
|
);
|
|
99
104
|
}
|
|
105
|
+
|
|
106
|
+
defineExpose({
|
|
107
|
+
focus: () => tagAutocompleteFetch.value?.focus(),
|
|
108
|
+
blur: () => tagAutocompleteFetch.value?.blur(),
|
|
109
|
+
open: () => tagAutocompleteFetch.value?.open(),
|
|
110
|
+
close: () => tagAutocompleteFetch.value?.close(),
|
|
111
|
+
setKeywords: (input: string) =>
|
|
112
|
+
tagAutocompleteFetch.value?.setKeywords(input),
|
|
113
|
+
});
|
|
100
114
|
</script>
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<BaseTagAutocomplete
|
|
3
|
+
ref="tagAutocomplete"
|
|
3
4
|
:loading="showLoading && page == 1"
|
|
4
5
|
:loading-bottom="showLoading && page > 1"
|
|
5
6
|
:model-value="modelValue"
|
|
@@ -89,6 +90,10 @@ const props = defineProps({
|
|
|
89
90
|
|
|
90
91
|
defineEmits(['update:modelValue', 'typing', 'focus', 'scrollBottom']);
|
|
91
92
|
|
|
93
|
+
const tagAutocomplete = ref(null) as Ref<InstanceType<
|
|
94
|
+
typeof BaseTagAutocomplete
|
|
95
|
+
> | null>;
|
|
96
|
+
|
|
92
97
|
const http = config.http;
|
|
93
98
|
|
|
94
99
|
const showLoading = ref(false);
|
|
@@ -167,4 +172,12 @@ const search = () => {
|
|
|
167
172
|
const debouncedSearch = debounce(() => {
|
|
168
173
|
search();
|
|
169
174
|
}, 300);
|
|
175
|
+
|
|
176
|
+
defineExpose({
|
|
177
|
+
focus: () => tagAutocomplete.value?.focus(),
|
|
178
|
+
blur: () => tagAutocomplete.value?.blur(),
|
|
179
|
+
open: () => tagAutocomplete.value?.open(),
|
|
180
|
+
close: () => tagAutocomplete.value?.close(),
|
|
181
|
+
setKeywords: (input: string) => tagAutocomplete.value?.setKeywords(input),
|
|
182
|
+
});
|
|
170
183
|
</script>
|