@azure/communication-react 1.5.1-alpha-202304140012 → 1.5.1-alpha-202304150013

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.
Files changed (34) hide show
  1. package/dist/communication-react.d.ts +69 -0
  2. package/dist/dist-cjs/communication-react/index.js +24 -13
  3. package/dist/dist-cjs/communication-react/index.js.map +1 -1
  4. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js +1 -1
  5. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js.map +1 -1
  6. package/dist/dist-esm/calling-component-bindings/src/handlers/createHandlers.js +3 -1
  7. package/dist/dist-esm/calling-component-bindings/src/handlers/createHandlers.js.map +1 -1
  8. package/dist/dist-esm/communication-react/src/index.d.ts +1 -0
  9. package/dist/dist-esm/communication-react/src/index.js.map +1 -1
  10. package/dist/dist-esm/react-components/src/components/AtMentionFlyout.d.ts +91 -0
  11. package/dist/dist-esm/react-components/src/components/AtMentionFlyout.js +58 -0
  12. package/dist/dist-esm/react-components/src/components/AtMentionFlyout.js.map +1 -0
  13. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponent.d.ts +6 -0
  14. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponent.js.map +1 -1
  15. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsMessageBubble.d.ts +6 -0
  16. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsMessageBubble.js.map +1 -1
  17. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.d.ts +2 -0
  18. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.js.map +1 -1
  19. package/dist/dist-esm/react-components/src/components/InputBoxComponent.d.ts +2 -0
  20. package/dist/dist-esm/react-components/src/components/InputBoxComponent.js.map +1 -1
  21. package/dist/dist-esm/react-components/src/components/MessageThread.d.ts +6 -0
  22. package/dist/dist-esm/react-components/src/components/MessageThread.js.map +1 -1
  23. package/dist/dist-esm/react-components/src/components/SendBox.d.ts +6 -0
  24. package/dist/dist-esm/react-components/src/components/SendBox.js.map +1 -1
  25. package/dist/dist-esm/react-components/src/components/index.d.ts +2 -0
  26. package/dist/dist-esm/react-components/src/components/index.js +2 -0
  27. package/dist/dist-esm/react-components/src/components/index.js.map +1 -1
  28. package/dist/dist-esm/react-components/src/components/styles/AtMentionFlyout.style.d.ts +31 -0
  29. package/dist/dist-esm/react-components/src/components/styles/AtMentionFlyout.style.js +72 -0
  30. package/dist/dist-esm/react-components/src/components/styles/AtMentionFlyout.style.js.map +1 -0
  31. package/dist/dist-esm/react-components/src/identifiers/IdentifierProvider.d.ts +4 -0
  32. package/dist/dist-esm/react-components/src/identifiers/IdentifierProvider.js +5 -1
  33. package/dist/dist-esm/react-components/src/identifiers/IdentifierProvider.js.map +1 -1
  34. package/package.json +8 -8
@@ -217,6 +217,61 @@ export declare type AreParamEqual<A extends (props: any) => JSX.Element | undefi
217
217
  */
218
218
  export declare type AreTypeEqual<A, B> = A extends B ? (B extends A ? true : false) : false;
219
219
 
220
+ /**
221
+ * Options to display suggestions in the at mention scenario.
222
+ *
223
+ * @beta
224
+ */
225
+ export declare interface AtMentionDisplayOptions {
226
+ /**
227
+ * Optional callback to override render of an mention in a message thread.
228
+ */
229
+ onRenderAtMentionSuggestion?: (suggestion: AtMentionSuggestion) => JSX.Element;
230
+ }
231
+
232
+ /**
233
+ * Options to lookup suggestions in the at mention scenario.
234
+ *
235
+ * @beta
236
+ */
237
+ export declare interface AtMentionLookupOptions {
238
+ /**
239
+ * Optional string to set trigger keyword for mention a specific participant.
240
+ *
241
+ * @defaultValue `@`
242
+ */
243
+ trigger?: string;
244
+ /**
245
+ * Optional callback to fetch a list of at mention suggestions base on the query.
246
+ */
247
+ onQueryUpdated?: (query: string) => Promise<AtMentionSuggestion[]>;
248
+ /**
249
+ * Optional callback to render an item of the atMention suggestions list.
250
+ */
251
+ onRenderSuggestionItem?: (suggestion: AtMentionSuggestion, onSuggestionSelected?: (suggestion: AtMentionSuggestion) => void) => JSX.Element;
252
+ }
253
+
254
+ /**
255
+ * Options to lookup suggestions and display mentions in the at mention scenario.
256
+ *
257
+ * @beta
258
+ */
259
+ export declare type AtMentionOptions = AtMentionLookupOptions & AtMentionDisplayOptions;
260
+
261
+ /**
262
+ * At mention suggestion's state, as reflected in the UI.
263
+ *
264
+ * @beta
265
+ */
266
+ export declare interface AtMentionSuggestion {
267
+ /** User ID of a mentioned participant or 'everyone' for an @everyone suggestion */
268
+ userId: string;
269
+ /** Type of an at mention suggestion */
270
+ suggestionType: string;
271
+ /** Display name of a mentioned participant */
272
+ displayName: string;
273
+ }
274
+
220
275
  /**
221
276
  * @beta
222
277
  */
@@ -5857,6 +5912,10 @@ export declare interface _Identifiers {
5857
5912
  verticalGalleryVideoTile: string;
5858
5913
  /** `data-ui-id` value for `VerticalGallery` Component's page counter */
5859
5914
  verticalGalleryPageCounter: string;
5915
+ /** `data-ui-id` value for `AtMentionFlyout` Component's suggestion list */
5916
+ atMentionSuggestionList: string;
5917
+ /** `data-ui-id` value for `AtMentionFlyout` Component's suggestion list item */
5918
+ atMentionSuggestionItem: string;
5860
5919
  }
5861
5920
 
5862
5921
  /**
@@ -6430,6 +6489,11 @@ export declare type MessageThreadProps = {
6430
6489
  * @beta
6431
6490
  */
6432
6491
  onDisplayDateTimeString?: (messageDate: Date) => string;
6492
+ /**
6493
+ * Optional props needed to lookup suggestions and display mentions in the at mention scenario.
6494
+ * @beta
6495
+ */
6496
+ atMentionOptions?: AtMentionOptions;
6433
6497
  };
6434
6498
 
6435
6499
  /**
@@ -7429,6 +7493,11 @@ export declare interface SendBoxProps {
7429
7493
  * Optional callback called when message is sent
7430
7494
  */
7431
7495
  onSendMessage?: (content: string) => Promise<void>;
7496
+ /**
7497
+ * Optional props needed to lookup suggestions in the at mention scenario.
7498
+ * @beta
7499
+ */
7500
+ atMentionLookupOptions?: AtMentionLookupOptions;
7432
7501
  /**
7433
7502
  * Optional callback called when user is typing
7434
7503
  */
@@ -162,7 +162,7 @@ const _toCommunicationIdentifier = (id) => {
162
162
  // Copyright (c) Microsoft Corporation.
163
163
  // Licensed under the MIT license.
164
164
  // GENERATED FILE. DO NOT EDIT MANUALLY.
165
- var telemetryVersion = '1.5.1-alpha-202304140012';
165
+ var telemetryVersion = '1.5.1-alpha-202304150013';
166
166
 
167
167
  // Copyright (c) Microsoft Corporation.
168
168
  /**
@@ -455,13 +455,6 @@ const memoizedUpdateDisplayName = memoizeFnAll((participantId, participant) => {
455
455
  const isTeamsCallParticipants = (participants) => {
456
456
  return participants.every((p) => !communicationCommon.isCommunicationUserIdentifier(p));
457
457
  };
458
- /**
459
- * @private
460
- * A type guard to ensure all participants are acceptable type for ACS call
461
- */
462
- const isACSCallParticipants = (participants) => {
463
- return participants.every((p) => !communicationCommon.isMicrosoftTeamsUserIdentifier(p));
464
- };
465
458
  /**
466
459
  * @private
467
460
  * Checks whether the user is a 'Ringing' PSTN user.
@@ -867,10 +860,8 @@ const createDefaultCallingHandlers = memoizeOne__default['default']((callClient,
867
860
  return Object.assign(Object.assign({}, createDefaultCommonCallingHandlers(callClient, deviceManager, call)), {
868
861
  // FIXME: onStartCall API should use string, not the underlying SDK types.
869
862
  onStartCall: (participants, options) => {
870
- if (!isACSCallParticipants(participants)) {
871
- throw new Error('TeamsUserIdentifier in Teams call is not supported!');
872
- }
873
- return callAgent ? callAgent.startCall(participants, options) : undefined;
863
+ /* @conditional-compile-remove(teams-adhoc-call) */
864
+ return callAgent === null || callAgent === void 0 ? void 0 : callAgent.startCall(participants, options);
874
865
  },
875
866
  /* @conditional-compile-remove(PSTN-calls) */
876
867
  onAddParticipant: (userId, options) => __awaiter$D(void 0, void 0, void 0, function* () {
@@ -4330,7 +4321,11 @@ const defaultIdentifiers = {
4330
4321
  verticalGalleryVideoTile: 'vertical-gallery-video-tile',
4331
4322
  horizontalGalleryVideoTile: 'horizontal-gallery-video-tile',
4332
4323
  /* @conditional-compile-remove(vertical-gallery) */
4333
- verticalGalleryPageCounter: 'vertical-gallery-page-counter'
4324
+ verticalGalleryPageCounter: 'vertical-gallery-page-counter',
4325
+ /* @conditional-compile-remove(at-mention) */
4326
+ atMentionSuggestionList: 'at-mention-suggestion-list',
4327
+ /* @conditional-compile-remove(at-mention) */
4328
+ atMentionSuggestionItem: 'at-mention-suggestion-item'
4334
4329
  };
4335
4330
  /**
4336
4331
  * @private
@@ -5982,6 +5977,22 @@ const activeFileUploadsTrampoline = (props) => {
5982
5977
  return props.activeFileUploads;
5983
5978
  };
5984
5979
 
5980
+ // Copyright (c) Microsoft Corporation.
5981
+ /**
5982
+ * @private
5983
+ */
5984
+ react.mergeStyles({
5985
+ height: '100%',
5986
+ overflowY: 'auto',
5987
+ overflowX: 'hidden'
5988
+ });
5989
+ /**
5990
+ * @private
5991
+ */
5992
+ react.mergeStyles({
5993
+ padding: '0.25rem 0rem 0'
5994
+ });
5995
+
5985
5996
  // Copyright (c) Microsoft Corporation.
5986
5997
  /** @private */
5987
5998
  const MESSAGE_STATUS_INDICATOR_SIZE_REM = 1;