@bagelink/vue 1.8.18 → 1.8.20

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,7 +1,7 @@
1
1
  {
2
2
  "name": "@bagelink/vue",
3
3
  "type": "module",
4
- "version": "1.8.18",
4
+ "version": "1.8.20",
5
5
  "description": "Bagel core sdk packages",
6
6
  "author": {
7
7
  "name": "Bagel Studio",
@@ -70,6 +70,7 @@ defineExpose({ setFormValues })
70
70
  v-if="visible" ref="form" v-model="formData" :schema="schema"
71
71
  @update:modelValue="emit('update:modelValue', $event)" @submit="runSubmit"
72
72
  />
73
+ <pre>{{ formData }}</pre>
73
74
  <template v-if="onDelete || onSubmit" #footer>
74
75
  <div class="flex gap-0">
75
76
  <Btn thin flat :value="cancelText || 'Cancel'" @click="closeModal" />
@@ -32,7 +32,8 @@ const {
32
32
  onFileQueued: async () => {
33
33
  await flushQueue()
34
34
  updateModelValue()
35
- }
35
+ },
36
+ onChange: updateModelValue
36
37
  })
37
38
 
38
39
  watch(() => props.modelValue, val => pk.value = val ? [val].flat().filter(Boolean) : [], { immediate: true })
@@ -20,7 +20,7 @@ export const files = {
20
20
  },
21
21
 
22
22
  delete: async (pathKey?: string) => {
23
- return axios.delete(`/${FILES_ENDPOINT}/`, {
23
+ return axios.delete(`/${FILES_ENDPOINT}/${pathKey}`, {
24
24
  params: { path_key: pathKey },
25
25
  })
26
26
  },
@@ -10,6 +10,7 @@ interface UseFileUploadProps {
10
10
  disabled?: boolean
11
11
  namespace?: string
12
12
  onFileQueued?: (files: QueueFile[]) => void
13
+ onChange?: () => void
13
14
  }
14
15
 
15
16
  export function useFileUpload(props: UseFileUploadProps = {}) {
@@ -89,6 +90,9 @@ export function useFileUpload(props: UseFileUploadProps = {}) {
89
90
  fileQueue.value.splice(index, 1)
90
91
  }
91
92
  }
93
+
94
+ // Notify parent of change
95
+ props.onChange?.()
92
96
  }
93
97
  async function flushQueue() {
94
98
  // Only process files in the current namespace