@microsoft/teams-js 2.9.0 → 2.10.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/README.md CHANGED
@@ -24,7 +24,7 @@ To install the stable [version](https://learn.microsoft.com/javascript/api/overv
24
24
 
25
25
  ### Production
26
26
 
27
- You can reference these files directly [from here](https://res.cdn.office.net/teams-js/2.9.0/js/MicrosoftTeams.min.js) or point your package manager at them.
27
+ You can reference these files directly [from here](https://res.cdn.office.net/teams-js/2.9.1/js/MicrosoftTeams.min.js) or point your package manager at them.
28
28
 
29
29
  ## Usage
30
30
 
@@ -45,13 +45,13 @@ Reference the library inside of your `.html` page using:
45
45
  ```html
46
46
  <!-- Microsoft Teams JavaScript API (via CDN) -->
47
47
  <script
48
- src="https://res.cdn.office.net/teams-js/2.9.0/js/MicrosoftTeams.min.js"
49
- integrity="sha384-wh4L8gn9alg8jFXiHwEw/IgcfK7aT/6Pyby/p5B7zHM+a0Jek5MxzO7AvSlRFvsC"
48
+ src="https://res.cdn.office.net/teams-js/2.9.1/js/MicrosoftTeams.min.js"
49
+ integrity="sha384-xnsUQ1tUqsrutBJl0vuf4/hufzLFWW8ZhGnhItfpQ0/BtWgM2uw6YT6BQ5YaKBSM"
50
50
  crossorigin="anonymous"
51
51
  ></script>
52
52
 
53
53
  <!-- Microsoft Teams JavaScript API (via npm) -->
54
- <script src="node_modules/@microsoft/teams-js@2.9.0/dist/MicrosoftTeams.min.js"></script>
54
+ <script src="node_modules/@microsoft/teams-js@2.9.1/dist/MicrosoftTeams.min.js"></script>
55
55
 
56
56
  <!-- Microsoft Teams JavaScript API (via local) -->
57
57
  <script src="MicrosoftTeams.min.js"></script>
@@ -2647,7 +2647,11 @@ export enum HostName {
2647
2647
  /**
2648
2648
  * Teams
2649
2649
  */
2650
- teams = "Teams"
2650
+ teams = "Teams",
2651
+ /**
2652
+ * Modern Teams
2653
+ */
2654
+ teamsModern = "TeamsModern"
2651
2655
  }
2652
2656
  export enum FrameContexts {
2653
2657
  settings = "settings",
@@ -4243,7 +4247,15 @@ export namespace chat {
4243
4247
  export {};
4244
4248
 
4245
4249
  /**
4246
- * Namespace to interact with the dialog module-specific part of the SDK.
4250
+ * This group of capabilities enables apps to show modal dialogs. There are two primary types of dialogs: URL-based dialogs and [Adaptive Card](https://learn.microsoft.com/adaptive-cards/) dialogs.
4251
+ * Both types of dialogs are shown on top of your app, preventing interaction with your app while they are displayed.
4252
+ * - URL-based dialogs allow you to specify a URL from which the contents will be shown inside the dialog.
4253
+ * - For URL dialogs, use the functions and interfaces in the {@link dialog.url} namespace.
4254
+ * - Adaptive Card-based dialogs allow you to provide JSON describing an Adaptive Card that will be shown inside the dialog.
4255
+ * - For Adaptive Card dialogs, use the functions and interfaces in the {@link dialog.adaptiveCard} namespace.
4256
+ *
4257
+ * @remarks Note that dialogs were previously called "task modules". While they have been renamed for clarity, the functionality has been maintained.
4258
+ * For more details, see [Dialogs](https://learn.microsoft.com/microsoftteams/platform/task-modules-and-cards/what-are-task-modules)
4247
4259
  *
4248
4260
  * @beta
4249
4261
  */
@@ -4274,6 +4286,9 @@ export namespace dialog {
4274
4286
  /**
4275
4287
  * Handler used for receiving results when a dialog closes, either the value passed by {@linkcode url.submit}
4276
4288
  * or an error if the dialog was closed by the user.
4289
+ *
4290
+ * @see {@linkcode ISdkResponse}
4291
+ *
4277
4292
  * @beta
4278
4293
  */
4279
4294
  type DialogSubmitHandler = (result: ISdkResponse) => void;
@@ -4406,14 +4421,11 @@ export namespace dialog {
4406
4421
  function getDialogInfoFromBotUrlDialogInfo(botUrlDialogInfo: BotUrlDialogInfo): DialogInfo;
4407
4422
  }
4408
4423
  /**
4409
- * Checks if dialog capability is supported by the host
4410
- * @returns boolean to represent whether dialog capabilty is supported
4424
+ * This function currently serves no purpose and should not be used. All functionality that used
4425
+ * to be covered by this method is now in subcapabilities and those isSupported methods should be
4426
+ * used directly.
4411
4427
  *
4412
- * @throws Error if {@linkcode app.initialize} has not successfully completed
4413
- *
4414
- * @throws Error if {@linkcode app.initialize} has not successfully completed
4415
- *
4416
- * @beta
4428
+ * @hidden
4417
4429
  */
4418
4430
  function isSupported(): boolean;
4419
4431
  /**
@@ -7519,9 +7531,13 @@ export namespace settings {
7519
7531
  export namespace tasks {
7520
7532
  /**
7521
7533
  * @deprecated
7522
- * As of 2.8.0, please use {@link dialog.url.open dialog.url.open(urlDialogInfo: UrlDialogInfo, submitHandler?: DialogSubmitHandler, messageFromChildHandler?: PostMessageChannel): void} for url based dialogs
7523
- * and {@link dialog.url.bot.open dialog.url.bot.open(botUrlDialogInfo: BotUrlDialogInfo, submitHandler?: DialogSubmitHandler, messageFromChildHandler?: PostMessageChannel): void} for bot-based dialogs. In Teams,
7524
- * this function can be used for Adaptive Card-based dialogs. Support for Adaptive Card-based dialogs is coming to other hosts in the future.
7534
+ * As of 2.8.0:
7535
+ * - For url-based dialogs, please use {@link dialog.url.open dialog.url.open(urlDialogInfo: UrlDialogInfo, submitHandler?: DialogSubmitHandler, messageFromChildHandler?: PostMessageChannel): void} .
7536
+ * - For url-based dialogs with bot interaction, please use {@link dialog.url.bot.open dialog.url.bot.open(botUrlDialogInfo: BotUrlDialogInfo, submitHandler?: DialogSubmitHandler, messageFromChildHandler?: PostMessageChannel): void}
7537
+ * - For Adaptive Card-based dialogs:
7538
+ * - In Teams, please continue to use this function until the new functions in {@link dialog.adaptiveCard} have been fully implemented. You can tell at runtime when they are implemented in Teams by checking
7539
+ * the return value of the {@link dialog.adaptiveCard.isSupported} function. This documentation line will also be removed once they have been fully implemented in Teams.
7540
+ * - In all other hosts, please use {@link dialog.adaptiveCard.open dialog.adaptiveCard.open(cardDialogInfo: CardDialogInfo, submitHandler?: DialogSubmitHandler, messageFromChildHandler?: PostMessageChannel): void}
7525
7541
  *
7526
7542
  * Allows an app to open the task module.
7527
7543
  *
@@ -7,7 +7,7 @@
7
7
  exports["microsoftTeams"] = factory();
8
8
  else
9
9
  root["microsoftTeams"] = factory();
10
- })(self, function() {
10
+ })(self, () => {
11
11
  return /******/ (() => { // webpackBootstrap
12
12
  /******/ var __webpack_modules__ = ({
13
13
 
@@ -1477,6 +1477,10 @@ var HostName;
1477
1477
  * Teams
1478
1478
  */
1479
1479
  HostName["teams"] = "Teams";
1480
+ /**
1481
+ * Modern Teams
1482
+ */
1483
+ HostName["teamsModern"] = "TeamsModern";
1480
1484
  })(HostName || (HostName = {}));
1481
1485
  // Ensure these declarations stay in sync with the framework.
1482
1486
  var FrameContexts;
@@ -2151,7 +2155,7 @@ var _minRuntimeConfigToUninitialize = {
2151
2155
  };
2152
2156
 
2153
2157
  ;// CONCATENATED MODULE: ./src/public/version.ts
2154
- var version = "2.9.0";
2158
+ var version = "2.10.0-beta.0";
2155
2159
 
2156
2160
  ;// CONCATENATED MODULE: ./src/internal/internalAPIs.ts
2157
2161
 
@@ -2713,7 +2717,15 @@ var authentication;
2713
2717
 
2714
2718
 
2715
2719
  /**
2716
- * Namespace to interact with the dialog module-specific part of the SDK.
2720
+ * This group of capabilities enables apps to show modal dialogs. There are two primary types of dialogs: URL-based dialogs and [Adaptive Card](https://learn.microsoft.com/adaptive-cards/) dialogs.
2721
+ * Both types of dialogs are shown on top of your app, preventing interaction with your app while they are displayed.
2722
+ * - URL-based dialogs allow you to specify a URL from which the contents will be shown inside the dialog.
2723
+ * - For URL dialogs, use the functions and interfaces in the {@link dialog.url} namespace.
2724
+ * - Adaptive Card-based dialogs allow you to provide JSON describing an Adaptive Card that will be shown inside the dialog.
2725
+ * - For Adaptive Card dialogs, use the functions and interfaces in the {@link dialog.adaptiveCard} namespace.
2726
+ *
2727
+ * @remarks Note that dialogs were previously called "task modules". While they have been renamed for clarity, the functionality has been maintained.
2728
+ * For more details, see [Dialogs](https://learn.microsoft.com/microsoftteams/platform/task-modules-and-cards/what-are-task-modules)
2717
2729
  *
2718
2730
  * @beta
2719
2731
  */
@@ -2962,14 +2974,11 @@ var dialog;
2962
2974
  url.getDialogInfoFromBotUrlDialogInfo = getDialogInfoFromBotUrlDialogInfo;
2963
2975
  })(url = dialog.url || (dialog.url = {}));
2964
2976
  /**
2965
- * Checks if dialog capability is supported by the host
2966
- * @returns boolean to represent whether dialog capabilty is supported
2967
- *
2968
- * @throws Error if {@linkcode app.initialize} has not successfully completed
2977
+ * This function currently serves no purpose and should not be used. All functionality that used
2978
+ * to be covered by this method is now in subcapabilities and those isSupported methods should be
2979
+ * used directly.
2969
2980
  *
2970
- * @throws Error if {@linkcode app.initialize} has not successfully completed
2971
- *
2972
- * @beta
2981
+ * @hidden
2973
2982
  */
2974
2983
  function isSupported() {
2975
2984
  return ensureInitialized(runtime) && runtime.supports.dialog ? true : false;
@@ -9033,9 +9042,13 @@ var tasks;
9033
9042
  (function (tasks) {
9034
9043
  /**
9035
9044
  * @deprecated
9036
- * As of 2.8.0, please use {@link dialog.url.open dialog.url.open(urlDialogInfo: UrlDialogInfo, submitHandler?: DialogSubmitHandler, messageFromChildHandler?: PostMessageChannel): void} for url based dialogs
9037
- * and {@link dialog.url.bot.open dialog.url.bot.open(botUrlDialogInfo: BotUrlDialogInfo, submitHandler?: DialogSubmitHandler, messageFromChildHandler?: PostMessageChannel): void} for bot-based dialogs. In Teams,
9038
- * this function can be used for Adaptive Card-based dialogs. Support for Adaptive Card-based dialogs is coming to other hosts in the future.
9045
+ * As of 2.8.0:
9046
+ * - For url-based dialogs, please use {@link dialog.url.open dialog.url.open(urlDialogInfo: UrlDialogInfo, submitHandler?: DialogSubmitHandler, messageFromChildHandler?: PostMessageChannel): void} .
9047
+ * - For url-based dialogs with bot interaction, please use {@link dialog.url.bot.open dialog.url.bot.open(botUrlDialogInfo: BotUrlDialogInfo, submitHandler?: DialogSubmitHandler, messageFromChildHandler?: PostMessageChannel): void}
9048
+ * - For Adaptive Card-based dialogs:
9049
+ * - In Teams, please continue to use this function until the new functions in {@link dialog.adaptiveCard} have been fully implemented. You can tell at runtime when they are implemented in Teams by checking
9050
+ * the return value of the {@link dialog.adaptiveCard.isSupported} function. This documentation line will also be removed once they have been fully implemented in Teams.
9051
+ * - In all other hosts, please use {@link dialog.adaptiveCard.open dialog.adaptiveCard.open(cardDialogInfo: CardDialogInfo, submitHandler?: DialogSubmitHandler, messageFromChildHandler?: PostMessageChannel): void}
9039
9052
  *
9040
9053
  * Allows an app to open the task module.
9041
9054
  *