Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ay-accordion

Package Overview
Dependencies
Maintainers
2
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ay-accordion - npm Package Compare versions

Comparing version 2.1.0 to 2.1.1

6

.eslintrc.js

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

/*! Copyright 2019 Ayogo Health Inc. */
/*! Copyright 2019 - 2022 Ayogo Health Inc. */

@@ -37,5 +37,5 @@ module.exports = {

"header/header": [2, "block", { "pattern": "! Copyright \\d{4} Ayogo Health Inc." }],
"header/header": [2, "block", { "pattern": "! Copyright .+ Ayogo Health Inc." }],
"@typescript-eslint/class-name-casing": "warn",
"@typescript-eslint/naming-convention": ["warn", { selector: 'class', format: ['PascalCase'] }],
"@typescript-eslint/indent": ["error", 2],

@@ -42,0 +42,0 @@ "@typescript-eslint/no-namespace": "error",

@@ -5,13 +5,13 @@ /*! Copyright 2019 Ayogo Health Inc. */

factory();
}((function () { 'use strict';
})((function () { 'use strict';
/*! Copyright 2020 Ayogo Health Inc. */
/*! Copyright 2019 - 2022 Ayogo Health Inc. */
const useClipPath = window.CSS && window.CSS.supports && window.CSS.supports('clip-path', 'inset(0px 0px 0px 0px)');
function run(fn, accordion) {
let root = accordion.closest('ay-accordion-root');
let elementsToWatch = Array.prototype.filter.call(root.childNodes, function (el) {
const root = accordion.closest('ay-accordion-root');
const elementsToWatch = Array.prototype.filter.call(root.childNodes, function (el) {
return el.nodeType === 1;
});
let preRoot = root.getBoundingClientRect();
let measurements = Array.prototype.map.call(elementsToWatch, function (el) {
const preRoot = root.getBoundingClientRect();
const measurements = Array.prototype.map.call(elementsToWatch, function (el) {
return {

@@ -26,3 +26,3 @@ el: el,

root.querySelectorAll('ay-accordion').forEach((acc) => {
if (acc.hasAttribute('open') && acc != accordion) {
if (acc.hasAttribute('open') && acc !== accordion) {
acc.removeAttribute('open');

@@ -140,3 +140,3 @@ }

/*! Copyright 2019 Ayogo Health Inc. */
/*! Copyright 2019 - 2022 Ayogo Health Inc. */
const accordionEventMap = new WeakMap();

@@ -207,2 +207,3 @@ class AyAccordion extends HTMLElement {

this.addEventListener('toggle', handleToggle);
Array.prototype.forEach.call(this.children, (el) => this.childCallback(el));
}

@@ -234,3 +235,3 @@ disconnectedCallback() {

/*! Copyright 2019 Ayogo Health Inc. */
/*! Copyright 2019 - 2022 Ayogo Health Inc. */
const accordionHeaderClickMap = new WeakMap();

@@ -279,3 +280,3 @@ const accordionHeaderPressMap = new WeakMap();

})));
}));
//# sourceMappingURL=index.js.map

@@ -1,5 +0,3 @@

/*! Copyright 2019 Ayogo Health Inc. */
/*! Copyright 2019 - 2022 Ayogo Health Inc. */
/**
*
*
* ay-accordion-header acts as a button for its first parent ay-accordion element thereby enabling the toggle functionality

@@ -15,3 +13,2 @@ *

* @name ay-accordion-header
*
*/

@@ -18,0 +15,0 @@ export declare class AyAccordionHeader extends HTMLElement {

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

/*! Copyright 2019 Ayogo Health Inc. */
/*! Copyright 2019 - 2022 Ayogo Health Inc. */
const accordionHeaderClickMap = new WeakMap();
const accordionHeaderPressMap = new WeakMap();
/**
*
*
* ay-accordion-header acts as a button for its first parent ay-accordion element thereby enabling the toggle functionality

@@ -15,6 +15,3 @@ *

* @name ay-accordion-header
*
*/
const accordionHeaderClickMap = new WeakMap();
const accordionHeaderPressMap = new WeakMap();
export class AyAccordionHeader extends HTMLElement {

@@ -21,0 +18,0 @@ connectedCallback() {

@@ -1,2 +0,3 @@

/*! Copyright 2020 Ayogo Health Inc. */
/*! Copyright 2019 - 2022 Ayogo Health Inc. */
declare function run(fn: any, accordion: HTMLElement): void;
/**

@@ -21,7 +22,5 @@ * ay-accordion-root is a web-component which wraps the ay-accordion elements as its children.

* @name ay-accordion-root
*
*/
declare function run(fn: any, accordion: HTMLElement): void;
export declare class AyAccordionRoot extends HTMLElement {
}
export { run };

@@ -1,32 +0,11 @@

/*! Copyright 2020 Ayogo Health Inc. */
/**
* ay-accordion-root is a web-component which wraps the ay-accordion elements as its children.
*
* ay-accordion-root can take on the following attributes
* multiple: This attribute allows multiple accordion sections to be open at the same time (default is only a single section expanded at a time).
*
* For example:
* ```
* <ay-accordion-root>
* <ay-accordion>
* <ay-accordion-header>
* Button Name
* </ay-accordion-header>
* <p> Some content </p>
* </ay-accordion>
* </ay-accordion-root>
* ```
*
* @name ay-accordion-root
*
*/
/*! Copyright 2019 - 2022 Ayogo Health Inc. */
const useClipPath = window.CSS && window.CSS.supports && window.CSS.supports('clip-path', 'inset(0px 0px 0px 0px)');
function run(fn, accordion) {
let root = accordion.closest('ay-accordion-root');
let elementsToWatch = Array.prototype.filter.call(root.childNodes, function (el) {
const root = accordion.closest('ay-accordion-root');
const elementsToWatch = Array.prototype.filter.call(root.childNodes, function (el) {
return el.nodeType === 1;
});
let preRoot = root.getBoundingClientRect();
const preRoot = root.getBoundingClientRect();
// Take initial measurements
let measurements = Array.prototype.map.call(elementsToWatch, function (el) {
const measurements = Array.prototype.map.call(elementsToWatch, function (el) {
return {

@@ -42,3 +21,3 @@ el: el,

root.querySelectorAll('ay-accordion').forEach((acc) => {
if (acc.hasAttribute('open') && acc != accordion) {
if (acc.hasAttribute('open') && acc !== accordion) {
acc.removeAttribute('open');

@@ -152,2 +131,22 @@ }

}
/**
* ay-accordion-root is a web-component which wraps the ay-accordion elements as its children.
*
* ay-accordion-root can take on the following attributes
* multiple: This attribute allows multiple accordion sections to be open at the same time (default is only a single section expanded at a time).
*
* For example:
* ```
* <ay-accordion-root>
* <ay-accordion>
* <ay-accordion-header>
* Button Name
* </ay-accordion-header>
* <p> Some content </p>
* </ay-accordion>
* </ay-accordion-root>
* ```
*
* @name ay-accordion-root
*/
export class AyAccordionRoot extends HTMLElement {

@@ -154,0 +153,0 @@ }

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

/*! Copyright 2019 Ayogo Health Inc. */
/*! Copyright 2019 - 2022 Ayogo Health Inc. */
/**

@@ -22,3 +22,2 @@ * ay-accordion is a web-component that enables hiding and showing of its child nodes by the use of click handlers

* @name ay-accordion
*
*/

@@ -25,0 +24,0 @@ export declare class AyAccordion extends HTMLElement {

@@ -1,2 +0,4 @@

/*! Copyright 2019 Ayogo Health Inc. */
/*! Copyright 2019 - 2022 Ayogo Health Inc. */
import { run } from '../ay-accordion-root/index';
const accordionEventMap = new WeakMap();
/**

@@ -22,8 +24,4 @@ * ay-accordion is a web-component that enables hiding and showing of its child nodes by the use of click handlers

* @name ay-accordion
*
*/
import { run } from '../ay-accordion-root/index';
const accordionEventMap = new WeakMap();
export class AyAccordion extends HTMLElement {
//Add event listeners for the dispatched events from the ay-acc-hed
childCallback(el) {

@@ -92,2 +90,3 @@ if (el.tagName === 'AY-ACCORDION-HEADER') {

this.addEventListener('toggle', handleToggle);
Array.prototype.forEach.call(this.children, (el) => this.childCallback(el));
}

@@ -94,0 +93,0 @@ disconnectedCallback() {

{
"name": "ay-accordion",
"version": "2.1.0",
"version": "2.1.1",
"copyright": "Copyright 2016 Ayogo Health Inc.",

@@ -27,17 +27,17 @@ "license": "MIT",

"devDependencies": {
"@typescript-eslint/eslint-plugin": "^2.27.0",
"@typescript-eslint/parser": "^2.27.0",
"eslint": "^6.8.0",
"@typescript-eslint/eslint-plugin": "^5.34.0",
"@typescript-eslint/parser": "^5.34.0",
"eslint": "^8.22.0",
"eslint-plugin-header": "^3.0.0",
"rollup": "^2.3.3",
"rollup-plugin-cleanup": "^3.1.1",
"rollup-plugin-commonjs": "^10.1.0",
"rollup-plugin-sourcemaps": "^0.5.0",
"typescript": "^3.8.3"
"rollup-plugin-sourcemaps": "^0.6.3",
"typescript": "^4.2.4"
},
"scripts": {
"build": "tsc -p tsconfig.json && rollup dist/index.js -n ayAccordion -c rollup.config.js -o dist/index.js",
"version": "npm run build && git add -A dist",
"postversion": "git push && git push --tags"
"lint": "eslint --ext .ts src",
"postversion": "git push && git push --tags",
"version": "npm run build && git add -A dist"
}
}

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

Sorry, the diff of this file is not supported yet

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