@abi-software/map-side-bar 1.1.5-beta-0 → 1.1.5-beta-1
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/README.md +11 -2
- package/dist/map-side-bar.common.js +607 -318
- package/dist/map-side-bar.common.js.map +1 -1
- package/dist/map-side-bar.css +1 -1
- package/dist/map-side-bar.umd.js +607 -318
- package/dist/map-side-bar.umd.js.map +1 -1
- package/dist/map-side-bar.umd.min.js +1 -1
- package/dist/map-side-bar.umd.min.js.map +1 -1
- package/package-lock.json +384 -146
- package/package.json +3 -1
- package/src/App.vue +13 -10
- package/src/algolia/algolia.js +98 -0
- package/src/algolia/utils.js +52 -0
- package/src/components/DatasetCard.vue +25 -14
- package/src/components/SearchFilters.vue +137 -128
- package/src/components/SideBar.vue +11 -6
- package/src/components/SidebarContent.vue +58 -70
package/dist/map-side-bar.umd.js
CHANGED
|
@@ -138,6 +138,13 @@ module.exports = require("element-ui/lib/theme-chalk/select.css");
|
|
|
138
138
|
|
|
139
139
|
/***/ }),
|
|
140
140
|
|
|
141
|
+
/***/ "12bc":
|
|
142
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
143
|
+
|
|
144
|
+
// extracted by mini-css-extract-plugin
|
|
145
|
+
|
|
146
|
+
/***/ }),
|
|
147
|
+
|
|
141
148
|
/***/ "139f":
|
|
142
149
|
/***/ (function(module, exports) {
|
|
143
150
|
|
|
@@ -293,18 +300,7 @@ module.exports = require("core-js/modules/es.regexp.exec");
|
|
|
293
300
|
|
|
294
301
|
/***/ }),
|
|
295
302
|
|
|
296
|
-
/***/ "
|
|
297
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
298
|
-
|
|
299
|
-
"use strict";
|
|
300
|
-
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_vue_cli_service_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_DatasetCard_vue_vue_type_style_index_0_id_7989efa8_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("5b3d");
|
|
301
|
-
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_vue_cli_service_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_DatasetCard_vue_vue_type_style_index_0_id_7989efa8_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_vue_cli_service_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_DatasetCard_vue_vue_type_style_index_0_id_7989efa8_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__);
|
|
302
|
-
/* unused harmony reexport * */
|
|
303
|
-
/* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_vue_cli_service_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_DatasetCard_vue_vue_type_style_index_0_id_7989efa8_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a);
|
|
304
|
-
|
|
305
|
-
/***/ }),
|
|
306
|
-
|
|
307
|
-
/***/ "5b3d":
|
|
303
|
+
/***/ "5835":
|
|
308
304
|
/***/ (function(module, exports, __webpack_require__) {
|
|
309
305
|
|
|
310
306
|
// extracted by mini-css-extract-plugin
|
|
@@ -332,17 +328,6 @@ module.exports = require("core-js/modules/es.symbol");
|
|
|
332
328
|
|
|
333
329
|
/***/ }),
|
|
334
330
|
|
|
335
|
-
/***/ "625c":
|
|
336
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
337
|
-
|
|
338
|
-
"use strict";
|
|
339
|
-
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_vue_cli_service_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_SideBar_vue_vue_type_style_index_0_id_a53cebae_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("a2e0");
|
|
340
|
-
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_vue_cli_service_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_SideBar_vue_vue_type_style_index_0_id_a53cebae_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_vue_cli_service_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_SideBar_vue_vue_type_style_index_0_id_a53cebae_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__);
|
|
341
|
-
/* unused harmony reexport * */
|
|
342
|
-
/* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_vue_cli_service_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_SideBar_vue_vue_type_style_index_0_id_a53cebae_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a);
|
|
343
|
-
|
|
344
|
-
/***/ }),
|
|
345
|
-
|
|
346
331
|
/***/ "6579":
|
|
347
332
|
/***/ (function(module, exports) {
|
|
348
333
|
|
|
@@ -399,7 +384,7 @@ module.exports = require("core-js/modules/es.number.constructor");
|
|
|
399
384
|
|
|
400
385
|
/***/ }),
|
|
401
386
|
|
|
402
|
-
/***/ "
|
|
387
|
+
/***/ "7919":
|
|
403
388
|
/***/ (function(module, exports, __webpack_require__) {
|
|
404
389
|
|
|
405
390
|
// extracted by mini-css-extract-plugin
|
|
@@ -455,6 +440,13 @@ module.exports = require("core-js/modules/es.object.to-string");
|
|
|
455
440
|
|
|
456
441
|
/***/ }),
|
|
457
442
|
|
|
443
|
+
/***/ "88eb":
|
|
444
|
+
/***/ (function(module, exports) {
|
|
445
|
+
|
|
446
|
+
module.exports = require("algoliasearch");
|
|
447
|
+
|
|
448
|
+
/***/ }),
|
|
449
|
+
|
|
458
450
|
/***/ "8bbf":
|
|
459
451
|
/***/ (function(module, exports) {
|
|
460
452
|
|
|
@@ -483,6 +475,13 @@ module.exports = require("core-js/modules/es.string.iterator");
|
|
|
483
475
|
|
|
484
476
|
/***/ }),
|
|
485
477
|
|
|
478
|
+
/***/ "9861":
|
|
479
|
+
/***/ (function(module, exports) {
|
|
480
|
+
|
|
481
|
+
module.exports = require("core-js/modules/es.map");
|
|
482
|
+
|
|
483
|
+
/***/ }),
|
|
484
|
+
|
|
486
485
|
/***/ "9a25":
|
|
487
486
|
/***/ (function(module, exports) {
|
|
488
487
|
|
|
@@ -490,17 +489,17 @@ module.exports = require("element-ui/lib/theme-chalk/base.css");
|
|
|
490
489
|
|
|
491
490
|
/***/ }),
|
|
492
491
|
|
|
493
|
-
/***/ "
|
|
494
|
-
/***/ (function(module, exports
|
|
492
|
+
/***/ "9a3c":
|
|
493
|
+
/***/ (function(module, exports) {
|
|
495
494
|
|
|
496
|
-
module.exports =
|
|
495
|
+
module.exports = require("core-js/modules/es.array.flat");
|
|
497
496
|
|
|
498
497
|
/***/ }),
|
|
499
498
|
|
|
500
|
-
/***/ "
|
|
499
|
+
/***/ "9b53":
|
|
501
500
|
/***/ (function(module, exports, __webpack_require__) {
|
|
502
501
|
|
|
503
|
-
|
|
502
|
+
module.exports = __webpack_require__.p + "img/missing-image.1878d8b8.svg";
|
|
504
503
|
|
|
505
504
|
/***/ }),
|
|
506
505
|
|
|
@@ -539,6 +538,17 @@ module.exports = require("element-ui/lib/icon");
|
|
|
539
538
|
|
|
540
539
|
/***/ }),
|
|
541
540
|
|
|
541
|
+
/***/ "bc5f":
|
|
542
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
543
|
+
|
|
544
|
+
"use strict";
|
|
545
|
+
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_vue_cli_service_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_SideBar_vue_vue_type_style_index_0_id_3d831a8e_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("5835");
|
|
546
|
+
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_vue_cli_service_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_SideBar_vue_vue_type_style_index_0_id_3d831a8e_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_vue_cli_service_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_SideBar_vue_vue_type_style_index_0_id_3d831a8e_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__);
|
|
547
|
+
/* unused harmony reexport * */
|
|
548
|
+
/* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_vue_cli_service_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_SideBar_vue_vue_type_style_index_0_id_3d831a8e_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a);
|
|
549
|
+
|
|
550
|
+
/***/ }),
|
|
551
|
+
|
|
542
552
|
/***/ "bcd8":
|
|
543
553
|
/***/ (function(module, exports) {
|
|
544
554
|
|
|
@@ -553,6 +563,24 @@ module.exports = require("core-js/modules/web.dom-collections.for-each");
|
|
|
553
563
|
|
|
554
564
|
/***/ }),
|
|
555
565
|
|
|
566
|
+
/***/ "be47":
|
|
567
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
568
|
+
|
|
569
|
+
"use strict";
|
|
570
|
+
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_vue_cli_service_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_SidebarContent_vue_vue_type_style_index_0_id_2e1db9a4_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("efa2");
|
|
571
|
+
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_vue_cli_service_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_SidebarContent_vue_vue_type_style_index_0_id_2e1db9a4_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_vue_cli_service_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_SidebarContent_vue_vue_type_style_index_0_id_2e1db9a4_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__);
|
|
572
|
+
/* unused harmony reexport * */
|
|
573
|
+
/* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_vue_cli_service_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_SidebarContent_vue_vue_type_style_index_0_id_2e1db9a4_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a);
|
|
574
|
+
|
|
575
|
+
/***/ }),
|
|
576
|
+
|
|
577
|
+
/***/ "be6e":
|
|
578
|
+
/***/ (function(module, exports) {
|
|
579
|
+
|
|
580
|
+
module.exports = require("core-js/modules/es.string.search");
|
|
581
|
+
|
|
582
|
+
/***/ }),
|
|
583
|
+
|
|
556
584
|
/***/ "bfab":
|
|
557
585
|
/***/ (function(module, exports) {
|
|
558
586
|
|
|
@@ -567,25 +595,21 @@ module.exports = require("element-ui/lib/option");
|
|
|
567
595
|
|
|
568
596
|
/***/ }),
|
|
569
597
|
|
|
570
|
-
/***/ "
|
|
598
|
+
/***/ "c3dd":
|
|
571
599
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
572
600
|
|
|
573
601
|
"use strict";
|
|
574
|
-
/* harmony import */ var
|
|
575
|
-
/* harmony import */ var
|
|
602
|
+
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_vue_cli_service_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_DatasetCard_vue_vue_type_style_index_0_id_eaeba60a_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("7919");
|
|
603
|
+
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_vue_cli_service_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_DatasetCard_vue_vue_type_style_index_0_id_eaeba60a_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_vue_cli_service_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_DatasetCard_vue_vue_type_style_index_0_id_eaeba60a_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__);
|
|
576
604
|
/* unused harmony reexport * */
|
|
577
|
-
/* unused harmony default export */ var _unused_webpack_default_export = (
|
|
605
|
+
/* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_vue_cli_service_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_DatasetCard_vue_vue_type_style_index_0_id_eaeba60a_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a);
|
|
578
606
|
|
|
579
607
|
/***/ }),
|
|
580
608
|
|
|
581
|
-
/***/ "
|
|
582
|
-
/***/ (function(module,
|
|
609
|
+
/***/ "dc05":
|
|
610
|
+
/***/ (function(module, exports) {
|
|
583
611
|
|
|
584
|
-
|
|
585
|
-
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_vue_cli_service_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_SearchFilters_vue_vue_type_style_index_0_id_cf619ba6_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("7851");
|
|
586
|
-
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_vue_cli_service_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_SearchFilters_vue_vue_type_style_index_0_id_cf619ba6_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_vue_cli_service_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_SearchFilters_vue_vue_type_style_index_0_id_cf619ba6_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__);
|
|
587
|
-
/* unused harmony reexport * */
|
|
588
|
-
/* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_vue_cli_service_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_SearchFilters_vue_vue_type_style_index_0_id_cf619ba6_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a);
|
|
612
|
+
module.exports = require("core-js/modules/es.array.last-index-of");
|
|
589
613
|
|
|
590
614
|
/***/ }),
|
|
591
615
|
|
|
@@ -596,6 +620,17 @@ module.exports = require("current-script-polyfill");
|
|
|
596
620
|
|
|
597
621
|
/***/ }),
|
|
598
622
|
|
|
623
|
+
/***/ "e026":
|
|
624
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
625
|
+
|
|
626
|
+
"use strict";
|
|
627
|
+
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_vue_cli_service_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_SearchFilters_vue_vue_type_style_index_0_id_d4e05720_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("12bc");
|
|
628
|
+
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_vue_cli_service_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_SearchFilters_vue_vue_type_style_index_0_id_d4e05720_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_vue_cli_service_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_SearchFilters_vue_vue_type_style_index_0_id_d4e05720_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__);
|
|
629
|
+
/* unused harmony reexport * */
|
|
630
|
+
/* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_vue_cli_service_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_SearchFilters_vue_vue_type_style_index_0_id_d4e05720_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a);
|
|
631
|
+
|
|
632
|
+
/***/ }),
|
|
633
|
+
|
|
599
634
|
/***/ "e42b":
|
|
600
635
|
/***/ (function(module, exports) {
|
|
601
636
|
|
|
@@ -617,6 +652,20 @@ module.exports = require("core-js/modules/es.object.entries");
|
|
|
617
652
|
|
|
618
653
|
/***/ }),
|
|
619
654
|
|
|
655
|
+
/***/ "ee85":
|
|
656
|
+
/***/ (function(module, exports) {
|
|
657
|
+
|
|
658
|
+
module.exports = require("core-js/modules/es.array.unscopables.flat");
|
|
659
|
+
|
|
660
|
+
/***/ }),
|
|
661
|
+
|
|
662
|
+
/***/ "efa2":
|
|
663
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
664
|
+
|
|
665
|
+
// extracted by mini-css-extract-plugin
|
|
666
|
+
|
|
667
|
+
/***/ }),
|
|
668
|
+
|
|
620
669
|
/***/ "f705":
|
|
621
670
|
/***/ (function(module, exports) {
|
|
622
671
|
|
|
@@ -624,6 +673,13 @@ module.exports = require("core-js/modules/es.array.map");
|
|
|
624
673
|
|
|
625
674
|
/***/ }),
|
|
626
675
|
|
|
676
|
+
/***/ "f96d":
|
|
677
|
+
/***/ (function(module, exports) {
|
|
678
|
+
|
|
679
|
+
module.exports = require("core-js/modules/es.promise.finally");
|
|
680
|
+
|
|
681
|
+
/***/ }),
|
|
682
|
+
|
|
627
683
|
/***/ "fae3":
|
|
628
684
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
629
685
|
|
|
@@ -651,12 +707,12 @@ if (typeof window !== 'undefined') {
|
|
|
651
707
|
// Indicate to webpack that this file can be concatenated
|
|
652
708
|
/* harmony default export */ var setPublicPath = (null);
|
|
653
709
|
|
|
654
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
655
|
-
var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{ref:"container"},[(!_vm.drawerOpen)?_c('div',{staticClass:"open-tab",on:{"click":_vm.toggleDrawer}},[_c('i',{staticClass:"el-icon-arrow-left"})]):_vm._e(),_c('el-drawer',{staticClass:"side-bar",attrs:{"custom-class":"my-drawer","visible":_vm.drawerOpen,"appendToBody":false,"modal-append-to-body":false,"size":"550","with-header":false,"wrapperClosable":false,"modal":false},on:{"update:visible":function($event){_vm.drawerOpen=$event}}},[_c('div',{staticClass:"box-card"},[(_vm.drawerOpen)?_c('div',{staticClass:"close-tab",on:{"click":_vm.close}},[_c('i',{staticClass:"el-icon-arrow-right"})]):_vm._e(),_c('div',{staticClass:"sidebar-container"},[(_vm.tabs.length > 1)?_c('tabs',{attrs:{"tabTitles":_vm.tabs,"activeId":_vm.activeId},on:{"titleClicked":_vm.tabClicked}}):_vm._e(),_vm._l((_vm.tabs),function(tab){return [_c('sidebar-content',{directives:[{name:"show",rawName:"v-show",value:(tab.id===_vm.activeId),expression:"tab.id===activeId"}],key:tab.id,ref:tab.id,refInFor:true,staticClass:"sidebar-content-container",attrs:{"contextCardEntry":tab.contextCard,"
|
|
710
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"52eab1bf-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!./src/components/SideBar.vue?vue&type=template&id=3d831a8e&scoped=true&
|
|
711
|
+
var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{ref:"container"},[(!_vm.drawerOpen)?_c('div',{staticClass:"open-tab",on:{"click":_vm.toggleDrawer}},[_c('i',{staticClass:"el-icon-arrow-left"})]):_vm._e(),_c('el-drawer',{staticClass:"side-bar",attrs:{"custom-class":"my-drawer","visible":_vm.drawerOpen,"appendToBody":false,"modal-append-to-body":false,"size":"550","with-header":false,"wrapperClosable":false,"modal":false},on:{"update:visible":function($event){_vm.drawerOpen=$event}}},[_c('div',{staticClass:"box-card"},[(_vm.drawerOpen)?_c('div',{staticClass:"close-tab",on:{"click":_vm.close}},[_c('i',{staticClass:"el-icon-arrow-right"})]):_vm._e(),_c('div',{staticClass:"sidebar-container"},[(_vm.tabs.length > 1)?_c('tabs',{attrs:{"tabTitles":_vm.tabs,"activeId":_vm.activeId},on:{"titleClicked":_vm.tabClicked}}):_vm._e(),_vm._l((_vm.tabs),function(tab){return [_c('sidebar-content',{directives:[{name:"show",rawName:"v-show",value:(tab.id===_vm.activeId),expression:"tab.id===activeId"}],key:tab.id,ref:tab.id,refInFor:true,staticClass:"sidebar-content-container",attrs:{"contextCardEntry":tab.contextCard,"envVars":_vm.envVars},on:{"search-changed":function($event){return _vm.searchChanged(tab.id, $event)}}})]})],2)])])],1)}
|
|
656
712
|
var staticRenderFns = []
|
|
657
713
|
|
|
658
714
|
|
|
659
|
-
// CONCATENATED MODULE: ./src/components/SideBar.vue?vue&type=template&id=
|
|
715
|
+
// CONCATENATED MODULE: ./src/components/SideBar.vue?vue&type=template&id=3d831a8e&scoped=true&
|
|
660
716
|
|
|
661
717
|
// EXTERNAL MODULE: external "core-js/modules/es.symbol"
|
|
662
718
|
var es_symbol_ = __webpack_require__("6049");
|
|
@@ -726,12 +782,12 @@ var en_default = /*#__PURE__*/__webpack_require__.n(en_);
|
|
|
726
782
|
var locale_ = __webpack_require__("7f9f");
|
|
727
783
|
var locale_default = /*#__PURE__*/__webpack_require__.n(locale_);
|
|
728
784
|
|
|
729
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
730
|
-
var
|
|
731
|
-
var
|
|
785
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"52eab1bf-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!./src/components/SidebarContent.vue?vue&type=template&id=2e1db9a4&scoped=true&
|
|
786
|
+
var SidebarContentvue_type_template_id_2e1db9a4_scoped_true_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('el-card',{staticClass:"content-card",attrs:{"body-style":_vm.bodyStyle}},[_c('div',{staticClass:"header",attrs:{"slot":"header"},slot:"header"},[(_vm.contextCardEntry)?_c('context-card',{attrs:{"entry":_vm.contextCardEntry}}):_vm._e(),_c('el-input',{staticClass:"search-input",attrs:{"placeholder":"Search","clearable":""},on:{"clear":_vm.clearSearchClicked},nativeOn:{"keyup":function($event){return _vm.searchEvent($event)}},model:{value:(_vm.searchInput),callback:function ($$v) {_vm.searchInput=$$v},expression:"searchInput"}}),_c('el-button',{staticClass:"button",on:{"click":_vm.searchEvent}},[_vm._v("Search")])],1),_c('SearchFilters',{ref:"filtersRef",staticClass:"filters",attrs:{"entry":_vm.filterEntry,"envVars":_vm.envVars},on:{"filterResults":_vm.filterUpdate,"numberPerPage":_vm.numberPerPageUpdate,"loading":_vm.filtersLoading}}),_c('div',{directives:[{name:"loading",rawName:"v-loading",value:(_vm.loadingCards),expression:"loadingCards"}],ref:"content",staticClass:"content scrollbar"},[(_vm.results.length === 0 && !_vm.loadingCards && !_vm.sciCrunchError)?_c('div',{staticClass:"error-feedback"},[_vm._v("No results found - Please change your search / filter criteria.")]):_vm._e(),(_vm.sciCrunchError)?_c('div',{staticClass:"error-feedback"},[_vm._v(_vm._s(_vm.sciCrunchError))]):_vm._e(),_vm._l((_vm.results),function(o){return _c('div',{key:o.id,staticClass:"step-item"},[_c('DatasetCard',{attrs:{"entry":o,"envVars":_vm.envVars}})],1)}),_c('el-pagination',{staticClass:"pagination",attrs:{"current-page":_vm.page,"hide-on-single-page":"","large":"","layout":"prev, pager, next","page-size":_vm.numberPerPage,"total":_vm.numberOfHits},on:{"update:currentPage":function($event){_vm.page=$event},"update:current-page":function($event){_vm.page=$event},"current-change":_vm.pageChange}})],2)],1)}
|
|
787
|
+
var SidebarContentvue_type_template_id_2e1db9a4_scoped_true_staticRenderFns = []
|
|
732
788
|
|
|
733
789
|
|
|
734
|
-
// CONCATENATED MODULE: ./src/components/SidebarContent.vue?vue&type=template&id=
|
|
790
|
+
// CONCATENATED MODULE: ./src/components/SidebarContent.vue?vue&type=template&id=2e1db9a4&scoped=true&
|
|
735
791
|
|
|
736
792
|
// EXTERNAL MODULE: external "core-js/modules/es.symbol.description"
|
|
737
793
|
var es_symbol_description_ = __webpack_require__("51e9");
|
|
@@ -745,12 +801,12 @@ var es_array_map_ = __webpack_require__("f705");
|
|
|
745
801
|
// EXTERNAL MODULE: external "core-js/modules/es.function.name"
|
|
746
802
|
var es_function_name_ = __webpack_require__("bcd8");
|
|
747
803
|
|
|
748
|
-
// EXTERNAL MODULE: external "core-js/modules/es.object.entries"
|
|
749
|
-
var es_object_entries_ = __webpack_require__("ece9");
|
|
750
|
-
|
|
751
804
|
// EXTERNAL MODULE: external "core-js/modules/es.object.to-string"
|
|
752
805
|
var es_object_to_string_ = __webpack_require__("850c");
|
|
753
806
|
|
|
807
|
+
// EXTERNAL MODULE: external "core-js/modules/es.parse-int"
|
|
808
|
+
var es_parse_int_ = __webpack_require__("0b28");
|
|
809
|
+
|
|
754
810
|
// EXTERNAL MODULE: external "core-js/modules/es.promise"
|
|
755
811
|
var es_promise_ = __webpack_require__("8495");
|
|
756
812
|
|
|
@@ -766,6 +822,9 @@ var es_set_ = __webpack_require__("47ff");
|
|
|
766
822
|
// EXTERNAL MODULE: external "core-js/modules/es.string.iterator"
|
|
767
823
|
var es_string_iterator_ = __webpack_require__("907b");
|
|
768
824
|
|
|
825
|
+
// EXTERNAL MODULE: external "core-js/modules/es.string.search"
|
|
826
|
+
var es_string_search_ = __webpack_require__("be6e");
|
|
827
|
+
|
|
769
828
|
// EXTERNAL MODULE: external "core-js/modules/es.string.split"
|
|
770
829
|
var es_string_split_ = __webpack_require__("46fa");
|
|
771
830
|
|
|
@@ -892,12 +951,12 @@ var button_css_ = __webpack_require__("26bc");
|
|
|
892
951
|
var button_ = __webpack_require__("5d8c");
|
|
893
952
|
var button_default = /*#__PURE__*/__webpack_require__.n(button_);
|
|
894
953
|
|
|
895
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
896
|
-
var
|
|
897
|
-
var
|
|
954
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"52eab1bf-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!./src/components/SearchFilters.vue?vue&type=template&id=d4e05720&scoped=true&
|
|
955
|
+
var SearchFiltersvue_type_template_id_d4e05720_scoped_true_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"filters"},[_c('SvgSpriteColor'),_c('transition',{attrs:{"name":"el-zoom-in-top"}},[_c('span',{directives:[{name:"show",rawName:"v-show",value:(_vm.showFilters),expression:"showFilters"}],staticClass:"search-filters transition-box"},[_c('custom-cascader',{ref:"cascader",staticClass:"cascader",attrs:{"placeholder":"","collapse-tags":true,"options":_vm.options,"props":_vm.props,"show-all-levels":false,"append-to-body":false},on:{"change":function($event){return _vm.cascadeEvent($event)},"expand-change":_vm.cascadeExpandChange,"tags-changed":_vm.tagsChangedCallback},model:{value:(_vm.cascadeSelected),callback:function ($$v) {_vm.cascadeSelected=$$v},expression:"cascadeSelected"}}),(_vm.showFiltersText)?_c('div',{staticClass:"filter-default-value"},[_c('svg-icon',{staticClass:"filter-icon-inside",attrs:{"icon":"noun-filter"}}),_vm._v("Apply Filters ")],1):_vm._e()],1)]),_c('el-select',{staticClass:"number-shown-select",attrs:{"placeholder":"10"},on:{"change":function($event){return _vm.numberShownChanged($event)}},model:{value:(_vm.numberShown),callback:function ($$v) {_vm.numberShown=$$v},expression:"numberShown"}},_vm._l((_vm.numberDatasetsShown),function(item){return _c('el-option',{key:item,attrs:{"label":item,"value":item}})}),1),_c('span',{staticClass:"dataset-results-feedback"},[_vm._v(_vm._s(this.numberOfResultsText))])],1)}
|
|
956
|
+
var SearchFiltersvue_type_template_id_d4e05720_scoped_true_staticRenderFns = []
|
|
898
957
|
|
|
899
958
|
|
|
900
|
-
// CONCATENATED MODULE: ./src/components/SearchFilters.vue?vue&type=template&id=
|
|
959
|
+
// CONCATENATED MODULE: ./src/components/SearchFilters.vue?vue&type=template&id=d4e05720&scoped=true&
|
|
901
960
|
|
|
902
961
|
// EXTERNAL MODULE: external "core-js/modules/es.array.includes"
|
|
903
962
|
var es_array_includes_ = __webpack_require__("ab7e");
|
|
@@ -911,8 +970,8 @@ var es_array_sort_ = __webpack_require__("6ed7");
|
|
|
911
970
|
// EXTERNAL MODULE: external "core-js/modules/es.array.splice"
|
|
912
971
|
var es_array_splice_ = __webpack_require__("7c81");
|
|
913
972
|
|
|
914
|
-
// EXTERNAL MODULE: external "core-js/modules/es.
|
|
915
|
-
var
|
|
973
|
+
// EXTERNAL MODULE: external "core-js/modules/es.promise.finally"
|
|
974
|
+
var es_promise_finally_ = __webpack_require__("f96d");
|
|
916
975
|
|
|
917
976
|
// EXTERNAL MODULE: external "core-js/modules/es.string.includes"
|
|
918
977
|
var es_string_includes_ = __webpack_require__("fd48");
|
|
@@ -1152,10 +1211,259 @@ var component = normalizeComponent(
|
|
|
1152
1211
|
// EXTERNAL MODULE: external "@abi-software/svg-sprite"
|
|
1153
1212
|
var svg_sprite_ = __webpack_require__("429c");
|
|
1154
1213
|
|
|
1155
|
-
//
|
|
1214
|
+
// EXTERNAL MODULE: external "core-js/modules/es.array.concat"
|
|
1215
|
+
var es_array_concat_ = __webpack_require__("18d2");
|
|
1216
|
+
|
|
1217
|
+
// EXTERNAL MODULE: external "core-js/modules/es.array.flat"
|
|
1218
|
+
var es_array_flat_ = __webpack_require__("9a3c");
|
|
1219
|
+
|
|
1220
|
+
// EXTERNAL MODULE: external "core-js/modules/es.array.unscopables.flat"
|
|
1221
|
+
var es_array_unscopables_flat_ = __webpack_require__("ee85");
|
|
1222
|
+
|
|
1223
|
+
// EXTERNAL MODULE: external "core-js/modules/es.map"
|
|
1224
|
+
var es_map_ = __webpack_require__("9861");
|
|
1225
|
+
|
|
1226
|
+
// EXTERNAL MODULE: external "core-js/modules/es.object.entries"
|
|
1227
|
+
var es_object_entries_ = __webpack_require__("ece9");
|
|
1228
|
+
|
|
1229
|
+
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js
|
|
1230
|
+
function _classCallCheck(instance, Constructor) {
|
|
1231
|
+
if (!(instance instanceof Constructor)) {
|
|
1232
|
+
throw new TypeError("Cannot call a class as a function");
|
|
1233
|
+
}
|
|
1234
|
+
}
|
|
1235
|
+
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/createClass.js
|
|
1236
|
+
function _defineProperties(target, props) {
|
|
1237
|
+
for (var i = 0; i < props.length; i++) {
|
|
1238
|
+
var descriptor = props[i];
|
|
1239
|
+
descriptor.enumerable = descriptor.enumerable || false;
|
|
1240
|
+
descriptor.configurable = true;
|
|
1241
|
+
if ("value" in descriptor) descriptor.writable = true;
|
|
1242
|
+
Object.defineProperty(target, descriptor.key, descriptor);
|
|
1243
|
+
}
|
|
1244
|
+
}
|
|
1245
|
+
|
|
1246
|
+
function _createClass(Constructor, protoProps, staticProps) {
|
|
1247
|
+
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
1248
|
+
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
1249
|
+
return Constructor;
|
|
1250
|
+
}
|
|
1251
|
+
// EXTERNAL MODULE: external "algoliasearch"
|
|
1252
|
+
var external_algoliasearch_ = __webpack_require__("88eb");
|
|
1253
|
+
var external_algoliasearch_default = /*#__PURE__*/__webpack_require__.n(external_algoliasearch_);
|
|
1254
|
+
|
|
1255
|
+
// CONCATENATED MODULE: ./src/algolia/algolia.js
|
|
1256
|
+
|
|
1257
|
+
|
|
1258
|
+
|
|
1259
|
+
|
|
1260
|
+
|
|
1261
|
+
|
|
1262
|
+
|
|
1263
|
+
|
|
1264
|
+
|
|
1265
|
+
|
|
1266
|
+
|
|
1267
|
+
|
|
1268
|
+
|
|
1269
|
+
|
|
1270
|
+
|
|
1271
|
+
|
|
1272
|
+
|
|
1273
|
+
|
|
1274
|
+
/* eslint-disable no-alert, no-console */
|
|
1275
|
+
// export `createAlgoliaClient` to use it in page components
|
|
1276
|
+
|
|
1277
|
+
var algolia_AlgoliaClient =
|
|
1278
|
+
/*#__PURE__*/
|
|
1279
|
+
function () {
|
|
1280
|
+
function AlgoliaClient(algoliaId, algoliaKey) {
|
|
1281
|
+
var PENNSIEVE_API_LOCATION = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'https://api.pennsieve.io';
|
|
1282
|
+
|
|
1283
|
+
_classCallCheck(this, AlgoliaClient);
|
|
1284
|
+
|
|
1285
|
+
this.client = external_algoliasearch_default()(algoliaId, algoliaKey);
|
|
1286
|
+
this.PENNSIEVE_API_LOCATION = PENNSIEVE_API_LOCATION;
|
|
1287
|
+
}
|
|
1288
|
+
|
|
1289
|
+
_createClass(AlgoliaClient, [{
|
|
1290
|
+
key: "initIndex",
|
|
1291
|
+
value: function initIndex(ALGOLIA_INDEX) {
|
|
1292
|
+
this.index = this.client.initIndex(ALGOLIA_INDEX);
|
|
1293
|
+
}
|
|
1294
|
+
}, {
|
|
1295
|
+
key: "getAlgoliaFacets",
|
|
1296
|
+
value: function getAlgoliaFacets(propPathMapping) {
|
|
1297
|
+
var map = new Map(Object.entries(propPathMapping));
|
|
1298
|
+
var facetPropPaths = Array.from(map.keys());
|
|
1299
|
+
var facetData = [];
|
|
1300
|
+
var facetId = 0;
|
|
1301
|
+
return this.index.search('', {
|
|
1302
|
+
sortFacetValuesBy: 'alpha',
|
|
1303
|
+
facets: facetPropPaths
|
|
1304
|
+
}).then(function (response) {
|
|
1305
|
+
facetPropPaths.map(function (facetPropPath) {
|
|
1306
|
+
var children = [];
|
|
1307
|
+
var responseFacets = response.facets;
|
|
1308
|
+
|
|
1309
|
+
if (responseFacets === undefined) {
|
|
1310
|
+
return;
|
|
1311
|
+
}
|
|
1312
|
+
|
|
1313
|
+
var responseFacetChildren = responseFacets[facetPropPath] == undefined ? {} : responseFacets[facetPropPath];
|
|
1314
|
+
Object.keys(responseFacetChildren).map(function (facet) {
|
|
1315
|
+
children.push({
|
|
1316
|
+
label: facet,
|
|
1317
|
+
id: facetId++,
|
|
1318
|
+
facetPropPath: facetPropPath
|
|
1319
|
+
});
|
|
1320
|
+
});
|
|
1321
|
+
|
|
1322
|
+
if (children.length > 0) {
|
|
1323
|
+
facetData.push({
|
|
1324
|
+
label: map.get(facetPropPath),
|
|
1325
|
+
id: facetId++,
|
|
1326
|
+
children: children,
|
|
1327
|
+
key: facetPropPath
|
|
1328
|
+
});
|
|
1329
|
+
}
|
|
1330
|
+
});
|
|
1331
|
+
return facetData;
|
|
1332
|
+
});
|
|
1333
|
+
} // Returns all DOIs of all versions for a given discover dataset
|
|
1334
|
+
|
|
1335
|
+
}, {
|
|
1336
|
+
key: "_discoverAllDois",
|
|
1337
|
+
value: function _discoverAllDois(discoverId) {
|
|
1338
|
+
var PENNSIEVE_API_LOCATION = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'https://api.pennsieve.io';
|
|
1339
|
+
return new Promise(function (resolve) {
|
|
1340
|
+
fetch("".concat(PENNSIEVE_API_LOCATION, "/discover/datasets/").concat(discoverId, "/versions")).then(function (r) {
|
|
1341
|
+
return r.json();
|
|
1342
|
+
}).then(function (dataset) {
|
|
1343
|
+
resolve(dataset.map(function (version) {
|
|
1344
|
+
return version.doi;
|
|
1345
|
+
}));
|
|
1346
|
+
});
|
|
1347
|
+
});
|
|
1348
|
+
} // Get all dois given a list of discoverIds
|
|
1349
|
+
|
|
1350
|
+
}, {
|
|
1351
|
+
key: "_expandDois",
|
|
1352
|
+
value: function _expandDois(discoverIds) {
|
|
1353
|
+
var _this = this;
|
|
1354
|
+
|
|
1355
|
+
var PENNSIEVE_API_LOCATION = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'https://api.pennsieve.io';
|
|
1356
|
+
return new Promise(function (resolve) {
|
|
1357
|
+
var promiseList = discoverIds.map(function (discoverId) {
|
|
1358
|
+
return _this._discoverAllDois(discoverId, PENNSIEVE_API_LOCATION);
|
|
1359
|
+
});
|
|
1360
|
+
Promise.all(promiseList).then(function (values) {
|
|
1361
|
+
resolve(values.flat());
|
|
1362
|
+
});
|
|
1363
|
+
});
|
|
1364
|
+
}
|
|
1365
|
+
/**
|
|
1366
|
+
* Get Search results
|
|
1367
|
+
* This is using fetch from the Algolia API
|
|
1368
|
+
*/
|
|
1369
|
+
|
|
1370
|
+
}, {
|
|
1371
|
+
key: "search",
|
|
1372
|
+
value: function search(filter) {
|
|
1373
|
+
var _this2 = this;
|
|
1374
|
+
|
|
1375
|
+
var query = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
|
1376
|
+
var hitsperPage = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 10;
|
|
1377
|
+
var page = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1;
|
|
1378
|
+
return new Promise(function (resolve) {
|
|
1379
|
+
_this2.index.search(query, {
|
|
1380
|
+
facets: ['*'],
|
|
1381
|
+
hitsPerPage: hitsperPage,
|
|
1382
|
+
page: page - 1,
|
|
1383
|
+
filters: filter
|
|
1384
|
+
}).then(function (response) {
|
|
1385
|
+
var searchData = {
|
|
1386
|
+
items: response.hits,
|
|
1387
|
+
total: response.nbHits,
|
|
1388
|
+
discoverIds: response.hits.map(function (r) {
|
|
1389
|
+
return r.pennsieve.identifier;
|
|
1390
|
+
})
|
|
1391
|
+
};
|
|
1392
|
+
resolve(searchData);
|
|
1393
|
+
});
|
|
1394
|
+
});
|
|
1395
|
+
}
|
|
1396
|
+
}]);
|
|
1397
|
+
|
|
1398
|
+
return AlgoliaClient;
|
|
1399
|
+
}();
|
|
1400
|
+
// EXTERNAL MODULE: external "core-js/modules/es.array.last-index-of"
|
|
1401
|
+
var es_array_last_index_of_ = __webpack_require__("dc05");
|
|
1402
|
+
|
|
1403
|
+
// CONCATENATED MODULE: ./src/algolia/utils.js
|
|
1404
|
+
|
|
1405
|
+
|
|
1406
|
+
|
|
1407
|
+
|
|
1408
|
+
|
|
1409
|
+
|
|
1410
|
+
|
|
1411
|
+
|
|
1412
|
+
/* eslint-disable no-alert, no-console */
|
|
1413
|
+
// Mapping between display categories and their Algolia index property path
|
|
1414
|
+
// Used for populating the Dataset Search Results facet menu dynamically
|
|
1415
|
+
var facetPropPathMapping = {
|
|
1416
|
+
'anatomy.organ.name': 'Anatomical Structure',
|
|
1417
|
+
'organisms.primary.species.name': 'Species',
|
|
1418
|
+
'item.modalities.keyword': 'Experimental Approach',
|
|
1419
|
+
'attributes.subject.sex.value': 'Sex',
|
|
1420
|
+
'attributes.subject.ageCategory.value': 'Age Categories'
|
|
1421
|
+
};
|
|
1422
|
+
/* Returns filter for searching algolia. All facets of the same category are joined with OR,
|
|
1423
|
+
* and each of those results is then joined with an AND.
|
|
1424
|
+
* i.e. (color:blue OR color:red) AND (shape:circle OR shape:red) */
|
|
1425
|
+
|
|
1426
|
+
function getFilters() {
|
|
1427
|
+
var selectedFacetArray = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined;
|
|
1428
|
+
|
|
1429
|
+
// return all datasets if no filter
|
|
1430
|
+
if (selectedFacetArray === undefined) {
|
|
1431
|
+
return 'NOT item.published.status:embargo';
|
|
1432
|
+
} // Switch the 'term' attribute to 'label' if 'label' does not exist
|
|
1433
|
+
|
|
1434
|
+
|
|
1435
|
+
selectedFacetArray.forEach(function (f) {
|
|
1436
|
+
return f.label = f.facet;
|
|
1437
|
+
});
|
|
1438
|
+
var facets = removeShowAllFacets(selectedFacetArray);
|
|
1439
|
+
var filters = "NOT item.published.status:embargo";
|
|
1440
|
+
filters = "(".concat(filters, ") AND ");
|
|
1441
|
+
var facetPropPaths = Object.keys(facetPropPathMapping);
|
|
1442
|
+
facetPropPaths.map(function (facetPropPath) {
|
|
1443
|
+
var facetsToOr = facets.filter(function (facet) {
|
|
1444
|
+
return facet.facetPropPath == facetPropPath;
|
|
1445
|
+
});
|
|
1446
|
+
var filter = "";
|
|
1447
|
+
facetsToOr.map(function (facet) {
|
|
1448
|
+
filter += "\"".concat(facetPropPath, "\":\"").concat(facet.label, "\" OR ");
|
|
1449
|
+
});
|
|
1156
1450
|
|
|
1451
|
+
if (filter == "") {
|
|
1452
|
+
return;
|
|
1453
|
+
}
|
|
1157
1454
|
|
|
1455
|
+
filter = "(".concat(filter.substring(0, filter.lastIndexOf(" OR ")), ")");
|
|
1456
|
+
filters += "".concat(filter, " AND ");
|
|
1457
|
+
});
|
|
1458
|
+
return filters.substring(0, filters.lastIndexOf(" AND "));
|
|
1459
|
+
}
|
|
1158
1460
|
|
|
1461
|
+
function removeShowAllFacets(facetArray) {
|
|
1462
|
+
return facetArray.filter(function (f) {
|
|
1463
|
+
return f.label !== 'Show all';
|
|
1464
|
+
});
|
|
1465
|
+
}
|
|
1466
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/SearchFilters.vue?vue&type=script&lang=js&
|
|
1159
1467
|
|
|
1160
1468
|
|
|
1161
1469
|
|
|
@@ -1177,6 +1485,13 @@ var svg_sprite_ = __webpack_require__("429c");
|
|
|
1177
1485
|
|
|
1178
1486
|
|
|
1179
1487
|
|
|
1488
|
+
|
|
1489
|
+
//
|
|
1490
|
+
//
|
|
1491
|
+
//
|
|
1492
|
+
//
|
|
1493
|
+
//
|
|
1494
|
+
//
|
|
1180
1495
|
//
|
|
1181
1496
|
//
|
|
1182
1497
|
//
|
|
@@ -1223,6 +1538,8 @@ var svg_sprite_ = __webpack_require__("429c");
|
|
|
1223
1538
|
|
|
1224
1539
|
|
|
1225
1540
|
|
|
1541
|
+
|
|
1542
|
+
|
|
1226
1543
|
external_vue_default.a.component("svg-icon", svg_sprite_["SvgIcon"]);
|
|
1227
1544
|
locale_default.a.use(en_default.a);
|
|
1228
1545
|
external_vue_default.a.use(option_default.a);
|
|
@@ -1254,9 +1571,9 @@ var SearchFiltersvue_type_script_lang_js_convertReadableLabel = function convert
|
|
|
1254
1571
|
* the required viewing.
|
|
1255
1572
|
*/
|
|
1256
1573
|
entry: Object,
|
|
1257
|
-
|
|
1258
|
-
type:
|
|
1259
|
-
default:
|
|
1574
|
+
envVars: {
|
|
1575
|
+
type: Object,
|
|
1576
|
+
default: function _default() {}
|
|
1260
1577
|
}
|
|
1261
1578
|
},
|
|
1262
1579
|
data: function data() {
|
|
@@ -1298,65 +1615,31 @@ var SearchFiltersvue_type_script_lang_js_convertReadableLabel = function convert
|
|
|
1298
1615
|
var _this = this;
|
|
1299
1616
|
|
|
1300
1617
|
return new Promise(function (resolve) {
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
_this.options.push({
|
|
1306
|
-
value: _this.createCascaderItemValue(_this.facets[i].toLowerCase(), undefined),
|
|
1307
|
-
label: SearchFiltersvue_type_script_lang_js_convertReadableLabel(_this.facets[i]),
|
|
1308
|
-
children: []
|
|
1309
|
-
});
|
|
1310
|
-
|
|
1311
|
-
promiseList.push(_this.getFacet(_this.facets[i]).then(function (labels) {
|
|
1312
|
-
// Populate children of each facet with scicrunch's facets
|
|
1313
|
-
for (var j in labels) {
|
|
1314
|
-
_this.options[i].children.push({
|
|
1315
|
-
value: _this.createCascaderItemValue(_this.facets[i].toLowerCase(), labels[j].toLowerCase()),
|
|
1316
|
-
label: SearchFiltersvue_type_script_lang_js_convertReadableLabel(labels[j]) // Capitalisation is to match design specs
|
|
1317
|
-
|
|
1318
|
-
});
|
|
1319
|
-
}
|
|
1320
|
-
}));
|
|
1321
|
-
};
|
|
1618
|
+
// Algolia facet serach
|
|
1619
|
+
_this.algoliaClient.getAlgoliaFacets(facetPropPathMapping).then(function (data) {
|
|
1620
|
+
_this.facets = data;
|
|
1621
|
+
_this.options = data; // create top level of options in cascader
|
|
1322
1622
|
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1623
|
+
_this.options.forEach(function (facet, i) {
|
|
1624
|
+
_this.options[i].label = SearchFiltersvue_type_script_lang_js_convertReadableLabel(facet.label);
|
|
1625
|
+
_this.options[i].value = _this.createCascaderItemValue(facet.key, undefined); // put "Show all" as first option
|
|
1326
1626
|
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
},
|
|
1332
|
-
getFacet: function getFacet(facetLabel) {
|
|
1333
|
-
var _this2 = this;
|
|
1627
|
+
_this.options[i].children.unshift({
|
|
1628
|
+
value: _this.createCascaderItemValue("Show all"),
|
|
1629
|
+
label: "Show all"
|
|
1630
|
+
}); // populate second level of options
|
|
1334
1631
|
|
|
1335
|
-
if (facetLabel === "Datasets") {
|
|
1336
|
-
// The datasets facet doesn't exist on SciCrunch yet, so manually set it
|
|
1337
|
-
// for now.
|
|
1338
|
-
return new Promise(function (resolve) {
|
|
1339
|
-
resolve(_toConsumableArray(new Set(["Show all", "Scaffolds", "Simulations"])));
|
|
1340
|
-
});
|
|
1341
|
-
}
|
|
1342
1632
|
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
_this2.callSciCrunch(_this2.apiLocation, _this2.facetEndpoint, facet).then(function (facet_terms) {
|
|
1349
|
-
facet_terms.forEach(function (element) {
|
|
1350
|
-
facets.push(element["key"]); // add facets that scicrunch includes
|
|
1633
|
+
_this.options[i].children.forEach(function (facetItem, j) {
|
|
1634
|
+
_this.options[i].children[j].label = SearchFiltersvue_type_script_lang_js_convertReadableLabel(facetItem.label);
|
|
1635
|
+
_this.options[i].children[j].value = _this.createCascaderItemValue(facet.label, facetItem.label);
|
|
1636
|
+
});
|
|
1351
1637
|
});
|
|
1352
|
-
|
|
1638
|
+
}).finally(function () {
|
|
1639
|
+
resolve();
|
|
1353
1640
|
});
|
|
1354
1641
|
});
|
|
1355
1642
|
},
|
|
1356
|
-
// switchTermToRequest is used to remove the count for sending a request to scicrunch
|
|
1357
|
-
switchTermToRequest: function switchTermToRequest(term) {
|
|
1358
|
-
return term.split(" ")[0].toLowerCase();
|
|
1359
|
-
},
|
|
1360
1643
|
tagsChangedCallback: function tagsChangedCallback(presentTags) {
|
|
1361
1644
|
if (presentTags.length > 0) {
|
|
1362
1645
|
this.showFiltersText = false;
|
|
@@ -1364,32 +1647,34 @@ var SearchFiltersvue_type_script_lang_js_convertReadableLabel = function convert
|
|
|
1364
1647
|
this.showFiltersText = true;
|
|
1365
1648
|
}
|
|
1366
1649
|
},
|
|
1650
|
+
// cascadeEvent: initiate searches based off cascader changes
|
|
1367
1651
|
cascadeEvent: function cascadeEvent(event) {
|
|
1368
|
-
var filters = [];
|
|
1369
|
-
|
|
1370
1652
|
if (event) {
|
|
1371
1653
|
// Check for show all in selected cascade options
|
|
1372
|
-
event = this.showAllEventModifier(event);
|
|
1654
|
+
event = this.showAllEventModifier(event); // Move results from arrays to object
|
|
1655
|
+
|
|
1656
|
+
var filters = event.filter(function (selection) {
|
|
1657
|
+
return selection !== undefined;
|
|
1658
|
+
}).map(function (fs) {
|
|
1659
|
+
return {
|
|
1660
|
+
facetPropPath: fs[0],
|
|
1661
|
+
facet: fs[1].split("/")[1],
|
|
1662
|
+
term: fs[1].split("/")[0]
|
|
1663
|
+
};
|
|
1664
|
+
});
|
|
1665
|
+
this.$emit('loading', true); // let sidebarcontent wait for the requests
|
|
1373
1666
|
|
|
1374
|
-
|
|
1375
|
-
if (event[i] !== undefined) {
|
|
1376
|
-
var value = event[i][1];
|
|
1377
|
-
var data = value.split("/");
|
|
1378
|
-
var output = {};
|
|
1379
|
-
output.term = this.switchTermToRequest(data[0]);
|
|
1380
|
-
output.facet = data[1];
|
|
1381
|
-
filters.push(output);
|
|
1382
|
-
}
|
|
1383
|
-
}
|
|
1384
|
-
}
|
|
1667
|
+
this.$emit("filterResults", filters); // emit filters for apps above sidebar
|
|
1385
1668
|
|
|
1386
|
-
|
|
1387
|
-
this.setCascader(filters); //update our cascader v-model if we modified the event
|
|
1669
|
+
this.setCascader(filters); //update our cascader v-model if we modified the event
|
|
1388
1670
|
|
|
1389
|
-
|
|
1671
|
+
this.makeCascadeLabelsClickable();
|
|
1672
|
+
}
|
|
1390
1673
|
},
|
|
1674
|
+
// showAllEventModifier: Modifies a cascade event to unlick all selections in category if "show all" is clicked. Also unchecks "Show all" if any secection is clicked
|
|
1675
|
+
// *NOTE* Does NOT remove 'Show all' selections from showing in 'cascadeSelected'
|
|
1391
1676
|
showAllEventModifier: function showAllEventModifier(event) {
|
|
1392
|
-
var
|
|
1677
|
+
var _this2 = this;
|
|
1393
1678
|
|
|
1394
1679
|
// check if show all is in the cascader checked option list
|
|
1395
1680
|
var hasShowAll = event.map(function (ev) {
|
|
@@ -1433,15 +1718,15 @@ var SearchFiltersvue_type_script_lang_js_convertReadableLabel = function convert
|
|
|
1433
1718
|
|
|
1434
1719
|
|
|
1435
1720
|
return modifiedEvent.sort(function (a, b) {
|
|
1436
|
-
if (
|
|
1437
|
-
if (a[0] ==
|
|
1438
|
-
if (b[0] ==
|
|
1721
|
+
if (_this2.__expandItem__) {
|
|
1722
|
+
if (a[0] == _this2.__expandItem__) {
|
|
1723
|
+
if (b[0] == _this2.__expandItem__) {
|
|
1439
1724
|
return 0;
|
|
1440
1725
|
} else {
|
|
1441
1726
|
return -1;
|
|
1442
1727
|
}
|
|
1443
|
-
} else if (b[0] ==
|
|
1444
|
-
if (a[0] ==
|
|
1728
|
+
} else if (b[0] == _this2.__expandItem__) {
|
|
1729
|
+
if (a[0] == _this2.__expandItem__) {
|
|
1445
1730
|
return 0;
|
|
1446
1731
|
} else {
|
|
1447
1732
|
return 1;
|
|
@@ -1463,17 +1748,8 @@ var SearchFiltersvue_type_script_lang_js_convertReadableLabel = function convert
|
|
|
1463
1748
|
numberShownChanged: function numberShownChanged(event) {
|
|
1464
1749
|
this.$emit("numberPerPage", parseInt(event));
|
|
1465
1750
|
},
|
|
1466
|
-
callSciCrunch: function callSciCrunch(apiLocation, endpoint, term) {
|
|
1467
|
-
return new Promise(function (resolve) {
|
|
1468
|
-
fetch(apiLocation + endpoint + term).then(function (response) {
|
|
1469
|
-
return response.json();
|
|
1470
|
-
}).then(function (data) {
|
|
1471
|
-
resolve(data);
|
|
1472
|
-
});
|
|
1473
|
-
});
|
|
1474
|
-
},
|
|
1475
1751
|
updatePreviousShowAllChecked: function updatePreviousShowAllChecked(options) {
|
|
1476
|
-
var
|
|
1752
|
+
var _this3 = this;
|
|
1477
1753
|
|
|
1478
1754
|
//Reset the states
|
|
1479
1755
|
for (var facet in this.previousShowAllChecked) {
|
|
@@ -1481,27 +1757,55 @@ var SearchFiltersvue_type_script_lang_js_convertReadableLabel = function convert
|
|
|
1481
1757
|
}
|
|
1482
1758
|
|
|
1483
1759
|
options.forEach(function (element) {
|
|
1484
|
-
if (element[1].toLowerCase().includes("show all"))
|
|
1760
|
+
if (element[1].toLowerCase().includes("show all")) _this3.previousShowAllChecked[element[0]] = true;
|
|
1485
1761
|
});
|
|
1486
1762
|
},
|
|
1763
|
+
// setCascader: Clears previous selections and takes in an array of facets to select: filterFacets
|
|
1764
|
+
// facets are in the form:
|
|
1765
|
+
// {
|
|
1766
|
+
// facetPropPath: 'anatomy.organ.name',
|
|
1767
|
+
// term: 'Sex',
|
|
1768
|
+
// facet: 'Male'
|
|
1769
|
+
// }
|
|
1487
1770
|
setCascader: function setCascader(filterFacets) {
|
|
1488
|
-
var
|
|
1771
|
+
var _this4 = this;
|
|
1489
1772
|
|
|
1490
1773
|
//Do not set the value unless it is ready
|
|
1491
|
-
if (this.cascaderIsReady) {
|
|
1492
|
-
this.cascadeSelected =
|
|
1493
|
-
|
|
1494
|
-
_this5.cascadeSelected.push([e.term.toLowerCase(), _this5.createCascaderItemValue(e.term.toLowerCase(), e.facet.toLowerCase())]);
|
|
1774
|
+
if (this.cascaderIsReady && filterFacets && filterFacets.length != 0) {
|
|
1775
|
+
this.cascadeSelected = filterFacets.map(function (e) {
|
|
1776
|
+
return [e.facetPropPath, _this4.createCascaderItemValue(capitalise(e.term), e.facet)];
|
|
1495
1777
|
});
|
|
1496
1778
|
this.updatePreviousShowAllChecked(this.cascadeSelected);
|
|
1497
1779
|
}
|
|
1498
1780
|
},
|
|
1781
|
+
addFilter: function addFilter(filter) {
|
|
1782
|
+
//Do not set the value unless it is ready
|
|
1783
|
+
if (this.cascaderIsReady && filter) {
|
|
1784
|
+
this.cascadeSelected.filter(function (f) {
|
|
1785
|
+
return f.term != filter.term;
|
|
1786
|
+
});
|
|
1787
|
+
this.cascadeSelected.push([filter.facetPropPath, this.createCascaderItemValue(filter.term, filter.facet)]);
|
|
1788
|
+
}
|
|
1789
|
+
},
|
|
1790
|
+
initiateSearch: function initiateSearch() {
|
|
1791
|
+
this.cascadeEvent(this.cascadeSelected);
|
|
1792
|
+
},
|
|
1793
|
+
// checkShowAllBoxes: Checks each 'Show all' cascade option by using the setCascader function
|
|
1794
|
+
checkShowAllBoxes: function checkShowAllBoxes() {
|
|
1795
|
+
this.setCascader(this.options.map(function (option) {
|
|
1796
|
+
return {
|
|
1797
|
+
facetPropPath: option.value,
|
|
1798
|
+
term: option.label,
|
|
1799
|
+
facet: 'Show all'
|
|
1800
|
+
};
|
|
1801
|
+
}));
|
|
1802
|
+
},
|
|
1499
1803
|
makeCascadeLabelsClickable: function makeCascadeLabelsClickable() {
|
|
1500
|
-
var
|
|
1804
|
+
var _this5 = this;
|
|
1501
1805
|
|
|
1502
1806
|
// Next tick allows the cascader menu to change
|
|
1503
1807
|
this.$nextTick(function () {
|
|
1504
|
-
|
|
1808
|
+
_this5.$refs.cascader.$el.querySelectorAll(".el-cascader-node__label").forEach(function (el) {
|
|
1505
1809
|
// step through each cascade label
|
|
1506
1810
|
el.onclick = function () {
|
|
1507
1811
|
var checkbox = this.previousElementSibling;
|
|
@@ -1517,26 +1821,26 @@ var SearchFiltersvue_type_script_lang_js_convertReadableLabel = function convert
|
|
|
1517
1821
|
});
|
|
1518
1822
|
}
|
|
1519
1823
|
},
|
|
1520
|
-
created: function created() {
|
|
1521
|
-
//Create non-reactive local variables
|
|
1522
|
-
this.facetEndpoint = "get-facets/";
|
|
1523
|
-
},
|
|
1524
1824
|
mounted: function mounted() {
|
|
1525
|
-
var
|
|
1825
|
+
var _this6 = this;
|
|
1526
1826
|
|
|
1827
|
+
this.algoliaClient = new algolia_AlgoliaClient(this.envVars.ALGOLIA_ID, this.envVars.ALGOLIA_KEY, this.envVars.PENNSIEVE_API_LOCATION);
|
|
1828
|
+
this.algoliaClient.initIndex(this.envVars.ALGOLIA_INDEX);
|
|
1527
1829
|
this.populateCascader().then(function () {
|
|
1528
|
-
|
|
1830
|
+
_this6.cascaderIsReady = true;
|
|
1529
1831
|
|
|
1530
|
-
|
|
1832
|
+
_this6.checkShowAllBoxes();
|
|
1531
1833
|
|
|
1532
|
-
|
|
1834
|
+
_this6.setCascader(_this6.entry.filterFacets);
|
|
1835
|
+
|
|
1836
|
+
_this6.makeCascadeLabelsClickable();
|
|
1533
1837
|
});
|
|
1534
1838
|
}
|
|
1535
1839
|
});
|
|
1536
1840
|
// CONCATENATED MODULE: ./src/components/SearchFilters.vue?vue&type=script&lang=js&
|
|
1537
1841
|
/* harmony default export */ var components_SearchFiltersvue_type_script_lang_js_ = (SearchFiltersvue_type_script_lang_js_);
|
|
1538
|
-
// EXTERNAL MODULE: ./src/components/SearchFilters.vue?vue&type=style&index=0&id=
|
|
1539
|
-
var
|
|
1842
|
+
// EXTERNAL MODULE: ./src/components/SearchFilters.vue?vue&type=style&index=0&id=d4e05720&scoped=true&lang=css&
|
|
1843
|
+
var SearchFiltersvue_type_style_index_0_id_d4e05720_scoped_true_lang_css_ = __webpack_require__("e026");
|
|
1540
1844
|
|
|
1541
1845
|
// CONCATENATED MODULE: ./src/components/SearchFilters.vue
|
|
1542
1846
|
|
|
@@ -1549,25 +1853,22 @@ var SearchFiltersvue_type_style_index_0_id_cf619ba6_scoped_true_lang_css_ = __we
|
|
|
1549
1853
|
|
|
1550
1854
|
var SearchFilters_component = normalizeComponent(
|
|
1551
1855
|
components_SearchFiltersvue_type_script_lang_js_,
|
|
1552
|
-
|
|
1553
|
-
|
|
1856
|
+
SearchFiltersvue_type_template_id_d4e05720_scoped_true_render,
|
|
1857
|
+
SearchFiltersvue_type_template_id_d4e05720_scoped_true_staticRenderFns,
|
|
1554
1858
|
false,
|
|
1555
1859
|
null,
|
|
1556
|
-
"
|
|
1860
|
+
"d4e05720",
|
|
1557
1861
|
null
|
|
1558
1862
|
|
|
1559
1863
|
)
|
|
1560
1864
|
|
|
1561
1865
|
/* harmony default export */ var SearchFilters = (SearchFilters_component.exports);
|
|
1562
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
1563
|
-
var
|
|
1564
|
-
var
|
|
1866
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"52eab1bf-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!./src/components/DatasetCard.vue?vue&type=template&id=eaeba60a&scoped=true&
|
|
1867
|
+
var DatasetCardvue_type_template_id_eaeba60a_scoped_true_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{ref:"container",staticClass:"dataset-card-container"},[_c('div',{ref:"card",class:_vm.expanded ? 'dataset-card-expanded' : 'dataset-card'},[_c('div',{staticClass:"seperator-path"}),_c('div',{staticClass:"card"},[_c('span',{staticClass:"card-left"},[_c('img',{staticClass:"banner-img",attrs:{"svg-inline":"","src":_vm.thumbnail},on:{"click":_vm.openDataset}})]),_c('div',{staticClass:"card-right"},[_c('div',{staticClass:"title",on:{"click":_vm.cardClicked}},[_vm._v(_vm._s(_vm.entry.name))]),_c('div',{staticClass:"details"},[_vm._v(_vm._s(_vm.contributors)+" "+_vm._s(_vm.entry.publishDate ? ("(" + _vm.publishYear + ")") : ''))]),_c('div',{staticClass:"details"},[_vm._v(_vm._s(_vm.samples))]),_c('div',{staticClass:"details"},[_vm._v("id: "+_vm._s(_vm.discoverId))]),_c('div',[(!_vm.entry.simulation)?_c('el-button',{staticClass:"button",attrs:{"size":"mini","icon":"el-icon-coin"},on:{"click":_vm.openDataset}},[_vm._v("View dataset")]):_vm._e()],1),_c('div',[(_vm.entry.scaffolds)?_c('el-button',{staticClass:"button",attrs:{"size":"mini","icon":"el-icon-view"},on:{"click":_vm.openScaffold}},[_vm._v("View scaffold")]):_vm._e()],1),_c('div',[(_vm.hasCSVFile)?_c('el-button',{staticClass:"button",attrs:{"size":"mini","icon":"el-icon-view"},on:{"click":_vm.openPlot}},[_vm._v("View plot")]):_vm._e()],1),_c('div',[(_vm.entry.simulation)?_c('el-button',{staticClass:"button",attrs:{"size":"mini","icon":"el-icon-view"},on:{"click":_vm.openRepository}},[_vm._v("View repository")]):_vm._e()],1),_c('div',[(_vm.entry.simulation)?_c('el-button',{staticClass:"button",attrs:{"size":"mini","icon":"el-icon-view"},on:{"click":_vm.openSimulation}},[_vm._v("View simulation")]):_vm._e()],1),_c('div',[(_vm.entry.segmentation)?_c('el-button',{staticClass:"button",attrs:{"size":"mini","icon":"el-icon-view"},on:{"click":_vm.openSegmentation}},[_vm._v("View segmentation")]):_vm._e()],1),_c('div',[(_vm.biolucidaData)?_c('el-button',{staticClass:"button",attrs:{"size":"mini","icon":"el-icon-view"},on:{"click":_vm.openImage}},[_vm._v("View image")]):_vm._e()],1)])]),((_vm.cardOverflow && !_vm.expanded))?_c('p',{staticClass:"read-more"},[_c('el-button',{staticClass:"read-more-button",on:{"click":_vm.expand}},[_vm._v("Read more...")])],1):_vm._e()])])}
|
|
1868
|
+
var DatasetCardvue_type_template_id_eaeba60a_scoped_true_staticRenderFns = []
|
|
1565
1869
|
|
|
1566
1870
|
|
|
1567
|
-
// CONCATENATED MODULE: ./src/components/DatasetCard.vue?vue&type=template&id=
|
|
1568
|
-
|
|
1569
|
-
// EXTERNAL MODULE: external "core-js/modules/es.array.concat"
|
|
1570
|
-
var es_array_concat_ = __webpack_require__("18d2");
|
|
1871
|
+
// CONCATENATED MODULE: ./src/components/DatasetCard.vue?vue&type=template&id=eaeba60a&scoped=true&
|
|
1571
1872
|
|
|
1572
1873
|
// EXTERNAL MODULE: external "core-js/modules/es.string.replace"
|
|
1573
1874
|
var es_string_replace_ = __webpack_require__("bfab");
|
|
@@ -1700,9 +2001,9 @@ var DatasetCardvue_type_script_lang_js_capitalise = function capitalise(string)
|
|
|
1700
2001
|
* the required viewing.
|
|
1701
2002
|
*/
|
|
1702
2003
|
entry: Object,
|
|
1703
|
-
|
|
1704
|
-
type:
|
|
1705
|
-
default:
|
|
2004
|
+
envVars: {
|
|
2005
|
+
type: Object,
|
|
2006
|
+
default: function _default() {}
|
|
1706
2007
|
}
|
|
1707
2008
|
},
|
|
1708
2009
|
data: function data() {
|
|
@@ -1737,18 +2038,30 @@ var DatasetCardvue_type_script_lang_js_capitalise = function capitalise(string)
|
|
|
1737
2038
|
samples: function samples() {
|
|
1738
2039
|
var text = "";
|
|
1739
2040
|
|
|
1740
|
-
if (this.entry.numberSamples === 1) {
|
|
1741
|
-
text = this.entry.numberSamples + " sample";
|
|
1742
|
-
} else if (this.entry.numberSamples > 1) {
|
|
1743
|
-
text = this.entry.numberSamples + " samples";
|
|
1744
|
-
}
|
|
1745
|
-
|
|
1746
2041
|
if (this.entry.species) {
|
|
1747
2042
|
if (species_map[this.entry.species[0].toLowerCase()]) {
|
|
1748
|
-
text
|
|
2043
|
+
text = "".concat(species_map[this.entry.species[0].toLowerCase()]);
|
|
1749
2044
|
} else {
|
|
1750
|
-
text
|
|
2045
|
+
text = "".concat(this.entry.species);
|
|
2046
|
+
}
|
|
2047
|
+
}
|
|
2048
|
+
|
|
2049
|
+
if (this.entry.numberSamples > 0) {
|
|
2050
|
+
text += " (";
|
|
2051
|
+
|
|
2052
|
+
if (this.entry.numberSamples === 1) {
|
|
2053
|
+
text += "".concat(this.entry.numberSamples, " sample");
|
|
2054
|
+
} else if (this.entry.numberSamples > 1) {
|
|
2055
|
+
text += "".concat(this.entry.numberSamples, " samples");
|
|
2056
|
+
}
|
|
2057
|
+
|
|
2058
|
+
if (this.entry.numberSubjects === 1) {
|
|
2059
|
+
text += " from ".concat(this.entry.numberSubjects, " subject");
|
|
2060
|
+
} else if (this.entry.numberSamples > 1) {
|
|
2061
|
+
text += " from ".concat(this.entry.numberSubjects, " subjects");
|
|
1751
2062
|
}
|
|
2063
|
+
|
|
2064
|
+
text += ")";
|
|
1752
2065
|
}
|
|
1753
2066
|
|
|
1754
2067
|
return text;
|
|
@@ -1793,7 +2106,7 @@ var DatasetCardvue_type_script_lang_js_capitalise = function capitalise(string)
|
|
|
1793
2106
|
window.open(this.dataLocation, '_blank');
|
|
1794
2107
|
},
|
|
1795
2108
|
openRepository: function openRepository() {
|
|
1796
|
-
var apiLocation = this.
|
|
2109
|
+
var apiLocation = this.envVars.API_LOCATION;
|
|
1797
2110
|
this.entry.additionalLinks.forEach(function (el) {
|
|
1798
2111
|
if (el.description == "Repository") {
|
|
1799
2112
|
var xmlhttp = new XMLHttpRequest();
|
|
@@ -1895,11 +2208,11 @@ var DatasetCardvue_type_script_lang_js_capitalise = function capitalise(string)
|
|
|
1895
2208
|
},
|
|
1896
2209
|
getScaffoldPath: function getScaffoldPath(discoverId, version, scaffoldPath) {
|
|
1897
2210
|
var id = discoverId;
|
|
1898
|
-
var path = "".concat(this.
|
|
2211
|
+
var path = "".concat(this.envVars.API_LOCATION, "s3-resource/").concat(id, "/").concat(version, "/files/").concat(scaffoldPath);
|
|
1899
2212
|
return path;
|
|
1900
2213
|
},
|
|
1901
2214
|
getFileFromPath: function getFileFromPath(discoverId, version, path) {
|
|
1902
|
-
return "".concat(this.
|
|
2215
|
+
return "".concat(this.envVars.API_LOCATION, "s3-resource/").concat(discoverId, "/").concat(version, "/files/").concat(path);
|
|
1903
2216
|
},
|
|
1904
2217
|
isOverflown: function isOverflown(el) {
|
|
1905
2218
|
return el.clientHeight < el.scrollHeight;
|
|
@@ -1939,7 +2252,8 @@ var DatasetCardvue_type_script_lang_js_capitalise = function capitalise(string)
|
|
|
1939
2252
|
getBiolucidaInfo: function getBiolucidaInfo(id) {
|
|
1940
2253
|
var _this2 = this;
|
|
1941
2254
|
|
|
1942
|
-
var
|
|
2255
|
+
var apiLocation = this.envVars.API_LOCATION;
|
|
2256
|
+
var endpoint = apiLocation + "image_search/" + id; // Add parameters if we are sent them
|
|
1943
2257
|
|
|
1944
2258
|
fetch(endpoint).then(function (response) {
|
|
1945
2259
|
return response.json();
|
|
@@ -1965,8 +2279,8 @@ var DatasetCardvue_type_script_lang_js_capitalise = function capitalise(string)
|
|
|
1965
2279
|
});
|
|
1966
2280
|
// CONCATENATED MODULE: ./src/components/DatasetCard.vue?vue&type=script&lang=js&
|
|
1967
2281
|
/* harmony default export */ var components_DatasetCardvue_type_script_lang_js_ = (DatasetCardvue_type_script_lang_js_);
|
|
1968
|
-
// EXTERNAL MODULE: ./src/components/DatasetCard.vue?vue&type=style&index=0&id=
|
|
1969
|
-
var
|
|
2282
|
+
// EXTERNAL MODULE: ./src/components/DatasetCard.vue?vue&type=style&index=0&id=eaeba60a&scoped=true&lang=css&
|
|
2283
|
+
var DatasetCardvue_type_style_index_0_id_eaeba60a_scoped_true_lang_css_ = __webpack_require__("c3dd");
|
|
1970
2284
|
|
|
1971
2285
|
// CONCATENATED MODULE: ./src/components/DatasetCard.vue
|
|
1972
2286
|
|
|
@@ -1979,17 +2293,17 @@ var DatasetCardvue_type_style_index_0_id_7989efa8_scoped_true_lang_css_ = __webp
|
|
|
1979
2293
|
|
|
1980
2294
|
var DatasetCard_component = normalizeComponent(
|
|
1981
2295
|
components_DatasetCardvue_type_script_lang_js_,
|
|
1982
|
-
|
|
1983
|
-
|
|
2296
|
+
DatasetCardvue_type_template_id_eaeba60a_scoped_true_render,
|
|
2297
|
+
DatasetCardvue_type_template_id_eaeba60a_scoped_true_staticRenderFns,
|
|
1984
2298
|
false,
|
|
1985
2299
|
null,
|
|
1986
|
-
"
|
|
2300
|
+
"eaeba60a",
|
|
1987
2301
|
null
|
|
1988
2302
|
|
|
1989
2303
|
)
|
|
1990
2304
|
|
|
1991
2305
|
/* harmony default export */ var DatasetCard = (DatasetCard_component.exports);
|
|
1992
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
2306
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"52eab1bf-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!./src/components/ContextCard.vue?vue&type=template&id=17e861eb&scoped=true&
|
|
1993
2307
|
var ContextCardvue_type_template_id_17e861eb_scoped_true_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{ref:"container",staticClass:"context-card-container"},[_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.showDetails),expression:"showDetails"}],staticClass:"hide",on:{"click":function($event){_vm.showDetails = !_vm.showDetails}}},[_vm._v("Hide information"),_c('i',{staticClass:"el-icon-arrow-up"})]),_c('div',{directives:[{name:"show",rawName:"v-show",value:(!_vm.showDetails),expression:"!showDetails"}],staticClass:"hide",on:{"click":function($event){_vm.showDetails = !_vm.showDetails}}},[_vm._v("Show information"),_c('i',{staticClass:"el-icon-arrow-down"})]),_c('el-card',{directives:[{name:"show",rawName:"v-show",value:(_vm.showDetails),expression:"showDetails"}],staticClass:"context-card card",attrs:{"body-style":{ padding: '0px', 'background-color': 'white', display: 'flex', width: '516px'}}},[_c('img',{staticClass:"context-image card-left",attrs:{"src":_vm.entry.bannerImage}}),_c('div',{staticClass:"card-right"},[_c('div',{staticClass:"title"},[_vm._v(_vm._s(_vm.entry.title))]),_c('div',[_vm._v(_vm._s(_vm.entry.description))]),_vm._l((_vm.entry.keys),function(key){return [_c('br',{key:key.text}),_c('span',{key:key.text + 1},[_c('img',{staticStyle:{"height":"20px"},attrs:{"src":key.image}}),_vm._v(" "+_vm._s(key.text))])]})],2)])],1)}
|
|
1994
2308
|
var ContextCardvue_type_template_id_17e861eb_scoped_true_staticRenderFns = []
|
|
1995
2309
|
|
|
@@ -2142,6 +2456,7 @@ var ContextCard_component = normalizeComponent(
|
|
|
2142
2456
|
|
|
2143
2457
|
|
|
2144
2458
|
|
|
2459
|
+
|
|
2145
2460
|
|
|
2146
2461
|
|
|
2147
2462
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
|
@@ -2194,6 +2509,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
2194
2509
|
//
|
|
2195
2510
|
//
|
|
2196
2511
|
//
|
|
2512
|
+
//
|
|
2197
2513
|
|
|
2198
2514
|
/* eslint-disable no-alert, no-console */
|
|
2199
2515
|
|
|
@@ -2202,6 +2518,8 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
2202
2518
|
|
|
2203
2519
|
|
|
2204
2520
|
|
|
2521
|
+
|
|
2522
|
+
|
|
2205
2523
|
locale_default.a.use(en_default.a);
|
|
2206
2524
|
external_vue_default.a.use(button_default.a);
|
|
2207
2525
|
external_vue_default.a.use(card_default.a);
|
|
@@ -2300,9 +2618,9 @@ var initial_state = {
|
|
|
2300
2618
|
type: Object,
|
|
2301
2619
|
default: undefined
|
|
2302
2620
|
},
|
|
2303
|
-
|
|
2304
|
-
type:
|
|
2305
|
-
default:
|
|
2621
|
+
envVars: {
|
|
2622
|
+
type: Object,
|
|
2623
|
+
default: function _default() {}
|
|
2306
2624
|
},
|
|
2307
2625
|
firstSearch: {
|
|
2308
2626
|
type: String,
|
|
@@ -2328,77 +2646,97 @@ var initial_state = {
|
|
|
2328
2646
|
}
|
|
2329
2647
|
},
|
|
2330
2648
|
methods: {
|
|
2331
|
-
openSearch: function openSearch(
|
|
2332
|
-
var
|
|
2333
|
-
var endpoint = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined;
|
|
2334
|
-
var params = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : undefined;
|
|
2649
|
+
openSearch: function openSearch(filter) {
|
|
2650
|
+
var search = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
|
2335
2651
|
this.searchInput = search;
|
|
2336
2652
|
this.resetPageNavigation();
|
|
2337
|
-
this.
|
|
2653
|
+
this.searchAlgolia(filter, search);
|
|
2338
2654
|
|
|
2339
2655
|
if (filter) {
|
|
2340
2656
|
this.filter = _toConsumableArray(filter);
|
|
2341
2657
|
this.$refs.filtersRef.setCascader(this.filter);
|
|
2342
2658
|
}
|
|
2343
2659
|
},
|
|
2660
|
+
addFilter: function addFilter(filter) {
|
|
2661
|
+
this.resetPageNavigation();
|
|
2662
|
+
|
|
2663
|
+
if (filter) {
|
|
2664
|
+
this.$refs.filtersRef.addFilter(filter);
|
|
2665
|
+
this.$refs.filtersRef.initiateSearch();
|
|
2666
|
+
}
|
|
2667
|
+
},
|
|
2344
2668
|
clearSearchClicked: function clearSearchClicked() {
|
|
2345
2669
|
this.searchInput = "";
|
|
2346
2670
|
this.resetPageNavigation();
|
|
2347
|
-
this.
|
|
2671
|
+
this.searchAlgolia(this.filters, this.searchInput);
|
|
2348
2672
|
},
|
|
2349
2673
|
searchEvent: function searchEvent() {
|
|
2350
2674
|
var event = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
2351
2675
|
|
|
2352
2676
|
if (event.keyCode === 13 || event instanceof MouseEvent) {
|
|
2353
2677
|
this.resetPageNavigation();
|
|
2354
|
-
this.
|
|
2678
|
+
this.searchAlgolia(this.filters, this.searchInput);
|
|
2355
2679
|
}
|
|
2356
2680
|
},
|
|
2357
|
-
filterUpdate: function filterUpdate(
|
|
2681
|
+
filterUpdate: function filterUpdate(filters) {
|
|
2682
|
+
this.filters = _toConsumableArray(filters);
|
|
2358
2683
|
this.resetPageNavigation();
|
|
2359
|
-
this.
|
|
2360
|
-
this.filter = _toConsumableArray(filter);
|
|
2684
|
+
this.searchAlgolia(filters, this.searchInput);
|
|
2361
2685
|
this.$emit("search-changed", {
|
|
2362
2686
|
value: this.filter,
|
|
2363
2687
|
type: "filter-update"
|
|
2364
2688
|
});
|
|
2365
2689
|
},
|
|
2690
|
+
searchAlgolia: function searchAlgolia(filters) {
|
|
2691
|
+
var _this = this;
|
|
2692
|
+
|
|
2693
|
+
var query = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
|
2694
|
+
// Algolia search
|
|
2695
|
+
this.algoliaClient.search(getFilters(filters), query, this.numberPerPage, this.page).then(function (searchData) {
|
|
2696
|
+
_this.numberOfHits = searchData.total;
|
|
2697
|
+
_this.discoverIds = searchData.discoverIds;
|
|
2698
|
+
_this.results = searchData.items;
|
|
2699
|
+
|
|
2700
|
+
_this.searchSciCrunch({
|
|
2701
|
+
'discoverIds': _this.discoverIds
|
|
2702
|
+
});
|
|
2703
|
+
});
|
|
2704
|
+
},
|
|
2705
|
+
filtersLoading: function filtersLoading(val) {
|
|
2706
|
+
this.loadingCards = val;
|
|
2707
|
+
},
|
|
2366
2708
|
numberPerPageUpdate: function numberPerPageUpdate(val) {
|
|
2367
2709
|
this.numberPerPage = val;
|
|
2368
2710
|
this.pageChange(1);
|
|
2369
2711
|
},
|
|
2370
2712
|
pageChange: function pageChange(page) {
|
|
2371
2713
|
this.start = (page - 1) * this.numberPerPage;
|
|
2372
|
-
this.
|
|
2714
|
+
this.page = page;
|
|
2715
|
+
this.searchAlgolia(this.filters, this.searchInput, this.numberPerPage, this.page);
|
|
2373
2716
|
},
|
|
2374
|
-
searchSciCrunch: function searchSciCrunch(
|
|
2375
|
-
var
|
|
2717
|
+
searchSciCrunch: function searchSciCrunch(params) {
|
|
2718
|
+
var _this2 = this;
|
|
2376
2719
|
|
|
2377
|
-
var filter = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined;
|
|
2378
|
-
var searchEndpoint = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined;
|
|
2379
|
-
var params = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : undefined;
|
|
2380
2720
|
this.loadingCards = true;
|
|
2381
2721
|
this.results = [];
|
|
2382
2722
|
this.disableCards();
|
|
2383
|
-
if (!searchEndpoint) searchEndpoint = this.searchEndpoint;
|
|
2384
|
-
if (!params) params = this.createParams(filter, this.start, this.numberPerPage);
|
|
2385
2723
|
this.$emit("search-changed", {
|
|
2386
|
-
value:
|
|
2724
|
+
value: this.searchInput,
|
|
2387
2725
|
type: "query-update"
|
|
2388
2726
|
});
|
|
2389
|
-
this.callSciCrunch(this.
|
|
2727
|
+
this.callSciCrunch(this.envVars.API_LOCATION, params).then(function (result) {
|
|
2390
2728
|
//Only process if the search term is the same as the last search term.
|
|
2391
2729
|
//This avoid old search being displayed.
|
|
2392
|
-
|
|
2730
|
+
_this2.sciCrunchError = false;
|
|
2393
2731
|
|
|
2394
|
-
|
|
2732
|
+
_this2.resultsProcessing(result);
|
|
2395
2733
|
|
|
2396
|
-
|
|
2397
|
-
|
|
2734
|
+
_this2.$refs.content.style["overflow-y"] = "scroll";
|
|
2735
|
+
_this2.loadingCards = false;
|
|
2398
2736
|
}).catch(function (result) {
|
|
2399
2737
|
if (result.name !== 'AbortError') {
|
|
2400
|
-
|
|
2401
|
-
|
|
2738
|
+
_this2.loadingCards = false;
|
|
2739
|
+
_this2.sciCrunchError = result.message;
|
|
2402
2740
|
}
|
|
2403
2741
|
});
|
|
2404
2742
|
},
|
|
@@ -2415,35 +2753,8 @@ var initial_state = {
|
|
|
2415
2753
|
this.start = 0;
|
|
2416
2754
|
this.page = 1;
|
|
2417
2755
|
},
|
|
2418
|
-
createParams: function createParams(filter, start, size) {
|
|
2419
|
-
//Deconstruct list of fitlers to list of term
|
|
2420
|
-
//and facet.
|
|
2421
|
-
var params = {};
|
|
2422
|
-
var term = [];
|
|
2423
|
-
var facet = [];
|
|
2424
|
-
var f = undefined;
|
|
2425
|
-
|
|
2426
|
-
if (filter !== undefined) {
|
|
2427
|
-
f = filter;
|
|
2428
|
-
} else {
|
|
2429
|
-
f = this.filter;
|
|
2430
|
-
}
|
|
2431
|
-
|
|
2432
|
-
if (f) f.forEach(function (e) {
|
|
2433
|
-
//Do not ask for any "show all" request
|
|
2434
|
-
if (e.facet !== "show all") {
|
|
2435
|
-
term.push(e.term);
|
|
2436
|
-
facet.push(e.facet);
|
|
2437
|
-
}
|
|
2438
|
-
});
|
|
2439
|
-
params.term = term;
|
|
2440
|
-
params.facet = facet;
|
|
2441
|
-
params.start = start;
|
|
2442
|
-
params.size = size;
|
|
2443
|
-
return params;
|
|
2444
|
-
},
|
|
2445
2756
|
resultsProcessing: function resultsProcessing(data) {
|
|
2446
|
-
var
|
|
2757
|
+
var _this3 = this;
|
|
2447
2758
|
|
|
2448
2759
|
this.lastSearch = this.searchInput;
|
|
2449
2760
|
this.results = [];
|
|
@@ -2459,7 +2770,8 @@ var initial_state = {
|
|
|
2459
2770
|
name: element.name,
|
|
2460
2771
|
description: element.description,
|
|
2461
2772
|
contributors: element.contributors,
|
|
2462
|
-
numberSamples:
|
|
2773
|
+
numberSamples: element.sampleSize ? parseInt(element.sampleSize) : 0,
|
|
2774
|
+
numberSubjects: element.subjectSize ? parseInt(element.subjectSize) : 0,
|
|
2463
2775
|
updated: element.updated[0].timestamp.split("T")[0],
|
|
2464
2776
|
url: element.uri[0],
|
|
2465
2777
|
datasetId: element.dataset_identifier,
|
|
@@ -2482,7 +2794,7 @@ var initial_state = {
|
|
|
2482
2794
|
s3uri: element.s3uri
|
|
2483
2795
|
};
|
|
2484
2796
|
|
|
2485
|
-
|
|
2797
|
+
_this3.results.push(datasetInfo);
|
|
2486
2798
|
});
|
|
2487
2799
|
},
|
|
2488
2800
|
createfilterParams: function createfilterParams(params) {
|
|
@@ -2504,25 +2816,20 @@ var initial_state = {
|
|
|
2504
2816
|
|
|
2505
2817
|
return p.toString();
|
|
2506
2818
|
},
|
|
2507
|
-
callSciCrunch: function callSciCrunch(apiLocation
|
|
2508
|
-
var
|
|
2819
|
+
callSciCrunch: function callSciCrunch(apiLocation) {
|
|
2820
|
+
var _this4 = this;
|
|
2509
2821
|
|
|
2510
|
-
var params = arguments.length >
|
|
2822
|
+
var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
2511
2823
|
return new Promise(function (resolve, reject) {
|
|
2512
2824
|
// the following controller will abort current search
|
|
2513
2825
|
// if a new one has been started
|
|
2514
|
-
if (
|
|
2515
|
-
|
|
2516
|
-
var signal =
|
|
2517
|
-
var endpoint = apiLocation + searchEndpoint; // Add parameters if we are sent them
|
|
2826
|
+
if (_this4._controller) _this4._controller.abort();
|
|
2827
|
+
_this4._controller = new AbortController();
|
|
2828
|
+
var signal = _this4._controller.signal; // Add parameters if we are sent them
|
|
2518
2829
|
|
|
2519
|
-
|
|
2520
|
-
endpoint = endpoint + search + "/?" + _this3.createfilterParams(params);
|
|
2521
|
-
} else {
|
|
2522
|
-
endpoint = endpoint + "?" + _this3.createfilterParams(params);
|
|
2523
|
-
}
|
|
2830
|
+
var fullEndpoint = _this4.envVars.API_LOCATION + _this4.searchEndpoint + "?" + _this4.createfilterParams(params);
|
|
2524
2831
|
|
|
2525
|
-
fetch(
|
|
2832
|
+
fetch(fullEndpoint, {
|
|
2526
2833
|
signal: signal
|
|
2527
2834
|
}).then(handleErrors).then(function (response) {
|
|
2528
2835
|
return response.json();
|
|
@@ -2535,46 +2842,26 @@ var initial_state = {
|
|
|
2535
2842
|
}
|
|
2536
2843
|
},
|
|
2537
2844
|
mounted: function mounted() {
|
|
2538
|
-
//
|
|
2845
|
+
// initialise algolia
|
|
2846
|
+
this.algoliaClient = new algolia_AlgoliaClient(this.envVars.ALGOLIA_ID, this.envVars.ALGOLIA_KEY, this.envVars.PENNSIEVE_API_LOCATION);
|
|
2847
|
+
this.algoliaClient.initIndex(this.envVars.ALGOLIA_INDEX);
|
|
2848
|
+
console.log('Algolia initialised in sidebar'); // temporarily disable flatmap search since there are no datasets
|
|
2849
|
+
|
|
2539
2850
|
if (this.firstSearch === "Flatmap" || this.firstSearch === "flatmap") {
|
|
2540
|
-
this.openSearch(''
|
|
2541
|
-
facet: "show all",
|
|
2542
|
-
term: 'species'
|
|
2543
|
-
}, {
|
|
2544
|
-
facet: "show all",
|
|
2545
|
-
term: 'gender'
|
|
2546
|
-
}, {
|
|
2547
|
-
facet: "show all",
|
|
2548
|
-
term: 'organ'
|
|
2549
|
-
}, {
|
|
2550
|
-
facet: "show all",
|
|
2551
|
-
term: 'datasets'
|
|
2552
|
-
}]);
|
|
2851
|
+
this.openSearch(undefined, '');
|
|
2553
2852
|
} else {
|
|
2554
|
-
this.openSearch(
|
|
2555
|
-
facet: "show all",
|
|
2556
|
-
term: 'species'
|
|
2557
|
-
}, {
|
|
2558
|
-
facet: "show all",
|
|
2559
|
-
term: 'gender'
|
|
2560
|
-
}, {
|
|
2561
|
-
facet: "show all",
|
|
2562
|
-
term: 'organ'
|
|
2563
|
-
}, {
|
|
2564
|
-
facet: "show all",
|
|
2565
|
-
term: 'datasets'
|
|
2566
|
-
}]);
|
|
2853
|
+
this.openSearch(undefined, '');
|
|
2567
2854
|
}
|
|
2568
2855
|
},
|
|
2569
2856
|
created: function created() {
|
|
2570
2857
|
//Create non-reactive local variables
|
|
2571
|
-
this.searchEndpoint = "
|
|
2858
|
+
this.searchEndpoint = "dataset_info/using_multiple_discoverIds/";
|
|
2572
2859
|
}
|
|
2573
2860
|
});
|
|
2574
2861
|
// CONCATENATED MODULE: ./src/components/SidebarContent.vue?vue&type=script&lang=js&
|
|
2575
2862
|
/* harmony default export */ var components_SidebarContentvue_type_script_lang_js_ = (SidebarContentvue_type_script_lang_js_);
|
|
2576
|
-
// EXTERNAL MODULE: ./src/components/SidebarContent.vue?vue&type=style&index=0&id=
|
|
2577
|
-
var
|
|
2863
|
+
// EXTERNAL MODULE: ./src/components/SidebarContent.vue?vue&type=style&index=0&id=2e1db9a4&scoped=true&lang=css&
|
|
2864
|
+
var SidebarContentvue_type_style_index_0_id_2e1db9a4_scoped_true_lang_css_ = __webpack_require__("be47");
|
|
2578
2865
|
|
|
2579
2866
|
// CONCATENATED MODULE: ./src/components/SidebarContent.vue
|
|
2580
2867
|
|
|
@@ -2587,17 +2874,17 @@ var SidebarContentvue_type_style_index_0_id_ef9395fe_scoped_true_lang_css_ = __w
|
|
|
2587
2874
|
|
|
2588
2875
|
var SidebarContent_component = normalizeComponent(
|
|
2589
2876
|
components_SidebarContentvue_type_script_lang_js_,
|
|
2590
|
-
|
|
2591
|
-
|
|
2877
|
+
SidebarContentvue_type_template_id_2e1db9a4_scoped_true_render,
|
|
2878
|
+
SidebarContentvue_type_template_id_2e1db9a4_scoped_true_staticRenderFns,
|
|
2592
2879
|
false,
|
|
2593
2880
|
null,
|
|
2594
|
-
"
|
|
2881
|
+
"2e1db9a4",
|
|
2595
2882
|
null
|
|
2596
2883
|
|
|
2597
2884
|
)
|
|
2598
2885
|
|
|
2599
2886
|
/* harmony default export */ var SidebarContent = (SidebarContent_component.exports);
|
|
2600
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
2887
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"52eab1bf-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!./src/components/Tabs.vue?vue&type=template&id=5d1b9484&scoped=true&
|
|
2601
2888
|
var Tabsvue_type_template_id_5d1b9484_scoped_true_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"tab-container"},_vm._l((_vm.tabTitles),function(title){return _c('div',{key:title.id,staticClass:"title"},[_c('div',{staticClass:"title-text-table",class:{ highlightText : (title.id==_vm.activeId) },on:{"click":function($event){return _vm.titleClicked(title.id)}}},[_c('div',{staticClass:"title-text"},[_vm._v(" "+_vm._s(title.title)+" ")])])])}),0)}
|
|
2602
2889
|
var Tabsvue_type_template_id_5d1b9484_scoped_true_staticRenderFns = []
|
|
2603
2890
|
|
|
@@ -2768,9 +3055,9 @@ var SideBarvue_type_script_lang_js_initial_state = {
|
|
|
2768
3055
|
return SideBarvue_type_script_lang_js_initial_state;
|
|
2769
3056
|
}
|
|
2770
3057
|
},
|
|
2771
|
-
|
|
2772
|
-
type:
|
|
2773
|
-
default:
|
|
3058
|
+
envVars: {
|
|
3059
|
+
type: Object,
|
|
3060
|
+
default: function _default() {}
|
|
2774
3061
|
},
|
|
2775
3062
|
tabs: {
|
|
2776
3063
|
type: Array,
|
|
@@ -2805,22 +3092,31 @@ var SideBarvue_type_script_lang_js_initial_state = {
|
|
|
2805
3092
|
toggleDrawer: function toggleDrawer() {
|
|
2806
3093
|
this.drawerOpen = !this.drawerOpen;
|
|
2807
3094
|
},
|
|
2808
|
-
openSearch: function openSearch(
|
|
3095
|
+
openSearch: function openSearch(facets, query) {
|
|
2809
3096
|
var _this = this;
|
|
2810
3097
|
|
|
2811
3098
|
this.drawerOpen = true; // Because refs are in v-for, nextTick is needed here
|
|
2812
3099
|
|
|
2813
3100
|
external_vue_default.a.nextTick(function () {
|
|
2814
|
-
_this.$refs[_this.activeId][0].openSearch(
|
|
3101
|
+
_this.$refs[_this.activeId][0].openSearch(facets, query);
|
|
2815
3102
|
});
|
|
2816
3103
|
},
|
|
2817
|
-
|
|
3104
|
+
addFilter: function addFilter(filter) {
|
|
2818
3105
|
var _this2 = this;
|
|
2819
3106
|
|
|
2820
3107
|
this.drawerOpen = true; // Because refs are in v-for, nextTick is needed here
|
|
2821
3108
|
|
|
2822
3109
|
external_vue_default.a.nextTick(function () {
|
|
2823
|
-
_this2.$refs[_this2.activeId][0].
|
|
3110
|
+
_this2.$refs[_this2.activeId][0].addFilter(filter);
|
|
3111
|
+
});
|
|
3112
|
+
},
|
|
3113
|
+
openNeuronSearch: function openNeuronSearch(neuron) {
|
|
3114
|
+
var _this3 = this;
|
|
3115
|
+
|
|
3116
|
+
this.drawerOpen = true; // Because refs are in v-for, nextTick is needed here
|
|
3117
|
+
|
|
3118
|
+
external_vue_default.a.nextTick(function () {
|
|
3119
|
+
_this3.$refs[_this3.activeId][0].openSearch('', undefined, 'scicrunch-query-string/', {
|
|
2824
3120
|
'field': '*organ.curie',
|
|
2825
3121
|
'curie': neuron
|
|
2826
3122
|
});
|
|
@@ -2834,17 +3130,17 @@ var SideBarvue_type_script_lang_js_initial_state = {
|
|
|
2834
3130
|
this.drawerOpen = this.openAtStart;
|
|
2835
3131
|
},
|
|
2836
3132
|
mounted: function mounted() {
|
|
2837
|
-
var
|
|
3133
|
+
var _this4 = this;
|
|
2838
3134
|
|
|
2839
3135
|
components_EventBus.$on("PopoverActionClick", function (payLoad) {
|
|
2840
|
-
|
|
3136
|
+
_this4.$emit("actionClick", payLoad);
|
|
2841
3137
|
});
|
|
2842
3138
|
}
|
|
2843
3139
|
});
|
|
2844
3140
|
// CONCATENATED MODULE: ./src/components/SideBar.vue?vue&type=script&lang=js&
|
|
2845
3141
|
/* harmony default export */ var components_SideBarvue_type_script_lang_js_ = (SideBarvue_type_script_lang_js_);
|
|
2846
|
-
// EXTERNAL MODULE: ./src/components/SideBar.vue?vue&type=style&index=0&id=
|
|
2847
|
-
var
|
|
3142
|
+
// EXTERNAL MODULE: ./src/components/SideBar.vue?vue&type=style&index=0&id=3d831a8e&scoped=true&lang=css&
|
|
3143
|
+
var SideBarvue_type_style_index_0_id_3d831a8e_scoped_true_lang_css_ = __webpack_require__("bc5f");
|
|
2848
3144
|
|
|
2849
3145
|
// CONCATENATED MODULE: ./src/components/SideBar.vue
|
|
2850
3146
|
|
|
@@ -2861,7 +3157,7 @@ var SideBar_component = normalizeComponent(
|
|
|
2861
3157
|
staticRenderFns,
|
|
2862
3158
|
false,
|
|
2863
3159
|
null,
|
|
2864
|
-
"
|
|
3160
|
+
"3d831a8e",
|
|
2865
3161
|
null
|
|
2866
3162
|
|
|
2867
3163
|
)
|
|
@@ -2882,13 +3178,6 @@ var SideBar_component = normalizeComponent(
|
|
|
2882
3178
|
|
|
2883
3179
|
module.exports = require("core-js/modules/es.string.includes");
|
|
2884
3180
|
|
|
2885
|
-
/***/ }),
|
|
2886
|
-
|
|
2887
|
-
/***/ "feaa":
|
|
2888
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
2889
|
-
|
|
2890
|
-
// extracted by mini-css-extract-plugin
|
|
2891
|
-
|
|
2892
3181
|
/***/ })
|
|
2893
3182
|
|
|
2894
3183
|
/******/ });
|