@azure/communication-react 1.5.1-alpha-202306010016 → 1.5.1-alpha-202306020014

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 (19) hide show
  1. package/dist/communication-react.d.ts +21 -1
  2. package/dist/dist-cjs/communication-react/index.js +79 -14
  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/react-components/src/components/ChatMessage/MentionRenderer.js +1 -1
  7. package/dist/dist-esm/react-components/src/components/ChatMessage/MentionRenderer.js.map +1 -1
  8. package/dist/dist-esm/react-components/src/components/InputBoxComponent.js +6 -10
  9. package/dist/dist-esm/react-components/src/components/InputBoxComponent.js.map +1 -1
  10. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.d.ts +5 -1
  11. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js +71 -2
  12. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js.map +1 -1
  13. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.d.ts +19 -0
  14. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.js.map +1 -1
  15. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/index.d.ts +1 -0
  16. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/index.js.map +1 -1
  17. package/dist/dist-esm/react-composites/src/composites/CallComposite/index.d.ts +1 -0
  18. package/dist/dist-esm/react-composites/src/composites/CallComposite/index.js.map +1 -1
  19. package/package.json +8 -8
@@ -2,5 +2,5 @@
2
2
  // Copyright (c) Microsoft Corporation.
3
3
  // Licensed under the MIT license.
4
4
  // GENERATED FILE. DO NOT EDIT MANUALLY.
5
- module.exports = '1.5.1-alpha-202306010016';
5
+ module.exports = '1.5.1-alpha-202306020014';
6
6
  //# sourceMappingURL=telemetryVersion.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"telemetryVersion.js","sourceRoot":"","sources":["../../../../../acs-ui-common/src/telemetryVersion.js"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;AAElC,wCAAwC;AAExC,MAAM,CAAC,OAAO,GAAG,0BAA0B,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n// GENERATED FILE. DO NOT EDIT MANUALLY.\n\nmodule.exports = '1.5.1-alpha-202306010016';\n"]}
1
+ {"version":3,"file":"telemetryVersion.js","sourceRoot":"","sources":["../../../../../acs-ui-common/src/telemetryVersion.js"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;AAElC,wCAAwC;AAExC,MAAM,CAAC,OAAO,GAAG,0BAA0B,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n// GENERATED FILE. DO NOT EDIT MANUALLY.\n\nmodule.exports = '1.5.1-alpha-202306020014';\n"]}
@@ -10,6 +10,6 @@ import React from 'react';
10
10
  export const defaultOnMentionRender = (mention) => {
11
11
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
12
12
  const MsftMention = 'msft-mention';
13
- return (React.createElement(MsftMention, { id: mention.id, displayText: mention.displayText }, mention.displayText));
13
+ return React.createElement(MsftMention, { id: mention.id }, mention.displayText);
14
14
  };
15
15
  //# sourceMappingURL=MentionRenderer.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"MentionRenderer.js","sourceRoot":"","sources":["../../../../../../../react-components/src/components/ChatMessage/MentionRenderer.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B;;;;;GAKG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,OAAgB,EAAe,EAAE;IACtE,8DAA8D;IAC9D,MAAM,WAAW,GAAG,cAAqB,CAAC;IAC1C,OAAO,CACL,oBAAC,WAAW,IAAC,EAAE,EAAE,OAAO,CAAC,EAAE,EAAE,WAAW,EAAE,OAAO,CAAC,WAAW,IAC1D,OAAO,CAAC,WAAW,CACR,CACf,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport React from 'react';\nimport { Mention } from '../MentionPopover';\n\n/**\n * Provides the default implementation for rendering an Mention in a message thread\n * @param mention - The mention to render\n *\n * @private\n */\nexport const defaultOnMentionRender = (mention: Mention): JSX.Element => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const MsftMention = 'msft-mention' as any;\n return (\n <MsftMention id={mention.id} displayText={mention.displayText}>\n {mention.displayText}\n </MsftMention>\n );\n};\n"]}
1
+ {"version":3,"file":"MentionRenderer.js","sourceRoot":"","sources":["../../../../../../../react-components/src/components/ChatMessage/MentionRenderer.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B;;;;;GAKG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,OAAgB,EAAe,EAAE;IACtE,8DAA8D;IAC9D,MAAM,WAAW,GAAG,cAAqB,CAAC;IAC1C,OAAO,oBAAC,WAAW,IAAC,EAAE,EAAE,OAAO,CAAC,EAAE,IAAG,OAAO,CAAC,WAAW,CAAe,CAAC;AAC1E,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport React from 'react';\nimport { Mention } from '../MentionPopover';\n\n/**\n * Provides the default implementation for rendering an Mention in a message thread\n * @param mention - The mention to render\n *\n * @private\n */\nexport const defaultOnMentionRender = (mention: Mention): JSX.Element => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const MsftMention = 'msft-mention' as any;\n return <MsftMention id={mention.id}>{mention.displayText}</MsftMention>;\n};\n"]}
@@ -256,12 +256,6 @@ export const InputBoxComponent = (props) => {
256
256
  updateMentionSuggestions(suggestions);
257
257
  }), 500);
258
258
  /* @conditional-compile-remove(mention) */
259
- useEffect(() => {
260
- return () => {
261
- debouncedQueryUpdate.cancel();
262
- };
263
- }, [debouncedQueryUpdate]);
264
- /* @conditional-compile-remove(mention) */
265
259
  // Update selections index in mention to navigate by words
266
260
  const updateSelectionIndexesWithMentionIfNeeded = useCallback((event, inputTextValue, selectionStartValue, selectionEndValue, tagsValue) => {
267
261
  var _a, _b, _c;
@@ -386,6 +380,7 @@ export const InputBoxComponent = (props) => {
386
380
  /* @conditional-compile-remove(mention) */
387
381
  const handleOnChange = useCallback((event, tagsValue, htmlTextValue, inputTextValue, currentTriggerStartIndex, previousSelectionStart, previousSelectionEnd, currentSelectionStart, currentSelectionEnd, updatedValue) => __awaiter(void 0, void 0, void 0, function* () {
388
382
  var _b;
383
+ debouncedQueryUpdate.cancel();
389
384
  if (event.currentTarget === null) {
390
385
  return;
391
386
  }
@@ -609,8 +604,10 @@ export const InputBoxComponent = (props) => {
609
604
  setCaretIndex(undefined);
610
605
  setSelectionStartValue(null);
611
606
  setSelectionEndValue(null);
612
- // Dismiss the suggestions on blur
613
- setMentionSuggestions([]);
607
+ // Dismiss the suggestions on blur, after enough time to select by mouse if needed
608
+ setTimeout(() => {
609
+ setMentionSuggestions([]);
610
+ }, 200);
614
611
  }, autoComplete: "off", onKeyDown: onTextFieldKeyDown, styles: mergedTextFieldStyle, disabled: disabled, errorMessage: errorMessage, onRenderSuffix: onRenderChildren, elementRef: inputBoxRef }))));
615
612
  };
616
613
  /**
@@ -1250,9 +1247,8 @@ const findStringsDiffIndexes = (props) => {
1250
1247
  */
1251
1248
  const htmlStringForMentionSuggestion = (suggestion, localeStrings) => {
1252
1249
  const idHTML = ' id ="' + suggestion.id + '"';
1253
- const displayTextHTML = ' displayText ="' + suggestion.displayText + '"';
1254
1250
  const displayText = getDisplayNameForMentionSuggestion(suggestion, localeStrings);
1255
- return '<' + MSFT_MENTION_TAG + idHTML + displayTextHTML + '>' + displayText + '</' + MSFT_MENTION_TAG + '>';
1251
+ return '<' + MSFT_MENTION_TAG + idHTML + '>' + displayText + '</' + MSFT_MENTION_TAG + '>';
1256
1252
  };
1257
1253
  /* @conditional-compile-remove(mention) */
1258
1254
  /**