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.4.0-beta.3 to 1.4.0-beta.3.1

16

dist/MicrosoftTeams.js

@@ -546,2 +546,18 @@ /******/ (function(modules) { // webpackBootstrap

* ------
* download file.
* @param file The file to download.
*/
function showNotification(showNotificationParameters) {
ensureInitialized(frameContexts.content);
var params = [
showNotificationParameters.message,
showNotificationParameters.isDownloadComplete
];
sendMessageRequest(parentWindow, "showNotification", params);
}
microsoftTeams.showNotification = showNotification;
/**
* @private
* Hide from docs.
* ------
* Upload a custom App manifest directly to both team and personal scopes.

@@ -548,0 +564,0 @@ * This method works just for the first party Apps.

2

dist/MicrosoftTeams.min.js

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

!function(t){var e={};function n(i){if(e[i])return e[i].exports;var o=e[i]={i:i,l:!1,exports:{}};return t[i].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(i,o,function(e){return t[e]}.bind(null,o));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=0)}([function(t,e,n){"use strict";var i;n.r(e),String.prototype.startsWith||(String.prototype.startsWith=function(t,e){return this.substr(!e||e<0?0:+e,t.length)===t}),function(t){var e="1.3.6";function n(t){for(var e="^",n=t.split("."),i=0;i<n.length;i++)e+=(i>0?"[.]":"")+n[i].replace("*","[^/^.]+");return e+="$"}var i=function(t){for(var e="",i=0;i<t.length;i++)e+=(0===i?"":"|")+n(t[i]);return new RegExp(e)}(["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","https://outlook.office.com","https://outlook-sdf.office.com"]),o={},r={settings:"settings",content:"content",authentication:"authentication",remove:"remove",task:"task"};!function(t){var e,n,i,r=function(){return function(){this.enabled=!0}}();t.MenuItem=r,function(t){t.dropDown="dropDown",t.popOver="popOver"}(t.MenuListType||(t.MenuListType={})),o.navBarMenuItemPress=function(t){e&&e(t)||(O(),B(s,"handleNavBarMenuItemPress",[t]))},o.actionMenuItemPress=function(t){n&&n(t)||(O(),B(s,"handleActionMenuItemPress",[t]))},o.setModuleView=function(t){i&&i(t)||(O(),B(s,"viewConfigItemPress",[t]))},t.setUpViews=function(t,e){O(),i=e,B(s,"setUpViews",[t])},t.setNavBarMenu=function(t,n){O(),e=n,B(s,"setNavBarMenu",[t])},t.showActionMenu=function(t,e){O(),n=e,B(s,"showActionMenu",[t])}}(t.menus||(t.menus={}));var a,s,u,c,f,l,h,d,v,p,g,m=!1,y=!1,b=[],w=[],k=0,C={},T=!1;function M(t){O(),d=t}function I(t){O(),v=t}function S(t){O(),p=t}function E(){O();var t=B(s,"navigateBack",[]);C[t]=function(t){if(!t)throw new Error("Back navigation is not supported in the current client or context.")}}function O(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(!m)throw new Error("The library has not yet been initialized");if(l&&t&&t.length>0){for(var n=!1,i=0;i<t.length;i++)if(t[i]===l){n=!0;break}if(!n)throw new Error("This call is not allowed in the '"+l+"' context")}}function N(t){if("id"in t.data){var e=t.data,n=C[e.id];n&&(n.apply(null,e.args),delete C[e.id])}else if("func"in t.data){e=t.data;var i=o[e.func];i&&i.apply(this,e.args)}}function P(t){return t===s?b:t===c?w:[]}function U(t){return t===s?u:t===c?f:null}function x(t){for(var e=U(t),n=P(t);t&&e&&n.length>0;)t.postMessage(n.shift(),e)}function A(t,e){var n=a.setInterval(function(){0===P(t).length&&(clearInterval(n),e())},100)}function B(t,e,n){var i=function(t,e){return{id:k++,func:t,args:e||[]}}(e,n);if(y)a&&a.nativeInterface&&a.nativeInterface.framelessPostMessage(JSON.stringify(i));else{var o=U(t);t&&o?t.postMessage(i,o):P(t).push(i)}return i.id}function L(t,e,n){var i=function(t,e){return{id:t,args:e||[]}}(e,n),o=U(t);t&&o&&t.postMessage(i,o)}o.themeChange=function(t){d&&d(t);c&&B(c,"themeChange",[t])},o.fullScreenChange=function(t){v&&v(t)},o.backButtonPress=function(){p&&p()||E()},t.initialize=function(t){if(void 0===t&&(t=window),!m){m=!0;var n=function(t){return function(t){if(t&&t.data&&"object"==typeof t.data){var e=t.source||t.originalEvent.source,n=t.origin||t.originalEvent.origin;e===a||n!==a.location.origin&&!i.test(n.toLowerCase())||(function(t,e){s&&t!==s?c&&t!==c||(c=t,f=e):(s=t,u=e),s&&s.closed&&(s=null,u=null),c&&c.closed&&(c=null,f=null),x(s),x(c)}(e,n),e===s?N(t):e===c&&function(t){if("id"in t.data&&"func"in t.data){var e=t.data,n=o[e.func];if(n){var i=n.apply(this,e.args);i&&L(c,e.id,Array.isArray(i)?i:[i])}else{var r=B(s,e.func,e.args);C[r]=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];c&&L(c,e.id,t)}}}}(t))}}(t)};(s=(a=t).parent!==a.self?a.parent:a.opener)?a.addEventListener("message",n,!1):(y=!0,window.onNativeMessage=N);try{u="*";var d=B(s,"initialize",[e]);C[d]=function(t,e){l=t,h=e}}finally{u=null}this._uninitialize=function(){l&&(M(null),I(null),S(null)),l===r.settings&&g.registerOnSaveHandler(null),l===r.remove&&g.registerOnRemoveHandler(null),y||a.removeEventListener("message",n,!1),m=!1,s=null,u=null,b=[],c=null,f=null,w=[],k=0,C={},l=null,h=null,y=!1}}},t._uninitialize=function(){},t.enablePrintCapability=function(){T||(T=!0,O(),document.addEventListener("keydown",function(e){(e.ctrlKey||e.metaKey)&&80===e.keyCode&&(t.print(),e.cancelBubble=!0,e.preventDefault(),e.stopImmediatePropagation())}))},t.print=function(){window.print()},t.getContext=function(t){O();var e=B(s,"getContext");C[e]=t},t.registerOnThemeChangeHandler=M,t.registerFullScreenHandler=I,t.registerBackButtonHandler=S,t.navigateBack=E,t.navigateCrossDomain=function(t){O(r.content,r.settings,r.remove,r.task);var e=B(s,"navigateCrossDomain",[t]);C[e]=function(t){if(!t)throw new Error("Cross-origin navigation is only supported for URLs matching the pattern registered in the manifest.")}},t.getTabInstances=function(t,e){O();var n=B(s,"getTabInstances",[e]);C[n]=t},t.getUserJoinedTeams=function(t,e){O();var n=B(s,"getUserJoinedTeams",[e]);C[n]=t},t.getMruTabInstances=function(t,e){O();var n=B(s,"getMruTabInstances",[e]);C[n]=t},t.shareDeepLink=function(t){O(r.content),B(s,"shareDeepLink",[t.subEntityId,t.subEntityLabel,t.subEntityWebUrl])},t.openFilePreview=function(t){O(r.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];B(s,"openFilePreview",e)},t.uploadCustomApp=function(t){O();var e=B(s,"uploadCustomApp",[t]);C[e]=function(t,e){if(!t)throw new Error(e)}},t.navigateToTab=function(t){O();var e=B(s,"navigateToTab",[t]);C[e]=function(t){if(!t)throw new Error("Invalid internalTabInstanceId and/or channelId were/was provided")}},function(t){var e,n;o["settings.save"]=function(t){var n=new i(t);e?e(n):n.notifySuccess()},o["settings.remove"]=function(){var t=new a;n?n(t):t.notifySuccess()},t.setValidityState=function(t){O(r.settings,r.remove),B(s,"settings.setValidityState",[t])},t.getSettings=function(t){O(r.settings,r.remove);var e=B(s,"settings.getSettings");C[e]=t},t.setSettings=function(t){O(r.settings),B(s,"settings.setSettings",[t])},t.registerOnSaveHandler=function(t){O(r.settings),e=t},t.registerOnRemoveHandler=function(t){O(r.remove),n=t};var i=function(){function t(t){this.notified=!1,this.result=t||{}}return t.prototype.notifySuccess=function(){this.ensureNotNotified(),B(s,"settings.save.success"),this.notified=!0},t.prototype.notifyFailure=function(t){this.ensureNotNotified(),B(s,"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}();var a=function(){function t(){this.notified=!1}return t.prototype.notifySuccess=function(){this.ensureNotNotified(),B(s,"settings.remove.success"),this.notified=!0},t.prototype.notifyFailure=function(t){this.ensureNotNotified(),B(s,"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}()}(g=t.settings||(t.settings={})),function(t){var e,n;function i(){u();try{c&&c.close()}finally{c=null,f=null}}function u(){n&&(clearInterval(n),n=0),delete o.initialize,delete o.navigateCrossDomain}function l(t){try{e&&e.failureCallback&&e.failureCallback(t)}finally{e=null,i()}}function d(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=v(i.href,"result",n)),a.location.assign(v(i.href,"authSuccess",""))),e&&"reason"===e&&(n&&(i.href=v(i.href,"reason",n)),a.location.assign(v(i.href,"authFailure",""))))}}function v(t,e,n){var i=t.indexOf("#"),o=-1===i?"#":t.substr(i);return o=o+"&"+e+(""!==n?"="+n:""),(t=-1===i?t:t.substr(0,i))+o}o["authentication.authenticate.success"]=function(t){try{e&&e.successCallback&&e.successCallback(t)}finally{e=null,i()}},o["authentication.authenticate.failure"]=l,t.registerAuthenticationHandlers=function(t){e=t},t.authenticate=function(t){var d=void 0!==t?t:e;if(O(r.content,r.settings,r.remove,r.task),"desktop"===h){var v=document.createElement("a");v.href=d.url;var p=B(s,"authentication.authenticate",[v.href,d.width,d.height]);C[p]=function(t,e){t?d.successCallback(e):d.failureCallback(e)}}else!function(t){e=t,i();var s=e.width||600,d=e.height||400;s=Math.min(s,a.outerWidth-400),d=Math.min(d,a.outerHeight-200);var v=document.createElement("a");v.href=e.url;var p=void 0!==a.screenLeft?a.screenLeft:a.screenX,g=void 0!==a.screenTop?a.screenTop:a.screenY;p+=a.outerWidth/2-s/2,g+=a.outerHeight/2-d/2,(c=a.open(v.href,"_blank","toolbar=no, location=yes, status=no, menubar=no, scrollbars=yes, top="+g+", left="+p+", width="+s+", height="+d))?(u(),n=a.setInterval(function(){if(!c||c.closed)l("CancelledByUser");else{var t=f;try{f="*",B(c,"ping")}finally{f=t}}},100),o.initialize=function(){return[r.authentication,h]},o.navigateCrossDomain=function(t){return!1}):l("FailedToOpenWindow")}(d)},t.getAuthToken=function(t){O();var e=B(s,"authentication.getAuthToken",[t.resources]);C[e]=function(e,n){e?t.successCallback(n):t.failureCallback(n)}},t.getUser=function(t){O();var e=B(s,"authentication.getUser");C[e]=function(e,n){e?t.successCallback(n):t.failureCallback(n)}},t.notifySuccess=function(t,e){d(e,"result",t),O(r.authentication),B(s,"authentication.authenticate.success",[t]),A(s,function(){return setTimeout(function(){return a.close()},200)})},t.notifyFailure=function(t,e){d(e,"reason",t),O(r.authentication),B(s,"authentication.authenticate.failure",[t]),A(s,function(){return setTimeout(function(){return a.close()},200)})}}(t.authentication||(t.authentication={})),t.sendCustomMessage=function(t,e){return O(),B(s,t,e)},function(t){t.startTask=function(t,e){O(r.content);var n=B(s,"tasks.startTask",[t]);C[n]=e},t.submitTask=function(t,e){O(r.content,r.task),B(s,"tasks.completeTask",[t,Array.isArray(e)?e:[e]])}}(t.tasks||(t.tasks={})),t.getChatMembers=function(t){O();var e=B(s,"getChatMembers");C[e]=t}}(i||(i={})),n.d(e,"microsoftTeams",function(){return i})}]);
!function(t){var e={};function n(i){if(e[i])return e[i].exports;var o=e[i]={i:i,l:!1,exports:{}};return t[i].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(i,o,function(e){return t[e]}.bind(null,o));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=0)}([function(t,e,n){"use strict";var i;n.r(e),String.prototype.startsWith||(String.prototype.startsWith=function(t,e){return this.substr(!e||e<0?0:+e,t.length)===t}),function(t){var e="1.3.6";function n(t){for(var e="^",n=t.split("."),i=0;i<n.length;i++)e+=(i>0?"[.]":"")+n[i].replace("*","[^/^.]+");return e+="$"}var i=function(t){for(var e="",i=0;i<t.length;i++)e+=(0===i?"":"|")+n(t[i]);return new RegExp(e)}(["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","https://outlook.office.com","https://outlook-sdf.office.com"]),o={},r={settings:"settings",content:"content",authentication:"authentication",remove:"remove",task:"task"};!function(t){var e,n,i,r=function(){return function(){this.enabled=!0}}();t.MenuItem=r,function(t){t.dropDown="dropDown",t.popOver="popOver"}(t.MenuListType||(t.MenuListType={})),o.navBarMenuItemPress=function(t){e&&e(t)||(N(),B(s,"handleNavBarMenuItemPress",[t]))},o.actionMenuItemPress=function(t){n&&n(t)||(N(),B(s,"handleActionMenuItemPress",[t]))},o.setModuleView=function(t){i&&i(t)||(N(),B(s,"viewConfigItemPress",[t]))},t.setUpViews=function(t,e){N(),i=e,B(s,"setUpViews",[t])},t.setNavBarMenu=function(t,n){N(),e=n,B(s,"setNavBarMenu",[t])},t.showActionMenu=function(t,e){N(),n=e,B(s,"showActionMenu",[t])}}(t.menus||(t.menus={}));var a,s,u,c,f,l,h,d,v,p,g,m=!1,y=!1,b=[],w=[],k=0,C={},T=!1;function M(t){N(),d=t}function I(t){N(),v=t}function S(t){N(),p=t}function E(){N();var t=B(s,"navigateBack",[]);C[t]=function(t){if(!t)throw new Error("Back navigation is not supported in the current client or context.")}}function N(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(!m)throw new Error("The library has not yet been initialized");if(l&&t&&t.length>0){for(var n=!1,i=0;i<t.length;i++)if(t[i]===l){n=!0;break}if(!n)throw new Error("This call is not allowed in the '"+l+"' context")}}function O(t){if("id"in t.data){var e=t.data,n=C[e.id];n&&(n.apply(null,e.args),delete C[e.id])}else if("func"in t.data){e=t.data;var i=o[e.func];i&&i.apply(this,e.args)}}function P(t){return t===s?b:t===c?w:[]}function U(t){return t===s?u:t===c?f:null}function x(t){for(var e=U(t),n=P(t);t&&e&&n.length>0;)t.postMessage(n.shift(),e)}function A(t,e){var n=a.setInterval(function(){0===P(t).length&&(clearInterval(n),e())},100)}function B(t,e,n){var i=function(t,e){return{id:k++,func:t,args:e||[]}}(e,n);if(y)a&&a.nativeInterface&&a.nativeInterface.framelessPostMessage(JSON.stringify(i));else{var o=U(t);t&&o?t.postMessage(i,o):P(t).push(i)}return i.id}function L(t,e,n){var i=function(t,e){return{id:t,args:e||[]}}(e,n),o=U(t);t&&o&&t.postMessage(i,o)}o.themeChange=function(t){d&&d(t);c&&B(c,"themeChange",[t])},o.fullScreenChange=function(t){v&&v(t)},o.backButtonPress=function(){p&&p()||E()},t.initialize=function(t){if(void 0===t&&(t=window),!m){m=!0;var n=function(t){return function(t){if(t&&t.data&&"object"==typeof t.data){var e=t.source||t.originalEvent.source,n=t.origin||t.originalEvent.origin;e===a||n!==a.location.origin&&!i.test(n.toLowerCase())||(function(t,e){s&&t!==s?c&&t!==c||(c=t,f=e):(s=t,u=e),s&&s.closed&&(s=null,u=null),c&&c.closed&&(c=null,f=null),x(s),x(c)}(e,n),e===s?O(t):e===c&&function(t){if("id"in t.data&&"func"in t.data){var e=t.data,n=o[e.func];if(n){var i=n.apply(this,e.args);i&&L(c,e.id,Array.isArray(i)?i:[i])}else{var r=B(s,e.func,e.args);C[r]=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];c&&L(c,e.id,t)}}}}(t))}}(t)};(s=(a=t).parent!==a.self?a.parent:a.opener)?a.addEventListener("message",n,!1):(y=!0,window.onNativeMessage=O);try{u="*";var d=B(s,"initialize",[e]);C[d]=function(t,e){l=t,h=e}}finally{u=null}this._uninitialize=function(){l&&(M(null),I(null),S(null)),l===r.settings&&g.registerOnSaveHandler(null),l===r.remove&&g.registerOnRemoveHandler(null),y||a.removeEventListener("message",n,!1),m=!1,s=null,u=null,b=[],c=null,f=null,w=[],k=0,C={},l=null,h=null,y=!1}}},t._uninitialize=function(){},t.enablePrintCapability=function(){T||(T=!0,N(),document.addEventListener("keydown",function(e){(e.ctrlKey||e.metaKey)&&80===e.keyCode&&(t.print(),e.cancelBubble=!0,e.preventDefault(),e.stopImmediatePropagation())}))},t.print=function(){window.print()},t.getContext=function(t){N();var e=B(s,"getContext");C[e]=t},t.registerOnThemeChangeHandler=M,t.registerFullScreenHandler=I,t.registerBackButtonHandler=S,t.navigateBack=E,t.navigateCrossDomain=function(t){N(r.content,r.settings,r.remove,r.task);var e=B(s,"navigateCrossDomain",[t]);C[e]=function(t){if(!t)throw new Error("Cross-origin navigation is only supported for URLs matching the pattern registered in the manifest.")}},t.getTabInstances=function(t,e){N();var n=B(s,"getTabInstances",[e]);C[n]=t},t.getUserJoinedTeams=function(t,e){N();var n=B(s,"getUserJoinedTeams",[e]);C[n]=t},t.getMruTabInstances=function(t,e){N();var n=B(s,"getMruTabInstances",[e]);C[n]=t},t.shareDeepLink=function(t){N(r.content),B(s,"shareDeepLink",[t.subEntityId,t.subEntityLabel,t.subEntityWebUrl])},t.openFilePreview=function(t){N(r.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];B(s,"openFilePreview",e)},t.showNotification=function(t){N(r.content);var e=[t.message,t.isDownloadComplete];B(s,"showNotification",e)},t.uploadCustomApp=function(t){N();var e=B(s,"uploadCustomApp",[t]);C[e]=function(t,e){if(!t)throw new Error(e)}},t.navigateToTab=function(t){N();var e=B(s,"navigateToTab",[t]);C[e]=function(t){if(!t)throw new Error("Invalid internalTabInstanceId and/or channelId were/was provided")}},function(t){var e,n;o["settings.save"]=function(t){var n=new i(t);e?e(n):n.notifySuccess()},o["settings.remove"]=function(){var t=new a;n?n(t):t.notifySuccess()},t.setValidityState=function(t){N(r.settings,r.remove),B(s,"settings.setValidityState",[t])},t.getSettings=function(t){N(r.settings,r.remove);var e=B(s,"settings.getSettings");C[e]=t},t.setSettings=function(t){N(r.settings),B(s,"settings.setSettings",[t])},t.registerOnSaveHandler=function(t){N(r.settings),e=t},t.registerOnRemoveHandler=function(t){N(r.remove),n=t};var i=function(){function t(t){this.notified=!1,this.result=t||{}}return t.prototype.notifySuccess=function(){this.ensureNotNotified(),B(s,"settings.save.success"),this.notified=!0},t.prototype.notifyFailure=function(t){this.ensureNotNotified(),B(s,"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}();var a=function(){function t(){this.notified=!1}return t.prototype.notifySuccess=function(){this.ensureNotNotified(),B(s,"settings.remove.success"),this.notified=!0},t.prototype.notifyFailure=function(t){this.ensureNotNotified(),B(s,"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}()}(g=t.settings||(t.settings={})),function(t){var e,n;function i(){u();try{c&&c.close()}finally{c=null,f=null}}function u(){n&&(clearInterval(n),n=0),delete o.initialize,delete o.navigateCrossDomain}function l(t){try{e&&e.failureCallback&&e.failureCallback(t)}finally{e=null,i()}}function d(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=v(i.href,"result",n)),a.location.assign(v(i.href,"authSuccess",""))),e&&"reason"===e&&(n&&(i.href=v(i.href,"reason",n)),a.location.assign(v(i.href,"authFailure",""))))}}function v(t,e,n){var i=t.indexOf("#"),o=-1===i?"#":t.substr(i);return o=o+"&"+e+(""!==n?"="+n:""),(t=-1===i?t:t.substr(0,i))+o}o["authentication.authenticate.success"]=function(t){try{e&&e.successCallback&&e.successCallback(t)}finally{e=null,i()}},o["authentication.authenticate.failure"]=l,t.registerAuthenticationHandlers=function(t){e=t},t.authenticate=function(t){var d=void 0!==t?t:e;if(N(r.content,r.settings,r.remove,r.task),"desktop"===h){var v=document.createElement("a");v.href=d.url;var p=B(s,"authentication.authenticate",[v.href,d.width,d.height]);C[p]=function(t,e){t?d.successCallback(e):d.failureCallback(e)}}else!function(t){e=t,i();var s=e.width||600,d=e.height||400;s=Math.min(s,a.outerWidth-400),d=Math.min(d,a.outerHeight-200);var v=document.createElement("a");v.href=e.url;var p=void 0!==a.screenLeft?a.screenLeft:a.screenX,g=void 0!==a.screenTop?a.screenTop:a.screenY;p+=a.outerWidth/2-s/2,g+=a.outerHeight/2-d/2,(c=a.open(v.href,"_blank","toolbar=no, location=yes, status=no, menubar=no, scrollbars=yes, top="+g+", left="+p+", width="+s+", height="+d))?(u(),n=a.setInterval(function(){if(!c||c.closed)l("CancelledByUser");else{var t=f;try{f="*",B(c,"ping")}finally{f=t}}},100),o.initialize=function(){return[r.authentication,h]},o.navigateCrossDomain=function(t){return!1}):l("FailedToOpenWindow")}(d)},t.getAuthToken=function(t){N();var e=B(s,"authentication.getAuthToken",[t.resources]);C[e]=function(e,n){e?t.successCallback(n):t.failureCallback(n)}},t.getUser=function(t){N();var e=B(s,"authentication.getUser");C[e]=function(e,n){e?t.successCallback(n):t.failureCallback(n)}},t.notifySuccess=function(t,e){d(e,"result",t),N(r.authentication),B(s,"authentication.authenticate.success",[t]),A(s,function(){return setTimeout(function(){return a.close()},200)})},t.notifyFailure=function(t,e){d(e,"reason",t),N(r.authentication),B(s,"authentication.authenticate.failure",[t]),A(s,function(){return setTimeout(function(){return a.close()},200)})}}(t.authentication||(t.authentication={})),t.sendCustomMessage=function(t,e){return N(),B(s,t,e)},function(t){t.startTask=function(t,e){N(r.content);var n=B(s,"tasks.startTask",[t]);C[n]=e},t.submitTask=function(t,e){N(r.content,r.task),B(s,"tasks.completeTask",[t,Array.isArray(e)?e:[e]])}}(t.tasks||(t.tasks={})),t.getChatMembers=function(t){N();var e=B(s,"getChatMembers");C[e]=t}}(i||(i={})),n.d(e,"microsoftTeams",function(){return i})}]);

@@ -371,2 +371,6 @@ /**

function openFilePreview(filePreviewParameters: FilePreviewParameters): void;
interface ShowNotificationParameters {
message: string;
isDownloadComplete: boolean;
}
/**

@@ -376,2 +380,10 @@ * @private

* ------
* download file.
* @param file The file to download.
*/
function showNotification(showNotificationParameters: ShowNotificationParameters): void;
/**
* @private
* Hide from docs.
* ------
* Upload a custom App manifest directly to both team and personal scopes.

@@ -378,0 +390,0 @@ * This method works just for the first party Apps.

{
"name": "@microsoft/teams-js",
"author": "Microsoft Teams",
"version": "1.4.0-beta.3",
"version": "1.4.0-beta.3.1",
"description": "Microsoft Client SDK for building app for Microsoft teams",

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

Sorry, the diff of this file is not supported yet

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