@azure/communication-react 1.19.0-alpha-202407270014 → 1.19.0-alpha-202407310012

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 (103) hide show
  1. package/dist/communication-react.d.ts +68 -5
  2. package/dist/dist-cjs/communication-react/{ChatMessageComponentAsRichTextEditBox-BueeC-ud.js → ChatMessageComponentAsRichTextEditBox-CsHqT8dY.js} +7 -5
  3. package/dist/dist-cjs/communication-react/{ChatMessageComponentAsRichTextEditBox-BueeC-ud.js.map → ChatMessageComponentAsRichTextEditBox-CsHqT8dY.js.map} +1 -1
  4. package/dist/dist-cjs/communication-react/{RichTextSendBoxWrapper-Br441vhG.js → RichTextSendBoxWrapper-TGDmjXvl.js} +2 -2
  5. package/dist/dist-cjs/communication-react/{RichTextSendBoxWrapper-Br441vhG.js.map → RichTextSendBoxWrapper-TGDmjXvl.js.map} +1 -1
  6. package/dist/dist-cjs/communication-react/{index-DznlW8XT.js → index-BBPqvw4B.js} +698 -550
  7. package/dist/dist-cjs/communication-react/index-BBPqvw4B.js.map +1 -0
  8. package/dist/dist-cjs/communication-react/index.js +3 -1
  9. package/dist/dist-cjs/communication-react/index.js.map +1 -1
  10. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js +1 -1
  11. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js.map +1 -1
  12. package/dist/dist-esm/acs-ui-javascript-loaders/src/callCompositeLoader.d.ts +2 -2
  13. package/dist/dist-esm/acs-ui-javascript-loaders/src/callCompositeLoader.js +3 -10
  14. package/dist/dist-esm/acs-ui-javascript-loaders/src/callCompositeLoader.js.map +1 -1
  15. package/dist/dist-esm/acs-ui-javascript-loaders/src/callWithChatCompositeLoader.d.ts +18 -0
  16. package/dist/dist-esm/acs-ui-javascript-loaders/src/callWithChatCompositeLoader.js +43 -0
  17. package/dist/dist-esm/acs-ui-javascript-loaders/src/callWithChatCompositeLoader.js.map +1 -0
  18. package/dist/dist-esm/acs-ui-javascript-loaders/src/chatCompositeLoader.d.ts +18 -0
  19. package/dist/dist-esm/acs-ui-javascript-loaders/src/chatCompositeLoader.js +43 -0
  20. package/dist/dist-esm/acs-ui-javascript-loaders/src/chatCompositeLoader.js.map +1 -0
  21. package/dist/dist-esm/acs-ui-javascript-loaders/src/index.d.ts +4 -0
  22. package/dist/dist-esm/acs-ui-javascript-loaders/src/index.js +2 -0
  23. package/dist/dist-esm/acs-ui-javascript-loaders/src/index.js.map +1 -1
  24. package/dist/dist-esm/acs-ui-javascript-loaders/src/outboundCallCompositeLoader.d.ts +2 -2
  25. package/dist/dist-esm/acs-ui-javascript-loaders/src/outboundCallCompositeLoader.js +3 -10
  26. package/dist/dist-esm/acs-ui-javascript-loaders/src/outboundCallCompositeLoader.js.map +1 -1
  27. package/dist/dist-esm/acs-ui-javascript-loaders/src/utils.d.ts +7 -0
  28. package/dist/dist-esm/acs-ui-javascript-loaders/src/utils.js +17 -0
  29. package/dist/dist-esm/acs-ui-javascript-loaders/src/utils.js.map +1 -0
  30. package/dist/dist-esm/calling-stateful-client/src/BreakoutRoomsSubscriber.d.ts +18 -0
  31. package/dist/dist-esm/calling-stateful-client/src/BreakoutRoomsSubscriber.js +36 -0
  32. package/dist/dist-esm/calling-stateful-client/src/BreakoutRoomsSubscriber.js.map +1 -0
  33. package/dist/dist-esm/calling-stateful-client/src/CallClientState.d.ts +14 -0
  34. package/dist/dist-esm/calling-stateful-client/src/CallClientState.js.map +1 -1
  35. package/dist/dist-esm/calling-stateful-client/src/CallContext.d.ts +3 -0
  36. package/dist/dist-esm/calling-stateful-client/src/CallContext.js +18 -0
  37. package/dist/dist-esm/calling-stateful-client/src/CallContext.js.map +1 -1
  38. package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.d.ts +1 -0
  39. package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js +6 -0
  40. package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js.map +1 -1
  41. package/dist/dist-esm/calling-stateful-client/src/index-public.d.ts +1 -0
  42. package/dist/dist-esm/calling-stateful-client/src/index-public.js.map +1 -1
  43. package/dist/dist-esm/communication-react/src/index.d.ts +2 -2
  44. package/dist/dist-esm/communication-react/src/index.js +1 -1
  45. package/dist/dist-esm/communication-react/src/index.js.map +1 -1
  46. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsRichTextEditBox.js +5 -3
  47. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsRichTextEditBox.js.map +1 -1
  48. package/dist/dist-esm/react-components/src/components/Survey/TagsSurvey/TagsSurvey.js +3 -0
  49. package/dist/dist-esm/react-components/src/components/Survey/TagsSurvey/TagsSurvey.js.map +1 -1
  50. package/dist/dist-esm/react-components/src/components/utils/SendBoxUtils.js +3 -1
  51. package/dist/dist-esm/react-components/src/components/utils/SendBoxUtils.js.map +1 -1
  52. package/dist/dist-esm/react-components/src/localization/locales/ar-SA/strings.json +14 -4
  53. package/dist/dist-esm/react-components/src/localization/locales/cs-CZ/strings.json +14 -4
  54. package/dist/dist-esm/react-components/src/localization/locales/de-DE/strings.json +14 -4
  55. package/dist/dist-esm/react-components/src/localization/locales/en-GB/strings.json +14 -4
  56. package/dist/dist-esm/react-components/src/localization/locales/es-ES/strings.json +14 -4
  57. package/dist/dist-esm/react-components/src/localization/locales/fi-FI/strings.json +13 -3
  58. package/dist/dist-esm/react-components/src/localization/locales/fr-FR/strings.json +14 -4
  59. package/dist/dist-esm/react-components/src/localization/locales/he-IL/strings.json +14 -4
  60. package/dist/dist-esm/react-components/src/localization/locales/it-IT/strings.json +14 -4
  61. package/dist/dist-esm/react-components/src/localization/locales/ja-JP/strings.json +14 -4
  62. package/dist/dist-esm/react-components/src/localization/locales/ko-KR/strings.json +14 -4
  63. package/dist/dist-esm/react-components/src/localization/locales/nb-NO/strings.json +14 -4
  64. package/dist/dist-esm/react-components/src/localization/locales/nl-NL/strings.json +14 -4
  65. package/dist/dist-esm/react-components/src/localization/locales/pl-PL/strings.json +14 -4
  66. package/dist/dist-esm/react-components/src/localization/locales/pt-BR/strings.json +14 -4
  67. package/dist/dist-esm/react-components/src/localization/locales/ru-RU/strings.json +14 -4
  68. package/dist/dist-esm/react-components/src/localization/locales/sv-SE/strings.json +14 -4
  69. package/dist/dist-esm/react-components/src/localization/locales/tr-TR/strings.json +12 -2
  70. package/dist/dist-esm/react-components/src/localization/locales/zh-CN/strings.json +14 -4
  71. package/dist/dist-esm/react-components/src/localization/locales/zh-TW/strings.json +14 -4
  72. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.d.ts +4 -0
  73. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js +11 -1
  74. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js.map +1 -1
  75. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.d.ts +9 -0
  76. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.js.map +1 -1
  77. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.d.ts +3 -0
  78. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js.map +1 -1
  79. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.d.ts +4 -1
  80. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.js.map +1 -1
  81. package/dist/dist-esm/react-composites/src/composites/localization/locales/ar-SA/strings.json +5 -1
  82. package/dist/dist-esm/react-composites/src/composites/localization/locales/cs-CZ/strings.json +5 -1
  83. package/dist/dist-esm/react-composites/src/composites/localization/locales/de-DE/strings.json +5 -1
  84. package/dist/dist-esm/react-composites/src/composites/localization/locales/en-GB/strings.json +5 -1
  85. package/dist/dist-esm/react-composites/src/composites/localization/locales/es-ES/strings.json +5 -1
  86. package/dist/dist-esm/react-composites/src/composites/localization/locales/fi-FI/strings.json +5 -1
  87. package/dist/dist-esm/react-composites/src/composites/localization/locales/fr-FR/strings.json +5 -1
  88. package/dist/dist-esm/react-composites/src/composites/localization/locales/he-IL/strings.json +5 -1
  89. package/dist/dist-esm/react-composites/src/composites/localization/locales/it-IT/strings.json +5 -1
  90. package/dist/dist-esm/react-composites/src/composites/localization/locales/ja-JP/strings.json +5 -1
  91. package/dist/dist-esm/react-composites/src/composites/localization/locales/ko-KR/strings.json +5 -1
  92. package/dist/dist-esm/react-composites/src/composites/localization/locales/nb-NO/strings.json +5 -1
  93. package/dist/dist-esm/react-composites/src/composites/localization/locales/nl-NL/strings.json +5 -1
  94. package/dist/dist-esm/react-composites/src/composites/localization/locales/pl-PL/strings.json +5 -1
  95. package/dist/dist-esm/react-composites/src/composites/localization/locales/pt-BR/strings.json +5 -1
  96. package/dist/dist-esm/react-composites/src/composites/localization/locales/ru-RU/strings.json +5 -1
  97. package/dist/dist-esm/react-composites/src/composites/localization/locales/sv-SE/strings.json +5 -1
  98. package/dist/dist-esm/react-composites/src/composites/localization/locales/tr-TR/strings.json +5 -1
  99. package/dist/dist-esm/react-composites/src/composites/localization/locales/zh-CN/strings.json +5 -1
  100. package/dist/dist-esm/react-composites/src/composites/localization/locales/zh-TW/strings.json +5 -1
  101. package/dist/tsdoc-metadata.json +1 -1
  102. package/package.json +3 -3
  103. package/dist/dist-cjs/communication-react/index-DznlW8XT.js.map +0 -1
@@ -16,8 +16,8 @@
16
16
  */
17
17
  export { fromFlatCommunicationIdentifier, toFlatCommunicationIdentifier } from '../../acs-ui-common/src';
18
18
  export type { AreEqual, CommonProperties, MessageStatus, Common, AreTypeEqual, AreParamEqual } from '../../acs-ui-common/src';
19
- export { loadOutboundCallComposite, loadCallComposite } from '../../acs-ui-javascript-loaders/src';
20
- export type { OutboundCallCompositeLoaderProps, CallCompositeLoaderProps } from '../../acs-ui-javascript-loaders/src';
19
+ export { loadOutboundCallComposite, loadCallComposite, loadChatComposite, loadCallWithChatComposite } from '../../acs-ui-javascript-loaders/src';
20
+ export type { OutboundCallCompositeLoaderProps, CallCompositeLoaderProps, ChatCompositeLoaderProps, CallWithChatCompositeLoaderProps } from '../../acs-ui-javascript-loaders/src';
21
21
  export type { CallClientProviderProps, CallAgentProviderProps, CallProviderProps, GetCallingSelector, CallingHandlers, CallingBaseSelectorProps, CommonCallingHandlers } from '../../calling-component-bindings/src';
22
22
  export type { VideoBackgroundEffectsDependency, CallingHandlersOptions } from '../../calling-component-bindings/src';
23
23
  export type { CaptionsOptions } from '../../calling-component-bindings/src';
@@ -18,7 +18,7 @@
18
18
  */
19
19
  export { fromFlatCommunicationIdentifier, toFlatCommunicationIdentifier } from '../../acs-ui-common/src';
20
20
  /* @conditional-compile-remove(composite-js-helpers) */
21
- export { loadOutboundCallComposite, loadCallComposite } from '../../acs-ui-javascript-loaders/src';
21
+ export { loadOutboundCallComposite, loadCallComposite, loadChatComposite, loadCallWithChatComposite } from '../../acs-ui-javascript-loaders/src';
22
22
  export { CallClientProvider, CallAgentProvider, CallProvider, useCallClient, useCallAgent, useCall, useDeviceManager, getCallingSelector, createDefaultCallingHandlers } from '../../calling-component-bindings/src';
23
23
  /* @conditional-compile-remove(teams-identity-support) */
24
24
  export { useTeamsCallAgent, useTeamsCall, createDefaultTeamsCallingHandlers } from '../../calling-component-bindings/src';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,+BAA+B,EAAE,6BAA6B,EAAE,MAAM,yBAAyB,CAAC;AAUzG,uDAAuD;AACvD,OAAO,EAAE,yBAAyB,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AAgCnG,OAAO,EACL,kBAAkB,EAClB,iBAAiB,EACjB,YAAY,EACZ,aAAa,EACb,YAAY,EACZ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,EACzB,qBAAqB,EACtB,MAAM,4BAA4B,CAAC;AA0IpC,mDAAmD;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAsC7D,mDAAmD;AACnD,OAAO,EAAE,2BAA2B,EAAE,MAAM,4BAA4B,CAAC;AAkBzE,cAAc,iDAAiD,CAAC;AAChE,cAAc,oCAAoC,CAAC;AACnD,cAAc,gDAAgD,CAAC;AAG/D,OAAO,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AAiB1E,cAAc,yCAAyC,CAAC;AACxD,cAAc,eAAe,CAAC;AAE9B,sDAAsD;AACtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAGhE,sDAAsD;AACtD,OAAO,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AAGvE,sDAAsD;AACtD,OAAO,EAAE,0BAA0B,EAAE,MAAM,4BAA4B,CAAC;AAgBxE,gDAAgD;AAChD,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * `@azure/communication-react` is an npm package that exports the functionality of the Azure Communication Services - UI Library.\n *\n * This package makes it easy for you to build modern communications user experiences using Azure Communication Services. It gives you a library of production-ready UI components that you can drop into your applications:\n * - Composites: These components are turn-key solutions that implement common communication scenarios. You can quickly add video calling or chat experiences to your applications. Composites are open-source higher order components built using UI components.\n * - UI Components - These components are open-source building blocks that let you build custom communications experience. Components are offered for both calling and chat capabilities that can be combined to build experiences.\n *\n * These UI client libraries all use Microsoft's Fluent design language and assets. Fluent UI provides a foundational layer for the UI Library and is actively used across Microsoft products.\n *\n * In conjunction with the UI components, the UI Library exposes a stateful client library for calling and chat. This client is agnostic to any specific state management framework and can be integrated with common state managers like Redux or React Context.\n * This stateful client library can be used with the UI Components to pass props and methods for the UI Components to render data. For more information, see Stateful Client Overview.\n *\n * For more information visit: https://aka.ms/acsstorybook\n *\n * @packageDocumentation\n */\n\nexport { fromFlatCommunicationIdentifier, toFlatCommunicationIdentifier } from '../../acs-ui-common/src';\nexport type {\n AreEqual,\n CommonProperties,\n MessageStatus,\n Common,\n AreTypeEqual,\n AreParamEqual\n} from '../../acs-ui-common/src';\n\n/* @conditional-compile-remove(composite-js-helpers) */\nexport { loadOutboundCallComposite, loadCallComposite } from '../../acs-ui-javascript-loaders/src';\n/* @conditional-compile-remove(composite-js-helpers) */\nexport type { OutboundCallCompositeLoaderProps, CallCompositeLoaderProps } from '../../acs-ui-javascript-loaders/src';\n\n// Not to export chat/calling specific hook from binding package\nexport type {\n CallClientProviderProps,\n CallAgentProviderProps,\n CallProviderProps,\n GetCallingSelector,\n CallingHandlers,\n CallingBaseSelectorProps,\n CommonCallingHandlers\n} from '../../calling-component-bindings/src';\n\nexport type { VideoBackgroundEffectsDependency, CallingHandlersOptions } from '../../calling-component-bindings/src';\n\nexport type { CaptionsOptions } from '../../calling-component-bindings/src';\n\nexport type {\n ChatClientProviderProps,\n ChatThreadClientProviderProps,\n GetChatSelector,\n ChatHandlers,\n ChatBaseSelectorProps\n} from '../../chat-component-bindings/src';\n\n/* @conditional-compile-remove(file-sharing-acs) */\nexport type { MessageOptions, ChatMessageType } from '../../acs-ui-common/src';\n/* @conditional-compile-remove(rich-text-editor-image-upload) */\nexport type { UploadChatImageResult } from '../../acs-ui-common/src';\n\nexport {\n CallClientProvider,\n CallAgentProvider,\n CallProvider,\n useCallClient,\n useCallAgent,\n useCall,\n useDeviceManager,\n getCallingSelector,\n createDefaultCallingHandlers\n} from '../../calling-component-bindings/src';\n\n/* @conditional-compile-remove(teams-identity-support) */\nexport {\n useTeamsCallAgent,\n useTeamsCall,\n createDefaultTeamsCallingHandlers\n} from '../../calling-component-bindings/src';\n\n/* @conditional-compile-remove(teams-identity-support) */\nexport type { TeamsCallingHandlers } from '../../calling-component-bindings/src';\n\nexport type {\n ScreenShareButtonSelector,\n CameraButtonSelector,\n VideoGallerySelector,\n DevicesButtonSelector,\n EmptySelector,\n ErrorBarSelector as CallErrorBarSelector,\n ParticipantListSelector,\n MicrophoneButtonSelector,\n ParticipantsButtonSelector,\n CreateDefaultCallingHandlers\n} from '../../calling-component-bindings/src';\n/* @conditional-compile-remove(PSTN-calls) */\nexport type { HoldButtonSelector } from '../../calling-component-bindings/src';\n\nexport type { RaiseHandButtonSelector } from '../../calling-component-bindings/src';\n/* @conditional-compile-remove(notifications) */\nexport type { NotificationStackSelector } from '../../calling-component-bindings/src';\n/* @conditional-compile-remove(one-to-n-calling) */\nexport type { IncomingCallStackSelector } from '../../calling-component-bindings/src';\n\nexport {\n ChatClientProvider,\n ChatThreadClientProvider,\n useChatClient,\n useChatThreadClient,\n getChatSelector,\n createDefaultChatHandlers\n} from '../../chat-component-bindings/src';\n\nexport type {\n MessageThreadSelector,\n TypingIndicatorSelector,\n ChatParticipantListSelector,\n SendBoxSelector,\n ErrorBarSelector as ChatErrorBarSelector\n} from '../../chat-component-bindings/src';\n\nexport {\n _IdentifierProvider,\n CameraButton,\n ControlBar,\n ControlBarButton,\n DevicesButton,\n EndCallButton,\n ErrorBar,\n GridLayout,\n LocalizationProvider,\n MessageStatusIndicator,\n MessageThread,\n MicrophoneButton,\n ParticipantItem,\n ParticipantList,\n ParticipantsButton,\n ScreenShareButton,\n SendBox,\n StreamMedia,\n TypingIndicator,\n VideoGallery,\n VideoTile,\n COMPONENT_LOCALE_EN_GB,\n COMPONENT_LOCALE_AR_SA,\n COMPONENT_LOCALE_CS_CZ,\n COMPONENT_LOCALE_DE_DE,\n COMPONENT_LOCALE_ES_ES,\n COMPONENT_LOCALE_FI_FI,\n COMPONENT_LOCALE_FR_FR,\n COMPONENT_LOCALE_HE_IL,\n COMPONENT_LOCALE_IT_IT,\n COMPONENT_LOCALE_JA_JP,\n COMPONENT_LOCALE_KO_KR,\n COMPONENT_LOCALE_NB_NO,\n COMPONENT_LOCALE_NL_NL,\n COMPONENT_LOCALE_PL_PL,\n COMPONENT_LOCALE_PT_BR,\n COMPONENT_LOCALE_RU_RU,\n COMPONENT_LOCALE_SV_SE,\n COMPONENT_LOCALE_TR_TR,\n COMPONENT_LOCALE_ZH_CN,\n COMPONENT_LOCALE_ZH_TW\n} from '../../react-components/src';\nexport { ImageOverlay } from '../../react-components/src';\n/* @conditional-compile-remove(PSTN-calls) */\nexport { HoldButton } from '../../react-components/src';\n\nexport { RaiseHandButton } from '../../react-components/src';\n\nexport { Dialpad } from '../../react-components/src';\n\n/* @conditional-compile-remove(one-to-n-calling) */\nexport { IncomingCallNotification, IncomingCallStack } from '../../react-components/src';\n/* @conditional-compile-remove(one-to-n-calling) */\nexport type {\n IncomingCallNotificationProps,\n IncomingCallNotificationStrings,\n IncomingCallNotificationStyles,\n IncomingCallStackProps,\n ActiveIncomingCall\n} from '../../react-components/src';\n\n/* @conditional-compile-remove(call-readiness) */\nexport {\n CameraAndMicrophoneSitePermissions,\n MicrophoneSitePermissions,\n CameraSitePermissions\n} from '../../react-components/src';\n/* @conditional-compile-remove(call-readiness) */\nexport type {\n CameraAndMicrophoneSitePermissionsStrings,\n CameraAndMicrophoneSitePermissionsProps,\n CameraSitePermissionsStrings,\n CameraSitePermissionsProps,\n CommonSitePermissionsProps,\n SitePermissionsStrings,\n SitePermissionsStyles,\n MicrophoneSitePermissionsStrings,\n MicrophoneSitePermissionsProps\n} from '../../react-components/src';\n\n/* @conditional-compile-remove(total-participant-count) */\nexport type { ParticipantListStrings } from '../../react-components/src';\n\n/* @conditional-compile-remove(mention) */\nexport type {\n MentionOptions,\n MentionDisplayOptions,\n MentionLookupOptions,\n Mention,\n MentionPopoverStrings\n} from '../../react-components/src';\n\nexport type {\n _IdentifierProviderProps,\n _Identifiers,\n ActiveErrorMessage,\n BaseCustomStyles,\n CallParticipantListParticipant,\n CameraButtonContextualMenuStyles,\n CameraButtonProps,\n CameraButtonStrings,\n CameraButtonStyles,\n ChatMessage,\n CommunicationParticipant,\n ComponentLocale,\n ComponentSlotStyle,\n ComponentStrings,\n ContentSystemMessage,\n ControlBarButtonProps,\n ControlBarButtonStrings,\n ControlBarButtonStyles,\n ControlBarLayout,\n ControlBarProps,\n CreateVideoStreamViewResult,\n CustomAvatarOptions,\n CustomMessage,\n DevicesButtonContextualMenuStyles,\n DevicesButtonProps,\n DevicesButtonStrings,\n DevicesButtonStyles,\n EndCallButtonProps,\n EndCallButtonStrings,\n ErrorBarProps,\n ErrorBarStrings,\n ErrorType,\n GridLayoutProps,\n GridLayoutStyles,\n HorizontalGalleryStyles,\n JumpToNewMessageButtonProps,\n LocalizationProviderProps,\n LocalVideoCameraCycleButtonProps,\n LoadingState,\n Message,\n MessageAttachedStatus,\n MessageCommon,\n MessageContentType,\n MessageProps,\n MessageRenderer,\n MessageStatusIndicatorProps,\n MessageStatusIndicatorStrings,\n MessageThreadProps,\n MessageThreadStrings,\n MessageThreadStyles,\n MicrophoneButtonContextualMenuStyles,\n MicrophoneButtonProps,\n MicrophoneButtonStrings,\n MicrophoneButtonStyles,\n OnRenderAvatarCallback,\n OptionsDevice,\n ParticipantAddedSystemMessage,\n ParticipantItemProps,\n ParticipantItemStrings,\n ParticipantItemStyles,\n ParticipantListItemStyles,\n ParticipantListParticipant,\n ParticipantListProps,\n ParticipantListStyles,\n ParticipantMenuItemsCallback,\n ParticipantRemovedSystemMessage,\n ParticipantState,\n ParticipantsButtonContextualMenuStyles,\n ParticipantsButtonProps,\n ParticipantsButtonStrings,\n ParticipantsButtonStyles,\n ReadReceiptsBySenderId,\n ScreenShareButtonProps,\n ScreenShareButtonStrings,\n SendBoxProps,\n SendBoxStrings,\n SendBoxStylesProps,\n StreamMediaProps,\n SystemMessage,\n SystemMessageCommon,\n TopicUpdatedSystemMessage,\n TypingIndicatorProps,\n TypingIndicatorStrings,\n TypingIndicatorStylesProps,\n UpdateMessageCallback,\n CancelEditCallback,\n VideoGalleryLayout,\n VideoGalleryLocalParticipant,\n VideoGalleryParticipant,\n VideoGalleryProps,\n VideoGalleryRemoteParticipant,\n VideoGalleryStream,\n VideoGalleryStrings,\n VideoGalleryStyles,\n VideoStreamOptions,\n VideoTileProps,\n VideoTileStylesProps,\n ViewScalingMode,\n VideoTileContextualMenuProps,\n VideoTileDrawerMenuProps,\n VideoTilesOptions\n} from '../../react-components/src';\n\nexport type { RaiseHandButtonProps, RaiseHandButtonStrings, RaisedHand } from '../../react-components/src';\nexport type {\n ReactionButtonStrings,\n Reaction,\n ReactionButtonProps,\n ReactionResources,\n ReactionSprite\n} from '../../react-components/src';\n/* @conditional-compile-remove(rich-text-editor) */\nexport { RichTextSendBox } from '../../react-components/src';\n/* @conditional-compile-remove(rich-text-editor) */\nexport type { RichTextSendBoxProps, RichTextSendBoxStrings, RichTextStrings } from '../../react-components/src';\nexport type { Spotlight } from '../../react-components/src';\nexport type { ImageOverlayProps, ImageOverlayStrings } from '../../react-components/src';\n/* @conditional-compile-remove(data-loss-prevention) */\nexport type { BlockedMessage } from '../../react-components/src';\nexport type {\n DialpadMode,\n DialpadProps,\n DialpadStrings,\n DialpadStyles,\n DtmfTone,\n LongPressTrigger\n} from '../../react-components/src';\n/* @conditional-compile-remove(file-sharing-acs) */\nexport type { AttachmentOptions } from '../../react-components/src';\n/* @conditional-compile-remove(file-sharing-acs) */\nexport type { SendBoxErrorBarError } from '../../react-components/src';\n/* @conditional-compile-remove(rich-text-editor-image-upload) */\nexport type { SendBoxErrorBarType } from '../../react-components/src';\n/* @conditional-compile-remove(file-sharing-acs) */\nexport type { AttachmentActionHandler } from '../../react-components/src';\n/* @conditional-compile-remove(file-sharing-acs) */\nexport type {\n AttachmentSelectionHandler,\n AttachmentRemovalHandler,\n AttachmentUploadOptions,\n AttachmentUploadTask\n} from '../../react-components/src';\n/* @conditional-compile-remove(file-sharing-teams-interop) @conditional-compile-remove(file-sharing-acs) */\nexport type { AttachmentMetadata } from '../../acs-ui-common/src';\n\n/* @conditional-compile-remove(file-sharing-acs) */\nexport type { AttachmentMetadataInProgress, AttachmentProgressError } from '../../acs-ui-common/src';\n\n/* @conditional-compile-remove(file-sharing-acs) */\nexport type { AttachmentMenuAction, AttachmentDownloadOptions } from '../../react-components/src';\n/* @conditional-compile-remove(file-sharing-acs) */\nexport { defaultAttachmentMenuAction } from '../../react-components/src';\nexport type { ChatAttachmentType } from '../../react-components/src';\nexport type { InlineImageOptions, InlineImage } from '../../react-components/src';\n/* @conditional-compile-remove(rich-text-editor) */\nexport type { RichTextEditorOptions, RichTextEditBoxOptions, RichTextSendBoxOptions } from '../../react-components/src';\n/* @conditional-compile-remove(PSTN-calls) */\nexport type { HoldButtonProps, HoldButtonStrings } from '../../react-components/src';\nexport type { VideoTileStrings } from '../../react-components/src';\n/* @conditional-compile-remove(call-readiness) */\nexport type { BrowserPermissionDeniedStrings, BrowserPermissionDeniedProps } from '../../react-components/src';\n/* @conditional-compile-remove(call-readiness) */\nexport type {\n BrowserPermissionDeniedIOSStrings,\n BrowserPermissionDeniedStyles,\n BrowserPermissionDeniedIOSProps\n} from '../../react-components/src';\nexport type { OverflowGalleryPosition } from '../../react-components/src';\nexport type { LocalVideoTileSize } from '../../react-components/src';\nexport * from '../../react-components/src/localization/locales';\nexport * from '../../react-components/src/theming';\nexport * from '../../calling-stateful-client/src/index-public';\n/* @conditional-compile-remove(one-to-n-calling) */\nexport type { DeclarativeCallAgent } from '../../calling-stateful-client/src';\nexport { createStatefulChatClient } from '../../chat-stateful-client/src';\nexport type {\n StatefulChatClient,\n StatefulChatClientArgs,\n StatefulChatClientOptions,\n ChatMessageWithStatus,\n ChatClientState,\n ChatError,\n ChatErrors,\n ChatThreadClientState,\n ChatThreadProperties,\n ChatErrorTarget\n} from '../../chat-stateful-client/src';\n/* @conditional-compile-remove(rich-text-editor-image-upload) */\nexport type { MessagingPolicy } from '../../chat-stateful-client/src';\n\nexport type { ResourceFetchResult } from '../../chat-stateful-client/src';\nexport * from '../../react-composites/src/index-public';\nexport * from './mergedHooks';\n\n/* @conditional-compile-remove(unsupported-browser) */\nexport { UnsupportedBrowser } from '../../react-components/src';\n/* @conditional-compile-remove(unsupported-browser) */\nexport type { UnsupportedBrowserStrings, UnsupportedBrowserProps } from '../../react-components/src';\n/* @conditional-compile-remove(unsupported-browser) */\nexport { UnsupportedBrowserVersion } from '../../react-components/src';\n/* @conditional-compile-remove(unsupported-browser) */\nexport type { UnsupportedBrowserVersionStrings, UnsupportedBrowserVersionProps } from '../../react-components/src';\n/* @conditional-compile-remove(unsupported-browser) */\nexport { UnsupportedOperatingSystem } from '../../react-components/src';\n/* @conditional-compile-remove(unsupported-browser) */\nexport type { UnsupportedOperatingSystemStrings, UnsupportedOperatingSystemProps } from '../../react-components/src';\nexport type {\n VerticalGalleryStyles,\n VerticalGalleryStrings,\n VerticalGalleryControlBarStyles\n} from '../../react-components/src';\n\nexport type { SpokenLanguageStrings, CaptionLanguageStrings } from '../../react-components/src';\n\nexport type { SurveyIssues } from '../../react-components/src';\n\nexport type { SurveyIssuesHeadingStrings } from '../../react-components/src';\n\nexport type { CallSurveyImprovementSuggestions } from '../../react-components/src';\n/* @conditional-compile-remove(notifications) */\nexport { NotificationStack, Notification } from '../../react-components/src';\n/* @conditional-compile-remove(notifications) */\nexport type {\n NotificationStackProps,\n NotificationProps,\n NotificationStrings,\n NotificationStackStrings,\n NotificationType,\n ActiveNotification\n} from '../../react-components/src';\n/* @conditional-compile-remove(teams-meeting-conference) */\nexport type { MeetingConferencePhoneInfoModalStrings } from '../../react-components/src';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,+BAA+B,EAAE,6BAA6B,EAAE,MAAM,yBAAyB,CAAC;AAUzG,uDAAuD;AACvD,OAAO,EACL,yBAAyB,EACzB,iBAAiB,EACjB,iBAAiB,EACjB,yBAAyB,EAC1B,MAAM,qCAAqC,CAAC;AAqC7C,OAAO,EACL,kBAAkB,EAClB,iBAAiB,EAC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jD,OAAO,EACL,kCAAkC,EAClC,yBAAyB,EACzB,qBAAqB,EACtB,MAAM,4BAA4B,CAAC;AA0IpC,mDAAmD;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAsC7D,mDAAmD;AACnD,OAAO,EAAE,2BAA2B,EAAE,MAAM,4BAA4B,CAAC;AAkBzE,cAAc,iDAAiD,CAAC;AAChE,cAAc,oCAAoC,CAAC;AACnD,cAAc,gDAAgD,CAAC;AAG/D,OAAO,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AAiB1E,cAAc,yCAAyC,CAAC;AACxD,cAAc,eAAe,CAAC;AAE9B,sDAAsD;AACtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAGhE,sDAAsD;AACtD,OAAO,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AAGvE,sDAAsD;AACtD,OAAO,EAAE,0BAA0B,EAAE,MAAM,4BAA4B,CAAC;AAgBxE,gDAAgD;AAChD,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * `@azure/communication-react` is an npm package that exports the functionality of the Azure Communication Services - UI Library.\n *\n * This package makes it easy for you to build modern communications user experiences using Azure Communication Services. It gives you a library of production-ready UI components that you can drop into your applications:\n * - Composites: These components are turn-key solutions that implement common communication scenarios. You can quickly add video calling or chat experiences to your applications. Composites are open-source higher order components built using UI components.\n * - UI Components - These components are open-source building blocks that let you build custom communications experience. Components are offered for both calling and chat capabilities that can be combined to build experiences.\n *\n * These UI client libraries all use Microsoft's Fluent design language and assets. Fluent UI provides a foundational layer for the UI Library and is actively used across Microsoft products.\n *\n * In conjunction with the UI components, the UI Library exposes a stateful client library for calling and chat. This client is agnostic to any specific state management framework and can be integrated with common state managers like Redux or React Context.\n * This stateful client library can be used with the UI Components to pass props and methods for the UI Components to render data. For more information, see Stateful Client Overview.\n *\n * For more information visit: https://aka.ms/acsstorybook\n *\n * @packageDocumentation\n */\n\nexport { fromFlatCommunicationIdentifier, toFlatCommunicationIdentifier } from '../../acs-ui-common/src';\nexport type {\n AreEqual,\n CommonProperties,\n MessageStatus,\n Common,\n AreTypeEqual,\n AreParamEqual\n} from '../../acs-ui-common/src';\n\n/* @conditional-compile-remove(composite-js-helpers) */\nexport {\n loadOutboundCallComposite,\n loadCallComposite,\n loadChatComposite,\n loadCallWithChatComposite\n} from '../../acs-ui-javascript-loaders/src';\n/* @conditional-compile-remove(composite-js-helpers) */\nexport type {\n OutboundCallCompositeLoaderProps,\n CallCompositeLoaderProps,\n ChatCompositeLoaderProps,\n CallWithChatCompositeLoaderProps\n} from '../../acs-ui-javascript-loaders/src';\n\n// Not to export chat/calling specific hook from binding package\nexport type {\n CallClientProviderProps,\n CallAgentProviderProps,\n CallProviderProps,\n GetCallingSelector,\n CallingHandlers,\n CallingBaseSelectorProps,\n CommonCallingHandlers\n} from '../../calling-component-bindings/src';\n\nexport type { VideoBackgroundEffectsDependency, CallingHandlersOptions } from '../../calling-component-bindings/src';\n\nexport type { CaptionsOptions } from '../../calling-component-bindings/src';\n\nexport type {\n ChatClientProviderProps,\n ChatThreadClientProviderProps,\n GetChatSelector,\n ChatHandlers,\n ChatBaseSelectorProps\n} from '../../chat-component-bindings/src';\n\n/* @conditional-compile-remove(file-sharing-acs) */\nexport type { MessageOptions, ChatMessageType } from '../../acs-ui-common/src';\n/* @conditional-compile-remove(rich-text-editor-image-upload) */\nexport type { UploadChatImageResult } from '../../acs-ui-common/src';\n\nexport {\n CallClientProvider,\n CallAgentProvider,\n CallProvider,\n useCallClient,\n useCallAgent,\n useCall,\n useDeviceManager,\n getCallingSelector,\n createDefaultCallingHandlers\n} from '../../calling-component-bindings/src';\n\n/* @conditional-compile-remove(teams-identity-support) */\nexport {\n useTeamsCallAgent,\n useTeamsCall,\n createDefaultTeamsCallingHandlers\n} from '../../calling-component-bindings/src';\n\n/* @conditional-compile-remove(teams-identity-support) */\nexport type { TeamsCallingHandlers } from '../../calling-component-bindings/src';\n\nexport type {\n ScreenShareButtonSelector,\n CameraButtonSelector,\n VideoGallerySelector,\n DevicesButtonSelector,\n EmptySelector,\n ErrorBarSelector as CallErrorBarSelector,\n ParticipantListSelector,\n MicrophoneButtonSelector,\n ParticipantsButtonSelector,\n CreateDefaultCallingHandlers\n} from '../../calling-component-bindings/src';\n/* @conditional-compile-remove(PSTN-calls) */\nexport type { HoldButtonSelector } from '../../calling-component-bindings/src';\n\nexport type { RaiseHandButtonSelector } from '../../calling-component-bindings/src';\n/* @conditional-compile-remove(notifications) */\nexport type { NotificationStackSelector } from '../../calling-component-bindings/src';\n/* @conditional-compile-remove(one-to-n-calling) */\nexport type { IncomingCallStackSelector } from '../../calling-component-bindings/src';\n\nexport {\n ChatClientProvider,\n ChatThreadClientProvider,\n useChatClient,\n useChatThreadClient,\n getChatSelector,\n createDefaultChatHandlers\n} from '../../chat-component-bindings/src';\n\nexport type {\n MessageThreadSelector,\n TypingIndicatorSelector,\n ChatParticipantListSelector,\n SendBoxSelector,\n ErrorBarSelector as ChatErrorBarSelector\n} from '../../chat-component-bindings/src';\n\nexport {\n _IdentifierProvider,\n CameraButton,\n ControlBar,\n ControlBarButton,\n DevicesButton,\n EndCallButton,\n ErrorBar,\n GridLayout,\n LocalizationProvider,\n MessageStatusIndicator,\n MessageThread,\n MicrophoneButton,\n ParticipantItem,\n ParticipantList,\n ParticipantsButton,\n ScreenShareButton,\n SendBox,\n StreamMedia,\n TypingIndicator,\n VideoGallery,\n VideoTile,\n COMPONENT_LOCALE_EN_GB,\n COMPONENT_LOCALE_AR_SA,\n COMPONENT_LOCALE_CS_CZ,\n COMPONENT_LOCALE_DE_DE,\n COMPONENT_LOCALE_ES_ES,\n COMPONENT_LOCALE_FI_FI,\n COMPONENT_LOCALE_FR_FR,\n COMPONENT_LOCALE_HE_IL,\n COMPONENT_LOCALE_IT_IT,\n COMPONENT_LOCALE_JA_JP,\n COMPONENT_LOCALE_KO_KR,\n COMPONENT_LOCALE_NB_NO,\n COMPONENT_LOCALE_NL_NL,\n COMPONENT_LOCALE_PL_PL,\n COMPONENT_LOCALE_PT_BR,\n COMPONENT_LOCALE_RU_RU,\n COMPONENT_LOCALE_SV_SE,\n COMPONENT_LOCALE_TR_TR,\n COMPONENT_LOCALE_ZH_CN,\n COMPONENT_LOCALE_ZH_TW\n} from '../../react-components/src';\nexport { ImageOverlay } from '../../react-components/src';\n/* @conditional-compile-remove(PSTN-calls) */\nexport { HoldButton } from '../../react-components/src';\n\nexport { RaiseHandButton } from '../../react-components/src';\n\nexport { Dialpad } from '../../react-components/src';\n\n/* @conditional-compile-remove(one-to-n-calling) */\nexport { IncomingCallNotification, IncomingCallStack } from '../../react-components/src';\n/* @conditional-compile-remove(one-to-n-calling) */\nexport type {\n IncomingCallNotificationProps,\n IncomingCallNotificationStrings,\n IncomingCallNotificationStyles,\n IncomingCallStackProps,\n ActiveIncomingCall\n} from '../../react-components/src';\n\n/* @conditional-compile-remove(call-readiness) */\nexport {\n CameraAndMicrophoneSitePermissions,\n MicrophoneSitePermissions,\n CameraSitePermissions\n} from '../../react-components/src';\n/* @conditional-compile-remove(call-readiness) */\nexport type {\n CameraAndMicrophoneSitePermissionsStrings,\n CameraAndMicrophoneSitePermissionsProps,\n CameraSitePermissionsStrings,\n CameraSitePermissionsProps,\n CommonSitePermissionsProps,\n SitePermissionsStrings,\n SitePermissionsStyles,\n MicrophoneSitePermissionsStrings,\n MicrophoneSitePermissionsProps\n} from '../../react-components/src';\n\n/* @conditional-compile-remove(total-participant-count) */\nexport type { ParticipantListStrings } from '../../react-components/src';\n\n/* @conditional-compile-remove(mention) */\nexport type {\n MentionOptions,\n MentionDisplayOptions,\n MentionLookupOptions,\n Mention,\n MentionPopoverStrings\n} from '../../react-components/src';\n\nexport type {\n _IdentifierProviderProps,\n _Identifiers,\n ActiveErrorMessage,\n BaseCustomStyles,\n CallParticipantListParticipant,\n CameraButtonContextualMenuStyles,\n CameraButtonProps,\n CameraButtonStrings,\n CameraButtonStyles,\n ChatMessage,\n CommunicationParticipant,\n ComponentLocale,\n ComponentSlotStyle,\n ComponentStrings,\n ContentSystemMessage,\n ControlBarButtonProps,\n ControlBarButtonStrings,\n ControlBarButtonStyles,\n ControlBarLayout,\n ControlBarProps,\n CreateVideoStreamViewResult,\n CustomAvatarOptions,\n CustomMessage,\n DevicesButtonContextualMenuStyles,\n DevicesButtonProps,\n DevicesButtonStrings,\n DevicesButtonStyles,\n EndCallButtonProps,\n EndCallButtonStrings,\n ErrorBarProps,\n ErrorBarStrings,\n ErrorType,\n GridLayoutProps,\n GridLayoutStyles,\n HorizontalGalleryStyles,\n JumpToNewMessageButtonProps,\n LocalizationProviderProps,\n LocalVideoCameraCycleButtonProps,\n LoadingState,\n Message,\n MessageAttachedStatus,\n MessageCommon,\n MessageContentType,\n MessageProps,\n MessageRenderer,\n MessageStatusIndicatorProps,\n MessageStatusIndicatorStrings,\n MessageThreadProps,\n MessageThreadStrings,\n MessageThreadStyles,\n MicrophoneButtonContextualMenuStyles,\n MicrophoneButtonProps,\n MicrophoneButtonStrings,\n MicrophoneButtonStyles,\n OnRenderAvatarCallback,\n OptionsDevice,\n ParticipantAddedSystemMessage,\n ParticipantItemProps,\n ParticipantItemStrings,\n ParticipantItemStyles,\n ParticipantListItemStyles,\n ParticipantListParticipant,\n ParticipantListProps,\n ParticipantListStyles,\n ParticipantMenuItemsCallback,\n ParticipantRemovedSystemMessage,\n ParticipantState,\n ParticipantsButtonContextualMenuStyles,\n ParticipantsButtonProps,\n ParticipantsButtonStrings,\n ParticipantsButtonStyles,\n ReadReceiptsBySenderId,\n ScreenShareButtonProps,\n ScreenShareButtonStrings,\n SendBoxProps,\n SendBoxStrings,\n SendBoxStylesProps,\n StreamMediaProps,\n SystemMessage,\n SystemMessageCommon,\n TopicUpdatedSystemMessage,\n TypingIndicatorProps,\n TypingIndicatorStrings,\n TypingIndicatorStylesProps,\n UpdateMessageCallback,\n CancelEditCallback,\n VideoGalleryLayout,\n VideoGalleryLocalParticipant,\n VideoGalleryParticipant,\n VideoGalleryProps,\n VideoGalleryRemoteParticipant,\n VideoGalleryStream,\n VideoGalleryStrings,\n VideoGalleryStyles,\n VideoStreamOptions,\n VideoTileProps,\n VideoTileStylesProps,\n ViewScalingMode,\n VideoTileContextualMenuProps,\n VideoTileDrawerMenuProps,\n VideoTilesOptions\n} from '../../react-components/src';\n\nexport type { RaiseHandButtonProps, RaiseHandButtonStrings, RaisedHand } from '../../react-components/src';\nexport type {\n ReactionButtonStrings,\n Reaction,\n ReactionButtonProps,\n ReactionResources,\n ReactionSprite\n} from '../../react-components/src';\n/* @conditional-compile-remove(rich-text-editor) */\nexport { RichTextSendBox } from '../../react-components/src';\n/* @conditional-compile-remove(rich-text-editor) */\nexport type { RichTextSendBoxProps, RichTextSendBoxStrings, RichTextStrings } from '../../react-components/src';\nexport type { Spotlight } from '../../react-components/src';\nexport type { ImageOverlayProps, ImageOverlayStrings } from '../../react-components/src';\n/* @conditional-compile-remove(data-loss-prevention) */\nexport type { BlockedMessage } from '../../react-components/src';\nexport type {\n DialpadMode,\n DialpadProps,\n DialpadStrings,\n DialpadStyles,\n DtmfTone,\n LongPressTrigger\n} from '../../react-components/src';\n/* @conditional-compile-remove(file-sharing-acs) */\nexport type { AttachmentOptions } from '../../react-components/src';\n/* @conditional-compile-remove(file-sharing-acs) */\nexport type { SendBoxErrorBarError } from '../../react-components/src';\n/* @conditional-compile-remove(rich-text-editor-image-upload) */\nexport type { SendBoxErrorBarType } from '../../react-components/src';\n/* @conditional-compile-remove(file-sharing-acs) */\nexport type { AttachmentActionHandler } from '../../react-components/src';\n/* @conditional-compile-remove(file-sharing-acs) */\nexport type {\n AttachmentSelectionHandler,\n AttachmentRemovalHandler,\n AttachmentUploadOptions,\n AttachmentUploadTask\n} from '../../react-components/src';\n/* @conditional-compile-remove(file-sharing-teams-interop) @conditional-compile-remove(file-sharing-acs) */\nexport type { AttachmentMetadata } from '../../acs-ui-common/src';\n\n/* @conditional-compile-remove(file-sharing-acs) */\nexport type { AttachmentMetadataInProgress, AttachmentProgressError } from '../../acs-ui-common/src';\n\n/* @conditional-compile-remove(file-sharing-acs) */\nexport type { AttachmentMenuAction, AttachmentDownloadOptions } from '../../react-components/src';\n/* @conditional-compile-remove(file-sharing-acs) */\nexport { defaultAttachmentMenuAction } from '../../react-components/src';\nexport type { ChatAttachmentType } from '../../react-components/src';\nexport type { InlineImageOptions, InlineImage } from '../../react-components/src';\n/* @conditional-compile-remove(rich-text-editor) */\nexport type { RichTextEditorOptions, RichTextEditBoxOptions, RichTextSendBoxOptions } from '../../react-components/src';\n/* @conditional-compile-remove(PSTN-calls) */\nexport type { HoldButtonProps, HoldButtonStrings } from '../../react-components/src';\nexport type { VideoTileStrings } from '../../react-components/src';\n/* @conditional-compile-remove(call-readiness) */\nexport type { BrowserPermissionDeniedStrings, BrowserPermissionDeniedProps } from '../../react-components/src';\n/* @conditional-compile-remove(call-readiness) */\nexport type {\n BrowserPermissionDeniedIOSStrings,\n BrowserPermissionDeniedStyles,\n BrowserPermissionDeniedIOSProps\n} from '../../react-components/src';\nexport type { OverflowGalleryPosition } from '../../react-components/src';\nexport type { LocalVideoTileSize } from '../../react-components/src';\nexport * from '../../react-components/src/localization/locales';\nexport * from '../../react-components/src/theming';\nexport * from '../../calling-stateful-client/src/index-public';\n/* @conditional-compile-remove(one-to-n-calling) */\nexport type { DeclarativeCallAgent } from '../../calling-stateful-client/src';\nexport { createStatefulChatClient } from '../../chat-stateful-client/src';\nexport type {\n StatefulChatClient,\n StatefulChatClientArgs,\n StatefulChatClientOptions,\n ChatMessageWithStatus,\n ChatClientState,\n ChatError,\n ChatErrors,\n ChatThreadClientState,\n ChatThreadProperties,\n ChatErrorTarget\n} from '../../chat-stateful-client/src';\n/* @conditional-compile-remove(rich-text-editor-image-upload) */\nexport type { MessagingPolicy } from '../../chat-stateful-client/src';\n\nexport type { ResourceFetchResult } from '../../chat-stateful-client/src';\nexport * from '../../react-composites/src/index-public';\nexport * from './mergedHooks';\n\n/* @conditional-compile-remove(unsupported-browser) */\nexport { UnsupportedBrowser } from '../../react-components/src';\n/* @conditional-compile-remove(unsupported-browser) */\nexport type { UnsupportedBrowserStrings, UnsupportedBrowserProps } from '../../react-components/src';\n/* @conditional-compile-remove(unsupported-browser) */\nexport { UnsupportedBrowserVersion } from '../../react-components/src';\n/* @conditional-compile-remove(unsupported-browser) */\nexport type { UnsupportedBrowserVersionStrings, UnsupportedBrowserVersionProps } from '../../react-components/src';\n/* @conditional-compile-remove(unsupported-browser) */\nexport { UnsupportedOperatingSystem } from '../../react-components/src';\n/* @conditional-compile-remove(unsupported-browser) */\nexport type { UnsupportedOperatingSystemStrings, UnsupportedOperatingSystemProps } from '../../react-components/src';\nexport type {\n VerticalGalleryStyles,\n VerticalGalleryStrings,\n VerticalGalleryControlBarStyles\n} from '../../react-components/src';\n\nexport type { SpokenLanguageStrings, CaptionLanguageStrings } from '../../react-components/src';\n\nexport type { SurveyIssues } from '../../react-components/src';\n\nexport type { SurveyIssuesHeadingStrings } from '../../react-components/src';\n\nexport type { CallSurveyImprovementSuggestions } from '../../react-components/src';\n/* @conditional-compile-remove(notifications) */\nexport { NotificationStack, Notification } from '../../react-components/src';\n/* @conditional-compile-remove(notifications) */\nexport type {\n NotificationStackProps,\n NotificationProps,\n NotificationStrings,\n NotificationStackStrings,\n NotificationType,\n ActiveNotification\n} from '../../react-components/src';\n/* @conditional-compile-remove(teams-meeting-conference) */\nexport type { MeetingConferencePhoneInfoModalStrings } from '../../react-components/src';\n"]}
@@ -233,9 +233,11 @@ export const ChatMessageComponentAsRichTextEditBox = (props) => {
233
233
  /* @conditional-compile-remove(rich-text-editor-image-upload) */
234
234
  onPaste: onPaste,
235
235
  /* @conditional-compile-remove(rich-text-editor-image-upload) */
236
- onInsertInlineImage: (imageUrl, imageFileName) => {
237
- onInsertInlineImage && onInsertInlineImage(imageUrl, imageFileName, message.messageId);
238
- } })));
236
+ onInsertInlineImage: onInsertInlineImage
237
+ ? (imageUrl, imageFileName) => {
238
+ onInsertInlineImage(imageUrl, imageFileName, message.messageId);
239
+ }
240
+ : undefined })));
239
241
  };
240
242
  const attached = message.attached === true ? 'center' : message.attached === 'bottom' ? 'bottom' : 'top';
241
243
  return (React.createElement(ChatMyMessage, { attached: attached, root: {
@@ -1 +1 @@
1
- {"version":3,"file":"ChatMessageComponentAsRichTextEditBox.js","sourceRoot":"","sources":["../../../../../../../../react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsRichTextEditBox.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,yCAAgC;AAGxD,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACzE,mDAAmD;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AACnC,OAAO,EAAE,kBAAkB,EAAE,+BAA+B,EAAE,MAAM,6BAA6B,CAAC;AAClG,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEtD,OAAO,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAE3E,OAAO,EAAE,sBAAsB,EAAE,MAAM,wCAAwC,CAAC;AAGhF,OAAO,EAAE,yCAAyC,EAAE,MAAM,0CAA0C,CAAC;AACrG,OAAO,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAC;AACrE,gEAAgE;AAChE,OAAO,EACL,uBAAuB,EACvB,8BAA8B,EA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import { ChatMyMessage } from '@fluentui-contrib/react-chat';\nimport { mergeClasses } from '@fluentui/react-components';\nimport { _formatString } from '@internal/acs-ui-common';\n/* @conditional-compile-remove(rich-text-editor-image-upload) */\nimport { AttachmentMetadataInProgress } from '@internal/acs-ui-common';\nimport { useTheme } from '../../../theming';\nimport React, { useCallback, useEffect, useMemo, useState } from 'react';\n/* @conditional-compile-remove(file-sharing-acs) */\nimport { useReducer } from 'react';\nimport { editBoxWidthStyles, richTextEditBoxActionButtonIcon } from '../../styles/EditBox.styles';\nimport { InputBoxButton } from '../../InputBoxButton';\nimport { MessageThreadStrings } from '../../MessageThread';\nimport { useChatMyMessageStyles } from '../../styles/MessageThread.styles';\nimport { ChatMessage } from '../../../types';\nimport { _AttachmentUploadCards } from '../../Attachment/AttachmentUploadCards';\n/* @conditional-compile-remove(file-sharing-acs) */\nimport { AttachmentMetadata } from '@internal/acs-ui-common';\nimport { useChatMessageRichTextEditContainerStyles } from '../../styles/ChatMessageComponent.styles';\nimport { MAXIMUM_LENGTH_OF_MESSAGE } from '../../utils/SendBoxUtils';\n/* @conditional-compile-remove(rich-text-editor-image-upload) */\nimport {\n cancelInlineImageUpload,\n hasIncompleteAttachmentUploads,\n insertImagesToContentString,\n isAttachmentUploadCompleted,\n removeBrokenImageContentAndClearImageSizeStyles\n} from '../../utils/SendBoxUtils';\nimport {\n getMessageState,\n onRenderCancelIcon,\n onRenderSubmitIcon\n} from '../../utils/ChatMessageComponentAsEditBoxUtils';\n/* @conditional-compile-remove(file-sharing-acs) */\nimport {\n attachmentMetadataReducer,\n getMessageWithAttachmentMetadata,\n doesMessageContainMultipleAttachments\n} from '../../utils/ChatMessageComponentAsEditBoxUtils';\nimport { RichTextEditorComponentRef } from '../../RichTextEditor/RichTextEditor';\nimport { RichTextInputBoxComponent } from '../../RichTextEditor/RichTextInputBoxComponent';\nimport { editBoxRichTextEditorStyle, richTextActionButtonsStyle } from '../../styles/RichTextEditor.styles';\nimport { RichTextSendBoxErrors } from '../../RichTextEditor/RichTextSendBoxErrors';\nimport { useLocale } from '../../../localization';\n/* @conditional-compile-remove(file-sharing-acs) */\nimport { FluentV9ThemeProvider } from '../../../theming/FluentV9ThemeProvider';\n/* @conditional-compile-remove(file-sharing-acs) */\nimport { attachmentUploadCardsStyles } from '../../styles/SendBox.styles';\n/* @conditional-compile-remove(rich-text-editor-image-upload) */\nimport { SendBoxErrorBarError, SendBoxErrorBarType } from '../../SendBoxErrorBar';\n/* @conditional-compile-remove(rich-text-editor-image-upload) */\nimport { BROKEN_IMAGE_SVG_DATA } from '../../styles/Common.style';\n\n/** @private */\nexport type ChatMessageComponentAsRichTextEditBoxProps = {\n onCancel?: (messageId: string) => void;\n onSubmit: (\n text: string,\n /* @conditional-compile-remove(file-sharing-acs) */\n attachmentMetadata?: AttachmentMetadata[]\n ) => void;\n message: ChatMessage;\n strings: MessageThreadStrings;\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n onPaste?: (event: { content: DocumentFragment }) => void;\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n onCancelInlineImageUpload?: (imageId: string, messageId: string) => void;\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n onInsertInlineImage?: (imageUrl: string, imageFileName: string, messageId: string) => void;\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n inlineImages?: AttachmentMetadataInProgress[];\n};\n\n/**\n * @private\n */\nexport const ChatMessageComponentAsRichTextEditBox = (\n props: ChatMessageComponentAsRichTextEditBoxProps\n): JSX.Element => {\n const {\n onCancel,\n onSubmit,\n strings,\n message,\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n onPaste,\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n onInsertInlineImage,\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n inlineImages,\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n onCancelInlineImageUpload\n } = props;\n\n const initialContent = useMemo(() => {\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n const content = message.content;\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n const document = new DOMParser().parseFromString(content ?? '', 'text/html');\n // The broken image element is a div element with all the attributes of the original image element.\n // We need to convert it to a img element so the Rooster knows how to render it.\n // And we need to copy over all the attributes such as id, width, etc.\n // which is needed for sending the message with the images correctly.\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n document.querySelectorAll('.broken-image-wrapper').forEach((brokenImage) => {\n const imageElement = document.createElement('img');\n const attributes = brokenImage.attributes;\n for (const attribute of attributes) {\n imageElement.setAttribute(attribute.name, attribute.value);\n }\n\n imageElement.src = BROKEN_IMAGE_SVG_DATA;\n imageElement.style.width = '3rem';\n imageElement.style.height = '3rem';\n brokenImage.parentElement?.replaceChild(imageElement, brokenImage);\n });\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n return document.body.innerHTML;\n return message.content;\n }, [message]);\n\n const [textValue, setTextValue] = useState<string>(initialContent || '');\n\n /* @conditional-compile-remove(file-sharing-acs) */\n const [attachmentMetadata, handleAttachmentAction] = useReducer(\n attachmentMetadataReducer,\n getMessageWithAttachmentMetadata(message) ?? []\n );\n\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n const [attachmentUploadsPendingError, setAttachmentUploadsPendingError] = useState<SendBoxErrorBarError | undefined>(\n undefined\n );\n const editTextFieldRef = React.useRef<RichTextEditorComponentRef>(null);\n const theme = useTheme();\n const messageState = useMemo(() => {\n return getMessageState(textValue, /* @conditional-compile-remove(file-sharing-acs) */ attachmentMetadata ?? []);\n }, [/* @conditional-compile-remove(file-sharing-acs) */ attachmentMetadata, textValue]);\n\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n const imageUploadErrorMessage = useMemo(() => {\n return inlineImages?.filter((image) => image.error).pop()?.error?.message;\n }, [inlineImages]);\n\n const submitEnabled = messageState === 'OK';\n\n const editContainerStyles = useChatMessageRichTextEditContainerStyles();\n const chatMyMessageStyles = useChatMyMessageStyles();\n const locale = useLocale().strings;\n\n const setText = useCallback((newValue?: string): void => {\n setTextValue(newValue ?? '');\n }, []);\n\n useEffect(() => {\n editTextFieldRef.current?.focus();\n }, []);\n\n const textTooLongMessage = useMemo(() => {\n return messageState === 'too long'\n ? _formatString(strings.editBoxTextLimit, { limitNumber: `${MAXIMUM_LENGTH_OF_MESSAGE}` })\n : undefined;\n }, [messageState, strings.editBoxTextLimit]);\n\n const iconClassName = useCallback(\n (isHover: boolean) => {\n const color = isHover ? theme.palette.accent : theme.palette.neutralSecondary;\n return mergeStyles(richTextEditBoxActionButtonIcon, { color });\n },\n [theme.palette.accent, theme.palette.neutralSecondary]\n );\n\n const onRenderThemedCancelIcon = useCallback(\n (isHover: boolean) => {\n return onRenderCancelIcon(iconClassName(isHover));\n },\n [iconClassName]\n );\n\n const onRenderThemedSubmitIcon = useCallback(\n (isHover: boolean) => {\n return onRenderSubmitIcon(iconClassName(isHover));\n },\n [iconClassName]\n );\n\n /* @conditional-compile-remove(file-sharing-acs) */\n const hasMultipleAttachments = useMemo(() => {\n return doesMessageContainMultipleAttachments(message);\n }, [message]);\n\n const onSubmitHandler = useCallback((): void => {\n if (!submitEnabled) {\n return;\n }\n // Don't send message until all attachments have been uploaded successfully\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n setAttachmentUploadsPendingError(undefined);\n\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n if (hasIncompleteAttachmentUploads(inlineImages)) {\n setAttachmentUploadsPendingError({\n message: strings.imageUploadsPendingError,\n timestamp: Date.now(),\n errorBarType: SendBoxErrorBarType.info\n });\n return;\n }\n\n let content = textValue;\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n content = removeBrokenImageContentAndClearImageSizeStyles(content);\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n if (isAttachmentUploadCompleted(inlineImages)) {\n insertImagesToContentString(textValue, inlineImages, (content) => {\n onSubmit(content, /* @conditional-compile-remove(file-sharing-acs) */ attachmentMetadata || []);\n });\n return;\n }\n // it's very important to pass an empty attachment here\n // so when user removes all attachments, UI can reflect it instantly\n // if you set it to undefined, the attachments pre-edited would still be there\n // until edit message event is received\n onSubmit(content, /* @conditional-compile-remove(file-sharing-acs) */ attachmentMetadata || []);\n }, [\n submitEnabled,\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n inlineImages,\n textValue,\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n strings.imageUploadsPendingError,\n onSubmit,\n /* @conditional-compile-remove(file-sharing-acs) */\n attachmentMetadata\n ]);\n\n const actionButtons = useMemo(() => {\n return (\n <Stack horizontal>\n <InputBoxButton\n className={richTextActionButtonsStyle}\n ariaLabel={strings.editBoxCancelButton}\n tooltipContent={strings.editBoxCancelButton}\n onRenderIcon={onRenderThemedCancelIcon}\n onClick={() => {\n onCancel && onCancel(message.messageId);\n }}\n id={'dismissIconWrapper'}\n data-testId={strings.editBoxCancelButton}\n />\n <InputBoxButton\n className={richTextActionButtonsStyle}\n ariaLabel={strings.editBoxSubmitButton}\n tooltipContent={strings.editBoxSubmitButton}\n onRenderIcon={onRenderThemedSubmitIcon}\n onClick={(e) => {\n onSubmitHandler();\n e.stopPropagation();\n }}\n id={'submitIconWrapper'}\n data-testId={strings.editBoxSubmitButton}\n />\n </Stack>\n );\n }, [\n message.messageId,\n onCancel,\n onRenderThemedCancelIcon,\n onRenderThemedSubmitIcon,\n strings.editBoxCancelButton,\n strings.editBoxSubmitButton,\n onSubmitHandler\n ]);\n const richTextLocaleStrings = useMemo(() => {\n /* @conditional-compile-remove(rich-text-editor) */\n return { ...locale.richTextSendBox, ...strings };\n return locale.sendBox;\n }, [\n /* @conditional-compile-remove(rich-text-editor) */ locale.richTextSendBox,\n /* @conditional-compile-remove(rich-text-editor) */ strings,\n locale.sendBox\n ]);\n\n /* @conditional-compile-remove(file-sharing-acs) */\n const onCancelAttachmentUpload = useCallback((attachmentId: string) => {\n // edit box only capable of removing attachments\n // we need to expand attachment actions\n // if we want to support more actions e.g. add\n handleAttachmentAction({ type: 'remove', id: attachmentId });\n }, []);\n\n /* @conditional-compile-remove(file-sharing-acs) */\n const onRenderAttachmentUploads = useCallback(() => {\n return (\n <Stack className={attachmentUploadCardsStyles}>\n <FluentV9ThemeProvider v8Theme={theme}>\n <_AttachmentUploadCards\n attachments={attachmentMetadata}\n onCancelAttachmentUpload={onCancelAttachmentUpload}\n />\n </FluentV9ThemeProvider>\n </Stack>\n );\n }, [attachmentMetadata, onCancelAttachmentUpload, theme]);\n\n const onChangeHandler = useCallback(\n (\n content: string | undefined,\n /* @conditional-compile-remove(rich-text-editor-image-upload) */ imageSrcArray?: Array<string>\n ) => {\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n cancelInlineImageUpload({\n imageSrcArray,\n inlineImages,\n messageId: message.messageId,\n editBoxOnCancelInlineImageUpload: onCancelInlineImageUpload,\n sendBoxOnCancelInlineImageUpload: undefined\n });\n setText(content);\n },\n [\n setText,\n /* @conditional-compile-remove(rich-text-editor-image-upload) */ inlineImages,\n /* @conditional-compile-remove(rich-text-editor-image-upload) */ onCancelInlineImageUpload,\n /* @conditional-compile-remove(rich-text-editor-image-upload) */ message.messageId\n ]\n );\n\n const getContent = (): JSX.Element => {\n return (\n <Stack className={mergeStyles(editBoxWidthStyles)}>\n <RichTextSendBoxErrors\n textTooLongMessage={textTooLongMessage}\n systemMessage={message.failureReason}\n /* @conditional-compile-remove(rich-text-editor-image-upload) */ attachmentUploadsPendingError={\n attachmentUploadsPendingError\n }\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n attachmentProgressError={\n imageUploadErrorMessage\n ? {\n message: imageUploadErrorMessage,\n timestamp: Date.now(),\n errorBarType: SendBoxErrorBarType.error\n }\n : undefined\n }\n />\n <RichTextInputBoxComponent\n placeholderText={strings.editBoxPlaceholderText}\n onChange={onChangeHandler}\n editorComponentRef={editTextFieldRef}\n initialContent={initialContent}\n strings={richTextLocaleStrings}\n disabled={false}\n actionComponents={actionButtons}\n richTextEditorStyleProps={editBoxRichTextEditorStyle}\n isHorizontalLayoutDisabled={true}\n /* @conditional-compile-remove(file-sharing-acs) */\n onRenderAttachmentUploads={onRenderAttachmentUploads}\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n onPaste={onPaste}\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n onInsertInlineImage={(imageUrl: string, imageFileName: string) => {\n onInsertInlineImage && onInsertInlineImage(imageUrl, imageFileName, message.messageId);\n }}\n />\n </Stack>\n );\n };\n\n const attached = message.attached === true ? 'center' : message.attached === 'bottom' ? 'bottom' : 'top';\n return (\n <ChatMyMessage\n attached={attached}\n root={{\n className: mergeClasses(\n chatMyMessageStyles.root,\n /* @conditional-compile-remove(file-sharing-acs) */\n hasMultipleAttachments ? chatMyMessageStyles.multipleAttachmentsInEditing : undefined\n )\n }}\n body={{\n className: mergeClasses(\n editContainerStyles.body,\n attached !== 'top' ? editContainerStyles.bodyAttached : undefined\n )\n }}\n >\n {getContent()}\n </ChatMyMessage>\n );\n};\n\nexport default ChatMessageComponentAsRichTextEditBox;\n"]}
1
+ {"version":3,"file":"ChatMessageComponentAsRichTextEditBox.js","sourceRoot":"","sources":["../../../../../../../../react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsRichTextEditBox.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,yCAAgC;AAGxD,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACzE,mDAAmD;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AACnC,OAAO,EAAE,kBAAkB,EA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CAAC,CAAC,mBAAmB,CAAC,4BAA4B,CAAC,CAAC,CAAC,SAAS,CACtF;SACF,EACD,IAAI,EAAE;YACJ,SAAS,EAAE,YAAY,CACrB,mBAAmB,CAAC,IAAI,EACxB,QAAQ,KAAK,KAAK,CAAC,CAAC,CAAC,mBAAmB,CAAC,YAAY,CAAC,CAAC,CAAC,SAAS,CAClE;SACF,IAEA,UAAU,EAAE,CACC,CACjB,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,qCAAqC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { mergeStyles, Stack } from '@fluentui/react';\nimport { ChatMyMessage } from '@fluentui-contrib/react-chat';\nimport { mergeClasses } from '@fluentui/react-components';\nimport { _formatString } from '@internal/acs-ui-common';\n/* @conditional-compile-remove(rich-text-editor-image-upload) */\nimport { AttachmentMetadataInProgress } from '@internal/acs-ui-common';\nimport { useTheme } from '../../../theming';\nimport React, { useCallback, useEffect, useMemo, useState } from 'react';\n/* @conditional-compile-remove(file-sharing-acs) */\nimport { useReducer } from 'react';\nimport { editBoxWidthStyles, richTextEditBoxActionButtonIcon } from '../../styles/EditBox.styles';\nimport { InputBoxButton } from '../../InputBoxButton';\nimport { MessageThreadStrings } from '../../MessageThread';\nimport { useChatMyMessageStyles } from '../../styles/MessageThread.styles';\nimport { ChatMessage } from '../../../types';\nimport { _AttachmentUploadCards } from '../../Attachment/AttachmentUploadCards';\n/* @conditional-compile-remove(file-sharing-acs) */\nimport { AttachmentMetadata } from '@internal/acs-ui-common';\nimport { useChatMessageRichTextEditContainerStyles } from '../../styles/ChatMessageComponent.styles';\nimport { MAXIMUM_LENGTH_OF_MESSAGE } from '../../utils/SendBoxUtils';\n/* @conditional-compile-remove(rich-text-editor-image-upload) */\nimport {\n cancelInlineImageUpload,\n hasIncompleteAttachmentUploads,\n insertImagesToContentString,\n isAttachmentUploadCompleted,\n removeBrokenImageContentAndClearImageSizeStyles\n} from '../../utils/SendBoxUtils';\nimport {\n getMessageState,\n onRenderCancelIcon,\n onRenderSubmitIcon\n} from '../../utils/ChatMessageComponentAsEditBoxUtils';\n/* @conditional-compile-remove(file-sharing-acs) */\nimport {\n attachmentMetadataReducer,\n getMessageWithAttachmentMetadata,\n doesMessageContainMultipleAttachments\n} from '../../utils/ChatMessageComponentAsEditBoxUtils';\nimport { RichTextEditorComponentRef } from '../../RichTextEditor/RichTextEditor';\nimport { RichTextInputBoxComponent } from '../../RichTextEditor/RichTextInputBoxComponent';\nimport { editBoxRichTextEditorStyle, richTextActionButtonsStyle } from '../../styles/RichTextEditor.styles';\nimport { RichTextSendBoxErrors } from '../../RichTextEditor/RichTextSendBoxErrors';\nimport { useLocale } from '../../../localization';\n/* @conditional-compile-remove(file-sharing-acs) */\nimport { FluentV9ThemeProvider } from '../../../theming/FluentV9ThemeProvider';\n/* @conditional-compile-remove(file-sharing-acs) */\nimport { attachmentUploadCardsStyles } from '../../styles/SendBox.styles';\n/* @conditional-compile-remove(rich-text-editor-image-upload) */\nimport { SendBoxErrorBarError, SendBoxErrorBarType } from '../../SendBoxErrorBar';\n/* @conditional-compile-remove(rich-text-editor-image-upload) */\nimport { BROKEN_IMAGE_SVG_DATA } from '../../styles/Common.style';\n\n/** @private */\nexport type ChatMessageComponentAsRichTextEditBoxProps = {\n onCancel?: (messageId: string) => void;\n onSubmit: (\n text: string,\n /* @conditional-compile-remove(file-sharing-acs) */\n attachmentMetadata?: AttachmentMetadata[]\n ) => void;\n message: ChatMessage;\n strings: MessageThreadStrings;\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n onPaste?: (event: { content: DocumentFragment }) => void;\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n onCancelInlineImageUpload?: (imageId: string, messageId: string) => void;\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n onInsertInlineImage?: (imageUrl: string, imageFileName: string, messageId: string) => void;\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n inlineImages?: AttachmentMetadataInProgress[];\n};\n\n/**\n * @private\n */\nexport const ChatMessageComponentAsRichTextEditBox = (\n props: ChatMessageComponentAsRichTextEditBoxProps\n): JSX.Element => {\n const {\n onCancel,\n onSubmit,\n strings,\n message,\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n onPaste,\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n onInsertInlineImage,\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n inlineImages,\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n onCancelInlineImageUpload\n } = props;\n\n const initialContent = useMemo(() => {\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n const content = message.content;\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n const document = new DOMParser().parseFromString(content ?? '', 'text/html');\n // The broken image element is a div element with all the attributes of the original image element.\n // We need to convert it to a img element so the Rooster knows how to render it.\n // And we need to copy over all the attributes such as id, width, etc.\n // which is needed for sending the message with the images correctly.\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n document.querySelectorAll('.broken-image-wrapper').forEach((brokenImage) => {\n const imageElement = document.createElement('img');\n const attributes = brokenImage.attributes;\n for (const attribute of attributes) {\n imageElement.setAttribute(attribute.name, attribute.value);\n }\n\n imageElement.src = BROKEN_IMAGE_SVG_DATA;\n imageElement.style.width = '3rem';\n imageElement.style.height = '3rem';\n brokenImage.parentElement?.replaceChild(imageElement, brokenImage);\n });\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n return document.body.innerHTML;\n return message.content;\n }, [message]);\n\n const [textValue, setTextValue] = useState<string>(initialContent || '');\n\n /* @conditional-compile-remove(file-sharing-acs) */\n const [attachmentMetadata, handleAttachmentAction] = useReducer(\n attachmentMetadataReducer,\n getMessageWithAttachmentMetadata(message) ?? []\n );\n\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n const [attachmentUploadsPendingError, setAttachmentUploadsPendingError] = useState<SendBoxErrorBarError | undefined>(\n undefined\n );\n const editTextFieldRef = React.useRef<RichTextEditorComponentRef>(null);\n const theme = useTheme();\n const messageState = useMemo(() => {\n return getMessageState(textValue, /* @conditional-compile-remove(file-sharing-acs) */ attachmentMetadata ?? []);\n }, [/* @conditional-compile-remove(file-sharing-acs) */ attachmentMetadata, textValue]);\n\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n const imageUploadErrorMessage = useMemo(() => {\n return inlineImages?.filter((image) => image.error).pop()?.error?.message;\n }, [inlineImages]);\n\n const submitEnabled = messageState === 'OK';\n\n const editContainerStyles = useChatMessageRichTextEditContainerStyles();\n const chatMyMessageStyles = useChatMyMessageStyles();\n const locale = useLocale().strings;\n\n const setText = useCallback((newValue?: string): void => {\n setTextValue(newValue ?? '');\n }, []);\n\n useEffect(() => {\n editTextFieldRef.current?.focus();\n }, []);\n\n const textTooLongMessage = useMemo(() => {\n return messageState === 'too long'\n ? _formatString(strings.editBoxTextLimit, { limitNumber: `${MAXIMUM_LENGTH_OF_MESSAGE}` })\n : undefined;\n }, [messageState, strings.editBoxTextLimit]);\n\n const iconClassName = useCallback(\n (isHover: boolean) => {\n const color = isHover ? theme.palette.accent : theme.palette.neutralSecondary;\n return mergeStyles(richTextEditBoxActionButtonIcon, { color });\n },\n [theme.palette.accent, theme.palette.neutralSecondary]\n );\n\n const onRenderThemedCancelIcon = useCallback(\n (isHover: boolean) => {\n return onRenderCancelIcon(iconClassName(isHover));\n },\n [iconClassName]\n );\n\n const onRenderThemedSubmitIcon = useCallback(\n (isHover: boolean) => {\n return onRenderSubmitIcon(iconClassName(isHover));\n },\n [iconClassName]\n );\n\n /* @conditional-compile-remove(file-sharing-acs) */\n const hasMultipleAttachments = useMemo(() => {\n return doesMessageContainMultipleAttachments(message);\n }, [message]);\n\n const onSubmitHandler = useCallback((): void => {\n if (!submitEnabled) {\n return;\n }\n // Don't send message until all attachments have been uploaded successfully\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n setAttachmentUploadsPendingError(undefined);\n\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n if (hasIncompleteAttachmentUploads(inlineImages)) {\n setAttachmentUploadsPendingError({\n message: strings.imageUploadsPendingError,\n timestamp: Date.now(),\n errorBarType: SendBoxErrorBarType.info\n });\n return;\n }\n\n let content = textValue;\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n content = removeBrokenImageContentAndClearImageSizeStyles(content);\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n if (isAttachmentUploadCompleted(inlineImages)) {\n insertImagesToContentString(textValue, inlineImages, (content) => {\n onSubmit(content, /* @conditional-compile-remove(file-sharing-acs) */ attachmentMetadata || []);\n });\n return;\n }\n // it's very important to pass an empty attachment here\n // so when user removes all attachments, UI can reflect it instantly\n // if you set it to undefined, the attachments pre-edited would still be there\n // until edit message event is received\n onSubmit(content, /* @conditional-compile-remove(file-sharing-acs) */ attachmentMetadata || []);\n }, [\n submitEnabled,\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n inlineImages,\n textValue,\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n strings.imageUploadsPendingError,\n onSubmit,\n /* @conditional-compile-remove(file-sharing-acs) */\n attachmentMetadata\n ]);\n\n const actionButtons = useMemo(() => {\n return (\n <Stack horizontal>\n <InputBoxButton\n className={richTextActionButtonsStyle}\n ariaLabel={strings.editBoxCancelButton}\n tooltipContent={strings.editBoxCancelButton}\n onRenderIcon={onRenderThemedCancelIcon}\n onClick={() => {\n onCancel && onCancel(message.messageId);\n }}\n id={'dismissIconWrapper'}\n data-testId={strings.editBoxCancelButton}\n />\n <InputBoxButton\n className={richTextActionButtonsStyle}\n ariaLabel={strings.editBoxSubmitButton}\n tooltipContent={strings.editBoxSubmitButton}\n onRenderIcon={onRenderThemedSubmitIcon}\n onClick={(e) => {\n onSubmitHandler();\n e.stopPropagation();\n }}\n id={'submitIconWrapper'}\n data-testId={strings.editBoxSubmitButton}\n />\n </Stack>\n );\n }, [\n message.messageId,\n onCancel,\n onRenderThemedCancelIcon,\n onRenderThemedSubmitIcon,\n strings.editBoxCancelButton,\n strings.editBoxSubmitButton,\n onSubmitHandler\n ]);\n const richTextLocaleStrings = useMemo(() => {\n /* @conditional-compile-remove(rich-text-editor) */\n return { ...locale.richTextSendBox, ...strings };\n return locale.sendBox;\n }, [\n /* @conditional-compile-remove(rich-text-editor) */ locale.richTextSendBox,\n /* @conditional-compile-remove(rich-text-editor) */ strings,\n locale.sendBox\n ]);\n\n /* @conditional-compile-remove(file-sharing-acs) */\n const onCancelAttachmentUpload = useCallback((attachmentId: string) => {\n // edit box only capable of removing attachments\n // we need to expand attachment actions\n // if we want to support more actions e.g. add\n handleAttachmentAction({ type: 'remove', id: attachmentId });\n }, []);\n\n /* @conditional-compile-remove(file-sharing-acs) */\n const onRenderAttachmentUploads = useCallback(() => {\n return (\n <Stack className={attachmentUploadCardsStyles}>\n <FluentV9ThemeProvider v8Theme={theme}>\n <_AttachmentUploadCards\n attachments={attachmentMetadata}\n onCancelAttachmentUpload={onCancelAttachmentUpload}\n />\n </FluentV9ThemeProvider>\n </Stack>\n );\n }, [attachmentMetadata, onCancelAttachmentUpload, theme]);\n\n const onChangeHandler = useCallback(\n (\n content: string | undefined,\n /* @conditional-compile-remove(rich-text-editor-image-upload) */ imageSrcArray?: Array<string>\n ) => {\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n cancelInlineImageUpload({\n imageSrcArray,\n inlineImages,\n messageId: message.messageId,\n editBoxOnCancelInlineImageUpload: onCancelInlineImageUpload,\n sendBoxOnCancelInlineImageUpload: undefined\n });\n setText(content);\n },\n [\n setText,\n /* @conditional-compile-remove(rich-text-editor-image-upload) */ inlineImages,\n /* @conditional-compile-remove(rich-text-editor-image-upload) */ onCancelInlineImageUpload,\n /* @conditional-compile-remove(rich-text-editor-image-upload) */ message.messageId\n ]\n );\n\n const getContent = (): JSX.Element => {\n return (\n <Stack className={mergeStyles(editBoxWidthStyles)}>\n <RichTextSendBoxErrors\n textTooLongMessage={textTooLongMessage}\n systemMessage={message.failureReason}\n /* @conditional-compile-remove(rich-text-editor-image-upload) */ attachmentUploadsPendingError={\n attachmentUploadsPendingError\n }\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n attachmentProgressError={\n imageUploadErrorMessage\n ? {\n message: imageUploadErrorMessage,\n timestamp: Date.now(),\n errorBarType: SendBoxErrorBarType.error\n }\n : undefined\n }\n />\n <RichTextInputBoxComponent\n placeholderText={strings.editBoxPlaceholderText}\n onChange={onChangeHandler}\n editorComponentRef={editTextFieldRef}\n initialContent={initialContent}\n strings={richTextLocaleStrings}\n disabled={false}\n actionComponents={actionButtons}\n richTextEditorStyleProps={editBoxRichTextEditorStyle}\n isHorizontalLayoutDisabled={true}\n /* @conditional-compile-remove(file-sharing-acs) */\n onRenderAttachmentUploads={onRenderAttachmentUploads}\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n onPaste={onPaste}\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n onInsertInlineImage={\n onInsertInlineImage\n ? (imageUrl: string, imageFileName: string) => {\n onInsertInlineImage(imageUrl, imageFileName, message.messageId);\n }\n : undefined\n }\n />\n </Stack>\n );\n };\n\n const attached = message.attached === true ? 'center' : message.attached === 'bottom' ? 'bottom' : 'top';\n return (\n <ChatMyMessage\n attached={attached}\n root={{\n className: mergeClasses(\n chatMyMessageStyles.root,\n /* @conditional-compile-remove(file-sharing-acs) */\n hasMultipleAttachments ? chatMyMessageStyles.multipleAttachmentsInEditing : undefined\n )\n }}\n body={{\n className: mergeClasses(\n editContainerStyles.body,\n attached !== 'top' ? editContainerStyles.bodyAttached : undefined\n )\n }}\n >\n {getContent()}\n </ChatMyMessage>\n );\n};\n\nexport default ChatMessageComponentAsRichTextEditBox;\n"]}
@@ -1,5 +1,8 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
2
  // Licensed under the MIT License.
3
+ // Permit `any` in this file to handle the overloaded issue type. Todo: refactor CallSurvey to have PartialDeep<_CallSurvey> instead of any
4
+ // for tracking incomplete survey responses.
5
+ /* eslint-disable @typescript-eslint/no-explicit-any */
3
6
  import React, { useCallback, useEffect, useMemo, useState } from 'react';
4
7
  import { Text, useTheme, Stack, Checkbox, Pivot, PivotItem, TextField } from '@fluentui/react';
5
8
  import { _getKeys } from "../../../../../acs-ui-common/src";
@@ -1 +1 @@
1
- {"version":3,"file":"TagsSurvey.js","sourceRoot":"","sources":["../../../../../../../../react-components/src/components/Survey/TagsSurvey/TagsSurvey.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACzE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC/F,OAAO,EAAiB,QAAQ,EAAY,yCAAgC;AAC5E,OAAO,EACL,iBAAiB,EACjB,iBAAiB,EACjB,eAAe,EACf,0BAA0B,EAC1B,0BAA0B,EAC3B,MAAM,qBAAqB,CAAC;AAqE7B;;;;GAIG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,KAAuB,EAAe,EAAE;IAClE,MAAM,EAAE,eAAe,EAAE,gBAAgB,EAAE,SAAS,EAAE,OAAO,EAAE,qBAAqB,EAAE,GAAG,KAAK,CAAC;IAE/F,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,QAAQ,CAAc,EAAE,CAAC,CAAC;IAElE,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,QAAQ,CAAmC,EAAE,CAAC,CAAC;IAEvF,MAAM,CAAC,oBAAoB,EAAE,uBAAuB,CAAC,GAAG,QAAQ,CAAmC,EAAE,CAAC,CAAC;IAEvG,MAAM,CAAC,iBAAiB,EAAE,oBAAoB,CAAC,GAAG,QAAQ,CAAmB,EAAE,CAAC,CAAC;IAEjF,MAAM,IAAI,GAAe,OAAO,CAAC,GAAG,EAAE;QACpC,M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D,aAAa,EAAE,GAAG,EAAE;wBAClB,OAAO,aAAa,CAAC,GAAG,CAAC,CAAC;oBAC5B,CAAC,GACD,CACH,CACS,CACb,CAAC;QACJ,CAAC,CAAC,CACI;QAER,oBAAC,IAAI,IAAC,SAAS,EAAE,eAAe,CAAC,KAAK,CAAC,IAAG,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,oBAAoB,CAAQ,CAC9E,CACJ,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React, { useCallback, useEffect, useMemo, useState } from 'react';\nimport { Text, useTheme, Stack, Checkbox, Pivot, PivotItem, TextField } from '@fluentui/react';\nimport { _formatString, _getKeys, _pxToRem } from '@internal/acs-ui-common';\nimport {\n checkboxClassName,\n questionTextStyle,\n helperTextStyle,\n freeFormTextFieldClassName,\n freeFormTextCheckboxStyles\n} from './TagsSurvey.styles';\nimport {\n _AudioIssue,\n _CallRating,\n _CallSurvey,\n _CallSurveyResponse,\n _OverallIssue,\n _ScreenshareIssue,\n _VideoIssue\n} from '../SurveyTypes';\nimport { SurveyIssuesHeadingStrings, SurveyIssues, CallSurveyImprovementSuggestions } from '../../../types';\n/**\n * Strings of {@link TagsSurvey} that can be overridden.\n *\n * @internal\n */\nexport interface _TagsSurveyStrings {\n /**\n * Survey question\n */\n tagsSurveyQuestion?: string;\n /**\n * Helper text for tag survey explaining what the survey is for\n */\n tagsSurveyHelperText?: string;\n /**\n * Default text for free form text field inside tags survey\n */\n tagsSurveyTextFieldDefaultText?: string;\n}\n\n/**\n * Survey Issue categories\n *\n * @internal\n */\nexport type _IssueCategory = 'overallRating' | 'audioRating' | 'videoRating' | 'screenshareRating';\n\n/**\n * Key value pair of survey catogories and corresponding message/issue\n *\n * @internal\n */\nexport type _SurveyTag = Record<\n _IssueCategory,\n {\n message: string;\n issue: _AudioIssue | _OverallIssue | _ScreenshareIssue | _VideoIssue;\n }[]\n>;\n\n/**\n * Props for {@link TagsSurvey} component.\n *\n * @internal\n */\nexport interface _TagsSurveyProps {\n /** Mappings from call issues to tags displayed on the survey*/\n callIssuesToTag: SurveyIssues;\n /** Mappings from issue category to categories displayed on survey*/\n categoryHeadings: SurveyIssuesHeadingStrings;\n /** Function to send TagsSurvey results*/\n onConfirm?: (selectedTags: _CallSurvey, improvementSuggestions?: CallSurveyImprovementSuggestions) => void;\n /** show the text field for more info*/\n showFreeFormTextField?: boolean;\n /** Tags survey strings */\n strings?: _TagsSurveyStrings;\n}\n\n/**\n * A component to allow users to send numerical ratings regarding call quality\n *\n * @internal\n */\nexport const _TagsSurvey = (props: _TagsSurveyProps): JSX.Element => {\n const { callIssuesToTag, categoryHeadings, onConfirm, strings, showFreeFormTextField } = props;\n\n const [selectedTags, setSelectedTags] = useState<_CallSurvey>({});\n\n const [textResponse, setTextResponse] = useState<CallSurveyImprovementSuggestions>({});\n\n const [selectedTextResponse, setSelectedTextResponse] = useState<CallSurveyImprovementSuggestions>({});\n\n const [checkedTextFields, setCheckedTextFields] = useState<_IssueCategory[]>([]);\n\n const tags: _SurveyTag = useMemo(() => {\n const tags: _SurveyTag = {\n overallRating: [],\n audioRating: [],\n videoRating: [],\n screenshareRating: []\n };\n _getKeys(callIssuesToTag).forEach((issueCategory) => {\n _getKeys(callIssuesToTag[issueCategory]).map((issue) => {\n const issueCapitalized = (issue?.charAt(0).toUpperCase() + issue?.slice(1)) as\n | _AudioIssue\n | _OverallIssue\n | _ScreenshareIssue\n | _VideoIssue;\n\n const issueMessages = callIssuesToTag[issueCategory];\n if (tags[issueCategory]) {\n tags[issueCategory].push({\n message: issueMessages[issue],\n issue: issueCapitalized\n });\n } else {\n tags[issueCategory] = [\n {\n message: issueMessages[issue],\n issue: issueCapitalized\n }\n ];\n }\n });\n });\n return tags;\n }, [callIssuesToTag]);\n\n const onChange = React.useCallback(\n (\n issueCategory: _IssueCategory,\n checked: boolean,\n issue?: _AudioIssue | _OverallIssue | _ScreenshareIssue | _VideoIssue\n ): void => {\n if (checked) {\n if (issue) {\n setSelectedTags((prevState) => {\n const existingIssues = prevState?.[issueCategory]?.issues;\n if (existingIssues) {\n (prevState[issueCategory]!.issues as unknown[]) = [...existingIssues, issue];\n } else {\n (prevState[issueCategory] as { issues: unknown[] }) = { issues: [issue] };\n }\n return prevState;\n });\n } else {\n setCheckedTextFields([...checkedTextFields, issueCategory]);\n setSelectedTextResponse((prevState) => {\n prevState[issueCategory] = textResponse[issueCategory];\n return prevState;\n });\n }\n } else {\n if (issue) {\n setSelectedTags((prevState) => {\n // 'prevState[issueCategory]?.issues as ...' typing is required here to avoid a typescript limitation\n // \"This expression is not callable\" caused by filter().\n // More information can be found here: https://github.com/microsoft/TypeScript/issues/44373\n const categoryIssues = (\n prevState[issueCategory]?.issues as (_AudioIssue | _OverallIssue | _ScreenshareIssue | _VideoIssue)[]\n )?.filter((value: _AudioIssue | _OverallIssue | _ScreenshareIssue | _VideoIssue) => value !== issue);\n return {\n ...prevState,\n [issueCategory]: {\n ...(prevState[issueCategory] || {}),\n issues: categoryIssues\n }\n };\n });\n } else {\n setCheckedTextFields(checkedTextFields.filter((id) => id !== issueCategory));\n setSelectedTextResponse((prevState) => {\n delete prevState[issueCategory];\n return prevState;\n });\n }\n }\n },\n [textResponse, checkedTextFields]\n );\n\n const theme = useTheme();\n\n const onRenderLabel = useCallback(\n (issueCategory: _IssueCategory) => {\n return (\n <TextField\n key={issueCategory}\n className={freeFormTextFieldClassName}\n underlined\n placeholder={strings?.tagsSurveyTextFieldDefaultText}\n onChange={(e, v) => {\n if (v) {\n setCheckedTextFields([...checkedTextFields, issueCategory]);\n setTextResponse((prevState) => {\n prevState[issueCategory] = v;\n return prevState;\n });\n\n setSelectedTextResponse((prevState) => {\n prevState[issueCategory] = v;\n return prevState;\n });\n }\n }}\n />\n );\n },\n [strings?.tagsSurveyTextFieldDefaultText, checkedTextFields]\n );\n\n useEffect(() => {\n if (onConfirm) {\n onConfirm(selectedTags, selectedTextResponse);\n }\n }, [selectedTags, selectedTextResponse, onConfirm]);\n\n return (\n <>\n <Stack verticalAlign=\"center\">\n <Text className={questionTextStyle(theme)}>{strings?.tagsSurveyQuestion}</Text>\n </Stack>\n\n <Pivot>\n {_getKeys(tags).map((key, i) => {\n return (\n <PivotItem\n key={`key-${i}`}\n headerText={categoryHeadings[key]} // Add index signature to allow indexing with a string\n headerButtonProps={{\n 'data-order': i,\n 'data-title': key\n }}\n alwaysRender\n >\n {tags[key].map((t, i) => {\n return (\n <Checkbox\n className={checkboxClassName}\n key={`checkBox_${i}`}\n label={t.message}\n onChange={(ev, checked) => onChange(key, checked ?? false, t.issue)}\n />\n );\n })}\n {showFreeFormTextField && (\n <Checkbox\n checked={checkedTextFields.includes(key)}\n styles={freeFormTextCheckboxStyles}\n onChange={(ev, checked) => onChange(key, checked ?? false)}\n onRenderLabel={() => {\n return onRenderLabel(key);\n }}\n />\n )}\n </PivotItem>\n );\n })}\n </Pivot>\n\n <Text className={helperTextStyle(theme)}>{strings?.tagsSurveyHelperText}</Text>\n </>\n );\n};\n"]}
1
+ {"version":3,"file":"TagsSurvey.js","sourceRoot":"","sources":["../../../../../../../../react-components/src/components/Survey/TagsSurvey/TagsSurvey.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,2IAA2I;AAC3I,4CAA4C;AAC5C,uDAAuD;AAEvD,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACzE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC/F,OAAO,EAAiB,QAAQ,EAAY,yCAAgC;AAC5E,OAAO,EACL,iBAAiB,EACjB,iBAAiB,EACjB,eAAe,EACf,0BAA0B,EAC1B,0BAA0B,EAC3B,MAAM,qBAAqB,CAAC;AAqE7B;;;;GAIG;AACH,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AE,iBAAiB,EAC5B,GAAG,EAAE,YAAY,CAAC,EAAE,EACpB,KAAK,EAAE,CAAC,CAAC,OAAO,EAChB,QAAQ,EAAE,CAAC,EAAE,EAAE,OAAO,EAAE,EAAE,CAAC,QAAQ,CAAC,GAAG,EAAE,OAAO,aAAP,OAAO,cAAP,OAAO,GAAI,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,GACnE,CACH,CAAC;gBACJ,CAAC,CAAC;gBACD,qBAAqB,IAAI,CACxB,oBAAC,QAAQ,IACP,OAAO,EAAE,iBAAiB,CAAC,QAAQ,CAAC,GAAG,CAAC,EACxC,MAAM,EAAE,0BAA0B,EAClC,QAAQ,EAAE,CAAC,EAAE,EAAE,OAAO,EAAE,EAAE,CAAC,QAAQ,CAAC,GAAG,EAAE,OAAO,aAAP,OAAO,cAAP,OAAO,GAAI,KAAK,CAAC,EAC1D,aAAa,EAAE,GAAG,EAAE;wBAClB,OAAO,aAAa,CAAC,GAAG,CAAC,CAAC;oBAC5B,CAAC,GACD,CACH,CACS,CACb,CAAC;QACJ,CAAC,CAAC,CACI;QAER,oBAAC,IAAI,IAAC,SAAS,EAAE,eAAe,CAAC,KAAK,CAAC,IAAG,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,oBAAoB,CAAQ,CAC9E,CACJ,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n// Permit `any` in this file to handle the overloaded issue type. Todo: refactor CallSurvey to have PartialDeep<_CallSurvey> instead of any\n// for tracking incomplete survey responses.\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\nimport React, { useCallback, useEffect, useMemo, useState } from 'react';\nimport { Text, useTheme, Stack, Checkbox, Pivot, PivotItem, TextField } from '@fluentui/react';\nimport { _formatString, _getKeys, _pxToRem } from '@internal/acs-ui-common';\nimport {\n checkboxClassName,\n questionTextStyle,\n helperTextStyle,\n freeFormTextFieldClassName,\n freeFormTextCheckboxStyles\n} from './TagsSurvey.styles';\nimport {\n _AudioIssue,\n _CallRating,\n _CallSurvey,\n _CallSurveyResponse,\n _OverallIssue,\n _ScreenshareIssue,\n _VideoIssue\n} from '../SurveyTypes';\nimport { SurveyIssuesHeadingStrings, SurveyIssues, CallSurveyImprovementSuggestions } from '../../../types';\n/**\n * Strings of {@link TagsSurvey} that can be overridden.\n *\n * @internal\n */\nexport interface _TagsSurveyStrings {\n /**\n * Survey question\n */\n tagsSurveyQuestion?: string;\n /**\n * Helper text for tag survey explaining what the survey is for\n */\n tagsSurveyHelperText?: string;\n /**\n * Default text for free form text field inside tags survey\n */\n tagsSurveyTextFieldDefaultText?: string;\n}\n\n/**\n * Survey Issue categories\n *\n * @internal\n */\nexport type _IssueCategory = 'overallRating' | 'audioRating' | 'videoRating' | 'screenshareRating';\n\n/**\n * Key value pair of survey catogories and corresponding message/issue\n *\n * @internal\n */\nexport type _SurveyTag = Record<\n _IssueCategory,\n {\n message: string;\n issue: _AudioIssue | _OverallIssue | _ScreenshareIssue | _VideoIssue;\n }[]\n>;\n\n/**\n * Props for {@link TagsSurvey} component.\n *\n * @internal\n */\nexport interface _TagsSurveyProps {\n /** Mappings from call issues to tags displayed on the survey*/\n callIssuesToTag: SurveyIssues;\n /** Mappings from issue category to categories displayed on survey*/\n categoryHeadings: SurveyIssuesHeadingStrings;\n /** Function to send TagsSurvey results*/\n onConfirm?: (selectedTags: _CallSurvey, improvementSuggestions?: CallSurveyImprovementSuggestions) => void;\n /** show the text field for more info*/\n showFreeFormTextField?: boolean;\n /** Tags survey strings */\n strings?: _TagsSurveyStrings;\n}\n\n/**\n * A component to allow users to send numerical ratings regarding call quality\n *\n * @internal\n */\nexport const _TagsSurvey = (props: _TagsSurveyProps): JSX.Element => {\n const { callIssuesToTag, categoryHeadings, onConfirm, strings, showFreeFormTextField } = props;\n\n const [selectedTags, setSelectedTags] = useState<_CallSurvey>({});\n\n const [textResponse, setTextResponse] = useState<CallSurveyImprovementSuggestions>({});\n\n const [selectedTextResponse, setSelectedTextResponse] = useState<CallSurveyImprovementSuggestions>({});\n\n const [checkedTextFields, setCheckedTextFields] = useState<_IssueCategory[]>([]);\n\n const tags: _SurveyTag = useMemo(() => {\n const tags: _SurveyTag = {\n overallRating: [],\n audioRating: [],\n videoRating: [],\n screenshareRating: []\n };\n _getKeys(callIssuesToTag).forEach((issueCategory) => {\n _getKeys(callIssuesToTag[issueCategory]).map((issue) => {\n const issueCapitalized = (issue?.charAt(0).toUpperCase() + issue?.slice(1)) as\n | _AudioIssue\n | _OverallIssue\n | _ScreenshareIssue\n | _VideoIssue;\n\n const issueMessages = callIssuesToTag[issueCategory];\n if (tags[issueCategory]) {\n tags[issueCategory].push({\n message: issueMessages[issue],\n issue: issueCapitalized\n });\n } else {\n tags[issueCategory] = [\n {\n message: issueMessages[issue],\n issue: issueCapitalized\n }\n ];\n }\n });\n });\n return tags;\n }, [callIssuesToTag]);\n\n const onChange = React.useCallback(\n (\n issueCategory: _IssueCategory,\n checked: boolean,\n issue?: _AudioIssue | _OverallIssue | _ScreenshareIssue | _VideoIssue\n ): void => {\n if (checked) {\n if (issue) {\n setSelectedTags((prevState) => {\n const existingIssues = prevState?.[issueCategory]?.issues;\n if (existingIssues) {\n prevState[issueCategory]!.issues = [...existingIssues, issue] as any;\n } else {\n prevState[issueCategory] = { issues: [issue] } as any;\n }\n return prevState;\n });\n } else {\n setCheckedTextFields([...checkedTextFields, issueCategory]);\n setSelectedTextResponse((prevState) => {\n prevState[issueCategory] = textResponse[issueCategory];\n return prevState;\n });\n }\n } else {\n if (issue) {\n setSelectedTags((prevState) => {\n // 'prevState[issueCategory]?.issues as ...' typing is required here to avoid a typescript limitation\n // \"This expression is not callable\" caused by filter().\n // More information can be found here: https://github.com/microsoft/TypeScript/issues/44373\n const categoryIssues = (\n prevState[issueCategory]?.issues as (_AudioIssue | _OverallIssue | _ScreenshareIssue | _VideoIssue)[]\n )?.filter((value: _AudioIssue | _OverallIssue | _ScreenshareIssue | _VideoIssue) => value !== issue);\n return {\n ...prevState,\n [issueCategory]: {\n ...(prevState[issueCategory] || {}),\n issues: categoryIssues\n }\n };\n });\n } else {\n setCheckedTextFields(checkedTextFields.filter((id) => id !== issueCategory));\n setSelectedTextResponse((prevState) => {\n delete prevState[issueCategory];\n return prevState;\n });\n }\n }\n },\n [textResponse, checkedTextFields]\n );\n\n const theme = useTheme();\n\n const onRenderLabel = useCallback(\n (issueCategory: _IssueCategory) => {\n return (\n <TextField\n key={issueCategory}\n className={freeFormTextFieldClassName}\n underlined\n placeholder={strings?.tagsSurveyTextFieldDefaultText}\n onChange={(e, v) => {\n if (v) {\n setCheckedTextFields([...checkedTextFields, issueCategory]);\n setTextResponse((prevState) => {\n prevState[issueCategory] = v;\n return prevState;\n });\n\n setSelectedTextResponse((prevState) => {\n prevState[issueCategory] = v;\n return prevState;\n });\n }\n }}\n />\n );\n },\n [strings?.tagsSurveyTextFieldDefaultText, checkedTextFields]\n );\n\n useEffect(() => {\n if (onConfirm) {\n onConfirm(selectedTags, selectedTextResponse);\n }\n }, [selectedTags, selectedTextResponse, onConfirm]);\n\n return (\n <>\n <Stack verticalAlign=\"center\">\n <Text className={questionTextStyle(theme)}>{strings?.tagsSurveyQuestion}</Text>\n </Stack>\n\n <Pivot>\n {_getKeys(tags).map((key, i) => {\n return (\n <PivotItem\n key={`key-${i}`}\n headerText={categoryHeadings[key]} // Add index signature to allow indexing with a string\n headerButtonProps={{\n 'data-order': i,\n 'data-title': key\n }}\n alwaysRender\n >\n {tags[key].map((t, i) => {\n return (\n <Checkbox\n className={checkboxClassName}\n key={`checkBox_${i}`}\n label={t.message}\n onChange={(ev, checked) => onChange(key, checked ?? false, t.issue)}\n />\n );\n })}\n {showFreeFormTextField && (\n <Checkbox\n checked={checkedTextFields.includes(key)}\n styles={freeFormTextCheckboxStyles}\n onChange={(ev, checked) => onChange(key, checked ?? false)}\n onRenderLabel={() => {\n return onRenderLabel(key);\n }}\n />\n )}\n </PivotItem>\n );\n })}\n </Pivot>\n\n <Text className={helperTextStyle(theme)}>{strings?.tagsSurveyHelperText}</Text>\n </>\n );\n};\n"]}
@@ -56,7 +56,9 @@ export const addUploadedImagesToMessage = (message, inlineImages) => __awaiter(v
56
56
  var _a;
57
57
  // imageElement is a copy of original img element, so changes need to be made to the original img element
58
58
  img.id = (_a = uploadInlineImage === null || uploadInlineImage === void 0 ? void 0 : uploadInlineImage.id) !== null && _a !== void 0 ? _a : '';
59
- img.src = '';
59
+ if (uploadInlineImage === null || uploadInlineImage === void 0 ? void 0 : uploadInlineImage.url) {
60
+ img.src = uploadInlineImage.url;
61
+ }
60
62
  img.width = imageElement.width;
61
63
  img.height = imageElement.height;
62
64
  img.style.aspectRatio = `${imageElement.width} / ${imageElement.height}`;
@@ -1 +1 @@
1
- {"version":3,"file":"SendBoxUtils.js","sourceRoot":"","sources":["../../../../../../../react-components/src/components/utils/SendBoxUtils.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;AAOlC;;GAEG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,IAAI,CAAC;AAC9C,MAAM,mBAAmB,GAAG,OAAO,CAAC;AAEpC,mDAAmD;AACnD;;GAEG;AACH,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAC5C,uBAAmE,EAC1D,EAAE;IACX,OAAO,CAAC,CAAC,CACP,CAAA,uBAAuB,aAAvB,uBAAuB,uBAAvB,uBAAuB,CAAE,MAAM;QAC/B,CAAC,uBAAuB;aACrB,MAAM,CAAC,CAAC,gBAAgB,EAAE,EAAE,CAAC,CAAC,gBAAgB,CAAC,KAAK,CAAC;aACrD,KAAK,CAAC,CAAC,gBAAgB,EAAE,EAAE,CAAC,gBAAgB,CAAC,QAAQ,KAAK,CAAC,IAAI,gBAAgB,CAAC,QAAQ,KAAK,SAAS,CAAC,CAC3G,CAAC;AACJ,CAAC,CAAC;AAEF,mDAAmD;AACnD;;GAEG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG,CACzC,u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AC,SAAS,KAAK,sBAAsB,EAAE,CAAC;YAC7C,GAAG,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;YAC7B,GAAG,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC;YAC3B,GAAG,CAAC,eAAe,CAAC,YAAY,CAAC,CAAC;QACpC,CAAC;QACD,iEAAiE;QACjE,6EAA6E;QAC7E,4FAA4F;QAC5F,GAAG,CAAC,KAAK,CAAC,KAAK,GAAG,EAAE,CAAC;QACrB,GAAG,CAAC,KAAK,CAAC,MAAM,GAAG,EAAE,CAAC;QACtB,GAAG,CAAC,KAAK,CAAC,QAAQ,GAAG,EAAE,CAAC;QACxB,GAAG,CAAC,KAAK,CAAC,SAAS,GAAG,EAAE,CAAC;IAC3B,CAAC,CAAC,CAAC;IACH,OAAO,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC;AACjC,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/* @conditional-compile-remove(file-sharing-acs) */\nimport { AttachmentMetadataInProgress } from '@internal/acs-ui-common';\n/* @conditional-compile-remove(file-sharing-acs) */\nimport { AttachmentMetadata } from '@internal/acs-ui-common';\n\n/**\n * @private\n */\nexport const MAXIMUM_LENGTH_OF_MESSAGE = 8000;\nconst EMPTY_MESSAGE_REGEX = /^\\s*$/;\n\n/* @conditional-compile-remove(file-sharing-acs) */\n/**\n * @private\n */\nexport const hasIncompleteAttachmentUploads = (\n attachmentsWithProgress: AttachmentMetadataInProgress[] | undefined\n): boolean => {\n return !!(\n attachmentsWithProgress?.length &&\n !attachmentsWithProgress\n .filter((attachmentUpload) => !attachmentUpload.error)\n .every((attachmentUpload) => attachmentUpload.progress === 1 && attachmentUpload.progress !== undefined)\n );\n};\n\n/* @conditional-compile-remove(file-sharing-acs) */\n/**\n * @private\n */\nexport const isAttachmentUploadCompleted = (\n attachmentsWithProgress: AttachmentMetadataInProgress[] | undefined\n): boolean => {\n return !!attachmentsWithProgress?.find((attachment) => !attachment.error);\n};\n\n/* @conditional-compile-remove(rich-text-editor-image-upload) */\n/**\n * @internal\n */\n// Before sending the image, we need to add the image id we get back after uploading the images to the message content.\nexport const addUploadedImagesToMessage = async (\n message: string,\n inlineImages: AttachmentMetadataInProgress[]\n): Promise<string> => {\n if (message === '') {\n return message;\n }\n const document = new DOMParser().parseFromString(message ?? '', 'text/html');\n const imagesPromise = Array.from(document.querySelectorAll('img')).map((img) => {\n return new Promise<void>((resolve, rejects) => {\n const uploadInlineImage = inlineImages.find(\n (inlineImage) => !inlineImage.error && (inlineImage.url === img.src || inlineImage.id === img.id)\n );\n // The message might content images that comes with the message before editing, those images are not in the uploadInlineImages array.\n // This function should only modify the message content for images in the uploadInlineImages array.\n if (!uploadInlineImage) {\n resolve();\n return;\n }\n const imageElement = new Image();\n imageElement.src = img.src;\n imageElement.onload = () => {\n // imageElement is a copy of original img element, so changes need to be made to the original img element\n img.id = uploadInlineImage?.id ?? '';\n img.src = '';\n img.width = imageElement.width;\n img.height = imageElement.height;\n img.style.aspectRatio = `${imageElement.width} / ${imageElement.height}`;\n // Clear maxWidth and maxHeight styles that are set by roosterJS.\n // This is so that they can be set in messageThread styles without using the important flag.\n img.style.maxWidth = '';\n img.style.maxHeight = '';\n resolve();\n };\n imageElement.onerror = () => {\n console.log('Error loading image', img.src);\n rejects();\n };\n });\n });\n await Promise.all(imagesPromise);\n const newMessage = document.body.innerHTML;\n return newMessage;\n};\n\n/**\n * @private\n */\nexport const isMessageTooLong = (valueLength: number): boolean => {\n return valueLength > MAXIMUM_LENGTH_OF_MESSAGE;\n};\n\n/**\n * @private\n */\nexport const sanitizeText = (message: string): string => {\n if (EMPTY_MESSAGE_REGEX.test(message)) {\n return '';\n } else {\n return message;\n }\n};\n\n/**\n * Determines whether the send box should be disabled for ARIA accessibility.\n *\n * @param hasContent - Indicates whether the send box has content.\n * @param hasCompletedAttachmentUploads - Indicates whether attachment uploads have completed.\n * @param hasError - Indicates whether there is an error.\n * @param disabled - Indicates whether the send box is disabled.\n * @returns A boolean value indicating whether the send box should be disabled for ARIA accessibility.\n */\nexport const isSendBoxButtonAriaDisabled = ({\n hasContent,\n /* @conditional-compile-remove(file-sharing-acs) */\n hasCompletedAttachmentUploads,\n hasError,\n disabled\n}: {\n hasContent: boolean;\n /* @conditional-compile-remove(file-sharing-acs) */\n hasCompletedAttachmentUploads: boolean;\n hasError: boolean;\n disabled: boolean;\n}): boolean => {\n return (\n // no content\n !(hasContent || /* @conditional-compile-remove(file-sharing-acs) */ hasCompletedAttachmentUploads) ||\n //error message exists\n hasError ||\n disabled\n );\n};\n\n/* @conditional-compile-remove(rich-text-editor-image-upload) */\ninterface CancelInlineImageUploadProps {\n imageSrcArray: string[] | undefined;\n inlineImages: AttachmentMetadataInProgress[] | undefined;\n messageId?: string;\n editBoxOnCancelInlineImageUpload?: (id: string, messageId: string) => void;\n sendBoxOnCancelInlineImageUpload?: (id: string) => void;\n}\n\n/* @conditional-compile-remove(rich-text-editor-image-upload) */\n/**\n * @internal\n */\nexport const cancelInlineImageUpload = (props: CancelInlineImageUploadProps): void => {\n const { imageSrcArray, inlineImages, messageId, editBoxOnCancelInlineImageUpload, sendBoxOnCancelInlineImageUpload } =\n props;\n if (imageSrcArray && inlineImages && inlineImages?.length > 0) {\n inlineImages?.map((inlineImage) => {\n if (inlineImage.url && !imageSrcArray?.includes(inlineImage.url)) {\n sendBoxOnCancelInlineImageUpload && sendBoxOnCancelInlineImageUpload(inlineImage.id);\n editBoxOnCancelInlineImageUpload && editBoxOnCancelInlineImageUpload(inlineImage.id, messageId || '');\n }\n });\n }\n};\n\n/* @conditional-compile-remove(file-sharing-acs) */\n/**\n * @internal\n */\nexport const toAttachmentMetadata = (\n attachmentsWithProgress: AttachmentMetadataInProgress[] | undefined\n): AttachmentMetadata[] | undefined => {\n return attachmentsWithProgress\n ?.filter((attachment) => {\n return !('error' in attachment) && !attachment.error?.message;\n })\n .map((attachment) => {\n return {\n id: attachment.id,\n name: attachment.name,\n url: attachment.url ?? ''\n };\n });\n};\n\n/* @conditional-compile-remove(rich-text-editor-image-upload) */\n/**\n * @internal\n */\nexport const insertImagesToContentString = async (\n content: string,\n inlineImages?: AttachmentMetadataInProgress[],\n onCompleted?: (content: string) => void\n): Promise<void> => {\n if (!inlineImages || inlineImages.length <= 0) {\n onCompleted?.(content);\n }\n const newContent = await addUploadedImagesToMessage(content, inlineImages ?? []);\n onCompleted?.(newContent);\n};\n\n/* @conditional-compile-remove(rich-text-editor-image-upload) */\n/**\n * @internal\n */\nexport const removeBrokenImageContentAndClearImageSizeStyles = (content: string): string => {\n const document = new DOMParser().parseFromString(content, 'text/html');\n document.querySelectorAll('img').forEach((img) => {\n // Before submitting/resend the message, we need to trim the unnecessary attributes such as src,\n // which is set to a local svg of a broken image icon at this point.\n // Once message is submitted/resent, it will be fetched again and might not be a broken image anymore,\n // That's why we need to remove the class and data-ui-id attribute of 'broken-image-wrapper'\n if (img.className === 'broken-image-wrapper') {\n img.removeAttribute('class');\n img.removeAttribute('src');\n img.removeAttribute('data-ui-id');\n }\n // Clear maxWidth and maxHeight styles that are set by roosterJS.\n // Clear width and height styles as the width and height is set in attributes\n // This is so that they can be set in messageThread styles without using the important flag.\n img.style.width = '';\n img.style.height = '';\n img.style.maxWidth = '';\n img.style.maxHeight = '';\n });\n return document.body.innerHTML;\n};\n"]}
1
+ {"version":3,"file":"SendBoxUtils.js","sourceRoot":"","sources":["../../../../../../../react-components/src/components/utils/SendBoxUtils.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;AAOlC;;GAEG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,IAAI,CAAC;AAC9C,MAAM,mBAAmB,GAAG,OAAO,CAAC;AAEpC,mDAAmD;AACnD;;GAEG;AACH,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAC5C,uBAAmE,EAC1D,EAAE;IACX,OAAO,CAAC,CAAC,CACP,CAAA,uBAAuB,aAAvB,uBAAuB,uBAA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Z,YAAY,GAAI,EAAE,CAAC,CAAC;IACjF,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAG,UAAU,CAAC,CAAC;AAC5B,CAAC,CAAA,CAAC;AAEF,gEAAgE;AAChE;;GAEG;AACH,MAAM,CAAC,MAAM,+CAA+C,GAAG,CAAC,OAAe,EAAU,EAAE;IACzF,MAAM,QAAQ,GAAG,IAAI,SAAS,EAAE,CAAC,eAAe,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;IACvE,QAAQ,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;QAC/C,gGAAgG;QAChG,oEAAoE;QACpE,sGAAsG;QACtG,4FAA4F;QAC5F,IAAI,GAAG,CAAC,SAAS,KAAK,sBAAsB,EAAE,CAAC;YAC7C,GAAG,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;YAC7B,GAAG,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC;YAC3B,GAAG,CAAC,eAAe,CAAC,YAAY,CAAC,CAAC;QACpC,CAAC;QACD,iEAAiE;QACjE,6EAA6E;QAC7E,4FAA4F;QAC5F,GAAG,CAAC,KAAK,CAAC,KAAK,GAAG,EAAE,CAAC;QACrB,GAAG,CAAC,KAAK,CAAC,MAAM,GAAG,EAAE,CAAC;QACtB,GAAG,CAAC,KAAK,CAAC,QAAQ,GAAG,EAAE,CAAC;QACxB,GAAG,CAAC,KAAK,CAAC,SAAS,GAAG,EAAE,CAAC;IAC3B,CAAC,CAAC,CAAC;IACH,OAAO,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC;AACjC,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/* @conditional-compile-remove(file-sharing-acs) */\nimport { AttachmentMetadataInProgress } from '@internal/acs-ui-common';\n/* @conditional-compile-remove(file-sharing-acs) */\nimport { AttachmentMetadata } from '@internal/acs-ui-common';\n\n/**\n * @private\n */\nexport const MAXIMUM_LENGTH_OF_MESSAGE = 8000;\nconst EMPTY_MESSAGE_REGEX = /^\\s*$/;\n\n/* @conditional-compile-remove(file-sharing-acs) */\n/**\n * @private\n */\nexport const hasIncompleteAttachmentUploads = (\n attachmentsWithProgress: AttachmentMetadataInProgress[] | undefined\n): boolean => {\n return !!(\n attachmentsWithProgress?.length &&\n !attachmentsWithProgress\n .filter((attachmentUpload) => !attachmentUpload.error)\n .every((attachmentUpload) => attachmentUpload.progress === 1 && attachmentUpload.progress !== undefined)\n );\n};\n\n/* @conditional-compile-remove(file-sharing-acs) */\n/**\n * @private\n */\nexport const isAttachmentUploadCompleted = (\n attachmentsWithProgress: AttachmentMetadataInProgress[] | undefined\n): boolean => {\n return !!attachmentsWithProgress?.find((attachment) => !attachment.error);\n};\n\n/* @conditional-compile-remove(rich-text-editor-image-upload) */\n/**\n * @internal\n */\n// Before sending the image, we need to add the image id we get back after uploading the images to the message content.\nexport const addUploadedImagesToMessage = async (\n message: string,\n inlineImages: AttachmentMetadataInProgress[]\n): Promise<string> => {\n if (message === '') {\n return message;\n }\n const document = new DOMParser().parseFromString(message ?? '', 'text/html');\n const imagesPromise = Array.from(document.querySelectorAll('img')).map((img) => {\n return new Promise<void>((resolve, rejects) => {\n const uploadInlineImage = inlineImages.find(\n (inlineImage) => !inlineImage.error && (inlineImage.url === img.src || inlineImage.id === img.id)\n );\n // The message might content images that comes with the message before editing, those images are not in the uploadInlineImages array.\n // This function should only modify the message content for images in the uploadInlineImages array.\n if (!uploadInlineImage) {\n resolve();\n return;\n }\n const imageElement = new Image();\n imageElement.src = img.src;\n imageElement.onload = () => {\n // imageElement is a copy of original img element, so changes need to be made to the original img element\n img.id = uploadInlineImage?.id ?? '';\n if (uploadInlineImage?.url) {\n img.src = uploadInlineImage.url;\n }\n img.width = imageElement.width;\n img.height = imageElement.height;\n img.style.aspectRatio = `${imageElement.width} / ${imageElement.height}`;\n // Clear maxWidth and maxHeight styles that are set by roosterJS.\n // This is so that they can be set in messageThread styles without using the important flag.\n img.style.maxWidth = '';\n img.style.maxHeight = '';\n resolve();\n };\n imageElement.onerror = () => {\n console.log('Error loading image', img.src);\n rejects();\n };\n });\n });\n await Promise.all(imagesPromise);\n const newMessage = document.body.innerHTML;\n return newMessage;\n};\n\n/**\n * @private\n */\nexport const isMessageTooLong = (valueLength: number): boolean => {\n return valueLength > MAXIMUM_LENGTH_OF_MESSAGE;\n};\n\n/**\n * @private\n */\nexport const sanitizeText = (message: string): string => {\n if (EMPTY_MESSAGE_REGEX.test(message)) {\n return '';\n } else {\n return message;\n }\n};\n\n/**\n * Determines whether the send box should be disabled for ARIA accessibility.\n *\n * @param hasContent - Indicates whether the send box has content.\n * @param hasCompletedAttachmentUploads - Indicates whether attachment uploads have completed.\n * @param hasError - Indicates whether there is an error.\n * @param disabled - Indicates whether the send box is disabled.\n * @returns A boolean value indicating whether the send box should be disabled for ARIA accessibility.\n */\nexport const isSendBoxButtonAriaDisabled = ({\n hasContent,\n /* @conditional-compile-remove(file-sharing-acs) */\n hasCompletedAttachmentUploads,\n hasError,\n disabled\n}: {\n hasContent: boolean;\n /* @conditional-compile-remove(file-sharing-acs) */\n hasCompletedAttachmentUploads: boolean;\n hasError: boolean;\n disabled: boolean;\n}): boolean => {\n return (\n // no content\n !(hasContent || /* @conditional-compile-remove(file-sharing-acs) */ hasCompletedAttachmentUploads) ||\n //error message exists\n hasError ||\n disabled\n );\n};\n\n/* @conditional-compile-remove(rich-text-editor-image-upload) */\ninterface CancelInlineImageUploadProps {\n imageSrcArray: string[] | undefined;\n inlineImages: AttachmentMetadataInProgress[] | undefined;\n messageId?: string;\n editBoxOnCancelInlineImageUpload?: (id: string, messageId: string) => void;\n sendBoxOnCancelInlineImageUpload?: (id: string) => void;\n}\n\n/* @conditional-compile-remove(rich-text-editor-image-upload) */\n/**\n * @internal\n */\nexport const cancelInlineImageUpload = (props: CancelInlineImageUploadProps): void => {\n const { imageSrcArray, inlineImages, messageId, editBoxOnCancelInlineImageUpload, sendBoxOnCancelInlineImageUpload } =\n props;\n if (imageSrcArray && inlineImages && inlineImages?.length > 0) {\n inlineImages?.map((inlineImage) => {\n if (inlineImage.url && !imageSrcArray?.includes(inlineImage.url)) {\n sendBoxOnCancelInlineImageUpload && sendBoxOnCancelInlineImageUpload(inlineImage.id);\n editBoxOnCancelInlineImageUpload && editBoxOnCancelInlineImageUpload(inlineImage.id, messageId || '');\n }\n });\n }\n};\n\n/* @conditional-compile-remove(file-sharing-acs) */\n/**\n * @internal\n */\nexport const toAttachmentMetadata = (\n attachmentsWithProgress: AttachmentMetadataInProgress[] | undefined\n): AttachmentMetadata[] | undefined => {\n return attachmentsWithProgress\n ?.filter((attachment) => {\n return !('error' in attachment) && !attachment.error?.message;\n })\n .map((attachment) => {\n return {\n id: attachment.id,\n name: attachment.name,\n url: attachment.url ?? ''\n };\n });\n};\n\n/* @conditional-compile-remove(rich-text-editor-image-upload) */\n/**\n * @internal\n */\nexport const insertImagesToContentString = async (\n content: string,\n inlineImages?: AttachmentMetadataInProgress[],\n onCompleted?: (content: string) => void\n): Promise<void> => {\n if (!inlineImages || inlineImages.length <= 0) {\n onCompleted?.(content);\n }\n const newContent = await addUploadedImagesToMessage(content, inlineImages ?? []);\n onCompleted?.(newContent);\n};\n\n/* @conditional-compile-remove(rich-text-editor-image-upload) */\n/**\n * @internal\n */\nexport const removeBrokenImageContentAndClearImageSizeStyles = (content: string): string => {\n const document = new DOMParser().parseFromString(content, 'text/html');\n document.querySelectorAll('img').forEach((img) => {\n // Before submitting/resend the message, we need to trim the unnecessary attributes such as src,\n // which is set to a local svg of a broken image icon at this point.\n // Once message is submitted/resent, it will be fetched again and might not be a broken image anymore,\n // That's why we need to remove the class and data-ui-id attribute of 'broken-image-wrapper'\n if (img.className === 'broken-image-wrapper') {\n img.removeAttribute('class');\n img.removeAttribute('src');\n img.removeAttribute('data-ui-id');\n }\n // Clear maxWidth and maxHeight styles that are set by roosterJS.\n // Clear width and height styles as the width and height is set in attributes\n // This is so that they can be set in messageThread styles without using the important flag.\n img.style.width = '';\n img.style.height = '';\n img.style.maxWidth = '';\n img.style.maxHeight = '';\n });\n return document.body.innerHTML;\n};\n"]}
@@ -24,7 +24,7 @@
24
24
  "placeholderText": "أدخل رسالة",
25
25
  "textTooLong": "تجاوز طول الرسالة الحد الأقصى.",
26
26
  "sendButtonAriaLabel": "إرسال رسالة",
27
- "attachmentUploadsPendingError": "جارِ التحميل... يرجى الانتظار.",
27
+ "attachmentUploadsPendingError": "يتم الآن تحميل الملف، الرجاء الانتظار.",
28
28
  "removeAttachment": "إزالة الملف",
29
29
  "uploading": "جارٍ التحميل",
30
30
  "uploadCompleted": "اكتمل التحميل",
@@ -34,7 +34,8 @@
34
34
  "placeholderText": "أدخل رسالة",
35
35
  "textTooLong": "تجاوز طول الرسالة الحد الأقصى.",
36
36
  "sendButtonAriaLabel": "إرسال رسالة",
37
- "attachmentUploadsPendingError": "جارٍ التحميل... الرجاء الانتظار.",
37
+ "attachmentUploadsPendingError": "يتم الآن تحميل الملف، الرجاء الانتظار.",
38
+ "imageUploadsPendingError": "يتم الآن تحميل الصورة، الرجاء الانتظار.",
38
39
  "removeAttachment": "إزالة الملف",
39
40
  "uploading": "يتم الآن التحميل",
40
41
  "uploadCompleted": "اكتمل التحميل",
@@ -58,7 +59,11 @@
58
59
  "richTextDeleteRowMenu": "حذف الصف",
59
60
  "richTextDeleteTableMenu": "حذف الجدول",
60
61
  "richTextToolbarMoreButtonAriaLabel": "خيارات إضافية",
61
- "attachmentMoreMenu": "خيارات إضافية"
62
+ "attachmentMoreMenu": "خيارات إضافية",
63
+ "richTextNewBulletedListItemAnnouncement": "رمز نقطي، سطر جديد",
64
+ "richTextNewNumberedListItemAnnouncement": "{0}، سطر جديد",
65
+ "richTextBulletedListAppliedAnnouncement": "تم تطبيق قائمة نقطية",
66
+ "richTextNumberedListAppliedAnnouncement": "تطبيق قائمة ذات تعداد رقمي"
62
67
  },
63
68
  "mentionPopover": {
64
69
  "mentionPopoverHeader": "الاقتراحات"
@@ -221,7 +226,12 @@
221
226
  "richTextDeleteRowMenu": "حذف الصف",
222
227
  "richTextDeleteTableMenu": "حذف الجدول",
223
228
  "richTextToolbarMoreButtonAriaLabel": "خيارات إضافية",
224
- "attachmentUploadsPendingError": "يتم الآن التحميل... الرجاء الانتظار."
229
+ "attachmentUploadsPendingError": "يتم الآن تحميل الملف، الرجاء الانتظار.",
230
+ "imageUploadsPendingError": "يتم الآن تحميل الصورة، الرجاء الانتظار.",
231
+ "richTextNewBulletedListItemAnnouncement": "رمز نقطي، سطر جديد",
232
+ "richTextNewNumberedListItemAnnouncement": "{0}، سطر جديد",
233
+ "richTextBulletedListAppliedAnnouncement": "تم تطبيق قائمة نقطية",
234
+ "richTextNumberedListAppliedAnnouncement": "تطبيق قائمة ذات تعداد رقمي"
225
235
  },
226
236
  "errorBar": {
227
237
  "unableToReachChatService": "أنت غير متصل",
@@ -24,7 +24,7 @@
24
24
  "placeholderText": "Zadejte zprávu",
25
25
  "textTooLong": "Délka vaší zprávy překračuje maximální limit.",
26
26
  "sendButtonAriaLabel": "Poslat zprávu",
27
- "attachmentUploadsPendingError": "Probíhá nahrávání... Počkejte prosím.",
27
+ "attachmentUploadsPendingError": "Soubor se nahrává, počkejte prosím.",
28
28
  "removeAttachment": "Odebrat soubor",
29
29
  "uploading": "Nahrávání",
30
30
  "uploadCompleted": "Nahrávání se dokončilo",
@@ -34,7 +34,8 @@
34
34
  "placeholderText": "Zadejte zprávu",
35
35
  "textTooLong": "Délka vaší zprávy překračuje maximální limit.",
36
36
  "sendButtonAriaLabel": "Poslat zprávu",
37
- "attachmentUploadsPendingError": "Nahrávání… Počkejte prosím.",
37
+ "attachmentUploadsPendingError": "Soubor se nahrává, počkejte prosím.",
38
+ "imageUploadsPendingError": "Obrázek se nahrává, počkejte prosím.",
38
39
  "removeAttachment": "Odebrat soubor",
39
40
  "uploading": "Nahrávání",
40
41
  "uploadCompleted": "Nahrávání se dokončilo",
@@ -58,7 +59,11 @@
58
59
  "richTextDeleteRowMenu": "Odstranit řádek",
59
60
  "richTextDeleteTableMenu": "Odstranit tabulku",
60
61
  "richTextToolbarMoreButtonAriaLabel": "Další možnosti",
61
- "attachmentMoreMenu": "Další možnosti"
62
+ "attachmentMoreMenu": "Další možnosti",
63
+ "richTextNewBulletedListItemAnnouncement": "Odrážka, nový řádek",
64
+ "richTextNewNumberedListItemAnnouncement": "{0}, nový řádek",
65
+ "richTextBulletedListAppliedAnnouncement": "Byl použit seznam s odrážkami",
66
+ "richTextNumberedListAppliedAnnouncement": "Použil se číslovaný seznam."
62
67
  },
63
68
  "mentionPopover": {
64
69
  "mentionPopoverHeader": "Návrhy"
@@ -221,7 +226,12 @@
221
226
  "richTextDeleteRowMenu": "Odstranit řádek",
222
227
  "richTextDeleteTableMenu": "Odstranit tabulku",
223
228
  "richTextToolbarMoreButtonAriaLabel": "Další možnosti",
224
- "attachmentUploadsPendingError": "Nahrávání… Počkejte prosím."
229
+ "attachmentUploadsPendingError": "Soubor se nahrává, počkejte prosím.",
230
+ "imageUploadsPendingError": "Obrázek se nahrává, počkejte prosím.",
231
+ "richTextNewBulletedListItemAnnouncement": "Odrážka, nový řádek",
232
+ "richTextNewNumberedListItemAnnouncement": "{0}, nový řádek",
233
+ "richTextBulletedListAppliedAnnouncement": "Použil se seznam s odrážkami",
234
+ "richTextNumberedListAppliedAnnouncement": "Použil se číslovaný seznam"
225
235
  },
226
236
  "errorBar": {
227
237
  "unableToReachChatService": "Jste offline",
@@ -24,7 +24,7 @@
24
24
  "placeholderText": "Nachricht eingeben",
25
25
  "textTooLong": "Ihre Nachrichtenlänge überschreitet den maximalen Grenzwert.",
26
26
  "sendButtonAriaLabel": "Nachricht senden",
27
- "attachmentUploadsPendingError": "Wird hochgeladen... Bitte warten.",
27
+ "attachmentUploadsPendingError": "Datei wird hochgeladen, bitte warten.",
28
28
  "removeAttachment": "Datei entfernen",
29
29
  "uploading": "Hochladen",
30
30
  "uploadCompleted": "Upload abgeschlossen",
@@ -34,7 +34,8 @@
34
34
  "placeholderText": "Nachricht eingeben",
35
35
  "textTooLong": "Ihre Nachrichtenlänge überschreitet den maximalen Grenzwert.",
36
36
  "sendButtonAriaLabel": "Nachricht senden",
37
- "attachmentUploadsPendingError": "Wird hochgeladen... Bitte warten.",
37
+ "attachmentUploadsPendingError": "Datei wird hochgeladen, bitte warten.",
38
+ "imageUploadsPendingError": "Bild wird hochgeladen, bitte warten.",
38
39
  "removeAttachment": "Datei entfernen",
39
40
  "uploading": "Wird hochgeladen",
40
41
  "uploadCompleted": "Upload abgeschlossen",
@@ -58,7 +59,11 @@
58
59
  "richTextDeleteRowMenu": "Zeile löschen",
59
60
  "richTextDeleteTableMenu": "Tabelle löschen",
60
61
  "richTextToolbarMoreButtonAriaLabel": "Weitere Optionen",
61
- "attachmentMoreMenu": "Mehr Optionen"
62
+ "attachmentMoreMenu": "Mehr Optionen",
63
+ "richTextNewBulletedListItemAnnouncement": "Aufzählungszeichen, neue Zeile",
64
+ "richTextNewNumberedListItemAnnouncement": "{0}, neue Zeile",
65
+ "richTextBulletedListAppliedAnnouncement": "Aufzählung angewendet",
66
+ "richTextNumberedListAppliedAnnouncement": "\"Nummerierte Liste\" angewendet."
62
67
  },
63
68
  "mentionPopover": {
64
69
  "mentionPopoverHeader": "Vorschläge"
@@ -221,7 +226,12 @@
221
226
  "richTextDeleteRowMenu": "Zeile löschen",
222
227
  "richTextDeleteTableMenu": "Tabelle löschen",
223
228
  "richTextToolbarMoreButtonAriaLabel": "Weitere Optionen",
224
- "attachmentUploadsPendingError": "Wird hochgeladen... Warten Sie."
229
+ "attachmentUploadsPendingError": "Datei wird hochgeladen, bitte warten.",
230
+ "imageUploadsPendingError": "Bild wird hochgeladen, bitte warten.",
231
+ "richTextNewBulletedListItemAnnouncement": "Aufzählungszeichen, neue Zeile",
232
+ "richTextNewNumberedListItemAnnouncement": "{0}, neue Zeile",
233
+ "richTextBulletedListAppliedAnnouncement": "Aufzählung angewendet",
234
+ "richTextNumberedListAppliedAnnouncement": "\"Nummerierte Liste\" angewendet."
225
235
  },
226
236
  "errorBar": {
227
237
  "unableToReachChatService": "Sie sind offline.",