🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

angular-flash-alert

Package Overview
Dependencies
Maintainers
2
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

angular-flash-alert - npm Package Compare versions

Comparing version

to
2.2.6

2

bower.json
{
"name": "angular-flash-alert",
"version": "2.2.5",
"version": "2.2.6",
"homepage": "https://github.com/sachinchoolur/angular-flash",

@@ -5,0 +5,0 @@ "authors": [

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

/*! angular-flash - v2.2.5 - 2016-03-17
* https://github.com/sachinchoolur/angular-flash
* Copyright (c) 2016 Sachin; Licensed MIT */
/*! angular-flash - v2.2.6 - 2016-03-27
* https://github.com/sachinchoolur/angular-flash
* Copyright (c) 2016 Sachin; Licensed MIT */

@@ -78,4 +78,4 @@ 'use strict';

dataFactory.create = function (type, text, timeout, config, showClose) {
var $this = undefined,
flash = undefined;
var $this = void 0,
flash = void 0;
$this = this;

@@ -126,3 +126,3 @@ flash = {

function findIndexById(id) {
return $rootScope.flashes.map(function(flash) {
return $rootScope.flashes.map(function (flash) {
return flash.id;

@@ -129,0 +129,0 @@ }).indexOf(id);

@@ -1,77 +0,8 @@

/*! angular-flash - v2.2.5 - 2016-03-17
/*! angular-flash - v2.2.6 - 2016-03-27
* https://github.com/sachinchoolur/angular-flash
* Copyright (c) 2016 Sachin; Licensed MIT */
/*! angular-flash - v2.2.5 - 2016-03-17
* https://github.com/sachinchoolur/angular-flash
* Copyright (c) 2016 Sachin; Licensed MIT */
"use strict";
var app = angular.module("ngFlash", []);
app.run(["$rootScope", function(a) {
return a.flashes = []
}]), app.directive("dynamic", ["$compile", function(a) {
return {
restrict: "A", replace: !0, link: function(b, c, d) {
return b.$watch(d.dynamic, function(d) {
return c.html(d), a(c.contents())(b)
})
}
}
}]), app.directive("closeFlash", ["$compile", "$rootScope", "Flash", function(a, b, c) {
return {
link: function(a, d, e) {
return d.on("click", function() {
var a = parseInt(e.closeFlash, 10);
c.dismiss(a), b.$apply()
})
}
}
}]), app.directive("flashMessage", ["Flash", function(a) {
return {
restrict: "E",
scope: {duration: "=", showClose: "=", onDismiss: "&"},
template: '<div role="alert" ng-repeat="flash in $root.flashes track by $index" id="{{flash.config.id}}" class="alert {{flash.config.class}} alert-{{flash.type}} alert-dismissible alertIn alertOut"><div type="button" class="close" ng-show="flash.showClose" close-flash="{{flash.id}}"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></div> <span dynamic="flash.text"></span> </div>',
link: function(b, c, d) {
function e(a) {
"function" == typeof b.onDismiss && b.onDismiss({flash: a})
}
a.setDefaultTimeout(b.duration), a.setShowClose(b.showClose), a.setOnDismiss(e)
}
}
}]), app.factory("Flash", ["$rootScope", "$timeout", function(a, b) {
function c(b) {
return a.flashes.map(function(a) {
return a.id
}).indexOf(b)
}
var d = {}, e = 0;
return d.setDefaultTimeout = function(a) {
"number" == typeof a && (d.defaultTimeout = a)
}, d.defaultShowClose = !0, d.setShowClose = function(a) {
"boolean" == typeof a && (d.defaultShowClose = a)
}, d.setOnDismiss = function(a) {
"function" == typeof a && (d.onDismiss = a)
}, d.create = function(c, f, g, h, i) {
var j = void 0, k = void 0;
return j = this, k = {
type: c,
text: f,
config: h,
id: e++
}, k.showClose = "undefined" != typeof i ? i : d.defaultShowClose, d.defaultTimeout && "undefined" == typeof g ? k.timeout = d.defaultTimeout : g && (k.timeout = g), a.flashes.push(k), k.timeout && (k.timeoutObj = b(function() {
j.dismiss(k.id)
}, k.timeout)), k.id
}, d.pause = function(c) {
a.flashes[c].timeoutObj && b.cancel(a.flashes[c].timeoutObj)
}, d.dismiss = function(b) {
var e = c(b);
if (-1 !== e) {
var f = a.flashes[e];
d.pause(e), a.flashes.splice(e, 1), a.$digest(), "function" == typeof d.onDismiss && d.onDismiss(f)
}
}, d.clear = function() {
for (; a.flashes.length > 0;)d.dismiss(a.flashes[0].id)
}, d.reset = d.clear, d
}]);
/*! angular-flash - v2.2.6 - 2016-03-27
* https://github.com/sachinchoolur/angular-flash
* Copyright (c) 2016 Sachin; Licensed MIT */
"use strict";var app=angular.module("ngFlash",[]);app.run(["$rootScope",function(a){return a.flashes=[]}]),app.directive("dynamic",["$compile",function(a){return{restrict:"A",replace:!0,link:function(b,c,d){return b.$watch(d.dynamic,function(d){return c.html(d),a(c.contents())(b)})}}}]),app.directive("closeFlash",["$compile","$rootScope","Flash",function(a,b,c){return{link:function(a,d,e){return d.on("click",function(){var a=parseInt(e.closeFlash,10);c.dismiss(a),b.$apply()})}}}]),app.directive("flashMessage",["Flash",function(a){return{restrict:"E",scope:{duration:"=",showClose:"=",onDismiss:"&"},template:'<div role="alert" ng-repeat="flash in $root.flashes track by $index" id="{{flash.config.id}}" class="alert {{flash.config.class}} alert-{{flash.type}} alert-dismissible alertIn alertOut"><div type="button" class="close" ng-show="flash.showClose" close-flash="{{flash.id}}"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></div> <span dynamic="flash.text"></span> </div>',link:function(b,c,d){function e(a){"function"==typeof b.onDismiss&&b.onDismiss({flash:a})}a.setDefaultTimeout(b.duration),a.setShowClose(b.showClose),a.setOnDismiss(e)}}}]),app.factory("Flash",["$rootScope","$timeout",function(a,b){function c(b){return a.flashes.map(function(a){return a.id}).indexOf(b)}var d={},e=0;return d.setDefaultTimeout=function(a){"number"==typeof a&&(d.defaultTimeout=a)},d.defaultShowClose=!0,d.setShowClose=function(a){"boolean"==typeof a&&(d.defaultShowClose=a)},d.setOnDismiss=function(a){"function"==typeof a&&(d.onDismiss=a)},d.create=function(c,f,g,h,i){var j=void 0,k=void 0;return j=this,k={type:c,text:f,config:h,id:e++},k.showClose="undefined"!=typeof i?i:d.defaultShowClose,d.defaultTimeout&&"undefined"==typeof g?k.timeout=d.defaultTimeout:g&&(k.timeout=g),a.flashes.push(k),k.timeout&&(k.timeoutObj=b(function(){j.dismiss(k.id)},k.timeout)),k.id},d.pause=function(c){a.flashes[c].timeoutObj&&b.cancel(a.flashes[c].timeoutObj)},d.dismiss=function(b){var e=c(b);if(-1!==e){var f=a.flashes[e];d.pause(e),a.flashes.splice(e,1),a.$digest(),"function"==typeof d.onDismiss&&d.onDismiss(f)}},d.clear=function(){for(;a.flashes.length>0;)d.dismiss(a.flashes[0].id)},d.reset=d.clear,d}]);

@@ -0,0 +0,0 @@ module.exports = function (grunt) {

{
"name": "angular-flash-alert",
"version": "2.2.5",
"version": "2.2.6",
"description": "Flash message for AngularJS and Bootstrap",

@@ -47,3 +47,3 @@ "keywords": [

"grunt-babel": "^6.0.0",
"grunt-banner": "^0.6.0",
"grunt-banner": "^0.6.0",
"grunt-bootlint": "^0.10.0",

@@ -50,0 +50,0 @@ "grunt-contrib-clean": "^0.6.0",

@@ -0,0 +0,0 @@ const app = angular.module('ngFlash', []);

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