@microsoft/teams-js 2.0.0-beta.3-dev.7 → 2.0.0-beta.3-dev.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/MicrosoftTeams.d.ts
CHANGED
|
@@ -2853,6 +2853,16 @@ export namespace pages {
|
|
|
2853
2853
|
* @returns Promise that resolves when the navigation has completed.
|
|
2854
2854
|
*/
|
|
2855
2855
|
function navigateCrossDomain(url: string): Promise<void>;
|
|
2856
|
+
/**
|
|
2857
|
+
* Navigate to the given App ID and Page ID, with optional parameters for a WebURL (if the app cannot
|
|
2858
|
+
* be navigated to, such as if it is not installed), Channel ID (for apps installed as a channel tab), and
|
|
2859
|
+
* Sub-page ID (for navigating to specific content within the page). This is equivalent to navigating to
|
|
2860
|
+
* a deep link with the above data, but does not require the app to build a URL or worry about different
|
|
2861
|
+
* deep link formats for different hosts.
|
|
2862
|
+
* @param params Parameters for the navigation
|
|
2863
|
+
* @returns a promise that will resolve if the navigation was successful
|
|
2864
|
+
*/
|
|
2865
|
+
function navigateToApp(params: NavigateToAppParams): Promise<void>;
|
|
2856
2866
|
/**
|
|
2857
2867
|
* Registers a handler for changes from or to full-screen view for a tab.
|
|
2858
2868
|
* Only one handler can be registered at a time. A subsequent registration replaces an existing registration.
|
|
@@ -2863,6 +2873,32 @@ export namespace pages {
|
|
|
2863
2873
|
* Checks if page capability is supported currently
|
|
2864
2874
|
*/
|
|
2865
2875
|
function isSupported(): boolean;
|
|
2876
|
+
/**
|
|
2877
|
+
* Parameters for the NavigateToApp API
|
|
2878
|
+
*/
|
|
2879
|
+
interface NavigateToAppParams {
|
|
2880
|
+
/**
|
|
2881
|
+
* ID of the App to navigate to
|
|
2882
|
+
*/
|
|
2883
|
+
appId: string;
|
|
2884
|
+
/**
|
|
2885
|
+
* Developer-defined ID of the Page to navigate to within the app (Formerly EntityID)
|
|
2886
|
+
*/
|
|
2887
|
+
pageId: string;
|
|
2888
|
+
/**
|
|
2889
|
+
* Optional URL to open if the navigation cannot be completed within the host
|
|
2890
|
+
*/
|
|
2891
|
+
webUrl?: string;
|
|
2892
|
+
/**
|
|
2893
|
+
* Optional developer-defined ID describing the content to navigate to within the Page. This will be passed
|
|
2894
|
+
* back to the App via the Context object.
|
|
2895
|
+
*/
|
|
2896
|
+
subPageId?: string;
|
|
2897
|
+
/**
|
|
2898
|
+
* Optional ID of the Teams Channel where the app should be opened
|
|
2899
|
+
*/
|
|
2900
|
+
channelId?: string;
|
|
2901
|
+
}
|
|
2866
2902
|
/**
|
|
2867
2903
|
* Namespace to interact with the teams specific part of the SDK.
|
|
2868
2904
|
*/
|
package/dist/MicrosoftTeams.js
CHANGED
|
@@ -395,7 +395,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
395
395
|
});
|
|
396
396
|
|
|
397
397
|
;// CONCATENATED MODULE: ./src/internal/constants.ts
|
|
398
|
-
var version = '2.0.0-beta.3-dev.
|
|
398
|
+
var version = '2.0.0-beta.3-dev.11';
|
|
399
399
|
/**
|
|
400
400
|
* @hidden
|
|
401
401
|
* The SDK version when all SDK APIs started to check platform compatibility for the APIs was 1.6.0.
|
|
@@ -780,6 +780,19 @@ function callCallbackWithErrorOrResultOrNullFromPromiseAndReturnPromise(funcHelp
|
|
|
780
780
|
});
|
|
781
781
|
return p;
|
|
782
782
|
}
|
|
783
|
+
function createTeamsAppLink(params) {
|
|
784
|
+
var url = new URL('https://teams.microsoft.com/l/entity/' +
|
|
785
|
+
encodeURIComponent(params.appId) +
|
|
786
|
+
'/' +
|
|
787
|
+
encodeURIComponent(params.pageId));
|
|
788
|
+
if (params.webUrl) {
|
|
789
|
+
url.searchParams.append('webUrl', params.webUrl);
|
|
790
|
+
}
|
|
791
|
+
if (params.channelId || params.subPageId) {
|
|
792
|
+
url.searchParams.append('context', JSON.stringify({ channelId: params.channelId, subEntityId: params.subPageId }));
|
|
793
|
+
}
|
|
794
|
+
return url.toString();
|
|
795
|
+
}
|
|
783
796
|
|
|
784
797
|
;// CONCATENATED MODULE: ./src/internal/internalAPIs.ts
|
|
785
798
|
|
|
@@ -887,6 +900,7 @@ var runtime = {
|
|
|
887
900
|
};
|
|
888
901
|
var teamsRuntimeConfig = {
|
|
889
902
|
apiVersion: 1,
|
|
903
|
+
isLegacyTeams: true,
|
|
890
904
|
supports: {
|
|
891
905
|
appInstallDialog: {},
|
|
892
906
|
appEntity: {},
|
|
@@ -2110,6 +2124,7 @@ function transformLegacyContextToAppContext(legacyContext) {
|
|
|
2110
2124
|
|
|
2111
2125
|
|
|
2112
2126
|
|
|
2127
|
+
|
|
2113
2128
|
/**
|
|
2114
2129
|
* Navigation specific part of the SDK.
|
|
2115
2130
|
*
|
|
@@ -2154,6 +2169,27 @@ var pages;
|
|
|
2154
2169
|
});
|
|
2155
2170
|
}
|
|
2156
2171
|
pages.navigateCrossDomain = navigateCrossDomain;
|
|
2172
|
+
/**
|
|
2173
|
+
* Navigate to the given App ID and Page ID, with optional parameters for a WebURL (if the app cannot
|
|
2174
|
+
* be navigated to, such as if it is not installed), Channel ID (for apps installed as a channel tab), and
|
|
2175
|
+
* Sub-page ID (for navigating to specific content within the page). This is equivalent to navigating to
|
|
2176
|
+
* a deep link with the above data, but does not require the app to build a URL or worry about different
|
|
2177
|
+
* deep link formats for different hosts.
|
|
2178
|
+
* @param params Parameters for the navigation
|
|
2179
|
+
* @returns a promise that will resolve if the navigation was successful
|
|
2180
|
+
*/
|
|
2181
|
+
function navigateToApp(params) {
|
|
2182
|
+
return new Promise(function (resolve) {
|
|
2183
|
+
ensureInitialized(FrameContexts.content, FrameContexts.sidePanel, FrameContexts.settings, FrameContexts.task, FrameContexts.stage, FrameContexts.meetingStage);
|
|
2184
|
+
if (runtime.isLegacyTeams) {
|
|
2185
|
+
resolve(sendAndHandleStatusAndReason('executeDeepLink', createTeamsAppLink(params)));
|
|
2186
|
+
}
|
|
2187
|
+
else {
|
|
2188
|
+
resolve(sendAndHandleStatusAndReason('pages.navigateToApp', params));
|
|
2189
|
+
}
|
|
2190
|
+
});
|
|
2191
|
+
}
|
|
2192
|
+
pages.navigateToApp = navigateToApp;
|
|
2157
2193
|
/**
|
|
2158
2194
|
* Registers a handler for changes from or to full-screen view for a tab.
|
|
2159
2195
|
* Only one handler can be registered at a time. A subsequent registration replaces an existing registration.
|