New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

aotc-component-lib

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

aotc-component-lib - npm Package Compare versions

Comparing version 1.0.2 to 1.1.0

dist/aotc-components-7a74b4b75323ab8c782a80741eace98f.js

2

dist/manifest.json

@@ -1,1 +0,1 @@

{"aotc-components.css":"./dist/aotc-components-8640abf1b6c95823d093fc0eba0db7a8.css","aotc-components.js":"./dist/aotc-components-6ded94b0bbcb5dc627b2efbbca8aec87.js"}
{"aotc-components.css":"./dist/aotc-components-ddf8d9d20607856d9ef484ec8f6422c3.css","aotc-components.js":"./dist/aotc-components-7a74b4b75323ab8c782a80741eace98f.js"}

@@ -35,2 +35,3 @@ /* global HTMLElement, customElements, DOMParser, FormData, fetch, window, XMLSerializer, CustomEvent */

this.input.addEventListener('focusout', this.deactivate.bind(this))
this.input.addEventListener('focus', this.activate.bind(this))
this.submit.addEventListener('click', this.triggerSearch.bind(this))

@@ -89,8 +90,13 @@ }

const results = await response.text()
try {
const results = await response.text()
const dataReceivedEvent = new CustomEvent('async-form-data-received', { bubbles: true })
this.dispatchEvent(dataReceivedEvent)
const dataReceivedEvent = new CustomEvent('async-form-data-received', { bubbles: true })
this.dispatchEvent(dataReceivedEvent)
this.render(results)
this.render(results)
} catch (e) {
console.log(e)
this.renderError(e)
}
})

@@ -108,2 +114,8 @@ }

renderError (error) {
if (this.target) {
this.target.innerHTML = error.message
}
}
searchUrl (form) {

@@ -110,0 +122,0 @@ const queryParams = new FormData(form)

@@ -10,2 +10,8 @@ /* global customElements, HTMLElement */

this.changeHandler = e => {
const { target } = e
const inputFieldId = target.getAttribute('id')
if (inputFieldId) {
// add input id hash to action, to maintain scroll height after filtering
this.form.action = urlWithHash(this.form.action, inputFieldId)
}
this.form.submit()

@@ -23,1 +29,14 @@ }

customElements.define('reactive-filter-search', ReactiveFilterSearch)
function urlWithHash (url, hash) {
let relativeURL, absoluteURL
try {
absoluteURL = new URL(url)
} catch (e) {
relativeURL = url
}
const a = document.createElement('a')
a.href = absoluteURL || relativeURL
a.hash = hash
return absoluteURL ? a.href : `${a.pathname}${a.hash}`
}
export { CombinedSearchForm } from './components/combined-search-form.js'
export { ReactiveFilterSearch } from './components/reactive-filter-search.js'
export { DateSelect } from './components/date-select.js'
{
"name": "aotc-component-lib",
"version": "1.0.2",
"version": "1.1.0",
"description": "",

@@ -5,0 +5,0 @@ "main": "dist/manifest.json",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc