@microsoft/teams-js 2.47.2 → 2.48.0-beta.0
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/esm/packages/teams-js/dts/internal/appHelpers.d.ts +1 -0
- package/dist/esm/packages/teams-js/dts/internal/handlers.d.ts +6 -0
- package/dist/esm/packages/teams-js/dts/internal/telemetry.d.ts +12 -1
- package/dist/esm/packages/teams-js/dts/private/index.d.ts +2 -0
- package/dist/esm/packages/teams-js/dts/private/widgetHosting/widgetContext.d.ts +121 -0
- package/dist/esm/packages/teams-js/dts/private/widgetHosting/widgetHosting.d.ts +101 -0
- package/dist/esm/packages/teams-js/dts/public/app/app.d.ts +20 -1
- package/dist/esm/packages/teams-js/dts/public/interfaces.d.ts +8 -0
- package/dist/esm/packages/teams-js/dts/public/runtime.d.ts +1 -0
- package/dist/esm/packages/teams-js/src/artifactsForCDN/validDomains.json.js +1 -1
- package/dist/esm/packages/teams-js/src/index.js +1 -1
- package/dist/esm/packages/teams-js/src/internal/appHelpers.js +1 -1
- package/dist/esm/packages/teams-js/src/internal/handlers.js +1 -1
- package/dist/esm/packages/teams-js/src/private/widgetHosting/widgetHosting.js +1 -0
- package/dist/esm/packages/teams-js/src/public/app/app.js +1 -1
- package/dist/esm/packages/teams-js/src/public/version.js +1 -1
- package/dist/umd/MicrosoftTeams.js +359 -5
- package/dist/umd/MicrosoftTeams.js.map +1 -1
- package/dist/umd/MicrosoftTeams.min.js +1 -1
- package/dist/umd/MicrosoftTeams.min.js.map +1 -1
- package/package.json +1 -53
|
@@ -15,4 +15,5 @@ export declare function notifyFailureHelper(apiVersiontag: string, appInitializa
|
|
|
15
15
|
export declare function notifySuccessHelper(apiVersionTag: string): Promise<NotifySuccessResponse>;
|
|
16
16
|
export declare function callNotifySuccessInHost(apiVersionTag: string): Promise<NotifySuccessResponse>;
|
|
17
17
|
export declare function registerOnThemeChangeHandlerHelper(apiVersionTag: string, handler: app.themeHandler): void;
|
|
18
|
+
export declare function registerOnContextChangeHandlerHelper(apiVersionTag: string, handler: app.contextHandler): void;
|
|
18
19
|
export declare function openLinkHelper(apiVersionTag: string, deepLink: string): Promise<void>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Context } from '../public/app/app';
|
|
1
2
|
import { FrameContexts } from '../public/constants';
|
|
2
3
|
import { HostToAppPerformanceMetrics, LoadContext, ResumeContext } from '../public/interfaces';
|
|
3
4
|
/**
|
|
@@ -49,6 +50,11 @@ export declare function registerHandlerHelper(apiVersionTag: string, name: strin
|
|
|
49
50
|
* Limited to Microsoft-internal use
|
|
50
51
|
*/
|
|
51
52
|
export declare function registerOnThemeChangeHandler(apiVersionTag: string, handler: (theme: string) => void): void;
|
|
53
|
+
/**
|
|
54
|
+
* @internal
|
|
55
|
+
* Limited to Microsoft-internal use
|
|
56
|
+
*/
|
|
57
|
+
export declare function registerOnContextChangeHandler(apiVersionTag: string, handler: (context: Context) => void): void;
|
|
52
58
|
/**
|
|
53
59
|
* @internal
|
|
54
60
|
* Limited to Microsoft-internal use
|
|
@@ -47,6 +47,7 @@ export declare const enum ApiName {
|
|
|
47
47
|
App_NotifySuccess = "app.notifySuccess",
|
|
48
48
|
App_OpenLink = "app.openLink",
|
|
49
49
|
App_RegisterOnThemeChangeHandler = "app.registerOnThemeChangeHandler",
|
|
50
|
+
App_RegisterOnContextChangeHandler = "app.registerOnContextChangeHandler",
|
|
50
51
|
AppInitialization_NotifyAppLoaded = "appInitialization.notifyAppLoaded",
|
|
51
52
|
AppInitialization_NotifyExpectedFailure = "appInitialization.notifyExpectedFailure",
|
|
52
53
|
AppInitialization_NotifyFailure = "appInitialization.notifyFailure",
|
|
@@ -361,5 +362,15 @@ export declare const enum ApiName {
|
|
|
361
362
|
VisualMedia_Image_CaptureImages = "visualMedia.image.captureImages",
|
|
362
363
|
VisualMedia_Image_RetrieveImages = "visualMedia.image.retrieveImages",
|
|
363
364
|
VisualMedia_RequestPermission = "visualMedia.requestPermission",
|
|
364
|
-
WebStorage_IsWebStorageClearedOnUserLogOut = "webStorage.isWebStorageClearedOnUserLogOut"
|
|
365
|
+
WebStorage_IsWebStorageClearedOnUserLogOut = "webStorage.isWebStorageClearedOnUserLogOut",
|
|
366
|
+
WidgetHosting_GetWidgetData = "widgetHosting.getWidgetData",
|
|
367
|
+
WidgetHosting_CallTool = "widgetHosting.callTool",
|
|
368
|
+
WidgetHosting_SendFollowUpMessage = "widgetHosting.sendFollowUpMessage",
|
|
369
|
+
WidgetHosting_RequestDisplayMode = "widgetHosting.requestDisplayMode",
|
|
370
|
+
WidgetHosting_SetWidgetState = "widgetHosting.setWidgetState",
|
|
371
|
+
WidgetHosting_OpenExternal = "widgetHosting.openExternal",
|
|
372
|
+
WidgetHosting_NotifyIntrinsicHeight = "widgetHosting.notifyIntrinsicHeight",
|
|
373
|
+
WidgetHosting_RequestModal = "widgetHosting.requestModal",
|
|
374
|
+
WidgetHosting_RegisterModalCloseHandler = "widgetHosting.registerModalCloseHandler",
|
|
375
|
+
WidgetHosting_ContentSizeChanged = "widgetHosting.contentSizeChanged"
|
|
365
376
|
}
|
|
@@ -24,3 +24,5 @@ export * as teams from './teams/teams';
|
|
|
24
24
|
export * as videoEffectsEx from './videoEffectsEx';
|
|
25
25
|
export * as hostEntity from './hostEntity/hostEntity';
|
|
26
26
|
export * as store from './store';
|
|
27
|
+
export * as widgetHosting from './widgetHosting/widgetHosting';
|
|
28
|
+
export { ISecurityPolicy, Theme, SafeAreaInsets, SafeArea, DeviceType, UserAgent, IModalOptions, IModalResponse, JSONObject, JSONArray, JSONValue, DisplayMode, IToolInput, IToolOutput, IWidgetContext, } from './widgetHosting/widgetContext';
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { RenderingSurfaces } from '../../public';
|
|
2
|
+
export interface ISecurityPolicy {
|
|
3
|
+
connectDomains?: string[];
|
|
4
|
+
resourceDomains?: string[];
|
|
5
|
+
isTrusted?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export type Theme = 'light' | 'dark';
|
|
8
|
+
export type SafeAreaInsets = {
|
|
9
|
+
top: number;
|
|
10
|
+
bottom: number;
|
|
11
|
+
left: number;
|
|
12
|
+
right: number;
|
|
13
|
+
};
|
|
14
|
+
export type SafeArea = {
|
|
15
|
+
insets: SafeAreaInsets;
|
|
16
|
+
};
|
|
17
|
+
export type DeviceType = 'mobile' | 'tablet' | 'desktop' | 'unknown';
|
|
18
|
+
export type UserAgent = {
|
|
19
|
+
device: {
|
|
20
|
+
type: DeviceType;
|
|
21
|
+
};
|
|
22
|
+
capabilities: {
|
|
23
|
+
hover: boolean;
|
|
24
|
+
touch: boolean;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* Options for requesting a modal dialog
|
|
29
|
+
*/
|
|
30
|
+
export interface IModalOptions {
|
|
31
|
+
/** Unique identifier for the modal */
|
|
32
|
+
id: string;
|
|
33
|
+
/** Title at the top of the modal window */
|
|
34
|
+
title?: string;
|
|
35
|
+
/** Inner HTML string inserted into the modal's body */
|
|
36
|
+
content: string;
|
|
37
|
+
/** Preferred modal width in pixels */
|
|
38
|
+
width?: number;
|
|
39
|
+
/** Preferred modal height in pixels */
|
|
40
|
+
height?: number;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Response from requesting a modal dialog
|
|
44
|
+
*/
|
|
45
|
+
export interface IModalResponse {
|
|
46
|
+
/** A DOM element representing the modal's root */
|
|
47
|
+
modalElement: HTMLElement;
|
|
48
|
+
}
|
|
49
|
+
/** Declare generic JSON - serializable structure */
|
|
50
|
+
export interface JSONObject {
|
|
51
|
+
[key: string]: JSONValue;
|
|
52
|
+
}
|
|
53
|
+
export interface JSONArray extends Array<JSONValue> {
|
|
54
|
+
}
|
|
55
|
+
export type JSONValue = string | number | boolean | null | JSONObject | JSONArray;
|
|
56
|
+
/** Display mode */
|
|
57
|
+
export type DisplayMode = 'pip' | 'inline' | 'fullscreen';
|
|
58
|
+
/**
|
|
59
|
+
* MCP-compatible tool input structure following OpenAI MCP server specification
|
|
60
|
+
*/
|
|
61
|
+
export interface IToolInput {
|
|
62
|
+
/** The name of the tool to call */
|
|
63
|
+
name: string;
|
|
64
|
+
/** Arguments passed to the tool as key-value pairs */
|
|
65
|
+
arguments?: Record<string, unknown>;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* MCP-compatible tool output structure matching exact MCP schema
|
|
69
|
+
*/
|
|
70
|
+
export interface IToolOutput {
|
|
71
|
+
/** Whether the tool call resulted in an error */
|
|
72
|
+
isError?: boolean;
|
|
73
|
+
/** Array of content blocks returned by the tool */
|
|
74
|
+
content: Array<{
|
|
75
|
+
/** Type of content block */
|
|
76
|
+
type: 'text' | 'image' | 'resource';
|
|
77
|
+
/** Text content (for type: 'text') */
|
|
78
|
+
text?: string;
|
|
79
|
+
/** Image data (for type: 'image') */
|
|
80
|
+
data?: string;
|
|
81
|
+
/** MIME type (for type: 'image') */
|
|
82
|
+
mimeType?: string;
|
|
83
|
+
/** Resource URI (for type: 'resource') */
|
|
84
|
+
uri?: string;
|
|
85
|
+
/** Optional metadata for any content type */
|
|
86
|
+
annotations?: {
|
|
87
|
+
/** Audience for this content (user, assistant) */
|
|
88
|
+
audience?: Array<'user' | 'assistant'>;
|
|
89
|
+
/** Priority level */
|
|
90
|
+
priority?: number;
|
|
91
|
+
};
|
|
92
|
+
}>;
|
|
93
|
+
/** UI widget data */
|
|
94
|
+
structuredContent?: unknown;
|
|
95
|
+
/** MCP metadata object */
|
|
96
|
+
_meta?: Record<string, unknown>;
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Widget context similar to IWidgetHost structure - simplified for widget rendering
|
|
100
|
+
*/
|
|
101
|
+
export interface IWidgetContext {
|
|
102
|
+
/** Unique identifier for the widget instance */
|
|
103
|
+
widgetId: string;
|
|
104
|
+
/** Widget HTML content to render */
|
|
105
|
+
html: string;
|
|
106
|
+
/** widget domain that developer has registered their app to */
|
|
107
|
+
domain: string;
|
|
108
|
+
/** Content Security policy for the widget */
|
|
109
|
+
securityPolicy?: ISecurityPolicy;
|
|
110
|
+
/** OpenAI-compatible object with widget globals and API functions */
|
|
111
|
+
openai: {
|
|
112
|
+
theme?: Theme;
|
|
113
|
+
userAgent?: UserAgent;
|
|
114
|
+
locale?: string;
|
|
115
|
+
displayMode?: DisplayMode;
|
|
116
|
+
safeArea?: SafeArea;
|
|
117
|
+
maxHeight?: number;
|
|
118
|
+
view?: RenderingSurfaces;
|
|
119
|
+
widgetState?: JSONValue;
|
|
120
|
+
};
|
|
121
|
+
}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @beta
|
|
3
|
+
* @hidden
|
|
4
|
+
* User information required by specific apps
|
|
5
|
+
* @internal
|
|
6
|
+
* Limited to Microsoft-internal use
|
|
7
|
+
* @module
|
|
8
|
+
*/
|
|
9
|
+
import { DisplayMode, IModalOptions, IModalResponse, IToolInput, IToolOutput, JSONValue } from './widgetContext';
|
|
10
|
+
/**
|
|
11
|
+
* @hidden
|
|
12
|
+
* @internal
|
|
13
|
+
* Limited to Microsoft-internal use
|
|
14
|
+
* @beta
|
|
15
|
+
* @returns boolean to represent whether widgetHosting capability is supported
|
|
16
|
+
*
|
|
17
|
+
* @throws Error if {@linkcode app.initialize} has not successfully completed
|
|
18
|
+
*/
|
|
19
|
+
export declare function isSupported(): boolean;
|
|
20
|
+
export declare function callTool(widgetId: string, input: IToolInput): Promise<IToolOutput>;
|
|
21
|
+
/**
|
|
22
|
+
* @beta
|
|
23
|
+
* @hidden
|
|
24
|
+
* Sends a follow-up message to the host
|
|
25
|
+
* @internal
|
|
26
|
+
* Limited to Microsoft-internal use
|
|
27
|
+
*/
|
|
28
|
+
export declare function sendFollowUpMessage(widgetId: string, args: {
|
|
29
|
+
prompt: string;
|
|
30
|
+
}): Promise<void>;
|
|
31
|
+
/**
|
|
32
|
+
* @beta
|
|
33
|
+
* @hidden
|
|
34
|
+
* Requests a specific display mode for the widget
|
|
35
|
+
* @internal
|
|
36
|
+
* Limited to Microsoft-internal use
|
|
37
|
+
*/
|
|
38
|
+
export declare function requestDisplayMode(widgetId: string, args: {
|
|
39
|
+
mode: DisplayMode;
|
|
40
|
+
}): Promise<void>;
|
|
41
|
+
/**
|
|
42
|
+
* @beta
|
|
43
|
+
* @hidden
|
|
44
|
+
* Requests a modal dialog to be displayed
|
|
45
|
+
* @internal
|
|
46
|
+
* Limited to Microsoft-internal use
|
|
47
|
+
* @param widgetId - The unique identifier for the widget
|
|
48
|
+
* @param options - Configuration options for the modal
|
|
49
|
+
* @returns A DOM element representing the modal's root
|
|
50
|
+
*/
|
|
51
|
+
export declare function requestModal(widgetId: string, options: IModalOptions): Promise<IModalResponse>;
|
|
52
|
+
/**
|
|
53
|
+
* @beta
|
|
54
|
+
* @hidden
|
|
55
|
+
* Notifies the host about the intrinsic height of the widget content
|
|
56
|
+
* @internal
|
|
57
|
+
* Limited to Microsoft-internal use
|
|
58
|
+
*/
|
|
59
|
+
export declare function notifyIntrinsicHeight(widgetId: string, height: number): void;
|
|
60
|
+
/**
|
|
61
|
+
* @beta
|
|
62
|
+
* @hidden
|
|
63
|
+
* Notifies the host about content size changes
|
|
64
|
+
* @internal
|
|
65
|
+
* Limited to Microsoft-internal use
|
|
66
|
+
* @param widgetId - The unique identifier for the widget
|
|
67
|
+
* @param width - The width of the content in pixels
|
|
68
|
+
* @param height - The height of the content in pixels
|
|
69
|
+
*/
|
|
70
|
+
export declare function contentSizeChanged(widgetId: string, width: number, height: number): void;
|
|
71
|
+
/**
|
|
72
|
+
* @beta
|
|
73
|
+
* @hidden
|
|
74
|
+
* Sets the widget state
|
|
75
|
+
* @internal
|
|
76
|
+
* Limited to Microsoft-internal use
|
|
77
|
+
*/
|
|
78
|
+
export declare function setWidgetState(widgetId: string, state: JSONValue): Promise<void>;
|
|
79
|
+
/**
|
|
80
|
+
* @beta
|
|
81
|
+
* @hidden
|
|
82
|
+
* Opens an external URL
|
|
83
|
+
* @internal
|
|
84
|
+
* Limited to Microsoft-internal use
|
|
85
|
+
*/
|
|
86
|
+
export declare function openExternal(widgetId: string, payload: {
|
|
87
|
+
href: string;
|
|
88
|
+
}): void;
|
|
89
|
+
/** Modal close handler function type */
|
|
90
|
+
export type ModalCloseHandlerType = (modalId: string) => void;
|
|
91
|
+
/**
|
|
92
|
+
* @hidden
|
|
93
|
+
* @beta
|
|
94
|
+
* Registers a handler to be called when a modal is closed.
|
|
95
|
+
* This handler will be called when the user closes a modal or when .close() is invoked.
|
|
96
|
+
* @param handler - The handler for modal close events.
|
|
97
|
+
*
|
|
98
|
+
* @internal
|
|
99
|
+
* Limited to Microsoft-internal use
|
|
100
|
+
*/
|
|
101
|
+
export declare function registerModalCloseHandler(handler: ModalCloseHandlerType): void;
|
|
@@ -177,6 +177,12 @@ export interface AppHostInfo {
|
|
|
177
177
|
* Current ring ID
|
|
178
178
|
*/
|
|
179
179
|
ringId?: string;
|
|
180
|
+
/**
|
|
181
|
+
* An array representing the hierarchy of ancestor hosts that the app is embedded inside of.
|
|
182
|
+
* The array is ordered from immediate parent to root host.
|
|
183
|
+
* For example, if Bizchat is running in Calendar in Teams, this would be ["Calendar", "Teams"].
|
|
184
|
+
*/
|
|
185
|
+
ancestors?: string[];
|
|
180
186
|
}
|
|
181
187
|
/**
|
|
182
188
|
* Represents Channel information.
|
|
@@ -434,7 +440,7 @@ export interface Context {
|
|
|
434
440
|
page: PageInfo;
|
|
435
441
|
/**
|
|
436
442
|
* Info about the currently logged in user running the app.
|
|
437
|
-
* If the current user is not logged in/authenticated (e.g. a meeting app running for an anonymously-joined
|
|
443
|
+
* If the current user is not logged in/authenticated (e.g. a meeting app running for an anonymously-joined participant) this will be `undefined`.
|
|
438
444
|
*/
|
|
439
445
|
user?: UserInfo;
|
|
440
446
|
/**
|
|
@@ -475,6 +481,10 @@ export interface Context {
|
|
|
475
481
|
* This function is passed to registerOnThemeHandler. It is called every time the user changes their theme.
|
|
476
482
|
*/
|
|
477
483
|
export type themeHandler = (theme: string) => void;
|
|
484
|
+
/**
|
|
485
|
+
* This function is passed to registerOnContextChangeHandler. It is called every time the user changes their context.
|
|
486
|
+
*/
|
|
487
|
+
export type contextHandler = (context: Context) => void;
|
|
478
488
|
/**
|
|
479
489
|
* This function is passed to registerHostToAppPerformanceMetricsHandler. It is called every time a response is received from the host with metrics for analyzing message delay. See {@link HostToAppPerformanceMetrics} to see which metrics are passed to the handler.
|
|
480
490
|
*/
|
|
@@ -554,6 +564,15 @@ export declare function notifyExpectedFailure(expectedFailureRequest: IExpectedF
|
|
|
554
564
|
* @param handler - The handler to invoke when the user changes their theme.
|
|
555
565
|
*/
|
|
556
566
|
export declare function registerOnThemeChangeHandler(handler: themeHandler): void;
|
|
567
|
+
/**
|
|
568
|
+
* Registers a handler for content (context) changes.
|
|
569
|
+
*
|
|
570
|
+
* @remarks
|
|
571
|
+
* Only one handler can be registered at a time. A subsequent registration replaces an existing registration.
|
|
572
|
+
*
|
|
573
|
+
* @param handler - The handler to invoke when the app's content context changes.
|
|
574
|
+
*/
|
|
575
|
+
export declare function registerOnContextChangeHandler(handler: contextHandler): void;
|
|
557
576
|
/**
|
|
558
577
|
* Registers a function for handling data of host to app message delay.
|
|
559
578
|
*
|
|
@@ -716,6 +716,14 @@ export interface Context {
|
|
|
716
716
|
* The version of the manifest that the app is running.
|
|
717
717
|
*/
|
|
718
718
|
manifestVersion?: string;
|
|
719
|
+
/**
|
|
720
|
+
* @deprecated
|
|
721
|
+
* As of TeamsJS v2.0.0, please use {@link app.AppHostInfo.ancestors | app.Context.app.host.ancestors} instead
|
|
722
|
+
* An array representing the hierarchy of ancestor hosts that the app is embedded inside of.
|
|
723
|
+
* The array is ordered from immediate parent to root host.
|
|
724
|
+
* For example, if Bizchat is running in Calendar in Teams, this would be ["Calendar", "Teams"].
|
|
725
|
+
*/
|
|
726
|
+
hostAncestors?: string[];
|
|
719
727
|
}
|
|
720
728
|
/** Represents the parameters used to share a deep link. */
|
|
721
729
|
export interface ShareDeepLinkParameters {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var o=["teams.microsoft.com","teams.microsoft.us","gov.teams.microsoft.us","dod.teams.microsoft.us","int.teams.microsoft.com","outlook.office.com","outlook-sdf.office.com","outlook.office365.com","outlook-sdf.office365.com","outlook.office365.us","outlook-dod.office365.us","webmail.apps.mil","outlook.live.com","outlook-sdf.live.com","teams.live.com","local.teams.live.com","local.teams.live.com:8080","local.teams.office.com","local.teams.office.com:8080","devspaces.skype.com","*.www.office.com","www.office.com","word.office.com","excel.office.com","powerpoint.office.com","www.officeppe.com","*.www.microsoft365.com","www.microsoft365.com","bing.com","edgeservices.bing.com","work.bing.com","www.bing.com","www.staging-bing-int.com","*.cloud.microsoft","*.m365.cloud.microsoft","*.outlook.cloud.microsoft","chatuxmanager.svc.cloud.microsoft","copilot.microsoft.com","windows.msn.com","fa000000125.resources.office.net","fa000000129.resources.office.net","fa000000124.resources.office.net","fa000000128.resources.office.net","fa000000136.resources.office.net","fa000000125.officeapps.live.com","fa000000129.officeapps.live.com","fa000000124.officeapps.live.com","fa000000128.officeapps.live.com"],c={validOrigins:o};export{c as default,o as validOrigins};
|
|
1
|
+
var o=["teams.microsoft.com","teams.microsoft.us","gov.teams.microsoft.us","dod.teams.microsoft.us","int.teams.microsoft.com","outlook.office.com","outlook-sdf.office.com","outlook.office365.com","outlook-sdf.office365.com","outlook.office365.us","outlook-dod.office365.us","webmail.apps.mil","outlook.live.com","outlook-sdf.live.com","teams.live.com","local.teams.live.com","local.teams.live.com:8080","local.teams.office.com","local.teams.office.com:8080","devspaces.skype.com","*.www.office.com","www.office.com","word.office.com","excel.office.com","powerpoint.office.com","www.officeppe.com","*.www.microsoft365.com","www.microsoft365.com","bing.com","edgeservices.bing.com","work.bing.com","www.bing.com","www.staging-bing-int.com","*.cloud.microsoft","*.m365.cloud.microsoft","*.outlook.cloud.microsoft","chatuxmanager.svc.cloud.microsoft","copilot.microsoft.com","windows.msn.com","fa000000125.resources.office.net","fa000000129.resources.office.net","fa000000124.resources.office.net","fa000000128.resources.office.net","fa000000136.resources.office.net","fa000000125.officeapps.live.com","fa000000129.officeapps.live.com","fa000000124.officeapps.live.com","fa000000128.officeapps.live.com","fa000000136.mro1cdnstorage.public.onecdn.static.microsoft","substrate-msb-bizchatvnext-service.sdf01.substrate-msb-bingatwork.eastus2-sdf.cosmic-ppe.office.net","office-home-m365copilotapp.wus2sdf1.office-home-m365copilotapp.westus2-sdf.cosmic-ppe.office.net","office-home-m365copilotapp.wus2test1.office-home-m365copilotapp.westus2-test.cosmic-int.office.net","m365copilotapp.svc.cloud.microsoft","m365copilotapp.svc.cloud.dev.microsoft","ffc-copilot.officeapps.live.com","m365.cloud.dev.microsoft","m365.cloud.dev.microsoft:3001"],c={validOrigins:o};export{c as default,o as validOrigins};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{NotificationTypes,UserSettingTypes,ViewerActionTypes}from"./private/interfaces.js";export{openFilePreview,registerCustomHandler,registerUserSettingsChangeHandler,sendCustomEvent,sendCustomMessage,uploadCustomApp}from"./private/privateAPIs.js";import*as e from"./private/externalAppAuthentication.js";export{e as externalAppAuthentication};export{UserAuthenticationState}from"./private/externalAppAuthentication.js";import*as r from"./private/logs.js";export{r as logs};import*as t from"./private/conversations.js";export{t as conversations};import*as o from"./private/copilot/copilot.js";export{o as copilot};import*as p from"./private/copilot/sidePanelInterfaces.js";export{p as sidePanelInterfaces};import*as i from"./private/externalAppAuthenticationForCEA.js";export{i as externalAppAuthenticationForCEA};import*as a from"./private/externalAppCardActions.js";export{a as externalAppCardActions};import*as s from"./private/externalAppCardActionsForCEA.js";export{s as externalAppCardActionsForCEA};import*as m from"./private/externalAppCardActionsForDA.js";export{m as externalAppCardActionsForDA};import*as n from"./private/externalAppCommands.js";export{n as externalAppCommands};import*as l from"./private/files.js";export{l as files};import*as c from"./private/meetingRoom.js";export{c as meetingRoom};import*as f from"./private/messageChannels/messageChannels.js";export{f as messageChannels};import*as u from"./private/nestedAppAuth/nestedAppAuthBridge.js";export{u as nestedAppAuthBridge};import*as x from"./private/notifications.js";export{x as notifications};import*as j from"./private/otherAppStateChange.js";export{j as otherAppStateChange};import*as d from"./private/remoteCamera.js";export{d as remoteCamera};import*as g from"./private/appEntity.js";export{g as appEntity};import*as b from"./private/teams/teams.js";export{b as teams};import*as v from"./private/videoEffectsEx.js";export{v as videoEffectsEx};import*as A from"./private/hostEntity/hostEntity.js";export{A as hostEntity};import*as C from"./private/store.js";export{C as store};export{ChannelType,DialogDimension,FrameContexts,HostClientType,HostName,RenderingSurfaces,DialogDimension as TaskModuleDimension,TeamType,UserTeamRole}from"./public/constants.js";export{ActionObjectType,EduType,ErrorCode,FileOpenPreference,SecondaryM365ContentIdName}from"./public/interfaces.js";export{AppId}from"./public/appId.js";export{EmailAddress}from"./public/emailAddress.js";export{activateChildProxyingCommunication,getCurrentFeatureFlagsState,overwriteFeatureFlagsState,setFeatureFlagsState}from"./public/featureFlags.js";export{getAdaptiveCardSchemaVersion}from"./public/adaptiveCards.js";export{ChildAppWindow,ParentAppWindow}from"./public/appWindow.js";export{ValidatedSafeString}from"./public/validatedSafeString.js";export{version}from"./public/version.js";export{enablePrintCapability,executeDeepLink,getContext,getMruTabInstances,getTabInstances,initialize,initializeWithFrameContext,print,registerAppButtonClickHandler,registerAppButtonHoverEnterHandler,registerAppButtonHoverLeaveHandler,registerBackButtonHandler,registerBeforeUnloadHandler,registerChangeSettingsHandler,registerFocusEnterHandler,registerFullScreenHandler,registerOnLoadHandler,registerOnThemeChangeHandler,setFrameContext,shareDeepLink}from"./public/publicAPIs.js";export{navigateBack,navigateCrossDomain,navigateToTab,returnFocus}from"./public/navigation.js";export{UUID}from"./public/uuidObject.js";import*as
|
|
1
|
+
export{NotificationTypes,UserSettingTypes,ViewerActionTypes}from"./private/interfaces.js";export{openFilePreview,registerCustomHandler,registerUserSettingsChangeHandler,sendCustomEvent,sendCustomMessage,uploadCustomApp}from"./private/privateAPIs.js";import*as e from"./private/externalAppAuthentication.js";export{e as externalAppAuthentication};export{UserAuthenticationState}from"./private/externalAppAuthentication.js";import*as r from"./private/logs.js";export{r as logs};import*as t from"./private/conversations.js";export{t as conversations};import*as o from"./private/copilot/copilot.js";export{o as copilot};import*as p from"./private/copilot/sidePanelInterfaces.js";export{p as sidePanelInterfaces};import*as i from"./private/externalAppAuthenticationForCEA.js";export{i as externalAppAuthenticationForCEA};import*as a from"./private/externalAppCardActions.js";export{a as externalAppCardActions};import*as s from"./private/externalAppCardActionsForCEA.js";export{s as externalAppCardActionsForCEA};import*as m from"./private/externalAppCardActionsForDA.js";export{m as externalAppCardActionsForDA};import*as n from"./private/externalAppCommands.js";export{n as externalAppCommands};import*as l from"./private/files.js";export{l as files};import*as c from"./private/meetingRoom.js";export{c as meetingRoom};import*as f from"./private/messageChannels/messageChannels.js";export{f as messageChannels};import*as u from"./private/nestedAppAuth/nestedAppAuthBridge.js";export{u as nestedAppAuthBridge};import*as x from"./private/notifications.js";export{x as notifications};import*as j from"./private/otherAppStateChange.js";export{j as otherAppStateChange};import*as d from"./private/remoteCamera.js";export{d as remoteCamera};import*as g from"./private/appEntity.js";export{g as appEntity};import*as b from"./private/teams/teams.js";export{b as teams};import*as v from"./private/videoEffectsEx.js";export{v as videoEffectsEx};import*as A from"./private/hostEntity/hostEntity.js";export{A as hostEntity};import*as C from"./private/store.js";export{C as store};import*as h from"./private/widgetHosting/widgetHosting.js";export{h as widgetHosting};export{ChannelType,DialogDimension,FrameContexts,HostClientType,HostName,RenderingSurfaces,DialogDimension as TaskModuleDimension,TeamType,UserTeamRole}from"./public/constants.js";export{ActionObjectType,EduType,ErrorCode,FileOpenPreference,SecondaryM365ContentIdName}from"./public/interfaces.js";export{AppId}from"./public/appId.js";export{EmailAddress}from"./public/emailAddress.js";export{activateChildProxyingCommunication,getCurrentFeatureFlagsState,overwriteFeatureFlagsState,setFeatureFlagsState}from"./public/featureFlags.js";export{getAdaptiveCardSchemaVersion}from"./public/adaptiveCards.js";export{ChildAppWindow,ParentAppWindow}from"./public/appWindow.js";export{ValidatedSafeString}from"./public/validatedSafeString.js";export{version}from"./public/version.js";export{enablePrintCapability,executeDeepLink,getContext,getMruTabInstances,getTabInstances,initialize,initializeWithFrameContext,print,registerAppButtonClickHandler,registerAppButtonHoverEnterHandler,registerAppButtonHoverLeaveHandler,registerBackButtonHandler,registerBeforeUnloadHandler,registerChangeSettingsHandler,registerFocusEnterHandler,registerFullScreenHandler,registerOnLoadHandler,registerOnThemeChangeHandler,setFrameContext,shareDeepLink}from"./public/publicAPIs.js";export{navigateBack,navigateCrossDomain,navigateToTab,returnFocus}from"./public/navigation.js";export{UUID}from"./public/uuidObject.js";import*as S from"./public/liveShareHost.js";export{S as liveShare};export{LiveShareHost}from"./public/liveShareHost.js";import*as H from"./public/authentication.js";export{H as authentication};import*as F from"./public/app/app.js";export{F as app};import*as y from"./public/appInstallDialog.js";export{y as appInstallDialog};import*as T from"./public/barCode.js";export{T as barCode};import*as E from"./public/chat.js";export{E as chat};import*as w from"./public/clipboard.js";export{w as clipboard};import*as I from"./public/dialog/dialog.js";export{I as dialog};import*as D from"./public/nestedAppAuth.js";export{D as nestedAppAuth};import*as P from"./public/geoLocation/geoLocation.js";export{P as geoLocation};import*as B from"./public/pages/pages.js";export{B as pages};import*as k from"./public/menus.js";export{k as menus};import*as L from"./public/media.js";export{L as media};import*as U from"./public/secondaryBrowser.js";export{U as secondaryBrowser};import*as M from"./public/location.js";export{M as location};import*as O from"./public/meeting/meeting.js";export{O as meeting};import*as V from"./public/monetization.js";export{V as monetization};import*as z from"./public/calendar.js";export{z as calendar};import*as R from"./public/mail/mail.js";export{R as mail};import*as W from"./public/teamsAPIs.js";export{W as teamsCore};import*as N from"./public/people.js";export{N as people};import*as q from"./public/profile.js";export{q as profile};import*as G from"./public/videoEffects.js";export{G as videoEffects};import*as J from"./public/search.js";export{J as search};import*as K from"./public/sharing/sharing.js";export{K as sharing};import*as Q from"./public/stageView/stageView.js";export{Q as stageView};import*as X from"./public/visualMedia/visualMedia.js";export{X as visualMedia};import*as Y from"./public/webStorage.js";export{Y as webStorage};import*as Z from"./public/call.js";export{Z as call};import*as $ from"./public/appInitialization.js";export{$ as appInitialization};import*as _ from"./public/thirdPartyCloudStorage.js";export{_ as thirdPartyCloudStorage};import*as ee from"./public/settings.js";export{ee as settings};import*as re from"./public/tasks.js";export{re as tasks};import*as te from"./public/marketplace.js";export{te as marketplace};import*as oe from"./public/shortcutRelay.js";export{oe as shortcutRelay};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as i}from"../../../../node_modules/.pnpm/@rollup_plugin-typescript@11.1.6_rollup@4.24.4_tslib@2.6.3_typescript@4.9.5/node_modules/tslib/tslib.es6.js";import{sendMessageToParent as e,sendAndHandleStatusAndReason as t,callFunctionInHostAndHandleResponse as n,initializeCommunication as o}from"./communication.js";import{errorLibraryNotInitialized as r,defaultSDKVersionForCompatCheck as s}from"./constants.js";import{GlobalVars as l}from"./globalVars.js";import{registerOnThemeChangeHandler as a,initializeHandlers as
|
|
1
|
+
import{__awaiter as i}from"../../../../node_modules/.pnpm/@rollup_plugin-typescript@11.1.6_rollup@4.24.4_tslib@2.6.3_typescript@4.9.5/node_modules/tslib/tslib.es6.js";import{sendMessageToParent as e,sendAndHandleStatusAndReason as t,callFunctionInHostAndHandleResponse as n,initializeCommunication as o}from"./communication.js";import{errorLibraryNotInitialized as r,defaultSDKVersionForCompatCheck as s}from"./constants.js";import{GlobalVars as l}from"./globalVars.js";import{registerOnThemeChangeHandler as a,registerOnContextChangeHandler as p,initializeHandlers as u}from"./handlers.js";import{ensureInitializeCalled as m,ensureInitialized as c,processAdditionalValidOrigins as f}from"./internalAPIs.js";import{getLogger as d}from"./telemetry.js";import{isNullOrUndefined as g}from"./typeCheckUtilities.js";import{inServerSideRenderingEnvironment as h,runWithTimeout as S,normalizeAgeGroupValue as j,compareSDKVersions as v}from"./utils.js";import{Messages as w}from"../public/app/app.js";import{FrameContexts as y}from"../public/constants.js";import{initialize as z}from"../public/dialog/dialog.js";import{initialize as b}from"../public/menus.js";import{runtime as P,applyRuntimeConfig as C,generateVersionBasedTeamsRuntimeConfig as x,mapTeamsVersionToSupportedCapabilities as D,versionAndPlatformAgnosticTeamsRuntimeConfig as E}from"../public/runtime.js";import{version as V}from"../public/version.js";import{SimpleTypeResponseHandler as K}from"./responseHandler.js";import{initialize as _}from"../public/pages/config.js";const k=d("app");function A(i,e){if(h()){return k.extend("initialize")("window object undefined at initialization"),Promise.resolve()}return S((()=>function(i,e){return new Promise((t=>{l.initializeCalled||(l.initializeCalled=!0,u(),l.initializePromise=o(e,i).then((({context:i,clientType:e,runtimeConfig:t,clientSupportedSDKVersion:n=s})=>{l.frameContext=i,l.hostClientType=e,l.clientSupportedSDKVersion=n;try{L("Parsing %s",t);let i=JSON.parse(t);if(L("Checking if %o is a valid runtime object",null!=i?i:"null"),!i||!i.apiVersion)throw new Error("Received runtime config is invalid");i=j(i),t&&C(i)}catch(i){if(!(i instanceof SyntaxError))throw i;try{L("Attempting to parse %s as an SDK version",t),isNaN(v(t,s))||(l.clientSupportedSDKVersion=t);let i=JSON.parse(n);if(L("givenRuntimeConfig parsed to %o",null!=i?i:"null"),!i)throw new Error("givenRuntimeConfig string was successfully parsed. However, it parsed to value of null");i=j(i),C(i)}catch(i){if(!(i instanceof SyntaxError))throw i;C(x(l.clientSupportedSDKVersion,E,D))}}l.initializeCompleted=!0})),b(),_(),z()),Array.isArray(e)&&f(e),void 0!==l.initializePromise?t(l.initializePromise):L("GlobalVars.initializePromise is unexpectedly undefined")}))}(i,e)),6e4,new Error("SDK initialization timed out."))}function F(i){e(i,w.AppLoaded,[V])}function N(i,t){e(i,w.ExpectedFailure,[t.reason,t.message])}function R(i,t){e(i,w.Failure,[t.reason,t.message])}function H(e){return i(this,void 0,void 0,(function*(){if(l.initializeCompleted)return J(e);if(!l.initializePromise)throw new Error(r);return l.initializePromise.then((()=>J(e)))}))}function J(t){return i(this,void 0,void 0,(function*(){return c(P)&&(null===(i=P.supports.app)||void 0===i?void 0:i.notifySuccessResponse)?n(w.Success,[V],new K,t).then((()=>({hasFinishedSuccessfully:!0}))):(e(t,w.Success,[V]),{hasFinishedSuccessfully:"unknown"});var i}))}const L=k.extend("initializeHelper");function O(i,e){!g(e)&&m(),a(i,e)}function T(i,e){!g(e)&&m(),p(i,e)}function G(i,e){return new Promise((n=>{c(P,y.content,y.sidePanel,y.settings,y.task,y.stage,y.meetingStage),n(t(i,"executeDeepLink",e))}))}export{A as appInitializeHelper,J as callNotifySuccessInHost,F as notifyAppLoadedHelper,N as notifyExpectedFailureHelper,R as notifyFailureHelper,H as notifySuccessHelper,G as openLinkHelper,T as registerOnContextChangeHandlerHelper,O as registerOnThemeChangeHandlerHelper};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as e}from"../../../../node_modules/.pnpm/@rollup_plugin-typescript@11.1.6_rollup@4.24.4_tslib@2.6.3_typescript@4.9.5/node_modules/tslib/tslib.es6.js";import{getLogger as n,getApiVersionTag as r}from"./telemetry.js";import{runtime as l}from"../public/runtime.js";import{shouldEventBeRelayedToChild as a,sendMessageEventToChild as o}from"./childCommunication.js";import{sendMessageToParent as t}from"./communication.js";import{ensureInitialized as d}from"./internalAPIs.js";import{initializeBackStackHelper as i}from"./pagesHelpers.js";import{isNullOrUndefined as s}from"./typeCheckUtilities.js";const u=n("handlers");class
|
|
1
|
+
import{__awaiter as e}from"../../../../node_modules/.pnpm/@rollup_plugin-typescript@11.1.6_rollup@4.24.4_tslib@2.6.3_typescript@4.9.5/node_modules/tslib/tslib.es6.js";import{getLogger as n,getApiVersionTag as r}from"./telemetry.js";import{runtime as l}from"../public/runtime.js";import{shouldEventBeRelayedToChild as a,sendMessageEventToChild as o}from"./childCommunication.js";import{sendMessageToParent as t}from"./communication.js";import{ensureInitialized as d}from"./internalAPIs.js";import{initializeBackStackHelper as i}from"./pagesHelpers.js";import{isNullOrUndefined as s}from"./typeCheckUtilities.js";const u=n("handlers");class f{static initializeHandlers(){f.handlers.themeChange=v,f.handlers.load=x,f.handlers.beforeUnload=_,i()}static uninitializeHandlers(){f.handlers={},f.themeChangeHandler=null,f.beforeUnloadHandler=null,f.beforeSuspendOrTerminateHandler=null,f.resumeHandler=null,f.contextChangeHandler=null}}function m(){f.initializeHandlers()}function c(){f.uninitializeHandlers()}f.handlers={},f.themeChangeHandler=null,f.loadHandler=null,f.beforeUnloadHandler=null,f.beforeSuspendOrTerminateHandler=null,f.resumeHandler=null,f.hostToAppPerformanceMetricsHandler=null,f.contextChangeHandler=null;const H=u.extend("callHandler");function h(e,n){const r=f.handlers[e];if(r){H("Invoking the registered handler for message %s with arguments %o",e,n);return[!0,r.apply(this,n)]}return a()?(o(e,n),[!1,void 0]):(H("Handler for action message %s not found.",e),[!1,void 0])}function p(e,n,r,l=!0,a=[]){r?(f.handlers[n]=r,l&&t(e,"registerHandler",[n,...a])):delete f.handlers[n]}function g(e){delete f.handlers[e]}function b(e){return null!=f.handlers[e]}function U(e,n,r,a,o){r&&d(l,...a),o&&o(),p(e,n,r)}function C(e,n){f.themeChangeHandler=n,!s(n)&&t(e,"registerHandler",["themeChange"])}function T(e,n){f.contextChangeHandler=n,!s(n)&&t(e,"registerHandler",["contextChange"])}function v(e){f.themeChangeHandler&&f.themeChangeHandler(e),a()&&o("themeChange",[e])}function y(e){f.hostToAppPerformanceMetricsHandler=e}function j(e){f.hostToAppPerformanceMetricsHandler&&f.hostToAppPerformanceMetricsHandler(e)}function O(e,n){f.loadHandler=n,!s(n)&&t(e,"registerHandler",["load"])}function x(e){const n={entityId:(r=e).entityId,contentUrl:new URL(r.contentUrl)};var r;f.resumeHandler?(f.resumeHandler(n),a()&&o("load",[n])):f.loadHandler&&(f.loadHandler(e),a()&&o("load",[e]))}function S(e,n){f.beforeUnloadHandler=n,!s(n)&&t(e,"registerHandler",["beforeUnload"])}function _(){return e(this,void 0,void 0,(function*(){const e=()=>{t(r("v2","handleBeforeUnload"),"readyToUnload",[])};f.beforeSuspendOrTerminateHandler?(yield f.beforeSuspendOrTerminateHandler(),a()?o("beforeUnload"):e()):f.beforeUnloadHandler&&f.beforeUnloadHandler(e)||(a()?o("beforeUnload"):e())}))}function A(e){f.beforeSuspendOrTerminateHandler=e,!s(e)&&t(r("v2","registerBeforeSuspendOrTerminateHandler"),"registerHandler",["beforeUnload"])}function P(e){f.resumeHandler=e,!s(e)&&t(r("v2","registerOnResumeHandler"),"registerHandler",["load"])}export{h as callHandler,b as doesHandlerExist,j as handleHostToAppPerformanceMetrics,v as handleThemeChange,m as initializeHandlers,A as registerBeforeSuspendOrTerminateHandler,S as registerBeforeUnloadHandler,p as registerHandler,U as registerHandlerHelper,y as registerHostToAppPerformanceMetricsHandler,T as registerOnContextChangeHandler,O as registerOnLoadHandler,P as registerOnResumeHandler,C as registerOnThemeChangeHandler,g as removeHandler,c as uninitializeHandlers};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__awaiter as t}from"../../../../../node_modules/.pnpm/@rollup_plugin-typescript@11.1.6_rollup@4.24.4_tslib@2.6.3_typescript@4.9.5/node_modules/tslib/tslib.es6.js";import{callFunctionInHost as i,callFunctionInHostAndHandleResponse as e}from"../../internal/communication.js";import{registerHandlerHelper as n}from"../../internal/handlers.js";import{ensureInitialized as s,ensureInitializeCalled as o}from"../../internal/internalAPIs.js";import{ResponseHandler as d}from"../../internal/responseHandler.js";import{getLogger as r,getApiVersionTag as g}from"../../internal/telemetry.js";import{isSdkError as h}from"../../public/interfaces.js";import{runtime as w}from"../../public/runtime.js";const l="v1",a=r("widgetHosting");function u(){return s(w)&&!!w.supports.widgetHosting}function c(i,n){return t(this,void 0,void 0,(function*(){return o(),a("Calling tool with widgetId and input: ",{widgetId:i,input:n}),e("widgetHosting.callTool",[new b(i,n)],new j,g(l,"widgetHosting.callTool"),h)}))}function p(e,n){return t(this,void 0,void 0,(function*(){return o(),a("Sending follow-up message with widgetId and prompt: ",{widgetId:e,prompt:n.prompt}),i("widgetHosting.sendFollowUpMessage",[new q(e,n)],g(l,"widgetHosting.sendFollowUpMessage"))}))}function I(e,n){return t(this,void 0,void 0,(function*(){return o(),a("Requesting display mode with widgetId: ",{widgetId:e,mode:n.mode}),i("widgetHosting.requestDisplayMode",[new x(e,n)],g(l,"widgetHosting.requestDisplayMode"))}))}function m(i,n){return t(this,void 0,void 0,(function*(){return o(),a("Requesting modal with widgetId and options: ",{widgetId:i,options:n}),e("widgetHosting.requestModal",[new W(i,n)],new M,g(l,"widgetHosting.requestModal"),h)}))}function f(t,e){o(),a("Notifying intrinsic height with widgetId: ",{widgetId:t,height:e}),i("widgetHosting.notifyIntrinsicHeight",[new C(t,e)],g(l,"widgetHosting.notifyIntrinsicHeight"))}function H(t,e,n){o(),a("Content size changed with widgetId: ",{widgetId:t,width:e,height:n}),i("widgetHosting.contentSizeChanged",[new E(t,e,n)],g(l,"widgetHosting.contentSizeChanged"))}function v(e,n){return t(this,void 0,void 0,(function*(){return o(),a("Setting widget state with widgetId: ",{widgetId:e,state:n}),i("widgetHosting.setWidgetState",[new _(e,n)],g(l,"widgetHosting.setWidgetState"))}))}function y(t,e){o(),a("Opening external URL with widgetId: ",{widgetId:t,href:e.href}),i("widgetHosting.openExternal",[new S(t,e)],g(l,"widgetHosting.openExternal"))}function z(t){n(g(l,"widgetHosting.registerModalCloseHandler"),"widgetHosting.closeWidgetModal",t,[],(()=>{if(!u())throw new Error("Widget Hosting is not supported on this platform")}))}class j extends d{validate(t){return null!==t&&"object"==typeof t}deserialize(t){return t}}class M extends d{validate(t){return null!==t&&"object"==typeof t}deserialize(t){return t}}class b{constructor(t,i){this.widgetId=t,this.toolInput=i}serialize(){return{widgetId:this.widgetId,name:this.toolInput.name,arguments:this.toolInput.arguments}}}class q{constructor(t,i){this.widgetId=t,this.args=i}serialize(){return{widgetId:this.widgetId,prompt:this.args.prompt}}}class x{constructor(t,i){this.widgetId=t,this.args=i}serialize(){return{widgetId:this.widgetId,mode:this.args.mode}}}class S{constructor(t,i){this.widgetId=t,this.payload=i}serialize(){return{widgetId:this.widgetId,href:this.payload.href}}}class _{constructor(t,i){this.widgetId=t,this.state=i}serialize(){return{widgetId:this.widgetId,state:this.state}}}class C{constructor(t,i){this.widgetId=t,this.height=i}serialize(){return{widgetId:this.widgetId,height:this.height}}}class W{constructor(t,i){this.widgetId=t,this.options=i}serialize(){return{widgetId:this.widgetId,id:this.options.id,title:this.options.title,content:this.options.content,width:this.options.width,height:this.options.height}}}class E{constructor(t,i,e){this.widgetId=t,this.width=i,this.height=e}serialize(){return{widgetId:this.widgetId,width:this.width,height:this.height}}}export{c as callTool,H as contentSizeChanged,u as isSupported,f as notifyIntrinsicHeight,y as openExternal,z as registerModalCloseHandler,I as requestDisplayMode,m as requestModal,p as sendFollowUpMessage,v as setWidgetState};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{appInitializeHelper as e,notifyAppLoadedHelper as i,notifySuccessHelper as t,notifyFailureHelper as n,notifyExpectedFailureHelper as a,registerOnThemeChangeHandlerHelper as o,openLinkHelper as
|
|
1
|
+
import{appInitializeHelper as e,notifyAppLoadedHelper as i,notifySuccessHelper as t,notifyFailureHelper as n,notifyExpectedFailureHelper as a,registerOnThemeChangeHandlerHelper as o,registerOnContextChangeHandlerHelper as s,openLinkHelper as r}from"../../internal/appHelpers.js";import{uninitializeCommunication as l,sendAndUnwrap as m,Communication as d}from"../../internal/communication.js";import{GlobalVars as p}from"../../internal/globalVars.js";import{uninitializeHandlers as c,registerHostToAppPerformanceMetricsHandler as u}from"../../internal/handlers.js";import{ensureInitializeCalled as f}from"../../internal/internalAPIs.js";import{getLogger as h,getApiVersionTag as g}from"../../internal/telemetry.js";import{inServerSideRenderingEnvironment as I}from"../../internal/utils.js";import{AppId as y}from"../appId.js";import{HostName as S,HostClientType as T}from"../constants.js";import{version as C}from"../version.js";import*as v from"./lifecycle.js";export{v as lifecycle};import{_clearTelemetryPort as P}from"../../private/messageChannels/telemetry.js";import{_clearDataLayerPort as j}from"../../private/messageChannels/dataLayer.js";const w="v2",O=h("app"),N={AppLoaded:"appInitialization.appLoaded",Success:"appInitialization.success",Failure:"appInitialization.failure",ExpectedFailure:"appInitialization.expectedFailure"};var b,x;function F(){return p.initializeCompleted}function A(){return p.frameContext}function L(i){return e(g(w,"app.initialize"),i)}function z(e){d.currentWindow=e}function D(){p.initializeCalled&&(c(),p.initializeCalled=!1,p.initializeCompleted=!1,p.initializePromise=void 0,p.additionalValidOrigins=[],p.frameContext=void 0,p.hostClientType=void 0,p.isFramelessWindow=!1,P(),j(),l())}function k(){return new Promise((e=>{f(),e(m(g(w,"app.getContext"),"getContext"))})).then((e=>function(e){var i;const t={actionInfo:e.actionInfo,app:{locale:e.locale,sessionId:e.appSessionId?e.appSessionId:"",theme:e.theme?e.theme:"default",iconPositionVertical:e.appIconPosition,osLocaleInfo:e.osLocaleInfo,messageId:e.messageId,parentMessageId:e.parentMessageId,userClickTime:e.userClickTime,userClickTimeV2:e.userClickTimeV2,userFileOpenPreference:e.userFileOpenPreference,host:{name:e.hostName?e.hostName:S.teams,clientType:e.hostClientType?e.hostClientType:T.web,sessionId:e.sessionId?e.sessionId:"",ringId:e.ringId,ancestors:e.hostAncestors},appLaunchId:e.appLaunchId,appId:e.appId?new y(e.appId):void 0,manifestVersion:e.manifestVersion},page:{id:e.entityId,frameContext:e.frameContext?e.frameContext:p.frameContext,renderingSurface:e.renderingSurface?e.renderingSurface:void 0,subPageId:e.subEntityId,isFullScreen:e.isFullScreen,isMultiWindow:e.isMultiWindow,isBackgroundLoad:e.isBackgroundLoad,sourceOrigin:e.sourceOrigin},user:{id:null!==(i=e.userObjectId)&&void 0!==i?i:"",displayName:e.userDisplayName,isCallingAllowed:e.isCallingAllowed,isPSTNCallingAllowed:e.isPSTNCallingAllowed,licenseType:e.userLicenseType,loginHint:e.loginHint,userPrincipalName:e.userPrincipalName,tenant:e.tid?{id:e.tid,teamsSku:e.tenantSKU}:void 0},channel:e.channelId?{id:e.channelId,displayName:e.channelName,relativeUrl:e.channelRelativeUrl,membershipType:e.channelType,defaultOneNoteSectionId:e.defaultOneNoteSectionId,ownerGroupId:e.hostTeamGroupId,ownerTenantId:e.hostTeamTenantId}:void 0,chat:e.chatId?{id:e.chatId}:void 0,meeting:e.meetingId?{id:e.meetingId}:void 0,sharepoint:e.sharepoint,team:e.teamId?{internalId:e.teamId,displayName:e.teamName,type:e.teamType,groupId:e.groupId,templateId:e.teamTemplateId,isArchived:e.isTeamArchived,userRole:e.userTeamRole}:void 0,sharePointSite:e.teamSiteUrl||e.teamSiteDomain||e.teamSitePath||e.mySitePath||e.mySiteDomain?{teamSiteUrl:e.teamSiteUrl,teamSiteDomain:e.teamSiteDomain,teamSitePath:e.teamSitePath,teamSiteId:e.teamSiteId,mySitePath:e.mySitePath,mySiteDomain:e.mySiteDomain}:void 0,dialogParameters:e.dialogParameters||{}};return t}(e)))}function H(){f(),i(g(w,"app.notifyAppLoaded"))}function U(){return t(g(w,"app.notifySuccess"))}function V(e){f(),n(g(w,"app.notifyFailure"),e)}function E(e){f(),a(g(w,"app.notifyExpectedFailure"),e)}function M(e){o(g(w,"app.registerOnThemeChangeHandler"),e)}function W(e){s(g(w,"app.registerOnContextChangeHandler"),e)}function B(e){u(e)}function R(e){return r(g(w,"app.openLink"),e)}!function(e){e.AuthFailed="AuthFailed",e.Timeout="Timeout",e.Other="Other"}(b||(b={})),function(e){e.PermissionError="PermissionError",e.NotFound="NotFound",e.Throttling="Throttling",e.Offline="Offline",e.Other="Other"}(x||(x={})),O("teamsjs instance is version %s, starting at %s UTC (%s local)",C,(new Date).toISOString(),(new Date).toLocaleString()),function(){if(I())return;const e=document.getElementsByTagName("script"),i=e&&e[e.length-1]&&e[e.length-1].src,t="Today, teamsjs can only be used from a single script or you may see undefined behavior. This log line is used to help detect cases where teamsjs is loaded multiple times -- it is always written. The presence of the log itself does not indicate a multi-load situation, but multiples of these log lines will. If you would like to use teamjs from more than one script at the same time, please open an issue at https://github.com/OfficeDev/microsoft-teams-library-js/issues";i&&0!==i.length?O("teamsjs is being used from %s. %s",i,t):O("teamsjs is being used from a script tag embedded directly in your html. %s",t)}();export{x as ExpectedFailureReason,b as FailedReason,N as Messages,z as _initialize,D as _uninitialize,k as getContext,A as getFrameContext,L as initialize,F as isInitialized,H as notifyAppLoaded,E as notifyExpectedFailure,V as notifyFailure,U as notifySuccess,R as openLink,B as registerHostToAppPerformanceMetricsHandler,W as registerOnContextChangeHandler,M as registerOnThemeChangeHandler};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const t="2.48.0-beta.0";export{t as version};
|