@abi-software/map-side-bar 1.3.27 → 1.3.29

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/package-lock.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abi-software/map-side-bar",
3
- "version": "1.3.6",
3
+ "version": "1.3.28",
4
4
  "lockfileVersion": 1,
5
5
  "requires": true,
6
6
  "dependencies": {
@@ -4061,8 +4061,7 @@
4061
4061
  "commander": {
4062
4062
  "version": "2.20.3",
4063
4063
  "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz",
4064
- "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==",
4065
- "dev": true
4064
+ "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ=="
4066
4065
  },
4067
4066
  "commondir": {
4068
4067
  "version": "1.0.1",
@@ -4517,6 +4516,11 @@
4517
4516
  "integrity": "sha512-WwOrosiQTvyms+Ti5ZC5vGEK0Vod3FTt1ca+payZqvKuGJF+dq7bG63DstxtN0dpm6FxY27a/zS3Wten+gEtGw==",
4518
4517
  "dev": true
4519
4518
  },
4519
+ "cssfilter": {
4520
+ "version": "0.0.10",
4521
+ "resolved": "https://registry.npmjs.org/cssfilter/-/cssfilter-0.0.10.tgz",
4522
+ "integrity": "sha512-FAaLDaplstoRsDR8XGYH51znUN0UY7nMc6Z9/fvE8EXGwvJE9hu7W2vHwx1+bd6gCYnln9nLbzxFTrcO9YQDZw=="
4523
+ },
4520
4524
  "cssnano": {
4521
4525
  "version": "4.1.11",
4522
4526
  "resolved": "https://registry.npmjs.org/cssnano/-/cssnano-4.1.11.tgz",
@@ -7635,6 +7639,11 @@
7635
7639
  "object-visit": "^1.0.0"
7636
7640
  }
7637
7641
  },
7642
+ "marked": {
7643
+ "version": "4.1.1",
7644
+ "resolved": "https://registry.npmjs.org/marked/-/marked-4.1.1.tgz",
7645
+ "integrity": "sha512-0cNMnTcUJPxbA6uWmCmjWz4NJRe/0Xfk2NhXCUHjew9qJzFN20krFnsUe7QynwqOwa5m1fZ4UDg0ycKFVC0ccw=="
7646
+ },
7638
7647
  "md5.js": {
7639
7648
  "version": "1.3.5",
7640
7649
  "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz",
@@ -13536,6 +13545,15 @@
13536
13545
  "async-limiter": "~1.0.0"
13537
13546
  }
13538
13547
  },
13548
+ "xss": {
13549
+ "version": "1.0.14",
13550
+ "resolved": "https://registry.npmjs.org/xss/-/xss-1.0.14.tgz",
13551
+ "integrity": "sha512-og7TEJhXvn1a7kzZGQ7ETjdQVS2UfZyTlsEdDOqvQF7GoxNfY+0YLCzBy1kPdsDDx4QuNAonQPddpsn6Xl/7sw==",
13552
+ "requires": {
13553
+ "commander": "^2.20.3",
13554
+ "cssfilter": "0.0.10"
13555
+ }
13556
+ },
13539
13557
  "xtend": {
13540
13558
  "version": "4.0.2",
13541
13559
  "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abi-software/map-side-bar",
3
- "version": "1.3.27",
3
+ "version": "1.3.29",
4
4
  "main": "./dist/map-side-bar.common.js",
5
5
  "files": [
6
6
  "dist/*",
@@ -21,7 +21,9 @@
21
21
  "@abi-software/svg-sprite": "^0.1.14",
22
22
  "algoliasearch": "^4.10.5",
23
23
  "element-ui": "^2.13.0",
24
- "vue": "^2.6.10"
24
+ "marked": "^4.1.1",
25
+ "vue": "^2.6.10",
26
+ "xss": "^1.0.14"
25
27
  },
26
28
  "devDependencies": {
27
29
  "@vue/cli-plugin-babel": "^4.0.0",
@@ -1,15 +1,15 @@
1
1
  <template>
2
2
  <div class="context-card-container" ref="container">
3
3
  <div v-show="showContextCard">
4
- <div v-show="showDetails" class="hide" @click="showDetails = !showDetails">Hide information panel<i class="el-icon-arrow-up"></i></div>
5
- <div v-show="!showDetails" class="hide" @click="showDetails = !showDetails">Show information panel<i class="el-icon-arrow-down"></i></div>
4
+ <div v-show="showDetails" class="hide" @click="showDetails = !showDetails">Hide information<i class="el-icon-arrow-up"></i></div>
5
+ <div v-show="!showDetails" class="hide" @click="showDetails = !showDetails">Show information<i class="el-icon-arrow-down"></i></div>
6
6
  <el-card v-if="showDetails && Object.keys(contextData).length !== 0" v-loading="loading" class="context-card" >
7
7
  <div class="card-left">
8
8
  <img :src="banner" class="context-image">
9
9
  </div>
10
10
  <div class="card-right scrollbar">
11
11
  <div class="title">{{contextData.heading}}</div>
12
- <div v-html="contextData.description"/>
12
+ <div v-html="parseMarkdown(contextData.description)"/>
13
13
  <br/>
14
14
 
15
15
  <!-- Show sampeles and views seperately if they do not match -->
@@ -71,6 +71,9 @@ import locale from "element-ui/lib/locale";
71
71
  import EventBus from "./EventBus"
72
72
  import hardcoded_info from './hardcoded-context-info'
73
73
 
74
+ import { marked } from 'marked'
75
+ import xss from 'xss'
76
+
74
77
  locale.use(lang);
75
78
  Vue.use(Link);
76
79
  Vue.use(Icon);
@@ -160,8 +163,8 @@ export default {
160
163
  },
161
164
  banner: function(){
162
165
  if (this.contextData.banner){
163
- this.getFileFromPath(this.contextData.banner)
164
- } else if (this.contextData && this.contextData.views) {
166
+ return this.getFileFromPath(this.contextData.banner)
167
+ } else if (this.contextData && this.contextData.views && this.contextData.views.length > 0) {
165
168
  if(this.contextData.views[0].thumbnail){
166
169
  return this.getFileFromPath(this.contextData.views[0].thumbnail)
167
170
  }
@@ -255,6 +258,9 @@ export default {
255
258
  return `${this.envVars.ROOT_URL}/file/${sample.discoverId}/${sample.version}?path=${this.processPathForUrl(sample.path)}`
256
259
 
257
260
  },
261
+ parseMarkdown(markdown){
262
+ return xss(marked.parse(markdown))
263
+ },
258
264
  openViewFile: function(view){
259
265
  // note that we assume that the view file is in the same directory as the scaffold (viewUrls take relative paths)
260
266
  this.entry.viewUrl = `${this.envVars.API_LOCATION}s3-resource/${this.entry.discoverId}/${this.entry.version}/${view.path}`