angular-luminate-utils
Advanced tools
Comparing version 0.6.2 to 0.7.0
(function() { | ||
angular.module('ngLuminateUtils', []).constant('APP_INFO', { | ||
version: '0.6.1' | ||
version: '0.7.0' | ||
}); | ||
@@ -19,4 +19,4 @@ | ||
path.secure = path.secure.toLowerCase(); | ||
nonsecurePathIsValid = path.nonsecure.indexOf('/site/') === path.nonsecure.length - 6 || path.nonsecure.indexOf('/admin/') !== path.nonsecure.length - 6; | ||
securePathIsValid = path.secure.indexOf('/site/') === path.secure.length - 7 || path.secure.indexOf('/admin/') !== path.secure.length - 7; | ||
nonsecurePathIsValid = path.nonsecure.indexOf('/site/') === path.nonsecure.length - 6 || path.nonsecure.indexOf('/admin/') === path.nonsecure.length - 7; | ||
securePathIsValid = path.secure.indexOf('/site/') === path.secure.length - 6 || path.secure.indexOf('/admin/') === path.secure.length - 7; | ||
if (!nonsecurePathIsValid || !securePathIsValid) { | ||
@@ -279,3 +279,3 @@ if (!nonsecurePathIsValid) { | ||
requestData += 'v=1.0&response_format=json&suppress_response_codes=true&api_key=' + $luminateUtilsConfig.apiKey; | ||
isAuthTokenRequest = ('&' + requestData).indexOf('method=getLoginUrl&') !== -1; | ||
isAuthTokenRequest = ('&' + requestData).indexOf('&method=getLoginUrl&') !== -1; | ||
isLoginRequest = ('&' + requestData).indexOf('&method=login&') !== -1; | ||
@@ -291,3 +291,3 @@ isLogoutRequest = ('&' + requestData).indexOf('&method=logout&') !== -1; | ||
return _this.request(options); | ||
}, 500); | ||
}, 250); | ||
} | ||
@@ -294,0 +294,0 @@ } else { |
@@ -1,1 +0,1 @@ | ||
(function(){angular.module("ngLuminateUtils",[]).constant("APP_INFO",{version:"0.6.1"}),angular.module("ngLuminateUtils").provider("$luminateUtilsConfig",function(){var e;(e=this).setPath=function(t){var n,a;return null==t&&(t={}),angular.isString(t.nonsecure||!angular.isString(t.secure))?(t.nonsecure=t.nonsecure.toLowerCase(),t.secure=t.secure.toLowerCase(),n=t.nonsecure.indexOf("/site/")===t.nonsecure.length-6||t.nonsecure.indexOf("/admin/")!==t.nonsecure.length-6,a=t.secure.indexOf("/site/")===t.secure.length-7||t.secure.indexOf("/admin/")!==t.secure.length-7,n&&a?e.path={nonsecure:t.nonsecure,secure:t.secure}:(n||new Error("Invalid nonsecure path."),a||new Error("Invalid secure path."))):new Error("You must specify both a nonsecure and secure path."),e},e.setKey=function(t){return angular.isString(t)?e.apiKey=t:new Error("API Key must be a string but was "+typeof t),e},e.setLocale=function(t){return angular.isString(t)?"en_US"!==t&&"es_US"!==t&&"en_CA"!==t&&"fr_CA"!==t&&"en_GB"!==t&&"en_AU"!==t||(e.locale=t):new Error("Locale must be a string but was "+typeof t),e},e.setDefaultRequestData=function(t){return angular.isString(t)?e.defaultRequestData=t:new Error("Request data must be a string but was "+typeof t),e},e.$get=function(){return e}}),angular.module("ngLuminateUtils").factory("$luminateMessageCatalog",["$q","$luminateUtilsConfig","$luminateRequestHandler","$luminateRest",function(e,t,n,a){return{get:function(r){var u,s,i,o,l,g,c;return u=this,i=t.locale||"default",angular.isString(r)||angular.isArray(r)?(angular.isArray(r)||(r=[r]),s={},g=0,angular.forEach(r,function(e){var t,a,r;return 2!==(r=e.split(":")).length?new Error("Invalid Message Catalog bundle/key pair "+e):(t=n.sanitizeString(r[0],!0,!0),a=n.sanitizeString(r[1],!0,!0),s[t]||(s[t]={},g++),s[t].requestedKeys||(s[t].requestedKeys=[]),s[t].requestedKeys.push(a),s[t].newKeys||(s[t].newKeys=[]),u.messageCatalogCache||(u.messageCatalogCache={}),u.messageCatalogCache[i]||(u.messageCatalogCache[i]={}),u.messageCatalogCache[i][t]||(u.messageCatalogCache[i][t]={}),angular.isString(u.messageCatalogCache[i][t][a])?void 0:s[t].newKeys.push(a))}),0===s.length?n.rejectInvalidRequest("No Message Catalog bundles defined."):(o=e.defer(),l=0,c={},angular.forEach(s,function(e,t){return c[t]={},angular.forEach(e.requestedKeys,function(e){if(u.messageCatalogCache[i][t][e])return c[t][e]=u.messageCatalogCache[i][t][e]}),0!==e.newKeys.length?a.request({api:"content",data:"method=getMessageBundle&bundle="+t+"&keys="+e.newKeys.join(","),requiresAuth:!0}).then(function(n){var a,r;if((a=null!=(r=n.data.getMessageBundleResponse)?r.values:void 0)?(angular.isArray(a)||(a=[a]),angular.forEach(a,function(e){var n;return 0===(n=e.value).indexOf("Message not found for key: ")&&(n=""),u.messageCatalogCache[i][t][e.key]=n,c[t][e.key]=n})):angular.forEach(e.newKeys,function(e){return u.messageCatalogCache[i][t][e]="",c[t][e]=""}),++l===g)return o.resolve(c)}):++l===g?o.resolve(c):void 0}),o.promise)):n.rejectInvalidRequest("Message Catalog entries must be a string or array but was "+typeof r)},flushCache:function(){return _this.messageCatalogCache={},_this}}}]),angular.module("ngLuminateUtils").factory("$luminateRequestHandler",["$q",function(e){return{sanitizeString:function(e,t,n){var a;return a=e,n||(a=angular.element("<div>"+a+"</div>").text()),t||(a=a.replace(/\[\[/g,"").replace(/\]\]/g,"").replace(/::/g,"")),a},rejectInvalidRequest:function(t){var n;return null==t&&(t="Invalid request."),(n=e.defer()).reject(t),n.promise}}}]),angular.module("ngLuminateUtils").factory("$luminateRest",["$http","$q","$timeout","APP_INFO","$luminateUtilsConfig","$luminateRequestHandler",function(e,t,n,a,r,u){return{getAuthToken:function(e,n){var a;return!(a=this).authToken||e?(a.authTokenPending=!0,"method=getLoginUrl",a.request({api:"cons",data:"method=getLoginUrl"}).then(function(e){var n,r,u;return a.routingId=null!=(n=e.data.getLoginUrlResponse)?n.routing_id:void 0,a.jsessionId=null!=(r=e.data.getLoginUrlResponse)?r.JSESSIONID:void 0,a.authToken=(null!=(u=e.data.getLoginUrlResponse)?u.token:void 0)||"",a.authTokenPending=!1,t.resolve(a.authToken)})):(a.authTokenPending=!1,t.resolve(a.authToken))},request:function(t){var s,i,o,l,g,c,d,f,m,p,h,v,C,y;return null==t&&(t={}),s=this,i=(C=t).api,f=C.data,m=C.formData,v=C.requiresAuth,y=C.useHTTP,o=C.contentType,o=m&&!o||"multipart/form-data"===(null!=o?o.split(";")[0]:void 0)?"multipart/form-data":"application/x-www-form-urlencoded; charset=UTF-8",r.path.nonsecure&&r.path.secure?r.apiKey?angular.isString(i)?("addressbook"!==(d=i.toLowerCase())&&"advocacy"!==d&&"cons"!==d&&"content"!==d&&"datasync"!==d&&"donation"!==d&&"group"!==d&&"orgevent"!==d&&"recurring"!==d&&"survey"!==d&&"teamraiser"!==d||(i=(i="CR"+i.toLowerCase().charAt(0).toUpperCase()+i.toLowerCase().slice(1).toLowerCase()+"API").replace("Addressbook","AddressBook").replace("Datasync","DataSync").replace("Orgevent","OrgEvent")),"CRAddressBookAPI"!==i&&"CRAdvocacyAPI"!==i&&"CRConsAPI"!==i&&"CRContentAPI"!==i&&"CRDataSyncAPI"!==i&&"CRDonationAPI"!==i&&"CRGroupAPI"!==i&&"CROrgEventAPI"!==i&&"CRRecurringAPI"!==i&&"CRSurveyAPI"!==i&&"CRTeamraiserAPI"!==i?u.rejectInvalidRequest("Invalid API servlet "+i):m&&!angular.isObject(m)?u.rejectInvalidRequest("Request formData must be an object but was "+typeof m):m||angular.isString(f)?(m&&!f&&(f=""),""!==f&&(f+="&"),l=-1!==("&"+(f+="v=1.0&response_format=json&suppress_response_codes=true&api_key="+r.apiKey)).indexOf("method=getLoginUrl&"),g=-1!==("&"+f).indexOf("&method=login&"),c=-1!==("&"+f).indexOf("&method=logout&"),l||s.authToken?("CRDonation"!==i&&"CRTeamraiserAPI"!==i||(y=!1),h=y?r.path.nonsecure:r.path.secure,h+=i,s.routingId&&(h+=";jsessionid="+s.routingId),r.locale&&(f+="&s_locale="+r.locale),r.defaultRequestData&&(f+="&"+r.defaultRequestData),s.jsessionId&&(f+="&JSESSIONID="+s.jsessionId),v&&(f+="&auth="+s.authToken),(null!=a?a.version:void 0)&&(f+="&ng_luminate_utils="+a.version),f+="&ts="+(new Date).getTime(),m&&angular.forEach(f.split("&"),function(e){var t,n,a;return t=(n=e.split("="))[0],a=n[1]||"",m.append(t,a)}),p={method:"POST",url:h,data:m||f,headers:{"Content-Type":"multipart/form-data"===o?void 0:o},withCredentials:!0},"multipart/form-data"===o&&(p.transformRequest=angular.identity),e(p).then(function(e){var t;return t=e,g||c?s.getAuthToken(!0,y).then(function(){return t}):t})):s.authTokenPending?n(function(){return s.request(t)},500):s.getAuthToken(!1,y).then(function(){return s.request(t)})):u.rejectInvalidRequest("Request data must be a string but was "+typeof f)):u.rejectInvalidRequest("API servlet must be a string but was "+typeof i):u.rejectInvalidRequest("You must specify both an API Key."):u.rejectInvalidRequest("You must specify both a nonsecure and secure path.")}}}]),angular.module("ngLuminateUtils").factory("$luminateSessionVar",["$q","$luminateRequestHandler","$luminateTemplateTag",function(e,t,n){return{get:function(e){var a;return angular.isString(e)?(a="",a=0===(e=t.sanitizeString(e,!0)).indexOf("[[")&&e.lastIndexOf("]]")===e.length-2?"[[E80:"+e+"]]":"[[S80:"+e+"]]",n.parse(a).then(function(e){return t.sanitizeString(e,!0)})):t.rejectInvalidRequest("Session variable name must be a string but was "+typeof e)},set:function(e,a){return null==a&&(a=""),angular.isString(e)?!angular.isString(a)&&isNaN(a)?t.rejectInvalidRequest("Session variable value must be a string or number but was "+typeof a):(e=t.sanitizeString(e,!0,!0),a=t.sanitizeString(a,!0),n.parse("[[U1:"+e+"="+a+"]]")):t.rejectInvalidRequest("Session variable name must be a string but was "+typeof e)}}}]),angular.module("ngLuminateUtils").factory("$luminateTemplateTag",["$q","$luminateRequestHandler","$luminateRest",function(e,t,n){return{parse:function(a){var r;return null==a&&(a=""),angular.isString(a)?""===a?((r=e.defer()).resolve(""),r.promise):(a=t.sanitizeString(a,!0),n.request({api:"content",data:"method=getTagInfo&content="+a,requiresAuth:!0}).then(function(t){var n,a;return n=(null!=(a=t.data.getTagInfoResponse)?a.preview:void 0)||"",e.resolve(n)})):t.rejectInvalidRequest("Template tag must be a string but was "+typeof a)}}}]),angular.module("ngLuminateUtils").directive("luminateInclude",function(){return{scope:{filename:"="},template:'<div ng-bind-html="includeContent" ng-cloak></div>',replace:!0,controller:["$scope","$sce","$luminateRequestHandler","$luminateTemplateTag",function(e,t,n,a){var r;return(r=function(){var r,u;return r=e.filename,angular.isString(r)?(u="",u=(r=n.sanitizeString(r,!0)).indexOf("[[")>-1&&r.indexOf("]]")>r.indexOf("[[")?"[[E84:"+r+"]]":"[[S84:"+(r=n.sanitizeString(r))+"]]",a.parse(u).then(function(n){return e.includeContent=t.trustAsHtml(n)})):n.rejectInvalidRequest("Filename must be a string but was "+typeof r)})(),e.$watch("filename",function(e,t){if(e!==t)return r()})}]}}),angular.module("ngLuminateUtils").directive("luminateReusable",function(){return{scope:{pagename:"="},template:'<div ng-bind-html="reusableContent" ng-cloak></div>',replace:!0,controller:["$scope","$sce","$luminateRequestHandler","$luminateTemplateTag",function(e,t,n,a){var r;return(r=function(){var r,u;return r=e.pagename,angular.isString(r)?(u="",u=(r=n.sanitizeString(r,!0)).indexOf("[[")>-1&&r.indexOf("]]")>r.indexOf("[[")?"[[E51:"+r+"]]":"[[S51:"+(r=n.sanitizeString(r))+"]]",a.parse(u).then(function(n){return e.reusableContent=t.trustAsHtml(n)})):n.rejectInvalidRequest("Pagename must be a string but was "+typeof r)})(),e.$watch("pagename",function(e,t){if(e!==t)return r()})}]}})}).call(this); | ||
(function(){angular.module("ngLuminateUtils",[]).constant("APP_INFO",{version:"0.7.0"}),angular.module("ngLuminateUtils").provider("$luminateUtilsConfig",function(){var e;(e=this).setPath=function(t){var n,a;return null==t&&(t={}),angular.isString(t.nonsecure||!angular.isString(t.secure))?(t.nonsecure=t.nonsecure.toLowerCase(),t.secure=t.secure.toLowerCase(),n=t.nonsecure.indexOf("/site/")===t.nonsecure.length-6||t.nonsecure.indexOf("/admin/")===t.nonsecure.length-7,a=t.secure.indexOf("/site/")===t.secure.length-6||t.secure.indexOf("/admin/")===t.secure.length-7,n&&a?e.path={nonsecure:t.nonsecure,secure:t.secure}:(n||new Error("Invalid nonsecure path."),a||new Error("Invalid secure path."))):new Error("You must specify both a nonsecure and secure path."),e},e.setKey=function(t){return angular.isString(t)?e.apiKey=t:new Error("API Key must be a string but was "+typeof t),e},e.setLocale=function(t){return angular.isString(t)?"en_US"!==t&&"es_US"!==t&&"en_CA"!==t&&"fr_CA"!==t&&"en_GB"!==t&&"en_AU"!==t||(e.locale=t):new Error("Locale must be a string but was "+typeof t),e},e.setDefaultRequestData=function(t){return angular.isString(t)?e.defaultRequestData=t:new Error("Request data must be a string but was "+typeof t),e},e.$get=function(){return e}}),angular.module("ngLuminateUtils").factory("$luminateMessageCatalog",["$q","$luminateUtilsConfig","$luminateRequestHandler","$luminateRest",function(e,t,n,a){return{get:function(r){var u,s,i,o,l,g,c;return u=this,i=t.locale||"default",angular.isString(r)||angular.isArray(r)?(angular.isArray(r)||(r=[r]),s={},g=0,angular.forEach(r,function(e){var t,a,r;return 2!==(r=e.split(":")).length?new Error("Invalid Message Catalog bundle/key pair "+e):(t=n.sanitizeString(r[0],!0,!0),a=n.sanitizeString(r[1],!0,!0),s[t]||(s[t]={},g++),s[t].requestedKeys||(s[t].requestedKeys=[]),s[t].requestedKeys.push(a),s[t].newKeys||(s[t].newKeys=[]),u.messageCatalogCache||(u.messageCatalogCache={}),u.messageCatalogCache[i]||(u.messageCatalogCache[i]={}),u.messageCatalogCache[i][t]||(u.messageCatalogCache[i][t]={}),angular.isString(u.messageCatalogCache[i][t][a])?void 0:s[t].newKeys.push(a))}),0===s.length?n.rejectInvalidRequest("No Message Catalog bundles defined."):(o=e.defer(),l=0,c={},angular.forEach(s,function(e,t){return c[t]={},angular.forEach(e.requestedKeys,function(e){if(u.messageCatalogCache[i][t][e])return c[t][e]=u.messageCatalogCache[i][t][e]}),0!==e.newKeys.length?a.request({api:"content",data:"method=getMessageBundle&bundle="+t+"&keys="+e.newKeys.join(","),requiresAuth:!0}).then(function(n){var a,r;if((a=null!=(r=n.data.getMessageBundleResponse)?r.values:void 0)?(angular.isArray(a)||(a=[a]),angular.forEach(a,function(e){var n;return 0===(n=e.value).indexOf("Message not found for key: ")&&(n=""),u.messageCatalogCache[i][t][e.key]=n,c[t][e.key]=n})):angular.forEach(e.newKeys,function(e){return u.messageCatalogCache[i][t][e]="",c[t][e]=""}),++l===g)return o.resolve(c)}):++l===g?o.resolve(c):void 0}),o.promise)):n.rejectInvalidRequest("Message Catalog entries must be a string or array but was "+typeof r)},flushCache:function(){return _this.messageCatalogCache={},_this}}}]),angular.module("ngLuminateUtils").factory("$luminateRequestHandler",["$q",function(e){return{sanitizeString:function(e,t,n){var a;return a=e,n||(a=angular.element("<div>"+a+"</div>").text()),t||(a=a.replace(/\[\[/g,"").replace(/\]\]/g,"").replace(/::/g,"")),a},rejectInvalidRequest:function(t){var n;return null==t&&(t="Invalid request."),(n=e.defer()).reject(t),n.promise}}}]),angular.module("ngLuminateUtils").factory("$luminateRest",["$http","$q","$timeout","APP_INFO","$luminateUtilsConfig","$luminateRequestHandler",function(e,t,n,a,r,u){return{getAuthToken:function(e,n){var a;return!(a=this).authToken||e?(a.authTokenPending=!0,"method=getLoginUrl",a.request({api:"cons",data:"method=getLoginUrl"}).then(function(e){var n,r,u;return a.routingId=null!=(n=e.data.getLoginUrlResponse)?n.routing_id:void 0,a.jsessionId=null!=(r=e.data.getLoginUrlResponse)?r.JSESSIONID:void 0,a.authToken=(null!=(u=e.data.getLoginUrlResponse)?u.token:void 0)||"",a.authTokenPending=!1,t.resolve(a.authToken)})):(a.authTokenPending=!1,t.resolve(a.authToken))},request:function(t){var s,i,o,l,g,c,d,f,m,p,h,v,C,y;return null==t&&(t={}),s=this,i=(C=t).api,f=C.data,m=C.formData,v=C.requiresAuth,y=C.useHTTP,o=C.contentType,o=m&&!o||"multipart/form-data"===(null!=o?o.split(";")[0]:void 0)?"multipart/form-data":"application/x-www-form-urlencoded; charset=UTF-8",r.path.nonsecure&&r.path.secure?r.apiKey?angular.isString(i)?("addressbook"!==(d=i.toLowerCase())&&"advocacy"!==d&&"cons"!==d&&"content"!==d&&"datasync"!==d&&"donation"!==d&&"group"!==d&&"orgevent"!==d&&"recurring"!==d&&"survey"!==d&&"teamraiser"!==d||(i=(i="CR"+i.toLowerCase().charAt(0).toUpperCase()+i.toLowerCase().slice(1).toLowerCase()+"API").replace("Addressbook","AddressBook").replace("Datasync","DataSync").replace("Orgevent","OrgEvent")),"CRAddressBookAPI"!==i&&"CRAdvocacyAPI"!==i&&"CRConsAPI"!==i&&"CRContentAPI"!==i&&"CRDataSyncAPI"!==i&&"CRDonationAPI"!==i&&"CRGroupAPI"!==i&&"CROrgEventAPI"!==i&&"CRRecurringAPI"!==i&&"CRSurveyAPI"!==i&&"CRTeamraiserAPI"!==i?u.rejectInvalidRequest("Invalid API servlet "+i):m&&!angular.isObject(m)?u.rejectInvalidRequest("Request formData must be an object but was "+typeof m):m||angular.isString(f)?(m&&!f&&(f=""),""!==f&&(f+="&"),l=-1!==("&"+(f+="v=1.0&response_format=json&suppress_response_codes=true&api_key="+r.apiKey)).indexOf("&method=getLoginUrl&"),g=-1!==("&"+f).indexOf("&method=login&"),c=-1!==("&"+f).indexOf("&method=logout&"),l||s.authToken?("CRDonation"!==i&&"CRTeamraiserAPI"!==i||(y=!1),h=y?r.path.nonsecure:r.path.secure,h+=i,s.routingId&&(h+=";jsessionid="+s.routingId),r.locale&&(f+="&s_locale="+r.locale),r.defaultRequestData&&(f+="&"+r.defaultRequestData),s.jsessionId&&(f+="&JSESSIONID="+s.jsessionId),v&&(f+="&auth="+s.authToken),(null!=a?a.version:void 0)&&(f+="&ng_luminate_utils="+a.version),f+="&ts="+(new Date).getTime(),m&&angular.forEach(f.split("&"),function(e){var t,n,a;return t=(n=e.split("="))[0],a=n[1]||"",m.append(t,a)}),p={method:"POST",url:h,data:m||f,headers:{"Content-Type":"multipart/form-data"===o?void 0:o},withCredentials:!0},"multipart/form-data"===o&&(p.transformRequest=angular.identity),e(p).then(function(e){var t;return t=e,g||c?s.getAuthToken(!0,y).then(function(){return t}):t})):s.authTokenPending?n(function(){return s.request(t)},250):s.getAuthToken(!1,y).then(function(){return s.request(t)})):u.rejectInvalidRequest("Request data must be a string but was "+typeof f)):u.rejectInvalidRequest("API servlet must be a string but was "+typeof i):u.rejectInvalidRequest("You must specify both an API Key."):u.rejectInvalidRequest("You must specify both a nonsecure and secure path.")}}}]),angular.module("ngLuminateUtils").factory("$luminateSessionVar",["$q","$luminateRequestHandler","$luminateTemplateTag",function(e,t,n){return{get:function(e){var a;return angular.isString(e)?(a="",a=0===(e=t.sanitizeString(e,!0)).indexOf("[[")&&e.lastIndexOf("]]")===e.length-2?"[[E80:"+e+"]]":"[[S80:"+e+"]]",n.parse(a).then(function(e){return t.sanitizeString(e,!0)})):t.rejectInvalidRequest("Session variable name must be a string but was "+typeof e)},set:function(e,a){return null==a&&(a=""),angular.isString(e)?!angular.isString(a)&&isNaN(a)?t.rejectInvalidRequest("Session variable value must be a string or number but was "+typeof a):(e=t.sanitizeString(e,!0,!0),a=t.sanitizeString(a,!0),n.parse("[[U1:"+e+"="+a+"]]")):t.rejectInvalidRequest("Session variable name must be a string but was "+typeof e)}}}]),angular.module("ngLuminateUtils").factory("$luminateTemplateTag",["$q","$luminateRequestHandler","$luminateRest",function(e,t,n){return{parse:function(a){var r;return null==a&&(a=""),angular.isString(a)?""===a?((r=e.defer()).resolve(""),r.promise):(a=t.sanitizeString(a,!0),n.request({api:"content",data:"method=getTagInfo&content="+a,requiresAuth:!0}).then(function(t){var n,a;return n=(null!=(a=t.data.getTagInfoResponse)?a.preview:void 0)||"",e.resolve(n)})):t.rejectInvalidRequest("Template tag must be a string but was "+typeof a)}}}]),angular.module("ngLuminateUtils").directive("luminateInclude",function(){return{scope:{filename:"="},template:'<div ng-bind-html="includeContent" ng-cloak></div>',replace:!0,controller:["$scope","$sce","$luminateRequestHandler","$luminateTemplateTag",function(e,t,n,a){var r;return(r=function(){var r,u;return r=e.filename,angular.isString(r)?(u="",u=(r=n.sanitizeString(r,!0)).indexOf("[[")>-1&&r.indexOf("]]")>r.indexOf("[[")?"[[E84:"+r+"]]":"[[S84:"+(r=n.sanitizeString(r))+"]]",a.parse(u).then(function(n){return e.includeContent=t.trustAsHtml(n)})):n.rejectInvalidRequest("Filename must be a string but was "+typeof r)})(),e.$watch("filename",function(e,t){if(e!==t)return r()})}]}}),angular.module("ngLuminateUtils").directive("luminateReusable",function(){return{scope:{pagename:"="},template:'<div ng-bind-html="reusableContent" ng-cloak></div>',replace:!0,controller:["$scope","$sce","$luminateRequestHandler","$luminateTemplateTag",function(e,t,n,a){var r;return(r=function(){var r,u;return r=e.pagename,angular.isString(r)?(u="",u=(r=n.sanitizeString(r,!0)).indexOf("[[")>-1&&r.indexOf("]]")>r.indexOf("[[")?"[[E51:"+r+"]]":"[[S51:"+(r=n.sanitizeString(r))+"]]",a.parse(u).then(function(n){return e.reusableContent=t.trustAsHtml(n)})):n.rejectInvalidRequest("Pagename must be a string but was "+typeof r)})(),e.$watch("pagename",function(e,t){if(e!==t)return r()})}]}})}).call(this); |
{ | ||
"name": "angular-luminate-utils", | ||
"description": "Luminate Online utilities for AngularJS 1.x apps.", | ||
"version": "0.6.2", | ||
"version": "0.7.0", | ||
"license": "MIT", | ||
@@ -13,6 +13,7 @@ "repository": [ | ||
"engines": { | ||
"node": "^6.14.1" | ||
"node": "^6.14.2" | ||
}, | ||
"dependencies": { | ||
"load-grunt-tasks": "^3.5.2" | ||
"angular": "^1.4.8", | ||
"angular-sanitize": "^1.4.8" | ||
}, | ||
@@ -29,4 +30,5 @@ "devDependencies": { | ||
"grunt-notify": "^0.4.5", | ||
"load-grunt-tasks": "^3.5.2", | ||
"time-grunt": "^1.4.0" | ||
} | ||
} | ||
} |
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
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
51392
2
11
+ Addedangular@^1.4.8
+ Addedangular-sanitize@^1.4.8
+ Addedangular@1.8.3(transitive)
+ Addedangular-sanitize@1.8.3(transitive)
- Removedload-grunt-tasks@^3.5.2
- Removedabbrev@1.1.1(transitive)
- Removedansi-styles@4.3.0(transitive)
- Removedargparse@1.0.10(transitive)
- Removedarray-differ@1.0.0(transitive)
- Removedarray-each@1.0.1(transitive)
- Removedarray-slice@1.1.0(transitive)
- Removedarray-union@1.0.2(transitive)
- Removedarray-uniq@1.0.3(transitive)
- Removedarrify@1.0.1(transitive)
- Removedasync@3.2.6(transitive)
- Removedbalanced-match@1.0.2(transitive)
- Removedbrace-expansion@1.1.11(transitive)
- Removedbraces@3.0.3(transitive)
- Removedchalk@4.1.2(transitive)
- Removedcolor-convert@2.0.1(transitive)
- Removedcolor-name@1.1.4(transitive)
- Removedcolors@1.1.2(transitive)
- Removedconcat-map@0.0.1(transitive)
- Removeddateformat@4.6.3(transitive)
- Removeddetect-file@1.0.0(transitive)
- Removedesprima@4.0.1(transitive)
- Removedeventemitter2@0.4.14(transitive)
- Removedexit@0.1.2(transitive)
- Removedexpand-tilde@2.0.2(transitive)
- Removedextend@3.0.2(transitive)
- Removedfill-range@7.1.1(transitive)
- Removedfind-up@1.1.2(transitive)
- Removedfindup-sync@4.0.05.0.0(transitive)
- Removedfined@1.2.0(transitive)
- Removedflagged-respawn@1.0.1(transitive)
- Removedfor-in@1.0.2(transitive)
- Removedfor-own@1.0.0(transitive)
- Removedfs.realpath@1.0.0(transitive)
- Removedfunction-bind@1.1.2(transitive)
- Removedgetobject@1.0.2(transitive)
- Removedglob@7.1.7(transitive)
- Removedglobal-modules@1.0.0(transitive)
- Removedglobal-prefix@1.0.2(transitive)
- Removedgrunt@1.6.1(transitive)
- Removedgrunt-cli@1.4.3(transitive)
- Removedgrunt-known-options@2.0.0(transitive)
- Removedgrunt-legacy-log@3.0.0(transitive)
- Removedgrunt-legacy-log-utils@2.1.0(transitive)
- Removedgrunt-legacy-util@2.0.1(transitive)
- Removedhas-flag@4.0.0(transitive)
- Removedhasown@2.0.2(transitive)
- Removedhomedir-polyfill@1.0.3(transitive)
- Removedhooker@0.2.3(transitive)
- Removediconv-lite@0.6.3(transitive)
- Removedinflight@1.0.6(transitive)
- Removedinherits@2.0.4(transitive)
- Removedini@1.3.8(transitive)
- Removedinterpret@1.1.0(transitive)
- Removedis-absolute@1.0.0(transitive)
- Removedis-core-module@2.15.1(transitive)
- Removedis-extglob@2.1.1(transitive)
- Removedis-glob@4.0.3(transitive)
- Removedis-number@7.0.0(transitive)
- Removedis-plain-object@2.0.4(transitive)
- Removedis-relative@1.0.0(transitive)
- Removedis-unc-path@1.0.0(transitive)
- Removedis-windows@1.0.2(transitive)
- Removedisexe@2.0.0(transitive)
- Removedisobject@3.0.1(transitive)
- Removedjs-yaml@3.14.1(transitive)
- Removedkind-of@6.0.3(transitive)
- Removedliftup@3.0.1(transitive)
- Removedload-grunt-tasks@3.5.2(transitive)
- Removedlodash@4.17.21(transitive)
- Removedmake-iterator@1.0.1(transitive)
- Removedmap-cache@0.2.2(transitive)
- Removedmicromatch@4.0.8(transitive)
- Removedminimatch@3.0.8(transitive)
- Removedmultimatch@2.1.0(transitive)
- Removednopt@3.0.64.0.3(transitive)
- Removedobject.defaults@1.1.0(transitive)
- Removedobject.map@1.0.1(transitive)
- Removedobject.pick@1.3.0(transitive)
- Removedonce@1.4.0(transitive)
- Removedos-homedir@1.0.2(transitive)
- Removedos-tmpdir@1.0.2(transitive)
- Removedosenv@0.1.5(transitive)
- Removedparse-filepath@1.0.2(transitive)
- Removedparse-passwd@1.0.0(transitive)
- Removedpath-exists@2.1.0(transitive)
- Removedpath-is-absolute@1.0.1(transitive)
- Removedpath-parse@1.0.7(transitive)
- Removedpath-root@0.1.1(transitive)
- Removedpath-root-regex@0.1.2(transitive)
- Removedpicomatch@2.3.1(transitive)
- Removedpinkie@2.0.4(transitive)
- Removedpinkie-promise@2.0.1(transitive)
- Removedpkg-up@1.0.0(transitive)
- Removedrechoir@0.7.1(transitive)
- Removedresolve@1.22.8(transitive)
- Removedresolve-dir@1.0.1(transitive)
- Removedresolve-from@2.0.0(transitive)
- Removedresolve-pkg@0.1.0(transitive)
- Removedsafer-buffer@2.1.2(transitive)
- Removedsprintf-js@1.0.31.1.3(transitive)
- Removedsupports-color@7.2.0(transitive)
- Removedsupports-preserve-symlinks-flag@1.0.0(transitive)
- Removedto-regex-range@5.0.1(transitive)
- Removedunc-path-regex@0.1.2(transitive)
- Removedunderscore.string@3.3.6(transitive)
- Removedutil-deprecate@1.0.2(transitive)
- Removedv8flags@3.2.0(transitive)
- Removedwhich@1.3.12.0.2(transitive)
- Removedwrappy@1.0.2(transitive)