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

angular-luminate-utils

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

angular-luminate-utils - npm Package Compare versions

Comparing version 0.6.2 to 0.7.0

10

dist/js/angular-luminate-utils.js
(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"
}
}
}
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