Skip to content

Commit 186cfdb

Browse files
authored
Upgrade deps (KitchenStories#22)
* add yarn.lock * upgrade deps * mod changelog * cleanup * mod travis file * add eslint * lint fixes * change nightwatch version * mod test
1 parent 69c3bc7 commit 186cfdb

14 files changed

+7665
-2542
lines changed

.babelrc

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"presets": [
3-
["env", {
3+
["@babel/preset-env", {
44
"modules": false,
55
"targets": {
66
"browsers": [
@@ -18,5 +18,5 @@
1818
}
1919
}]
2020
],
21-
"plugins": ["transform-object-assign"]
21+
"plugins": [ "@babel/plugin-transform-object-assign"]
2222
}

.eslintrc.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module.exports = {
22
"extends": [
3-
"plugin:vue/essential"
3+
"plugin:vue/recommended"
44
],
55
"rules": {
66
"semi": ["error", "always"],

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@
44
node_modules
55
npm-debug.log
66
test/e2e/reports
7-
test/e2e/screenshots
7+
test/e2e/screenshots
8+
selenium-server.log

.travis.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,13 @@ language: node_js
33
node_js:
44
- "stable"
55

6+
services:
7+
- xvfb
8+
69
before_install:
710
- export CHROME_BIN=/usr/bin/google-chrome
811
- export DISPLAY=:99.0
9-
- sh -e /etc/init.d/xvfb start
12+
# - sh -e /etc/init.d/xvfb start
1013
- sudo apt-get update
1114
- sudo apt-get install -y libappindicator1 fonts-liberation
1215
- wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
# Changelog
22
All notable changes to this project will be documented in this file.
33

4+
## [1.3.2] -2019-07-28
5+
### Updated
6+
- all dependencies
7+
48
## [1.3.1] -2019-02-06
59
### Fixed
610
- images with landscape formats bigger than ratio 1:0.672 are not completely visible

dist/js/vue-gallery-slideshow.js

+41-37
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
(function (global, factory) {
22
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
33
typeof define === 'function' && define.amd ? define(factory) :
4-
(global.VueGallerySlideshow = factory());
5-
}(this, (function () { 'use strict';
4+
(global = global || self, global.VueGallerySlideshow = factory());
5+
}(this, function () { 'use strict';
66

77
//
88
//
@@ -34,7 +34,6 @@
3434
//
3535
//
3636
//
37-
3837
var script = {
3938
props: ["images", "index"],
4039
mounted: function mounted() {
@@ -50,7 +49,6 @@
5049
}
5150
});
5251
},
53-
5452
watch: {
5553
index: function index(val) {
5654
this.imgIndex = val;
@@ -63,20 +61,24 @@
6361
},
6462
onPrev: function onPrev() {
6563
if (this.imgIndex === null) return;
64+
6665
if (this.imgIndex > 0) {
6766
this.imgIndex--;
6867
} else {
6968
this.imgIndex = this.images.length - 1;
7069
}
70+
7171
this.updateThumbails();
7272
},
7373
onNext: function onNext() {
7474
if (this.imgIndex === null) return;
75+
7576
if (this.imgIndex < this.images.length - 1) {
7677
this.imgIndex++;
7778
} else {
7879
this.imgIndex = 0;
7980
}
81+
8082
this.updateThumbails();
8183
},
8284
onClickThumb: function onClickThumb(image, index) {
@@ -91,9 +93,8 @@
9193
var galleryWidth = this.$refs.gallery.clientWidth;
9294
var currThumbsWidth = this.imgIndex * this.thumbnailWidth;
9395
var maxThumbsWidth = this.images.length * this.thumbnailWidth;
94-
var centerPos = Math.floor(galleryWidth / (this.thumbnailWidth * 2)) * this.thumbnailWidth;
96+
var centerPos = Math.floor(galleryWidth / (this.thumbnailWidth * 2)) * this.thumbnailWidth; // Prevent scrolling of images if not needed
9597

96-
// Prevent scrolling of images if not needed
9798
if (maxThumbsWidth < galleryWidth) {
9899
return;
99100
}
@@ -216,7 +217,7 @@
216217
return addStyle(id, style);
217218
};
218219
}
219-
var HEAD = document.head || document.getElementsByTagName('head')[0];
220+
var HEAD;
220221
var styles = {};
221222

222223
function addStyle(id, css) {
@@ -242,6 +243,11 @@
242243
style.element = document.createElement('style');
243244
style.element.type = 'text/css';
244245
if (css.media) style.element.setAttribute('media', css.media);
246+
247+
if (HEAD === undefined) {
248+
HEAD = document.head || document.getElementsByTagName('head')[0];
249+
}
250+
245251
HEAD.appendChild(style.element);
246252
}
247253

@@ -261,41 +267,39 @@
261267
var browser = createInjector;
262268

263269
/* script */
264-
var __vue_script__ = script;
270+
const __vue_script__ = script;
265271

266272
/* template */
267-
var __vue_render__ = function __vue_render__() {
268-
var _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _c('transition', { attrs: { "name": "modal" } }, [_vm.imgIndex !== null ? _c('div', { staticClass: "vgs", on: { "click": _vm.close } }, [_c('button', { staticClass: "vgs__close", attrs: { "type": "button" }, on: { "click": _vm.close } }, [_vm._v("×")]), _vm._v(" "), _vm.isMultiple ? _c('button', { staticClass: "vgs__prev", attrs: { "type": "button" }, on: { "click": function click($event) {
269-
$event.stopPropagation();return _vm.onPrev($event);
270-
} } }, [_vm._v("‹")]) : _vm._e(), _vm._v(" "), _vm.images ? _c('div', { staticClass: "vgs__container", on: { "click": function click($event) {
271-
$event.stopPropagation();return _vm.onNext($event);
272-
} } }, [_c('img', { staticClass: "vgs__container__img", attrs: { "src": _vm.imageUrl }, on: { "click": function click($event) {
273-
$event.stopPropagation();return _vm.onNext($event);
274-
} } })]) : _vm._e(), _vm._v(" "), _vm.isMultiple ? _c('button', { staticClass: "vgs__next", attrs: { "type": "button" }, on: { "click": function click($event) {
275-
$event.stopPropagation();return _vm.onNext($event);
276-
} } }, [_vm._v("›")]) : _vm._e(), _vm._v(" "), _vm.isMultiple ? _c('div', { ref: "gallery", staticClass: "vgs__gallery" }, [_vm.images ? _c('div', { staticClass: "vgs__gallery__title" }, [_vm._v(_vm._s(_vm.imgIndex + 1) + " / " + _vm._s(_vm.images.length))]) : _vm._e(), _vm._v(" "), _vm.images ? _c('div', { staticClass: "vgs__gallery__container", style: { transform: 'translate(' + _vm.galleryXPos + 'px, 0)' } }, _vm._l(_vm.images, function (image, i) {
277-
return _c('img', { key: i, staticClass: "vgs__gallery__container__img", class: { 'vgs__gallery__container__img--active': i === _vm.imgIndex }, attrs: { "src": image }, on: { "click": function click($event) {
278-
$event.stopPropagation();return _vm.onClickThumb(image, i);
279-
} } });
280-
}), 0) : _vm._e()]) : _vm._e()]) : _vm._e()]);
281-
};
273+
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('transition',{attrs:{"name":"modal"}},[(_vm.imgIndex !== null)?_c('div',{staticClass:"vgs",on:{"click":_vm.close}},[_c('button',{staticClass:"vgs__close",attrs:{"type":"button"},on:{"click":_vm.close}},[_vm._v("×")]),_vm._v(" "),(_vm.isMultiple)?_c('button',{staticClass:"vgs__prev",attrs:{"type":"button"},on:{"click":function($event){$event.stopPropagation();return _vm.onPrev($event)}}},[_vm._v("‹")]):_vm._e(),_vm._v(" "),(_vm.images)?_c('div',{staticClass:"vgs__container",on:{"click":function($event){$event.stopPropagation();return _vm.onNext($event)}}},[_c('img',{staticClass:"vgs__container__img",attrs:{"src":_vm.imageUrl},on:{"click":function($event){$event.stopPropagation();return _vm.onNext($event)}}})]):_vm._e(),_vm._v(" "),(_vm.isMultiple)?_c('button',{staticClass:"vgs__next",attrs:{"type":"button"},on:{"click":function($event){$event.stopPropagation();return _vm.onNext($event)}}},[_vm._v("›")]):_vm._e(),_vm._v(" "),(_vm.isMultiple)?_c('div',{ref:"gallery",staticClass:"vgs__gallery"},[(_vm.images)?_c('div',{staticClass:"vgs__gallery__title"},[_vm._v(_vm._s(_vm.imgIndex + 1)+" / "+_vm._s(_vm.images.length))]):_vm._e(),_vm._v(" "),(_vm.images)?_c('div',{staticClass:"vgs__gallery__container",style:({ transform: 'translate(' + _vm.galleryXPos + 'px, 0)' })},_vm._l((_vm.images),function(image,i){return _c('img',{key:i,staticClass:"vgs__gallery__container__img",class:{ 'vgs__gallery__container__img--active': i === _vm.imgIndex},attrs:{"src":image},on:{"click":function($event){$event.stopPropagation();return _vm.onClickThumb(image, i)}}})}),0):_vm._e()]):_vm._e()]):_vm._e()])};
282274
var __vue_staticRenderFns__ = [];
283275

284-
/* style */
285-
var __vue_inject_styles__ = function __vue_inject_styles__(inject) {
286-
if (!inject) return;
287-
inject("data-v-4488c8a8_0", { source: ".vgs{transition:opacity .2s ease;position:fixed;z-index:9998;top:0;left:0;width:100%;min-height:100%;height:100vh;background-color:rgba(0,0,0,.8);display:table}.vgs__close{color:#fff;position:absolute;top:0;right:0;background-color:transparent;border:none;font-size:25px;width:50px;height:50px;cursor:pointer;z-index:999}.vgs__close:focus{outline:0}.vgs__next,.vgs__prev{position:absolute;top:50%;margin-top:-25px;width:50px;height:50px;z-index:999;cursor:pointer;font-size:40px;color:#fff;background-color:transparent;border:none}.vgs__next:focus,.vgs__prev:focus{outline:0}.vgs__prev{left:0}.vgs__next{right:0}.vgs__container{position:absolute;overflow:hidden;cursor:pointer;overflow:hidden;max-width:100vh;margin:.5rem auto 0;left:.5rem;right:.5rem;height:60vh;border-radius:12px;background-color:#000}@media (max-width:767px){.vgs__container{width:100%;max-width:100%;top:50%;margin-top:-140px;left:0;right:0;border-radius:0;height:280px}}.vgs__container__img{width:100%;height:100%;object-fit:contain}.vgs__gallery{overflow-x:hidden;overflow-y:hidden;position:absolute;bottom:10px;margin:auto;max-width:100vh;white-space:nowrap;left:.5rem;right:.5rem}@media (max-width:767px){.vgs__gallery{display:none}}.vgs__gallery__title{color:#fff;margin-bottom:.5rem}.vgs__gallery__container{overflow:visible;display:block;height:100px;white-space:nowrap;transition:all .2s ease-in-out;width:100%}.vgs__gallery__container__img{width:100px;height:100px;object-fit:cover;display:inline-block;float:none;margin-right:20px;cursor:pointer;opacity:.6;border-radius:8px}.vgs__gallery__container__img--active{width:100px;display:inline-block;float:none;opacity:1}.modal-enter{opacity:0}.modal-leave-active{opacity:0}", map: undefined, media: undefined });
288-
};
289-
/* scoped */
290-
var __vue_scope_id__ = undefined;
291-
/* module identifier */
292-
var __vue_module_identifier__ = undefined;
293-
/* functional template */
294-
var __vue_is_functional_template__ = false;
295-
/* style inject SSR */
276+
/* style */
277+
const __vue_inject_styles__ = function (inject) {
278+
if (!inject) return
279+
inject("data-v-4488c8a8_0", { source: ".vgs{transition:opacity .2s ease;position:fixed;z-index:9998;top:0;left:0;width:100%;min-height:100%;height:100vh;background-color:rgba(0,0,0,.8);display:table}.vgs__close{color:#fff;position:absolute;top:0;right:0;background-color:transparent;border:none;font-size:25px;width:50px;height:50px;cursor:pointer;z-index:999}.vgs__close:focus{outline:0}.vgs__next,.vgs__prev{position:absolute;top:50%;margin-top:-25px;width:50px;height:50px;z-index:999;cursor:pointer;font-size:40px;color:#fff;background-color:transparent;border:none}.vgs__next:focus,.vgs__prev:focus{outline:0}.vgs__prev{left:0}.vgs__next{right:0}.vgs__container{position:absolute;overflow:hidden;cursor:pointer;overflow:hidden;max-width:100vh;margin:.5rem auto 0;left:.5rem;right:.5rem;height:60vh;border-radius:12px;background-color:#000}@media (max-width:767px){.vgs__container{width:100%;max-width:100%;top:50%;margin-top:-140px;left:0;right:0;border-radius:0;height:280px}}.vgs__container__img{width:100%;height:100%;object-fit:contain}.vgs__gallery{overflow-x:hidden;overflow-y:hidden;position:absolute;bottom:10px;margin:auto;max-width:100vh;white-space:nowrap;left:.5rem;right:.5rem}@media (max-width:767px){.vgs__gallery{display:none}}.vgs__gallery__title{color:#fff;margin-bottom:.5rem}.vgs__gallery__container{overflow:visible;display:block;height:100px;white-space:nowrap;transition:all .2s ease-in-out;width:100%}.vgs__gallery__container__img{width:100px;height:100px;object-fit:cover;display:inline-block;float:none;margin-right:20px;cursor:pointer;opacity:.6;border-radius:8px}.vgs__gallery__container__img--active{width:100px;display:inline-block;float:none;opacity:1}.modal-enter{opacity:0}.modal-leave-active{opacity:0}", map: undefined, media: undefined });
296280

297-
var GallerySlideshow = normalizeComponent_1({ render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ }, __vue_inject_styles__, __vue_script__, __vue_scope_id__, __vue_is_functional_template__, __vue_module_identifier__, browser, undefined);
281+
};
282+
/* scoped */
283+
const __vue_scope_id__ = undefined;
284+
/* module identifier */
285+
const __vue_module_identifier__ = undefined;
286+
/* functional template */
287+
const __vue_is_functional_template__ = false;
288+
/* style inject SSR */
289+
290+
291+
292+
var GallerySlideshow = normalizeComponent_1(
293+
{ render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ },
294+
__vue_inject_styles__,
295+
__vue_script__,
296+
__vue_scope_id__,
297+
__vue_is_functional_template__,
298+
__vue_module_identifier__,
299+
browser,
300+
undefined
301+
);
298302

299303
return GallerySlideshow;
300304

301-
})));
305+
}));

0 commit comments

Comments
 (0)