@stsdti/funky-ui-kit 1.4.1 → 1.4.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/dist/funky-ui-kit.css +1 -1
- package/dist/funky-ui-kit.es.js +31 -23
- package/dist/funky-ui-kit.es.js.map +1 -1
- package/package.json +1 -1
- package/web-types.json +1 -1
package/dist/funky-ui-kit.es.js
CHANGED
|
@@ -23302,6 +23302,7 @@ function useFileUpload(modelValue, props2, emit) {
|
|
|
23302
23302
|
}
|
|
23303
23303
|
};
|
|
23304
23304
|
const submitFiles = async (filesList = null) => {
|
|
23305
|
+
var _a3;
|
|
23305
23306
|
const list = filesList ?? modelValue.value;
|
|
23306
23307
|
const files = list.filter((f) => appFileNewUtils.isFileInstance(f));
|
|
23307
23308
|
let shouldReplaceMedia = appFileNewUtils.isMediaInstance(lodashExports.head(localModelValue)) && !props2.isMultiple && files.length === 1;
|
|
@@ -23313,7 +23314,8 @@ function useFileUpload(modelValue, props2, emit) {
|
|
|
23313
23314
|
response = shouldReplaceMedia ? await appFileNewRepository.updateMedia(lodashExports.head(files), lodashExports.head(localModelValue)) : await appFileNewRepository.uploadMedia(files);
|
|
23314
23315
|
}
|
|
23315
23316
|
if (!ResponseUtils.isSuccess(response)) {
|
|
23316
|
-
|
|
23317
|
+
const errorMessage = ((_a3 = response == null ? void 0 : response.data) == null ? void 0 : _a3.message) || (shouldReplaceMedia ? "Fișierul nu a putut fi înlocuit." : "Fișierul nu a putut fi încărcat.");
|
|
23318
|
+
UIUtils.showToastError(errorMessage);
|
|
23317
23319
|
modelValue.value = localModelValue;
|
|
23318
23320
|
isLoading.value = false;
|
|
23319
23321
|
return;
|
|
@@ -81492,7 +81494,13 @@ const _sfc_main$7 = {
|
|
|
81492
81494
|
class: "status-icon"
|
|
81493
81495
|
}, null, 8, ["value"]),
|
|
81494
81496
|
createTextVNode(" " + toDisplayString(getFileStatusLabel(file)), 1)
|
|
81495
|
-
], 2)
|
|
81497
|
+
], 2),
|
|
81498
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(Object.keys(_ctx.$slots), (slotName) => {
|
|
81499
|
+
return renderSlot(_ctx.$slots, slotName, {
|
|
81500
|
+
key: slotName,
|
|
81501
|
+
file
|
|
81502
|
+
});
|
|
81503
|
+
}), 128))
|
|
81496
81504
|
])
|
|
81497
81505
|
]),
|
|
81498
81506
|
unref(getStatus2)(file) === unref(fileStatus).uploaded ? (openBlock(), createElementBlock("div", _hoisted_3$1, [
|
|
@@ -81713,7 +81721,7 @@ const _sfc_main$5 = {
|
|
|
81713
81721
|
size: 20,
|
|
81714
81722
|
"stroke-width": 2
|
|
81715
81723
|
}),
|
|
81716
|
-
_cache2[2] || (_cache2[2] = createElementVNode("p", { class: "dropzone__title" }, "
|
|
81724
|
+
_cache2[2] || (_cache2[2] = createElementVNode("p", { class: "dropzone__title" }, "Trage aici sau alege fișiere", -1))
|
|
81717
81725
|
]),
|
|
81718
81726
|
createElementVNode("div", _hoisted_5, [
|
|
81719
81727
|
createVNode(_component_app_button, {
|
|
@@ -81761,29 +81769,29 @@ const _sfc_main$5 = {
|
|
|
81761
81769
|
_: 3
|
|
81762
81770
|
}, 8, ["disabled", "onClick"])) : createCommentVNode("", true)
|
|
81763
81771
|
])
|
|
81764
|
-
])
|
|
81772
|
+
]),
|
|
81773
|
+
unref(fileUpload).hasFiles.value ? (openBlock(), createElementBlock("div", _hoisted_6, [
|
|
81774
|
+
createVNode(_sfc_main$7, {
|
|
81775
|
+
files: modelValue.value,
|
|
81776
|
+
disabled: _ctx.disabled,
|
|
81777
|
+
onRemoved: unref(fileUpload).removeFile,
|
|
81778
|
+
onPreview,
|
|
81779
|
+
onDownload
|
|
81780
|
+
}, createSlots({ _: 2 }, [
|
|
81781
|
+
renderList(Object.keys(_ctx.$slots), (slot) => {
|
|
81782
|
+
return {
|
|
81783
|
+
name: slot,
|
|
81784
|
+
fn: withCtx((scope) => [
|
|
81785
|
+
renderSlot(_ctx.$slots, slot, normalizeProps(guardReactiveProps(scope)))
|
|
81786
|
+
])
|
|
81787
|
+
};
|
|
81788
|
+
})
|
|
81789
|
+
]), 1032, ["files", "disabled", "onRemoved"])
|
|
81790
|
+
], 512)) : createCommentVNode("", true)
|
|
81765
81791
|
], 2)
|
|
81766
81792
|
]),
|
|
81767
81793
|
_: 3
|
|
81768
|
-
}, 8, ["disabled", "onFilesDropped"])
|
|
81769
|
-
unref(fileUpload).hasFiles.value ? (openBlock(), createElementBlock("div", _hoisted_6, [
|
|
81770
|
-
createVNode(_sfc_main$7, {
|
|
81771
|
-
files: modelValue.value,
|
|
81772
|
-
disabled: _ctx.disabled,
|
|
81773
|
-
onRemoved: unref(fileUpload).removeFile,
|
|
81774
|
-
onPreview,
|
|
81775
|
-
onDownload
|
|
81776
|
-
}, createSlots({ _: 2 }, [
|
|
81777
|
-
renderList(Object.keys(_ctx.$slots), (slot) => {
|
|
81778
|
-
return {
|
|
81779
|
-
name: slot,
|
|
81780
|
-
fn: withCtx((scope) => [
|
|
81781
|
-
renderSlot(_ctx.$slots, slot, normalizeProps(guardReactiveProps(scope)))
|
|
81782
|
-
])
|
|
81783
|
-
};
|
|
81784
|
-
})
|
|
81785
|
-
]), 1032, ["files", "disabled", "onRemoved"])
|
|
81786
|
-
], 512)) : createCommentVNode("", true)
|
|
81794
|
+
}, 8, ["disabled", "onFilesDropped"])
|
|
81787
81795
|
])
|
|
81788
81796
|
]),
|
|
81789
81797
|
_: 3
|