@microsoft/teams-js 2.0.0-beta.6 → 2.0.0-beta.6-dev.22

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.
@@ -1122,7 +1122,7 @@ __webpack_require__.d(__webpack_exports__, {
1122
1122
  });
1123
1123
 
1124
1124
  ;// CONCATENATED MODULE: ./src/internal/constants.ts
1125
- var version = "2.0.0-beta.6";
1125
+ var version = "2.0.0-beta.6-dev.22";
1126
1126
  /**
1127
1127
  * @hidden
1128
1128
  * The client version when all SDK APIs started to check platform compatibility for the APIs was 1.6.0.
@@ -3027,18 +3027,49 @@ var app_app;
3027
3027
  Failure: 'appInitialization.failure',
3028
3028
  ExpectedFailure: 'appInitialization.expectedFailure',
3029
3029
  };
3030
+ /**
3031
+ * Describes errors that caused app initialization to fail
3032
+ */
3030
3033
  var FailedReason;
3031
3034
  (function (FailedReason) {
3035
+ /**
3036
+ * Authentication failed
3037
+ */
3032
3038
  FailedReason["AuthFailed"] = "AuthFailed";
3039
+ /**
3040
+ * The application timed out
3041
+ */
3033
3042
  FailedReason["Timeout"] = "Timeout";
3043
+ /**
3044
+ * The app failed for a different reason
3045
+ */
3034
3046
  FailedReason["Other"] = "Other";
3035
3047
  })(FailedReason = app.FailedReason || (app.FailedReason = {}));
3048
+ /**
3049
+ * Describes expected errors that occurred during an otherwise successful
3050
+ * app initialization
3051
+ */
3036
3052
  var ExpectedFailureReason;
3037
3053
  (function (ExpectedFailureReason) {
3054
+ /**
3055
+ * There was a permission error
3056
+ */
3038
3057
  ExpectedFailureReason["PermissionError"] = "PermissionError";
3058
+ /**
3059
+ * The item was not found
3060
+ */
3039
3061
  ExpectedFailureReason["NotFound"] = "NotFound";
3062
+ /**
3063
+ * The network is currently throttled
3064
+ */
3040
3065
  ExpectedFailureReason["Throttling"] = "Throttling";
3066
+ /**
3067
+ * The application is currently offline
3068
+ */
3041
3069
  ExpectedFailureReason["Offline"] = "Offline";
3070
+ /**
3071
+ * The app failed for a different reason
3072
+ */
3042
3073
  ExpectedFailureReason["Other"] = "Other";
3043
3074
  })(ExpectedFailureReason = app.ExpectedFailureReason || (app.ExpectedFailureReason = {}));
3044
3075
  /**
@@ -3050,7 +3081,7 @@ var app_app;
3050
3081
  }
3051
3082
  app.isInitialized = isInitialized;
3052
3083
  /**
3053
- * Gets the Frame Context that the App is running in. {@see FrameContexts} for the list of possible values.
3084
+ * Gets the Frame Context that the App is running in. See {@link FrameContexts} for the list of possible values.
3054
3085
  * @returns the Frame Context.
3055
3086
  */
3056
3087
  function getFrameContext() {
@@ -3198,7 +3229,7 @@ var app_app;
3198
3229
  /**
3199
3230
  * Retrieves the current context the frame is running in.
3200
3231
  *
3201
- * @returns Promise that will resolve with the {@link Context} object.
3232
+ * @returns Promise that will resolve with the {@link app.Context} object.
3202
3233
  */
3203
3234
  function getContext() {
3204
3235
  return new Promise(function (resolve) {
@@ -3225,6 +3256,9 @@ var app_app;
3225
3256
  app.notifySuccess = notifySuccess;
3226
3257
  /**
3227
3258
  * Notifies the frame that app initialization has failed and to show an error page in its place.
3259
+ *
3260
+ * @param appInitializationFailedRequest - The failure request containing the reason for why the app failed
3261
+ * during initialization as well as an optional message.
3228
3262
  */
3229
3263
  function notifyFailure(appInitializationFailedRequest) {
3230
3264
  ensureInitialized();
@@ -3236,6 +3270,8 @@ var app_app;
3236
3270
  app.notifyFailure = notifyFailure;
3237
3271
  /**
3238
3272
  * Notifies the frame that app initialized with some expected errors.
3273
+ *
3274
+ * @param expectedFailureRequest - The expected failure request containing the reason and an optional message
3239
3275
  */
3240
3276
  function notifyExpectedFailure(expectedFailureRequest) {
3241
3277
  ensureInitialized();
@@ -3377,7 +3413,7 @@ function transformLegacyContextToAppContext(legacyContext) {
3377
3413
 
3378
3414
 
3379
3415
  /**
3380
- * Navigation specific part of the SDK.
3416
+ * Navigation-specific part of the SDK.
3381
3417
  *
3382
3418
  * @beta
3383
3419
  */
@@ -3398,6 +3434,7 @@ var pages;
3398
3434
  pages.returnFocus = returnFocus;
3399
3435
  /**
3400
3436
  * @hidden
3437
+ *
3401
3438
  * Registers a handler when focus needs to be passed from teams to the place of choice on app.
3402
3439
  *
3403
3440
  * @param handler - The handler to invoked by the app when they want the focus to be in the place of their choice.
@@ -3412,6 +3449,12 @@ var pages;
3412
3449
  registerHandler('focusEnter', handler);
3413
3450
  }
3414
3451
  pages.registerFocusEnterHandler = registerFocusEnterHandler;
3452
+ /**
3453
+ * Sets/Updates the current frame with new information
3454
+ *
3455
+ * @param frameInfo - Frame information containing the URL used in the iframe on reload and the URL for when the
3456
+ * user clicks 'Go To Website'
3457
+ */
3415
3458
  function setCurrentFrame(frameInfo) {
3416
3459
  ensureInitialized(FrameContexts.content);
3417
3460
  if (!isSupported()) {
@@ -3420,6 +3463,15 @@ var pages;
3420
3463
  sendMessageToParent('setFrameContext', [frameInfo]);
3421
3464
  }
3422
3465
  pages.setCurrentFrame = setCurrentFrame;
3466
+ /**
3467
+ * Initializes the library with context information for the frame
3468
+ *
3469
+ * @param frameInfo - Frame information containing the URL used in the iframe on reload and the URL for when the
3470
+ * user clicks 'Go To Website'
3471
+ * @param callback - An optional user-set callback that is executed once the app has finished initialization.
3472
+ * @param validMessageOrigins - An optional list of cross-frame message origins. They must have
3473
+ * https: protocol otherwise they will be ignored. Example: https:www.example.com
3474
+ */
3423
3475
  function initializeWithFrameContext(frameInfo, callback, validMessageOrigins) {
3424
3476
  app_app.initialize(validMessageOrigins).then(function () { return callback && callback(); });
3425
3477
  setCurrentFrame(frameInfo);
@@ -3514,7 +3566,9 @@ var pages;
3514
3566
  }
3515
3567
  pages.registerFullScreenHandler = registerFullScreenHandler;
3516
3568
  /**
3517
- * Checks if page capability is supported currently
3569
+ * Checks if the current application host supports the pages capability
3570
+ * @returns true if the pages capability is enabled in runtime.supports.pages and
3571
+ * false if it is disabled
3518
3572
  */
3519
3573
  function isSupported() {
3520
3574
  return runtime.supports.pages ? true : false;
@@ -3545,7 +3599,7 @@ var pages;
3545
3599
  * Allows an app to retrieve for this user tabs that are owned by this app.
3546
3600
  * If no TabInstanceParameters are passed, the app defaults to favorite teams and favorite channels.
3547
3601
  * @param tabInstanceParameters OPTIONAL Flags that specify whether to scope call to favorite teams or channels.
3548
- * @returns Promise that resolves with the {@link TabInformation}.
3602
+ * @returns Promise that resolves with the {@link TabInformation}. Contains information for the user's tabs that are owned by this application {@link TabInstance}.
3549
3603
  */
3550
3604
  function getTabInstances(tabInstanceParameters) {
3551
3605
  return new Promise(function (resolve) {
@@ -3559,8 +3613,8 @@ var pages;
3559
3613
  tabs.getTabInstances = getTabInstances;
3560
3614
  /**
3561
3615
  * Allows an app to retrieve the most recently used tabs for this user.
3562
- * @param tabInstanceParameters OPTIONAL Ignored, kept for future use
3563
- * @returns Promise that resolves with the {@link TabInformation}.
3616
+ * @param tabInstanceParameters OPTIONAL Ignored, kept for future use.
3617
+ * @returns Promise that resolves with the {@link TabInformation}. Contains information for the users' most recently used tabs {@link TabInstance}.
3564
3618
  */
3565
3619
  function getMruTabInstances(tabInstanceParameters) {
3566
3620
  return new Promise(function (resolve) {
@@ -3573,7 +3627,9 @@ var pages;
3573
3627
  }
3574
3628
  tabs.getMruTabInstances = getMruTabInstances;
3575
3629
  /**
3576
- * Checks if pages.tabs capability is supported currently
3630
+ * Checks if the current application host supports the pages.tab capability
3631
+ * @returns true if the pages.tabs capability is enabled in runtime.supports.pages.tabs and
3632
+ * false if it is disabled
3577
3633
  */
3578
3634
  function isSupported() {
3579
3635
  return runtime.supports.pages ? (runtime.supports.pages.tabs ? true : false) : false;
@@ -3588,6 +3644,13 @@ var pages;
3588
3644
  (function (config) {
3589
3645
  var saveHandler;
3590
3646
  var removeHandler;
3647
+ /**
3648
+ * @hidden
3649
+ * Hide from docs because this function is only used during initialization
3650
+ * ------------------
3651
+ * Adds register handlers for settings.save and settings.remove upon initialization. Function is called in {@link app.initializeHelper}
3652
+ * @internal
3653
+ */
3591
3654
  function initialize() {
3592
3655
  registerHandler('settings.save', handleSave, false);
3593
3656
  registerHandler('settings.remove', handleRemove, false);
@@ -3665,7 +3728,7 @@ var pages;
3665
3728
  }
3666
3729
  }
3667
3730
  /**
3668
- * Registers a handler for when the user reconfigurated tab
3731
+ * Registers a handler for when the tab configuration is changed by the user
3669
3732
  * @param handler The handler to invoke when the user click on Settings.
3670
3733
  */
3671
3734
  function registerChangeConfigHandler(handler) {
@@ -3738,7 +3801,9 @@ var pages;
3738
3801
  return RemoveEventImpl;
3739
3802
  }());
3740
3803
  /**
3741
- * Checks if pages.config capability is supported currently
3804
+ * Checks if the current application host supports the pages.config capability
3805
+ * @returns true if the pages.config capability is enabled in runtime.supports.pages.config and
3806
+ * false if it is disabled
3742
3807
  */
3743
3808
  function isSupported() {
3744
3809
  return runtime.supports.pages ? (runtime.supports.pages.config ? true : false) : false;
@@ -3793,13 +3858,21 @@ var pages;
3793
3858
  }
3794
3859
  }
3795
3860
  /**
3796
- * Checks if pages.backStack capability is supported currently
3861
+ * Checks if the current application host supports the pages.backStack capability
3862
+ * @returns true if the pages.backStack capability is enabled in runtime.supports.pages.backStack and
3863
+ * false if it is disabled
3797
3864
  */
3798
3865
  function isSupported() {
3799
3866
  return runtime.supports.pages ? (runtime.supports.pages.backStack ? true : false) : false;
3800
3867
  }
3801
3868
  backStack.isSupported = isSupported;
3802
3869
  })(backStack = pages.backStack || (pages.backStack = {}));
3870
+ /**
3871
+ * @hidden
3872
+ * Hide from docs
3873
+ * ------
3874
+ * Namespace to interact with the full-trust part of the SDK. Limited to 1P apps
3875
+ */
3803
3876
  var fullTrust;
3804
3877
  (function (fullTrust) {
3805
3878
  /**
@@ -3831,7 +3904,12 @@ var pages;
3831
3904
  }
3832
3905
  fullTrust.exitFullscreen = exitFullscreen;
3833
3906
  /**
3834
- * Checks if pages.fullTrust capability is supported currently
3907
+ * @hidden
3908
+ * Hide from docs
3909
+ * ------
3910
+ * Checks if the current application host supports the pages.fullTrust capability
3911
+ * @returns true if the pages.fullTrust capability is enabled in runtime.supports.pages.fullTrust and
3912
+ * false if it is disabled
3835
3913
  */
3836
3914
  function isSupported() {
3837
3915
  return runtime.supports.pages ? (runtime.supports.pages.fullTrust ? true : false) : false;
@@ -3884,6 +3962,8 @@ var pages;
3884
3962
  appButton.onHoverLeave = onHoverLeave;
3885
3963
  /**
3886
3964
  * Checks if pages.appButton capability is supported currently
3965
+ * @returns true if the pages.appButton capability is enabled in runtime.supports.pages.appButton and
3966
+ * false if it is disabled
3887
3967
  */
3888
3968
  function isSupported() {
3889
3969
  return runtime.supports.pages ? (runtime.supports.pages.appButton ? true : false) : false;
@@ -6301,6 +6381,7 @@ var appInitialization;
6301
6381
  /**
6302
6382
  * @deprecated
6303
6383
  * As of 2.0.0-beta.1, please use {@link app.notifyAppLoaded app.notifyAppLoaded(): void} instead.
6384
+ *
6304
6385
  * Notifies the frame that app has loaded and to hide the loading indicator if one is shown.
6305
6386
  */
6306
6387
  function notifyAppLoaded() {
@@ -6310,6 +6391,7 @@ var appInitialization;
6310
6391
  /**
6311
6392
  * @deprecated
6312
6393
  * As of 2.0.0-beta.1, please use {@link app.notifySuccess app.notifySuccess(): void} instead.
6394
+ *
6313
6395
  * Notifies the frame that app initialization is successful and is ready for user interaction.
6314
6396
  */
6315
6397
  function notifySuccess() {
@@ -6319,7 +6401,10 @@ var appInitialization;
6319
6401
  /**
6320
6402
  * @deprecated
6321
6403
  * As of 2.0.0-beta.1, please use {@link app.notifyFailure app.notifyFailure(appInitializationFailedRequest: IFailedRequest): void} instead.
6404
+ *
6322
6405
  * Notifies the frame that app initialization has failed and to show an error page in its place.
6406
+ * @param appInitializationFailedRequest - The failure request containing the reason for why the app failed
6407
+ * during initialization as well as an optional message.
6323
6408
  */
6324
6409
  function notifyFailure(appInitializationFailedRequest) {
6325
6410
  app_app.notifyFailure(appInitializationFailedRequest);
@@ -6328,7 +6413,9 @@ var appInitialization;
6328
6413
  /**
6329
6414
  * @deprecated
6330
6415
  * As of 2.0.0-beta.1, please use {@link app.notifyExpectedFailure app.notifyExpectedFailure(expectedFailureRequest: IExpectedFailureRequest): void} instead.
6416
+ *
6331
6417
  * Notifies the frame that app initialized with some expected errors.
6418
+ * @param expectedFailureRequest - The expected failure request containing the reason and an optional message
6332
6419
  */
6333
6420
  function notifyExpectedFailure(expectedFailureRequest) {
6334
6421
  app_app.notifyExpectedFailure(expectedFailureRequest);