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.0 to 1.0.1

2

dist/ng.cx.google.drive.js

@@ -1,2 +0,2 @@

System.register("google/auth.js",["google/google"],function(a){var b,c,d;return{setters:[function(a){b=a}],execute:function(){c=["https://www.googleapis.com/auth/drive"],d=function(){function a(a,b){this.clientId=a,this.scopes=b||c}return a.prototype.authorize=function(){var a=this;return new Promise(function(b,c){return a._authorize(b,c,!1)})},a.prototype.checkAuth=function(){var a=this;return new Promise(function(b,c){return a._authorize(b,c,!0)})},a.prototype._authorize=function(a,c,d){function e(){gapi.auth.authorize({client_id:f.clientId,scope:f.scopes,immediate:d},f._handleAuthResult(a,c))}var f=this;b.API.bootstrap().then(e)},a.prototype._handleAuthResult=function(a,b){return function(c){c&&!c.error?a(c):b(c.error)}},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/client.js?onload="+g),f.async=!0,window[g]=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;return{setters:[],execute:function(){b={FOLDER:"application/vnd.google-apps.folder"},c=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}return a.prototype.isFolder=function(){return this.mimeType&&this.mimeType===b.FOLDER},a}(),a("DriveFileResource",c)}}}),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={EQUAL:"=",NOT_EQUAL:"!=",IN:"in"},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.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.key+c+'"'+this.operatorValuePair[c][d][e]+'"');a+=b.join(" or "),a+=")",f.push(a)}else f.push(this.key+c+'"'+this.operatorValuePair[c][d]+'"');return f.length>1?f.join(" and "):f.join("")},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.operatorValuePair[a][b]+'" '+a+" "+this.key);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.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 operator "'+d.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{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("api",[function(){return b.API}]).factory("Auth",[function(){return b.Auth}]).service("drive",[function(){return b.Drive}]).factory("DriveQuery",[function(){return b.DriveQuery}])},a}(),a("GoogleDrive",c)}}});
System.register("google/auth.js",["google/google"],function(a){var b,c,d;return{setters:[function(a){b=a}],execute:function(){c=["https://www.googleapis.com/auth/drive"],d=function(){function a(a,b){this.clientId=a,this.scopes=b||c}return a.prototype.authorize=function(){var a=this;return new Promise(function(b,c){return a._authorize(b,c,!1)})},a.prototype.checkAuth=function(){var a=this;return new Promise(function(b,c){return a._authorize(b,c,!0)})},a.prototype._authorize=function(a,c,d){function e(){gapi.auth.authorize({client_id:f.clientId,scope:f.scopes,immediate:d},f._handleAuthResult(a,c))}var f=this;b.API.bootstrap().then(e)},a.prototype._handleAuthResult=function(a,b){return function(c){c&&!c.error?a(c):b(c.error)}},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/client.js?onload="+g),f.async=!0,window[g]=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;return{setters:[],execute:function(){b={FOLDER:"application/vnd.google-apps.folder"},c=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}return a.prototype.isFolder=function(){return this.mimeType&&this.mimeType===b.FOLDER},a}(),a("DriveFileResource",c)}}}),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={EQUAL:"=",NOT_EQUAL:"!=",IN:"in"},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.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.key+c+'"'+this.operatorValuePair[c][d][e]+'"');a+=b.join(" or "),a+=")",f.push(a)}else f.push(this.key+c+'"'+this.operatorValuePair[c][d]+'"');return f.length>1?f.join(" and "):f.join("")},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.operatorValuePair[a][b]+'" '+a+" "+this.key);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.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 operator "'+d.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{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";return{api:b.API,Auth:b.Auth,drive:b.Drive,DriveQuery:b.DriveQuery}}])},a}(),a("GoogleDrive",c)}}});
//# sourceMappingURL=ng.cx.google.drive.js.map

@@ -16,9 +16,6 @@ angular.module('ng.cx.google.drive.example', [

'$sce',
'api',
'Auth',
'drive',
'DriveQuery',
function ($scope, $sce, api, Auth, drive, DriveQuery) {
'google',
function ($scope, $sce, google) {
'use strict';
var _auth = new Auth(window.CLIENT_ID),
var _auth = new google.Auth(window.CLIENT_ID),
parent = ['root'];

@@ -78,3 +75,3 @@

var _query = new DriveQuery();
var _query = new google.DriveQuery();

@@ -84,3 +81,3 @@ _query.fields(['name', 'thumbnailLink', 'permissions', 'id', 'webContentLink', 'webViewLink', 'mimeType']);

drive.get(_query).then(function (resp) {
google.drive.get(_query).then(function (resp) {
$scope.$evalAsync(function () {

@@ -121,3 +118,3 @@ $scope.selectedFile = resp.resource;

function genereatePublicLink() {
drive.permissions.create($scope.selectedFile.id, 'anyone', 'reader').then(function () {
google.drive.permissions.create($scope.selectedFile.id, 'anyone', 'reader').then(function () {
open($scope.selectedFile);

@@ -128,3 +125,3 @@ });

function _loadFiles() {
var _query = new DriveQuery();
var _query = new google.DriveQuery();

@@ -147,3 +144,3 @@ $scope.allowBack = parent.length > 1;

drive.list(_query).then(function (resp) {
google.drive.list(_query).then(function (resp) {
$scope.$evalAsync(function () {

@@ -150,0 +147,0 @@ $scope.items = resp.resources;

{
"name": "ng.cx.google.drive",
"version": "1.0.0",
"version": "1.0.1",
"description": "angular 1.0 wrapper for google drive api written in typescript",
"license":{
"type": "MIT",
"url": "https://raw.githubusercontent.com/EFEducationFirstMobile/oss/master/LICENSE"
"license": {
"type": "MIT",
"url": "https://raw.githubusercontent.com/EFEducationFirstMobile/oss/master/LICENSE"
},

@@ -9,0 +9,0 @@ "scripts": {

@@ -13,23 +13,15 @@ /// <reference path="../../typings/tsd.d.ts" />

])
.service('api', [
.service('google', [
function() {
return API;
'use strict';
return {
'api': API,
'Auth': Auth,
'drive': Drive,
'DriveQuery': DriveQuery
};
}
])
.factory('Auth', [
function() {
return Auth;
}
])
.service('drive', [
function() {
return Drive;
}
])
.factory('DriveQuery', [
function() {
return DriveQuery;
}
]);
}
}

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