Socket
Socket
Sign inDemoInstall

@microsoft/teams-js

Package Overview
Dependencies
Maintainers
3
Versions
488
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@microsoft/teams-js - npm Package Compare versions

Comparing version 1.3.0-beta.5 to 1.3.0-beta.6

8

dist/MicrosoftTeams.d.ts

@@ -296,2 +296,10 @@

/**
* @private
* Hide from docs.
* ------
* Upload a custom App manifest directly to both team and personal scopes.
* This method works just for the first party Apps.
*/
function uploadCustomApp(manifestBlob: Blob): void;
/**
* Navigates the Microsoft Teams app to the specified tab instance.

@@ -298,0 +306,0 @@ * @param tabInstance The tab instance to navigate to.

22

dist/MicrosoftTeams.js

@@ -39,4 +39,3 @@ ;(function(root, factory) {

for (var j = 0; j < urlParts.length; j++) {
urlRegExpPart +=
(j > 0 ? "[.]" : "") + urlParts[j].replace("*", "[^/^.]+");
urlRegExpPart += (j > 0 ? "[.]" : "") + urlParts[j].replace("*", "[^\/^.]+");
}

@@ -407,2 +406,21 @@ urlRegExpPart += "$";

/**
* @private
* Hide from docs.
* ------
* Upload a custom App manifest directly to both team and personal scopes.
* This method works just for the first party Apps.
*/
function uploadCustomApp(manifestBlob) {
ensureInitialized();
var messageId = sendMessageRequest(parentWindow, "uploadCustomApp", [
manifestBlob
]);
callbacks[messageId] = function (success, result) {
if (!success) {
throw new Error(result);
}
};
}
microsoftTeams.uploadCustomApp = uploadCustomApp;
/**
* Navigates the Microsoft Teams app to the specified tab instance.

@@ -409,0 +427,0 @@ * @param tabInstance The tab instance to navigate to.

2

dist/MicrosoftTeams.min.js

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

!function(t,e){"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?module.exports=e():t.microsoftTeams=e()}(this,function(){String.prototype.startsWith||(String.prototype.startsWith=function(t,e){return this.substr(!e||e<0?0:+e,t.length)===t});var t;return function(t){"use strict";function e(t){for(var e="^",n=t.split("."),i=0;i<n.length;i++)e+=(i>0?"[.]":"")+n[i].replace("*","[^/^.]+");return e+="$"}function n(t){for(var n="",i=0;i<t.length;i++)n+=(0===i?"":"|")+e(t[i]);return new RegExp(n)}function i(){if(!X){X=!0,D=this._window||window;var t=function(t){return w(t)};W=D.parent!==D.self?D.parent:D.opener,W?D.addEventListener("message",t,!1):(Y=!0,window.onNativeMessage=k);try{z="*";var e=S(W,"initialize",[B]);K[e]=function(t,e){_=t,j=e}}finally{z=null}this._uninitialize=function(){_&&(r(null),s(null),c(null)),_===F.settings&&tt.registerOnSaveHandler(null),_===F.remove&&tt.registerOnRemoveHandler(null),Y||D.removeEventListener("message",t,!1),X=!1,W=null,z=null,$=[],R=null,V=null,q=[],G=0,K={},_=null,j=null,Y=!1}}}function o(t){y();var e=S(W,"getContext");K[e]=t}function r(t){y(),J=t}function a(t){J&&J(t),R&&S(R,"themeChange",[t])}function s(t){y(),Q=t}function u(t){Q&&Q(t)}function c(t){y(),Z=t}function f(){Z&&Z()||l()}function l(){y();var t=S(W,"navigateBack",[]);K[t]=function(t){if(!t)throw new Error("Back navigation is not supported in the current client or context.")}}function h(t){y(F.content,F.settings,F.remove);var e=S(W,"navigateCrossDomain",[t]);K[e]=function(t){if(!t)throw new Error("Cross-origin navigation is only supported for URLs matching the pattern registered in the manifest.")}}function v(t,e){y();var n=S(W,"getTabInstances",[e]);K[n]=t}function d(t,e){y();var n=S(W,"getMruTabInstances",[e]);K[n]=t}function g(t){y(F.content),S(W,"shareDeepLink",[t.subEntityId,t.subEntityLabel,t.subEntityWebUrl])}function p(t){y(F.content);var e=[t.entityId,t.title,t.description,t.type,t.objectUrl,t.downloadUrl,t.webPreviewUrl,t.webEditUrl,t.baseUrl,t.editFile,t.subEntityId];S(W,"openFilePreview",e)}function m(t){y();var e=S(W,"navigateToTab",[t]);K[e]=function(t){if(!t)throw new Error("Invalid internalTabInstanceId and/or channelId were/was provided")}}function y(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(!X)throw new Error("The library has not yet been initialized");if(_&&t&&t.length>0){for(var n=!1,i=0;i<t.length;i++)if(t[i]===_){n=!0;break}if(!n)throw new Error("This call is not allowed in the '"+_+"' context")}}function w(t){if(t&&t.data&&"object"==typeof t.data){var e=t.source||t.originalEvent.source,n=t.origin||t.originalEvent.origin;e===D||n!==D.location.origin&&!P.test(n.toLowerCase())||(b(e,n),e===W?k(t):e===R&&T(t))}}function b(t,e){W&&t!==W?R&&t!==R||(R=t,V=e):(W=t,z=e),W&&W.closed&&(W=null,z=null),R&&R.closed&&(R=null,V=null),E(W),E(R)}function k(t){if("id"in t.data){var e=t.data,n=K[e.id];n&&(n.apply(null,e.args),delete K[e.id])}else if("func"in t.data){var e=t.data,i=x[e.func];i&&i.apply(this,e.args)}}function T(t){if("id"in t.data&&"func"in t.data){var e=t.data,n=x[e.func];if(n){var i=n.apply(this,e.args);i&&N(R,e.id,Array.isArray(i)?i:[i])}else{var o=S(W,e.func,e.args);K[o]=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];R&&N(R,e.id,t)}}}}function C(t){return t===W?$:t===R?q:[]}function I(t){return t===W?z:t===R?V:null}function E(t){for(var e=I(t),n=C(t);t&&e&&n.length>0;)t.postMessage(n.shift(),e)}function M(t,e){var n=D.setInterval(function(){0===C(t).length&&(clearInterval(n),e())},100)}function S(t,e,n){var i=U(e,n);if(Y)D&&D.nativeInterface&&D.nativeInterface.framelessPostMessage(JSON.stringify(i));else{var o=I(t);t&&o?t.postMessage(i,o):C(t).push(i)}return i.id}function N(t,e,n){var i=H(e,n),o=I(t);t&&o&&t.postMessage(i,o)}function U(t,e){return{id:G++,func:t,args:e||[]}}function H(t,e){return{id:t,args:e||[]}}var O,B="1.2",L=["https://teams.microsoft.com","https://teams.microsoft.us","https://int.teams.microsoft.com","https://devspaces.skype.com","https://ssauth.skype.com","http://dev.local","https://msft.spoppe.com","https://*.sharepoint.com","https://*.sharepoint-df.com","https://*.sharepointonline.com"],P=n(L),x={},F={settings:"settings",content:"content",authentication:"authentication",remove:"remove"};!function(t){t.desktop="desktop",t.web="web",t.android="android",t.ios="ios"}(O=t.HostClientTypes||(t.HostClientTypes={}));var A;!function(t){function e(t,e){y(),l=e,S(W,"setUpViews",[t])}function n(t){l&&l(t)||(y(),S(W,"viewConfigItemPress",[t]))}function i(t,e){y(),c=e,S(W,"setNavBarMenu",[t])}function o(t){c&&c(t)||(y(),S(W,"handleNavBarMenuItemPress",[t]))}function r(t,e){y(),f=e,S(W,"showActionMenu",[t])}function a(t){f&&f(t)||(y(),S(W,"handleActionMenuItemPress",[t]))}var s=function(){function t(){this.enabled=!0}return t}();t.MenuItem=s;var u;!function(t){t.dropDown="dropDown",t.popOver="popOver"}(u=t.MenuListType||(t.MenuListType={}));var c;x.navBarMenuItemPress=o;var f;x.actionMenuItemPress=a;var l;x.setModuleView=n,t.setUpViews=e,t.setNavBarMenu=i,t.showActionMenu=r}(A=t.menus||(t.menus={}));var D,W,z,R,V,_,j,J,X=!1,Y=!1,$=[],q=[],G=0,K={};x.themeChange=a;var Q;x.fullScreenChange=u;var Z;x.backButtonPress=f,t.initialize=i,t.getContext=o,t.registerOnThemeChangeHandler=r,t.registerFullScreenHandler=s,t.registerBackButtonHandler=c,t.navigateBack=l,t.navigateCrossDomain=h,t.getTabInstances=v,t.getMruTabInstances=d,t.shareDeepLink=g,t.openFilePreview=p,t.navigateToTab=m;var tt;!function(t){function e(t){y(F.settings,F.remove),S(W,"settings.setValidityState",[t])}function n(t){y(F.settings,F.remove);var e=S(W,"settings.getSettings");K[e]=t}function i(t){y(F.settings),S(W,"settings.setSettings",[t])}function o(t){y(F.settings),u=t}function r(t){y(F.remove),c=t}function a(t){var e=new f(t);u?u(e):e.notifySuccess()}function s(){var t=new l;c?c(t):t.notifySuccess()}var u,c;x["settings.save"]=a,x["settings.remove"]=s,t.setValidityState=e,t.getSettings=n,t.setSettings=i,t.registerOnSaveHandler=o,t.registerOnRemoveHandler=r;var f=function(){function t(t){this.notified=!1,this.result=t?t:{}}return t.prototype.notifySuccess=function(){this.ensureNotNotified(),S(W,"settings.save.success"),this.notified=!0},t.prototype.notifyFailure=function(t){this.ensureNotNotified(),S(W,"settings.save.failure",[t]),this.notified=!0},t.prototype.ensureNotNotified=function(){if(this.notified)throw new Error("The SaveEvent may only notify success or failure once.")},t}(),l=function(){function t(){this.notified=!1}return t.prototype.notifySuccess=function(){this.ensureNotNotified(),S(W,"settings.remove.success"),this.notified=!0},t.prototype.notifyFailure=function(t){this.ensureNotNotified(),S(W,"settings.remove.failure",[t]),this.notified=!0},t.prototype.ensureNotNotified=function(){if(this.notified)throw new Error("The removeEvent may only notify success or failure once.")},t}()}(tt=t.settings||(t.settings={}));var et;!function(t){function e(t){g=t}function n(t){var e=void 0!==t?t:g;if(y(F.content,F.settings,F.remove),j===O.desktop){var n=document.createElement("a");n.href=e.url;var i=S(W,"authentication.authenticate",[n.href,e.width,e.height]);K[i]=function(t,n){t?e.successCallback(n):e.failureCallback(n)}}else a(e)}function i(t){y();var e=S(W,"authentication.getAuthToken",[t.resources]);K[e]=function(e,n){e?t.successCallback(n):t.failureCallback(n)}}function o(t){y();var e=S(W,"authentication.getUser");K[e]=function(e,n){e?t.successCallback(n):t.failureCallback(n)}}function r(){s();try{R&&R.close()}finally{R=null,V=null}}function a(t){g=t,r();var e=g.width||600,n=g.height||400;e=Math.min(e,D.outerWidth-400),n=Math.min(n,D.outerHeight-200);var i=document.createElement("a");i.href=g.url;var o="undefined"!=typeof D.screenLeft?D.screenLeft:D.screenX,a="undefined"!=typeof D.screenTop?D.screenTop:D.screenY;o+=D.outerWidth/2-e/2,a+=D.outerHeight/2-n/2,R=D.open(i.href,"_blank","toolbar=no, location=yes, status=no, menubar=no, scrollbars=yes, top="+a+", left="+o+", width="+e+", height="+n),R?u():h("FailedToOpenWindow")}function s(){p&&(clearInterval(p),p=0),delete x.initialize,delete x.navigateCrossDomain}function u(){s(),p=D.setInterval(function(){if(!R||R.closed)h("CancelledByUser");else{var t=V;try{V="*",S(R,"ping")}finally{V=t}}},100),x.initialize=function(){return[F.authentication,j]},x.navigateCrossDomain=function(t){return!1}}function c(t,e){v(e,"result",t),y(F.authentication),S(W,"authentication.authenticate.success",[t]),M(W,function(){return setTimeout(function(){return D.close()},200)})}function f(t,e){v(e,"reason",t),y(F.authentication),S(W,"authentication.authenticate.failure",[t]),M(W,function(){return setTimeout(function(){return D.close()},200)})}function l(t){try{g&&g.successCallback&&g.successCallback(t)}finally{g=null,r()}}function h(t){try{g&&g.failureCallback&&g.failureCallback(t)}finally{g=null,r()}}function v(t,e,n){if(t){var i=document.createElement("a");i.href=decodeURIComponent(t),i.host&&i.host!==window.location.host&&"outlook.office.com"===i.host&&i.search.indexOf("client_type=Win32_Outlook")>-1&&(e&&"result"===e&&(n&&(i.href=d(i.href,"result",n)),D.location.assign(d(i.href,"authSuccess",""))),e&&"reason"===e&&(n&&(i.href=d(i.href,"reason",n)),D.location.assign(d(i.href,"authFailure",""))))}}function d(t,e,n){var i=t.indexOf("#"),o=i===-1?"#":t.substr(i);return o=o+"&"+e+(""!==n?"="+n:""),t=i===-1?t:t.substr(0,i),t+o}var g,p;x["authentication.authenticate.success"]=l,x["authentication.authenticate.failure"]=h,t.registerAuthenticationHandlers=e,t.authenticate=n,t.getAuthToken=i,t.getUser=o,t.notifySuccess=c,t.notifyFailure=f}(et=t.authentication||(t.authentication={}));var nt;!function(t){function e(t,e){y(F.content);var n=S(W,"tasks.startTask",[t]);K[n]=e}function n(t,e){y(F.content),S(W,"tasks.completeTask",[t,e])}t.startTask=e,t.completeTask=n}(nt=t.tasks||(t.tasks={}))}(t||(t={})),t});
!function(t,e){"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?module.exports=e():t.microsoftTeams=e()}(this,function(){String.prototype.startsWith||(String.prototype.startsWith=function(t,e){return this.substr(!e||e<0?0:+e,t.length)===t});var t;return function(t){"use strict";function e(t){for(var e="^",n=t.split("."),i=0;i<n.length;i++)e+=(i>0?"[.]":"")+n[i].replace("*","[^/^.]+");return e+="$"}function n(t){for(var n="",i=0;i<t.length;i++)n+=(0===i?"":"|")+e(t[i]);return new RegExp(n)}function i(){if(!Y){Y=!0,W=this._window||window;var t=function(t){return b(t)};z=W.parent!==W.self?W.parent:W.opener,z?W.addEventListener("message",t,!1):($=!0,window.onNativeMessage=T);try{R="*";var e=N(z,"initialize",[L]);Q[e]=function(t,e){j=t,J=e}}finally{R=null}this._uninitialize=function(){j&&(r(null),s(null),c(null)),j===F.settings&&et.registerOnSaveHandler(null),j===F.remove&&et.registerOnRemoveHandler(null),$||W.removeEventListener("message",t,!1),Y=!1,z=null,R=null,q=[],V=null,_=null,G=[],K=0,Q={},j=null,J=null,$=!1}}}function o(t){w();var e=N(z,"getContext");Q[e]=t}function r(t){w(),X=t}function a(t){X&&X(t),V&&N(V,"themeChange",[t])}function s(t){w(),Z=t}function u(t){Z&&Z(t)}function c(t){w(),tt=t}function f(){tt&&tt()||l()}function l(){w();var t=N(z,"navigateBack",[]);Q[t]=function(t){if(!t)throw new Error("Back navigation is not supported in the current client or context.")}}function h(t){w(F.content,F.settings,F.remove);var e=N(z,"navigateCrossDomain",[t]);Q[e]=function(t){if(!t)throw new Error("Cross-origin navigation is only supported for URLs matching the pattern registered in the manifest.")}}function v(t,e){w();var n=N(z,"getTabInstances",[e]);Q[n]=t}function d(t,e){w();var n=N(z,"getMruTabInstances",[e]);Q[n]=t}function g(t){w(F.content),N(z,"shareDeepLink",[t.subEntityId,t.subEntityLabel,t.subEntityWebUrl])}function p(t){w(F.content);var e=[t.entityId,t.title,t.description,t.type,t.objectUrl,t.downloadUrl,t.webPreviewUrl,t.webEditUrl,t.baseUrl,t.editFile,t.subEntityId];N(z,"openFilePreview",e)}function m(t){w();var e=N(z,"uploadCustomApp",[t]);Q[e]=function(t,e){if(!t)throw new Error(e)}}function y(t){w();var e=N(z,"navigateToTab",[t]);Q[e]=function(t){if(!t)throw new Error("Invalid internalTabInstanceId and/or channelId were/was provided")}}function w(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(!Y)throw new Error("The library has not yet been initialized");if(j&&t&&t.length>0){for(var n=!1,i=0;i<t.length;i++)if(t[i]===j){n=!0;break}if(!n)throw new Error("This call is not allowed in the '"+j+"' context")}}function b(t){if(t&&t.data&&"object"==typeof t.data){var e=t.source||t.originalEvent.source,n=t.origin||t.originalEvent.origin;e===W||n!==W.location.origin&&!P.test(n.toLowerCase())||(k(e,n),e===z?T(t):e===V&&C(t))}}function k(t,e){z&&t!==z?V&&t!==V||(V=t,_=e):(z=t,R=e),z&&z.closed&&(z=null,R=null),V&&V.closed&&(V=null,_=null),M(z),M(V)}function T(t){if("id"in t.data){var e=t.data,n=Q[e.id];n&&(n.apply(null,e.args),delete Q[e.id])}else if("func"in t.data){var e=t.data,i=x[e.func];i&&i.apply(this,e.args)}}function C(t){if("id"in t.data&&"func"in t.data){var e=t.data,n=x[e.func];if(n){var i=n.apply(this,e.args);i&&U(V,e.id,Array.isArray(i)?i:[i])}else{var o=N(z,e.func,e.args);Q[o]=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];V&&U(V,e.id,t)}}}}function I(t){return t===z?q:t===V?G:[]}function E(t){return t===z?R:t===V?_:null}function M(t){for(var e=E(t),n=I(t);t&&e&&n.length>0;)t.postMessage(n.shift(),e)}function S(t,e){var n=W.setInterval(function(){0===I(t).length&&(clearInterval(n),e())},100)}function N(t,e,n){var i=H(e,n);if($)W&&W.nativeInterface&&W.nativeInterface.framelessPostMessage(JSON.stringify(i));else{var o=E(t);t&&o?t.postMessage(i,o):I(t).push(i)}return i.id}function U(t,e,n){var i=O(e,n),o=E(t);t&&o&&t.postMessage(i,o)}function H(t,e){return{id:K++,func:t,args:e||[]}}function O(t,e){return{id:t,args:e||[]}}var B,L="1.2",A=["https://teams.microsoft.com","https://teams.microsoft.us","https://int.teams.microsoft.com","https://devspaces.skype.com","https://ssauth.skype.com","http://dev.local","https://msft.spoppe.com","https://*.sharepoint.com","https://*.sharepoint-df.com","https://*.sharepointonline.com"],P=n(A),x={},F={settings:"settings",content:"content",authentication:"authentication",remove:"remove"};!function(t){t.desktop="desktop",t.web="web",t.android="android",t.ios="ios"}(B=t.HostClientTypes||(t.HostClientTypes={}));var D;!function(t){function e(t,e){w(),l=e,N(z,"setUpViews",[t])}function n(t){l&&l(t)||(w(),N(z,"viewConfigItemPress",[t]))}function i(t,e){w(),c=e,N(z,"setNavBarMenu",[t])}function o(t){c&&c(t)||(w(),N(z,"handleNavBarMenuItemPress",[t]))}function r(t,e){w(),f=e,N(z,"showActionMenu",[t])}function a(t){f&&f(t)||(w(),N(z,"handleActionMenuItemPress",[t]))}var s=function(){function t(){this.enabled=!0}return t}();t.MenuItem=s;var u;!function(t){t.dropDown="dropDown",t.popOver="popOver"}(u=t.MenuListType||(t.MenuListType={}));var c;x.navBarMenuItemPress=o;var f;x.actionMenuItemPress=a;var l;x.setModuleView=n,t.setUpViews=e,t.setNavBarMenu=i,t.showActionMenu=r}(D=t.menus||(t.menus={}));var W,z,R,V,_,j,J,X,Y=!1,$=!1,q=[],G=[],K=0,Q={};x.themeChange=a;var Z;x.fullScreenChange=u;var tt;x.backButtonPress=f,t.initialize=i,t.getContext=o,t.registerOnThemeChangeHandler=r,t.registerFullScreenHandler=s,t.registerBackButtonHandler=c,t.navigateBack=l,t.navigateCrossDomain=h,t.getTabInstances=v,t.getMruTabInstances=d,t.shareDeepLink=g,t.openFilePreview=p,t.uploadCustomApp=m,t.navigateToTab=y;var et;!function(t){function e(t){w(F.settings,F.remove),N(z,"settings.setValidityState",[t])}function n(t){w(F.settings,F.remove);var e=N(z,"settings.getSettings");Q[e]=t}function i(t){w(F.settings),N(z,"settings.setSettings",[t])}function o(t){w(F.settings),u=t}function r(t){w(F.remove),c=t}function a(t){var e=new f(t);u?u(e):e.notifySuccess()}function s(){var t=new l;c?c(t):t.notifySuccess()}var u,c;x["settings.save"]=a,x["settings.remove"]=s,t.setValidityState=e,t.getSettings=n,t.setSettings=i,t.registerOnSaveHandler=o,t.registerOnRemoveHandler=r;var f=function(){function t(t){this.notified=!1,this.result=t?t:{}}return t.prototype.notifySuccess=function(){this.ensureNotNotified(),N(z,"settings.save.success"),this.notified=!0},t.prototype.notifyFailure=function(t){this.ensureNotNotified(),N(z,"settings.save.failure",[t]),this.notified=!0},t.prototype.ensureNotNotified=function(){if(this.notified)throw new Error("The SaveEvent may only notify success or failure once.")},t}(),l=function(){function t(){this.notified=!1}return t.prototype.notifySuccess=function(){this.ensureNotNotified(),N(z,"settings.remove.success"),this.notified=!0},t.prototype.notifyFailure=function(t){this.ensureNotNotified(),N(z,"settings.remove.failure",[t]),this.notified=!0},t.prototype.ensureNotNotified=function(){if(this.notified)throw new Error("The removeEvent may only notify success or failure once.")},t}()}(et=t.settings||(t.settings={}));var nt;!function(t){function e(t){g=t}function n(t){var e=void 0!==t?t:g;if(w(F.content,F.settings,F.remove),J===B.desktop){var n=document.createElement("a");n.href=e.url;var i=N(z,"authentication.authenticate",[n.href,e.width,e.height]);Q[i]=function(t,n){t?e.successCallback(n):e.failureCallback(n)}}else a(e)}function i(t){w();var e=N(z,"authentication.getAuthToken",[t.resources]);Q[e]=function(e,n){e?t.successCallback(n):t.failureCallback(n)}}function o(t){w();var e=N(z,"authentication.getUser");Q[e]=function(e,n){e?t.successCallback(n):t.failureCallback(n)}}function r(){s();try{V&&V.close()}finally{V=null,_=null}}function a(t){g=t,r();var e=g.width||600,n=g.height||400;e=Math.min(e,W.outerWidth-400),n=Math.min(n,W.outerHeight-200);var i=document.createElement("a");i.href=g.url;var o="undefined"!=typeof W.screenLeft?W.screenLeft:W.screenX,a="undefined"!=typeof W.screenTop?W.screenTop:W.screenY;o+=W.outerWidth/2-e/2,a+=W.outerHeight/2-n/2,V=W.open(i.href,"_blank","toolbar=no, location=yes, status=no, menubar=no, scrollbars=yes, top="+a+", left="+o+", width="+e+", height="+n),V?u():h("FailedToOpenWindow")}function s(){p&&(clearInterval(p),p=0),delete x.initialize,delete x.navigateCrossDomain}function u(){s(),p=W.setInterval(function(){if(!V||V.closed)h("CancelledByUser");else{var t=_;try{_="*",N(V,"ping")}finally{_=t}}},100),x.initialize=function(){return[F.authentication,J]},x.navigateCrossDomain=function(t){return!1}}function c(t,e){v(e,"result",t),w(F.authentication),N(z,"authentication.authenticate.success",[t]),S(z,function(){return setTimeout(function(){return W.close()},200)})}function f(t,e){v(e,"reason",t),w(F.authentication),N(z,"authentication.authenticate.failure",[t]),S(z,function(){return setTimeout(function(){return W.close()},200)})}function l(t){try{g&&g.successCallback&&g.successCallback(t)}finally{g=null,r()}}function h(t){try{g&&g.failureCallback&&g.failureCallback(t)}finally{g=null,r()}}function v(t,e,n){if(t){var i=document.createElement("a");i.href=decodeURIComponent(t),i.host&&i.host!==window.location.host&&"outlook.office.com"===i.host&&i.search.indexOf("client_type=Win32_Outlook")>-1&&(e&&"result"===e&&(n&&(i.href=d(i.href,"result",n)),W.location.assign(d(i.href,"authSuccess",""))),e&&"reason"===e&&(n&&(i.href=d(i.href,"reason",n)),W.location.assign(d(i.href,"authFailure",""))))}}function d(t,e,n){var i=t.indexOf("#"),o=i===-1?"#":t.substr(i);return o=o+"&"+e+(""!==n?"="+n:""),t=i===-1?t:t.substr(0,i),t+o}var g,p;x["authentication.authenticate.success"]=l,x["authentication.authenticate.failure"]=h,t.registerAuthenticationHandlers=e,t.authenticate=n,t.getAuthToken=i,t.getUser=o,t.notifySuccess=c,t.notifyFailure=f}(nt=t.authentication||(t.authentication={}));var it;!function(t){function e(t,e){w(F.content);var n=N(z,"tasks.startTask",[t]);Q[n]=e}function n(t,e){w(F.content),N(z,"tasks.completeTask",[t,e])}t.startTask=e,t.completeTask=n}(it=t.tasks||(t.tasks={}))}(t||(t={})),t});
{
"name": "@microsoft/teams-js",
"author": "Microsoft Teams",
"version": "1.3.0-beta.5",
"version": "1.3.0-beta.6",
"description": "Microsoft Client SDK for building app for Microsoft teams",

@@ -6,0 +6,0 @@ "main": "./dist/MicrosoftTeams.min.js",

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