@abi-software/gallery 0.3.1 → 0.3.2-beta
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/.browserslistrc +3 -3
- package/.eslintrc.js +36 -31
- package/.prettierrc +6 -6
- package/LICENSE +201 -201
- package/Meeting-plan.txt +4 -0
- package/README.md +35 -35
- package/babel.config.js +12 -12
- package/dist/gallery.common.js +64 -61
- package/dist/gallery.common.js.map +1 -1
- package/dist/gallery.css +1 -1
- package/dist/gallery.umd.js +64 -61
- package/dist/gallery.umd.js.map +1 -1
- package/dist/gallery.umd.min.js +1 -1
- package/dist/gallery.umd.min.js.map +1 -1
- package/jest.config.js +3 -3
- package/package.json +43 -43
- package/public/index.html +17 -17
- package/src/App.vue +28 -28
- package/src/components/Card.vue +324 -319
- package/src/components/Gallery.vue +250 -250
- package/src/components/IndexIndicator.vue +45 -45
- package/src/delete.json +39 -0
- package/src/index.js +2 -2
- package/src/main.js +2 -2
- package/src/mixins/GalleryHelpers.js +104 -104
- package/tests/unit/example.spec.js +12 -12
- package/vue.config.js +23 -23
- package/src/assets/data-icon.png +0 -0
- package/src/assets/flatmap-thumbnail.png +0 -0
- package/src/assets/scaffold-light.png +0 -0
- package/src/assets/video-default.png +0 -0
package/dist/gallery.common.js
CHANGED
|
@@ -2186,6 +2186,17 @@ var getBuiltIn = __webpack_require__("d066");
|
|
|
2186
2186
|
module.exports = getBuiltIn('navigator', 'userAgent') || '';
|
|
2187
2187
|
|
|
2188
2188
|
|
|
2189
|
+
/***/ }),
|
|
2190
|
+
|
|
2191
|
+
/***/ "3587":
|
|
2192
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2193
|
+
|
|
2194
|
+
"use strict";
|
|
2195
|
+
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_node_modules_vue_svg_inline_loader_src_index_js_Card_vue_vue_type_style_index_0_id_3bfc85a8_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8689");
|
|
2196
|
+
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_node_modules_vue_svg_inline_loader_src_index_js_Card_vue_vue_type_style_index_0_id_3bfc85a8_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_node_modules_vue_svg_inline_loader_src_index_js_Card_vue_vue_type_style_index_0_id_3bfc85a8_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__);
|
|
2197
|
+
/* unused harmony reexport * */
|
|
2198
|
+
|
|
2199
|
+
|
|
2189
2200
|
/***/ }),
|
|
2190
2201
|
|
|
2191
2202
|
/***/ "35a1":
|
|
@@ -2577,17 +2588,6 @@ module.exports = function settle(resolve, reject, response) {
|
|
|
2577
2588
|
};
|
|
2578
2589
|
|
|
2579
2590
|
|
|
2580
|
-
/***/ }),
|
|
2581
|
-
|
|
2582
|
-
/***/ "469f":
|
|
2583
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2584
|
-
|
|
2585
|
-
"use strict";
|
|
2586
|
-
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_node_modules_vue_svg_inline_loader_src_index_js_Card_vue_vue_type_style_index_0_id_82fea1fc_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("7a98");
|
|
2587
|
-
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_node_modules_vue_svg_inline_loader_src_index_js_Card_vue_vue_type_style_index_0_id_82fea1fc_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_node_modules_vue_svg_inline_loader_src_index_js_Card_vue_vue_type_style_index_0_id_82fea1fc_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__);
|
|
2588
|
-
/* unused harmony reexport * */
|
|
2589
|
-
|
|
2590
|
-
|
|
2591
2591
|
/***/ }),
|
|
2592
2592
|
|
|
2593
2593
|
/***/ "4840":
|
|
@@ -6354,13 +6354,6 @@ Cancel.prototype.__CANCEL__ = true;
|
|
|
6354
6354
|
module.exports = Cancel;
|
|
6355
6355
|
|
|
6356
6356
|
|
|
6357
|
-
/***/ }),
|
|
6358
|
-
|
|
6359
|
-
/***/ "7a98":
|
|
6360
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
6361
|
-
|
|
6362
|
-
// extracted by mini-css-extract-plugin
|
|
6363
|
-
|
|
6364
6357
|
/***/ }),
|
|
6365
6358
|
|
|
6366
6359
|
/***/ "7aac":
|
|
@@ -7169,6 +7162,13 @@ module.exports = function (it) {
|
|
|
7169
7162
|
};
|
|
7170
7163
|
|
|
7171
7164
|
|
|
7165
|
+
/***/ }),
|
|
7166
|
+
|
|
7167
|
+
/***/ "8689":
|
|
7168
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
7169
|
+
|
|
7170
|
+
// extracted by mini-css-extract-plugin
|
|
7171
|
+
|
|
7172
7172
|
/***/ }),
|
|
7173
7173
|
|
|
7174
7174
|
/***/ "8875":
|
|
@@ -12555,7 +12555,7 @@ if (typeof window !== 'undefined') {
|
|
|
12555
12555
|
// Indicate to webpack that this file can be concatenated
|
|
12556
12556
|
/* harmony default export */ var setPublicPath = (null);
|
|
12557
12557
|
|
|
12558
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
12558
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"5ec2d5a4-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./node_modules/vue-svg-inline-loader/src!./src/components/Gallery.vue?vue&type=template&id=2d26752e&scoped=true&
|
|
12559
12559
|
var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{ref:"myButton",staticClass:"gallery"},[_c('div',{staticClass:"gallery-strip"},[(_vm.items.length > 1)?_c('a',{class:['oval', 'prev', { disabled: !_vm.isPrevPossible }],attrs:{"href":"#"},on:{"click":function($event){$event.preventDefault();return _vm.goPrev.apply(null, arguments)}}},[_c('span',{staticClass:"progress-button"},[_vm._v("‹")])]):_c('div',{staticStyle:{"width":"2rem"}}),_c('div',{staticClass:"filler"}),_c('div',{staticClass:"card-line"},_vm._l((_vm.windowedItems),function(item,index){return _c('span',{key:'card_' + index,class:['key-image-span', { active: _vm.isActive(index) }]},[(item)?_c('card',{attrs:{"data":item,"body-style":_vm.bodyStyle,"image-container-style":_vm.imageContainerStyle,"image-style":_vm.imageStyle,"width":_vm.cardWidth,"height":_vm.cardHeight,"shadow":_vm.shadow,"show-card-details":_vm.showCardDetails},on:{"card-clicked":_vm.cardClicked}}):_vm._e()],1)}),0),_c('div',{staticClass:"filler"}),(_vm.items.length > 1)?_c('a',{class:['oval', 'next', { disabled: !_vm.isNextPossible }],attrs:{"href":"#"},on:{"click":function($event){$event.preventDefault();return _vm.goNext.apply(null, arguments)}}},[_c('span',{staticClass:"progress-button"},[_vm._v("›")])]):_c('div',{staticStyle:{"width":"2rem"}})]),_c('div',{style:(_vm.bottomSpacer)}),(_vm.canShowIndicatorBar)?_c('index-indicator',{attrs:{"count":_vm.itemCount,"current":_vm.currentIndex},on:{"clicked":_vm.indicatorClicked}}):_vm._e()],1)}
|
|
12560
12560
|
var staticRenderFns = []
|
|
12561
12561
|
|
|
@@ -12565,7 +12565,7 @@ var staticRenderFns = []
|
|
|
12565
12565
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.number.constructor.js
|
|
12566
12566
|
var es_number_constructor = __webpack_require__("a9e3");
|
|
12567
12567
|
|
|
12568
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
12568
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"5ec2d5a4-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./node_modules/vue-svg-inline-loader/src!./src/components/IndexIndicator.vue?vue&type=template&id=162e33aa&scoped=true&
|
|
12569
12569
|
var IndexIndicatorvue_type_template_id_162e33aa_scoped_true_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"indicator-container"},_vm._l((_vm.count),function(number,index){return _c('div',{key:'indicator_' + number,class:['indicator', { active: _vm.current === index }],on:{"click":function($event){return _vm.$emit('clicked', index)}}})}),0)}
|
|
12570
12570
|
var IndexIndicatorvue_type_template_id_162e33aa_scoped_true_staticRenderFns = []
|
|
12571
12571
|
|
|
@@ -12724,12 +12724,12 @@ var component = normalizeComponent(
|
|
|
12724
12724
|
)
|
|
12725
12725
|
|
|
12726
12726
|
/* harmony default export */ var IndexIndicator = (component.exports);
|
|
12727
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
12728
|
-
var
|
|
12729
|
-
var
|
|
12727
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"5ec2d5a4-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./node_modules/vue-svg-inline-loader/src!./src/components/Card.vue?vue&type=template&id=3bfc85a8&scoped=true&
|
|
12728
|
+
var Cardvue_type_template_id_3bfc85a8_scoped_true_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('el-card',{staticClass:"card",style:({ padding: '0px', maxWidth: _vm.width + 'rem' }),attrs:{"shadow":_vm.shadow,"body-style":_vm.bodyStyle}},[_c('div',{directives:[{name:"loading",rawName:"v-loading",value:(!_vm.isReady),expression:"!isReady"}]},[_c('div',{style:(_vm.imageContainerStyle)},[(_vm.useDefaultImg)?_c('svg',{style:(_vm.imageStyle),attrs:{"data-name":"logo-sparc-wave-primary","xmlns":"http://www.w3.org/2000/svg","viewBox":"0 0 400 190.585","svg-inline":'',"role":'presentation',"focusable":'false',"tabindex":'-1'}},[_c('defs',[_c('linearGradient',{attrs:{"id":"a","y1":"96.35","x2":"400","y2":"96.35","gradientUnits":"userSpaceOnUse"}},[_c('stop',{attrs:{"offset":"0","stop-color":"#0b00bf"}}),_c('stop',{attrs:{"offset":"1","stop-color":"#bc00fc"}})],1)],1),_c('path',{attrs:{"d":"M396.698 128.625l-146.274-3.38a6.536 6.536 0 00-6.138 3.923l-.06.141-13.674 31.448-27.61-151.224-.01-.068a8.982 8.982 0 00-17.663-.012l-21.596 115.929-160.375 3.907a3.38 3.38 0 00.027 6.759l166.015 2.715a6.594 6.594 0 006.537-5.145l.057-.255 17.854-79.565 27.472 131.326.026.124a6.76 6.76 0 0012.806 1.272l20.808-47.86 141.798-3.276a3.38 3.38 0 000-6.76z","fill":"url(#a)"}}),_c('path',{attrs:{"d":"M25.68 0c15.716 0 25.377 10.093 25.377 26.097v9.516H36.205v-9.516c0-7.353-3.894-11.822-10.526-11.822-6.776 0-10.669 4.469-10.669 11.822 0 3.895 1.298 7.353 5.479 11.391l19.754 18.601C46.586 62.144 52.21 68.778 52.21 79.88c0 16.005-9.95 26.097-25.954 26.097C10.108 105.977.158 95.885.158 79.88v-9.518H15.01v9.518c0 7.353 4.037 11.822 11.245 11.822 7.065 0 11.103-4.469 11.103-11.822 0-4.47-2.163-8.651-6.055-12.258L11.116 48.736C3.043 41.237.159 34.894.159 25.666.159 10.093 9.82 0 25.678 0zM99.797 69.786v35.182H84.945V1.01h25.376c16.005 0 26.097 10.093 26.097 26.097v16.581c0 16.15-10.092 26.098-26.097 26.098zm10.38-13.985c7.209 0 11.392-4.326 11.392-11.68V26.677c0-7.21-4.183-11.681-11.391-11.681h-10.38V55.8zM278.581 108.147H263.73V4.189h26.097c16.005 0 26.098 10.093 26.098 26.098v14.13c0 9.95-4.326 17.736-11.391 22.205 4.182 12.688 10.092 29.991 13.842 41.525h-15.14L290.69 70.37h-12.11zm11.1-51.763c7.21 0 11.39-4.326 11.39-11.534V29.855c0-7.21-4.18-11.68-11.39-11.68h-11.1v38.21zM399.844 73.541v9.519c0 16.005-9.947 26.097-25.952 26.097-16.15 0-26.097-10.092-26.097-26.097V29.277c0-16.005 9.947-26.098 26.097-26.098 16.005 0 25.952 10.093 25.952 26.098v9.516h-14.85v-9.516c0-7.354-4.037-11.822-11.103-11.822-7.21 0-11.247 4.468-11.247 11.822V83.06c0 7.353 4.037 11.822 11.247 11.822 7.066 0 11.103-4.469 11.103-11.822v-9.519z","fill":"#0e0e19"}})]):_c('img',{style:(_vm.imageStyle),attrs:{"src":_vm.thumbnail,"alt":"thumbnail loading ..."}})]),(false)?undefined:_vm._e(),(_vm.showCardDetails)?_c('div',{staticClass:"details"},[(!_vm.data.hideType)?_c('p',[_c('b',[_vm._v(_vm._s(_vm.data.type))])]):_vm._e(),_c('el-popover',{ref:"galleryPopover",attrs:{"disabled":_vm.disableTooltip,"content":_vm.data.title,"placement":"top","trigger":"hover","popper-class":"gallery-popper"}}),_c('p',{directives:[{name:"show",rawName:"v-show",value:(!_vm.data.hideTitle),expression:"!data.hideTitle"},{name:"popover",rawName:"v-popover:galleryPopover",arg:"galleryPopover"}],ref:"titleText",staticClass:"title"},[_vm._v(" "+_vm._s(_vm.data.title)+" ")]),_c('p',{directives:[{name:"show",rawName:"v-show",value:(_vm.data.hideTitle),expression:"data.hideTitle"}],staticClass:"title text-placeholder"}),_c('el-button',{staticClass:"button",on:{"click":function($event){$event.preventDefault();return _vm.cardClicked.apply(null, arguments)}}},[_vm._v(" View "+_vm._s(_vm.data.type))])],1):_vm._e()])])}
|
|
12729
|
+
var Cardvue_type_template_id_3bfc85a8_scoped_true_staticRenderFns = []
|
|
12730
12730
|
|
|
12731
12731
|
|
|
12732
|
-
// CONCATENATED MODULE: ./src/components/Card.vue?vue&type=template&id=
|
|
12732
|
+
// CONCATENATED MODULE: ./src/components/Card.vue?vue&type=template&id=3bfc85a8&scoped=true&
|
|
12733
12733
|
|
|
12734
12734
|
// EXTERNAL MODULE: ./node_modules/element-ui/lib/theme-chalk/popover.css
|
|
12735
12735
|
var popover = __webpack_require__("06f1");
|
|
@@ -12890,20 +12890,20 @@ var axios_default = /*#__PURE__*/__webpack_require__.n(axios);
|
|
|
12890
12890
|
}))();
|
|
12891
12891
|
},
|
|
12892
12892
|
|
|
12893
|
-
/**
|
|
12894
|
-
* Returns a file path for S3.
|
|
12895
|
-
* @param {String} dataset_id dataset id.
|
|
12896
|
-
* @param {String} dataset_version dataset version.
|
|
12897
|
-
* @param {String} file_path file path.
|
|
12898
|
-
* @returns {String} full path to S3 file.
|
|
12893
|
+
/**
|
|
12894
|
+
* Returns a file path for S3.
|
|
12895
|
+
* @param {String} dataset_id dataset id.
|
|
12896
|
+
* @param {String} dataset_version dataset version.
|
|
12897
|
+
* @param {String} file_path file path.
|
|
12898
|
+
* @returns {String} full path to S3 file.
|
|
12899
12899
|
*/
|
|
12900
12900
|
getS3FilePath: function getS3FilePath(dataset_id, dataset_version, file_path) {
|
|
12901
12901
|
var encoded_file_path = encodeURIComponent(file_path);
|
|
12902
12902
|
return "".concat(dataset_id, "/").concat(dataset_version, "/files/").concat(encoded_file_path);
|
|
12903
12903
|
},
|
|
12904
12904
|
|
|
12905
|
-
/**
|
|
12906
|
-
* Find data path in the array that matches the provide path
|
|
12905
|
+
/**
|
|
12906
|
+
* Find data path in the array that matches the provide path
|
|
12907
12907
|
*/
|
|
12908
12908
|
findEntryWithPathInArray: function findEntryWithPathInArray(array, path) {
|
|
12909
12909
|
if (path && array) {
|
|
@@ -12922,9 +12922,9 @@ var axios_default = /*#__PURE__*/__webpack_require__.n(axios);
|
|
|
12922
12922
|
return undefined;
|
|
12923
12923
|
},
|
|
12924
12924
|
|
|
12925
|
-
/**
|
|
12926
|
-
* Use the scaffoldViews to help with finding the correct thumbnails.
|
|
12927
|
-
* Use the index if the workflow stated above fails.
|
|
12925
|
+
/**
|
|
12926
|
+
* Use the scaffoldViews to help with finding the correct thumbnails.
|
|
12927
|
+
* Use the index if the workflow stated above fails.
|
|
12928
12928
|
*/
|
|
12929
12929
|
getThumbnailForScaffold: function getThumbnailForScaffold(scaffold, scaffoldViews, thumbnails, index) {
|
|
12930
12930
|
if (thumbnails && thumbnails.length > 0) {
|
|
@@ -13177,10 +13177,19 @@ function isValidHttpUrl(string) {
|
|
|
13177
13177
|
}
|
|
13178
13178
|
}
|
|
13179
13179
|
},
|
|
13180
|
+
updated: function updated() {
|
|
13181
|
+
var _this2 = this;
|
|
13182
|
+
|
|
13183
|
+
if (!this.tooltipCalculated) {
|
|
13184
|
+
this.$nextTick(function () {
|
|
13185
|
+
_this2.calculateShowTooltip();
|
|
13186
|
+
});
|
|
13187
|
+
}
|
|
13188
|
+
},
|
|
13180
13189
|
methods: {
|
|
13181
|
-
/**
|
|
13182
|
-
* Open a new link if link is provide.
|
|
13183
|
-
* Fire an event if userData is provide.
|
|
13190
|
+
/**
|
|
13191
|
+
* Open a new link if link is provide.
|
|
13192
|
+
* Fire an event if userData is provide.
|
|
13184
13193
|
*/
|
|
13185
13194
|
cardClicked: function cardClicked() {
|
|
13186
13195
|
if (this.data.link) {
|
|
@@ -13197,32 +13206,35 @@ function isValidHttpUrl(string) {
|
|
|
13197
13206
|
}
|
|
13198
13207
|
},
|
|
13199
13208
|
|
|
13200
|
-
/**
|
|
13201
|
-
* handle thumbnail downloading,, it will use a default svg image if fails
|
|
13209
|
+
/**
|
|
13210
|
+
* handle thumbnail downloading,, it will use a default svg image if fails
|
|
13202
13211
|
*/
|
|
13203
13212
|
downloadThumbnail: function downloadThumbnail(url, info) {
|
|
13204
|
-
var
|
|
13213
|
+
var _this3 = this;
|
|
13205
13214
|
|
|
13206
13215
|
this.getRequest(url, {}, 11000).then(function (response) {
|
|
13207
13216
|
var data = response.data;
|
|
13208
13217
|
|
|
13209
13218
|
if (data.startsWith('data:')) {
|
|
13210
|
-
|
|
13219
|
+
_this3.thumbnail = response.data;
|
|
13211
13220
|
} else {
|
|
13212
|
-
if (
|
|
13213
|
-
|
|
13221
|
+
if (_this3.data.mimetype) {
|
|
13222
|
+
_this3.thumbnail = "data:".concat(_this3.data.mimetype, ";base64,").concat(response.data);
|
|
13214
13223
|
} else {
|
|
13215
|
-
|
|
13224
|
+
_this3.thumbnail = response.data;
|
|
13216
13225
|
}
|
|
13217
13226
|
}
|
|
13218
13227
|
}, function (reason) {
|
|
13219
13228
|
if (reason.message.includes('timeout') && reason.message.includes('exceeded') && info.fetchAttempts < 3) {
|
|
13220
13229
|
info.fetchAttempts += 1;
|
|
13221
13230
|
|
|
13222
|
-
|
|
13231
|
+
_this3.downloadThumbnail(url, info);
|
|
13223
13232
|
} else {
|
|
13224
|
-
|
|
13233
|
+
_this3.useDefaultImg = true;
|
|
13225
13234
|
}
|
|
13235
|
+
}).catch(function (error) {
|
|
13236
|
+
console.error(error);
|
|
13237
|
+
_this3.useDefaultImg = true;
|
|
13226
13238
|
});
|
|
13227
13239
|
},
|
|
13228
13240
|
//dynamically calculate if tooltip is required
|
|
@@ -13242,21 +13254,12 @@ function isValidHttpUrl(string) {
|
|
|
13242
13254
|
}
|
|
13243
13255
|
}
|
|
13244
13256
|
}
|
|
13245
|
-
},
|
|
13246
|
-
updated: function updated() {
|
|
13247
|
-
var _this3 = this;
|
|
13248
|
-
|
|
13249
|
-
if (!this.tooltipCalculated) {
|
|
13250
|
-
this.$nextTick(function () {
|
|
13251
|
-
_this3.calculateShowTooltip();
|
|
13252
|
-
});
|
|
13253
|
-
}
|
|
13254
13257
|
}
|
|
13255
13258
|
});
|
|
13256
13259
|
// CONCATENATED MODULE: ./src/components/Card.vue?vue&type=script&lang=js&
|
|
13257
13260
|
/* harmony default export */ var components_Cardvue_type_script_lang_js_ = (Cardvue_type_script_lang_js_);
|
|
13258
|
-
// EXTERNAL MODULE: ./src/components/Card.vue?vue&type=style&index=0&id=
|
|
13259
|
-
var
|
|
13261
|
+
// EXTERNAL MODULE: ./src/components/Card.vue?vue&type=style&index=0&id=3bfc85a8&scoped=true&lang=css&
|
|
13262
|
+
var Cardvue_type_style_index_0_id_3bfc85a8_scoped_true_lang_css_ = __webpack_require__("3587");
|
|
13260
13263
|
|
|
13261
13264
|
// EXTERNAL MODULE: ./src/components/Card.vue?vue&type=style&index=1&lang=css&
|
|
13262
13265
|
var Cardvue_type_style_index_1_lang_css_ = __webpack_require__("529c");
|
|
@@ -13273,11 +13276,11 @@ var Cardvue_type_style_index_1_lang_css_ = __webpack_require__("529c");
|
|
|
13273
13276
|
|
|
13274
13277
|
var Card_component = normalizeComponent(
|
|
13275
13278
|
components_Cardvue_type_script_lang_js_,
|
|
13276
|
-
|
|
13277
|
-
|
|
13279
|
+
Cardvue_type_template_id_3bfc85a8_scoped_true_render,
|
|
13280
|
+
Cardvue_type_template_id_3bfc85a8_scoped_true_staticRenderFns,
|
|
13278
13281
|
false,
|
|
13279
13282
|
null,
|
|
13280
|
-
"
|
|
13283
|
+
"3bfc85a8",
|
|
13281
13284
|
null
|
|
13282
13285
|
|
|
13283
13286
|
)
|