@finema/core 1.4.84 → 1.4.85

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/module.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@finema/core",
3
- "version": "1.4.84",
3
+ "version": "1.4.85",
4
4
  "configKey": "core",
5
5
  "compatibility": {
6
6
  "nuxt": "^3.7.4"
package/dist/module.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import { defineNuxtModule, createResolver, installModule, addPlugin, addComponentsDir, addImportsDir } from '@nuxt/kit';
2
2
 
3
3
  const name = "@finema/core";
4
- const version = "1.4.84";
4
+ const version = "1.4.85";
5
5
 
6
6
  const colors = {
7
7
  black: "#20243E",
@@ -94,6 +94,7 @@ import {
94
94
  useUploadLoader,
95
95
  useWatchTrue,
96
96
  StringHelper,
97
+ _get,
97
98
  } from '#imports'
98
99
  import { uploadFileDropzone } from '#core/ui.config'
99
100
  import i18next from 'i18next'
@@ -146,7 +147,7 @@ const onDrop = (files: File[] | null) => {
146
147
 
147
148
  emits('change', file)
148
149
 
149
- formData.append(props.bodyKey || 'file', file)
150
+ formData.append(_get(props, props.bodyKey || 'file'), file)
150
151
  upload.run(formData, { data: { onUploadProgress, onDownloadProgress } })
151
152
  }
152
153
  }
@@ -228,7 +229,7 @@ const onDownloadProgress = (progressEvent: ProgressEvent) => {
228
229
  useWatchTrue(
229
230
  () => upload.status.value.isSuccess,
230
231
  () => {
231
- value.value = upload.data.value[props.responseKey || 'url']
232
+ value.value = _get(upload.data.value, props.responseKey || 'url')
232
233
  emits('success', upload.data.value)
233
234
  }
234
235
  )
@@ -44,7 +44,16 @@
44
44
  </template>
45
45
 
46
46
  <script lang="tsx" setup>
47
- import { computed, ref, StringHelper, toRef, useUI, useUiConfig, useWatchTrue } from '#imports'
47
+ import {
48
+ _get,
49
+ computed,
50
+ ref,
51
+ StringHelper,
52
+ toRef,
53
+ useUI,
54
+ useUiConfig,
55
+ useWatchTrue,
56
+ } from '#imports'
48
57
  import { type IUploadFileProps } from './types'
49
58
  import FieldWrapper from '#core/components/Form/FieldWrapper.vue'
50
59
  import { useFieldHOC } from '#core/composables/useForm'
@@ -151,7 +160,7 @@ const onDownloadProgress = (progressEvent: ProgressEvent) => {
151
160
  useWatchTrue(
152
161
  () => upload.status.value.isSuccess,
153
162
  () => {
154
- value.value = upload.data.value[props.responseKey || 'url']
163
+ value.value = _get(upload.data.value, props.responseKey || 'url')
155
164
  emits('success', upload.data.value)
156
165
  }
157
166
  )
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@finema/core",
3
- "version": "1.4.84",
3
+ "version": "1.4.85",
4
4
  "repository": "https://gitlab.finema.co/finema/ui-kit",
5
5
  "license": "MIT",
6
6
  "author": "Finema Dev Core Team",