Socket
Socket
Sign inDemoInstall

ng.cx.google.drive

Package Overview
Dependencies
3
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.7 to 1.0.8

11

dist/ng.cx.google.drive.js

@@ -1,8 +0,3 @@

System.register("google/auth.js",["google/google"],function(a){var b,c,d;return{setters:[function(a){b=a}],execute:function(){c=["profile","https://www.googleapis.com/auth/drive"],d=function(){function a(a,b){var d,e=this;this.clientId=a,this.scopes=b||c,this._hook=new Promise(function(a){return d=a}),this._wait(function(){e._googleAuth=gapi.auth2.init({client_id:e.clientId,scope:e.scopes.join(" "),fetch_basic_profile:!1}),e._googleAuth.then(function(){d()})})}return a.prototype.authorize=function(){var a=this;return new Promise(function(b,c){a._hook.then(function(){a._googleAuth.signIn().then(b,c)})})},a.prototype.checkAuth=function(){var a=this;return new Promise(function(b,c){a._hook.then(function(){var d=a._googleAuth.currentUser.get();a._googleAuth.isSignedIn.get()&&d&&d.hasGrantedScopes(a.scopes.join(" "))?b():c()})})},a.prototype.signOut=function(){var a=this;return new Promise(function(b,c){a._hook.then(function(){a._googleAuth.signOut().then(b,c)})})},a.prototype._wait=function(a){b.API.bootstrap().then(a)},a}(),a("Auth",d)}}}),System.register("google/api.js",[],function(a){var b,c;return{setters:[],execute:function(){b={drive:"v3"},c=function(){function a(){}return a.bootstrap=function(a){var b=this;return this._api_load_promise||(this._api_load_promise=new Promise(function(c,d){return b._add_script_tag(c,d,a)})),this._api_load_promise},a.load=function(c,d){return b.hasOwnProperty(c)?b[c]!==d&&console.warn("Unsupported "+c+'-api version "'+d+'"'):console.warn('Unsupported api "'+c+'"'),a._script_loaded?new Promise(function(a,b){return gapi.client.load(c,d,a)}):Promise.reject("Google Apis has not been loaded")},a._add_script_tag=function(b,c,d){var e=this;if(a._script_loaded)this._api_has_loaded(b,c,d);else{var f=document.createElement("script"),g="__gapi__callback",h=window.document,i=h.getElementsByTagName("script")[0];f.setAttribute("src","https://apis.google.com/js/api:client.js?onload="+g),f.async=!0,window[g]=function(){gapi.load("auth2",function(){return e._api_has_loaded(b,c,d)})},i?i.parentNode.insertBefore(f,i):(h.head||h.body||h.documentElement).appendChild(f)}},a._api_has_loaded=function(c,d,e){a._script_loaded=!0,e?this.load(e,b[e]).then(c):c()},a._script_loaded=!1,a}(),a("API",c)}}}),System.register("google/drive/file.js",[],function(a){var b,c,d;return{setters:[],execute:function(){b={FOLDER:"application/vnd.google-apps.folder"},c=function(){function a(a){this.width=a&&a.width,this.height=a&&a.height,this.durationMillis=a&&a.durationMillis}return a}(),d=function(){function a(a){this.kind=a.kind,this.id=a.id,this.name=a.name,this.mimeType=a.mimeType,this.description=a.description,this.starred=a.starred,this.trashed=a.trashed,this.parents=a.parents,this.version=a.version,this.webContentLink=a.webContentLink,this.webViewLink=a.webViewLink,this.iconLink=a.iconLink,this.thumbnailLink=a.thumbnailLink,this.createdTime=a.createdTime,this.modifiedTime=a.modifiedTime,this.videoMediaMetadata=new c(a.videoMediaMetadata)}return a.prototype.isFolder=function(){return this.mimeType&&this.mimeType===b.FOLDER},a}(),a("DriveFileResource",d)}}}),System.register("google/drive/permissions.js",[],function(a){var b,c;return{setters:[],execute:function(){b={COMMENTER:"commenter",OWNER:"owner",READER:"reader",WRITER:"writer"},c=function(){function a(){}return a.create=function(a,b,c){var d=this,e={fileId:a,type:b,role:c},f=gapi.client.drive.permissions.create(e);return new Promise(function(a,b){return d._execute(f,a,b)})},a._execute=function(a,b,c){var d=this;a.execute(function(a){return d._handleResponse(a,b,c)})},a._handleResponse=function(a,b,c){b(a)},a}(),a("DrivePermissions",c)}}}),System.register("google/drive/drive.js",["./query","./file","./permissions"],function(a){var b,c,d,e,f,g;return{setters:[function(a){b=a},function(a){c=a},function(a){d=a}],execute:function(){e={UNKONW_ACTION:new Error("Can't handle result for unkown action")},function(a){a[a.GET=0]="GET",a[a.LIST=1]="LIST"}(f||(f={})),g=function(){function a(){}return a.get=function(a){var b=this,c=a||this._defaultQuery(),d=gapi.client.drive.files.get(c.toQuery());return new Promise(function(a,e){return b._execute(f.GET,d,c,a,e)})},a.list=function(a){var b,c=this,d=a||this._defaultQuery();return b=gapi.client.drive.files.list(d.toQuery()),new Promise(function(a,e){return c._execute(f.LIST,b,d,a,e)})},a._createFileResources=function(a){var b=[];return a.forEach(function(a){b.push(new c.DriveFileResource(a))}),b},a._defaultQuery=function(){return(new b.DriveQuery).limit(100)},a._execute=function(a,b,c,d,e){var f=this;b.execute(function(b){return f._handleResponse(a,c,b,d,e)})},a._handleResponse=function(a,b,d,g,h){var i={query:b};switch(a){case f.GET:i.resource=new c.DriveFileResource(d),g(i);break;case f.LIST:b._pageToken(d.nextPageToken),i.resources=this._createFileResources(d.files||[]),g(i);break;default:throw e.UNKONW_ACTION}},a.permissions=d.DrivePermissions,a}(),a("Drive",g)}}}),System.register("google/drive/query.js",[],function(a){function b(a,b){a._queryFieldsRegistry=a._queryFieldsRegistry||{},a._queryFieldsRegistry[b]=[i,b,d.EQUAL]}function c(a,b){a._queryFieldsRegistry=a._queryFieldsRegistry||{},a._queryFieldsRegistry[b]=[j,b,d.IN]}var d,e,f,g,h,i,j,k,l,m=this&&this.__extends||function(a,b){function c(){this.constructor=a}for(var d in b)b.hasOwnProperty(d)&&(a[d]=b[d]);a.prototype=null===b?Object.create(b):(c.prototype=b.prototype,new c)},n=this&&this.__decorate||function(a,b,c,d){var e,f=arguments.length,g=3>f?b:null===d?d=Object.getOwnPropertyDescriptor(b,c):d;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)g=Reflect.decorate(a,b,c,d);else for(var h=a.length-1;h>=0;h--)(e=a[h])&&(g=(3>f?e(g):f>3?e(b,c,g):e(b,c))||g);return f>3&&g&&Object.defineProperty(b,c,g),g},o=this&&this.__metadata||function(a,b){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(a,b):void 0};return{setters:[],execute:function(){d={CONTAINS:'{key} contains "{value}"',NOT_CONTAINS:'not {key} contains "{value}"',EQUAL:'{key}="{value}"',NOT_EQUAL:'{key}!="{value}"',IN:'"{value}" in {key}'},e={ASCENDING:"asc",DESCENDING:"desc"},f=["domain","user"],g=["createdTime","folder","modifiedByMeTime","modifiedTime","name","quotaBytesUsed","recency","sharedWithMeTime","starred","viewedByMeTime"],h=["drive","appDataFolder","photos"],i=function(){function a(a,b){this.key=a,this.defaultOperator=b,this.operatorValuePair={},this.operatorValuePair[d.CONTAINS]=[],this.operatorValuePair[d.NOT_CONTAINS]=[],this.operatorValuePair[d.EQUAL]=[],this.operatorValuePair[d.NOT_EQUAL]=[],this.operatorValuePair[d.IN]=[]}return Object.defineProperty(a.prototype,"valuesCount",{get:function(){var a,b=0;for(a in this.operatorValuePair)b+=this.operatorValuePair[a].length;return b},enumerable:!0,configurable:!0}),a.prototype.set=function(a,b){var c=a||this.defaultOperator;if(!this.operatorValuePair.hasOwnProperty(c))throw new Error('Uknown operator "'+c+'" for QueryField when setting value "'+b+'"');this.operatorValuePair[c].push(b)},a.prototype.toString=function(){var a,b,c,d,e,f=[];for(c in this.operatorValuePair)for(d=0;d<this.operatorValuePair[c].length;d+=1)if(this.operatorValuePair[c][d]instanceof Array){for(a="(",b=[],e=0;e<this.operatorValuePair[c][d].length;e+=1)b.push(this.constructKeyValueStr(this.key,this.operatorValuePair[c][d][e],c));a+=b.join(" or "),a+=")",f.push(a)}else f.push(this.constructKeyValueStr(this.key,this.operatorValuePair[c][d],c));return f.length>1?f.join(" and "):f.join("")},a.prototype.constructKeyValueStr=function(a,b,c){var d=c.replace("{key}",a);return d=d.replace("{value}",b)},a}(),j=function(a){function b(){a.apply(this,arguments)}return m(b,a),b.prototype.toString=function(){var a,b,c=[];for(a in this.operatorValuePair)for(b=0;b<this.operatorValuePair[a].length;b+=1)c.push(this.constructKeyValueStr(this.key,this.operatorValuePair[a][b],a));return c.join("")},b}(i),k=function(){function a(){var a,b,c;this._queryFields={};for(var d in this._queryFieldsRegistry)a=this._queryFieldsRegistry[d][0],b=this._queryFieldsRegistry[d][1],c=this._queryFieldsRegistry[d][2],this._queryFields[d]=new a(b,c)}return Object.defineProperty(a.prototype,"name",{get:function(){return this._queryFields.name.value},set:function(a){this._queryFields.name.value=a},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"mimeType",{get:function(){return this._queryFields.mimeType.value},set:function(a){this._queryFields.mimeType.value=a},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"fullText",{get:function(){return this._queryFields.fullText.value},set:function(a){this._queryFields.fullText.value=a},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"modifiedTime",{get:function(){return this._queryFields.modifiedTime.value},set:function(a){this._queryFields.modifiedTime.value=a},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"viewedByMeTime",{get:function(){return this._queryFields.viewedByMeTime.value},set:function(a){this._queryFields.viewedByMeTime.value=a},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"trashed",{get:function(){return this._queryFields.trashed.value},set:function(a){this._queryFields.trashed.value=a},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"starred",{get:function(){return this._queryFields.starred.value},set:function(a){this._queryFields.starred.value=a},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"parents",{get:function(){return this._queryFields.parents.value},set:function(a){this._queryFields.parents.value=a},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"owners",{get:function(){return this._queryFields.owners.value},set:function(a){this._queryFields.owners.value=a},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"writers",{get:function(){return this._queryFields.writers.value},set:function(a){this._queryFields.writers.value=a},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"readers",{get:function(){return this._queryFields.readers.value},set:function(a){this._queryFields.readers.value=a},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"sharedWithMe",{get:function(){return this._queryFields.sharedWithMe.value},set:function(a){this._queryFields.sharedWithMe.value=a},enumerable:!0,configurable:!0}),a.prototype.toString=function(){var a,b=[];for(var c in this._queryFields)this._queryFields.hasOwnProperty(c)&&this._queryFields[c].valuesCount>0&&(a=this._queryFields[c],b.push(a.toString()));return b.join(" and ")},n([b,o("design:type",String)],a.prototype,"name",null),n([b,o("design:type",String)],a.prototype,"mimeType",null),n([b,o("design:type",String)],a.prototype,"fullText",null),n([b,o("design:type",Date)],a.prototype,"modifiedTime",null),n([b,o("design:type",Date)],a.prototype,"viewedByMeTime",null),n([b,o("design:type",Boolean)],a.prototype,"trashed",null),n([b,o("design:type",Boolean)],a.prototype,"starred",null),n([c,o("design:type",String)],a.prototype,"parents",null),n([c,o("design:type",String)],a.prototype,"owners",null),n([c,o("design:type",String)],a.prototype,"writers",null),n([c,o("design:type",String)],a.prototype,"readers",null),n([b,o("design:type",Boolean)],a.prototype,"sharedWithMe",null),a}(),l=function(){function a(){this._queryQ=new k,this._fields=[],this._orderBy=[],this._spaces=[]}return a.prototype.contains=function(a,b,c){return this.equal(a,b,d.CONTAINS)},a.prototype.corpus=function(a){if(-1===f.indexOf(a))throw new Error('"'+a+'" is not a valid corpus field. Valid fields are '+f);return this._corpus=a,this},a.prototype.equal=function(a,b,c){if(!this._queryQ._queryFields.hasOwnProperty(a))throw new Error('DriveQuery: No property named "'+a+'"');if(this._queryQ._queryFields[a]instanceof j&&(c||this._queryQ._queryFields[a].defaultOperator)!==d.IN)throw new Error("DriveQuery: QueryCollectionField only supports OPERATORS.IN");return this._queryQ._queryFields[a].set(c,b),this},a.prototype.fields=function(a){return a instanceof Array?this._fields=this._fields.concat(a):this._fields.push(a),this},a.prototype.fileId=function(a){return this._fileId=a,this},a.prototype.limit=function(a){return this._limit=a,this},Object.defineProperty(a.prototype,"not",{get:function(){var a=this;return{contains:function(b,c){return a.equal(b,c,d.NOT_CONTAINS)},equal:function(b,c){return a.equal(b,c,d.NOT_EQUAL)}}},enumerable:!0,configurable:!0}),a.prototype.orderBy=function(a,b){void 0===b&&(b=e.ASCENDING);var c;if(-1===g.indexOf(a))throw new Error('"'+a+'" is not a valid orderBy field. Valid fields are '+g);return c=a+(b===e.DESCENDING?" desc":""),this._orderBy.push(c),this},a.prototype.spaces=function(a){if(-1===h.indexOf(a))throw new Error('"'+a+'" is not a valid spaces field. Valid fields are '+h);return this._spaces.push(a),this},a.prototype.toQuery=function(){var a=this._queryQ.toString(),b={};return a&&(b.q=a),this._corpus&&(b.corpus=this._corpus),this._fields.length>0&&(b.fields=this._fields.join(",")),this._fileId&&(b.fileId=this._fileId),this._limit&&(b.pageSize=this._limit),this._orderBy.length>0&&(b.orderBy=this._orderBy.join(",")),this._spaces.length>0&&(b.spaces=this._spaces.join(",")),this._nextPageToken&&(b.pageToken=this._nextPageToken),b},a.prototype._pageToken=function(a){this._nextPageToken=a},a}(),a("DriveQuery",l)}}}),System.register("google/google.js",["./auth","./api","./drive/drive","./drive/query"],function(a){return{setters:[function(b){a({Auth:b.Auth})},function(b){a({API:b.API})},function(b){a({Drive:b.Drive})},function(b){a({DriveQuery:b.DriveQuery})}],execute:function(){}}}),System.register("cx/googleDrive.js",["google/google"],function(a){var b,c;return{setters:[function(a){b=a}],execute:function(){c=function(){function a(){}return a.bootstrap=function(){b.API.bootstrap("drive"),angular.module("ng.cx.google.drive",[]).service("google",[function(){"use strict";this.api=b.API,this.Auth=b.Auth,this.drive=b.Drive,this.DriveQuery=b.DriveQuery}])},a}(),a("GoogleDrive",c)}}});
//# sourceMappingURL=ng.cx.google.drive.js.map
System.config({
packages: {
'cx': {defaultExtension: 'js'},
'google': {defaultExtension: 'js'}
}
});
/// <reference path="../../typings/tsd.d.ts" />
System.register("google/auth",["google/google"],function(a){var b,c,d;return{setters:[function(a){b=a}],execute:function(){c=["profile","https://www.googleapis.com/auth/drive"],d=function(){function a(a,b){var d,e=this;this.clientId=a,this.scopes=b||c,this._hook=new Promise(function(a){return d=a}),this._wait(function(){e._googleAuth=gapi.auth2.init({client_id:e.clientId,scope:e.scopes.join(" "),fetch_basic_profile:!1}),e._googleAuth.then(function(){d()})})}return a.prototype.authorize=function(){var a=this;return new Promise(function(b,c){a._hook.then(function(){a._googleAuth.signIn().then(b,c)})})},a.prototype.checkAuth=function(){var a=this;return new Promise(function(b,c){a._hook.then(function(){var d=a._googleAuth.currentUser.get();a._googleAuth.isSignedIn.get()&&d&&d.hasGrantedScopes(a.scopes.join(" "))?b():c()})})},a.prototype.signOut=function(){var a=this;return new Promise(function(b,c){a._hook.then(function(){a._googleAuth.signOut().then(b,c)})})},a.prototype._wait=function(a){b.API.bootstrap().then(a)},a}(),a("Auth",d)}}}),System.register("google/api",[],function(a){var b,c;return{setters:[],execute:function(){b={drive:"v3"},c=function(){function a(){}return a.bootstrap=function(a){var b=this;return this._api_load_promise||(this._api_load_promise=new Promise(function(c,d){return b._add_script_tag(c,d,a)})),this._api_load_promise},a.load=function(c,d){return b.hasOwnProperty(c)?b[c]!==d&&console.warn("Unsupported "+c+'-api version "'+d+'"'):console.warn('Unsupported api "'+c+'"'),a._script_loaded?new Promise(function(a,b){return gapi.client.load(c,d,a)}):Promise.reject("Google Apis has not been loaded")},a._add_script_tag=function(b,c,d){var e=this;if(a._script_loaded)this._api_has_loaded(b,c,d);else{var f=document.createElement("script"),g="__gapi__callback",h=window.document,i=h.getElementsByTagName("script")[0];f.setAttribute("src","https://apis.google.com/js/api:client.js?onload="+g),f.async=!0,window[g]=function(){gapi.load("auth2",function(){return e._api_has_loaded(b,c,d)})},i?i.parentNode.insertBefore(f,i):(h.head||h.body||h.documentElement).appendChild(f)}},a._api_has_loaded=function(c,d,e){a._script_loaded=!0,e?this.load(e,b[e]).then(c):c()},a._script_loaded=!1,a}(),a("API",c)}}}),System.register("google/drive/file",[],function(a){var b,c,d;return{setters:[],execute:function(){b={FOLDER:"application/vnd.google-apps.folder"},c=function(){function a(a){this.width=a&&a.width,this.height=a&&a.height,this.durationMillis=a&&a.durationMillis}return a}(),d=function(){function a(a){this.kind=a.kind,this.id=a.id,this.name=a.name,this.mimeType=a.mimeType,this.description=a.description,this.starred=a.starred,this.trashed=a.trashed,this.parents=a.parents,this.version=a.version,this.webContentLink=a.webContentLink,this.webViewLink=a.webViewLink,this.iconLink=a.iconLink,this.thumbnailLink=a.thumbnailLink,this.createdTime=a.createdTime,this.modifiedTime=a.modifiedTime,this.videoMediaMetadata=new c(a.videoMediaMetadata)}return a.prototype.isFolder=function(){return this.mimeType&&this.mimeType===b.FOLDER},a}(),a("DriveFileResource",d)}}}),System.register("google/drive/permissions",[],function(a){var b,c;return{setters:[],execute:function(){b={COMMENTER:"commenter",OWNER:"owner",READER:"reader",WRITER:"writer"},c=function(){function a(){}return a.create=function(a,b,c){var d=this,e={fileId:a,type:b,role:c},f=gapi.client.drive.permissions.create(e);return new Promise(function(a,b){return d._execute(f,a,b)})},a._execute=function(a,b,c){var d=this;a.execute(function(a){return d._handleResponse(a,b,c)})},a._handleResponse=function(a,b,c){b(a)},a}(),a("DrivePermissions",c)}}}),System.register("google/drive/drive",["google/drive/query","google/drive/file","google/drive/permissions"],function(a){var b,c,d,e,f,g;return{setters:[function(a){b=a},function(a){c=a},function(a){d=a}],execute:function(){e={UNKONW_ACTION:new Error("Can't handle result for unkown action")},function(a){a[a.GET=0]="GET",a[a.LIST=1]="LIST"}(f||(f={})),g=function(){function a(){}return a.get=function(a){var b=this,c=a||this._defaultQuery(),d=gapi.client.drive.files.get(c.toQuery());return new Promise(function(a,e){return b._execute(f.GET,d,c,a,e)})},a.list=function(a){var b,c=this,d=a||this._defaultQuery();return b=gapi.client.drive.files.list(d.toQuery()),new Promise(function(a,e){return c._execute(f.LIST,b,d,a,e)})},a._createFileResources=function(a){var b=[];return a.forEach(function(a){b.push(new c.DriveFileResource(a))}),b},a._defaultQuery=function(){return(new b.DriveQuery).limit(100)},a._execute=function(a,b,c,d,e){var f=this;b.execute(function(b){return f._handleResponse(a,c,b,d,e)})},a._handleResponse=function(a,b,d,g,h){var i={query:b};switch(a){case f.GET:i.resource=new c.DriveFileResource(d),g(i);break;case f.LIST:b._pageToken(d.nextPageToken),i.resources=this._createFileResources(d.files||[]),g(i);break;default:throw e.UNKONW_ACTION}},a.permissions=d.DrivePermissions,a}(),a("Drive",g)}}}),System.register("google/drive/query",[],function(a){function b(a,b){a._queryFieldsRegistry=a._queryFieldsRegistry||{},a._queryFieldsRegistry[b]=[i,b,d.EQUAL]}function c(a,b){a._queryFieldsRegistry=a._queryFieldsRegistry||{},a._queryFieldsRegistry[b]=[j,b,d.IN]}var d,e,f,g,h,i,j,k,l,m=this&&this.__extends||function(a,b){function c(){this.constructor=a}for(var d in b)b.hasOwnProperty(d)&&(a[d]=b[d]);a.prototype=null===b?Object.create(b):(c.prototype=b.prototype,new c)},n=this&&this.__decorate||function(a,b,c,d){var e,f=arguments.length,g=3>f?b:null===d?d=Object.getOwnPropertyDescriptor(b,c):d;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)g=Reflect.decorate(a,b,c,d);else for(var h=a.length-1;h>=0;h--)(e=a[h])&&(g=(3>f?e(g):f>3?e(b,c,g):e(b,c))||g);return f>3&&g&&Object.defineProperty(b,c,g),g};return{setters:[],execute:function(){d={CONTAINS:'{key} contains "{value}"',NOT_CONTAINS:'not {key} contains "{value}"',EQUAL:'{key}="{value}"',NOT_EQUAL:'{key}!="{value}"',IN:'"{value}" in {key}'},e={ASCENDING:"asc",DESCENDING:"desc"},f=["domain","user"],g=["createdTime","folder","modifiedByMeTime","modifiedTime","name","quotaBytesUsed","recency","sharedWithMeTime","starred","viewedByMeTime"],h=["drive","appDataFolder","photos"],i=function(){function a(a,b){this.key=a,this.defaultOperator=b,this.operatorValuePair={},this.operatorValuePair[d.CONTAINS]=[],this.operatorValuePair[d.NOT_CONTAINS]=[],this.operatorValuePair[d.EQUAL]=[],this.operatorValuePair[d.NOT_EQUAL]=[],this.operatorValuePair[d.IN]=[]}return Object.defineProperty(a.prototype,"valuesCount",{get:function(){var a,b=0;for(a in this.operatorValuePair)b+=this.operatorValuePair[a].length;return b},enumerable:!0,configurable:!0}),a.prototype.set=function(a,b){var c=a||this.defaultOperator;if(!this.operatorValuePair.hasOwnProperty(c))throw new Error('Uknown operator "'+c+'" for QueryField when setting value "'+b+'"');this.operatorValuePair[c].push(b)},a.prototype.toString=function(){var a,b,c,d,e,f=[];for(c in this.operatorValuePair)for(d=0;d<this.operatorValuePair[c].length;d+=1)if(this.operatorValuePair[c][d]instanceof Array){for(a="(",b=[],e=0;e<this.operatorValuePair[c][d].length;e+=1)b.push(this.constructKeyValueStr(this.key,this.operatorValuePair[c][d][e],c));a+=b.join(" or "),a+=")",f.push(a)}else f.push(this.constructKeyValueStr(this.key,this.operatorValuePair[c][d],c));return f.length>1?f.join(" and "):f.join("")},a.prototype.constructKeyValueStr=function(a,b,c){var d=c.replace("{key}",a);return d=d.replace("{value}",b)},a}(),j=function(a){function b(){a.apply(this,arguments)}return m(b,a),b.prototype.toString=function(){var a,b,c=[];for(a in this.operatorValuePair)for(b=0;b<this.operatorValuePair[a].length;b+=1)c.push(this.constructKeyValueStr(this.key,this.operatorValuePair[a][b],a));return c.join("")},b}(i),k=function(){function a(){var a,b,c;this._queryFields={};for(var d in this._queryFieldsRegistry)a=this._queryFieldsRegistry[d][0],b=this._queryFieldsRegistry[d][1],c=this._queryFieldsRegistry[d][2],this._queryFields[d]=new a(b,c)}return Object.defineProperty(a.prototype,"name",{get:function(){return this._queryFields.name.value},set:function(a){this._queryFields.name.value=a},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"mimeType",{get:function(){return this._queryFields.mimeType.value},set:function(a){this._queryFields.mimeType.value=a},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"fullText",{get:function(){return this._queryFields.fullText.value},set:function(a){this._queryFields.fullText.value=a},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"modifiedTime",{get:function(){return this._queryFields.modifiedTime.value},set:function(a){this._queryFields.modifiedTime.value=a},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"viewedByMeTime",{get:function(){return this._queryFields.viewedByMeTime.value},set:function(a){this._queryFields.viewedByMeTime.value=a},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"trashed",{get:function(){return this._queryFields.trashed.value},set:function(a){this._queryFields.trashed.value=a},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"starred",{get:function(){return this._queryFields.starred.value},set:function(a){this._queryFields.starred.value=a},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"parents",{get:function(){return this._queryFields.parents.value},set:function(a){this._queryFields.parents.value=a},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"owners",{get:function(){return this._queryFields.owners.value},set:function(a){this._queryFields.owners.value=a},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"writers",{get:function(){return this._queryFields.writers.value},set:function(a){this._queryFields.writers.value=a},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"readers",{get:function(){return this._queryFields.readers.value},set:function(a){this._queryFields.readers.value=a},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"sharedWithMe",{get:function(){return this._queryFields.sharedWithMe.value},set:function(a){this._queryFields.sharedWithMe.value=a},enumerable:!0,configurable:!0}),a.prototype.toString=function(){var a,b=[];for(var c in this._queryFields)this._queryFields.hasOwnProperty(c)&&this._queryFields[c].valuesCount>0&&(a=this._queryFields[c],b.push(a.toString()));return b.join(" and ")},n([b],a.prototype,"name",null),n([b],a.prototype,"mimeType",null),n([b],a.prototype,"fullText",null),n([b],a.prototype,"modifiedTime",null),n([b],a.prototype,"viewedByMeTime",null),n([b],a.prototype,"trashed",null),n([b],a.prototype,"starred",null),n([c],a.prototype,"parents",null),n([c],a.prototype,"owners",null),n([c],a.prototype,"writers",null),n([c],a.prototype,"readers",null),n([b],a.prototype,"sharedWithMe",null),a}(),l=function(){function a(){this._queryQ=new k,this._fields=[],this._orderBy=[],this._spaces=[]}return a.prototype.contains=function(a,b,c){return this.equal(a,b,d.CONTAINS)},a.prototype.corpus=function(a){if(-1===f.indexOf(a))throw new Error('"'+a+'" is not a valid corpus field. Valid fields are '+f);return this._corpus=a,this},a.prototype.equal=function(a,b,c){if(!this._queryQ._queryFields.hasOwnProperty(a))throw new Error('DriveQuery: No property named "'+a+'"');if(this._queryQ._queryFields[a]instanceof j&&(c||this._queryQ._queryFields[a].defaultOperator)!==d.IN)throw new Error("DriveQuery: QueryCollectionField only supports OPERATORS.IN");return this._queryQ._queryFields[a].set(c,b),this},a.prototype.fields=function(a){return a instanceof Array?this._fields=this._fields.concat(a):this._fields.push(a),this},a.prototype.fileId=function(a){return this._fileId=a,this},a.prototype.limit=function(a){return this._limit=a,this},Object.defineProperty(a.prototype,"not",{get:function(){var a=this;return{contains:function(b,c){return a.equal(b,c,d.NOT_CONTAINS)},equal:function(b,c){return a.equal(b,c,d.NOT_EQUAL)}}},enumerable:!0,configurable:!0}),a.prototype.orderBy=function(a,b){void 0===b&&(b=e.ASCENDING);var c;if(-1===g.indexOf(a))throw new Error('"'+a+'" is not a valid orderBy field. Valid fields are '+g);return c=a+(b===e.DESCENDING?" desc":""),this._orderBy.push(c),this},a.prototype.spaces=function(a){if(-1===h.indexOf(a))throw new Error('"'+a+'" is not a valid spaces field. Valid fields are '+h);return this._spaces.push(a),this},a.prototype.toQuery=function(){var a=this._queryQ.toString(),b={};return a&&(b.q=a),this._corpus&&(b.corpus=this._corpus),this._fields.length>0&&(b.fields=this._fields.join(",")),this._fileId&&(b.fileId=this._fileId),this._limit&&(b.pageSize=this._limit),this._orderBy.length>0&&(b.orderBy=this._orderBy.join(",")),this._spaces.length>0&&(b.spaces=this._spaces.join(",")),this._nextPageToken&&(b.pageToken=this._nextPageToken),b},a.prototype._pageToken=function(a){this._nextPageToken=a},a}(),a("DriveQuery",l)}}}),System.register("google/google",["google/auth","google/api","google/drive/drive","google/drive/query"],function(a){return{setters:[function(b){a({Auth:b.Auth})},function(b){a({API:b.API})},function(b){a({Drive:b.Drive})},function(b){a({DriveQuery:b.DriveQuery})}],execute:function(){}}}),System.register("cx/googleDrive",["google/google"],function(a){var b,c;return{setters:[function(a){b=a}],execute:function(){c=function(){function a(){}return a.bootstrap=function(){b.API.bootstrap("drive"),window.cxGoogleDrive=window.cxGoogleDrive||{},window.cxGoogleDrive.api=b.API,window.cxGoogleDrive.Auth=b.Auth,window.cxGoogleDrive.drive=b.Drive,window.cxGoogleDrive.DriveQuery=b.DriveQuery},a}(),a("GoogleDrive",c)}}});
//# sourceMappingURL=ng.cx.google.drive.js.map

@@ -19,3 +19,3 @@ var config = {

'typescript': {
'inputPath': 'cx/googleDrive.js',
'inputPath': 'cx/googleDrive',
'systemConfig': 'src/system.config.js',

@@ -22,0 +22,0 @@ 'tsconfig': 'src/tsconfig.json',

@@ -10,8 +10,19 @@ (function () {

return function (cb) {
var builder = new Builder(appConfig.output),
var builder = new Builder('./src', {
'transpiler': 'typescript',
'paths': {
'cx/*': 'cx/*.ts',
'google/*': 'google/*.ts'
},
'map': {
'typescript': './node_modules/typescript/lib/typescript.js'
}
}),
inputPath = appConfig.typescript.inputPath,
outputFile = appConfig.dist + 'ng.cx.google.drive.js';
builder.bundle(inputPath, outputFile, { minify: true, sourceMaps: true })
.then(cb)
builder.bundle(inputPath, outputFile, { format: 'register', minify: true, sourceMaps: true })
.then(function () {
cb();
})
.catch(function (ex) {

@@ -18,0 +29,0 @@ console.log(ex);

{
"name": "ng.cx.google.drive",
"version": "1.0.7",
"version": "1.0.8",
"description": "angular 1.0 wrapper for google drive api written in typescript",

@@ -5,0 +5,0 @@ "license": {

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc