Comparing version 0.1.56 to 0.1.57
@@ -255,3 +255,3 @@ /** - BROWSER COMPATIBILITY HELPER - */ | ||
else if(url.includes("open.bu") || url.includes("archives")){ site_code = "collections"; } | ||
else if(url.includes("guides")){ site_code = "guides" } | ||
else if(url.includes("guides") || url.includes("library.bu.edu")){ site_code = "guides" } | ||
else if(url.includes("buprimo") || url.includes("exlibrisgroup") || url.includes("primo-explore")){ site_code = "search"; } | ||
@@ -258,0 +258,0 @@ else if(url.includes(".bu.edu/library")){ |
@@ -30,7 +30,7 @@ /** | ||
"url": "bundle.css", | ||
"revision": "f6b10620beb391d1b3b6b4e08dccaa12" | ||
"revision": "cc81b1f803b27473ddb2fb213b4c872d" | ||
}, | ||
{ | ||
"url": "bundle.esm.js", | ||
"revision": "cf637e6006a88d7d17f21aa0c2270f62" | ||
"revision": "acedb38145466f9d6ba3b581d2717595" | ||
}, | ||
@@ -43,3 +43,3 @@ { | ||
"url": "helpers.js", | ||
"revision": "1b90c96bbcbc8d02a5a7f71dfcb0b4c0" | ||
"revision": "d21298b4b0abacb5137d8bc89525a50c" | ||
}, | ||
@@ -60,3 +60,3 @@ { | ||
"url": "libguides.css", | ||
"revision": "a26fa7e8bff4f2fe637a6def97f8a523" | ||
"revision": "1f6338c3ce7dfbb98e714d07c11de4cc" | ||
}, | ||
@@ -63,0 +63,0 @@ { |
{ | ||
"name": "bulib-wc", | ||
"version": "0.1.56", | ||
"version": "0.1.57", | ||
"description": "collection of web components and styles used at Boston University Libraries", | ||
@@ -5,0 +5,0 @@ "type": "module", |
@@ -141,3 +141,3 @@ /** - LIBRARY INFO HELPER - */ | ||
else if(url.includes("open.bu") || url.includes("archives")){ site_code = "collections"; } | ||
else if(url.includes("guides")){ site_code = "guides" } | ||
else if(url.includes("guides") || url.includes("library.bu.edu")){ site_code = "guides" } | ||
else if(url.includes("buprimo") || url.includes("exlibrisgroup") || url.includes("primo-explore")){ site_code = "search"; } | ||
@@ -144,0 +144,0 @@ else if(url.includes(".bu.edu/library")){ |
@@ -22,4 +22,2 @@ import {LitElement, html} from 'lit-element/lit-element'; | ||
link: {type: String}, | ||
/** custom javascript */ | ||
action: {type: String}, | ||
/** add 'small' class to card */ | ||
@@ -36,5 +34,5 @@ small: {type: Boolean}, | ||
<div class="card${this.small === true? ' small' : ''}"> | ||
<i class="material-icons" @click="${(ev) => this._logGAEvent()}">${this.icon}</i> | ||
<i class="material-icons" @click="${(ev) => this._clickAction()}">${this.icon}</i> | ||
<div class="inline"> | ||
<h3><a @click="${(ev) => this._logGAEvent()}" href="${href}">${this.title}</a></h3> | ||
<h3><a @click="${(ev) => this._clickAction()}" href="${href}">${this.title}</a></h3> | ||
<p>${this.description}</p> | ||
@@ -46,6 +44,5 @@ </div> | ||
_logGAEvent(event){ | ||
_clickAction(event){ | ||
sendGAEvent("bulib-card", this.title.toLowerCase(), window.location.pathname); | ||
if(this.action){ eval(this.action); } | ||
else{ window.location = this.link; } | ||
if(this.link){ window.location = this.link; } | ||
} | ||
@@ -52,0 +49,0 @@ |
@@ -14,3 +14,3 @@ import {LitElement, html, css} from 'lit-element/lit-element'; | ||
{"title":"Visiting the Libraries","href":"https://www.bu.edu/library/help/visiting-the-libraries/"}, | ||
{"title":"Course Reserves", "href":"http://www-staging.bu.edu/library/services/reserves/"}, | ||
{"title":"Course Reserves", "href":"https://www.bu.edu/library/services/reserves/"}, | ||
{"title":"Research Guides", "href":"https://library.bu.edu/guides/"}, | ||
@@ -17,0 +17,0 @@ {"title":"Staff Directory", "href":"https://www.bu.edu/library/about/who-we-are/staff-directory/"} |
@@ -13,2 +13,3 @@ import '@webcomponents/webcomponentsjs/webcomponents-loader'; | ||
import ('./footer/bulib-footer'); | ||
import ('./promo/bulib-promo'); | ||
}); |
@@ -37,22 +37,13 @@ import {LitElement, html} from 'lit-element/lit-element'; | ||
let raw_social = myLocoso["social"] || {}; | ||
let social = this._prepareSocial(raw_social); | ||
let include_libhours = ALLOW_HOURS_DISPLAY && this.library && this.library != "help"; | ||
this._logToConsole("lib_name: " + lib_name + ", include_libhours: " + include_libhours); | ||
let socialDisplay; | ||
if(social.length < 1){ socialDisplay = html``; } | ||
else{ | ||
socialDisplay= html` | ||
let socialDisplay = html` | ||
<h3>Follow Us</h3> | ||
<ul aria-description="list of social media accounts" class="no-bullet inline-list plm"> | ||
${social.map((s) => | ||
html`<li><a title="${s.text}" class="${this.link_class}" @click="${(ev) => {this._logGAEvent(s.text);}}" | ||
href="${s.url}" target="_blank"><img alt="${s.text} icon" class="sm-icon ${this.link_class}" | ||
src="https://cdn.jsdelivr.net/npm/bulib-wc@latest/dist/icons/icons8-${s.text}-48.png"></a></li>` | ||
)} | ||
<li><a target="_blank" title="twitter" class="white-link" href="http://twitter.com/bulibraries"><img alt="twitter icon" class="sm-icon white-link" src="https://cdn.jsdelivr.net/npm/bulib-wc@latest/dist/icons/icons8-twitter-48.png"></a></li> | ||
<li><a target="_blank" title="facebook" class="white-link" href="http://facebook.com/bostonulibraries"><img alt="facebook icon" class="sm-icon white-link" src="https://cdn.jsdelivr.net/npm/bulib-wc@latest/dist/icons/icons8-facebook-48.png"></a></li> | ||
<li><a target="_blank" title="instagram" class="white-link" href="https://instagram.com/bulibraries"><img alt="instagram icon" class="sm-icon white-link" src="https://cdn.jsdelivr.net/npm/bulib-wc@latest/dist/icons/icons8-instagram-48.png"></a></li> | ||
</ul> | ||
`; | ||
} | ||
@@ -137,26 +128,2 @@ return html` | ||
/** use raw 'social' data to generate a list of basic profile links for easy display */ | ||
_prepareSocial(rawSocial){ | ||
if(Object.keys(rawSocial).length < 1){ return []; } | ||
let social = []; | ||
if(rawSocial["twitter"]){ | ||
social.push( {"text":"twitter", "url":"http://twitter.com/"+rawSocial["twitter"]} ); | ||
} | ||
if(rawSocial["facebook"]){ | ||
social.push( {"text":"facebook", "url":"http://facebook.com/"+rawSocial["facebook"]} ); | ||
} | ||
if(rawSocial["instagram"]){ | ||
social.push( {"text":"instagram", "url":"https://instagram.com/"+rawSocial["instagram"]} ); | ||
} | ||
if(rawSocial["flickr"]){ | ||
social.push( {"text":"flickr", "url":"https://www.flickr.com/photos/"+rawSocial["flickr"]} ); | ||
} | ||
if(rawSocial["tumblr"]){ | ||
social.push( {"text":"tumblr", "url":"http://"+rawSocial["tumblr"]+".tumblr.com/"} ); | ||
} | ||
this._logToConsole(`${social.length.toString()} items found for 'social'.`); | ||
return social; | ||
} | ||
_logGAEvent(clickedContent){ | ||
@@ -163,0 +130,0 @@ sendGAEvent('bulib-locoso', clickedContent, this.library); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 3 instances in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
520396
90
6240
7