@microsoft/teams-js 2.2.1-beta.0 → 2.3.0-beta.2

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.
@@ -1111,6 +1111,7 @@ __webpack_require__.d(__webpack_exports__, {
1111
1111
  "registerUserSettingsChangeHandler": () => (/* reexport */ registerUserSettingsChangeHandler),
1112
1112
  "remoteCamera": () => (/* reexport */ remoteCamera),
1113
1113
  "returnFocus": () => (/* reexport */ returnFocus),
1114
+ "search": () => (/* reexport */ search),
1114
1115
  "sendCustomEvent": () => (/* reexport */ sendCustomEvent),
1115
1116
  "sendCustomMessage": () => (/* reexport */ sendCustomMessage),
1116
1117
  "setFrameContext": () => (/* reexport */ setFrameContext),
@@ -1123,11 +1124,12 @@ __webpack_require__.d(__webpack_exports__, {
1123
1124
  "teamsCore": () => (/* reexport */ teamsCore),
1124
1125
  "uploadCustomApp": () => (/* reexport */ uploadCustomApp),
1125
1126
  "video": () => (/* reexport */ video),
1127
+ "videoEx": () => (/* reexport */ videoEx),
1126
1128
  "webStorage": () => (/* reexport */ webStorage)
1127
1129
  });
1128
1130
 
1129
1131
  ;// CONCATENATED MODULE: ./src/internal/constants.ts
1130
- var version = "2.2.1-beta.0";
1132
+ var version = "2.3.0-beta.2";
1131
1133
  /**
1132
1134
  * @hidden
1133
1135
  * The client version when all SDK APIs started to check platform compatibility for the APIs was 1.6.0.
@@ -2346,6 +2348,7 @@ var runtime = {
2346
2348
  permissions: undefined,
2347
2349
  profile: undefined,
2348
2350
  remoteCamera: undefined,
2351
+ search: undefined,
2349
2352
  sharing: undefined,
2350
2353
  stageView: undefined,
2351
2354
  teams: {
@@ -2946,13 +2949,31 @@ var teamsCore;
2946
2949
  * @internal
2947
2950
  */
2948
2951
  function registerOnLoadHandler(handler) {
2952
+ registerOnLoadHandlerHelper(handler, function () {
2953
+ if (!isSupported()) {
2954
+ throw errorNotSupportedOnPlatform;
2955
+ }
2956
+ });
2957
+ }
2958
+ teamsCore.registerOnLoadHandler = registerOnLoadHandler;
2959
+ /**
2960
+ * @hidden
2961
+ * Undocumented helper function with shared code between deprecated version and current version of the registerOnLoadHandler API.
2962
+ *
2963
+ * @internal
2964
+ * Limited to Microsoft-internal use
2965
+ *
2966
+ * @param handler - The handler to invoke when the page is loaded.
2967
+ * @param versionSpecificHelper - The helper function containing logic pertaining to a specific version of the API.
2968
+ */
2969
+ function registerOnLoadHandlerHelper(handler, versionSpecificHelper) {
2949
2970
  ensureInitialized();
2950
- if (!isSupported()) {
2951
- throw errorNotSupportedOnPlatform;
2971
+ if (versionSpecificHelper) {
2972
+ versionSpecificHelper();
2952
2973
  }
2953
2974
  handlers_registerOnLoadHandler(handler);
2954
2975
  }
2955
- teamsCore.registerOnLoadHandler = registerOnLoadHandler;
2976
+ teamsCore.registerOnLoadHandlerHelper = registerOnLoadHandlerHelper;
2956
2977
  /**
2957
2978
  * @hidden
2958
2979
  * Registers a handler to be called before the page is unloaded.
@@ -2963,13 +2984,32 @@ var teamsCore;
2963
2984
  * @internal
2964
2985
  */
2965
2986
  function registerBeforeUnloadHandler(handler) {
2987
+ registerBeforeUnloadHandlerHelper(handler, function () {
2988
+ if (!isSupported()) {
2989
+ throw errorNotSupportedOnPlatform;
2990
+ }
2991
+ });
2992
+ }
2993
+ teamsCore.registerBeforeUnloadHandler = registerBeforeUnloadHandler;
2994
+ /**
2995
+ * @hidden
2996
+ * Undocumented helper function with shared code between deprecated version and current version of the registerBeforeUnloadHandler API.
2997
+ *
2998
+ * @internal
2999
+ * Limited to Microsoft-internal use
3000
+ *
3001
+ * @param handler - - The handler to invoke before the page is unloaded. If this handler returns true the page should
3002
+ * invoke the readyToUnload function provided to it once it's ready to be unloaded.
3003
+ * @param versionSpecificHelper - The helper function containing logic pertaining to a specific version of the API.
3004
+ */
3005
+ function registerBeforeUnloadHandlerHelper(handler, versionSpecificHelper) {
2966
3006
  ensureInitialized();
2967
- if (!isSupported()) {
2968
- throw errorNotSupportedOnPlatform;
3007
+ if (versionSpecificHelper) {
3008
+ versionSpecificHelper();
2969
3009
  }
2970
3010
  handlers_registerBeforeUnloadHandler(handler);
2971
3011
  }
2972
- teamsCore.registerBeforeUnloadHandler = registerBeforeUnloadHandler;
3012
+ teamsCore.registerBeforeUnloadHandlerHelper = registerBeforeUnloadHandlerHelper;
2973
3013
  /**
2974
3014
  * Checks if teamsCore capability is supported by the host
2975
3015
  * @returns true if the teamsCore capability is enabled in runtime.supports.teamsCore and
@@ -3435,6 +3475,24 @@ var pages;
3435
3475
  registerHandler('focusEnter', handler);
3436
3476
  }
3437
3477
  pages.registerFocusEnterHandler = registerFocusEnterHandler;
3478
+ /**
3479
+ * @hidden
3480
+ * Undocumented helper function with shared code between deprecated version and current version of the registerFocusEnterHandler API.
3481
+ *
3482
+ * @internal
3483
+ * Limited to Microsoft-internal use
3484
+ *
3485
+ * @param handler - The handler for placing focus within the application.
3486
+ * @param versionSpecificHelper - The helper function containing logic pertaining to a specific version of the API.
3487
+ */
3488
+ function registerFocusEnterHandlerHelper(handler, versionSpecificHelper) {
3489
+ ensureInitialized();
3490
+ if (versionSpecificHelper) {
3491
+ versionSpecificHelper();
3492
+ }
3493
+ registerHandler('focusEnter', handler);
3494
+ }
3495
+ pages.registerFocusEnterHandlerHelper = registerFocusEnterHandlerHelper;
3438
3496
  /**
3439
3497
  * Sets/Updates the current frame with new information
3440
3498
  *
@@ -3551,6 +3609,24 @@ var pages;
3551
3609
  registerHandler('fullScreenChange', handler);
3552
3610
  }
3553
3611
  pages.registerFullScreenHandler = registerFullScreenHandler;
3612
+ /**
3613
+ * @hidden
3614
+ * Undocumented helper function with shared code between deprecated version and current version of the registerFullScreenHandler API.
3615
+ *
3616
+ * @internal
3617
+ * Limited to Microsoft-internal use
3618
+ *
3619
+ * @param handler - The handler to invoke when the user toggles full-screen view for a tab.
3620
+ * @param versionSpecificHelper - The helper function containing logic pertaining to a specific version of the API.
3621
+ */
3622
+ function registerFullScreenHandlerHelper(handler, versionSpecificHelper) {
3623
+ ensureInitialized();
3624
+ if (versionSpecificHelper) {
3625
+ versionSpecificHelper();
3626
+ }
3627
+ registerHandler('fullScreenChange', handler);
3628
+ }
3629
+ pages.registerFullScreenHandlerHelper = registerFullScreenHandlerHelper;
3554
3630
  /**
3555
3631
  * Checks if the pages capability is supported by the host
3556
3632
  * @returns true if the pages capability is enabled in runtime.supports.pages and
@@ -3681,14 +3757,32 @@ var pages;
3681
3757
  * @param handler - The handler to invoke when the user selects the Save button.
3682
3758
  */
3683
3759
  function registerOnSaveHandler(handler) {
3760
+ registerOnSaveHandlerHelper(handler, function () {
3761
+ if (!isSupported()) {
3762
+ throw errorNotSupportedOnPlatform;
3763
+ }
3764
+ });
3765
+ }
3766
+ config.registerOnSaveHandler = registerOnSaveHandler;
3767
+ /**
3768
+ * @hidden
3769
+ * Undocumented helper function with shared code between deprecated version and current version of the registerOnSaveHandler API.
3770
+ *
3771
+ * @internal
3772
+ * Limited to Microsoft-internal use
3773
+ *
3774
+ * @param handler - The handler to invoke when the user selects the Save button.
3775
+ * @param versionSpecificHelper - The helper function containing logic pertaining to a specific version of the API.
3776
+ */
3777
+ function registerOnSaveHandlerHelper(handler, versionSpecificHelper) {
3684
3778
  ensureInitialized(FrameContexts.settings);
3685
- if (!isSupported()) {
3686
- throw errorNotSupportedOnPlatform;
3779
+ if (versionSpecificHelper) {
3780
+ versionSpecificHelper();
3687
3781
  }
3688
3782
  saveHandler = handler;
3689
3783
  handler && sendMessageToParent('registerHandler', ['save']);
3690
3784
  }
3691
- config.registerOnSaveHandler = registerOnSaveHandler;
3785
+ config.registerOnSaveHandlerHelper = registerOnSaveHandlerHelper;
3692
3786
  /**
3693
3787
  * Registers a handler for user attempts to remove content. This handler should be used
3694
3788
  * to remove the underlying resource powering the content.
@@ -3697,14 +3791,32 @@ var pages;
3697
3791
  * @param handler - The handler to invoke when the user selects the Remove button.
3698
3792
  */
3699
3793
  function registerOnRemoveHandler(handler) {
3794
+ registerOnRemoveHandlerHelper(handler, function () {
3795
+ if (!isSupported()) {
3796
+ throw errorNotSupportedOnPlatform;
3797
+ }
3798
+ });
3799
+ }
3800
+ config.registerOnRemoveHandler = registerOnRemoveHandler;
3801
+ /**
3802
+ * @hidden
3803
+ * Undocumented helper function with shared code between deprecated version and current version of the registerOnRemoveHandler API.
3804
+ *
3805
+ * @internal
3806
+ * Limited to Microsoft-internal use
3807
+ *
3808
+ * @param handler - The handler to invoke when the user selects the Remove button.
3809
+ * @param versionSpecificHelper - The helper function containing logic pertaining to a specific version of the API.
3810
+ */
3811
+ function registerOnRemoveHandlerHelper(handler, versionSpecificHelper) {
3700
3812
  ensureInitialized(FrameContexts.remove, FrameContexts.settings);
3701
- if (!isSupported()) {
3702
- throw errorNotSupportedOnPlatform;
3813
+ if (versionSpecificHelper) {
3814
+ versionSpecificHelper();
3703
3815
  }
3704
3816
  removeHandler = handler;
3705
3817
  handler && sendMessageToParent('registerHandler', ['remove']);
3706
3818
  }
3707
- config.registerOnRemoveHandler = registerOnRemoveHandler;
3819
+ config.registerOnRemoveHandlerHelper = registerOnRemoveHandlerHelper;
3708
3820
  function handleSave(result) {
3709
3821
  var saveEvent = new SaveEventImpl(result);
3710
3822
  if (saveHandler) {
@@ -3720,13 +3832,31 @@ var pages;
3720
3832
  * @param handler - The handler to invoke when the user clicks on Settings.
3721
3833
  */
3722
3834
  function registerChangeConfigHandler(handler) {
3835
+ registerChangeConfigHandlerHelper(handler, function () {
3836
+ if (!isSupported()) {
3837
+ throw errorNotSupportedOnPlatform;
3838
+ }
3839
+ });
3840
+ }
3841
+ config.registerChangeConfigHandler = registerChangeConfigHandler;
3842
+ /**
3843
+ * @hidden
3844
+ * Undocumented helper function with shared code between deprecated version and current version of the registerConfigChangeHandler API.
3845
+ *
3846
+ * @internal
3847
+ * Limited to Microsoft-internal use
3848
+ *
3849
+ * @param handler - The handler to invoke when the user clicks on Settings.
3850
+ * @param versionSpecificHelper - The helper function containing logic pertaining to a specific version of the API.
3851
+ */
3852
+ function registerChangeConfigHandlerHelper(handler, versionSpecificHelper) {
3723
3853
  ensureInitialized(FrameContexts.content);
3724
- if (!isSupported()) {
3725
- throw errorNotSupportedOnPlatform;
3854
+ if (versionSpecificHelper) {
3855
+ versionSpecificHelper();
3726
3856
  }
3727
3857
  registerHandler('changeSettings', handler);
3728
3858
  }
3729
- config.registerChangeConfigHandler = registerChangeConfigHandler;
3859
+ config.registerChangeConfigHandlerHelper = registerChangeConfigHandlerHelper;
3730
3860
  /**
3731
3861
  * @hidden
3732
3862
  * Hide from docs, since this class is not directly used.
@@ -3831,14 +3961,32 @@ var pages;
3831
3961
  * @param handler - The handler to invoke when the user presses the host client's back button.
3832
3962
  */
3833
3963
  function registerBackButtonHandler(handler) {
3964
+ registerBackButtonHandlerHelper(handler, function () {
3965
+ if (!isSupported()) {
3966
+ throw errorNotSupportedOnPlatform;
3967
+ }
3968
+ });
3969
+ }
3970
+ backStack.registerBackButtonHandler = registerBackButtonHandler;
3971
+ /**
3972
+ * @hidden
3973
+ * Undocumented helper function with shared code between deprecated version and current version of the registerBackButtonHandler API.
3974
+ *
3975
+ * @internal
3976
+ * Limited to Microsoft-internal use
3977
+ *
3978
+ * @param handler - The handler to invoke when the user presses the host client's back button.
3979
+ * @param versionSpecificHelper - The helper function containing logic pertaining to a specific version of the API.
3980
+ */
3981
+ function registerBackButtonHandlerHelper(handler, versionSpecificHelper) {
3834
3982
  ensureInitialized();
3835
- if (!isSupported()) {
3836
- throw errorNotSupportedOnPlatform;
3983
+ if (versionSpecificHelper) {
3984
+ versionSpecificHelper();
3837
3985
  }
3838
3986
  backButtonPressHandler = handler;
3839
3987
  handler && sendMessageToParent('registerHandler', ['backButton']);
3840
3988
  }
3841
- backStack.registerBackButtonHandler = registerBackButtonHandler;
3989
+ backStack.registerBackButtonHandlerHelper = registerBackButtonHandlerHelper;
3842
3990
  function handleBackButtonPress() {
3843
3991
  if (!backButtonPressHandler || !backButtonPressHandler()) {
3844
3992
  navigateBack();
@@ -3914,39 +4062,93 @@ var pages;
3914
4062
  * @param handler - The handler to invoke when the personal app button is clicked in the app bar.
3915
4063
  */
3916
4064
  function onClick(handler) {
4065
+ onClickHelper(handler, function () {
4066
+ if (!isSupported()) {
4067
+ throw errorNotSupportedOnPlatform;
4068
+ }
4069
+ });
4070
+ }
4071
+ appButton.onClick = onClick;
4072
+ /**
4073
+ * @hidden
4074
+ * Undocumented helper function with shared code between deprecated version and current version of the onClick API.
4075
+ *
4076
+ * @internal
4077
+ * Limited to Microsoft-internal use
4078
+ *
4079
+ * @param handler - The handler to invoke when the personal app button is clicked in the app bar.
4080
+ * @param versionSpecificHelper - The helper function containing logic pertaining to a specific version of the API.
4081
+ */
4082
+ function onClickHelper(handler, versionSpecificHelper) {
3917
4083
  ensureInitialized(FrameContexts.content);
3918
- if (!isSupported()) {
3919
- throw errorNotSupportedOnPlatform;
4084
+ if (versionSpecificHelper) {
4085
+ versionSpecificHelper();
3920
4086
  }
3921
4087
  registerHandler('appButtonClick', handler);
3922
4088
  }
3923
- appButton.onClick = onClick;
4089
+ appButton.onClickHelper = onClickHelper;
3924
4090
  /**
3925
4091
  * Registers a handler for entering hover of the app button.
3926
4092
  * Only one handler can be registered at a time. A subsequent registration replaces an existing registration.
3927
4093
  * @param handler - The handler to invoke when entering hover of the personal app button in the app bar.
3928
4094
  */
3929
4095
  function onHoverEnter(handler) {
4096
+ onHoverEnterHelper(handler, function () {
4097
+ if (!isSupported()) {
4098
+ throw errorNotSupportedOnPlatform;
4099
+ }
4100
+ });
4101
+ }
4102
+ appButton.onHoverEnter = onHoverEnter;
4103
+ /**
4104
+ * @hidden
4105
+ * Undocumented helper function with shared code between deprecated version and current version of the onHoverEnter API.
4106
+ *
4107
+ * @internal
4108
+ * Limited to Microsoft-internal use
4109
+ *
4110
+ * @param handler - The handler to invoke when entering hover of the personal app button in the app bar.
4111
+ * @param versionSpecificHelper - The helper function containing logic pertaining to a specific version of the API.
4112
+ */
4113
+ function onHoverEnterHelper(handler, versionSpecificHelper) {
3930
4114
  ensureInitialized(FrameContexts.content);
3931
- if (!isSupported()) {
3932
- throw errorNotSupportedOnPlatform;
4115
+ if (versionSpecificHelper) {
4116
+ versionSpecificHelper();
3933
4117
  }
3934
4118
  registerHandler('appButtonHoverEnter', handler);
3935
4119
  }
3936
- appButton.onHoverEnter = onHoverEnter;
4120
+ appButton.onHoverEnterHelper = onHoverEnterHelper;
3937
4121
  /**
3938
4122
  * Registers a handler for exiting hover of the app button.
3939
4123
  * Only one handler can be registered at a time. A subsequent registration replaces an existing registration.
3940
4124
  * @param handler - The handler to invoke when exiting hover of the personal app button in the app bar.
3941
4125
  */
3942
4126
  function onHoverLeave(handler) {
4127
+ onHoverLeaveHelper(handler, function () {
4128
+ if (!isSupported()) {
4129
+ throw errorNotSupportedOnPlatform;
4130
+ }
4131
+ });
4132
+ }
4133
+ appButton.onHoverLeave = onHoverLeave;
4134
+ /**
4135
+ * @hidden
4136
+ * Undocumented helper function with shared code between deprecated version and current version of the onHoverLeave API.
4137
+ *
4138
+ * @internal
4139
+ * Limited to Microsoft-internal use
4140
+ *
4141
+ * @param handler - The handler to invoke when existing hover of the personal app button in the app bar.
4142
+ * @param versionSpecificHelper - The helper function containing logic pertaining to a specific version of the API.
4143
+ */
4144
+ function onHoverLeaveHelper(handler, versionSpecificHelper) {
3943
4145
  ensureInitialized(FrameContexts.content);
3944
- if (!isSupported()) {
3945
- throw errorNotSupportedOnPlatform;
4146
+ if (versionSpecificHelper) {
4147
+ versionSpecificHelper();
3946
4148
  }
3947
4149
  registerHandler('appButtonHoverLeave', handler);
3948
4150
  }
3949
- appButton.onHoverLeave = onHoverLeave;
4151
+ appButton.onHoverLeaveHelper = onHoverLeaveHelper;
3950
4152
  /**
3951
4153
  * Checks if pages.appButton capability is supported by the host
3952
4154
  * @returns true if the pages.appButton capability is enabled in runtime.supports.pages.appButton and
@@ -6799,11 +7001,11 @@ var video;
6799
7001
  var EffectChangeType;
6800
7002
  (function (EffectChangeType) {
6801
7003
  /**
6802
- * current video effect changed
7004
+ * Current video effect changed
6803
7005
  */
6804
7006
  EffectChangeType[EffectChangeType["EffectChanged"] = 0] = "EffectChanged";
6805
7007
  /**
6806
- * disable the video effect
7008
+ * Disable the video effect
6807
7009
  */
6808
7010
  EffectChangeType[EffectChangeType["EffectDisabled"] = 1] = "EffectDisabled";
6809
7011
  })(EffectChangeType = video.EffectChangeType || (video.EffectChangeType = {}));
@@ -6819,16 +7021,19 @@ var video;
6819
7021
  throw errorNotSupportedOnPlatform;
6820
7022
  }
6821
7023
  registerHandler('video.newVideoFrame', function (videoFrame) {
6822
- if (videoFrame !== undefined) {
6823
- frameCallback(videoFrame, notifyVideoFrameProcessed, notifyError);
7024
+ if (videoFrame) {
7025
+ var timestamp_1 = videoFrame.timestamp;
7026
+ frameCallback(videoFrame, function () {
7027
+ notifyVideoFrameProcessed(timestamp_1);
7028
+ }, notifyError);
6824
7029
  }
6825
- });
7030
+ }, false);
6826
7031
  sendMessageToParent('video.registerForVideoFrame', [config]);
6827
7032
  }
6828
7033
  video.registerForVideoFrame = registerForVideoFrame;
6829
7034
  /**
6830
- * Video extension should call this to notify host client that the current selected effect parameter changed.
6831
- * If it's pre-meeting, host client will call videoEffectCallback immediately then use the videoEffect.
7035
+ * Video extension should call this to notify host that the current selected effect parameter changed.
7036
+ * If it's pre-meeting, host will call videoEffectCallback immediately then use the videoEffect.
6832
7037
  * If it's the in-meeting scenario, we will call videoEffectCallback when apply button clicked.
6833
7038
  * @beta
6834
7039
  * @param effectChangeType - the effect change type.
@@ -6843,7 +7048,7 @@ var video;
6843
7048
  }
6844
7049
  video.notifySelectedVideoEffectChanged = notifySelectedVideoEffectChanged;
6845
7050
  /**
6846
- * Register the video effect callback, host client uses this to notify the video extension the new video effect will by applied
7051
+ * Register the video effect callback, host uses this to notify the video extension the new video effect will by applied
6847
7052
  * @beta
6848
7053
  * @param callback - The VideoEffectCallback to invoke when registerForVideoEffect has completed
6849
7054
  */
@@ -6852,19 +7057,20 @@ var video;
6852
7057
  if (!isSupported()) {
6853
7058
  throw errorNotSupportedOnPlatform;
6854
7059
  }
6855
- registerHandler('video.effectParameterChange', callback);
7060
+ registerHandler('video.effectParameterChange', callback, false);
7061
+ sendMessageToParent('video.registerForVideoEffect');
6856
7062
  }
6857
7063
  video.registerForVideoEffect = registerForVideoEffect;
6858
7064
  /**
6859
- * Sending notification to host client finished the video frame processing, now host client can render this video frame
7065
+ * Sending notification to host finished the video frame processing, now host can render this video frame
6860
7066
  * or pass the video frame to next one in video pipeline
6861
7067
  * @beta
6862
7068
  */
6863
- function notifyVideoFrameProcessed() {
6864
- sendMessageToParent('video.videoFrameProcessed');
7069
+ function notifyVideoFrameProcessed(timestamp) {
7070
+ sendMessageToParent('video.videoFrameProcessed', [timestamp]);
6865
7071
  }
6866
7072
  /**
6867
- * Sending error notification to host client
7073
+ * Sending error notification to host
6868
7074
  * @beta
6869
7075
  * @param errorMessage - The error message that will be sent to the host
6870
7076
  */
@@ -6883,6 +7089,111 @@ var video;
6883
7089
  video.isSupported = isSupported;
6884
7090
  })(video || (video = {})); //end of video namespace
6885
7091
 
7092
+ ;// CONCATENATED MODULE: ./src/public/search.ts
7093
+
7094
+
7095
+
7096
+
7097
+
7098
+ /**
7099
+ * Allows your application to interact with the host M365 application's search box.
7100
+ * By integrating your application with the host's search box, users can search
7101
+ * your app using the same search box they use elsewhere in Teams, Outlook, or Office.
7102
+ *
7103
+ * This functionality is in Beta.
7104
+ * @beta
7105
+ */
7106
+ var search;
7107
+ (function (search) {
7108
+ var onChangeHandlerName = 'search.queryChange';
7109
+ var onClosedHandlerName = 'search.queryClose';
7110
+ var onExecutedHandlerName = 'search.queryExecute';
7111
+ /**
7112
+ * Allows the caller to register for various events fired by the host search experience.
7113
+ * Calling this function indicates that your application intends to plug into the host's search box and handle search events,
7114
+ * when the user is actively using your page/tab.
7115
+ *
7116
+ * The host may visually update its search box, e.g. with the name or icon of your application.
7117
+ *
7118
+ * Your application should *not* re-render inside of these callbacks, there may be a large number
7119
+ * of onChangeHandler calls if the user is typing rapidly in the search box.
7120
+ *
7121
+ * @param onChangeHandler - This optional handler will be called when the user first starts using the
7122
+ * host's search box and as the user types their query. Can be used to put your application into a
7123
+ * word-wheeling state or to display suggestions as the user is typing.
7124
+ *
7125
+ * This handler will be called with an empty {@link SearchQuery.searchTerm} when search is beginning, and subsequently,
7126
+ * with the current contents of the search box.
7127
+ *
7128
+ * @param onClosedHandler - This handler will be called when the user exits or cancels their search.
7129
+ * Should be used to return your application to its most recent, non-search state. The value of {@link SearchQuery.searchTerm}
7130
+ * will be whatever the last query was before ending search.
7131
+ *
7132
+ * @param onExecuteHandler - The handler will be called when the user executes their
7133
+ * search (by pressing Enter for example). Should be used to display the full list of search results.
7134
+ * The value of {@link SearchQuery.searchTerm} is the complete query the user entered in the search box.
7135
+ *
7136
+ * @example
7137
+ * ``` ts
7138
+ * search.registerHandlers(
7139
+ query => {
7140
+ console.log(`Update your application with the changed search query: ${query.searchTerm}`);
7141
+ },
7142
+ query => {
7143
+ console.log('Update your application to handle the search experience being closed. Last query: ${query.searchTerm}');
7144
+ },
7145
+ query => {
7146
+ console.log(`Update your application to handle an executed search result: ${query.searchTerm}`);
7147
+ },
7148
+ );
7149
+ * ```
7150
+ *
7151
+ * @beta
7152
+ */
7153
+ function registerHandlers(onClosedHandler, onExecuteHandler, onChangeHandler) {
7154
+ ensureInitialized(FrameContexts.content);
7155
+ if (!isSupported()) {
7156
+ throw errorNotSupportedOnPlatform;
7157
+ }
7158
+ registerHandler(onClosedHandlerName, onClosedHandler);
7159
+ registerHandler(onExecutedHandlerName, onExecuteHandler);
7160
+ if (onChangeHandler) {
7161
+ registerHandler(onChangeHandlerName, onChangeHandler);
7162
+ }
7163
+ }
7164
+ search.registerHandlers = registerHandlers;
7165
+ /**
7166
+ * Allows the caller to unregister for all events fired by the host search experience. Calling
7167
+ * this function will cause your app to stop appearing in the set of search scopes in the hosts
7168
+ *
7169
+ * @beta
7170
+ */
7171
+ function unregisterHandlers() {
7172
+ ensureInitialized(FrameContexts.content);
7173
+ if (!isSupported()) {
7174
+ throw errorNotSupportedOnPlatform;
7175
+ }
7176
+ // This should let the host know to stop making the app scope show up in the search experience
7177
+ // Can also be used to clean up handlers on the host if desired
7178
+ sendMessageToParent('search.unregister');
7179
+ removeHandler(onChangeHandlerName);
7180
+ removeHandler(onClosedHandlerName);
7181
+ removeHandler(onExecutedHandlerName);
7182
+ }
7183
+ search.unregisterHandlers = unregisterHandlers;
7184
+ /**
7185
+ * Checks if search capability is supported by the host
7186
+ * @returns true if the search capability is supported by the host and false otherwise
7187
+ * false if it is disabled
7188
+ *
7189
+ * @beta
7190
+ */
7191
+ function isSupported() {
7192
+ return runtime.supports.search ? true : false;
7193
+ }
7194
+ search.isSupported = isSupported;
7195
+ })(search || (search = {}));
7196
+
6886
7197
  ;// CONCATENATED MODULE: ./src/public/sharing.ts
6887
7198
 
6888
7199
 
@@ -7277,7 +7588,7 @@ function registerOnThemeChangeHandler(handler) {
7277
7588
  * @param handler - The handler to invoke when the user toggles full-screen view for a tab.
7278
7589
  */
7279
7590
  function registerFullScreenHandler(handler) {
7280
- pages.registerFullScreenHandler(handler);
7591
+ pages.registerFullScreenHandlerHelper(handler);
7281
7592
  }
7282
7593
  /**
7283
7594
  * @deprecated
@@ -7289,7 +7600,7 @@ function registerFullScreenHandler(handler) {
7289
7600
  * @param handler - The handler to invoke when the personal app button is clicked in the app bar.
7290
7601
  */
7291
7602
  function registerAppButtonClickHandler(handler) {
7292
- pages.appButton.onClick(handler);
7603
+ pages.appButton.onClickHelper(handler);
7293
7604
  }
7294
7605
  /**
7295
7606
  * @deprecated
@@ -7301,7 +7612,7 @@ function registerAppButtonClickHandler(handler) {
7301
7612
  * @param handler - The handler to invoke when entering hover of the personal app button in the app bar.
7302
7613
  */
7303
7614
  function registerAppButtonHoverEnterHandler(handler) {
7304
- pages.appButton.onHoverEnter(handler);
7615
+ pages.appButton.onHoverEnterHelper(handler);
7305
7616
  }
7306
7617
  /**
7307
7618
  * @deprecated
@@ -7313,7 +7624,7 @@ function registerAppButtonHoverEnterHandler(handler) {
7313
7624
  *
7314
7625
  */
7315
7626
  function registerAppButtonHoverLeaveHandler(handler) {
7316
- pages.appButton.onHoverLeave(handler);
7627
+ pages.appButton.onHoverLeaveHelper(handler);
7317
7628
  }
7318
7629
  /**
7319
7630
  * @deprecated
@@ -7327,7 +7638,7 @@ function registerAppButtonHoverLeaveHandler(handler) {
7327
7638
  * @param handler - The handler to invoke when the user presses their Team client's back button.
7328
7639
  */
7329
7640
  function registerBackButtonHandler(handler) {
7330
- pages.backStack.registerBackButtonHandler(handler);
7641
+ pages.backStack.registerBackButtonHandlerHelper(handler);
7331
7642
  }
7332
7643
  /**
7333
7644
  * @deprecated
@@ -7339,7 +7650,7 @@ function registerBackButtonHandler(handler) {
7339
7650
  * @param handler - The handler to invoke when the page is loaded.
7340
7651
  */
7341
7652
  function registerOnLoadHandler(handler) {
7342
- teamsCore.registerOnLoadHandler(handler);
7653
+ teamsCore.registerOnLoadHandlerHelper(handler);
7343
7654
  }
7344
7655
  /**
7345
7656
  * @deprecated
@@ -7352,7 +7663,7 @@ function registerOnLoadHandler(handler) {
7352
7663
  * invoke the readyToUnload function provided to it once it's ready to be unloaded.
7353
7664
  */
7354
7665
  function registerBeforeUnloadHandler(handler) {
7355
- teamsCore.registerBeforeUnloadHandler(handler);
7666
+ teamsCore.registerBeforeUnloadHandlerHelper(handler);
7356
7667
  }
7357
7668
  /**
7358
7669
  * @deprecated
@@ -7364,7 +7675,7 @@ function registerBeforeUnloadHandler(handler) {
7364
7675
  * @param handler - The handler to invoked by the app when they want the focus to be in the place of their choice.
7365
7676
  */
7366
7677
  function registerFocusEnterHandler(handler) {
7367
- pages.registerFocusEnterHandler(handler);
7678
+ pages.registerFocusEnterHandlerHelper(handler);
7368
7679
  }
7369
7680
  /**
7370
7681
  * @deprecated
@@ -7375,7 +7686,7 @@ function registerFocusEnterHandler(handler) {
7375
7686
  * @param handler - The handler to invoke when the user click on Settings.
7376
7687
  */
7377
7688
  function registerChangeSettingsHandler(handler) {
7378
- pages.config.registerChangeConfigHandler(handler);
7689
+ pages.config.registerChangeConfigHandlerHelper(handler);
7379
7690
  }
7380
7691
  /**
7381
7692
  * @deprecated
@@ -7707,7 +8018,7 @@ var settings;
7707
8018
  * @param handler - The handler to invoke when the user selects the save button.
7708
8019
  */
7709
8020
  function registerOnSaveHandler(handler) {
7710
- pages.config.registerOnSaveHandler(handler);
8021
+ pages.config.registerOnSaveHandlerHelper(handler);
7711
8022
  }
7712
8023
  settings.registerOnSaveHandler = registerOnSaveHandler;
7713
8024
  /**
@@ -7722,7 +8033,7 @@ var settings;
7722
8033
  * @param handler - The handler to invoke when the user selects the remove button.
7723
8034
  */
7724
8035
  function registerOnRemoveHandler(handler) {
7725
- pages.config.registerOnRemoveHandler(handler);
8036
+ pages.config.registerOnRemoveHandlerHelper(handler);
7726
8037
  }
7727
8038
  settings.registerOnRemoveHandler = registerOnRemoveHandler;
7728
8039
  })(settings || (settings = {}));
@@ -7895,6 +8206,7 @@ var tasks;
7895
8206
 
7896
8207
 
7897
8208
 
8209
+
7898
8210
 
7899
8211
 
7900
8212
 
@@ -9107,6 +9419,145 @@ var teams;
9107
9419
  })(fullTrust = teams.fullTrust || (teams.fullTrust = {}));
9108
9420
  })(teams || (teams = {}));
9109
9421
 
9422
+ ;// CONCATENATED MODULE: ./src/private/videoEx.ts
9423
+
9424
+
9425
+
9426
+
9427
+
9428
+ /**
9429
+ * @hidden
9430
+ * Extended video API
9431
+ * @beta
9432
+ *
9433
+ * @internal
9434
+ * Limited to Microsoft-internal use
9435
+ */
9436
+ var videoEx;
9437
+ (function (videoEx) {
9438
+ /**
9439
+ * @hidden
9440
+ * Register to process video frames
9441
+ * @beta
9442
+ *
9443
+ * @param frameCallback - The callback to invoke when registerForVideoFrame has completed
9444
+ * @param config - VideoFrameConfig to customize generated video frame parameters
9445
+ *
9446
+ * @internal
9447
+ * Limited to Microsoft-internal use
9448
+ */
9449
+ function registerForVideoFrame(frameCallback, config) {
9450
+ ensureInitialized(FrameContexts.sidePanel);
9451
+ if (!isSupported()) {
9452
+ throw errorNotSupportedOnPlatform;
9453
+ }
9454
+ registerHandler('video.newVideoFrame', function (videoFrame) {
9455
+ if (videoFrame) {
9456
+ var timestamp_1 = videoFrame.timestamp;
9457
+ frameCallback(videoFrame, function () {
9458
+ notifyVideoFrameProcessed(timestamp_1);
9459
+ }, notifyError);
9460
+ }
9461
+ }, false);
9462
+ sendMessageToParent('video.registerForVideoFrame', [config]);
9463
+ }
9464
+ videoEx.registerForVideoFrame = registerForVideoFrame;
9465
+ /**
9466
+ * @hidden
9467
+ * Video extension should call this to notify host that the current selected effect parameter changed.
9468
+ * If it's pre-meeting, host will call videoEffectCallback immediately then use the videoEffect.
9469
+ * If it's the in-meeting scenario, we will call videoEffectCallback when apply button clicked.
9470
+ * @beta
9471
+ * @param effectChangeType - the effect change type.
9472
+ * @param effectId - Newly selected effect id. {@linkcode VideoEffectCallBack}
9473
+ * @param effectParam Variant for the newly selected effect. {@linkcode VideoEffectCallBack}
9474
+ *
9475
+ * @internal
9476
+ * Limited to Microsoft-internal use
9477
+ */
9478
+ function notifySelectedVideoEffectChanged(effectChangeType, effectId, effectParam) {
9479
+ ensureInitialized(FrameContexts.sidePanel);
9480
+ if (!isSupported()) {
9481
+ throw errorNotSupportedOnPlatform;
9482
+ }
9483
+ sendMessageToParent('video.videoEffectChanged', [effectChangeType, effectId, effectParam]);
9484
+ }
9485
+ videoEx.notifySelectedVideoEffectChanged = notifySelectedVideoEffectChanged;
9486
+ /**
9487
+ * @hidden
9488
+ * Register the video effect callback, host uses this to notify the video extension the new video effect will by applied
9489
+ * @beta
9490
+ * @param callback - The VideoEffectCallback to invoke when registerForVideoEffect has completed
9491
+ *
9492
+ * @internal
9493
+ * Limited to Microsoft-internal use
9494
+ */
9495
+ function registerForVideoEffect(callback) {
9496
+ ensureInitialized(FrameContexts.sidePanel);
9497
+ if (!isSupported()) {
9498
+ throw errorNotSupportedOnPlatform;
9499
+ }
9500
+ registerHandler('video.effectParameterChange', callback, false);
9501
+ sendMessageToParent('video.registerForVideoEffect');
9502
+ }
9503
+ videoEx.registerForVideoEffect = registerForVideoEffect;
9504
+ /**
9505
+ * @hidden
9506
+ * Send personalized effects to Teams client
9507
+ * @beta
9508
+ *
9509
+ * @internal
9510
+ * Limited to Microsoft-internal use
9511
+ */
9512
+ function updatePersonalizedEffects(effects) {
9513
+ ensureInitialized(FrameContexts.sidePanel);
9514
+ if (!video.isSupported()) {
9515
+ throw errorNotSupportedOnPlatform;
9516
+ }
9517
+ sendMessageToParent('video.personalizedEffectsChanged', [effects]);
9518
+ }
9519
+ videoEx.updatePersonalizedEffects = updatePersonalizedEffects;
9520
+ /**
9521
+ * @hidden
9522
+ * Checks if video capability is supported by the host
9523
+ * @beta
9524
+ *
9525
+ * @returns true if the video capability is enabled in runtime.supports.video and
9526
+ * false if it is disabled
9527
+ *
9528
+ * @internal
9529
+ * Limited to Microsoft-internal use
9530
+ */
9531
+ function isSupported() {
9532
+ return video.isSupported();
9533
+ }
9534
+ videoEx.isSupported = isSupported;
9535
+ /**
9536
+ * @hidden
9537
+ * Sending notification to host finished the video frame processing, now host can render this video frame
9538
+ * or pass the video frame to next one in video pipeline
9539
+ * @beta
9540
+ *
9541
+ * @internal
9542
+ * Limited to Microsoft-internal use
9543
+ */
9544
+ function notifyVideoFrameProcessed(timestamp) {
9545
+ sendMessageToParent('video.videoFrameProcessed', [timestamp]);
9546
+ }
9547
+ /**
9548
+ * @hidden
9549
+ * Sending error notification to host
9550
+ * @beta
9551
+ * @param errorMessage - The error message that will be sent to the host
9552
+ *
9553
+ * @internal
9554
+ * Limited to Microsoft-internal use
9555
+ */
9556
+ function notifyError(errorMessage) {
9557
+ sendMessageToParent('video.notifyError', [errorMessage]);
9558
+ }
9559
+ })(videoEx || (videoEx = {}));
9560
+
9110
9561
  ;// CONCATENATED MODULE: ./src/private/index.ts
9111
9562
 
9112
9563
 
@@ -9118,6 +9569,7 @@ var teams;
9118
9569
 
9119
9570
 
9120
9571
 
9572
+
9121
9573
 
9122
9574
  ;// CONCATENATED MODULE: ./src/index.ts
9123
9575