giime 0.9.13 → 0.9.14
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/es/components/src/business/uploadItem/UploadItem.vue2.mjs +3 -2
- package/es/components/src/business/uploadItem/UploadItem.vue2.mjs.map +1 -1
- package/es/giime/version.d.ts +1 -1
- package/es/giime/version.mjs +1 -1
- package/es/giime/version.mjs.map +1 -1
- package/lib/components/src/business/uploadItem/UploadItem.vue2.js +2 -1
- package/lib/components/src/business/uploadItem/UploadItem.vue2.js.map +1 -1
- package/lib/giime/version.d.ts +1 -1
- package/lib/giime/version.js +1 -1
- package/lib/giime/version.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, useModel, useSlots, ref, watch, resolveComponent, createBlock, openBlock, mergeProps, createSlots, withCtx, unref, renderSlot, normalizeProps, guardReactiveProps, mergeModels } from 'vue';
|
|
1
|
+
import { defineComponent, useModel, useSlots, ref, computed, watch, resolveComponent, createBlock, openBlock, mergeProps, createSlots, withCtx, unref, renderSlot, normalizeProps, guardReactiveProps, mergeModels } from 'vue';
|
|
2
2
|
import { uploadItemProps } from './uploadItem.mjs';
|
|
3
3
|
|
|
4
4
|
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
@@ -16,6 +16,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
16
16
|
const imageUrl = useModel(__props, "imageUrl");
|
|
17
17
|
const slots = useSlots();
|
|
18
18
|
const fileList = ref([]);
|
|
19
|
+
const uploadDisabled = computed(() => Boolean(props.disabled) || fileList.value.length > 0);
|
|
19
20
|
watch(
|
|
20
21
|
imageUrl,
|
|
21
22
|
(newVal) => {
|
|
@@ -41,7 +42,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
41
42
|
fileList: fileList.value,
|
|
42
43
|
"onUpdate:fileList": _cache[0] || (_cache[0] = ($event) => fileList.value = $event),
|
|
43
44
|
limit: 1,
|
|
44
|
-
disabled:
|
|
45
|
+
disabled: uploadDisabled.value,
|
|
45
46
|
"on-all-complete": handleComplete,
|
|
46
47
|
"on-remove": handleRemove
|
|
47
48
|
}), createSlots({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UploadItem.vue2.mjs","sources":["../../../../../../../packages/components/src/business/uploadItem/UploadItem.vue"],"sourcesContent":["<template>\n <gm-upload-pro\n v-bind=\"props\"\n v-model:fileList=\"fileList\"\n :limit=\"1\"\n :disabled=\"
|
|
1
|
+
{"version":3,"file":"UploadItem.vue2.mjs","sources":["../../../../../../../packages/components/src/business/uploadItem/UploadItem.vue"],"sourcesContent":["<template>\n <gm-upload-pro\n v-bind=\"props\"\n v-model:fileList=\"fileList\"\n :limit=\"1\"\n :disabled=\"uploadDisabled\"\n :on-all-complete=\"handleComplete\"\n :on-remove=\"handleRemove\"\n >\n <template v-if=\"slots.default\" #default>\n <slot />\n </template>\n <template v-else #file=\"slotValue\">\n <slot name=\"file\" v-bind=\"slotValue\" />\n </template>\n <template v-if=\"slots.trigger\" #trigger>\n <slot name=\"trigger\" />\n </template>\n <template v-if=\"slots.tip\" #tip>\n <slot name=\"tip\" />\n </template>\n <template v-if=\"slots.fileActions\" #fileActions=\"slotValue\">\n <slot name=\"fileActions\" v-bind=\"slotValue\" />\n </template>\n </gm-upload-pro>\n</template>\n<script setup lang=\"ts\">\nimport { computed, ref, useSlots, watch } from 'vue';\n// import type { GmUploadProUserFile, UploadFile, UploadFiles, UploadUserFile } from 'giime';\nimport { uploadItemProps } from './uploadItem';\nimport { GmUploadProUserFile } from '../uploadPro/uploadPro';\nimport { UploadFile, UploadFiles, UploadUserFile } from '@giime/hooks/base/useUploadFile';\n\ndefineOptions({\n name: 'GmUploadItem',\n});\n\nconst props = defineProps(uploadItemProps);\n\nconst imageUrl = defineModel<string | undefined>('imageUrl', { required: true });\n\nconst slots = useSlots();\n\nconst fileList = ref<GmUploadProUserFile[]>([]);\nconst uploadDisabled = computed(() => Boolean(props.disabled) || fileList.value.length > 0);\n\nwatch(\n imageUrl,\n newVal => {\n if (newVal) {\n fileList.value = [{ url: newVal, name: newVal }];\n } else {\n fileList.value = [];\n }\n },\n { immediate: true },\n);\n\nconst handleComplete = () => {\n imageUrl.value = fileList.value[0]?.response?.url ?? '';\n props.onAllComplete?.();\n};\n\nconst handleRemove = (file: UploadFile, uploadFiles: UploadUserFile[]) => {\n imageUrl.value = '';\n props.onRemove?.(file, uploadFiles as UploadFiles);\n};\n</script>\n"],"names":["_useModel"],"mappings":";;;;;;;;;;;;;;AAqCA,IAAA,MAAM,KAAA,GAAQ,OAAA;AAEd,IAAA,MAAM,QAAA,GAAWA,QAAA,UAAgC,UAA8B,CAAA;AAE/E,IAAA,MAAM,QAAQ,QAAA,EAAS;AAEvB,IAAA,MAAM,QAAA,GAAW,GAAA,CAA2B,EAAE,CAAA;AAC9C,IAAA,MAAM,cAAA,GAAiB,QAAA,CAAS,MAAM,OAAA,CAAQ,KAAA,CAAM,QAAQ,CAAA,IAAK,QAAA,CAAS,KAAA,CAAM,MAAA,GAAS,CAAC,CAAA;AAE1F,IAAA,KAAA;AAAA,MACE,QAAA;AAAA,MACA,CAAA,MAAA,KAAU;AACR,QAAA,IAAI,MAAA,EAAQ;AACV,UAAA,QAAA,CAAS,QAAQ,CAAC,EAAE,KAAK,MAAA,EAAQ,IAAA,EAAM,QAAQ,CAAA;AAAA,QACjD,CAAA,MAAO;AACL,UAAA,QAAA,CAAS,QAAQ,EAAC;AAAA,QACpB;AAAA,MACF,CAAA;AAAA,MACA,EAAE,WAAW,IAAA;AAAK,KACpB;AAEA,IAAA,MAAM,iBAAiB,MAAM;AAC3B,MAAA,QAAA,CAAS,QAAQ,QAAA,CAAS,KAAA,CAAM,CAAC,CAAA,EAAG,UAAU,GAAA,IAAO,EAAA;AACrD,MAAA,KAAA,CAAM,aAAA,IAAgB;AAAA,IACxB,CAAA;AAEA,IAAA,MAAM,YAAA,GAAe,CAAC,IAAA,EAAkB,WAAA,KAAkC;AACxE,MAAA,QAAA,CAAS,KAAA,GAAQ,EAAA;AACjB,MAAA,KAAA,CAAM,QAAA,GAAW,MAAM,WAA0B,CAAA;AAAA,IACnD,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/es/giime/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "0.9.
|
|
1
|
+
export declare const version = "0.9.14";
|
package/es/giime/version.mjs
CHANGED
package/es/giime/version.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.mjs","sources":["../../../../packages/giime/version.ts"],"sourcesContent":["export const version = '0.9.
|
|
1
|
+
{"version":3,"file":"version.mjs","sources":["../../../../packages/giime/version.ts"],"sourcesContent":["export const version = '0.9.14';\n"],"names":[],"mappings":"AAAO,MAAM,OAAA,GAAU;;;;"}
|
|
@@ -20,6 +20,7 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
20
20
|
const imageUrl = vue.useModel(__props, "imageUrl");
|
|
21
21
|
const slots = vue.useSlots();
|
|
22
22
|
const fileList = vue.ref([]);
|
|
23
|
+
const uploadDisabled = vue.computed(() => Boolean(props.disabled) || fileList.value.length > 0);
|
|
23
24
|
vue.watch(
|
|
24
25
|
imageUrl,
|
|
25
26
|
(newVal) => {
|
|
@@ -45,7 +46,7 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
45
46
|
fileList: fileList.value,
|
|
46
47
|
"onUpdate:fileList": _cache[0] || (_cache[0] = ($event) => fileList.value = $event),
|
|
47
48
|
limit: 1,
|
|
48
|
-
disabled:
|
|
49
|
+
disabled: uploadDisabled.value,
|
|
49
50
|
"on-all-complete": handleComplete,
|
|
50
51
|
"on-remove": handleRemove
|
|
51
52
|
}), vue.createSlots({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UploadItem.vue2.js","sources":["../../../../../../../packages/components/src/business/uploadItem/UploadItem.vue"],"sourcesContent":["<template>\n <gm-upload-pro\n v-bind=\"props\"\n v-model:fileList=\"fileList\"\n :limit=\"1\"\n :disabled=\"
|
|
1
|
+
{"version":3,"file":"UploadItem.vue2.js","sources":["../../../../../../../packages/components/src/business/uploadItem/UploadItem.vue"],"sourcesContent":["<template>\n <gm-upload-pro\n v-bind=\"props\"\n v-model:fileList=\"fileList\"\n :limit=\"1\"\n :disabled=\"uploadDisabled\"\n :on-all-complete=\"handleComplete\"\n :on-remove=\"handleRemove\"\n >\n <template v-if=\"slots.default\" #default>\n <slot />\n </template>\n <template v-else #file=\"slotValue\">\n <slot name=\"file\" v-bind=\"slotValue\" />\n </template>\n <template v-if=\"slots.trigger\" #trigger>\n <slot name=\"trigger\" />\n </template>\n <template v-if=\"slots.tip\" #tip>\n <slot name=\"tip\" />\n </template>\n <template v-if=\"slots.fileActions\" #fileActions=\"slotValue\">\n <slot name=\"fileActions\" v-bind=\"slotValue\" />\n </template>\n </gm-upload-pro>\n</template>\n<script setup lang=\"ts\">\nimport { computed, ref, useSlots, watch } from 'vue';\n// import type { GmUploadProUserFile, UploadFile, UploadFiles, UploadUserFile } from 'giime';\nimport { uploadItemProps } from './uploadItem';\nimport { GmUploadProUserFile } from '../uploadPro/uploadPro';\nimport { UploadFile, UploadFiles, UploadUserFile } from '@giime/hooks/base/useUploadFile';\n\ndefineOptions({\n name: 'GmUploadItem',\n});\n\nconst props = defineProps(uploadItemProps);\n\nconst imageUrl = defineModel<string | undefined>('imageUrl', { required: true });\n\nconst slots = useSlots();\n\nconst fileList = ref<GmUploadProUserFile[]>([]);\nconst uploadDisabled = computed(() => Boolean(props.disabled) || fileList.value.length > 0);\n\nwatch(\n imageUrl,\n newVal => {\n if (newVal) {\n fileList.value = [{ url: newVal, name: newVal }];\n } else {\n fileList.value = [];\n }\n },\n { immediate: true },\n);\n\nconst handleComplete = () => {\n imageUrl.value = fileList.value[0]?.response?.url ?? '';\n props.onAllComplete?.();\n};\n\nconst handleRemove = (file: UploadFile, uploadFiles: UploadUserFile[]) => {\n imageUrl.value = '';\n props.onRemove?.(file, uploadFiles as UploadFiles);\n};\n</script>\n"],"names":["_useModel","useSlots","ref","computed","watch"],"mappings":";;;;;;;;;;;;;;;;;;AAqCA,IAAA,MAAM,KAAA,GAAQ,OAAA;AAEd,IAAA,MAAM,QAAA,GAAWA,YAAA,UAAgC,UAA8B,CAAA;AAE/E,IAAA,MAAM,QAAQC,YAAA,EAAS;AAEvB,IAAA,MAAM,QAAA,GAAWC,OAAA,CAA2B,EAAE,CAAA;AAC9C,IAAA,MAAM,cAAA,GAAiBC,YAAA,CAAS,MAAM,OAAA,CAAQ,KAAA,CAAM,QAAQ,CAAA,IAAK,QAAA,CAAS,KAAA,CAAM,MAAA,GAAS,CAAC,CAAA;AAE1F,IAAAC,SAAA;AAAA,MACE,QAAA;AAAA,MACA,CAAA,MAAA,KAAU;AACR,QAAA,IAAI,MAAA,EAAQ;AACV,UAAA,QAAA,CAAS,QAAQ,CAAC,EAAE,KAAK,MAAA,EAAQ,IAAA,EAAM,QAAQ,CAAA;AAAA,QACjD,CAAA,MAAO;AACL,UAAA,QAAA,CAAS,QAAQ,EAAC;AAAA,QACpB;AAAA,MACF,CAAA;AAAA,MACA,EAAE,WAAW,IAAA;AAAK,KACpB;AAEA,IAAA,MAAM,iBAAiB,MAAM;AAC3B,MAAA,QAAA,CAAS,QAAQ,QAAA,CAAS,KAAA,CAAM,CAAC,CAAA,EAAG,UAAU,GAAA,IAAO,EAAA;AACrD,MAAA,KAAA,CAAM,aAAA,IAAgB;AAAA,IACxB,CAAA;AAEA,IAAA,MAAM,YAAA,GAAe,CAAC,IAAA,EAAkB,WAAA,KAAkC;AACxE,MAAA,QAAA,CAAS,KAAA,GAAQ,EAAA;AACjB,MAAA,KAAA,CAAM,QAAA,GAAW,MAAM,WAA0B,CAAA;AAAA,IACnD,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/lib/giime/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "0.9.
|
|
1
|
+
export declare const version = "0.9.14";
|
package/lib/giime/version.js
CHANGED
package/lib/giime/version.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sources":["../../../../packages/giime/version.ts"],"sourcesContent":["export const version = '0.9.
|
|
1
|
+
{"version":3,"file":"version.js","sources":["../../../../packages/giime/version.ts"],"sourcesContent":["export const version = '0.9.14';\n"],"names":[],"mappings":";;AAAO,MAAM,OAAA,GAAU;;;;"}
|