@bagelink/vue 0.0.897 → 0.0.901
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/components/form/inputs/FileUpload.vue.d.ts.map +1 -1
- package/dist/components/lightbox/Lightbox.vue.d.ts.map +1 -1
- package/dist/components/lightbox/index.d.ts.map +1 -1
- package/dist/index.cjs +70 -34
- package/dist/index.mjs +70 -34
- package/dist/style.css +62 -48
- package/package.json +1 -1
- package/src/components/form/inputs/FileUpload.vue +4 -3
- package/src/components/lightbox/Lightbox.vue +38 -8
- package/src/components/lightbox/index.ts +8 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileUpload.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/form/inputs/FileUpload.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FileUpload.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/form/inputs/FileUpload.vue"],"names":[],"mappings":"AAykBA,OAAO,EAAmC,KAAK,WAAW,EAAkB,MAAM,eAAe,CAAA;AAKjG,KAAK,MAAM,GAAG,MAAM,WAAW,CAAA;AAE/B,KAAK,OAAO,GAAG,MAAM,EAAE,GAAG,MAAM,GAAG,MAAM,CAAA;AAuJzC,iBAAS,MAAM,SAiBd;AA6BD,iBAAS,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;0BA3KZ,MAAM;4BACJ,OAAO;uBACZ,MAAM;2BACF,OAAO;;YAilBS,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;0BAplBpB,MAAM;4BACJ,OAAO;uBACZ,MAAM;2BACF,OAAO;;;YAklBe,GAAG;;;WASvB,OAAO,IAA6B;EAEjD;AAuBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;YA/oBZ,MAAM;eACH,OAAO;YACV,WAAW,GAAG,WAAW,EAAE;cACzB,MAAM;iBACH,OAAO;YACZ,MAAM;aACL,MAAM,GAAG,MAAM;YAChB,MAAM;WACP,OAAO;WACP,OAAO;YACN,UAAU,GAAG,OAAO;aACnB,MAAM;;;;;YAXP,MAAM;eACH,OAAO;YACV,WAAW,GAAG,WAAW,EAAE;cACzB,MAAM;iBACH,OAAO;YACZ,MAAM;aACL,MAAM,GAAG,MAAM;YAChB,MAAM;WACP,OAAO;WACP,OAAO;YACN,UAAU,GAAG,OAAO;aACnB,MAAM;;;;kFA2oBd,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAWpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Lightbox.vue.d.ts","sourceRoot":"","sources":["../../../src/components/lightbox/Lightbox.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Lightbox.vue.d.ts","sourceRoot":"","sources":["../../../src/components/lightbox/Lightbox.vue"],"names":[],"mappings":"AA0RA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AASpD,iBAAS,IAAI,CAAC,IAAI,EAAE,YAAY,EAAE,UAAU,CAAC,EAAE,YAAY,EAAE,QAO5D;AAED,iBAAS,KAAK,SAGb;;;;;AAqeD,wBAMG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/lightbox/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAA+B,MAAM,KAAK,CAAA;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/lightbox/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAA+B,MAAM,KAAK,CAAA;;iBAyF7C,GAAG;;AADjB,wBAIC"}
|
package/dist/index.cjs
CHANGED
|
@@ -18661,13 +18661,13 @@ const _hoisted_11$1 = {
|
|
|
18661
18661
|
key: 0,
|
|
18662
18662
|
class: "h-100"
|
|
18663
18663
|
};
|
|
18664
|
-
const _hoisted_12 = ["src"];
|
|
18665
|
-
const _hoisted_13 = { class: "position-start m-05 flex opacity-7" };
|
|
18666
|
-
const _hoisted_14 = {
|
|
18664
|
+
const _hoisted_12$1 = ["src"];
|
|
18665
|
+
const _hoisted_13$1 = { class: "position-start m-05 flex opacity-7" };
|
|
18666
|
+
const _hoisted_14$1 = {
|
|
18667
18667
|
key: 0,
|
|
18668
18668
|
class: "progress"
|
|
18669
18669
|
};
|
|
18670
|
-
const _hoisted_15 = ["src"];
|
|
18670
|
+
const _hoisted_15$1 = ["src"];
|
|
18671
18671
|
const _hoisted_16 = { class: "p-1 flex column hover fileUploadPlaceHolder justify-content-center mb-05" };
|
|
18672
18672
|
const _sfc_main$D = /* @__PURE__ */ vue.defineComponent({
|
|
18673
18673
|
__name: "FileUpload",
|
|
@@ -18887,18 +18887,16 @@ const _sfc_main$D = /* @__PURE__ */ vue.defineComponent({
|
|
|
18887
18887
|
}, () => [
|
|
18888
18888
|
_ctx.multiple ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$c, [
|
|
18889
18889
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(storageFiles.value, (file) => {
|
|
18890
|
-
return vue.openBlock(), vue.createElementBlock("div", {
|
|
18890
|
+
return vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", {
|
|
18891
18891
|
key: file.id,
|
|
18892
18892
|
class: "multi-image-item-preview"
|
|
18893
18893
|
}, [
|
|
18894
|
-
isImage(file.extension || file.url) ?
|
|
18894
|
+
isImage(file.extension || file.url) ? (vue.openBlock(), vue.createElementBlock("img", {
|
|
18895
18895
|
key: 0,
|
|
18896
18896
|
class: "multi-preview",
|
|
18897
18897
|
src: file.url,
|
|
18898
18898
|
alt: ""
|
|
18899
|
-
}, null, 8, _hoisted_5$a)),
|
|
18900
|
-
[_directive_lightbox]
|
|
18901
|
-
]) : (vue.openBlock(), vue.createBlock(vue.unref(_sfc_main$c), {
|
|
18899
|
+
}, null, 8, _hoisted_5$a)) : (vue.openBlock(), vue.createBlock(vue.unref(_sfc_main$c), {
|
|
18902
18900
|
key: 1,
|
|
18903
18901
|
icon: "draft",
|
|
18904
18902
|
class: "multi-preview"
|
|
@@ -18911,6 +18909,8 @@ const _sfc_main$D = /* @__PURE__ */ vue.defineComponent({
|
|
|
18911
18909
|
color: "red",
|
|
18912
18910
|
onClick: vue.withModifiers(($event) => removeFile(file), ["stop"])
|
|
18913
18911
|
}, null, 8, ["onClick"])
|
|
18912
|
+
])), [
|
|
18913
|
+
[_directive_lightbox, { src: file.url, download: true }]
|
|
18914
18914
|
]);
|
|
18915
18915
|
}), 128)),
|
|
18916
18916
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(fileQueue.value, (fileQ) => {
|
|
@@ -18956,10 +18956,10 @@ const _sfc_main$D = /* @__PURE__ */ vue.defineComponent({
|
|
|
18956
18956
|
class: "single-preview",
|
|
18957
18957
|
src: file.url,
|
|
18958
18958
|
alt: ""
|
|
18959
|
-
}, null, 8, _hoisted_12), [
|
|
18960
|
-
[_directive_lightbox]
|
|
18959
|
+
}, null, 8, _hoisted_12$1), [
|
|
18960
|
+
[_directive_lightbox, { src: file.url, download: true }]
|
|
18961
18961
|
]),
|
|
18962
|
-
vue.createElementVNode("div", _hoisted_13, [
|
|
18962
|
+
vue.createElementVNode("div", _hoisted_13$1, [
|
|
18963
18963
|
vue.withDirectives(vue.createVNode(vue.unref(Btn), {
|
|
18964
18964
|
color: "gray",
|
|
18965
18965
|
thin: "",
|
|
@@ -18989,13 +18989,15 @@ const _sfc_main$D = /* @__PURE__ */ vue.defineComponent({
|
|
|
18989
18989
|
[_directive_tooltip, "Download"]
|
|
18990
18990
|
])
|
|
18991
18991
|
])
|
|
18992
|
-
])) : (vue.openBlock(), vue.createBlock(vue.unref(_sfc_main$c), {
|
|
18992
|
+
])) : vue.withDirectives((vue.openBlock(), vue.createBlock(vue.unref(_sfc_main$c), {
|
|
18993
18993
|
key: 1,
|
|
18994
18994
|
size: 4,
|
|
18995
18995
|
weight: "2",
|
|
18996
18996
|
icon: "draft",
|
|
18997
18997
|
class: "color-primary w-100"
|
|
18998
|
-
}))
|
|
18998
|
+
}, null, 512)), [
|
|
18999
|
+
[_directive_lightbox, { src: file.url, download: true }]
|
|
19000
|
+
])
|
|
18999
19001
|
], 2);
|
|
19000
19002
|
}), 128)),
|
|
19001
19003
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(fileQueue.value, (fileQ) => {
|
|
@@ -19007,7 +19009,7 @@ const _sfc_main$D = /* @__PURE__ */ vue.defineComponent({
|
|
|
19007
19009
|
class: vue.normalizeClass(["pie", { complete: fileQ.progress === 100 }]),
|
|
19008
19010
|
style: vue.normalizeStyle([`--p:${fileQ.progress}`, { "--b": "2px" }])
|
|
19009
19011
|
}, [
|
|
19010
|
-
fileQ.progress < 100 ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_14, vue.toDisplayString(`${fileQ.progress.toFixed(0)}`), 1)) : vue.createCommentVNode("", true),
|
|
19012
|
+
fileQ.progress < 100 ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_14$1, vue.toDisplayString(`${fileQ.progress.toFixed(0)}`), 1)) : vue.createCommentVNode("", true),
|
|
19011
19013
|
vue.createVNode(vue.unref(_sfc_main$c), {
|
|
19012
19014
|
class: "success",
|
|
19013
19015
|
icon: "check"
|
|
@@ -19018,7 +19020,7 @@ const _sfc_main$D = /* @__PURE__ */ vue.defineComponent({
|
|
|
19018
19020
|
class: "single-preview",
|
|
19019
19021
|
src: fileToUrl(fileQ.file),
|
|
19020
19022
|
alt: ""
|
|
19021
|
-
}, null, 8, _hoisted_15)) : vue.createCommentVNode("", true)
|
|
19023
|
+
}, null, 8, _hoisted_15$1)) : vue.createCommentVNode("", true)
|
|
19022
19024
|
], 2);
|
|
19023
19025
|
}), 128))
|
|
19024
19026
|
])) : vue.createCommentVNode("", true)
|
|
@@ -19039,7 +19041,7 @@ const _sfc_main$D = /* @__PURE__ */ vue.defineComponent({
|
|
|
19039
19041
|
};
|
|
19040
19042
|
}
|
|
19041
19043
|
});
|
|
19042
|
-
const $el = /* @__PURE__ */ _export_sfc(_sfc_main$D, [["__scopeId", "data-v-
|
|
19044
|
+
const $el = /* @__PURE__ */ _export_sfc(_sfc_main$D, [["__scopeId", "data-v-c2732102"]]);
|
|
19043
19045
|
const _hoisted_1$u = ["title"];
|
|
19044
19046
|
const _hoisted_2$k = { key: 0 };
|
|
19045
19047
|
const _hoisted_3$g = ["value", "placeholder"];
|
|
@@ -55229,9 +55231,9 @@ class Bagel {
|
|
|
55229
55231
|
}
|
|
55230
55232
|
const _hoisted_1 = {
|
|
55231
55233
|
key: 0,
|
|
55232
|
-
class: "navigation flex space-between px-3 w-100 absolute"
|
|
55234
|
+
class: "navigation flex space-between px-3 w-100 absolute m_px-1"
|
|
55233
55235
|
};
|
|
55234
|
-
const _hoisted_2 = { class: "flex start fixed top-1 w-100 space-between
|
|
55236
|
+
const _hoisted_2 = { class: "flex start fixed top-1 w-100 space-between px-1" };
|
|
55235
55237
|
const _hoisted_3 = {
|
|
55236
55238
|
key: 0,
|
|
55237
55239
|
class: "center"
|
|
@@ -55242,14 +55244,18 @@ const _hoisted_6 = ["src"];
|
|
|
55242
55244
|
const _hoisted_7 = ["src", "title"];
|
|
55243
55245
|
const _hoisted_8 = {
|
|
55244
55246
|
key: 3,
|
|
55245
|
-
class: "file-info txt-white"
|
|
55247
|
+
class: "file-info txt-white flex m_block align-items-start gap-025"
|
|
55246
55248
|
};
|
|
55247
|
-
const _hoisted_9 =
|
|
55248
|
-
const _hoisted_10 = {
|
|
55249
|
+
const _hoisted_9 = { class: "txt-start" };
|
|
55250
|
+
const _hoisted_10 = { class: "mx-0 light" };
|
|
55251
|
+
const _hoisted_11 = { class: "semi word-break-all" };
|
|
55252
|
+
const _hoisted_12 = { class: "mx-0" };
|
|
55253
|
+
const _hoisted_13 = { class: "semi" };
|
|
55254
|
+
const _hoisted_14 = {
|
|
55249
55255
|
key: 0,
|
|
55250
55256
|
class: "flex justify-content-center mt-2 overflow p-1 fixed bottom start end gap-1 m_justify-content-start"
|
|
55251
55257
|
};
|
|
55252
|
-
const
|
|
55258
|
+
const _hoisted_15 = ["src", "onClick"];
|
|
55253
55259
|
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
55254
55260
|
__name: "Lightbox",
|
|
55255
55261
|
setup(__props, { expose: __expose }) {
|
|
@@ -55316,7 +55322,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
55316
55322
|
return [
|
|
55317
55323
|
vue.unref(isOpen) ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
55318
55324
|
key: 0,
|
|
55319
|
-
class: "bgl-lightbox-overlay fixed w-100 h-100 flex justify-content-center z-
|
|
55325
|
+
class: "bgl-lightbox-overlay fixed w-100 h-100 flex justify-content-center z-9999 inset mx-auto",
|
|
55320
55326
|
onKeydown: [
|
|
55321
55327
|
vue.withKeys(close2, ["esc"]),
|
|
55322
55328
|
vue.withKeys(prev, ["left"]),
|
|
@@ -55430,15 +55436,39 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
55430
55436
|
title: (_o = vue.unref(currentItem)) == null ? void 0 : _o.name,
|
|
55431
55437
|
class: "vw90"
|
|
55432
55438
|
}, null, 8, _hoisted_7)) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_8, [
|
|
55433
|
-
vue.
|
|
55434
|
-
|
|
55435
|
-
|
|
55436
|
-
|
|
55437
|
-
|
|
55438
|
-
},
|
|
55439
|
+
vue.createVNode(vue.unref(_sfc_main$c), {
|
|
55440
|
+
class: "m-0 m_none",
|
|
55441
|
+
icon: "draft",
|
|
55442
|
+
size: 10,
|
|
55443
|
+
weight: "12"
|
|
55444
|
+
}),
|
|
55445
|
+
vue.createVNode(vue.unref(_sfc_main$c), {
|
|
55446
|
+
class: "m-0 none m_block m_-mb-1",
|
|
55447
|
+
icon: "draft",
|
|
55448
|
+
size: 4,
|
|
55449
|
+
weight: "2"
|
|
55450
|
+
}),
|
|
55451
|
+
vue.createElementVNode("div", _hoisted_9, [
|
|
55452
|
+
vue.createElementVNode("p", _hoisted_10, [
|
|
55453
|
+
_cache[5] || (_cache[5] = vue.createTextVNode(" File: ")),
|
|
55454
|
+
vue.createElementVNode("span", _hoisted_11, vue.toDisplayString((_p = vue.unref(currentItem)) == null ? void 0 : _p.name), 1)
|
|
55455
|
+
]),
|
|
55456
|
+
vue.createElementVNode("p", _hoisted_12, [
|
|
55457
|
+
_cache[6] || (_cache[6] = vue.createTextVNode(" Type: ")),
|
|
55458
|
+
vue.createElementVNode("span", _hoisted_13, vue.toDisplayString((_q = vue.unref(currentItem)) == null ? void 0 : _q.type), 1)
|
|
55459
|
+
]),
|
|
55460
|
+
vue.createVNode(vue.unref(Btn), {
|
|
55461
|
+
href: (_r2 = vue.unref(currentItem)) == null ? void 0 : _r2.src,
|
|
55462
|
+
target: "_blank",
|
|
55463
|
+
round: "",
|
|
55464
|
+
thin: "",
|
|
55465
|
+
class: "mt-1",
|
|
55466
|
+
value: "Open file"
|
|
55467
|
+
}, null, 8, ["href"])
|
|
55468
|
+
])
|
|
55439
55469
|
]))
|
|
55440
55470
|
]),
|
|
55441
|
-
vue.unref(group) && vue.unref(group).length > 1 ? (vue.openBlock(), vue.createElementBlock("div",
|
|
55471
|
+
vue.unref(group) && vue.unref(group).length > 1 ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_14, [
|
|
55442
55472
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(group), (item, index2) => {
|
|
55443
55473
|
return vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: index2 }, [
|
|
55444
55474
|
item.type === "image" ? (vue.openBlock(), vue.createElementBlock("img", {
|
|
@@ -55447,7 +55477,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
55447
55477
|
src: item.src,
|
|
55448
55478
|
alt: "",
|
|
55449
55479
|
onClick: ($event) => selectItem(index2)
|
|
55450
|
-
}, null, 10,
|
|
55480
|
+
}, null, 10, _hoisted_15)) : (vue.openBlock(), vue.createBlock(vue.unref(_sfc_main$c), {
|
|
55451
55481
|
key: 1,
|
|
55452
55482
|
class: vue.normalizeClass(["thumbnail object-fit-cover hover opacity-5 ed flex bg-popup justify-content-center align-items-center flex-shrink-0", { active: vue.unref(currentIndex) === index2 }]),
|
|
55453
55483
|
icon: "description",
|
|
@@ -55465,7 +55495,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
55465
55495
|
};
|
|
55466
55496
|
}
|
|
55467
55497
|
});
|
|
55468
|
-
const Lightbox$1 = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
55498
|
+
const Lightbox$1 = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-d8f24aae"]]);
|
|
55469
55499
|
const groups = {};
|
|
55470
55500
|
let clickHandler = (_e2) => void 0;
|
|
55471
55501
|
const lightboxDirective = {
|
|
@@ -55511,17 +55541,23 @@ function bindingToItem(binding, el) {
|
|
|
55511
55541
|
let { group, src, type: type3, name, thumbnail, enableZoom, openFile, download } = binding.value || {};
|
|
55512
55542
|
src = src || binding.value || el.getAttribute("src") || "";
|
|
55513
55543
|
type3 = type3 || determineFileType(src);
|
|
55544
|
+
name = name || urlToName(src) || el.getAttribute("alt") || "";
|
|
55514
55545
|
return { src, type: type3, name, thumbnail, group, enableZoom, openFile, download };
|
|
55515
55546
|
}
|
|
55516
55547
|
const youtubeRegex = /youtube\.com|youtu\.be/;
|
|
55517
55548
|
const vimeoRegex = /vimeo\.com/;
|
|
55549
|
+
function urlToName(url) {
|
|
55550
|
+
if (!url) return "";
|
|
55551
|
+
const name = url.split("/").pop() || "";
|
|
55552
|
+
return name.replace(/\.[^/.]+$/, "");
|
|
55553
|
+
}
|
|
55518
55554
|
function determineFileType(url) {
|
|
55519
55555
|
if (!url) return "unknown";
|
|
55520
55556
|
const extension = (url.split(".").pop() || "").toLowerCase();
|
|
55521
55557
|
if (IMAGE_FORMATS_REGEXP.test(extension)) return "image";
|
|
55522
55558
|
if (VIDEO_FORMATS_REGEXP.test(extension) || youtubeRegex.test(url) || vimeoRegex.test(url)) return "video";
|
|
55523
55559
|
if (["pdf"].includes(extension)) return "pdf";
|
|
55524
|
-
return "unknown";
|
|
55560
|
+
return extension ?? "unknown";
|
|
55525
55561
|
}
|
|
55526
55562
|
let lightboxInstance;
|
|
55527
55563
|
function getLightboxInstance() {
|
package/dist/index.mjs
CHANGED
|
@@ -18659,13 +18659,13 @@ const _hoisted_11$1 = {
|
|
|
18659
18659
|
key: 0,
|
|
18660
18660
|
class: "h-100"
|
|
18661
18661
|
};
|
|
18662
|
-
const _hoisted_12 = ["src"];
|
|
18663
|
-
const _hoisted_13 = { class: "position-start m-05 flex opacity-7" };
|
|
18664
|
-
const _hoisted_14 = {
|
|
18662
|
+
const _hoisted_12$1 = ["src"];
|
|
18663
|
+
const _hoisted_13$1 = { class: "position-start m-05 flex opacity-7" };
|
|
18664
|
+
const _hoisted_14$1 = {
|
|
18665
18665
|
key: 0,
|
|
18666
18666
|
class: "progress"
|
|
18667
18667
|
};
|
|
18668
|
-
const _hoisted_15 = ["src"];
|
|
18668
|
+
const _hoisted_15$1 = ["src"];
|
|
18669
18669
|
const _hoisted_16 = { class: "p-1 flex column hover fileUploadPlaceHolder justify-content-center mb-05" };
|
|
18670
18670
|
const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
18671
18671
|
__name: "FileUpload",
|
|
@@ -18885,18 +18885,16 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
|
18885
18885
|
}, () => [
|
|
18886
18886
|
_ctx.multiple ? (openBlock(), createElementBlock("div", _hoisted_4$c, [
|
|
18887
18887
|
(openBlock(true), createElementBlock(Fragment$1, null, renderList(storageFiles.value, (file) => {
|
|
18888
|
-
return openBlock(), createElementBlock("div", {
|
|
18888
|
+
return withDirectives((openBlock(), createElementBlock("div", {
|
|
18889
18889
|
key: file.id,
|
|
18890
18890
|
class: "multi-image-item-preview"
|
|
18891
18891
|
}, [
|
|
18892
|
-
isImage(file.extension || file.url) ?
|
|
18892
|
+
isImage(file.extension || file.url) ? (openBlock(), createElementBlock("img", {
|
|
18893
18893
|
key: 0,
|
|
18894
18894
|
class: "multi-preview",
|
|
18895
18895
|
src: file.url,
|
|
18896
18896
|
alt: ""
|
|
18897
|
-
}, null, 8, _hoisted_5$a)),
|
|
18898
|
-
[_directive_lightbox]
|
|
18899
|
-
]) : (openBlock(), createBlock(unref(_sfc_main$c), {
|
|
18897
|
+
}, null, 8, _hoisted_5$a)) : (openBlock(), createBlock(unref(_sfc_main$c), {
|
|
18900
18898
|
key: 1,
|
|
18901
18899
|
icon: "draft",
|
|
18902
18900
|
class: "multi-preview"
|
|
@@ -18909,6 +18907,8 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
|
18909
18907
|
color: "red",
|
|
18910
18908
|
onClick: withModifiers(($event) => removeFile(file), ["stop"])
|
|
18911
18909
|
}, null, 8, ["onClick"])
|
|
18910
|
+
])), [
|
|
18911
|
+
[_directive_lightbox, { src: file.url, download: true }]
|
|
18912
18912
|
]);
|
|
18913
18913
|
}), 128)),
|
|
18914
18914
|
(openBlock(true), createElementBlock(Fragment$1, null, renderList(fileQueue.value, (fileQ) => {
|
|
@@ -18954,10 +18954,10 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
|
18954
18954
|
class: "single-preview",
|
|
18955
18955
|
src: file.url,
|
|
18956
18956
|
alt: ""
|
|
18957
|
-
}, null, 8, _hoisted_12), [
|
|
18958
|
-
[_directive_lightbox]
|
|
18957
|
+
}, null, 8, _hoisted_12$1), [
|
|
18958
|
+
[_directive_lightbox, { src: file.url, download: true }]
|
|
18959
18959
|
]),
|
|
18960
|
-
createElementVNode("div", _hoisted_13, [
|
|
18960
|
+
createElementVNode("div", _hoisted_13$1, [
|
|
18961
18961
|
withDirectives(createVNode(unref(Btn), {
|
|
18962
18962
|
color: "gray",
|
|
18963
18963
|
thin: "",
|
|
@@ -18987,13 +18987,15 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
|
18987
18987
|
[_directive_tooltip, "Download"]
|
|
18988
18988
|
])
|
|
18989
18989
|
])
|
|
18990
|
-
])) : (openBlock(), createBlock(unref(_sfc_main$c), {
|
|
18990
|
+
])) : withDirectives((openBlock(), createBlock(unref(_sfc_main$c), {
|
|
18991
18991
|
key: 1,
|
|
18992
18992
|
size: 4,
|
|
18993
18993
|
weight: "2",
|
|
18994
18994
|
icon: "draft",
|
|
18995
18995
|
class: "color-primary w-100"
|
|
18996
|
-
}))
|
|
18996
|
+
}, null, 512)), [
|
|
18997
|
+
[_directive_lightbox, { src: file.url, download: true }]
|
|
18998
|
+
])
|
|
18997
18999
|
], 2);
|
|
18998
19000
|
}), 128)),
|
|
18999
19001
|
(openBlock(true), createElementBlock(Fragment$1, null, renderList(fileQueue.value, (fileQ) => {
|
|
@@ -19005,7 +19007,7 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
|
19005
19007
|
class: normalizeClass(["pie", { complete: fileQ.progress === 100 }]),
|
|
19006
19008
|
style: normalizeStyle([`--p:${fileQ.progress}`, { "--b": "2px" }])
|
|
19007
19009
|
}, [
|
|
19008
|
-
fileQ.progress < 100 ? (openBlock(), createElementBlock("span", _hoisted_14, toDisplayString(`${fileQ.progress.toFixed(0)}`), 1)) : createCommentVNode("", true),
|
|
19010
|
+
fileQ.progress < 100 ? (openBlock(), createElementBlock("span", _hoisted_14$1, toDisplayString(`${fileQ.progress.toFixed(0)}`), 1)) : createCommentVNode("", true),
|
|
19009
19011
|
createVNode(unref(_sfc_main$c), {
|
|
19010
19012
|
class: "success",
|
|
19011
19013
|
icon: "check"
|
|
@@ -19016,7 +19018,7 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
|
19016
19018
|
class: "single-preview",
|
|
19017
19019
|
src: fileToUrl(fileQ.file),
|
|
19018
19020
|
alt: ""
|
|
19019
|
-
}, null, 8, _hoisted_15)) : createCommentVNode("", true)
|
|
19021
|
+
}, null, 8, _hoisted_15$1)) : createCommentVNode("", true)
|
|
19020
19022
|
], 2);
|
|
19021
19023
|
}), 128))
|
|
19022
19024
|
])) : createCommentVNode("", true)
|
|
@@ -19037,7 +19039,7 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
|
19037
19039
|
};
|
|
19038
19040
|
}
|
|
19039
19041
|
});
|
|
19040
|
-
const $el = /* @__PURE__ */ _export_sfc(_sfc_main$D, [["__scopeId", "data-v-
|
|
19042
|
+
const $el = /* @__PURE__ */ _export_sfc(_sfc_main$D, [["__scopeId", "data-v-c2732102"]]);
|
|
19041
19043
|
const _hoisted_1$u = ["title"];
|
|
19042
19044
|
const _hoisted_2$k = { key: 0 };
|
|
19043
19045
|
const _hoisted_3$g = ["value", "placeholder"];
|
|
@@ -55227,9 +55229,9 @@ class Bagel {
|
|
|
55227
55229
|
}
|
|
55228
55230
|
const _hoisted_1 = {
|
|
55229
55231
|
key: 0,
|
|
55230
|
-
class: "navigation flex space-between px-3 w-100 absolute"
|
|
55232
|
+
class: "navigation flex space-between px-3 w-100 absolute m_px-1"
|
|
55231
55233
|
};
|
|
55232
|
-
const _hoisted_2 = { class: "flex start fixed top-1 w-100 space-between
|
|
55234
|
+
const _hoisted_2 = { class: "flex start fixed top-1 w-100 space-between px-1" };
|
|
55233
55235
|
const _hoisted_3 = {
|
|
55234
55236
|
key: 0,
|
|
55235
55237
|
class: "center"
|
|
@@ -55240,14 +55242,18 @@ const _hoisted_6 = ["src"];
|
|
|
55240
55242
|
const _hoisted_7 = ["src", "title"];
|
|
55241
55243
|
const _hoisted_8 = {
|
|
55242
55244
|
key: 3,
|
|
55243
|
-
class: "file-info txt-white"
|
|
55245
|
+
class: "file-info txt-white flex m_block align-items-start gap-025"
|
|
55244
55246
|
};
|
|
55245
|
-
const _hoisted_9 =
|
|
55246
|
-
const _hoisted_10 = {
|
|
55247
|
+
const _hoisted_9 = { class: "txt-start" };
|
|
55248
|
+
const _hoisted_10 = { class: "mx-0 light" };
|
|
55249
|
+
const _hoisted_11 = { class: "semi word-break-all" };
|
|
55250
|
+
const _hoisted_12 = { class: "mx-0" };
|
|
55251
|
+
const _hoisted_13 = { class: "semi" };
|
|
55252
|
+
const _hoisted_14 = {
|
|
55247
55253
|
key: 0,
|
|
55248
55254
|
class: "flex justify-content-center mt-2 overflow p-1 fixed bottom start end gap-1 m_justify-content-start"
|
|
55249
55255
|
};
|
|
55250
|
-
const
|
|
55256
|
+
const _hoisted_15 = ["src", "onClick"];
|
|
55251
55257
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
55252
55258
|
__name: "Lightbox",
|
|
55253
55259
|
setup(__props, { expose: __expose }) {
|
|
@@ -55314,7 +55320,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
55314
55320
|
return [
|
|
55315
55321
|
unref(isOpen) ? (openBlock(), createElementBlock("div", {
|
|
55316
55322
|
key: 0,
|
|
55317
|
-
class: "bgl-lightbox-overlay fixed w-100 h-100 flex justify-content-center z-
|
|
55323
|
+
class: "bgl-lightbox-overlay fixed w-100 h-100 flex justify-content-center z-9999 inset mx-auto",
|
|
55318
55324
|
onKeydown: [
|
|
55319
55325
|
withKeys(close2, ["esc"]),
|
|
55320
55326
|
withKeys(prev, ["left"]),
|
|
@@ -55428,15 +55434,39 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
55428
55434
|
title: (_o = unref(currentItem)) == null ? void 0 : _o.name,
|
|
55429
55435
|
class: "vw90"
|
|
55430
55436
|
}, null, 8, _hoisted_7)) : (openBlock(), createElementBlock("div", _hoisted_8, [
|
|
55431
|
-
|
|
55432
|
-
|
|
55433
|
-
|
|
55434
|
-
|
|
55435
|
-
|
|
55436
|
-
},
|
|
55437
|
+
createVNode(unref(_sfc_main$c), {
|
|
55438
|
+
class: "m-0 m_none",
|
|
55439
|
+
icon: "draft",
|
|
55440
|
+
size: 10,
|
|
55441
|
+
weight: "12"
|
|
55442
|
+
}),
|
|
55443
|
+
createVNode(unref(_sfc_main$c), {
|
|
55444
|
+
class: "m-0 none m_block m_-mb-1",
|
|
55445
|
+
icon: "draft",
|
|
55446
|
+
size: 4,
|
|
55447
|
+
weight: "2"
|
|
55448
|
+
}),
|
|
55449
|
+
createElementVNode("div", _hoisted_9, [
|
|
55450
|
+
createElementVNode("p", _hoisted_10, [
|
|
55451
|
+
_cache[5] || (_cache[5] = createTextVNode(" File: ")),
|
|
55452
|
+
createElementVNode("span", _hoisted_11, toDisplayString((_p = unref(currentItem)) == null ? void 0 : _p.name), 1)
|
|
55453
|
+
]),
|
|
55454
|
+
createElementVNode("p", _hoisted_12, [
|
|
55455
|
+
_cache[6] || (_cache[6] = createTextVNode(" Type: ")),
|
|
55456
|
+
createElementVNode("span", _hoisted_13, toDisplayString((_q = unref(currentItem)) == null ? void 0 : _q.type), 1)
|
|
55457
|
+
]),
|
|
55458
|
+
createVNode(unref(Btn), {
|
|
55459
|
+
href: (_r2 = unref(currentItem)) == null ? void 0 : _r2.src,
|
|
55460
|
+
target: "_blank",
|
|
55461
|
+
round: "",
|
|
55462
|
+
thin: "",
|
|
55463
|
+
class: "mt-1",
|
|
55464
|
+
value: "Open file"
|
|
55465
|
+
}, null, 8, ["href"])
|
|
55466
|
+
])
|
|
55437
55467
|
]))
|
|
55438
55468
|
]),
|
|
55439
|
-
unref(group) && unref(group).length > 1 ? (openBlock(), createElementBlock("div",
|
|
55469
|
+
unref(group) && unref(group).length > 1 ? (openBlock(), createElementBlock("div", _hoisted_14, [
|
|
55440
55470
|
(openBlock(true), createElementBlock(Fragment$1, null, renderList(unref(group), (item, index2) => {
|
|
55441
55471
|
return openBlock(), createElementBlock(Fragment$1, { key: index2 }, [
|
|
55442
55472
|
item.type === "image" ? (openBlock(), createElementBlock("img", {
|
|
@@ -55445,7 +55475,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
55445
55475
|
src: item.src,
|
|
55446
55476
|
alt: "",
|
|
55447
55477
|
onClick: ($event) => selectItem(index2)
|
|
55448
|
-
}, null, 10,
|
|
55478
|
+
}, null, 10, _hoisted_15)) : (openBlock(), createBlock(unref(_sfc_main$c), {
|
|
55449
55479
|
key: 1,
|
|
55450
55480
|
class: normalizeClass(["thumbnail object-fit-cover hover opacity-5 ed flex bg-popup justify-content-center align-items-center flex-shrink-0", { active: unref(currentIndex) === index2 }]),
|
|
55451
55481
|
icon: "description",
|
|
@@ -55463,7 +55493,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
55463
55493
|
};
|
|
55464
55494
|
}
|
|
55465
55495
|
});
|
|
55466
|
-
const Lightbox$1 = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
55496
|
+
const Lightbox$1 = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-d8f24aae"]]);
|
|
55467
55497
|
const groups = {};
|
|
55468
55498
|
let clickHandler = (_e2) => void 0;
|
|
55469
55499
|
const lightboxDirective = {
|
|
@@ -55509,17 +55539,23 @@ function bindingToItem(binding, el) {
|
|
|
55509
55539
|
let { group, src, type: type3, name, thumbnail, enableZoom, openFile, download } = binding.value || {};
|
|
55510
55540
|
src = src || binding.value || el.getAttribute("src") || "";
|
|
55511
55541
|
type3 = type3 || determineFileType(src);
|
|
55542
|
+
name = name || urlToName(src) || el.getAttribute("alt") || "";
|
|
55512
55543
|
return { src, type: type3, name, thumbnail, group, enableZoom, openFile, download };
|
|
55513
55544
|
}
|
|
55514
55545
|
const youtubeRegex = /youtube\.com|youtu\.be/;
|
|
55515
55546
|
const vimeoRegex = /vimeo\.com/;
|
|
55547
|
+
function urlToName(url) {
|
|
55548
|
+
if (!url) return "";
|
|
55549
|
+
const name = url.split("/").pop() || "";
|
|
55550
|
+
return name.replace(/\.[^/.]+$/, "");
|
|
55551
|
+
}
|
|
55516
55552
|
function determineFileType(url) {
|
|
55517
55553
|
if (!url) return "unknown";
|
|
55518
55554
|
const extension = (url.split(".").pop() || "").toLowerCase();
|
|
55519
55555
|
if (IMAGE_FORMATS_REGEXP.test(extension)) return "image";
|
|
55520
55556
|
if (VIDEO_FORMATS_REGEXP.test(extension) || youtubeRegex.test(url) || vimeoRegex.test(url)) return "video";
|
|
55521
55557
|
if (["pdf"].includes(extension)) return "pdf";
|
|
55522
|
-
return "unknown";
|
|
55558
|
+
return extension ?? "unknown";
|
|
55523
55559
|
}
|
|
55524
55560
|
let lightboxInstance;
|
|
55525
55561
|
function getLightboxInstance() {
|
package/dist/style.css
CHANGED
|
@@ -706,7 +706,7 @@ data[data-v-6c27f163] {
|
|
|
706
706
|
}
|
|
707
707
|
}
|
|
708
708
|
|
|
709
|
-
.fileUploadWrap[data-v-
|
|
709
|
+
.fileUploadWrap[data-v-c2732102] {
|
|
710
710
|
outline: 1px solid var(--border-color);
|
|
711
711
|
border-radius: var(--input-border-radius);
|
|
712
712
|
text-align: center;
|
|
@@ -718,7 +718,7 @@ data[data-v-6c27f163] {
|
|
|
718
718
|
background: var(--input-bg);
|
|
719
719
|
height: 215px;
|
|
720
720
|
}
|
|
721
|
-
.bagel-input .fileUploadWrap.fileDropZone[data-v-
|
|
721
|
+
.bagel-input .fileUploadWrap.fileDropZone[data-v-c2732102] {
|
|
722
722
|
background: var(--input-bg);
|
|
723
723
|
display: flex;
|
|
724
724
|
align-items: center;
|
|
@@ -726,14 +726,14 @@ data[data-v-6c27f163] {
|
|
|
726
726
|
color: var(--bgl-gray);
|
|
727
727
|
flex-direction: column;
|
|
728
728
|
}
|
|
729
|
-
.fileUploadWrap.dragover[data-v-
|
|
730
|
-
.fileUploadWrap[data-v-
|
|
729
|
+
.fileUploadWrap.dragover[data-v-c2732102],
|
|
730
|
+
.fileUploadWrap[data-v-c2732102]:hover {
|
|
731
731
|
box-shadow: inset 0 0 10px #00000012;
|
|
732
732
|
}
|
|
733
|
-
.fileUploadWrap[style*="height: auto;"][data-v-
|
|
733
|
+
.fileUploadWrap[style*="height: auto;"][data-v-c2732102] {
|
|
734
734
|
min-height: 215px;
|
|
735
735
|
}
|
|
736
|
-
.multi-image-item-preview[data-v-
|
|
736
|
+
.multi-image-item-preview[data-v-c2732102] {
|
|
737
737
|
border: 1px solid var(--border-color) !important;
|
|
738
738
|
border-radius: var(--input-border-radius);
|
|
739
739
|
margin: 0.5rem !important;
|
|
@@ -747,12 +747,12 @@ data[data-v-6c27f163] {
|
|
|
747
747
|
gap: 1rem;
|
|
748
748
|
align-items: center;
|
|
749
749
|
}
|
|
750
|
-
.multi-image-item-preview p[data-v-
|
|
750
|
+
.multi-image-item-preview p[data-v-c2732102] {
|
|
751
751
|
overflow: hidden;
|
|
752
752
|
text-overflow: ellipsis;
|
|
753
753
|
white-space: nowrap;
|
|
754
754
|
}
|
|
755
|
-
.multi-preview[data-v-
|
|
755
|
+
.multi-preview[data-v-c2732102]{
|
|
756
756
|
width: 40px;
|
|
757
757
|
height: 40px;
|
|
758
758
|
border-radius: var(--input-border-radius);
|
|
@@ -763,17 +763,17 @@ data[data-v-6c27f163] {
|
|
|
763
763
|
align-items: center;
|
|
764
764
|
display: flex;
|
|
765
765
|
}
|
|
766
|
-
.bgl-single-preview[data-v-
|
|
766
|
+
.bgl-single-preview[data-v-c2732102]{
|
|
767
767
|
height: 100%;
|
|
768
768
|
position: relative;
|
|
769
769
|
}
|
|
770
|
-
.bgl-single-preview + .fileUploadPlaceHolder[data-v-
|
|
770
|
+
.bgl-single-preview + .fileUploadPlaceHolder[data-v-c2732102]{
|
|
771
771
|
position: absolute;
|
|
772
772
|
inset: 0;
|
|
773
773
|
margin: auto;
|
|
774
774
|
top: calc(50% - 2rem);
|
|
775
775
|
}
|
|
776
|
-
.single-image-item-preview[data-v-
|
|
776
|
+
.single-image-item-preview[data-v-c2732102] {
|
|
777
777
|
height: 100%;
|
|
778
778
|
min-height: 100%;
|
|
779
779
|
position: relative;
|
|
@@ -781,13 +781,13 @@ data[data-v-6c27f163] {
|
|
|
781
781
|
align-items: center;
|
|
782
782
|
justify-content: center;
|
|
783
783
|
}
|
|
784
|
-
.fileUploadWrap[style*="height: auto"] .single-image-item-preview[data-v-
|
|
784
|
+
.fileUploadWrap[style*="height: auto"] .single-image-item-preview[data-v-c2732102] {
|
|
785
785
|
min-height: 215px;
|
|
786
786
|
}
|
|
787
|
-
.fileUploadWrap[style*="height: auto"] .single-preview[data-v-
|
|
787
|
+
.fileUploadWrap[style*="height: auto"] .single-preview[data-v-c2732102] {
|
|
788
788
|
margin: 0rem !important;
|
|
789
789
|
}
|
|
790
|
-
.single-preview[data-v-
|
|
790
|
+
.single-preview[data-v-c2732102]{
|
|
791
791
|
border-radius: var(--input-border-radius);
|
|
792
792
|
margin: 1rem;
|
|
793
793
|
padding: 0px;
|
|
@@ -796,7 +796,7 @@ data[data-v-6c27f163] {
|
|
|
796
796
|
object-fit: cover;
|
|
797
797
|
background: var(--bgl-gray-light);
|
|
798
798
|
}
|
|
799
|
-
.single-image-item-preview[data-v-
|
|
799
|
+
.single-image-item-preview[data-v-c2732102]:hover::after{
|
|
800
800
|
content: "zoom_in";
|
|
801
801
|
font-size: 32px;
|
|
802
802
|
font-family: "Material Symbols Outlined", serif;
|
|
@@ -806,20 +806,20 @@ data[data-v-6c27f163] {
|
|
|
806
806
|
z-index: 9;
|
|
807
807
|
pointer-events: none;
|
|
808
808
|
}
|
|
809
|
-
.single-image-item-preview:hover img[data-v-
|
|
809
|
+
.single-image-item-preview:hover img[data-v-c2732102]{
|
|
810
810
|
filter: brightness(70%);
|
|
811
811
|
}
|
|
812
|
-
.bgl_fill-image.single-image-item-preview[data-v-
|
|
812
|
+
.bgl_fill-image.single-image-item-preview[data-v-c2732102] {
|
|
813
813
|
height: 100%;
|
|
814
814
|
}
|
|
815
|
-
.bgl_fill-image.single-image-item-preview .single-preview[data-v-
|
|
815
|
+
.bgl_fill-image.single-image-item-preview .single-preview[data-v-c2732102]{
|
|
816
816
|
border-radius: unset;
|
|
817
817
|
object-fit: cover;
|
|
818
818
|
box-shadow: unset;
|
|
819
819
|
width: 100%;
|
|
820
820
|
height: auto;
|
|
821
821
|
}
|
|
822
|
-
.single-image-item-preview .pie[data-v-
|
|
822
|
+
.single-image-item-preview .pie[data-v-c2732102] {
|
|
823
823
|
transform-origin: top;
|
|
824
824
|
transform: scale(1.4);
|
|
825
825
|
position: absolute;
|
|
@@ -833,31 +833,31 @@ data[data-v-6c27f163] {
|
|
|
833
833
|
border: none !important;
|
|
834
834
|
padding: 0 !important;
|
|
835
835
|
}
|
|
836
|
-
.bgl_oval-upload[data-v-
|
|
836
|
+
.bgl_oval-upload[data-v-c2732102] {
|
|
837
837
|
border-radius: 100% !important;
|
|
838
838
|
overflow: hidden;
|
|
839
839
|
}
|
|
840
|
-
.bgl_oval-upload p[data-v-
|
|
840
|
+
.bgl_oval-upload p[data-v-c2732102] {
|
|
841
841
|
padding: 0.75rem !important;
|
|
842
842
|
font-size: 12px
|
|
843
843
|
}
|
|
844
|
-
.bgl_oval-upload .fileUploadPlaceHolder[data-v-
|
|
844
|
+
.bgl_oval-upload .fileUploadPlaceHolder[data-v-c2732102]{
|
|
845
845
|
top: 0;
|
|
846
846
|
}
|
|
847
|
-
.bgl_oval-upload .pie[data-v-
|
|
847
|
+
.bgl_oval-upload .pie[data-v-c2732102] {
|
|
848
848
|
transform: scale(1);
|
|
849
849
|
}
|
|
850
|
-
.bgl_oval-upload span.bgl_icon-font.color-primary[data-v-
|
|
850
|
+
.bgl_oval-upload span.bgl_icon-font.color-primary[data-v-c2732102] {
|
|
851
851
|
transform: scale(0.4) !important;
|
|
852
852
|
}
|
|
853
|
-
.bgl_oval-upload .single-image-item-preview[data-v-
|
|
853
|
+
.bgl_oval-upload .single-image-item-preview[data-v-c2732102]{
|
|
854
854
|
height: 100%;
|
|
855
855
|
}
|
|
856
|
-
.bgl_oval-upload .single-preview[data-v-
|
|
856
|
+
.bgl_oval-upload .single-preview[data-v-c2732102] {
|
|
857
857
|
margin: 0;
|
|
858
858
|
height: 100% !important;
|
|
859
859
|
}
|
|
860
|
-
.pie[data-v-
|
|
860
|
+
.pie[data-v-c2732102] {
|
|
861
861
|
width: 30px;
|
|
862
862
|
height: 30px;
|
|
863
863
|
position: relative;
|
|
@@ -865,7 +865,7 @@ data[data-v-6c27f163] {
|
|
|
865
865
|
align-items: center;
|
|
866
866
|
justify-content: center;
|
|
867
867
|
}
|
|
868
|
-
.pie[data-v-
|
|
868
|
+
.pie[data-v-c2732102]:before {
|
|
869
869
|
content: '';
|
|
870
870
|
position: absolute;
|
|
871
871
|
border-radius: 50%;
|
|
@@ -883,26 +883,26 @@ data[data-v-6c27f163] {
|
|
|
883
883
|
#000 calc(100% - var(--b))
|
|
884
884
|
);
|
|
885
885
|
}
|
|
886
|
-
.pie .success[data-v-
|
|
886
|
+
.pie .success[data-v-c2732102] {
|
|
887
887
|
transform: scale(0);
|
|
888
888
|
opacity: 0;
|
|
889
889
|
transition: all 0.3s ease-in-out;
|
|
890
890
|
}
|
|
891
|
-
.pie .progress[data-v-
|
|
891
|
+
.pie .progress[data-v-c2732102] {
|
|
892
892
|
position: absolute;
|
|
893
893
|
font-size: 10px;
|
|
894
894
|
}
|
|
895
|
-
.pie.complete .progress[data-v-
|
|
895
|
+
.pie.complete .progress[data-v-c2732102] {
|
|
896
896
|
display: none;
|
|
897
897
|
}
|
|
898
|
-
.pie.complete .success[data-v-
|
|
898
|
+
.pie.complete .success[data-v-c2732102] {
|
|
899
899
|
transform: scale(1.3);
|
|
900
900
|
opacity: 1;
|
|
901
901
|
}
|
|
902
|
-
.pie.complete[data-v-
|
|
902
|
+
.pie.complete[data-v-c2732102]:before {
|
|
903
903
|
background: conic-gradient(var(--bgl-green) calc(var(--p) * 1%), #0000 0);
|
|
904
904
|
}
|
|
905
|
-
.pie.complete[data-v-
|
|
905
|
+
.pie.complete[data-v-c2732102] {
|
|
906
906
|
color: var(--bgl-green);
|
|
907
907
|
}
|
|
908
908
|
|
|
@@ -3488,19 +3488,19 @@ tbody tr[data-v-d8ca38b1]:hover {
|
|
|
3488
3488
|
-moz-user-drag: none;
|
|
3489
3489
|
}
|
|
3490
3490
|
|
|
3491
|
-
.lightbox-image[data-v-
|
|
3491
|
+
.lightbox-image[data-v-d8f24aae]{
|
|
3492
3492
|
object-fit: contain;
|
|
3493
3493
|
}
|
|
3494
|
-
.bgl-lightbox-overlay[data-v-
|
|
3494
|
+
.bgl-lightbox-overlay[data-v-d8f24aae] {
|
|
3495
3495
|
background: rgba(0, 0, 0, 0.8);
|
|
3496
3496
|
}
|
|
3497
|
-
.bgl-lightbox[data-v-
|
|
3497
|
+
.bgl-lightbox[data-v-d8f24aae] {
|
|
3498
3498
|
max-height: 90%;
|
|
3499
3499
|
}
|
|
3500
|
-
.bgl-lightbox-item[data-v-
|
|
3501
|
-
animation: 500ms ease bgl-lightbox-load-
|
|
3500
|
+
.bgl-lightbox-item[data-v-d8f24aae]{
|
|
3501
|
+
animation: 500ms ease bgl-lightbox-load-d8f24aae;
|
|
3502
3502
|
}
|
|
3503
|
-
@keyframes bgl-lightbox-load-
|
|
3503
|
+
@keyframes bgl-lightbox-load-d8f24aae {
|
|
3504
3504
|
from {
|
|
3505
3505
|
scale:0.7;
|
|
3506
3506
|
}
|
|
@@ -3508,35 +3508,49 @@ to {
|
|
|
3508
3508
|
scale:1;
|
|
3509
3509
|
}
|
|
3510
3510
|
}
|
|
3511
|
-
.bgl-lightbox-item[data-v-
|
|
3511
|
+
.bgl-lightbox-item[data-v-d8f24aae] * {
|
|
3512
3512
|
max-width: 90%;
|
|
3513
3513
|
max-height: calc(80vh - 90px);
|
|
3514
3514
|
border-radius: 3px;
|
|
3515
3515
|
margin: auto;
|
|
3516
|
-
animation: 200ms ease bgl-lightbox-load-
|
|
3516
|
+
animation: 200ms ease bgl-lightbox-load-d8f24aae;
|
|
3517
3517
|
}
|
|
3518
|
-
.navigation[data-v-
|
|
3518
|
+
.navigation[data-v-d8f24aae] {
|
|
3519
3519
|
top: 50%;
|
|
3520
3520
|
transform: translateY(-50%);
|
|
3521
3521
|
}
|
|
3522
|
-
.navigation-btn[data-v-
|
|
3522
|
+
.navigation-btn[data-v-d8f24aae] {
|
|
3523
3523
|
width: var(--input-height);
|
|
3524
3524
|
height: var(--input-height);
|
|
3525
3525
|
}
|
|
3526
|
-
.thumbnail[data-v-
|
|
3526
|
+
.thumbnail[data-v-d8f24aae] {
|
|
3527
3527
|
height: 50px;
|
|
3528
3528
|
width: 50px;
|
|
3529
3529
|
}
|
|
3530
|
-
.thumbnail[data-v-
|
|
3530
|
+
.thumbnail[data-v-d8f24aae]:hover {
|
|
3531
3531
|
opacity: 1;
|
|
3532
3532
|
}
|
|
3533
|
-
.thumbnail[data-v-
|
|
3533
|
+
.thumbnail[data-v-d8f24aae]:active {
|
|
3534
3534
|
opacity: 0.8;
|
|
3535
3535
|
}
|
|
3536
|
-
.thumbnail.active[data-v-
|
|
3536
|
+
.thumbnail.active[data-v-d8f24aae] {
|
|
3537
3537
|
opacity: 1;
|
|
3538
3538
|
outline: 2px solid white;
|
|
3539
3539
|
}
|
|
3540
|
+
.file-info[data-v-d8f24aae]{
|
|
3541
|
+
max-width: 420px
|
|
3542
|
+
}
|
|
3543
|
+
@media screen and (max-width: 910px) {
|
|
3544
|
+
.file-info[data-v-d8f24aae]{
|
|
3545
|
+
max-width: 220px;
|
|
3546
|
+
text-align: center !important;
|
|
3547
|
+
}
|
|
3548
|
+
.file-info[data-v-d8f24aae] *{
|
|
3549
|
+
text-align: center !important;
|
|
3550
|
+
margin-inline: 0 !important;;
|
|
3551
|
+
max-width: 100% !important;
|
|
3552
|
+
}
|
|
3553
|
+
}
|
|
3540
3554
|
|
|
3541
3555
|
|
|
3542
3556
|
.grid {
|
package/package.json
CHANGED
|
@@ -249,9 +249,10 @@ function drop(e: DragEvent) {
|
|
|
249
249
|
<div
|
|
250
250
|
v-for="file in storageFiles"
|
|
251
251
|
:key="file.id"
|
|
252
|
+
v-lightbox="{ src: file.url, download: true }"
|
|
252
253
|
class="multi-image-item-preview"
|
|
253
254
|
>
|
|
254
|
-
<img v-if="isImage(file.extension || file.url)"
|
|
255
|
+
<img v-if="isImage(file.extension || file.url)" class="multi-preview" :src="file.url" alt="">
|
|
255
256
|
<Icon v-else icon="draft" class="multi-preview" />
|
|
256
257
|
<p class="m-0">
|
|
257
258
|
{{ file.name }}
|
|
@@ -306,7 +307,7 @@ function drop(e: DragEvent) {
|
|
|
306
307
|
:class="{ 'bgl_fill-image': fill }"
|
|
307
308
|
>
|
|
308
309
|
<div v-if="isImage(file.extension || file.url)" class="h-100">
|
|
309
|
-
<img v-lightbox class="single-preview" :src="file.url" alt="">
|
|
310
|
+
<img v-lightbox="{ src: file.url, download: true }" class="single-preview" :src="file.url" alt="">
|
|
310
311
|
<div class="position-start m-05 flex opacity-7">
|
|
311
312
|
<Btn v-tooltip="'Delete'" color="gray" thin icon="delete" @click.stop="removeFile(file)" />
|
|
312
313
|
<Btn
|
|
@@ -322,7 +323,7 @@ function drop(e: DragEvent) {
|
|
|
322
323
|
/>
|
|
323
324
|
</div>
|
|
324
325
|
</div>
|
|
325
|
-
<Icon v-else :size="4" weight="2" icon="draft" class="color-primary w-100" />
|
|
326
|
+
<Icon v-else v-lightbox="{ src: file.url, download: true }" :size="4" weight="2" icon="draft" class="color-primary w-100" />
|
|
326
327
|
</div>
|
|
327
328
|
|
|
328
329
|
<div
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { BglVideo, Btn, Icon, Zoomer } from '@bagelink/vue'
|
|
3
|
-
import { watch } from 'vue'
|
|
4
3
|
|
|
4
|
+
import { watch } from 'vue'
|
|
5
5
|
import type { LightboxItem } from './lightbox.types'
|
|
6
6
|
|
|
7
7
|
let isOpen = $ref(false)
|
|
@@ -78,13 +78,13 @@ defineExpose({ open, close })
|
|
|
78
78
|
<transition name="fade">
|
|
79
79
|
<div
|
|
80
80
|
v-if="isOpen"
|
|
81
|
-
class="bgl-lightbox-overlay fixed w-100 h-100 flex justify-content-center z-
|
|
81
|
+
class="bgl-lightbox-overlay fixed w-100 h-100 flex justify-content-center z-9999 inset mx-auto"
|
|
82
82
|
@keydown.esc="close"
|
|
83
83
|
@keydown.left="prev"
|
|
84
84
|
@keydown.right="next"
|
|
85
85
|
@click="clickOutside"
|
|
86
86
|
>
|
|
87
|
-
<div v-if="group && group.length > 1" class="navigation flex space-between px-3 w-100 absolute">
|
|
87
|
+
<div v-if="group && group.length > 1" class="navigation flex space-between px-3 w-100 absolute m_px-1">
|
|
88
88
|
<Btn
|
|
89
89
|
class="navigation-btn oval"
|
|
90
90
|
icon="arrow_back"
|
|
@@ -98,7 +98,7 @@ defineExpose({ open, close })
|
|
|
98
98
|
/>
|
|
99
99
|
</div>
|
|
100
100
|
<div class="bgl-lightbox relative txt-center" @click.stop>
|
|
101
|
-
<div class="flex start fixed top-1 w-100 space-between
|
|
101
|
+
<div class="flex start fixed top-1 w-100 space-between px-1">
|
|
102
102
|
<Btn flat class="color-white" icon="close" @click="close" />
|
|
103
103
|
<div v-if="currentItem?.enableZoom && currentItem?.type === 'image'" class="center">
|
|
104
104
|
<Btn flat class="color-white" icon="remove" :disabled="zoom === 1" @click="zoom--" />
|
|
@@ -144,10 +144,26 @@ defineExpose({ open, close })
|
|
|
144
144
|
>
|
|
145
145
|
</template>
|
|
146
146
|
<template v-else>
|
|
147
|
-
<div class="file-info txt-white">
|
|
148
|
-
<
|
|
149
|
-
<
|
|
150
|
-
|
|
147
|
+
<div class="file-info txt-white flex m_block align-items-start gap-025">
|
|
148
|
+
<Icon class="m-0 m_none" icon="draft" :size="10" weight="12" />
|
|
149
|
+
<Icon class="m-0 none m_block m_-mb-1" icon="draft" :size="4" weight="2" />
|
|
150
|
+
|
|
151
|
+
<div class="txt-start">
|
|
152
|
+
<p class="mx-0 light">
|
|
153
|
+
File:
|
|
154
|
+
<span class="semi word-break-all ">
|
|
155
|
+
{{ currentItem?.name }}
|
|
156
|
+
</span>
|
|
157
|
+
</p>
|
|
158
|
+
<p class="mx-0 ">
|
|
159
|
+
Type:
|
|
160
|
+
<span class="semi">
|
|
161
|
+
{{ currentItem?.type }}
|
|
162
|
+
</span>
|
|
163
|
+
</p>
|
|
164
|
+
<Btn :href="currentItem?.src" target="_blank" round thin class="mt-1" value="Open file" />
|
|
165
|
+
<!-- <a :href="currentItem?.src" target="_blank">Open file</a> -->
|
|
166
|
+
</div>
|
|
151
167
|
</div>
|
|
152
168
|
</template>
|
|
153
169
|
</div>
|
|
@@ -244,4 +260,18 @@ defineExpose({ open, close })
|
|
|
244
260
|
opacity: 1;
|
|
245
261
|
outline: 2px solid white;
|
|
246
262
|
}
|
|
263
|
+
.file-info{
|
|
264
|
+
max-width: 420px
|
|
265
|
+
}
|
|
266
|
+
@media screen and (max-width: 910px) {
|
|
267
|
+
.file-info{
|
|
268
|
+
max-width: 220px;
|
|
269
|
+
text-align: center !important;
|
|
270
|
+
}
|
|
271
|
+
.file-info *{
|
|
272
|
+
text-align: center !important;
|
|
273
|
+
margin-inline: 0 !important;;
|
|
274
|
+
max-width: 100% !important;
|
|
275
|
+
}
|
|
276
|
+
}
|
|
247
277
|
</style>
|
|
@@ -52,19 +52,26 @@ function bindingToItem(binding: DirectiveBinding, el: HTMLElement): LightboxItem
|
|
|
52
52
|
let { group, src, type, name, thumbnail, enableZoom, openFile, download } = binding.value || {}
|
|
53
53
|
src = src || binding.value || el.getAttribute('src') || ''
|
|
54
54
|
type = type || determineFileType(src)
|
|
55
|
+
name = name || urlToName(src) || el.getAttribute('alt') || ''
|
|
55
56
|
return { src, type, name, thumbnail, group, enableZoom, openFile, download }
|
|
56
57
|
}
|
|
57
58
|
|
|
58
59
|
const youtubeRegex = /youtube\.com|youtu\.be/
|
|
59
60
|
const vimeoRegex = /vimeo\.com/
|
|
60
61
|
|
|
62
|
+
function urlToName(url: string): string {
|
|
63
|
+
if (!url) return ''
|
|
64
|
+
const name = url.split('/').pop() || ''
|
|
65
|
+
return name.replace(/\.[^/.]+$/, '')
|
|
66
|
+
}
|
|
67
|
+
|
|
61
68
|
function determineFileType(url: string): string {
|
|
62
69
|
if (!url) return 'unknown'
|
|
63
70
|
const extension = (url.split('.').pop() || '').toLowerCase()
|
|
64
71
|
if (IMAGE_FORMATS_REGEXP.test(extension)) return 'image'
|
|
65
72
|
if (VIDEO_FORMATS_REGEXP.test(extension) || youtubeRegex.test(url) || vimeoRegex.test(url)) return 'video'
|
|
66
73
|
if (['pdf'].includes(extension)) return 'pdf'
|
|
67
|
-
return 'unknown'
|
|
74
|
+
return extension ?? 'unknown'
|
|
68
75
|
}
|
|
69
76
|
|
|
70
77
|
let lightboxInstance: InstanceType<typeof Lightbox> | undefined
|