@microsoft/teams-js 2.59.0-beta.0 → 2.60.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.
@@ -1050,6 +1050,7 @@ __webpack_require__.d(__webpack_exports__, {
1050
1050
  initialize: () => (/* reexport */ publicAPIs_initialize),
1051
1051
  initializeWithFrameContext: () => (/* reexport */ publicAPIs_initializeWithFrameContext),
1052
1052
  liveShare: () => (/* reexport */ liveShareHost_namespaceObject),
1053
+ localNetworkAccess: () => (/* reexport */ localNetworkAccess_namespaceObject),
1053
1054
  location: () => (/* reexport */ location_namespaceObject),
1054
1055
  logs: () => (/* reexport */ logs_namespaceObject),
1055
1056
  mail: () => (/* reexport */ mail_namespaceObject),
@@ -1789,8 +1790,10 @@ __webpack_require__.d(chat_namespaceObject, {
1789
1790
  var clipboard_namespaceObject = {};
1790
1791
  __webpack_require__.r(clipboard_namespaceObject);
1791
1792
  __webpack_require__.d(clipboard_namespaceObject, {
1793
+ hasPermission: () => (clipboard_hasPermission),
1792
1794
  isSupported: () => (clipboard_isSupported),
1793
1795
  read: () => (read),
1796
+ requestPermission: () => (clipboard_requestPermission),
1794
1797
  write: () => (write)
1795
1798
  });
1796
1799
 
@@ -1843,6 +1846,15 @@ __webpack_require__.d(location_namespaceObject, {
1843
1846
  showLocation: () => (location_showLocation)
1844
1847
  });
1845
1848
 
1849
+ // NAMESPACE OBJECT: ./src/public/localNetworkAccess.ts
1850
+ var localNetworkAccess_namespaceObject = {};
1851
+ __webpack_require__.r(localNetworkAccess_namespaceObject);
1852
+ __webpack_require__.d(localNetworkAccess_namespaceObject, {
1853
+ hasPermission: () => (localNetworkAccess_hasPermission),
1854
+ isSupported: () => (localNetworkAccess_isSupported),
1855
+ requestPermission: () => (localNetworkAccess_requestPermission)
1856
+ });
1857
+
1846
1858
  // NAMESPACE OBJECT: ./src/public/meeting/appShareButton.ts
1847
1859
  var appShareButton_namespaceObject = {};
1848
1860
  __webpack_require__.r(appShareButton_namespaceObject);
@@ -2226,7 +2238,23 @@ var ErrorCode;
2226
2238
  /** @hidden */
2227
2239
  var DevicePermission;
2228
2240
  (function (DevicePermission) {
2241
+ /**
2242
+ * Permission to read the contents of the system clipboard.
2243
+ *
2244
+ * @remarks
2245
+ * This is the app manifest and TeamsJS wire value. The browser Permissions-Policy
2246
+ * directive uses the separate `clipboard-read` spelling.
2247
+ */
2248
+ DevicePermission["ClipboardRead"] = "clipboardRead";
2229
2249
  DevicePermission["GeoLocation"] = "geolocation";
2250
+ /**
2251
+ * Permission to access devices on the user's local network.
2252
+ *
2253
+ * @remarks
2254
+ * This is the TeamsJS wire value. The browser Permissions-Policy directive uses the separate
2255
+ * `local-network-access` spelling.
2256
+ */
2257
+ DevicePermission["LocalNetworkAccess"] = "localNetworkAccess";
2230
2258
  DevicePermission["Media"] = "media";
2231
2259
  })(DevicePermission || (DevicePermission = {}));
2232
2260
  /**
@@ -2339,7 +2367,7 @@ var ClipboardSupportedMimeType;
2339
2367
  })(ClipboardSupportedMimeType || (ClipboardSupportedMimeType = {}));
2340
2368
 
2341
2369
  ;// ./src/artifactsForCDN/validDomains.json
2342
- const validDomains_namespaceObject = /*#__PURE__*/JSON.parse('{"validOrigins":["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.cdn.office.net","fa000000136.mro1cdnstorage.public.onecdn.static.microsoft","substrate.office.com","copilot-connectors.core.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","cr.m365copilotapp.svc.cloud.microsoft","m365copilotapp.svc.usgovcloud.microsoft","cr.m365copilotapp.svc.usgovcloud.microsoft","dod.m365copilotapp.svc.usgovcloud.microsoft","cr.dod.m365copilotapp.svc.usgovcloud.microsoft","m365copilotapp.svc.cloud.dev.microsoft","ffc-copilot.officeapps.live.com","m365.cloud.dev.microsoft","m365.cloud.dev.microsoft:3001","portal.officeppe.com","ignite.m365.admin.cloud.microsoft","ignite.admin.cloud.microsoft","sdf.m365.admin.cloud.microsoft","admin-sdf.microsoft.com","canary.m365.admin.cloud.microsoft","ring0.m365.admin.cloud.microsoft","admin.microsoft.com","m365.admin.cloud.microsoft","portal.office365.us","portal.apps.mil","www.ohome.apps.mil","www.office365.us"]}');
2370
+ const validDomains_namespaceObject = /*#__PURE__*/JSON.parse('{"validOrigins":["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.cdn.office.net","fa000000136.mro1cdnstorage.public.onecdn.static.microsoft","substrate.office.com","copilot-connectors.core.microsoft","copilotstudio.microsoft.com","copilotstudio.preview.microsoft.com","copilotstudio.preprod.microsoft.com","copilotstudio.test.microsoft.com","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","cr.m365copilotapp.svc.cloud.microsoft","m365copilotapp.svc.usgovcloud.microsoft","cr.m365copilotapp.svc.usgovcloud.microsoft","dod.m365copilotapp.svc.usgovcloud.microsoft","cr.dod.m365copilotapp.svc.usgovcloud.microsoft","m365copilotapp.svc.cloud.dev.microsoft","ffc-copilot.officeapps.live.com","m365.cloud.dev.microsoft","m365.cloud.dev.microsoft:3001","portal.officeppe.com","ignite.m365.admin.cloud.microsoft","ignite.admin.cloud.microsoft","sdf.m365.admin.cloud.microsoft","admin-sdf.microsoft.com","canary.m365.admin.cloud.microsoft","ring0.m365.admin.cloud.microsoft","admin.microsoft.com","m365.admin.cloud.microsoft","portal.office365.us","portal.apps.mil","www.ohome.apps.mil","www.office365.us"]}');
2343
2371
  var artifactsForCDN_validDomains_namespaceObject = /*#__PURE__*/__webpack_require__.t(validDomains_namespaceObject, 2);
2344
2372
  ;// ./src/internal/constants.ts
2345
2373
 
@@ -4708,7 +4736,7 @@ function isSerializable(arg) {
4708
4736
  * @hidden
4709
4737
  * Package version.
4710
4738
  */
4711
- const version = "2.59.0-beta.0";
4739
+ const version = "2.60.0-beta.0";
4712
4740
 
4713
4741
  ;// ./src/public/featureFlags.ts
4714
4742
  // All build feature flags are defined inside this object. Any build feature flag must have its own unique getter and setter function. This pattern allows for client apps to treeshake unused code and avoid including code guarded by this feature flags in the final bundle. If this property isn't desired, use the below runtime feature flags object.
@@ -6076,13 +6104,9 @@ function url_isSupported() {
6076
6104
  * Limited to Microsoft-internal use
6077
6105
  */
6078
6106
  function getDialogInfoFromUrlDialogInfo(urlDialogInfo) {
6079
- const dialogInfo = {
6080
- url: urlDialogInfo.url,
6081
- height: urlDialogInfo.size ? urlDialogInfo.size.height : DialogDimension.Small,
6082
- width: urlDialogInfo.size ? urlDialogInfo.size.width : DialogDimension.Small,
6083
- title: urlDialogInfo.title,
6084
- fallbackUrl: urlDialogInfo.fallbackUrl,
6085
- };
6107
+ const dialogInfo = Object.assign({ url: urlDialogInfo.url, height: urlDialogInfo.size ? urlDialogInfo.size.height : DialogDimension.Small, width: urlDialogInfo.size ? urlDialogInfo.size.width : DialogDimension.Small, title: urlDialogInfo.title, fallbackUrl: urlDialogInfo.fallbackUrl }, (urlDialogInfo.useHeaderlessDialog !== undefined
6108
+ ? { useHeaderlessDialog: urlDialogInfo.useHeaderlessDialog }
6109
+ : {}));
6086
6110
  return dialogInfo;
6087
6111
  }
6088
6112
  /**
@@ -16371,17 +16395,14 @@ function chat_isSupported() {
16371
16395
 
16372
16396
  ;// ./src/public/clipboard.ts
16373
16397
  /**
16374
- * Interact with the system clipboard
16398
+ * Interact with the system clipboard.
16375
16399
  *
16376
- * @deprecated
16377
- * As of TeamsJS v2.54.0, the clipboard capability is deprecated. These APIs may stop working at
16378
- * any time without notice: support for this capability in Teams and other host apps may be removed
16379
- * entirely and independently of a TeamsJS major release, so continued functionality is not
16380
- * guaranteed. The intended long-term replacement is the standardized Clipboard API provided by the
16381
- * browser ({@link https://developer.mozilla.org/docs/Web/API/Clipboard_API | Clipboard API}, `navigator.clipboard`).
16382
- * Note that using the browser-native Clipboard API directly within Teams hosts is not yet fully
16383
- * supported; it depends on native device permission handling that is still being enabled as a
16384
- * separate effort.
16400
+ * @remarks
16401
+ * The host-brokered {@link read}, {@link write}, and {@link isSupported} APIs are deprecated.
16402
+ * For browser-native clipboard reads, use {@link hasPermission} and {@link requestPermission}
16403
+ * before calling `navigator.clipboard.read()` from a user gesture.
16404
+ * The host must advertise `permissions.clipboardRead` in its runtime configuration to support
16405
+ * these permission APIs. The deprecated {@link isSupported} API checks only host-brokered clipboard support.
16385
16406
  *
16386
16407
  * @beta
16387
16408
  * @module
@@ -16416,9 +16437,8 @@ const clipboardTelemetryVersionNumber = "v2" /* ApiVersionNumber.V_2 */;
16416
16437
  * entirely and independently of a TeamsJS major release, so continued functionality is not
16417
16438
  * guaranteed. The intended long-term replacement is the standardized Clipboard API provided by the
16418
16439
  * browser ({@link https://developer.mozilla.org/docs/Web/API/Clipboard_API | Clipboard API}, `navigator.clipboard`).
16419
- * Note that using the browser-native Clipboard API directly within Teams hosts is not yet fully
16420
- * supported; it depends on native device permission handling that is still being enabled as a
16421
- * separate effort.
16440
+ * For browser-native reads, use {@link hasPermission} and {@link requestPermission} before calling
16441
+ * `navigator.clipboard.read()` from a user gesture.
16422
16442
  *
16423
16443
  * @remarks
16424
16444
  * Note: clipboard.write only supports Text, HTML, PNG, and JPEG data format.
@@ -16455,9 +16475,8 @@ function write(blob) {
16455
16475
  * entirely and independently of a TeamsJS major release, so continued functionality is not
16456
16476
  * guaranteed. The intended long-term replacement is the standardized Clipboard API provided by the
16457
16477
  * browser ({@link https://developer.mozilla.org/docs/Web/API/Clipboard_API | Clipboard API}, `navigator.clipboard`).
16458
- * Note that using the browser-native Clipboard API directly within Teams hosts is not yet fully
16459
- * supported; it depends on native device permission handling that is still being enabled as a
16460
- * separate effort.
16478
+ * For browser-native reads, use {@link hasPermission} and {@link requestPermission} before calling
16479
+ * `navigator.clipboard.read()` from a user gesture.
16461
16480
  *
16462
16481
  * @returns A promise blob which resolves to the data read from the clipboard or
16463
16482
  * rejects stating the reason for failure.
@@ -16480,6 +16499,44 @@ function read() {
16480
16499
  }
16481
16500
  });
16482
16501
  }
16502
+ /**
16503
+ * Checks whether the app has permission to read from the system clipboard.
16504
+ *
16505
+ * @returns A promise that resolves to `true` if clipboard-read permission has been granted,
16506
+ * or `false` if permission has not been granted.
16507
+ * @throws {@link errorNotSupportedOnPlatform} if the host does not advertise `permissions.clipboardRead`.
16508
+ *
16509
+ * @beta
16510
+ */
16511
+ function clipboard_hasPermission() {
16512
+ ensureInitialized(runtime, FrameContexts.content, FrameContexts.task);
16513
+ if (!clipboard_isPermissionSupported()) {
16514
+ throw errorNotSupportedOnPlatform;
16515
+ }
16516
+ const permission = DevicePermission.ClipboardRead;
16517
+ return sendAndHandleSdkError(getApiVersionTag(clipboardTelemetryVersionNumber, "clipboard.hasPermission" /* ApiName.Clipboard_HasPermission */), 'permissions.has', permission);
16518
+ }
16519
+ /**
16520
+ * Requests permission to read from the system clipboard.
16521
+ *
16522
+ * @remarks
16523
+ * The host may need to reload the app frame after the permission is first granted before
16524
+ * `navigator.clipboard.read()` is available to the existing frame.
16525
+ *
16526
+ * @returns A promise that resolves to `true` if clipboard-read permission was granted,
16527
+ * or `false` if permission was not granted.
16528
+ * @throws {@link errorNotSupportedOnPlatform} if the host does not advertise `permissions.clipboardRead`.
16529
+ *
16530
+ * @beta
16531
+ */
16532
+ function clipboard_requestPermission() {
16533
+ ensureInitialized(runtime, FrameContexts.content, FrameContexts.task);
16534
+ if (!clipboard_isPermissionSupported()) {
16535
+ throw errorNotSupportedOnPlatform;
16536
+ }
16537
+ const permission = DevicePermission.ClipboardRead;
16538
+ return sendAndHandleSdkError(getApiVersionTag(clipboardTelemetryVersionNumber, "clipboard.requestPermission" /* ApiName.Clipboard_RequestPermission */), 'permissions.request', permission);
16539
+ }
16483
16540
  /**
16484
16541
  * Checks if clipboard capability is supported by the host
16485
16542
  * @returns boolean to represent whether the clipboard capability is supported
@@ -16492,9 +16549,8 @@ function read() {
16492
16549
  * entirely and independently of a TeamsJS major release, so continued functionality is not
16493
16550
  * guaranteed. The intended long-term replacement is the standardized Clipboard API provided by the
16494
16551
  * browser ({@link https://developer.mozilla.org/docs/Web/API/Clipboard_API | Clipboard API}, `navigator.clipboard`).
16495
- * Note that using the browser-native Clipboard API directly within Teams hosts is not yet fully
16496
- * supported; it depends on native device permission handling that is still being enabled as a
16497
- * separate effort.
16552
+ * For browser-native reads, use {@link hasPermission} and {@link requestPermission} before calling
16553
+ * `navigator.clipboard.read()` from a user gesture.
16498
16554
  *
16499
16555
  * @beta
16500
16556
  */
@@ -16506,6 +16562,10 @@ function clipboard_isSupported() {
16506
16562
  return ensureInitialized(runtime) && navigator && navigator.clipboard && runtime.supports.clipboard ? true : false;
16507
16563
  }
16508
16564
  }
16565
+ function clipboard_isPermissionSupported() {
16566
+ var _a;
16567
+ return ensureInitialized(runtime) && !!((_a = runtime.supports.permissions) === null || _a === void 0 ? void 0 : _a.clipboardRead);
16568
+ }
16509
16569
 
16510
16570
  ;// ./src/public/nestedAppAuth.ts
16511
16571
  var nestedAppAuth_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
@@ -17103,6 +17163,72 @@ function location_isSupported() {
17103
17163
  return ensureInitialized(runtime) && runtime.supports.location ? true : false;
17104
17164
  }
17105
17165
 
17166
+ ;// ./src/public/localNetworkAccess.ts
17167
+ /**
17168
+ * APIs for requesting permission to access devices on the user's local network.
17169
+ *
17170
+ * @remarks
17171
+ * The TeamsJS permission value is `localNetworkAccess`. The browser Permissions-Policy directive
17172
+ * uses the separate `local-network-access` spelling.
17173
+ *
17174
+ * @beta
17175
+ * @module
17176
+ */
17177
+
17178
+
17179
+
17180
+
17181
+
17182
+
17183
+ /**
17184
+ * v2 APIs telemetry file: All APIs in this capability file should send API version v2 only.
17185
+ */
17186
+ const localNetworkAccessTelemetryVersionNumber = "v2" /* ApiVersionNumber.V_2 */;
17187
+ /**
17188
+ * Checks whether the app has permission to access devices on the user's local network.
17189
+ *
17190
+ * @returns A promise that resolves to `true` if local network access permission has been granted,
17191
+ * or `false` otherwise.
17192
+ * @throws {@link errorNotSupportedOnPlatform} if the host does not support local network access permission.
17193
+ *
17194
+ * @beta
17195
+ */
17196
+ function localNetworkAccess_hasPermission() {
17197
+ ensureInitialized(runtime, FrameContexts.content, FrameContexts.task);
17198
+ if (!localNetworkAccess_isSupported()) {
17199
+ throw errorNotSupportedOnPlatform;
17200
+ }
17201
+ return sendAndHandleSdkError(getApiVersionTag(localNetworkAccessTelemetryVersionNumber, "localNetworkAccess.hasPermission" /* ApiName.LocalNetworkAccess_HasPermission */), 'permissions.has', DevicePermission.LocalNetworkAccess);
17202
+ }
17203
+ /**
17204
+ * Requests permission to access devices on the user's local network.
17205
+ *
17206
+ * @returns A promise that resolves to `true` if local network access permission was granted,
17207
+ * or `false` otherwise.
17208
+ * @throws {@link errorNotSupportedOnPlatform} if the host does not support local network access permission.
17209
+ *
17210
+ * @beta
17211
+ */
17212
+ function localNetworkAccess_requestPermission() {
17213
+ ensureInitialized(runtime, FrameContexts.content, FrameContexts.task);
17214
+ if (!localNetworkAccess_isSupported()) {
17215
+ throw errorNotSupportedOnPlatform;
17216
+ }
17217
+ return sendAndHandleSdkError(getApiVersionTag(localNetworkAccessTelemetryVersionNumber, "localNetworkAccess.requestPermission" /* ApiName.LocalNetworkAccess_RequestPermission */), 'permissions.request', DevicePermission.LocalNetworkAccess);
17218
+ }
17219
+ /**
17220
+ * Checks whether the host supports local network access permission.
17221
+ *
17222
+ * @returns `true` if the host advertises local network access permission support, or `false` otherwise.
17223
+ * @throws Error if {@linkcode app.initialize} has not successfully completed.
17224
+ *
17225
+ * @beta
17226
+ */
17227
+ function localNetworkAccess_isSupported() {
17228
+ var _a;
17229
+ return ensureInitialized(runtime) && !!((_a = runtime.supports.permissions) === null || _a === void 0 ? void 0 : _a.localNetworkAccess);
17230
+ }
17231
+
17106
17232
  ;// ./src/public/meeting/appShareButton.ts
17107
17233
  /**
17108
17234
  * Module for functions to control behavior of the app share button
@@ -21132,6 +21258,8 @@ const DISABLE_SHORTCUT_FORWARDING_ATTRIBUTE = 'data-disable-shortcuts-forwarding
21132
21258
 
21133
21259
 
21134
21260
 
21261
+
21262
+
21135
21263
 
21136
21264
 
21137
21265