@vc-shell/framework 1.1.1 → 1.1.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/CHANGELOG.md +4 -0
- package/dist/assets/apl-NdZ6-T1z.js +142 -0
- package/dist/assets/asciiarmor-CmJEbAuq.js +56 -0
- package/dist/assets/asn1-Ctc8K72v.js +192 -0
- package/dist/assets/asterisk-D6r__RMF.js +187 -0
- package/dist/assets/brainfuck-COwWCBpq.js +70 -0
- package/dist/assets/clike-C-PtfL50.js +1019 -0
- package/dist/assets/clojure-C2XPrGCa.js +274 -0
- package/dist/assets/cmake-BGrEgXCL.js +81 -0
- package/dist/assets/cobol-DShPmpZe.js +234 -0
- package/dist/assets/coffeescript-BG8vTfSz.js +329 -0
- package/dist/assets/commonlisp-8oE2EpEe.js +108 -0
- package/dist/assets/core-api-BMLS9FrT.js +8288 -0
- package/dist/assets/core-composables-DYxpIWyY.js +1799 -0
- package/dist/assets/core-constants-DiKDBbnD.js +83 -0
- package/dist/assets/core-directives-QhJx9kWh.js +41 -0
- package/dist/assets/core-interceptors-CSjUvxQ0.js +78 -0
- package/dist/assets/core-plugins-wv2bDZ0l.js +4919 -0
- package/dist/assets/core-services-CAfJRsjs.js +4 -0
- package/dist/assets/core-utilities-BTktq_a-.js +33 -0
- package/dist/assets/crystal--rIRMl16.js +419 -0
- package/dist/assets/css/core-directives-FL4vIIkN.css +73 -0
- package/dist/assets/css/fonts-M1mtyV8L.css +305 -0
- package/dist/assets/css/icons-css-DbCVsovz.css +41 -0
- package/dist/assets/css/shared-components-bnLHdCtf.css +429 -0
- package/dist/assets/css/shared-modules-CNOICmYQ.css +45 -0
- package/dist/assets/css/styles-C62nDZwV.css +4096 -0
- package/dist/assets/css/ui-app-Bh9hmlIB.css +1287 -0
- package/dist/assets/css/ui-content-B29jsmK7.css +1187 -0
- package/dist/assets/css/ui-controls-CRtfFczw.css +387 -0
- package/dist/assets/css/ui-data-CYLxfdUa.css +1555 -0
- package/dist/assets/css/ui-form-C3WrWfVl.css +71 -0
- package/dist/assets/css/ui-form-fields-DOtHhDeM.css +1360 -0
- package/dist/assets/css/ui-helpers-bOoNv5dS.css +37 -0
- package/dist/assets/css/ui-indicators-CybQnCoU.css +628 -0
- package/dist/assets/css/ui-layout-DyGKgizy.css +251 -0
- package/dist/assets/css/ui-media-TWYep8js.css +298 -0
- package/dist/assets/css/ui-media-advanced-BGxy3VSB.css +183 -0
- package/dist/assets/css/ui-navigation-DcPRn8SB.css +1693 -0
- package/dist/assets/css-C_ZeEwz2.js +847 -0
- package/dist/assets/cypher-Bayei42D.js +122 -0
- package/dist/assets/d-B0hhz6be.js +205 -0
- package/dist/assets/diff-DQutOIXs.js +30 -0
- package/dist/assets/dockerfile-D0MivFIF.js +199 -0
- package/dist/assets/dtd-C1CeYVnM.js +121 -0
- package/dist/assets/dylan-Dm9-uD-A.js +337 -0
- package/dist/assets/ebnf-jWG_1Yly.js +151 -0
- package/dist/assets/ecl-CgJPA6z9.js +190 -0
- package/dist/assets/eiffel-lj7uLahq.js +146 -0
- package/dist/assets/elm-Cz7o1ijk.js +230 -0
- package/dist/assets/erlang-CyL5QOyR.js +581 -0
- package/dist/assets/factor-BVWHwYpu.js +65 -0
- package/dist/assets/fcl-DiozYjc8.js +154 -0
- package/dist/assets/forth-B7vn5ze0.js +164 -0
- package/dist/assets/fortran-D2XNEnBT.js +172 -0
- package/dist/assets/gas-B_Tj57Ve.js +343 -0
- package/dist/assets/gherkin-CJ6Qk4EZ.js +147 -0
- package/dist/assets/groovy-ioGz2WSV.js +228 -0
- package/dist/assets/haskell-BHnm1B83.js +239 -0
- package/dist/assets/haxe-Bn6Yo6N3.js +490 -0
- package/dist/assets/http-BOd5SYCT.js +89 -0
- package/dist/assets/idl-FSFk8_xX.js +274 -0
- package/dist/assets/index--5fKpGeN.js +792 -0
- package/dist/assets/index-0lME64YH.js +342 -0
- package/dist/assets/index-B1srGfDb.js +183 -0
- package/dist/assets/index-B6Ip0FgO.js +437 -0
- package/dist/assets/index-BKF-A58l.js +106 -0
- package/dist/assets/index-BT8o9-M5.js +418 -0
- package/dist/assets/index-BmV05E5M.js +479 -0
- package/dist/assets/index-Bv_z_qRq.js +137 -0
- package/dist/assets/index-C6MavZDA.js +131 -0
- package/dist/assets/index-C7zlEJy8.js +338 -0
- package/dist/assets/index-CeeaNa4F.js +187 -0
- package/dist/assets/index-CtmpJVwa.js +330 -0
- package/dist/assets/index-CwKpgcYl.js +85 -0
- package/dist/assets/index-DMTL7O1s.js +627 -0
- package/dist/assets/index-DRUmDL0J.js +59 -0
- package/dist/assets/index-DgFC-M9G.js +96 -0
- package/dist/assets/javascript-DGrAs70C.js +922 -0
- package/dist/assets/jinja2-D9k5QrXv.js +171 -0
- package/dist/assets/julia-DM42tOPB.js +369 -0
- package/dist/assets/livescript-Dci8HnOi.js +259 -0
- package/dist/assets/lua-CByQu4v6.js +137 -0
- package/dist/assets/lucide-icons-af0BY3bi.js +34555 -0
- package/dist/assets/mathematica-Dkv0uCYF.js +153 -0
- package/dist/assets/mbox-CYTvs5kC.js +114 -0
- package/dist/assets/mirc-DpgP3GCo.js +176 -0
- package/dist/assets/mllike-C6tNn2Yt.js +343 -0
- package/dist/assets/modelica-CR6hTSce.js +192 -0
- package/dist/assets/mscgen-D0GXtzMS.js +149 -0
- package/dist/assets/mumps-Bf1EyDa6.js +129 -0
- package/dist/assets/nginx-By9Phklj.js +163 -0
- package/dist/assets/nsis-B5ggMLQ9.js +80 -0
- package/dist/assets/ntriples-C7VJ7pnm.js +141 -0
- package/dist/assets/octave-6yR_ix15.js +112 -0
- package/dist/assets/oz-CEUnktiQ.js +235 -0
- package/dist/assets/pascal-Dksf1EyF.js +124 -0
- package/dist/assets/perl-B99DUQQt.js +819 -0
- package/dist/assets/pig-DFeDRta6.js +149 -0
- package/dist/assets/powershell-DhwsNWMx.js +381 -0
- package/dist/assets/properties-o21uErwC.js +62 -0
- package/dist/assets/protobuf-YxlANsmD.js +54 -0
- package/dist/assets/pug-bUgjeODZ.js +504 -0
- package/dist/assets/puppet-B8WICGYE.js +205 -0
- package/dist/assets/python-D3FFx1Id.js +389 -0
- package/dist/assets/q-D2Hjhl2C.js +123 -0
- package/dist/assets/r-D73k5lac.js +174 -0
- package/dist/assets/rpm-Duv_WH0z.js +89 -0
- package/dist/assets/ruby-DGCVqZDt.js +287 -0
- package/dist/assets/sas-XjPv1Vy5.js +268 -0
- package/dist/assets/scheme-DeaA28vt.js +263 -0
- package/dist/assets/shared-components-CfAt2hC6.js +1501 -0
- package/dist/assets/shared-composables-v9NkNuAe.js +35 -0
- package/dist/assets/shared-modules-CDP-H5ZB.js +3588 -0
- package/dist/assets/shared-pages-BGRRA5WB.js +20 -0
- package/dist/assets/shell-Bx6QZTgx.js +145 -0
- package/dist/assets/sieve-CWCD62sW.js +178 -0
- package/dist/assets/simple-mode-BAO9cD7H.js +136 -0
- package/dist/assets/smalltalk-DSQbF4MF.js +153 -0
- package/dist/assets/solr-v_XRf31C.js +80 -0
- package/dist/assets/sparql-BrfDqf0-.js +170 -0
- package/dist/assets/spreadsheet-Csn84Pef.js +98 -0
- package/dist/assets/sql-D4utlq1l.js +480 -0
- package/dist/assets/stex-DBkktma-.js +246 -0
- package/dist/assets/stylus-ByG-Fd6f.js +750 -0
- package/dist/assets/swift-CHbTprt3.js +202 -0
- package/dist/assets/tcl-BRlMUELr.js +125 -0
- package/dist/assets/textile-CqfTUjd4.js +441 -0
- package/dist/assets/tiddlywiki-BrsoM8KB.js +278 -0
- package/dist/assets/tiki-D-ivWPkc.js +289 -0
- package/dist/assets/toml-t_IhJu83.js +75 -0
- package/dist/assets/troff-DckGF2AE.js +64 -0
- package/dist/assets/ttcn-B8TAFbRR.js +253 -0
- package/dist/assets/ttcn-cfg-NHh25oCM.js +197 -0
- package/dist/assets/turtle-D9Js0BlL.js +141 -0
- package/dist/assets/ui-app-D31Pr1WY.js +1993 -0
- package/dist/assets/ui-content-B7SxH8y9.js +52887 -0
- package/dist/assets/ui-controls-nmDJYLmC.js +348 -0
- package/dist/assets/ui-data-Ci3b1ye0.js +22901 -0
- package/dist/assets/ui-form-Cs5ooOo7.js +159 -0
- package/dist/assets/ui-form-fields-DFQi31jT.js +40575 -0
- package/dist/assets/ui-helpers-CF-EUlOg.js +1736 -0
- package/dist/assets/ui-indicators-mIQeEqha.js +199 -0
- package/dist/assets/ui-layout-v2XBQky3.js +320 -0
- package/dist/assets/ui-media-WWYrwmZw.js +1259 -0
- package/dist/assets/ui-media-advanced-T8ibi153.js +492 -0
- package/dist/assets/ui-modals-BdZXzI85.js +2 -0
- package/dist/assets/ui-navigation-BtHa6ovW.js +24269 -0
- package/dist/assets/utils-DZK5fu48.js +17216 -0
- package/dist/assets/vb-CbIGLrpY.js +249 -0
- package/dist/assets/vbscript-8ANWle9n.js +320 -0
- package/dist/assets/velocity-D6hz3Hzw.js +186 -0
- package/dist/assets/verilog-DIV442at.js +565 -0
- package/dist/assets/vhdl-BlTiZo_v.js +174 -0
- package/dist/assets/vueuse-CTQm4Zh0.js +9308 -0
- package/dist/assets/webidl-Cp3tcqdk.js +179 -0
- package/dist/assets/xquery-Dd4TBzXv.js +411 -0
- package/dist/assets/yacas-DQ1WucF0.js +182 -0
- package/dist/assets/z80-P1j44jDI.js +102 -0
- package/dist/framework.js +29 -0
- package/dist/index.css +18 -0
- package/dist/shared/components/draggable-dashboard/composables/useDashboardDragAndDrop.d.ts +4 -4
- package/dist/shared/components/notifications/components/notification-container/index.d.ts +6 -6
- package/dist/shared/components/notifications/components/notification-container/index.d.ts.map +1 -1
- package/dist/shared/modules/assets-manager/components/assets-manager/assets-manager.vue.d.ts +2 -2
- package/dist/shared/modules/dynamic/pages/dynamic-blade-form.vue.d.ts +2 -2
- package/dist/shared/modules/dynamic/pages/dynamic-blade-list.vue.d.ts +2 -2
- package/dist/shared/pages/InvitePage/components/invite/Invite.vue.d.ts +1 -1
- package/dist/shared/pages/InvitePage/components/invite/Invite.vue.d.ts.map +1 -1
- package/dist/shared/pages/ResetPasswordPage/components/reset-password/ResetPassword.vue.d.ts +1 -1
- package/dist/shared/pages/ResetPasswordPage/components/reset-password/ResetPassword.vue.d.ts.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/ui/components/atoms/vc-badge/vc-badge.vue.d.ts +1 -1
- package/dist/ui/components/atoms/vc-badge/vc-badge.vue.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-container/vc-container.vue.d.ts +2 -2
- package/dist/ui/components/atoms/vc-icon/vc-material-icon.vue.d.ts +1 -1
- package/dist/ui/components/atoms/vc-icon/vc-material-icon.vue.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-progress/vc-progress.vue.d.ts +1 -1
- package/dist/ui/components/atoms/vc-progress/vc-progress.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-editor/vc-editor.vue.d.ts +2 -2
- package/dist/ui/components/molecules/vc-file-upload/vc-file-upload.vue.d.ts +2 -2
- package/dist/ui/components/molecules/vc-file-upload/vc-file-upload.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-input/vc-input.vue.d.ts +4 -4
- package/dist/ui/components/molecules/vc-input/vc-input.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-pagination/vc-pagination.vue.d.ts +1 -1
- package/dist/ui/components/molecules/vc-pagination/vc-pagination.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-rating/vc-rating.vue.d.ts +1 -1
- package/dist/ui/components/molecules/vc-rating/vc-rating.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-select/vc-select.vue.d.ts +3 -3
- package/dist/ui/components/molecules/vc-select/vc-select.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-app/_internal/vc-app-menu/_internal/vc-app-menu-item/vc-app-menu-item.vue.d.ts +1 -1
- package/dist/ui/components/organisms/vc-app/_internal/vc-app-menu/_internal/vc-app-menu-item/vc-app-menu-item.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-blade/_internal/vc-blade-toolbar/_internal/vc-blade-toolbar-buttons/_internal/vc-blade-toolbar-button/vc-blade-toolbar-base-button.vue.d.ts +1 -1
- package/dist/ui/components/organisms/vc-blade/_internal/vc-blade-toolbar/_internal/vc-blade-toolbar-buttons/_internal/vc-blade-toolbar-button/vc-blade-toolbar-base-button.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-blade/_internal/vc-blade-toolbar/_internal/vc-blade-toolbar-buttons/_internal/vc-blade-toolbar-button/vc-blade-toolbar-button.vue.d.ts +1 -1
- package/dist/ui/components/organisms/vc-blade/_internal/vc-blade-toolbar/_internal/vc-blade-toolbar-buttons/_internal/vc-blade-toolbar-button/vc-blade-toolbar-button.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-blade/_internal/vc-blade-toolbar/_internal/vc-blade-toolbar-buttons/_internal/vc-blade-toolbar-button/vc-blade-toolbar-circle-button.vue.d.ts +1 -1
- package/dist/ui/components/organisms/vc-blade/_internal/vc-blade-toolbar/_internal/vc-blade-toolbar-buttons/_internal/vc-blade-toolbar-button/vc-blade-toolbar-circle-button.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-blade/vc-blade.vue.d.ts +1 -1
- package/dist/ui/components/organisms/vc-blade/vc-blade.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-gallery/_internal/vc-gallery-item/vc-gallery-item.vue.d.ts +2 -2
- package/dist/ui/components/organisms/vc-gallery/_internal/vc-gallery-preview/vc-gallery-preview.vue.d.ts +1 -1
- package/dist/ui/components/organisms/vc-gallery/_internal/vc-gallery-preview/vc-gallery-preview.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-gallery/vc-gallery.vue.d.ts +3 -3
- package/dist/ui/components/organisms/vc-gallery/vc-gallery.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-popup/vc-popup.vue.d.ts +1 -1
- package/dist/ui/components/organisms/vc-popup/vc-popup.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-table/_internal/vc-table-counter/vc-table-counter.vue.d.ts +1 -1
- package/dist/ui/components/organisms/vc-table/_internal/vc-table-counter/vc-table-counter.vue.d.ts.map +1 -1
- package/package.json +4 -4
|
@@ -0,0 +1,492 @@
|
|
|
1
|
+
import { defineComponent, ref, withDirectives, createElementBlock, openBlock, withModifiers, normalizeClass, createVNode, createElementVNode, unref, createBlock, createCommentVNode, toDisplayString, computed, withCtx, normalizeStyle, Fragment, renderList, createTextVNode, watch, createSlots, toValue } from 'vue';
|
|
2
|
+
import './ui-indicators-mIQeEqha.js';
|
|
3
|
+
import { A as _sfc_main$3, _ as _sfc_main$4 } from './ui-media-WWYrwmZw.js';
|
|
4
|
+
import { V as VcLink, _ as _sfc_main$6 } from './ui-controls-nmDJYLmC.js';
|
|
5
|
+
import './ui-layout-v2XBQky3.js';
|
|
6
|
+
import { V as VcHint } from './ui-helpers-CF-EUlOg.js';
|
|
7
|
+
import { a as _sfc_main$5, b as usePopup } from './ui-navigation-BtHa6ovW.js';
|
|
8
|
+
import './core-composables-DYxpIWyY.js';
|
|
9
|
+
import './ui-app-D31Pr1WY.js';
|
|
10
|
+
import 'vee-validate';
|
|
11
|
+
import './ui-content-B7SxH8y9.js';
|
|
12
|
+
import { u as useI18n, v as vOnClickOutside } from './ui-form-fields-DFQi31jT.js';
|
|
13
|
+
import { _ as _sfc_main$7 } from './ui-form-Cs5ooOo7.js';
|
|
14
|
+
import './shared-composables-v9NkNuAe.js';
|
|
15
|
+
import './core-plugins-wv2bDZ0l.js';
|
|
16
|
+
import 'vue-router';
|
|
17
|
+
import './shared-components-CfAt2hC6.js';
|
|
18
|
+
import './shared-modules-CDP-H5ZB.js';
|
|
19
|
+
import './ui-data-Ci3b1ye0.js';
|
|
20
|
+
|
|
21
|
+
const _hoisted_1$2 = { class: "vc-gallery-item__overlay" };
|
|
22
|
+
const _hoisted_2$2 = { class: "vc-gallery-item__overlay-content" };
|
|
23
|
+
const _hoisted_3$2 = ["title"];
|
|
24
|
+
const _hoisted_4 = { class: "vc-gallery-item__actions" };
|
|
25
|
+
const _hoisted_5 = { class: "vc-gallery-item__button-text" };
|
|
26
|
+
const _hoisted_6 = { class: "vc-gallery-item__button-text" };
|
|
27
|
+
const _hoisted_7 = { class: "vc-gallery-item__button-text" };
|
|
28
|
+
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
29
|
+
__name: "vc-gallery-item",
|
|
30
|
+
props: {
|
|
31
|
+
image: { default: () => ({}) },
|
|
32
|
+
readonly: { type: Boolean, default: false },
|
|
33
|
+
actions: { default: () => ({
|
|
34
|
+
name: void 0,
|
|
35
|
+
preview: void 0,
|
|
36
|
+
edit: void 0,
|
|
37
|
+
remove: void 0
|
|
38
|
+
}) },
|
|
39
|
+
disableDrag: { type: Boolean, default: false }
|
|
40
|
+
},
|
|
41
|
+
emits: ["preview", "edit", "remove"],
|
|
42
|
+
setup(__props) {
|
|
43
|
+
const { t } = useI18n({ useScope: "global" });
|
|
44
|
+
const hover = ref(false);
|
|
45
|
+
function onClose() {
|
|
46
|
+
hover.value = false;
|
|
47
|
+
}
|
|
48
|
+
return (_ctx, _cache) => {
|
|
49
|
+
return withDirectives((openBlock(), createElementBlock("div", {
|
|
50
|
+
class: normalizeClass(["vc-gallery-item", {
|
|
51
|
+
"vc-gallery-item_readonly": _ctx.readonly,
|
|
52
|
+
"vc-gallery-item_hover": hover.value
|
|
53
|
+
}]),
|
|
54
|
+
onTap: _cache[3] || (_cache[3] = withModifiers(($event) => hover.value = !hover.value, ["stop"]))
|
|
55
|
+
}, [
|
|
56
|
+
createVNode(unref(_sfc_main$3), {
|
|
57
|
+
aspect: "1x1",
|
|
58
|
+
src: _ctx.image.url,
|
|
59
|
+
background: "contain"
|
|
60
|
+
}, null, 8, ["src"]),
|
|
61
|
+
createElementVNode("div", _hoisted_1$2, [
|
|
62
|
+
createElementVNode("div", _hoisted_2$2, [
|
|
63
|
+
!_ctx.readonly && !_ctx.disableDrag ? (openBlock(), createBlock(unref(_sfc_main$4), {
|
|
64
|
+
key: 0,
|
|
65
|
+
class: "vc-gallery-item__move",
|
|
66
|
+
icon: "material-drag_indicator",
|
|
67
|
+
size: "s"
|
|
68
|
+
})) : createCommentVNode("", true),
|
|
69
|
+
createElementVNode("div", {
|
|
70
|
+
class: "vc-gallery-item__image-name",
|
|
71
|
+
title: _ctx.image.name
|
|
72
|
+
}, toDisplayString(_ctx.image.name), 9, _hoisted_3$2)
|
|
73
|
+
]),
|
|
74
|
+
createElementVNode("div", _hoisted_4, [
|
|
75
|
+
_ctx.actions && _ctx.actions.preview ? (openBlock(), createElementBlock("div", {
|
|
76
|
+
key: 0,
|
|
77
|
+
class: "vc-gallery-item__button",
|
|
78
|
+
onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("preview", _ctx.image))
|
|
79
|
+
}, [
|
|
80
|
+
createVNode(unref(_sfc_main$4), {
|
|
81
|
+
class: "vc-gallery-item__button-icon",
|
|
82
|
+
icon: "material-open_in_full"
|
|
83
|
+
}),
|
|
84
|
+
createElementVNode("div", _hoisted_5, toDisplayString(unref(t)("COMPONENTS.ORGANISMS.VC_GALLERY.INTERNAL.VC_GALLERY_ITEM.FULLSCREEN")), 1)
|
|
85
|
+
])) : createCommentVNode("", true),
|
|
86
|
+
!_ctx.readonly && _ctx.actions && _ctx.actions.edit ? (openBlock(), createElementBlock("div", {
|
|
87
|
+
key: 1,
|
|
88
|
+
class: "vc-gallery-item__button",
|
|
89
|
+
onClick: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("edit", _ctx.image))
|
|
90
|
+
}, [
|
|
91
|
+
createVNode(unref(_sfc_main$4), {
|
|
92
|
+
class: "vc-gallery-item__button-icon",
|
|
93
|
+
icon: "material-edit"
|
|
94
|
+
}),
|
|
95
|
+
createElementVNode("div", _hoisted_6, toDisplayString(_ctx.$t("COMPONENTS.ORGANISMS.VC_GALLERY.INTERNAL.VC_GALLERY_ITEM.EDIT")), 1)
|
|
96
|
+
])) : createCommentVNode("", true),
|
|
97
|
+
!_ctx.readonly && _ctx.actions && _ctx.actions.remove ? (openBlock(), createElementBlock("div", {
|
|
98
|
+
key: 2,
|
|
99
|
+
class: "vc-gallery-item__button",
|
|
100
|
+
onClick: _cache[2] || (_cache[2] = ($event) => _ctx.$emit("remove", _ctx.image))
|
|
101
|
+
}, [
|
|
102
|
+
createVNode(unref(_sfc_main$4), {
|
|
103
|
+
class: "vc-gallery-item__button-icon",
|
|
104
|
+
icon: "material-delete"
|
|
105
|
+
}),
|
|
106
|
+
createElementVNode("div", _hoisted_7, toDisplayString(_ctx.$t("COMPONENTS.ORGANISMS.VC_GALLERY.INTERNAL.VC_GALLERY_ITEM.DELETE")), 1)
|
|
107
|
+
])) : createCommentVNode("", true)
|
|
108
|
+
])
|
|
109
|
+
])
|
|
110
|
+
], 34)), [
|
|
111
|
+
[unref(vOnClickOutside), onClose]
|
|
112
|
+
]);
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
|
|
117
|
+
const _hoisted_1$1 = { class: "vc-gallery-preview__content" };
|
|
118
|
+
const _hoisted_2$1 = { class: "vc-gallery-preview__image-container" };
|
|
119
|
+
const _hoisted_3$1 = { class: "vc-gallery-preview__thumbnails" };
|
|
120
|
+
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
121
|
+
__name: "vc-gallery-preview",
|
|
122
|
+
props: {
|
|
123
|
+
images: { default: () => [] },
|
|
124
|
+
index: { default: 0 }
|
|
125
|
+
},
|
|
126
|
+
emits: ["close"],
|
|
127
|
+
setup(__props) {
|
|
128
|
+
const props = __props;
|
|
129
|
+
const { t } = useI18n({ useScope: "global" });
|
|
130
|
+
const localIndex = ref(props.index);
|
|
131
|
+
const imageHandler = computed(() => {
|
|
132
|
+
if (currentImage.value.url) {
|
|
133
|
+
return `background: url(${CSS.escape(currentImage.value.url)}) center / contain no-repeat`;
|
|
134
|
+
}
|
|
135
|
+
return void 0;
|
|
136
|
+
});
|
|
137
|
+
const currentImage = computed(() => props.images[localIndex.value]);
|
|
138
|
+
const copyLink = (link) => {
|
|
139
|
+
if (link.charAt(0) === "/") {
|
|
140
|
+
navigator.clipboard?.writeText(`${location.origin}${link}`);
|
|
141
|
+
} else {
|
|
142
|
+
navigator.clipboard?.writeText(link);
|
|
143
|
+
}
|
|
144
|
+
};
|
|
145
|
+
function handleKeyDown(event) {
|
|
146
|
+
if (event.key === "ArrowLeft" && localIndex.value > 0) {
|
|
147
|
+
localIndex.value--;
|
|
148
|
+
} else if (event.key === "ArrowRight" && localIndex.value < props.images.length - 1) {
|
|
149
|
+
localIndex.value++;
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
return (_ctx, _cache) => {
|
|
153
|
+
return currentImage.value ? (openBlock(), createBlock(unref(_sfc_main$5), {
|
|
154
|
+
key: 0,
|
|
155
|
+
title: currentImage.value?.title,
|
|
156
|
+
"is-mobile-fullscreen": "",
|
|
157
|
+
"is-fullscreen": "",
|
|
158
|
+
"modal-width": "tw-w-full",
|
|
159
|
+
onClose: _cache[3] || (_cache[3] = ($event) => _ctx.$emit("close")),
|
|
160
|
+
onKeydownPassive: handleKeyDown
|
|
161
|
+
}, {
|
|
162
|
+
header: withCtx(() => [
|
|
163
|
+
createElementVNode("div", null, [
|
|
164
|
+
createElementVNode("span", null, toDisplayString(currentImage.value.name) + " (", 1),
|
|
165
|
+
createVNode(unref(VcLink), {
|
|
166
|
+
onClick: _cache[0] || (_cache[0] = ($event) => copyLink(currentImage.value.url ?? ""))
|
|
167
|
+
}, {
|
|
168
|
+
default: withCtx(() => [
|
|
169
|
+
createTextVNode(toDisplayString(unref(t)("COMPONENTS.ORGANISMS.VC_GALLERY.INTERNAL.VC_GALLERY_PREVIEW.COPY_IMAGE_LINK")), 1)
|
|
170
|
+
]),
|
|
171
|
+
_: 1
|
|
172
|
+
}),
|
|
173
|
+
_cache[4] || (_cache[4] = createElementVNode("span", null, ")", -1))
|
|
174
|
+
])
|
|
175
|
+
]),
|
|
176
|
+
content: withCtx(() => [
|
|
177
|
+
createElementVNode("div", _hoisted_1$1, [
|
|
178
|
+
createElementVNode("div", _hoisted_2$1, [
|
|
179
|
+
createElementVNode("div", {
|
|
180
|
+
class: "vc-gallery-preview__image-handler",
|
|
181
|
+
style: normalizeStyle(imageHandler.value)
|
|
182
|
+
}, null, 4),
|
|
183
|
+
localIndex.value > 0 ? (openBlock(), createElementBlock("button", {
|
|
184
|
+
key: 0,
|
|
185
|
+
class: "vc-gallery-preview__nav-btn vc-gallery-preview__nav-btn_left",
|
|
186
|
+
onClick: _cache[1] || (_cache[1] = ($event) => localIndex.value--)
|
|
187
|
+
}, [
|
|
188
|
+
createVNode(unref(_sfc_main$4), {
|
|
189
|
+
icon: "material-arrow_back",
|
|
190
|
+
size: "xl"
|
|
191
|
+
})
|
|
192
|
+
])) : createCommentVNode("", true),
|
|
193
|
+
localIndex.value < _ctx.images.length - 1 ? (openBlock(), createElementBlock("button", {
|
|
194
|
+
key: 1,
|
|
195
|
+
class: "vc-gallery-preview__nav-btn vc-gallery-preview__nav-btn_right",
|
|
196
|
+
onClick: _cache[2] || (_cache[2] = ($event) => localIndex.value++)
|
|
197
|
+
}, [
|
|
198
|
+
createVNode(unref(_sfc_main$4), {
|
|
199
|
+
icon: "material-arrow_forward",
|
|
200
|
+
size: "xl"
|
|
201
|
+
})
|
|
202
|
+
])) : createCommentVNode("", true)
|
|
203
|
+
]),
|
|
204
|
+
createElementVNode("div", _hoisted_3$1, [
|
|
205
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.images, (item, i) => {
|
|
206
|
+
return openBlock(), createElementBlock("div", {
|
|
207
|
+
key: i,
|
|
208
|
+
class: normalizeClass(["vc-gallery-preview__thumbnail", { "vc-gallery-preview__thumbnail_current": i === localIndex.value }])
|
|
209
|
+
}, [
|
|
210
|
+
createVNode(unref(_sfc_main$3), {
|
|
211
|
+
src: item.url,
|
|
212
|
+
size: "xl",
|
|
213
|
+
background: "contain",
|
|
214
|
+
bordered: true,
|
|
215
|
+
clickable: true,
|
|
216
|
+
onClick: ($event) => localIndex.value = i
|
|
217
|
+
}, null, 8, ["src", "onClick"])
|
|
218
|
+
], 2);
|
|
219
|
+
}), 128))
|
|
220
|
+
])
|
|
221
|
+
])
|
|
222
|
+
]),
|
|
223
|
+
_: 1
|
|
224
|
+
}, 8, ["title"])) : createCommentVNode("", true);
|
|
225
|
+
};
|
|
226
|
+
}
|
|
227
|
+
});
|
|
228
|
+
|
|
229
|
+
const _hoisted_1 = { class: "vc-gallery" };
|
|
230
|
+
const _hoisted_2 = {
|
|
231
|
+
key: 1,
|
|
232
|
+
class: "vc-gallery__container"
|
|
233
|
+
};
|
|
234
|
+
const _hoisted_3 = {
|
|
235
|
+
key: 2,
|
|
236
|
+
class: "vc-gallery__empty"
|
|
237
|
+
};
|
|
238
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
239
|
+
__name: "vc-gallery",
|
|
240
|
+
props: {
|
|
241
|
+
images: { default: () => [] },
|
|
242
|
+
disabled: { type: Boolean },
|
|
243
|
+
required: { type: Boolean },
|
|
244
|
+
label: {},
|
|
245
|
+
tooltip: {},
|
|
246
|
+
uploadIcon: { default: "material-cloud_upload" },
|
|
247
|
+
multiple: { type: Boolean },
|
|
248
|
+
variant: { default: "gallery" },
|
|
249
|
+
itemActions: { default: () => ({
|
|
250
|
+
preview: true,
|
|
251
|
+
edit: true,
|
|
252
|
+
remove: true
|
|
253
|
+
}) },
|
|
254
|
+
hideAfterUpload: { type: Boolean },
|
|
255
|
+
rules: {},
|
|
256
|
+
name: { default: "Gallery" },
|
|
257
|
+
loading: { type: Boolean },
|
|
258
|
+
customText: {}
|
|
259
|
+
},
|
|
260
|
+
emits: ["upload", "sort", "edit", "remove"],
|
|
261
|
+
setup(__props, { emit: __emit }) {
|
|
262
|
+
const props = __props;
|
|
263
|
+
const emit = __emit;
|
|
264
|
+
const { t } = useI18n({ useScope: "global" });
|
|
265
|
+
const previewImageIndex = ref();
|
|
266
|
+
const defaultImages = ref([]);
|
|
267
|
+
const draggedItem = ref();
|
|
268
|
+
const draggedElement = ref();
|
|
269
|
+
const galleryRef = ref();
|
|
270
|
+
const reorderGalleryRef = ref();
|
|
271
|
+
const dropPosition = ref();
|
|
272
|
+
const currentIndex = computed(() => previewImageIndex.value);
|
|
273
|
+
const disableDrag = computed(() => defaultImages.value.length <= 1);
|
|
274
|
+
const uploadHidden = ref(false);
|
|
275
|
+
const { open } = usePopup(
|
|
276
|
+
computed(() => ({
|
|
277
|
+
component: _sfc_main$1,
|
|
278
|
+
props: {
|
|
279
|
+
images: props.images,
|
|
280
|
+
index: currentIndex.value
|
|
281
|
+
}
|
|
282
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
283
|
+
}))
|
|
284
|
+
);
|
|
285
|
+
watch(
|
|
286
|
+
() => props.images,
|
|
287
|
+
(newVal) => {
|
|
288
|
+
defaultImages.value = unref(newVal);
|
|
289
|
+
if (props.hideAfterUpload) {
|
|
290
|
+
uploadHidden.value = !!defaultImages.value.length;
|
|
291
|
+
}
|
|
292
|
+
},
|
|
293
|
+
{ deep: true, immediate: true }
|
|
294
|
+
);
|
|
295
|
+
const onUpload = (files) => {
|
|
296
|
+
if (files && files.length) {
|
|
297
|
+
const uploadedFiles = [];
|
|
298
|
+
const existingImageNames = defaultImages.value.map((image) => image.name);
|
|
299
|
+
Array.from(files).forEach((file) => {
|
|
300
|
+
let fileName = file.name;
|
|
301
|
+
if (existingImageNames.includes(fileName)) {
|
|
302
|
+
let index = 1;
|
|
303
|
+
const baseName = fileName.replace(/\.[^/.]+$/, "");
|
|
304
|
+
while (existingImageNames.includes(fileName)) {
|
|
305
|
+
fileName = `${baseName}_${index}.${file.name.split(".").pop()}`;
|
|
306
|
+
index++;
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
const modifiedFile = new File([file], fileName, { type: file.type });
|
|
310
|
+
uploadedFiles.push(modifiedFile);
|
|
311
|
+
});
|
|
312
|
+
const modifiedFileList = new DataTransfer();
|
|
313
|
+
uploadedFiles.forEach((file) => {
|
|
314
|
+
modifiedFileList.items.add(file);
|
|
315
|
+
});
|
|
316
|
+
emit("upload", modifiedFileList.files, props.images[props.images.length - 1]?.sortOrder);
|
|
317
|
+
}
|
|
318
|
+
};
|
|
319
|
+
const onPreviewClick = (index) => {
|
|
320
|
+
previewImageIndex.value = index;
|
|
321
|
+
open();
|
|
322
|
+
};
|
|
323
|
+
const updateOrder = () => {
|
|
324
|
+
const images = defaultImages.value;
|
|
325
|
+
const sortedImgs = images.map((item, index) => {
|
|
326
|
+
item.sortOrder = index;
|
|
327
|
+
return item;
|
|
328
|
+
});
|
|
329
|
+
emit("sort", sortedImgs);
|
|
330
|
+
};
|
|
331
|
+
function onItemMouseDown(event) {
|
|
332
|
+
if (!disableDrag.value && !props.disabled) {
|
|
333
|
+
event.currentTarget.draggable = true;
|
|
334
|
+
return;
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
function onItemDragStart(event, item) {
|
|
338
|
+
if (!disableDrag.value && !props.disabled) {
|
|
339
|
+
draggedItem.value = item;
|
|
340
|
+
draggedElement.value = event.target;
|
|
341
|
+
event.dataTransfer?.setData("text", "gallery_reorder");
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
function onItemDragOver(event) {
|
|
345
|
+
const dropItem = findParentElement(event.target);
|
|
346
|
+
if (!disableDrag.value && !props.disabled && draggedItem.value && dropItem) {
|
|
347
|
+
event.preventDefault();
|
|
348
|
+
const containerOffset = galleryRef.value?.getBoundingClientRect();
|
|
349
|
+
const dropItemOffset = dropItem.getBoundingClientRect();
|
|
350
|
+
if (draggedElement.value !== dropItem && containerOffset) {
|
|
351
|
+
const elementStyle = getComputedStyle(dropItem);
|
|
352
|
+
const dropItemOffsetWidth = dropItem.offsetWidth + parseFloat(elementStyle.marginLeft);
|
|
353
|
+
const targetLeft = dropItemOffset.left - containerOffset.left;
|
|
354
|
+
const columnCenter = dropItemOffset.left + dropItemOffsetWidth / 2;
|
|
355
|
+
if (reorderGalleryRef.value) {
|
|
356
|
+
reorderGalleryRef.value.style.top = dropItemOffset.top - containerOffset.top + "px";
|
|
357
|
+
reorderGalleryRef.value.style.height = dropItem.offsetHeight + "px";
|
|
358
|
+
if (event.pageX > columnCenter) {
|
|
359
|
+
reorderGalleryRef.value.style.left = targetLeft + dropItemOffsetWidth + "px";
|
|
360
|
+
dropPosition.value = 1;
|
|
361
|
+
} else {
|
|
362
|
+
reorderGalleryRef.value.style.left = targetLeft - parseFloat(elementStyle.marginLeft) + "px";
|
|
363
|
+
dropPosition.value = -1;
|
|
364
|
+
}
|
|
365
|
+
reorderGalleryRef.value.style.display = "block";
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
function onItemDragLeave(event) {
|
|
371
|
+
if (!disableDrag.value && !props.disabled && draggedItem.value && reorderGalleryRef.value) {
|
|
372
|
+
event.preventDefault();
|
|
373
|
+
reorderGalleryRef.value.style.display = "none";
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
function onItemDrop(event, item) {
|
|
377
|
+
event.preventDefault();
|
|
378
|
+
if (draggedItem.value) {
|
|
379
|
+
const dragIndex = defaultImages.value.indexOf(draggedItem.value);
|
|
380
|
+
const dropIndex = defaultImages.value.indexOf(item);
|
|
381
|
+
let allowDrop = dragIndex !== dropIndex;
|
|
382
|
+
if (allowDrop && (dropIndex - dragIndex === 1 && dropPosition.value === -1 || dropIndex - dragIndex === -1 && dropPosition.value === 1)) {
|
|
383
|
+
allowDrop = false;
|
|
384
|
+
}
|
|
385
|
+
if (allowDrop) {
|
|
386
|
+
reorderArray(defaultImages.value, dragIndex, dropIndex);
|
|
387
|
+
updateOrder();
|
|
388
|
+
}
|
|
389
|
+
if (reorderGalleryRef.value && draggedElement.value) {
|
|
390
|
+
reorderGalleryRef.value.style.display = "none";
|
|
391
|
+
draggedElement.value.draggable = false;
|
|
392
|
+
draggedItem.value = void 0;
|
|
393
|
+
dropPosition.value = void 0;
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
function reorderArray(value, from, to) {
|
|
398
|
+
if (value && from !== to) {
|
|
399
|
+
if (to >= value.length) {
|
|
400
|
+
to %= value.length;
|
|
401
|
+
from %= value.length;
|
|
402
|
+
}
|
|
403
|
+
value.splice(to, 0, value.splice(from, 1)[0]);
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
function findParentElement(element) {
|
|
407
|
+
if (element.classList.contains("vc-gallery__item")) {
|
|
408
|
+
return element;
|
|
409
|
+
} else {
|
|
410
|
+
let parent = element.parentElement;
|
|
411
|
+
while (!(parent && parent.classList.contains("vc-gallery__item"))) {
|
|
412
|
+
parent = parent?.parentElement || null;
|
|
413
|
+
if (!parent) break;
|
|
414
|
+
}
|
|
415
|
+
return parent;
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
return (_ctx, _cache) => {
|
|
419
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
420
|
+
_ctx.label ? (openBlock(), createBlock(unref(_sfc_main$6), {
|
|
421
|
+
key: 0,
|
|
422
|
+
required: _ctx.required
|
|
423
|
+
}, createSlots({
|
|
424
|
+
default: withCtx(() => [
|
|
425
|
+
createElementVNode("span", null, toDisplayString(_ctx.label), 1)
|
|
426
|
+
]),
|
|
427
|
+
_: 2
|
|
428
|
+
}, [
|
|
429
|
+
_ctx.tooltip ? {
|
|
430
|
+
name: "tooltip",
|
|
431
|
+
fn: withCtx(() => [
|
|
432
|
+
createTextVNode(toDisplayString(_ctx.tooltip), 1)
|
|
433
|
+
]),
|
|
434
|
+
key: "0"
|
|
435
|
+
} : void 0
|
|
436
|
+
]), 1032, ["required"])) : createCommentVNode("", true),
|
|
437
|
+
toValue(defaultImages.value) && toValue(defaultImages.value).length || !_ctx.disabled ? (openBlock(), createElementBlock("div", _hoisted_2, [
|
|
438
|
+
createElementVNode("div", {
|
|
439
|
+
ref_key: "galleryRef",
|
|
440
|
+
ref: galleryRef,
|
|
441
|
+
class: "vc-gallery__wrapper"
|
|
442
|
+
}, [
|
|
443
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(defaultImages.value, (image, i) => {
|
|
444
|
+
return openBlock(), createBlock(_sfc_main$2, {
|
|
445
|
+
key: `image_${i}`,
|
|
446
|
+
class: "vc-gallery__item",
|
|
447
|
+
image,
|
|
448
|
+
readonly: _ctx.disabled,
|
|
449
|
+
actions: _ctx.itemActions,
|
|
450
|
+
"disable-drag": disableDrag.value,
|
|
451
|
+
onPreview: ($event) => onPreviewClick(i),
|
|
452
|
+
onEdit: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("edit", $event)),
|
|
453
|
+
onRemove: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("remove", $event)),
|
|
454
|
+
onMousedown: onItemMouseDown,
|
|
455
|
+
onDragstart: ($event) => onItemDragStart($event, image),
|
|
456
|
+
onDragover: onItemDragOver,
|
|
457
|
+
onDragleave: onItemDragLeave,
|
|
458
|
+
onDrop: ($event) => onItemDrop($event, image)
|
|
459
|
+
}, null, 8, ["image", "readonly", "actions", "disable-drag", "onPreview", "onDragstart", "onDrop"]);
|
|
460
|
+
}), 128)),
|
|
461
|
+
!_ctx.disabled && !uploadHidden.value ? (openBlock(), createBlock(unref(_sfc_main$7), {
|
|
462
|
+
key: 0,
|
|
463
|
+
class: "vc-gallery__upload",
|
|
464
|
+
icon: _ctx.uploadIcon,
|
|
465
|
+
variant: _ctx.variant,
|
|
466
|
+
multiple: _ctx.multiple,
|
|
467
|
+
rules: _ctx.rules,
|
|
468
|
+
name: _ctx.name,
|
|
469
|
+
loading: _ctx.loading,
|
|
470
|
+
"custom-text": _ctx.customText,
|
|
471
|
+
onUpload
|
|
472
|
+
}, null, 8, ["icon", "variant", "multiple", "rules", "name", "loading", "custom-text"])) : createCommentVNode("", true)
|
|
473
|
+
], 512),
|
|
474
|
+
createElementVNode("div", {
|
|
475
|
+
ref_key: "reorderGalleryRef",
|
|
476
|
+
ref: reorderGalleryRef,
|
|
477
|
+
class: "vc-gallery__reorder-line"
|
|
478
|
+
}, null, 512)
|
|
479
|
+
])) : (openBlock(), createElementBlock("div", _hoisted_3, [
|
|
480
|
+
createVNode(unref(VcHint), null, {
|
|
481
|
+
default: withCtx(() => [
|
|
482
|
+
createTextVNode(toDisplayString(unref(t)("COMPONENTS.ORGANISMS.VC_GALLERY.GALLERY_IS_EMPTY")), 1)
|
|
483
|
+
]),
|
|
484
|
+
_: 1
|
|
485
|
+
})
|
|
486
|
+
]))
|
|
487
|
+
]);
|
|
488
|
+
};
|
|
489
|
+
}
|
|
490
|
+
});
|
|
491
|
+
|
|
492
|
+
export { _sfc_main as _ };
|