New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.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

to
1.0.2

29

dist/accordion.js

@@ -174,3 +174,2 @@ /*! Copyright (c) 2016 Ayogo Health Inc.

self.isOpen = false;
$element[0].setAttribute('role', 'group');
self.open = function () {

@@ -207,2 +206,13 @@ $element.addClass('open');

self.rootCtrl.run(fn, function () {
Array.prototype.forEach.call($element.children(), function (el) {
if (el.hasAttribute('ay-accordion-header')) {
return;
}
if (self.isOpen) {
el.removeAttribute('hidden');
}
else {
el.setAttribute('hidden', 'hidden');
}
});
cb();

@@ -216,4 +226,15 @@ });

selfCtrl.rootCtrl = rootCtrl;
Array.prototype.forEach.call($element.children(), function (el) {
if (el.hasAttribute('ay-accordion-header')) {
return;
}
if ($element[0].hasAttribute('open')) {
el.removeAttribute('hidden');
}
else {
el.setAttribute('hidden', 'hidden');
}
});
$attrs.$observe('open', function (newval) {
if (newval) {
if (newval != null) {
if (!$element.hasClass('open')) {

@@ -251,3 +272,3 @@ selfCtrl.open();

});
$element.on('keyup', function ($event) {
$element.on('keydown', function ($event) {
if ($event.keyCode === 32 || $event.keyCode === 13) {

@@ -260,2 +281,2 @@ return activate($event);

});
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWNjb3JkaW9uLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL2FjY29yZGlvbi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7Ozs7Ozs7Ozs7Ozs7OztHQW1CRztBQWlCSCxPQUFPLENBQUMsTUFBTSxDQUFDLGFBQWEsRUFBRSxFQUFFLENBQUM7S0FDaEMsU0FBUyxDQUFDLGlCQUFpQixFQUFFO0lB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lsZHJlbiA9IGZpbHRlci5jYWxsKG0uZWwuY2hpbGROb2RlcywgZnVuY3Rpb24oZWwpIHtcbiAgICAgICAgICAgICAgcmV0dXJuIGVsLm5vZGVUeXBlID09PSAxO1xuICAgICAgICAgICAgfSk7XG5cbiAgICAgICAgICAgIGZvckVhY2guY2FsbChtLmNoaWxkcmVuLCBmdW5jdGlvbihlbCkge1xuICAgICAgICAgICAgICB2YXIgZWxEaW1lbnNpb25zID0gZWwuZ2V0Qm91bmRpbmdDbGllbnRSZWN0KCk7XG4gICAgICAgICAgICAgIHZhciBvZmZzZXRGcm9tUGFyZW50ID0ge1xuICAgICAgICAgICAgICAgIHg6IG0ubmV3RGltZW5zaW9ucy5sZWZ0IC0gZWxEaW1lbnNpb25zLmxlZnQsXG4gICAgICAgICAgICAgICAgeTogbS5uZXdEaW1lbnNpb25zLnRvcCAgLSBlbERpbWVuc2lvbnMudG9wXG4gICAgICAgICAgICAgIH07XG5cbiAgICAgICAgICAgICAgdmFyIG9yaWdpbiA9IG9mZnNldEZyb21QYXJlbnQueCArICdweCAnO1xuICAgICAgICAgICAgICBvcmlnaW4gKz0gb2Zmc2V0RnJvbVBhcmVudC55ICsgJ3B4JztcblxuICAgICAgICAgICAgICBzdHlsZShlbCwgJ3RyYW5zZm9ybS1vcmlnaW4nLCBvcmlnaW4pO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgfVxuICAgICAgICB9KTtcblxuICAgICAgICB2YXIgZHVyYXRpb24gPSAxMDA7IC8vIEluIG1pbGxpc2Vjb25kc1xuICAgICAgICB2YXIgdCA9IDE7XG5cbiAgICAgICAgZnVuY3Rpb24gdHdlZW4oKSB7XG4gICAgICAgICAgZm9yRWFjaC5jYWxsKG1lYXN1cmVtZW50cywgZnVuY3Rpb24obSkge1xuICAgICAgICAgICAgaWYgKG0uaW5pdGlhbERpbWVuc2lvbnMuaGVpZ2h0ID09PSBtLm5ld0RpbWVuc2lvbnMuaGVpZ2h0ICYmXG4gICAgICAgICAgICAgICAgbS5pbml0aWFsRGltZW5zaW9ucy53aWR0aCAgPT09IG0ubmV3RGltZW5zaW9ucy53aWR0aCAgJiZcbiAgICAgICAgICAgICAgICBtLmluaXRpYWxEaW1lbnNpb25zLmxlZnQgICA9PT0gbS5uZXdEaW1lbnNpb25zLmxlZnQgICAmJlxuICAgICAgICAgICAgICAgIG0uaW5pdGlhbERpbWVuc2lvbnMudG9wICAgID09PSBtLm5ld0RpbWVuc2lvbnMudG9wKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICB2YXIgdFNjYWxlWCAgID0gMSArIChtLm5ld1NjYWxlLnggLSAxKSAqIHQ7XG4gICAgICAgICAgICB2YXIgdFNjYWxlWSAgID0gMSArIChtLm5ld1NjYWxlLnkgLSAxKSAqIHQ7XG4gICAgICAgICAgICB2YXIgdE9mZnNldFggID0gbS5uZXdPZmZzZXQueCAqIHQ7XG4gICAgICAgICAgICB2YXIgdE9mZnNldFkgID0gbS5uZXdPZmZzZXQueSAqIHQ7XG5cbiAgICAgICAgICAgIHZhciB0cmFuc2Zvcm0gPSAndHJhbnNsYXRlKCc7XG4gICAgICAgICAgICB0cmFuc2Zvcm0gKz0gdE9mZnNldFggKyAncHgsICc7XG4gICAgICAgICAgICB0cmFuc2Zvcm0gKz0gdE9mZnNldFkgKyAncHgpICc7XG4gICAgICAgICAgICB0cmFuc2Zvcm0gKz0gJ3NjYWxlKCcgKyB0U2NhbGVYICsgJywnICsgdFNjYWxlWSArICcpICc7XG4gICAgICAgICAgICB0cmFuc2Zvcm0gKz0gbS5pbml0aWFsVHJhbnNmb3JtO1xuXG4gICAgICAgICAgICBzdHlsZShtLmVsLCAndHJhbnNmb3JtJywgdHJhbnNmb3JtKTtcblxuICAgICAgICAgICAgZm9yRWFjaC5jYWxsKG0uY2hpbGRyZW4sIGZ1bmN0aW9uKGVsKSB7XG4gICAgICAgICAgICAgIHZhciBzY2FsZSA9ICdzY2FsZSgnICsgKDEvdFNjYWxlWCkgKyAnLCcgKyAoMS90U2NhbGVZKSArICcpJztcblxuICAgICAgICAgICAgICBzdHlsZShlbCwgJ3RyYW5zZm9ybScsIHNjYWxlKTtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgdCAtPSAoMTYgLyBkdXJhdGlvbik7XG5cbiAgICAgICAgICBpZiAodCA+IDApIHtcbiAgICAgICAgICAgIHJlcXVlc3RBbmltYXRpb25GcmFtZSh0d2Vlbik7XG4gICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIGNsZWFudXAoKTtcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgdHdlZW4oKTtcblxuICAgICAgICBmdW5jdGlvbiBjbGVhbnVwKCkge1xuICAgICAgICAgIGZvckVhY2guY2FsbChtZWFzdXJlbWVudHMsIGZ1bmN0aW9uKG0pIHtcbiAgICAgICAgICAgIHN0eWxlKG0uZWwsICd0cmFuc2Zvcm0tb3JpZ2luJywgJycpO1xuICAgICAgICAgICAgc3R5bGUobS5lbCwgJ3RyYW5zZm9ybScsIG0uaW5pdGlhbFRyYW5zZm9ybSk7XG5cbiAgICAgICAgICAgIGZvckVhY2guY2FsbChtLmNoaWxkcmVuLCBmdW5jdGlvbihlbCkge1xuICAgICAgICAgICAgICBzdHlsZShlbCwgJ3RyYW5zZm9ybS1vcmlnaW4nLCAnJyk7XG4gICAgICAgICAgICAgIHN0eWxlKGVsLCAndHJhbnNmb3JtJywgJycpO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgfSk7XG5cbiAgICAgICAgICBzZWxmLmJsb2NrQ2xpY2tzID0gZmFsc2U7XG4gICAgICAgICAgc2VsZi5yb290LnN0eWxlLm1pbkhlaWdodCA9IG51bGw7XG5cbiAgICAgICAgICAvKiBJbnZva2Ugb3VyIGNhbGxiYWNrIGZ1bmN0aW9uIHdoZW4gZG9uZSAqL1xuICAgICAgICAgICRzY29wZS4kY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AgICAgICB9KTtcbiAgICAgICAgc2VsZlsnb25Ub2dnbGUnXSh7c3RhdGU6IHRydWV9KTtcblxuICAgICAgICBpZiAoIXNlbGYucm9vdEN0cmwubXVsdGlwbGUpIHtcbiAgICAgICAgICBzZWxmLnJvb3RDdHJsLmN1clBhbmVsID0gc2VsZjtcbiAgICAgICAgfVxuICAgICAgfTtcblxuICAgICAgc2VsZi5jbG9zZSA9IGZ1bmN0aW9uKCkge1xuICAgICAgICAkZWxlbWVudC5yZW1vdmVDbGFzcygnb3BlbicpO1xuICAgICAgICAkZWxlbWVudFswXS5yZW1vdmVBdHRyaWJ1dGUoJ29wZW4nKTtcblxuICAgICAgICAkc2NvcGUuJGFwcGx5QXN5bmMoKCkgPT4ge1xuICAgICAgICAgIHNlbGYuaXNPcGVuID0gZmFsc2U7XG4gICAgICAgIH0pO1xuICAgICAgICBzZWxmWydvblRvZ2dsZSddKHtzdGF0ZTogZmFsc2V9KTtcblxuXG4gICAgICAgIGlmIChzZWxmLnJvb3RDdHJsLmN1clBhbmVsID09PSBzZWxmKSB7XG4gICAgICAgICAgc2VsZi5yb290Q3RybC5jdXJQYW5lbCA9IG51bGw7XG4gICAgICAgIH1cbiAgICAgIH07XG5cblxuICAgICAgc2VsZi50b2dnbGUgPSBmdW5jdGlvbihjYikge1xuICAgICAgICBpZiAoc2VsZi5yb290Q3RybC5ibG9ja0NsaWNrcykge1xuICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuXG4gICAgICAgIHZhciBmbiA9IHNlbGYuaXNPcGVuID8gc2VsZi5jbG9zZSA6IHNlbGYub3BlbjtcblxuICAgICAgICBzZWxmLnJvb3RDdHJsLnJ1bihmbiwgZnVuY3Rpb24oKSB7XG4gICAgICAgICAgY2IoKTtcbiAgICAgICAgfSk7XG4gICAgICB9O1xuICAgIH0sXG4gICAgbGluazogZnVuY3Rpb24oJHNjb3BlLCAkZWxlbWVudCwgJGF0dHJzLCAkY3RybHMpIHtcbiAgICAgIHZhciBzZ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KTtcblxuICAgICAgICAgICAgZm9yRWFjaC5jYWxsKG0uY2hpbGRyZW4sIGZ1bmN0aW9uKGVsKSB7XG4gICAgICAgICAgICAgIHZhciBlbERpbWVuc2lvbnMgPSBlbC5nZXRCb3VuZGluZ0NsaWVudFJlY3QoKTtcbiAgICAgICAgICAgICAgdmFyIG9mZnNldEZyb21QYXJlbnQgPSB7XG4gICAgICAgICAgICAgICAgeDogbS5uZXdEaW1lbnNpb25zLmxlZnQgLSBlbERpbWVuc2lvbnMubGVmdCxcbiAgICAgICAgICAgICAgICB5OiBtLm5ld0RpbWVuc2lvbnMudG9wICAtIGVsRGltZW5zaW9ucy50b3BcbiAgICAgICAgICAgICAgfTtcblxuICAgICAgICAgICAgICB2YXIgb3JpZ2luID0gb2Zmc2V0RnJvbVBhcmVudC54ICsgJ3B4ICc7XG4gICAgICAgICAgICAgIG9yaWdpbiArPSBvZmZzZXRGcm9tUGFyZW50LnkgKyAncHgnO1xuXG4gICAgICAgICAgICAgIHN0eWxlKGVsLCAndHJhbnNmb3JtLW9yaWdpbicsIG9yaWdpbik7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICB9XG4gICAgICAgIH0pO1xuXG4gICAgICAgIHZhciBkdXJhdGlvbiA9IDEwMDsgLy8gSW4gbWlsbGlzZWNvbmRzXG4gICAgICAgIHZhciB0ID0gMTtcblxuICAgICAgICBmdW5jdGlvbiB0d2VlbigpIHtcbiAgICAgICAgICBmb3JFYWNoLmNhbGwobWVhc3VyZW1lbnRzLCBmdW5jdGlvbihtKSB7XG4gICAgICAgICAgICBpZiAobS5pbml0aWFsRGltZW5zaW9ucy5oZWlnaHQgPT09IG0ubmV3RGltZW5zaW9ucy5oZWlnaHQgJiZcbiAgICAgICAgICAgICAgICBtLmluaXRpYWxEaW1lbnNpb25zLndpZHRoICA9PT0gbS5uZXdEaW1lbnNpb25zLndpZHRoICAmJlxuICAgICAgICAgICAgICAgIG0uaW5pdGlhbERpbWVuc2lvbnMubGVmdCAgID09PSBtLm5ld0RpbWVuc2lvbnMubGVmdCAgICYmXG4gICAgICAgICAgICAgICAgbS5pbml0aWFsRGltZW5zaW9ucy50b3AgICAgPT09IG0ubmV3RGltZW5zaW9ucy50b3ApIHtcbiAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHZhciB0U2NhbGVYICAgPSAxICsgKG0ubmV3U2NhbGUueCAtIDEpICogdDtcbiAgICAgICAgICAgIHZhciB0U2NhbGVZICAgPSAxICsgKG0ubmV3U2NhbGUueSAtIDEpICogdDtcbiAgICAgICAgICAgIHZhciB0T2Zmc2V0WCAgPSBtLm5ld09mZnNldC54ICogdDtcbiAgICAgICAgICAgIHZhciB0T2Zmc2V0WSAgPSBtLm5ld09mZnNldC55ICogdDtcblxuICAgICAgICAgICAgdmFyIHRyYW5zZm9ybSA9ICd0cmFuc2xhdGUoJztcbiAgICAgICAgICAgIHRyYW5zZm9ybSArPSB0T2Zmc2V0WCArICdweCwgJztcbiAgICAgICAgICAgIHRyYW5zZm9ybSArPSB0T2Zmc2V0WSArICdweCkgJztcbiAgICAgICAgICAgIHRyYW5zZm9ybSArPSAnc2NhbGUoJyArIHRTY2FsZVggKyAnLCcgKyB0U2NhbGVZICsgJykgJztcbiAgICAgICAgICAgIHRyYW5zZm9ybSArPSBtLmluaXRpYWxUcmFuc2Zvcm07XG5cbiAgICAgICAgICAgIHN0eWxlKG0uZWwsICd0cmFuc2Zvcm0nLCB0cmFuc2Zvcm0pO1xuXG4gICAgICAgICAgICBmb3JFYWNoLmNhbGwobS5jaGlsZHJlbiwgZnVuY3Rpb24oZWwpIHtcbiAgICAgICAgICAgICAgdmFyIHNjYWxlID0gJ3NjYWxlKCcgKyAoMS90U2NhbGVYKSArICcsJyArICgxL3RTY2FsZVkpICsgJyknO1xuXG4gICAgICAgICAgICAgIHN0eWxlKGVsLCAndHJhbnNmb3JtJywgc2NhbGUpO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgfSk7XG5cbiAgICAgICAgICB0IC09ICgxNiAvIGR1cmF0aW9uKTtcblxuICAgICAgICAgIGlmICh0ID4gMCkge1xuICAgICAgICAgICAgcmVxdWVzdEFuaW1hdGlvbkZyYW1lKHR3ZWVuKTtcbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgY2xlYW51cCgpO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICB0d2VlbigpO1xuXG4gICAgICAgIGZ1bmN0aW9uIGNsZWFudXAoKSB7XG4gICAgICAgICAgZm9yRWFjaC5jYWxsKG1lYXN1cmVtZW50cywgZnVuY3Rpb24obSkge1xuICAgICAgICAgICAgc3R5bGUobS5lbCwgJ3RyYW5zZm9ybS1vcmlnaW4nLCAnJyk7XG4gICAgICAgICAgICBzdHlsZShtLmVsLCAndHJhbnNmb3JtJywgbS5pbml0aWFsVHJhbnNmb3JtKTtcblxuICAgICAgICAgICAgZm9yRWFjaC5jYWxsKG0uY2hpbGRyZW4sIGZ1bmN0aW9uKGVsKSB7XG4gICAgICAgICAgICAgIHN0eWxlKGVsLCAndHJhbnNmb3JtLW9yaWdpbicsICcnKTtcbiAgICAgICAgICAgICAgc3R5bGUoZWwsICd0cmFuc2Zvcm0nLCAnJyk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICB9KTtcblxuICAgICAgICAgIHNlbGYuYmxvY2tDbGlja3MgPSBmYWxzZTtcbiAgICAgICAgICBzZWxmLnJvb3Quc3R5bGUubWluSGVpZ2h0ID0gbnVsbDtcblxuICAgICAgICAgIC8qIEludm9rZSBvdXIgY2FsbGJhY2sgZnVuY3Rpb24gd2hlbiBkb25lICovXG4gICAgICAgICAgJHNjb3BlLiRhcHBseUFzeW5jKCgpID0+IHtcbiAgICAgICAgICAgIGNiKCk7XG4gICAgICAgICAgfSk7XG4gICAgICAgIH1cbiAgICAgIH07XG4gICAgfVxuICB9O1xufSlcblxuLmRpcmVjdGl2ZSgnYXlBY2NvcmRpb24nLCB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RldmVudCk7XG4gICAgICB9KTtcblxuICAgICAgJGVsZW1lbnQub24oJ2tleWRvd24nLCBmdW5jdGlvbigkZXZlbnQpIHtcbiAgICAgICAgaWYgKCRldmVudC5rZXlDb2RlID09PSAzMiB8fCAkZXZlbnQua2V5Q29kZSA9PT0gMTMpIHtcbiAgICAgICAgICByZXR1cm4gYWN0aXZhdGUoJGV2ZW50KTtcbiAgICAgICAgfVxuICAgICAgfSk7XG4gICAgfVxuICB9O1xufSk7XG4iXX0=

15

package.json
{
"name": "ay-accordion",
"version": "1.0.1",
"version": "1.0.2",
"copyright": "Copyright 2016 Ayogo Health Inc.",

@@ -20,7 +20,5 @@ "license": "MIT",

"repository": "AyogoHealth/ay-accordion",
"main": "dist/index.js",
"jsnext:main": "dist/index.es6.js",
"typings": "dist/index.d.ts",
"dependencies": {

@@ -34,11 +32,14 @@ "angular": "^1.4.0"

"typescript": "^1.8.9",
"typings": "^0.7.12"
"typings": "^0.8.1"
},
"browserify": {
"transform": [
["browserify-ngannotate", {"sourcemap": true}]
[
"browserify-ngannotate",
{
"sourcemap": true
}
]
]
},
"scripts": {

@@ -45,0 +46,0 @@ "typings": "typings",

@@ -111,2 +111,6 @@ ayAccordion

```css
[hidden] {
display: none;
}
[ay-accordion] {

@@ -113,0 +117,0 @@ overflow: hidden;

@@ -7,5 +7,5 @@ {

"ambientDependencies": {
"angular": "registry:dt/angular#1.5.0+20160328125810",
"jquery": "registry:dt/jquery#1.10.0+20160316155526"
"angular": "registry:dt/angular#1.5.0+20160412133217",
"jquery": "registry:dt/jquery#1.10.0+20160417213236"
}
}