@vcita/design-system 1.12.8 → 1.12.10
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/@vcita/design-system.esm.js +131 -51
- package/dist/@vcita/design-system.min.js +1 -1
- package/dist/@vcita/design-system.ssr.js +116 -55
- package/package.json +1 -1
- package/src/components/VcGallery/VcGallery.spec.js +89 -16
- package/src/components/VcGallery/VcGallery.stories.js +13 -8
- package/src/components/VcGallery/VcGallery.vue +83 -36
- package/src/components/VcGallery/VcGalleryActions.spec.js +26 -1
- package/src/components/VcGallery/VcGalleryActions.vue +45 -16
- package/src/components/VcPreview/VcPreview.vue +1 -0
|
@@ -48494,8 +48494,8 @@ var __vue_staticRenderFns__$3 = [];
|
|
|
48494
48494
|
|
|
48495
48495
|
const __vue_inject_styles__$3 = function (inject) {
|
|
48496
48496
|
if (!inject) return;
|
|
48497
|
-
inject("data-v-
|
|
48498
|
-
source: "[data-v-
|
|
48497
|
+
inject("data-v-99d68d54_0", {
|
|
48498
|
+
source: "[data-v-99d68d54]:root{--primary-font-family:Montserrat;--font-size-xxx-small:9px;--font-size-xs-small:11px;--font-size-xx-small:12px;--font-size-x-small:13px;--font-size-small:14px;--font-size-small2:15px;--font-size-small3:17px;--font-size-medium:18px;--font-size-medium0:20px;--font-size-medium1:22px;--font-size-medium2:24px;--font-size-large:28px;--font-weight-light:300;--font-weight-medium:400;--font-weight-medium2:500;--font-weight-large:600;--font-weight-large2:700;--font-weight-xl:800;--letter-spacing:0.003em;--size-value0:0px;--size-value1:4px;--size-value2:8px;--size-value3:12px;--size-value4:16px;--size-value5:20px;--size-value6:24px;--size-value7:28px;--size-value8:32px;--size-value9:36px;--size-value10:40px;--size-value11:44px;--size-value12:48px;--size-value13:52px;--size-value14:56px;--size-value15:60px;--size-value16:64px;--size-value17:68px;--size-value18:72px;--size-value19:76px;--size-value20:80px;--border-radius:6px;--border-radius-circle:50%;--border-frame:1px solid var(--gray-lighten-1);--border-focused-frame:1px solid var(--v-secondary-base);--shadow-focused-frame:0px 0px 0px 3px var(--v-secondary-lighten1);--centered-layout-min-width:708px;--centered-layout-max-width:1316px;--left-panel-width:265px;--vc-top-bar-height:59px;--popover-width:360px;--popover-max-height:464px;--popover-border-radius:10px;--modal-desktop-offset:0;--modal-bg-color:#ffffff;--modal-box-shadow:0px 7px 8px -4px rgba(0, 0, 0, 0.2),2px 13px 19px 2px rgba(0, 0, 0, 0.14),0px 5px 24px rgba(0, 0, 0, 0.12);--modal-border-radius:10px;--modal-width-small:384px;--modal-width-medium:576px;--modal-width-large:816px;--modal-width-x-large:972px;--avatar-x-sm:24px;--avatar-sm:32px;--avatar-md:40px;--avatar-lg:48px;--dropzone-active-border-color:#1e93b7;--dropzone-active-second-border-color:#95cddb;--select-field-height:52px;--select-field-height-md:32px;--bottom-nav-shadow:0px -3px 8px rgba(23, 23, 23, 0.13);--entity-status-info-background-color:var(--neutral-lighten-2);--entity-status-info-header-color:var(--neutral);--entity-status-alert-background-color:#FFF9E4;--entity-status-alert-header-color:#C68600;--entity-status-warning-background-color:#FFF0E8;--entity-status-warning-header-color:#B74302;--entity-status-error-background-color:#FDEAEE;--entity-status-error-header-color:#A82433;--entity-status-success-background-color:#E8F8F4;--entity-status-success-header-color:#2C7D67;--entity-status-default-background-color:#E6F6FF;--entity-status-default-header-color:#004970;--table-sticky-column-shadow:10px 0 12px 0 rgba(0, 0, 0, 0.08);--v-secondary-base-opacity-4:color-mix(in srgb, var(--v-secondary-base), transparent 96%);--v-secondary-base-opacity-14:color-mix(in srgb, var(--v-secondary-base), transparent 86%);--v-secondary-base-opacity-20:color-mix(in srgb, var(--v-secondary-base), transparent 80%);--black:#000000;--gray-darken-5:#212121;--gray-darken-4:#616161;--gray-darken-3:#757575;--gray-darken-2:#999999;--gray-darken-1:#b3b3b3;--gray:#cccccc;--gray-lighten-1:#e0e0e0;--gray-lighten-2:#ededed;--gray-lighten-3:#f7f7f7;--gray-lighten-4:#fafafa;--gray-light-opacity-1:#e1e1e129;--gray-light-opacity-2:#e1e1e11f;--gray-light-opacity-3:#e1e1e112;--neutral:#586E8C;--neutral-lighten-1:#D6DBE6;--neutral-lighten-2:#EAEDF2;--neutral-lighten-3:#F8F9FB;--red:#F2514A;--red-lighten-1:#F79792;--red-lighten-2:#FBCBC9;--red-lighten-3:#FDE8E7;--yellow:#FFC511;--yellow-lighten-1:#FFDC70;--yellow-lighten-2:#FFEDB8;--yellow-lighten-3:#FFF7E0;--green:#54D28C;--green-lighten-1:#98E4BA;--green-lighten-2:#CFF8E1;--green-lighten-3:#EAFCF2;--blue:#478FFF;--blue-lighten-1:#91BCFF;--blue-lighten-2:#C8DDFF;--blue-lighten-3:#E7F0FF;--orange:#FF8F00;--orange-lighten-1:#FCB965;--orange-lighten-2:#FAD9B0;--orange-lighten-3:#F9EBDA;--purple:#BD98F7;--purple-lighten-1:#CAADF9;--purple-lighten-2:#D7C1FA;--purple-lighten-3:#F7F1FF;--white:#fff;--shadow-1:0px 1px 4px rgba(0, 0, 0, 0.11);--shadow-2:0px 2px 5px rgba(0, 0, 0, 0.1),0px 2px 2px rgba(0, 0, 0, 0.06),0px 3px 1px -2px rgba(0, 0, 0, 0.06);--shadow-3:0px 3px 2px rgba(0, 0, 0, 0.101961);--shadow-4:0px 1px 1px rgba(0, 0, 0, 0.06),0px 3px 8px rgba(0, 0, 0, 0.15);--shadow-5:0px 4px 18px rgba(0, 0, 0, 0.1);--shadow-6:0px 1px 10px rgba(0, 0, 0, 0.12),0px 4px 7px rgba(0, 0, 0, 0.14),0px 2px 4px -1px rgba(0, 0, 0, 0.2);--shadow-7:0px 3px 5px -1px rgba(0, 0, 0, 0.2),0px 6px 10px rgba(0, 0, 0, 0.14),0px 1px 18px rgba(0, 0, 0, 0.12);--shadow-8:0px 5px 7px 3px rgba(0, 0, 0, 0.26);--shadow-9:0px 7px 8px -4px rgba(0, 0, 0, 0.2),2px 13px 19px 2px rgba(0, 0, 0, 0.14),0px 5px 24px rgba(0, 0, 0, 0.12);--shadow-10:0px 4px 8px #cccccc}.color-0[data-v-99d68d54]{--color-dark:#fed62f;--color-light:#fff1b6}.color-1[data-v-99d68d54]{--color-dark:#fec22e;--color-light:#ffeab6}.color-2[data-v-99d68d54]{--color-dark:#feac2a;--color-light:#ffe2b5}.color-3[data-v-99d68d54]{--color-dark:#fe9a28;--color-light:#ffdcb4}.color-4[data-v-99d68d54]{--color-dark:#fd7024;--color-light:#fecdb3}.color-5[data-v-99d68d54]{--color-dark:#fd5b32;--color-light:#fec6b7}.color-6[data-v-99d68d54]{--color-dark:#f2483f;--color-light:#fabfbc}.color-7[data-v-99d68d54]{--color-dark:#dc331b;--color-light:#f3b8af}.color-8[data-v-99d68d54]{--color-dark:#d41419;--color-light:#f0adaf}.color-9[data-v-99d68d54]{--color-dark:#e72866;--color-light:#f7b4ca}.color-10[data-v-99d68d54]{--color-dark:#c41c63;--color-light:#eab0c9}.color-11[data-v-99d68d54]{--color-dark:#9b2bae;--color-light:#dcb5e3}.color-12[data-v-99d68d54]{--color-dark:#673bb5;--color-light:#cabbe5}.color-13[data-v-99d68d54]{--color-dark:#7c4efc;--color-light:#d1c1fe}.color-14[data-v-99d68d54]{--color-dark:#4051b3;--color-light:#bcc2e4}.color-15[data-v-99d68d54]{--color-dark:#311b92;--color-light:#c0b2ff}.color-16[data-v-99d68d54]{--color-dark:#2d62fb;--color-light:#b6c8fe}.color-17[data-v-99d68d54]{--color-dark:#5c6bc0;--color-light:#9aa2d2}.color-18[data-v-99d68d54]{--color-dark:#17a8f1;--color-light:#aee1fa}.color-19[data-v-99d68d54]{--color-dark:#17bbd2;--color-light:#aee7ef}.color-20[data-v-99d68d54]{--color-dark:#14abbf;--color-light:#ade2e9}.color-21[data-v-99d68d54]{--color-dark:#0f9587;--color-light:#abdad5}.color-22[data-v-99d68d54]{--color-dark:#16bea5;--color-light:#aee8e0}.color-23[data-v-99d68d54]{--color-dark:#4eae53;--color-light:#c1e3c3}.color-24[data-v-99d68d54]{--color-dark:#3a8d3f;--color-light:#bad7bc}.color-25[data-v-99d68d54]{--color-dark:#8cc250;--color-light:#d7eac2}.color-26[data-v-99d68d54]{--color-dark:#66bb6a;--color-light:#9fd3a1}.color-27[data-v-99d68d54]{--color-dark:#880e4f;--color-light:#ab8198}.color-28[data-v-99d68d54]{--color-dark:#1565c0;--color-light:#83a4ca}.color-29[data-v-99d68d54]{--color-dark:#1e88e5;--color-light:#79b1ff}.color-9999[data-v-99d68d54]{--color-dark:#4675d9;--color-light:#becff2}.color-101[data-v-99d68d54]{--color-dark:#EE5787;--color-light:#FFC6CC}.color-102[data-v-99d68d54]{--color-dark:#EE5787;--color-light:#F7B3CA}.color-103[data-v-99d68d54]{--color-dark:#AB51BD;--color-light:#DDB6E3}.color-104[data-v-99d68d54]{--color-dark:#8564C4;--color-light:#CBBCE6}.color-105[data-v-99d68d54]{--color-dark:#6371BF;--color-light:#BDC3E6}.color-106[data-v-99d68d54]{--color-dark:#1779CE;--color-light:#B3D9FA}.color-107[data-v-99d68d54]{--color-dark:#1E92CC;--color-light:#AAE1FC}.color-108[data-v-99d68d54]{--color-dark:#1E8694;--color-light:#A9E8F0}.color-109[data-v-99d68d54]{--color-dark:#328179;--color-light:#A9DAD6}.color-110[data-v-99d68d54]{--color-dark:#3D853F;--color-light:#C1E2C2}.color-111[data-v-99d68d54]{--color-dark:#5B8131;--color-light:#D7EAC1}.color-112[data-v-99d68d54]{--color-dark:#757B23;--color-light:#EEF2BB}.color-113[data-v-99d68d54]{--color-dark:#8A731E;--color-light:#FFF8BC}.color-114[data-v-99d68d54]{--color-dark:#C88704;--color-light:#FFE9AA}.color-115[data-v-99d68d54]{--color-dark:#B85F00;--color-light:#FFDBA9}.color-116[data-v-99d68d54]{--color-dark:#EA0A00;--color-light:#FFC5B4}.color-117[data-v-99d68d54]{--color-dark:#FF4D1F;--color-light:#FFA186}.color-118[data-v-99d68d54]{--color-dark:#6E4B3F;--color-light:#D1C5C1}.color-119[data-v-99d68d54]{--color-dark:#6E4B3F;--color-light:#B4A09A}.color-120[data-v-99d68d54]{--color-dark:#63757E;--color-light:#C8D2D7}.preview[data-v-99d68d54]{height:100%;width:fit-content;min-width:100%}.pdf-display[data-v-99d68d54]{overflow:scroll}.focus-mode[data-v-99d68d54]{opacity:.5;transition:.1s}.focus-mode[data-v-99d68d54]:hover{opacity:.7;transition:.3s}.inFocus[data-v-99d68d54]{opacity:1;border-radius:4px;border:3px solid var(--v-secondary-base)}.inFocus[data-v-99d68d54]:hover{opacity:1}.iframe-desktop[data-v-99d68d54]{height:100%;width:100%;border:none}[data-v-99d68d54] .vue-pdf-embed__page{display:flex;justify-content:center}[data-v-99d68d54] .vue-pdf-embed div:not(:last-child) canvas{margin-bottom:var(--size-value3)}.image-display__wrapper[data-v-99d68d54]{position:relative;width:100%;height:100%;display:flex;justify-content:center;align-items:flex-start;transition:.2s ease-in-out}.focus-mode .image-display__wrapper[data-v-99d68d54]{align-items:center}.image-display__image[data-v-99d68d54]{height:auto;max-width:100%;transition:.2s ease-in-out}.icon-display[data-v-99d68d54]{display:flex;justify-content:center;align-items:center;height:100%;background-color:var(--gray-lighten-3)}",
|
|
48499
48499
|
map: undefined,
|
|
48500
48500
|
media: undefined
|
|
48501
48501
|
});
|
|
@@ -48503,7 +48503,7 @@ const __vue_inject_styles__$3 = function (inject) {
|
|
|
48503
48503
|
/* scoped */
|
|
48504
48504
|
|
|
48505
48505
|
|
|
48506
|
-
const __vue_scope_id__$3 = "data-v-
|
|
48506
|
+
const __vue_scope_id__$3 = "data-v-99d68d54";
|
|
48507
48507
|
/* module identifier */
|
|
48508
48508
|
|
|
48509
48509
|
const __vue_module_identifier__$3 = undefined;
|
|
@@ -48700,6 +48700,14 @@ var script$1 = {
|
|
|
48700
48700
|
type: Boolean,
|
|
48701
48701
|
default: false
|
|
48702
48702
|
},
|
|
48703
|
+
reset: {
|
|
48704
|
+
type: Boolean,
|
|
48705
|
+
default: false
|
|
48706
|
+
},
|
|
48707
|
+
resetSizeText: {
|
|
48708
|
+
type: String,
|
|
48709
|
+
default: 'Fit to screen'
|
|
48710
|
+
},
|
|
48703
48711
|
dataQa: {
|
|
48704
48712
|
type: String,
|
|
48705
48713
|
default: 'VcGalleryActions'
|
|
@@ -48723,7 +48731,9 @@ var __vue_render__$1 = function () {
|
|
|
48723
48731
|
attrs: {
|
|
48724
48732
|
"data-qa": _vm.dataQa
|
|
48725
48733
|
}
|
|
48726
|
-
}, [_vm.zoom ? _c('
|
|
48734
|
+
}, [_vm.zoom ? _c('div', {
|
|
48735
|
+
staticClass: "gallery-actions__status--section"
|
|
48736
|
+
}, [_c('VcButton', {
|
|
48727
48737
|
staticClass: "gallery-actions--zoomout",
|
|
48728
48738
|
attrs: {
|
|
48729
48739
|
"data-qa": _vm.dataQa + "__zoomout-button",
|
|
@@ -48739,9 +48749,9 @@ var __vue_render__$1 = function () {
|
|
|
48739
48749
|
return _vm.$emit('zoomout');
|
|
48740
48750
|
}
|
|
48741
48751
|
}
|
|
48742
|
-
})
|
|
48752
|
+
}), _vm._v(" "), _c('span', {
|
|
48743
48753
|
staticClass: "gallery-actions__status"
|
|
48744
|
-
}, [_vm._v(_vm._s(_vm.zoomSize) + "%")])
|
|
48754
|
+
}, [_vm._v(_vm._s(_vm.zoomSize) + "%")]), _vm._v(" "), _c('VcButton', {
|
|
48745
48755
|
staticClass: "gallery-actions--zoomin",
|
|
48746
48756
|
attrs: {
|
|
48747
48757
|
"data-qa": _vm.dataQa + "__zoomin-button",
|
|
@@ -48757,6 +48767,22 @@ var __vue_render__$1 = function () {
|
|
|
48757
48767
|
return _vm.$emit('zoomin');
|
|
48758
48768
|
}
|
|
48759
48769
|
}
|
|
48770
|
+
})], 1) : _vm._e(), _vm._v(" "), _vm.reset ? _c('span', {
|
|
48771
|
+
staticClass: "gallery-actions--separator"
|
|
48772
|
+
}) : _vm._e(), _vm._v(" "), _vm.reset ? _c('div', {
|
|
48773
|
+
staticClass: "gallery-actions__reset",
|
|
48774
|
+
attrs: {
|
|
48775
|
+
"data-qa": _vm.dataQa + "__reset",
|
|
48776
|
+
"ghost": "",
|
|
48777
|
+
"flavor": "secondary"
|
|
48778
|
+
},
|
|
48779
|
+
on: {
|
|
48780
|
+
"click": function ($event) {
|
|
48781
|
+
return _vm.$emit('resetStyle');
|
|
48782
|
+
}
|
|
48783
|
+
}
|
|
48784
|
+
}, [_vm._v("\n " + _vm._s(_vm.resetSizeText) + "\n ")]) : _vm._e(), _vm._v(" "), _vm.rotate ? _c('span', {
|
|
48785
|
+
staticClass: "gallery-actions--separator"
|
|
48760
48786
|
}) : _vm._e(), _vm._v(" "), _vm.rotate ? _c('VcButton', {
|
|
48761
48787
|
staticClass: "gallery-actions--rotate",
|
|
48762
48788
|
attrs: {
|
|
@@ -48781,8 +48807,8 @@ var __vue_staticRenderFns__$1 = [];
|
|
|
48781
48807
|
|
|
48782
48808
|
const __vue_inject_styles__$1 = function (inject) {
|
|
48783
48809
|
if (!inject) return;
|
|
48784
|
-
inject("data-v-
|
|
48785
|
-
source: ".gallery-actions[data-v-
|
|
48810
|
+
inject("data-v-9aecc056_0", {
|
|
48811
|
+
source: ".gallery-actions[data-v-9aecc056]{background-color:var(--gray-darken-4);display:flex;align-items:center;justify-content:center;width:fit-content;border-radius:var(--border-radius);padding:var(--size-value1) var(--size-value3);gap:var(--size-value2)}.gallery-actions__status[data-v-9aecc056]{color:var(--gray-lighten-4);font-size:var(--font-size-x-small);font-weight:var(--font-weight-large);padding-inline:var(--size-value2);background-color:var(--gray-darken-5);cursor:default}.gallery-actions__status--section[data-v-9aecc056]{width:99px}.gallery-actions__reset[data-v-9aecc056]{color:var(--gray-lighten-4)!important;text-wrap:nowrap;cursor:pointer}.gallery-actions--separator[data-v-9aecc056]:not(:first-child){display:inline-block;height:var(--size-value5);border-inline-start:1px solid var(--gray-lighten-4);border-radius:0}",
|
|
48786
48812
|
map: undefined,
|
|
48787
48813
|
media: undefined
|
|
48788
48814
|
});
|
|
@@ -48790,7 +48816,7 @@ const __vue_inject_styles__$1 = function (inject) {
|
|
|
48790
48816
|
/* scoped */
|
|
48791
48817
|
|
|
48792
48818
|
|
|
48793
|
-
const __vue_scope_id__$1 = "data-v-
|
|
48819
|
+
const __vue_scope_id__$1 = "data-v-9aecc056";
|
|
48794
48820
|
/* module identifier */
|
|
48795
48821
|
|
|
48796
48822
|
const __vue_module_identifier__$1 = undefined;
|
|
@@ -48817,29 +48843,44 @@ var script = {
|
|
|
48817
48843
|
VcIcon,
|
|
48818
48844
|
VcPreview
|
|
48819
48845
|
},
|
|
48846
|
+
model: {
|
|
48847
|
+
prop: 'startIndex'
|
|
48848
|
+
},
|
|
48820
48849
|
props: {
|
|
48850
|
+
/*
|
|
48851
|
+
* @param [{
|
|
48852
|
+
* type: ['errorWithServer', 'pdf', 'document', 'image', 'nativePdf', 'unsupported', 'tooBig']
|
|
48853
|
+
* name: File name,
|
|
48854
|
+
* icon: Icon string for VcIcon component,
|
|
48855
|
+
* thumbnails: URL to the image
|
|
48856
|
+
* location: URL to the file
|
|
48857
|
+
* }] files
|
|
48858
|
+
*/
|
|
48821
48859
|
files: {
|
|
48822
48860
|
type: Array,
|
|
48823
48861
|
required: true,
|
|
48824
|
-
validator: files => !!files.length && !files.some(file => !file.type
|
|
48862
|
+
validator: files => !!files.length && !files.some(file => !file.type)
|
|
48825
48863
|
},
|
|
48826
|
-
|
|
48864
|
+
|
|
48865
|
+
/*
|
|
48866
|
+
* @param [{name: "", icon: ""}] action
|
|
48867
|
+
*/
|
|
48868
|
+
headerActions: {
|
|
48827
48869
|
type: Array,
|
|
48828
|
-
default: () => []
|
|
48829
|
-
validator: actions => !actions.length || !actions.some(action => !action.icon || !action.name)
|
|
48870
|
+
default: () => []
|
|
48830
48871
|
},
|
|
48831
48872
|
size: {
|
|
48832
48873
|
type: String,
|
|
48833
48874
|
default: 'l',
|
|
48834
48875
|
validator: value => ['s', 'l'].includes(value)
|
|
48835
48876
|
},
|
|
48836
|
-
|
|
48837
|
-
type:
|
|
48838
|
-
default:
|
|
48839
|
-
|
|
48840
|
-
|
|
48841
|
-
|
|
48842
|
-
|
|
48877
|
+
galleryActions: {
|
|
48878
|
+
type: Object,
|
|
48879
|
+
default: () => ({
|
|
48880
|
+
rotate: true,
|
|
48881
|
+
zoom: true,
|
|
48882
|
+
reset: true
|
|
48883
|
+
})
|
|
48843
48884
|
},
|
|
48844
48885
|
unsupportedFileTitle: {
|
|
48845
48886
|
type: String,
|
|
@@ -48871,33 +48912,38 @@ var script = {
|
|
|
48871
48912
|
}
|
|
48872
48913
|
},
|
|
48873
48914
|
data: () => ({
|
|
48874
|
-
currentFileIndex: 0,
|
|
48875
48915
|
zoomSize: 100,
|
|
48876
48916
|
rotateDeg: 0,
|
|
48877
48917
|
isErrorLoading: false
|
|
48878
48918
|
}),
|
|
48879
|
-
|
|
48880
|
-
created() {
|
|
48881
|
-
this.currentFileIndex = this.startIndex;
|
|
48882
|
-
},
|
|
48883
|
-
|
|
48884
48919
|
watch: {
|
|
48885
|
-
|
|
48886
|
-
this
|
|
48920
|
+
startIndex() {
|
|
48921
|
+
this.resetControllers();
|
|
48887
48922
|
}
|
|
48888
48923
|
|
|
48889
48924
|
},
|
|
48890
48925
|
computed: {
|
|
48926
|
+
galleryActionsAllowed() {
|
|
48927
|
+
const filteredActions = { ...this.galleryActions
|
|
48928
|
+
};
|
|
48929
|
+
Object.keys(filteredActions).forEach(action => {
|
|
48930
|
+
if (action === 'zoom' && !this.supportZoom || action === 'rotate' && !this.supportRotate || action === 'reset' && !this.supportZoom && !this.supportRotate) {
|
|
48931
|
+
delete filteredActions[action];
|
|
48932
|
+
}
|
|
48933
|
+
});
|
|
48934
|
+
return filteredActions;
|
|
48935
|
+
},
|
|
48936
|
+
|
|
48891
48937
|
currentFile() {
|
|
48892
|
-
return this.files[this.
|
|
48938
|
+
return this.files[this.startIndex] || {};
|
|
48893
48939
|
},
|
|
48894
48940
|
|
|
48895
48941
|
supportZoom() {
|
|
48896
|
-
return this.zoom && ['image', 'pdf', 'document'].includes(this.currentFile.type);
|
|
48942
|
+
return this.galleryActions.zoom && ['image', 'pdf', 'document'].includes(this.currentFile.type);
|
|
48897
48943
|
},
|
|
48898
48944
|
|
|
48899
48945
|
supportRotate() {
|
|
48900
|
-
return this.rotate && ['image', 'pdf'].includes(this.currentFile.type);
|
|
48946
|
+
return this.galleryActions.rotate && ['image', 'pdf'].includes(this.currentFile.type);
|
|
48901
48947
|
},
|
|
48902
48948
|
|
|
48903
48949
|
showActionsBar() {
|
|
@@ -48913,8 +48959,8 @@ var script = {
|
|
|
48913
48959
|
},
|
|
48914
48960
|
|
|
48915
48961
|
thumbnailPosition() {
|
|
48916
|
-
const thumbnailWidth = this.
|
|
48917
|
-
const thumbnailPaddings = this.
|
|
48962
|
+
const thumbnailWidth = this.startIndex * 100;
|
|
48963
|
+
const thumbnailPaddings = this.startIndex * 24;
|
|
48918
48964
|
const halfElementWithPaddings = 74;
|
|
48919
48965
|
return thumbnailWidth + thumbnailPaddings + halfElementWithPaddings;
|
|
48920
48966
|
},
|
|
@@ -48925,26 +48971,61 @@ var script = {
|
|
|
48925
48971
|
|
|
48926
48972
|
},
|
|
48927
48973
|
methods: {
|
|
48974
|
+
updateStyleStatus() {
|
|
48975
|
+
const isRotated = this.rotateDeg / 360 !== Math.floor(this.rotateDeg / 360);
|
|
48976
|
+
const isZoomed = this.zoomSize !== 100;
|
|
48977
|
+
this.$emit('updateStyleStatus', {
|
|
48978
|
+
isRotated,
|
|
48979
|
+
isZoomed
|
|
48980
|
+
});
|
|
48981
|
+
},
|
|
48982
|
+
|
|
48928
48983
|
zoomout() {
|
|
48929
48984
|
if (this.zoomSize > 10) {
|
|
48930
48985
|
this.zoomSize = this.zoomSize - 10;
|
|
48931
48986
|
}
|
|
48987
|
+
|
|
48988
|
+
this.updateStyleStatus();
|
|
48932
48989
|
},
|
|
48933
48990
|
|
|
48934
48991
|
zoomin() {
|
|
48935
48992
|
if (this.zoomSize < 190) {
|
|
48936
48993
|
this.zoomSize = this.zoomSize + 10;
|
|
48937
48994
|
}
|
|
48995
|
+
|
|
48996
|
+
this.updateStyleStatus();
|
|
48938
48997
|
},
|
|
48939
48998
|
|
|
48940
48999
|
rotating() {
|
|
48941
49000
|
this.rotateDeg = this.rotateDeg - 90;
|
|
49001
|
+
this.updateStyleStatus();
|
|
49002
|
+
},
|
|
49003
|
+
|
|
49004
|
+
reset() {
|
|
49005
|
+
this.zoomSize = 100;
|
|
49006
|
+
const rotateTimes = this.rotateDeg / 360 + '';
|
|
49007
|
+
|
|
49008
|
+
switch (rotateTimes.split('.')[1]) {
|
|
49009
|
+
case '25':
|
|
49010
|
+
this.rotateDeg = this.rotateDeg + 90;
|
|
49011
|
+
break;
|
|
49012
|
+
|
|
49013
|
+
case '5':
|
|
49014
|
+
this.rotateDeg = this.rotateDeg - 180;
|
|
49015
|
+
break;
|
|
49016
|
+
|
|
49017
|
+
case '75':
|
|
49018
|
+
this.rotateDeg = this.rotateDeg - 90;
|
|
49019
|
+
break;
|
|
49020
|
+
}
|
|
49021
|
+
|
|
49022
|
+
this.updateStyleStatus();
|
|
48942
49023
|
},
|
|
48943
49024
|
|
|
48944
49025
|
headerAction(action) {
|
|
48945
49026
|
this.$emit('headerAction', {
|
|
48946
49027
|
action,
|
|
48947
|
-
fileIndex: this.
|
|
49028
|
+
fileIndex: this.startIndex
|
|
48948
49029
|
});
|
|
48949
49030
|
},
|
|
48950
49031
|
|
|
@@ -48952,15 +49033,15 @@ var script = {
|
|
|
48952
49033
|
this.resetControllers();
|
|
48953
49034
|
|
|
48954
49035
|
if (navDirection === 'back') {
|
|
48955
|
-
this.
|
|
49036
|
+
this.startIndex = this.startIndex - 1;
|
|
48956
49037
|
} else {
|
|
48957
|
-
this.
|
|
49038
|
+
this.startIndex = this.startIndex + 1;
|
|
48958
49039
|
}
|
|
48959
49040
|
|
|
48960
|
-
if (this.
|
|
48961
|
-
this.
|
|
48962
|
-
} else if (this.
|
|
48963
|
-
this.
|
|
49041
|
+
if (this.startIndex === this.files.length) {
|
|
49042
|
+
this.startIndex = 0;
|
|
49043
|
+
} else if (this.startIndex === -1) {
|
|
49044
|
+
this.startIndex = this.files.length - 1;
|
|
48964
49045
|
}
|
|
48965
49046
|
|
|
48966
49047
|
this.$emit('navigateFiles', navDirection);
|
|
@@ -48974,13 +49055,13 @@ var script = {
|
|
|
48974
49055
|
|
|
48975
49056
|
updateFileIndex(fileClicked) {
|
|
48976
49057
|
this.resetControllers();
|
|
48977
|
-
this.
|
|
49058
|
+
this.startIndex = this.files.findIndex(file => file.name === fileClicked.name);
|
|
48978
49059
|
this.$emit('thumbnailsClicked', fileClicked);
|
|
48979
49060
|
},
|
|
48980
49061
|
|
|
48981
49062
|
errorLoading() {
|
|
48982
49063
|
this.isErrorLoading = true;
|
|
48983
|
-
this.$emit('errorLoading', this.
|
|
49064
|
+
this.$emit('errorLoading', this.startIndex);
|
|
48984
49065
|
}
|
|
48985
49066
|
|
|
48986
49067
|
}
|
|
@@ -49009,7 +49090,7 @@ var __vue_render__ = function () {
|
|
|
49009
49090
|
attrs: {
|
|
49010
49091
|
"fileName": _vm.currentFile.name,
|
|
49011
49092
|
"size": _vm.size,
|
|
49012
|
-
"actions": _vm.
|
|
49093
|
+
"actions": _vm.headerActions
|
|
49013
49094
|
},
|
|
49014
49095
|
on: {
|
|
49015
49096
|
"action": _vm.headerAction,
|
|
@@ -49054,18 +49135,17 @@ var __vue_render__ = function () {
|
|
|
49054
49135
|
})], 1) : _vm._e()];
|
|
49055
49136
|
}), _vm._v(" "), _vm.showActionsBar ? _c('div', {
|
|
49056
49137
|
staticClass: "gallery__controls"
|
|
49057
|
-
}, [_c('VcGalleryActions', {
|
|
49138
|
+
}, [_c('VcGalleryActions', _vm._b({
|
|
49058
49139
|
attrs: {
|
|
49059
|
-
"zoomSize": _vm.zoomSize
|
|
49060
|
-
"zoom": _vm.zoom && _vm.supportZoom,
|
|
49061
|
-
"rotate": _vm.rotate && _vm.supportRotate
|
|
49140
|
+
"zoomSize": _vm.zoomSize
|
|
49062
49141
|
},
|
|
49063
49142
|
on: {
|
|
49143
|
+
"resetStyle": _vm.reset,
|
|
49064
49144
|
"zoomout": _vm.zoomout,
|
|
49065
49145
|
"zoomin": _vm.zoomin,
|
|
49066
49146
|
"rotate": _vm.rotating
|
|
49067
49147
|
}
|
|
49068
|
-
})], 1) : _vm._e(), _vm._v(" "), _vm._t("fileViewer", function () {
|
|
49148
|
+
}, 'VcGalleryActions', _vm.galleryActionsAllowed, false))], 1) : _vm._e(), _vm._v(" "), _vm._t("fileViewer", function () {
|
|
49069
49149
|
return [_c('div', {
|
|
49070
49150
|
staticClass: "gallery__viewer"
|
|
49071
49151
|
}, [_c('VcPreview', {
|
|
@@ -49123,8 +49203,8 @@ var __vue_staticRenderFns__ = [];
|
|
|
49123
49203
|
|
|
49124
49204
|
const __vue_inject_styles__ = function (inject) {
|
|
49125
49205
|
if (!inject) return;
|
|
49126
|
-
inject("data-v-
|
|
49127
|
-
source: ".gallery[data-v-
|
|
49206
|
+
inject("data-v-5aa7b452_0", {
|
|
49207
|
+
source: ".gallery[data-v-5aa7b452]{height:100%;width:100%;display:flex;flex-direction:column;background-color:rgba(0,0,0,.8);position:relative;overflow:hidden}.gallery[data-v-5aa7b452] ::-webkit-scrollbar{width:var(--size-value1);height:var(--size-value1);background-color:transparent}.gallery[data-v-5aa7b452] ::-webkit-scrollbar-thumb{background:var(--gray-darken-3)}.gallery__navigation[data-v-5aa7b452]{width:100%;position:fixed;z-index:1;left:0;height:0;top:50%;transform:translateY(-50%);display:flex;justify-content:space-between;padding-inline:var(--size-value7)}.gallery__navigation[data-v-5aa7b452] .v-btn{background-color:#fff}.gallery__viewer[data-v-5aa7b452]{position:relative;overflow:auto;flex:1}.gallery__controls[data-v-5aa7b452]{position:absolute;z-index:1;transform:translateX(-50%);left:50%;bottom:var(--size-value4)}.thumbnails-on .gallery__controls[data-v-5aa7b452]{bottom:128px}.gallery__thumbnails[data-v-5aa7b452]{display:flex;position:relative;height:116px;background-color:var(--gray-darken-5)}.gallery__thumbnails--scroll[data-v-5aa7b452]{display:flex;flex-wrap:nowrap;transition:.25s ease-in-out;position:absolute;left:50%;padding-block:var(--size-value2)}.gallery__thumbnails--item[data-v-5aa7b452]{flex-basis:100px;width:100px;height:100px;margin-inline:var(--size-value3);border-radius:var(--size-value1);overflow:hidden;cursor:pointer}",
|
|
49128
49208
|
map: undefined,
|
|
49129
49209
|
media: undefined
|
|
49130
49210
|
});
|
|
@@ -49132,7 +49212,7 @@ const __vue_inject_styles__ = function (inject) {
|
|
|
49132
49212
|
/* scoped */
|
|
49133
49213
|
|
|
49134
49214
|
|
|
49135
|
-
const __vue_scope_id__ = "data-v-
|
|
49215
|
+
const __vue_scope_id__ = "data-v-5aa7b452";
|
|
49136
49216
|
/* module identifier */
|
|
49137
49217
|
|
|
49138
49218
|
const __vue_module_identifier__ = undefined;
|