@azure/communication-react 1.19.0-alpha-202407230014 → 1.19.0-alpha-202407250014

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 (51) hide show
  1. package/dist/communication-react.d.ts +45 -2
  2. package/dist/dist-cjs/communication-react/{ChatMessageComponentAsRichTextEditBox-DKLA2xEh.js → ChatMessageComponentAsRichTextEditBox-D4Pf_JpT.js} +11 -6
  3. package/dist/dist-cjs/communication-react/ChatMessageComponentAsRichTextEditBox-D4Pf_JpT.js.map +1 -0
  4. package/dist/dist-cjs/communication-react/{RichTextSendBoxWrapper-CBXO5qQp.js → RichTextSendBoxWrapper-BNwd6bE2.js} +2 -2
  5. package/dist/dist-cjs/communication-react/{RichTextSendBoxWrapper-CBXO5qQp.js.map → RichTextSendBoxWrapper-BNwd6bE2.js.map} +1 -1
  6. package/dist/dist-cjs/communication-react/{index-C-_eEXgc.js → index-DdAkrosV.js} +134 -42
  7. package/dist/dist-cjs/communication-react/index-DdAkrosV.js.map +1 -0
  8. package/dist/dist-cjs/communication-react/index.js +1 -1
  9. package/dist/dist-esm/acs-ui-common/src/identifier.d.ts +8 -0
  10. package/dist/dist-esm/acs-ui-common/src/identifier.js +14 -0
  11. package/dist/dist-esm/acs-ui-common/src/identifier.js.map +1 -1
  12. package/dist/dist-esm/acs-ui-common/src/index.d.ts +1 -1
  13. package/dist/dist-esm/acs-ui-common/src/index.js +1 -1
  14. package/dist/dist-esm/acs-ui-common/src/index.js.map +1 -1
  15. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js +1 -1
  16. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js.map +1 -1
  17. package/dist/dist-esm/communication-react/src/index.d.ts +1 -0
  18. package/dist/dist-esm/communication-react/src/index.js.map +1 -1
  19. package/dist/dist-esm/react-components/src/components/Attachment/AttachmentDownloadCards.js +3 -2
  20. package/dist/dist-esm/react-components/src/components/Attachment/AttachmentDownloadCards.js.map +1 -1
  21. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsRichTextEditBox.js +12 -5
  22. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsRichTextEditBox.js.map +1 -1
  23. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponent.js +2 -2
  24. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponent.js.map +1 -1
  25. package/dist/dist-esm/react-components/src/components/MessageThread.d.ts +2 -2
  26. package/dist/dist-esm/react-components/src/components/MessageThread.js.map +1 -1
  27. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBox.d.ts +4 -0
  28. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBox.js +22 -4
  29. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBox.js.map +1 -1
  30. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBoxErrors.js +12 -3
  31. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBoxErrors.js.map +1 -1
  32. package/dist/dist-esm/react-components/src/components/SendBoxErrorBar.d.ts +22 -0
  33. package/dist/dist-esm/react-components/src/components/SendBoxErrorBar.js +58 -6
  34. package/dist/dist-esm/react-components/src/components/SendBoxErrorBar.js.map +1 -1
  35. package/dist/dist-esm/react-components/src/components/index.d.ts +1 -0
  36. package/dist/dist-esm/react-components/src/components/index.js.map +1 -1
  37. package/dist/dist-esm/react-components/src/components/utils/SendBoxUtils.d.ts +1 -1
  38. package/dist/dist-esm/react-components/src/components/utils/SendBoxUtils.js +7 -4
  39. package/dist/dist-esm/react-components/src/components/utils/SendBoxUtils.js.map +1 -1
  40. package/dist/dist-esm/react-components/src/localization/locales/en-US/strings.json +8 -4
  41. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js +9 -3
  42. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js.map +1 -1
  43. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ImageUpload/ImageUploadUtils.d.ts +3 -2
  44. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ImageUpload/ImageUploadUtils.js +12 -12
  45. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ImageUpload/ImageUploadUtils.js.map +1 -1
  46. package/dist/dist-esm/react-composites/src/composites/ChatComposite/Strings.d.ts +16 -0
  47. package/dist/dist-esm/react-composites/src/composites/ChatComposite/Strings.js.map +1 -1
  48. package/dist/dist-esm/react-composites/src/composites/localization/locales/en-US/strings.json +5 -1
  49. package/package.json +2 -2
  50. package/dist/dist-cjs/communication-react/ChatMessageComponentAsRichTextEditBox-DKLA2xEh.js.map +0 -1
  51. package/dist/dist-cjs/communication-react/index-C-_eEXgc.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"RichTextSendBoxErrors.js","sourceRoot":"","sources":["../../../../../../../react-components/src/components/RichTextEditor/RichTextSendBoxErrors.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAChE,OAAO,EAAE,eAAe,EAAwB,MAAM,oBAAoB,CAAC;AAc3E;;GAEG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,KAAiC,EAAe,EAAE;IACtF,MAAM;IACJ,mDAAmD;IACnD,uBAAuB;IACvB,mDAAmD;IACnD,6BAA6B,EAC7B,aAAa,EACb,kBAAkB,EACnB,GAAG,KAAK,CAAC;IACV,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,QAAQ,CAAmC,SAAS,CAAC,CAAC;IAE9F,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,aAAa,IAAI,CAAC,cAAc,CAAC,aAAa,CAAC,EAAE,CAAC;YACpD,eAAe,CAAC,EAAE,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,IAAI,CAAC,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,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,GAAG,CAAC,CAAC,SAAS,CAAC,CAAC;YACtE,OAAO,YAAY,CAAC,CAAC,CAAC,CAAC;QACzB,CAAC,CAAC,CAAC;IACL,CAAC,EAAE;QACD,mDAAmD,CAAC,uBAAuB;QAC3E,mDAAmD,CAAC,6BAA6B;KAClF,CAAC,CAAC;IAEH,MAAM,SAAS,GAAG,WAAW,CAAC,GAAG,EAAE;QACjC,IAAI,aAAa,IAAI,CAAC,cAAc,CAAC,aAAa,CAAC,EAAE,CAAC;YACpD,eAAe,CAAC,EAAE,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;QACrE,CAAC;IACH,CAAC,EAAE,CAAC,aAAa,CAAC,CAAC,CAAC;IAEpB,OAAO,CACL,oBAAC,eAAe,IACd,KAAK,EAAE,YAAY,EACnB,cAAc;QACZ,mCAAmC;QACnC,aAAa,KAAK,SAAS,IAAI,CAAA,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,OAAO,MAAK,aAAa,CAAC,CAAC,CAAC,EAAE,GAAG,IAAI,CAAC,CAAC,CAAC,SAAS,EAEhG,SAAS,EAAE,SAAS,GACpB,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,cAAc,GAAG,CAAC,OAAe,EAAW,EAAE;IAClD,OAAO,OAAO,CAAC,IAAI,EAAE,CAAC,MAAM,KAAK,CAAC,CAAC;AACrC,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React, { useCallback, useEffect, useState } from 'react';\nimport { SendBoxErrorBar, SendBoxErrorBarError } from '../SendBoxErrorBar';\n\n/**\n * @private\n */\nexport interface RichTextSendBoxErrorsProps {\n /* @conditional-compile-remove(file-sharing-acs) */\n attachmentUploadsPendingError?: SendBoxErrorBarError;\n /* @conditional-compile-remove(file-sharing-acs) */\n attachmentProgressError?: SendBoxErrorBarError;\n systemMessage?: string;\n textTooLongMessage?: string;\n}\n\n/**\n * @private\n */\nexport const RichTextSendBoxErrors = (props: RichTextSendBoxErrorsProps): JSX.Element => {\n const {\n /* @conditional-compile-remove(file-sharing-acs) */\n attachmentProgressError,\n /* @conditional-compile-remove(file-sharing-acs) */\n attachmentUploadsPendingError,\n systemMessage,\n textTooLongMessage\n } = props;\n const [sendBoxError, setSendBoxError] = useState<SendBoxErrorBarError | undefined>(undefined);\n\n useEffect(() => {\n if (systemMessage && !isMessageEmpty(systemMessage)) {\n setSendBoxError({ message: systemMessage, timestamp: Date.now() });\n }\n }, [systemMessage]);\n\n useEffect(() => {\n if (textTooLongMessage && !isMessageEmpty(textTooLongMessage)) {\n setSendBoxError({ message: textTooLongMessage, timestamp: Date.now() });\n }\n }, [textTooLongMessage]);\n\n useEffect(() => {\n if (\n (textTooLongMessage === undefined || isMessageEmpty(textTooLongMessage)) &&\n (systemMessage === undefined || isMessageEmpty(systemMessage))\n ) {\n setSendBoxError(undefined);\n }\n }, [systemMessage, textTooLongMessage]);\n\n useEffect(() => {\n setSendBoxError((prev) => {\n const errors: SendBoxErrorBarError[] = [];\n if (prev) {\n errors.push(prev);\n }\n /* @conditional-compile-remove(file-sharing-acs) */\n if (attachmentUploadsPendingError) {\n errors.push(attachmentUploadsPendingError);\n }\n /* @conditional-compile-remove(file-sharing-acs) */\n if (attachmentProgressError) {\n errors.push(attachmentProgressError);\n }\n if (errors.length === 0) {\n return undefined;\n }\n // sort to get the latest error\n const sortedErrors = errors.sort((a, b) => b.timestamp - a.timestamp);\n return sortedErrors[0];\n });\n }, [\n /* @conditional-compile-remove(file-sharing-acs) */ attachmentProgressError,\n /* @conditional-compile-remove(file-sharing-acs) */ attachmentUploadsPendingError\n ]);\n\n const onDismiss = useCallback(() => {\n if (systemMessage && !isMessageEmpty(systemMessage)) {\n setSendBoxError({ message: systemMessage, timestamp: Date.now() });\n }\n }, [systemMessage]);\n\n return (\n <SendBoxErrorBar\n error={sendBoxError}\n dismissAfterMs={\n // don't dismiss the system message\n systemMessage !== undefined && sendBoxError?.message !== systemMessage ? 10 * 1000 : undefined\n }\n onDismiss={onDismiss}\n />\n );\n};\n\nconst isMessageEmpty = (message: string): boolean => {\n return message.trim().length === 0;\n};\n"]}
1
+ {"version":3,"file":"RichTextSendBoxErrors.js","sourceRoot":"","sources":["../../../../../../../react-components/src/components/RichTextEditor/RichTextSendBoxErrors.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,eAAe,EAAwB,MAAM,oBAAoB,CAAC;AAc3E;;GAEG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,KAAiC,EAAe,EAAE;IACtF,MAAM;IACJ,mDAAmD;IACnD,uBAAuB;IACvB,mDAAmD;IACnD,6BAA6B,EAC7B,aAAa,EACb,kBAAkB,EACnB,GAAG,KAAK,CAAC;IACV,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,QAAQ,CAAmC,SAAS,CAAC,CAAC;IAE9F,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,aAAa,IAAI,CAAC,cAAc,CAAC,aAAa,CAAC,EAAE,CAAC;YACpD,eAAe,CAAC,EAAE,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;QACrE,CAAC;IACH,CAAC,EAAE,CAAC,aAAa,CAAC,CAAC,CAAC;IAEpB,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,kBAAkB,IAAI,CAAC,cAAc,CAAC,kBAAkB,CAAC,EAAE,CAAC;YAC9D,eAAe,CAAC,EAAE,OAAO,EAAE,kBAAkB,EAAE,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;QAC1E,CAAC;I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aAAa,IAAI,CAAC,cAAc,CAAC,aAAa,CAAC,EAAE,CAAC;YACpD,eAAe,CAAC,EAAE,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;YACnE,OAAO;QACT,CAAC;QACD,gEAAgE;QAChE,eAAe,CAAC,SAAS,CAAC,CAAC;IAC7B,CAAC,EAAE,CAAC,aAAa,CAAC,CAAC,CAAC;IAEpB,MAAM,cAAc,GAAG,OAAO,CAAC,GAAG,EAAE;QAClC,MAAM,SAAS,GAAG,EAAE,GAAG,IAAI,CAAC;QAC5B,mCAAmC;QACnC,IAAI,aAAa,EAAE,CAAC;YAClB,OAAO,CAAA,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,OAAO,MAAK,aAAa,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC;QACzE,CAAC;QACD,OAAO,SAAS,CAAC;IACnB,CAAC,EAAE,CAAC,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,OAAO,EAAE,aAAa,CAAC,CAAC,CAAC;IAE3C,OAAO,oBAAC,eAAe,IAAC,KAAK,EAAE,YAAY,EAAE,cAAc,EAAE,cAAc,EAAE,SAAS,EAAE,SAAS,GAAI,CAAC;AACxG,CAAC,CAAC;AAEF,MAAM,cAAc,GAAG,CAAC,OAAe,EAAW,EAAE;IAClD,OAAO,OAAO,CAAC,IAAI,EAAE,CAAC,MAAM,KAAK,CAAC,CAAC;AACrC,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React, { useCallback, useEffect, useMemo, useState } from 'react';\nimport { SendBoxErrorBar, SendBoxErrorBarError } from '../SendBoxErrorBar';\n\n/**\n * @private\n */\nexport interface RichTextSendBoxErrorsProps {\n /* @conditional-compile-remove(file-sharing-acs) */\n attachmentUploadsPendingError?: SendBoxErrorBarError;\n /* @conditional-compile-remove(file-sharing-acs) */\n attachmentProgressError?: SendBoxErrorBarError;\n systemMessage?: string;\n textTooLongMessage?: string;\n}\n\n/**\n * @private\n */\nexport const RichTextSendBoxErrors = (props: RichTextSendBoxErrorsProps): JSX.Element => {\n const {\n /* @conditional-compile-remove(file-sharing-acs) */\n attachmentProgressError,\n /* @conditional-compile-remove(file-sharing-acs) */\n attachmentUploadsPendingError,\n systemMessage,\n textTooLongMessage\n } = props;\n const [sendBoxError, setSendBoxError] = useState<SendBoxErrorBarError | undefined>(undefined);\n\n useEffect(() => {\n if (systemMessage && !isMessageEmpty(systemMessage)) {\n setSendBoxError({ message: systemMessage, timestamp: Date.now() });\n }\n }, [systemMessage]);\n\n useEffect(() => {\n if (textTooLongMessage && !isMessageEmpty(textTooLongMessage)) {\n setSendBoxError({ message: textTooLongMessage, timestamp: Date.now() });\n }\n }, [textTooLongMessage]);\n\n useEffect(() => {\n if (\n (textTooLongMessage === undefined || isMessageEmpty(textTooLongMessage)) &&\n (systemMessage === undefined || isMessageEmpty(systemMessage))\n ) {\n setSendBoxError(undefined);\n }\n }, [systemMessage, textTooLongMessage]);\n\n useEffect(() => {\n setSendBoxError((prev) => {\n const errors: SendBoxErrorBarError[] = [];\n if (prev) {\n errors.push(prev);\n }\n /* @conditional-compile-remove(file-sharing-acs) */\n if (attachmentUploadsPendingError) {\n errors.push(attachmentUploadsPendingError);\n }\n /* @conditional-compile-remove(file-sharing-acs) */\n if (attachmentProgressError) {\n errors.push(attachmentProgressError);\n }\n if (errors.length === 0) {\n return undefined;\n }\n // sort to get the latest error\n const sortedErrors = errors.sort((a, b) => b.timestamp - a.timestamp);\n return sortedErrors[0];\n });\n }, [\n /* @conditional-compile-remove(file-sharing-acs) */ attachmentProgressError,\n /* @conditional-compile-remove(file-sharing-acs) */ attachmentUploadsPendingError\n ]);\n\n const onDismiss = useCallback(() => {\n if (systemMessage && !isMessageEmpty(systemMessage)) {\n setSendBoxError({ message: systemMessage, timestamp: Date.now() });\n return;\n }\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n setSendBoxError(undefined);\n }, [systemMessage]);\n\n const dismissAfterMs = useMemo(() => {\n const delayInMs = 10 * 1000;\n // don't dismiss the system message\n if (systemMessage) {\n return sendBoxError?.message !== systemMessage ? delayInMs : undefined;\n }\n return delayInMs;\n }, [sendBoxError?.message, systemMessage]);\n\n return <SendBoxErrorBar error={sendBoxError} dismissAfterMs={dismissAfterMs} onDismiss={onDismiss} />;\n};\n\nconst isMessageEmpty = (message: string): boolean => {\n return message.trim().length === 0;\n};\n"]}
@@ -1,4 +1,22 @@
1
1
  /// <reference types="react" />
2
+ /**
3
+ * @beta
4
+ * Error bar type for {@link SendBoxErrorBarError}
5
+ */
6
+ export declare enum SendBoxErrorBarType {
7
+ /** Info styled MessageBar */
8
+ info = 0,
9
+ /** Error styled MessageBar */
10
+ error = 1,
11
+ /** Blocked styled MessageBar */
12
+ blocked = 2,
13
+ /** SevereWarning styled MessageBar */
14
+ severeWarning = 3,
15
+ /** Success styled MessageBar */
16
+ success = 4,
17
+ /** Warning styled MessageBar */
18
+ warning = 5
19
+ }
2
20
  /**
3
21
  * @beta
4
22
  * Error to be displayed to the user in an error bar above sendbox.
@@ -10,6 +28,10 @@ export interface SendBoxErrorBarError {
10
28
  * Unix Timestamp. Preferred generation using `Date.now()`
11
29
  */
12
30
  timestamp: number;
31
+ /**
32
+ * ErrorBar type. Defaults to `warning`.
33
+ */
34
+ errorBarType?: SendBoxErrorBarType;
13
35
  }
14
36
  /**
15
37
  * @private
@@ -1,12 +1,40 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
2
  // Licensed under the MIT License.
3
- import { MessageBar, MessageBarType } from '@fluentui/react';
3
+ import { MessageBar } from '@fluentui/react';
4
+ /* @conditional-compile-remove(rich-text-editor-image-upload) */
5
+ import { MessageBarType } from '@fluentui/react';
4
6
  import React, { useEffect } from 'react';
7
+ /* @conditional-compile-remove(rich-text-editor-image-upload) */
8
+ import { useMemo } from 'react';
9
+ /* @conditional-compile-remove(rich-text-editor-image-upload) */
10
+ import { useLocale } from '../localization';
11
+ /* @conditional-compile-remove(rich-text-editor-image-upload) */
12
+ /**
13
+ * @beta
14
+ * Error bar type for {@link SendBoxErrorBarError}
15
+ */
16
+ export var SendBoxErrorBarType;
17
+ (function (SendBoxErrorBarType) {
18
+ /** Info styled MessageBar */
19
+ SendBoxErrorBarType[SendBoxErrorBarType["info"] = 0] = "info";
20
+ /** Error styled MessageBar */
21
+ SendBoxErrorBarType[SendBoxErrorBarType["error"] = 1] = "error";
22
+ /** Blocked styled MessageBar */
23
+ SendBoxErrorBarType[SendBoxErrorBarType["blocked"] = 2] = "blocked";
24
+ /** SevereWarning styled MessageBar */
25
+ SendBoxErrorBarType[SendBoxErrorBarType["severeWarning"] = 3] = "severeWarning";
26
+ /** Success styled MessageBar */
27
+ SendBoxErrorBarType[SendBoxErrorBarType["success"] = 4] = "success";
28
+ /** Warning styled MessageBar */
29
+ SendBoxErrorBarType[SendBoxErrorBarType["warning"] = 5] = "warning";
30
+ })(SendBoxErrorBarType || (SendBoxErrorBarType = {}));
5
31
  /**
6
32
  * @private
7
33
  */
8
34
  export const SendBoxErrorBar = (props) => {
9
35
  const { error, dismissAfterMs, onDismiss } = props;
36
+ /* @conditional-compile-remove(rich-text-editor-image-upload) */
37
+ const strings = useLocale().strings.errorBar;
10
38
  const [errorMessage, setErrorMessage] = React.useState(error === null || error === void 0 ? void 0 : error.message);
11
39
  // Using `any` because `NodeJS.Timeout` here will cause `declaration error` with jest.
12
40
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -25,12 +53,36 @@ export const SendBoxErrorBar = (props) => {
25
53
  timeoutRef.current && clearTimeout(timeoutRef.current);
26
54
  };
27
55
  }, [dismissAfterMs, onDismiss, error]);
56
+ /* @conditional-compile-remove(rich-text-editor-image-upload) */
57
+ const messageBarType = useMemo(() => {
58
+ switch (error === null || error === void 0 ? void 0 : error.errorBarType) {
59
+ case SendBoxErrorBarType.info:
60
+ return MessageBarType.info;
61
+ case SendBoxErrorBarType.error:
62
+ return MessageBarType.error;
63
+ case SendBoxErrorBarType.blocked:
64
+ return MessageBarType.blocked;
65
+ case SendBoxErrorBarType.severeWarning:
66
+ return MessageBarType.severeWarning;
67
+ case SendBoxErrorBarType.success:
68
+ return MessageBarType.success;
69
+ case SendBoxErrorBarType.warning:
70
+ default:
71
+ return MessageBarType.warning;
72
+ }
73
+ }, [error]);
28
74
  if (errorMessage) {
29
- return (React.createElement(MessageBar, { role: "alert", "aria-label": errorMessage, "data-testid": 'send-box-message-bar', messageBarType: MessageBarType.warning, styles: {
30
- iconContainer: {
31
- display: 'none'
32
- }
33
- } }, errorMessage));
75
+ return (React.createElement(MessageBar, { role: "alert", "aria-label": errorMessage, "data-testid": 'send-box-message-bar',
76
+ /* @conditional-compile-remove(rich-text-editor-image-upload) */
77
+ messageBarType: messageBarType,
78
+ /* @conditional-compile-remove(rich-text-editor-image-upload) */
79
+ isMultiline: true,
80
+ /* @conditional-compile-remove(rich-text-editor-image-upload) */
81
+ key: (error === null || error === void 0 ? void 0 : error.errorBarType) || SendBoxErrorBarType.warning,
82
+ /* @conditional-compile-remove(rich-text-editor-image-upload) */
83
+ onDismiss: onDismiss,
84
+ /* @conditional-compile-remove(rich-text-editor-image-upload) */
85
+ dismissButtonAriaLabel: strings.dismissButtonAriaLabel }, errorMessage));
34
86
  }
35
87
  else {
36
88
  return React.createElement(React.Fragment, null);
@@ -1 +1 @@
1
- {"version":3,"file":"SendBoxErrorBar.js","sourceRoot":"","sources":["../../../../../../react-components/src/components/SendBoxErrorBar.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAC7D,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAgCzC;;GAEG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,KAA2B,EAAe,EAAE;IAC1E,MAAM,EAAE,KAAK,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Licensed under the MIT License.\n\nimport { MessageBar, MessageBarType } from '@fluentui/react';\nimport React, { useEffect } from 'react';\n\n/**\n * @beta\n * Error to be displayed to the user in an error bar above sendbox.\n */\nexport interface SendBoxErrorBarError {\n /** Error Message to be displayed */\n message: string;\n /**\n * Unix Timestamp. Preferred generation using `Date.now()`\n */\n timestamp: number;\n}\n\n/**\n * @private\n */\nexport interface SendBoxErrorBarProps {\n /** Error to render */\n error?: SendBoxErrorBarError;\n /**\n * Automatically dismisses the error bar after the specified delay in ms.\n * Example: `10 * 1000` would be 10 seconds\n */\n dismissAfterMs?: number;\n /**\n * Callback to invoke when the error bar is dismissed\n */\n onDismiss?: () => void;\n}\n\n/**\n * @private\n */\nexport const SendBoxErrorBar = (props: SendBoxErrorBarProps): JSX.Element => {\n const { error, dismissAfterMs, onDismiss } = props;\n const [errorMessage, setErrorMessage] = React.useState(error?.message);\n // Using `any` because `NodeJS.Timeout` here will cause `declaration error` with jest.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const timeoutRef = React.useRef<any>();\n\n React.useEffect(() => {\n setErrorMessage(error?.message);\n }, [error]);\n\n useEffect(() => {\n if (error && dismissAfterMs !== undefined) {\n timeoutRef.current = setTimeout(() => {\n setErrorMessage(undefined);\n onDismiss && onDismiss();\n }, dismissAfterMs);\n }\n return () => {\n timeoutRef.current && clearTimeout(timeoutRef.current);\n };\n }, [dismissAfterMs, onDismiss, error]);\n\n if (errorMessage) {\n return (\n <MessageBar\n role=\"alert\"\n aria-label={errorMessage}\n data-testid={'send-box-message-bar'}\n messageBarType={MessageBarType.warning}\n styles={{\n iconContainer: {\n display: 'none'\n }\n }}\n >\n {errorMessage}\n </MessageBar>\n );\n } else {\n return <></>;\n }\n};\n"]}
1
+ {"version":3,"file":"SendBoxErrorBar.js","sourceRoot":"","sources":["../../../../../../react-components/src/components/SendBoxErrorBar.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,UAAU,EAAE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,WAAW,EAAE,IAAI;YACjB,gEAAgE;YAChE,GAAG,EAAE,CAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,YAAY,KAAI,mBAAmB,CAAC,OAAO;YACvD,gEAAgE;YAChE,SAAS,EAAE,SAAS;YACpB,gEAAgE;YAChE,sBAAsB,EAAE,OAAO,CAAC,sBAAsB,IAErD,YAAY,CACF,CACd,CAAC;IACJ,CAAC;SAAM,CAAC;QACN,OAAO,yCAAK,CAAC;IACf,CAAC;AACH,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { MessageBar } from '@fluentui/react';\n/* @conditional-compile-remove(rich-text-editor-image-upload) */\nimport { MessageBarType } from '@fluentui/react';\nimport React, { useEffect } from 'react';\n/* @conditional-compile-remove(rich-text-editor-image-upload) */\nimport { useMemo } from 'react';\n/* @conditional-compile-remove(rich-text-editor-image-upload) */\nimport { useLocale } from '../localization';\n\n/* @conditional-compile-remove(rich-text-editor-image-upload) */\n/**\n * @beta\n * Error bar type for {@link SendBoxErrorBarError}\n */\nexport enum SendBoxErrorBarType {\n /** Info styled MessageBar */\n info = 0,\n /** Error styled MessageBar */\n error = 1,\n /** Blocked styled MessageBar */\n blocked = 2,\n /** SevereWarning styled MessageBar */\n severeWarning = 3,\n /** Success styled MessageBar */\n success = 4,\n /** Warning styled MessageBar */\n warning = 5\n}\n\n/**\n * @beta\n * Error to be displayed to the user in an error bar above sendbox.\n */\nexport interface SendBoxErrorBarError {\n /** Error Message to be displayed */\n message: string;\n /**\n * Unix Timestamp. Preferred generation using `Date.now()`\n */\n timestamp: number;\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n /**\n * ErrorBar type. Defaults to `warning`.\n */\n errorBarType?: SendBoxErrorBarType;\n}\n\n/**\n * @private\n */\nexport interface SendBoxErrorBarProps {\n /** Error to render */\n error?: SendBoxErrorBarError;\n /**\n * Automatically dismisses the error bar after the specified delay in ms.\n * Example: `10 * 1000` would be 10 seconds\n */\n dismissAfterMs?: number;\n /**\n * Callback to invoke when the error bar is dismissed\n */\n onDismiss?: () => void;\n}\n\n/**\n * @private\n */\nexport const SendBoxErrorBar = (props: SendBoxErrorBarProps): JSX.Element => {\n const { error, dismissAfterMs, onDismiss } = props;\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n const strings = useLocale().strings.errorBar;\n\n const [errorMessage, setErrorMessage] = React.useState(error?.message);\n // Using `any` because `NodeJS.Timeout` here will cause `declaration error` with jest.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const timeoutRef = React.useRef<any>();\n\n React.useEffect(() => {\n setErrorMessage(error?.message);\n }, [error]);\n\n useEffect(() => {\n if (error && dismissAfterMs !== undefined) {\n timeoutRef.current = setTimeout(() => {\n setErrorMessage(undefined);\n onDismiss && onDismiss();\n }, dismissAfterMs);\n }\n return () => {\n timeoutRef.current && clearTimeout(timeoutRef.current);\n };\n }, [dismissAfterMs, onDismiss, error]);\n\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n const messageBarType = useMemo(() => {\n switch (error?.errorBarType) {\n case SendBoxErrorBarType.info:\n return MessageBarType.info;\n case SendBoxErrorBarType.error:\n return MessageBarType.error;\n case SendBoxErrorBarType.blocked:\n return MessageBarType.blocked;\n case SendBoxErrorBarType.severeWarning:\n return MessageBarType.severeWarning;\n case SendBoxErrorBarType.success:\n return MessageBarType.success;\n case SendBoxErrorBarType.warning:\n default:\n return MessageBarType.warning;\n }\n }, [error]);\n\n if (errorMessage) {\n return (\n <MessageBar\n role=\"alert\"\n aria-label={errorMessage}\n data-testid={'send-box-message-bar'}\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n messageBarType={messageBarType}\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n isMultiline={true}\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n key={error?.errorBarType || SendBoxErrorBarType.warning}\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n onDismiss={onDismiss}\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n dismissButtonAriaLabel={strings.dismissButtonAriaLabel}\n >\n {errorMessage}\n </MessageBar>\n );\n } else {\n return <></>;\n }\n};\n"]}
@@ -73,6 +73,7 @@ export type { _PictureInPictureInPictureProps, _PictureInPictureInPictureStrings
73
73
  export type { _PictureInPictureInPictureTileProps, _TileOrientation } from './PictureInPictureInPicture/PictureInPictureInPictureTile';
74
74
  export * from './Drawer';
75
75
  export type { SendBoxErrorBarError } from './SendBoxErrorBar';
76
+ export type { SendBoxErrorBarType } from './SendBoxErrorBar';
76
77
  export * from './Attachment/AttachmentCard';
77
78
  export * from './Attachment/AttachmentCardGroup';
78
79
  export * from './ModalClone/ModalClone';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../react-components/src/components/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAGpD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAGtC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG1C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,0CAA0C;AAC1C,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAEnD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAI9C,mDAAmD;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AACnE,qHAAqH;AACrH,mDAAmD;AACnD,OAAO,EAAE,qCAAqC,EAAE,MAAM,yEAAyE,CAAC;AAqBhI,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAGlE,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAiBhD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAI5C,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAGpD,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,gDAAgD;AAChD,cAAc,qBAAqB,CAAC;AACpC,mDAAmD;AACnD,cAAc,4BAA4B,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport { TypingIndicator } from './TypingIndicator';\nexport type { TypingIndicatorProps, TypingIndicatorStrings, TypingIndicatorStylesProps } from './TypingIndicator';\n\nexport { ErrorBar } from './ErrorBar';\nexport type { ActiveErrorMessage, ErrorBarProps, ErrorBarStrings, ErrorType } from './ErrorBar';\n\nexport { GridLayout } from './GridLayout';\nexport type { GridLayoutProps, GridLayoutStyles } from './GridLayout';\n\nexport { SendBox } from './SendBox';\n/* @conditional-compile-remove(mention) */\nexport { _MentionPopover } from './MentionPopover';\n\nexport { ImageOverlay } from './ImageOverlay';\nexport type { ImageOverlayStrings } from './ImageOverlay';\nexport type { SendBoxProps, SendBoxStrings, SendBoxStylesProps } from './SendBox';\n\n/* @conditional-compile-remove(rich-text-editor) */\nexport { RichTextSendBox } from './RichTextEditor/RichTextSendBox';\n// TODO: This component is exported only for testing purposes. Remove this when this component is added to composites\n/* @conditional-compile-remove(rich-text-editor) */\nexport { ChatMessageComponentAsRichTextEditBox } from './ChatMessage/MyMessageComponents/ChatMessageComponentAsRichTextEditBox';\n// TODO: This component is exported only for testing purposes. Remove this when this component is added to composites\n/* @conditional-compile-remove(rich-text-editor) */\nexport type { ChatMessageComponentAsRichTextEditBoxProps } from './ChatMessage/MyMessageComponents/ChatMessageComponentAsRichTextEditBox';\n/* @conditional-compile-remove(rich-text-editor) */\nexport type { RichTextSendBoxProps, RichTextSendBoxStrings, RichTextStrings } from './RichTextEditor/RichTextSendBox';\n\n/* @conditional-compile-remove(mention) */\nexport type {\n _MentionPopoverProps,\n MentionLookupOptions,\n MentionDisplayOptions,\n MentionOptions,\n Mention,\n MentionPopoverStrings\n} from './MentionPopover';\n\nexport type { ImageOverlayProps } from './ImageOverlay';\n\nexport type { InlineImageOptions, InlineImage } from './ChatMessage/ChatMessageContent';\n\nexport { MessageStatusIndicator } from './MessageStatusIndicator';\nexport type { MessageStatusIndicatorProps, MessageStatusIndicatorStrings } from './MessageStatusIndicator';\n\nexport { MessageThread } from './MessageThread';\nexport type {\n MessageProps,\n MessageThreadProps,\n MessageThreadStrings,\n MessageThreadStyles,\n JumpToNewMessageButtonProps,\n MessageRenderer,\n UpdateMessageCallback,\n CancelEditCallback\n} from './MessageThread';\n\n/* @conditional-compile-remove(rich-text-editor) */\nexport type { RichTextEditorOptions, RichTextSendBoxOptions } from './RichTextEditor/RichTextSendBox';\n/* @conditional-compile-remove(rich-text-editor) */\nexport type { RichTextEditBoxOptions } from './MessageThread';\n\nexport { StreamMedia } from './StreamMedia';\nexport type { StreamMediaProps } from './StreamMedia';\nexport type { LoadingState } from './StreamMedia';\n\nexport { ParticipantItem } from './ParticipantItem';\nexport type { ParticipantItemProps, ParticipantItemStrings, ParticipantItemStyles } from './ParticipantItem';\n\nexport { ParticipantList } from './ParticipantList';\nexport type {\n ParticipantListItemStyles,\n ParticipantListProps,\n ParticipantListStyles,\n ParticipantMenuItemsCallback\n} from './ParticipantList';\n\n/* @conditional-compile-remove(total-participant-count) */\nexport type { ParticipantListStrings } from './ParticipantList';\n\nexport { Announcer } from './Announcer';\nexport type { AnnouncerProps } from './Announcer';\n\nexport { VideoGallery } from './VideoGallery';\nexport type {\n VideoGalleryProps,\n VideoGalleryStrings,\n VideoGalleryStyles,\n VideoGalleryLayout,\n VideoTileContextualMenuProps,\n VideoTileDrawerMenuProps,\n VideoTilesOptions\n} from './VideoGallery';\nexport type { OverflowGalleryPosition } from './VideoGallery';\nexport type { LocalVideoTileSize } from './VideoGallery';\nexport type { HorizontalGalleryStyles } from './HorizontalGallery';\n\nexport { LocalVideoCameraCycleButton } from './LocalVideoCameraButton';\nexport type { LocalVideoCameraCycleButtonProps } from './LocalVideoCameraButton';\n\nexport { CameraButton } from './CameraButton';\nexport type {\n CameraButtonContextualMenuStyles,\n CameraButtonProps,\n CameraButtonStrings,\n CameraButtonStyles\n} from './CameraButton';\n\nexport { ControlBar } from './ControlBar';\nexport type { ControlBarProps, ControlBarLayout } from './ControlBar';\n\nexport { ControlBarButton } from './ControlBarButton';\nexport type { ControlBarButtonProps, ControlBarButtonStrings, ControlBarButtonStyles } from './ControlBarButton';\n\nexport { EndCallButton } from './EndCallButton';\nexport type { EndCallButtonProps, EndCallButtonStrings } from './EndCallButton';\n\nexport { MicrophoneButton } from './MicrophoneButton';\nexport type {\n MicrophoneButtonStyles,\n MicrophoneButtonContextualMenuStyles,\n MicrophoneButtonProps,\n MicrophoneButtonStrings\n} from './MicrophoneButton';\n\nexport { DevicesButton, generateDefaultDeviceMenuProps as _generateDefaultDeviceMenuProps } from './DevicesButton';\nexport type {\n OptionsDevice,\n DevicesButtonProps,\n DevicesButtonStrings,\n DevicesButtonStyles,\n DevicesButtonContextualMenuStyles,\n DeviceMenuProps as _DeviceMenuProps,\n DeviceMenuStrings as _DeviceMenuStrings,\n DeviceMenuStyles as _DeviceMenuStyles\n} from './DevicesButton';\n\n/* @conditional-compile-remove(call-readiness) */\nexport {\n CameraAndMicrophoneSitePermissions,\n MicrophoneSitePermissions,\n CameraSitePermissions\n} from './DevicePermissions/SitePermissions';\n/* @conditional-compile-remove(call-readiness) */\nexport type { SitePermissionsStrings, SitePermissionsStyles } from './DevicePermissions/SitePermissionsScaffolding';\n/* @conditional-compile-remove(call-readiness) */\nexport type {\n CameraAndMicrophoneSitePermissionsStrings,\n CameraAndMicrophoneSitePermissionsProps,\n CameraSitePermissionsStrings,\n CameraSitePermissionsProps,\n CommonSitePermissionsProps,\n MicrophoneSitePermissionsStrings,\n MicrophoneSitePermissionsProps\n} from './DevicePermissions/SitePermissions';\n/* @conditional-compile-remove(call-readiness) */\nexport { BrowserPermissionDenied } from './DevicePermissions/BrowserPermissionDenied';\n/* @conditional-compile-remove(call-readiness) */\nexport type {\n BrowserPermissionDeniedStrings,\n BrowserPermissionDeniedStyles,\n BrowserPermissionDeniedProps\n} from './DevicePermissions/BrowserPermissionDenied';\n/* @conditional-compile-remove(call-readiness) */\nexport { BrowserPermissionDeniedIOS } from './DevicePermissions/BrowserPermissionDeniedIOS';\n/* @conditional-compile-remove(call-readiness) */\nexport type {\n BrowserPermissionDeniedIOSStrings,\n BrowserPermissionDeniedIOSProps\n} from './DevicePermissions/BrowserPermissionDeniedIOS';\n\nexport { ParticipantsButton } from './ParticipantsButton';\nexport type {\n ParticipantsButtonContextualMenuStyles,\n ParticipantsButtonProps,\n ParticipantsButtonStrings,\n ParticipantsButtonStyles\n} from './ParticipantsButton';\n\nexport { ScreenShareButton } from './ScreenShareButton';\nexport type { ScreenShareButtonProps, ScreenShareButtonStrings } from './ScreenShareButton';\n\nexport { RaiseHandButton } from './RaiseHandButton';\n\nexport type { RaiseHandButtonProps, RaiseHandButtonStrings } from './RaiseHandButton';\nexport { ReactionButton } from './ReactionButton';\nexport type { ReactionButtonProps, ReactionButtonStrings } from './ReactionButton';\nexport { VideoTile } from './VideoTile';\nexport type { VideoTileProps, VideoTileStylesProps, VideoTileStrings } from './VideoTile';\n\nexport { _PictureInPictureInPicture } from './PictureInPictureInPicture/PictureInPictureInPicture';\nexport type {\n _PictureInPictureInPictureProps,\n _PictureInPictureInPictureStrings\n} from './PictureInPictureInPicture/PictureInPictureInPicture';\nexport type {\n _PictureInPictureInPictureTileProps,\n _TileOrientation\n} from './PictureInPictureInPicture/PictureInPictureInPictureTile';\n\nexport * from './Drawer';\n/* @conditional-compile-remove(file-sharing-acs) */\nexport type { SendBoxErrorBarError } from './SendBoxErrorBar';\nexport * from './Attachment/AttachmentCard';\nexport * from './Attachment/AttachmentCardGroup';\nexport * from './ModalClone/ModalClone';\nexport * from './Attachment/AttachmentDownloadCards';\nexport type { _AttachmentUploadCardsStrings } from './Attachment/AttachmentUploadCards';\n\n/* @conditional-compile-remove(file-sharing-acs) */\nexport type {\n AttachmentOptions,\n AttachmentUploadOptions,\n AttachmentActionHandler,\n AttachmentSelectionHandler,\n AttachmentMetadataWrapper,\n AttachmentRemovalHandler,\n AttachmentUploadTask\n} from '../types/Attachment';\n\n/* @conditional-compile-remove(file-sharing-acs) */\nexport type { AttachmentMenuAction, AttachmentDownloadOptions } from '../types/Attachment';\n\nexport { _useContainerHeight, _useContainerWidth } from './utils/responsive';\n\nexport { _ComplianceBanner } from './ComplianceBanner';\nexport type { _ComplianceBannerProps, _ComplianceBannerStrings } from './ComplianceBanner';\nexport { Dialpad } from './Dialpad/Dialpad';\nexport type { DialpadProps, DialpadStrings, DialpadStyles, DtmfTone } from './Dialpad/Dialpad';\nexport type { DialpadMode, LongPressTrigger } from './Dialpad/Dialpad';\n\nexport { _StarSurvey } from './Survey/StarSurvey/StarSurvey';\n\nexport type { _StarSurveyProps, _StarSurveyStrings } from './Survey/StarSurvey/StarSurvey';\n\nexport * from './Survey/SurveyTypes';\n\nexport { _TagsSurvey } from './Survey/TagsSurvey/TagsSurvey';\n\nexport type { _TagsSurveyProps, _TagsSurveyStrings, _IssueCategory, _SurveyTag } from './Survey/TagsSurvey/TagsSurvey';\n/* @conditional-compile-remove(PSTN-calls) */\nexport { HoldButton } from './HoldButton';\n/* @conditional-compile-remove(PSTN-calls) */\nexport type { HoldButtonProps, HoldButtonStrings } from './HoldButton';\n\nexport { _LocalVideoTile } from './LocalVideoTile';\nexport { _RemoteVideoTile } from './RemoteVideoTile';\nexport { _HighContrastAwareIcon } from './HighContrastAwareIcon';\nexport type { _HighContrastAwareIconProps } from './HighContrastAwareIcon';\n\nexport { UnsupportedBrowser } from './UnsupportedBrowser';\nexport type { UnsupportedBrowserStrings, UnsupportedBrowserProps } from './UnsupportedBrowser';\nexport { UnsupportedBrowserVersion } from './UnsupportedBrowserVersion';\nexport type { UnsupportedBrowserVersionStrings, UnsupportedBrowserVersionProps } from './UnsupportedBrowserVersion';\nexport { UnsupportedOperatingSystem } from './UnsupportedOperatingSystem';\nexport type { UnsupportedOperatingSystemStrings, UnsupportedOperatingSystemProps } from './UnsupportedOperatingSystem';\n\nexport { _TroubleshootingGuideErrorBar } from './TroubleshootingGuideErrorBar';\nexport type {\n _TroubleshootingGuideErrorBarStrings,\n _TroubleshootingGuideErrorBarProps\n} from './TroubleshootingGuideErrorBar';\n\nexport { _DevicePermissionDropdown } from './DevicePermissions/DevicePermissionDropdown';\nexport type {\n _DevicePermissionDropdownStrings,\n _DevicePermissionDropdownProps,\n _PermissionConstraints\n} from './DevicePermissions/DevicePermissionDropdown';\n\nexport { _VideoEffectsItem } from './VideoEffects/VideoEffectsItem';\nexport type { _VideoEffectsItemProps, _VideoEffectsItemStyles } from './VideoEffects/VideoEffectsItem';\nexport {\n _VideoEffectsItemNoBackground,\n _VideoEffectsItemBlur,\n _VideoEffectsItemAddImage\n} from './VideoEffects/PresetVideoEffectsItems';\n\nexport { _VideoBackgroundEffectsPicker } from './VideoEffects/VideoBackgroundEffectsPicker';\nexport type {\n _VideoBackgroundEffectsPickerProps,\n _VideoBackgroundEffectChoiceOption,\n _VideoBackgroundEffectsPickerStyles\n} from './VideoEffects/VideoBackgroundEffectsPicker';\n\nexport type { VerticalGalleryStyles, VerticalGalleryStrings, VerticalGalleryControlBarStyles } from './VerticalGallery';\n\nexport * from './CaptionsBanner';\n\nexport * from './Caption';\n\nexport * from './StartCaptionsButton';\n\nexport * from './CaptionsSettingsModal';\n\n/* @conditional-compile-remove(teams-meeting-conference) */\nexport * from './MeetingConferencePhoneInfo';\n\nexport { _ErrorBoundary } from './ErrorBoundary';\n/* @conditional-compile-remove(notifications) */\nexport * from './Notification';\n/* @conditional-compile-remove(notifications) */\nexport * from './NotificationStack';\n/* @conditional-compile-remove(one-to-n-calling) */\nexport * from './IncomingCallNotification';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../react-components/src/components/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAGpD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CA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0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAG1E,OAAO,EAAE,6BAA6B,EAAE,MAAM,gCAAgC,CAAC;AAM/E,OAAO,EAAE,yBAAyB,EAAE,MAAM,8CAA8C,CAAC;AAOzF,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AAEpE,OAAO,EACL,6BAA6B,EAC7B,qBAAqB,EACrB,yBAAyB,EAC1B,MAAM,wCAAwC,CAAC;AAEhD,OAAO,EAAE,6BAA6B,EAAE,MAAM,6CAA6C,CAAC;AAS5F,cAAc,kBAAkB,CAAC;AAEjC,cAAc,WAAW,CAAC;AAE1B,cAAc,uBAAuB,CAAC;AAEtC,cAAc,yBAAyB,CAAC;AAExC,2DAA2D;AAC3D,cAAc,8BAA8B,CAAC;AAE7C,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,gDAAgD;AAChD,cAAc,gBAAgB,CAAC;AAC/B,gDAAgD;AAChD,cAAc,qBAAqB,CAAC;AACpC,mDAAmD;AACnD,cAAc,4BAA4B,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport { TypingIndicator } from './TypingIndicator';\nexport type { TypingIndicatorProps, TypingIndicatorStrings, TypingIndicatorStylesProps } from './TypingIndicator';\n\nexport { ErrorBar } from './ErrorBar';\nexport type { ActiveErrorMessage, ErrorBarProps, ErrorBarStrings, ErrorType } from './ErrorBar';\n\nexport { GridLayout } from './GridLayout';\nexport type { GridLayoutProps, GridLayoutStyles } from './GridLayout';\n\nexport { SendBox } from './SendBox';\n/* @conditional-compile-remove(mention) */\nexport { _MentionPopover } from './MentionPopover';\n\nexport { ImageOverlay } from './ImageOverlay';\nexport type { ImageOverlayStrings } from './ImageOverlay';\nexport type { SendBoxProps, SendBoxStrings, SendBoxStylesProps } from './SendBox';\n\n/* @conditional-compile-remove(rich-text-editor) */\nexport { RichTextSendBox } from './RichTextEditor/RichTextSendBox';\n// TODO: This component is exported only for testing purposes. Remove this when this component is added to composites\n/* @conditional-compile-remove(rich-text-editor) */\nexport { ChatMessageComponentAsRichTextEditBox } from './ChatMessage/MyMessageComponents/ChatMessageComponentAsRichTextEditBox';\n// TODO: This component is exported only for testing purposes. Remove this when this component is added to composites\n/* @conditional-compile-remove(rich-text-editor) */\nexport type { ChatMessageComponentAsRichTextEditBoxProps } from './ChatMessage/MyMessageComponents/ChatMessageComponentAsRichTextEditBox';\n/* @conditional-compile-remove(rich-text-editor) */\nexport type { RichTextSendBoxProps, RichTextSendBoxStrings, RichTextStrings } from './RichTextEditor/RichTextSendBox';\n\n/* @conditional-compile-remove(mention) */\nexport type {\n _MentionPopoverProps,\n MentionLookupOptions,\n MentionDisplayOptions,\n MentionOptions,\n Mention,\n MentionPopoverStrings\n} from './MentionPopover';\n\nexport type { ImageOverlayProps } from './ImageOverlay';\n\nexport type { InlineImageOptions, InlineImage } from './ChatMessage/ChatMessageContent';\n\nexport { MessageStatusIndicator } from './MessageStatusIndicator';\nexport type { MessageStatusIndicatorProps, MessageStatusIndicatorStrings } from './MessageStatusIndicator';\n\nexport { MessageThread } from './MessageThread';\nexport type {\n MessageProps,\n MessageThreadProps,\n MessageThreadStrings,\n MessageThreadStyles,\n JumpToNewMessageButtonProps,\n MessageRenderer,\n UpdateMessageCallback,\n CancelEditCallback\n} from './MessageThread';\n\n/* @conditional-compile-remove(rich-text-editor) */\nexport type { RichTextEditorOptions, RichTextSendBoxOptions } from './RichTextEditor/RichTextSendBox';\n/* @conditional-compile-remove(rich-text-editor) */\nexport type { RichTextEditBoxOptions } from './MessageThread';\n\nexport { StreamMedia } from './StreamMedia';\nexport type { StreamMediaProps } from './StreamMedia';\nexport type { LoadingState } from './StreamMedia';\n\nexport { ParticipantItem } from './ParticipantItem';\nexport type { ParticipantItemProps, ParticipantItemStrings, ParticipantItemStyles } from './ParticipantItem';\n\nexport { ParticipantList } from './ParticipantList';\nexport type {\n ParticipantListItemStyles,\n ParticipantListProps,\n ParticipantListStyles,\n ParticipantMenuItemsCallback\n} from './ParticipantList';\n\n/* @conditional-compile-remove(total-participant-count) */\nexport type { ParticipantListStrings } from './ParticipantList';\n\nexport { Announcer } from './Announcer';\nexport type { AnnouncerProps } from './Announcer';\n\nexport { VideoGallery } from './VideoGallery';\nexport type {\n VideoGalleryProps,\n VideoGalleryStrings,\n VideoGalleryStyles,\n VideoGalleryLayout,\n VideoTileContextualMenuProps,\n VideoTileDrawerMenuProps,\n VideoTilesOptions\n} from './VideoGallery';\nexport type { OverflowGalleryPosition } from './VideoGallery';\nexport type { LocalVideoTileSize } from './VideoGallery';\nexport type { HorizontalGalleryStyles } from './HorizontalGallery';\n\nexport { LocalVideoCameraCycleButton } from './LocalVideoCameraButton';\nexport type { LocalVideoCameraCycleButtonProps } from './LocalVideoCameraButton';\n\nexport { CameraButton } from './CameraButton';\nexport type {\n CameraButtonContextualMenuStyles,\n CameraButtonProps,\n CameraButtonStrings,\n CameraButtonStyles\n} from './CameraButton';\n\nexport { ControlBar } from './ControlBar';\nexport type { ControlBarProps, ControlBarLayout } from './ControlBar';\n\nexport { ControlBarButton } from './ControlBarButton';\nexport type { ControlBarButtonProps, ControlBarButtonStrings, ControlBarButtonStyles } from './ControlBarButton';\n\nexport { EndCallButton } from './EndCallButton';\nexport type { EndCallButtonProps, EndCallButtonStrings } from './EndCallButton';\n\nexport { MicrophoneButton } from './MicrophoneButton';\nexport type {\n MicrophoneButtonStyles,\n MicrophoneButtonContextualMenuStyles,\n MicrophoneButtonProps,\n MicrophoneButtonStrings\n} from './MicrophoneButton';\n\nexport { DevicesButton, generateDefaultDeviceMenuProps as _generateDefaultDeviceMenuProps } from './DevicesButton';\nexport type {\n OptionsDevice,\n DevicesButtonProps,\n DevicesButtonStrings,\n DevicesButtonStyles,\n DevicesButtonContextualMenuStyles,\n DeviceMenuProps as _DeviceMenuProps,\n DeviceMenuStrings as _DeviceMenuStrings,\n DeviceMenuStyles as _DeviceMenuStyles\n} from './DevicesButton';\n\n/* @conditional-compile-remove(call-readiness) */\nexport {\n CameraAndMicrophoneSitePermissions,\n MicrophoneSitePermissions,\n CameraSitePermissions\n} from './DevicePermissions/SitePermissions';\n/* @conditional-compile-remove(call-readiness) */\nexport type { SitePermissionsStrings, SitePermissionsStyles } from './DevicePermissions/SitePermissionsScaffolding';\n/* @conditional-compile-remove(call-readiness) */\nexport type {\n CameraAndMicrophoneSitePermissionsStrings,\n CameraAndMicrophoneSitePermissionsProps,\n CameraSitePermissionsStrings,\n CameraSitePermissionsProps,\n CommonSitePermissionsProps,\n MicrophoneSitePermissionsStrings,\n MicrophoneSitePermissionsProps\n} from './DevicePermissions/SitePermissions';\n/* @conditional-compile-remove(call-readiness) */\nexport { BrowserPermissionDenied } from './DevicePermissions/BrowserPermissionDenied';\n/* @conditional-compile-remove(call-readiness) */\nexport type {\n BrowserPermissionDeniedStrings,\n BrowserPermissionDeniedStyles,\n BrowserPermissionDeniedProps\n} from './DevicePermissions/BrowserPermissionDenied';\n/* @conditional-compile-remove(call-readiness) */\nexport { BrowserPermissionDeniedIOS } from './DevicePermissions/BrowserPermissionDeniedIOS';\n/* @conditional-compile-remove(call-readiness) */\nexport type {\n BrowserPermissionDeniedIOSStrings,\n BrowserPermissionDeniedIOSProps\n} from './DevicePermissions/BrowserPermissionDeniedIOS';\n\nexport { ParticipantsButton } from './ParticipantsButton';\nexport type {\n ParticipantsButtonContextualMenuStyles,\n ParticipantsButtonProps,\n ParticipantsButtonStrings,\n ParticipantsButtonStyles\n} from './ParticipantsButton';\n\nexport { ScreenShareButton } from './ScreenShareButton';\nexport type { ScreenShareButtonProps, ScreenShareButtonStrings } from './ScreenShareButton';\n\nexport { RaiseHandButton } from './RaiseHandButton';\n\nexport type { RaiseHandButtonProps, RaiseHandButtonStrings } from './RaiseHandButton';\nexport { ReactionButton } from './ReactionButton';\nexport type { ReactionButtonProps, ReactionButtonStrings } from './ReactionButton';\nexport { VideoTile } from './VideoTile';\nexport type { VideoTileProps, VideoTileStylesProps, VideoTileStrings } from './VideoTile';\n\nexport { _PictureInPictureInPicture } from './PictureInPictureInPicture/PictureInPictureInPicture';\nexport type {\n _PictureInPictureInPictureProps,\n _PictureInPictureInPictureStrings\n} from './PictureInPictureInPicture/PictureInPictureInPicture';\nexport type {\n _PictureInPictureInPictureTileProps,\n _TileOrientation\n} from './PictureInPictureInPicture/PictureInPictureInPictureTile';\n\nexport * from './Drawer';\n/* @conditional-compile-remove(file-sharing-acs) */\nexport type { SendBoxErrorBarError } from './SendBoxErrorBar';\n/* @conditional-compile-remove(rich-text-editor-image-upload) */\nexport type { SendBoxErrorBarType } from './SendBoxErrorBar';\nexport * from './Attachment/AttachmentCard';\nexport * from './Attachment/AttachmentCardGroup';\nexport * from './ModalClone/ModalClone';\nexport * from './Attachment/AttachmentDownloadCards';\nexport type { _AttachmentUploadCardsStrings } from './Attachment/AttachmentUploadCards';\n\n/* @conditional-compile-remove(file-sharing-acs) */\nexport type {\n AttachmentOptions,\n AttachmentUploadOptions,\n AttachmentActionHandler,\n AttachmentSelectionHandler,\n AttachmentMetadataWrapper,\n AttachmentRemovalHandler,\n AttachmentUploadTask\n} from '../types/Attachment';\n\n/* @conditional-compile-remove(file-sharing-acs) */\nexport type { AttachmentMenuAction, AttachmentDownloadOptions } from '../types/Attachment';\n\nexport { _useContainerHeight, _useContainerWidth } from './utils/responsive';\n\nexport { _ComplianceBanner } from './ComplianceBanner';\nexport type { _ComplianceBannerProps, _ComplianceBannerStrings } from './ComplianceBanner';\nexport { Dialpad } from './Dialpad/Dialpad';\nexport type { DialpadProps, DialpadStrings, DialpadStyles, DtmfTone } from './Dialpad/Dialpad';\nexport type { DialpadMode, LongPressTrigger } from './Dialpad/Dialpad';\n\nexport { _StarSurvey } from './Survey/StarSurvey/StarSurvey';\n\nexport type { _StarSurveyProps, _StarSurveyStrings } from './Survey/StarSurvey/StarSurvey';\n\nexport * from './Survey/SurveyTypes';\n\nexport { _TagsSurvey } from './Survey/TagsSurvey/TagsSurvey';\n\nexport type { _TagsSurveyProps, _TagsSurveyStrings, _IssueCategory, _SurveyTag } from './Survey/TagsSurvey/TagsSurvey';\n/* @conditional-compile-remove(PSTN-calls) */\nexport { HoldButton } from './HoldButton';\n/* @conditional-compile-remove(PSTN-calls) */\nexport type { HoldButtonProps, HoldButtonStrings } from './HoldButton';\n\nexport { _LocalVideoTile } from './LocalVideoTile';\nexport { _RemoteVideoTile } from './RemoteVideoTile';\nexport { _HighContrastAwareIcon } from './HighContrastAwareIcon';\nexport type { _HighContrastAwareIconProps } from './HighContrastAwareIcon';\n\nexport { UnsupportedBrowser } from './UnsupportedBrowser';\nexport type { UnsupportedBrowserStrings, UnsupportedBrowserProps } from './UnsupportedBrowser';\nexport { UnsupportedBrowserVersion } from './UnsupportedBrowserVersion';\nexport type { UnsupportedBrowserVersionStrings, UnsupportedBrowserVersionProps } from './UnsupportedBrowserVersion';\nexport { UnsupportedOperatingSystem } from './UnsupportedOperatingSystem';\nexport type { UnsupportedOperatingSystemStrings, UnsupportedOperatingSystemProps } from './UnsupportedOperatingSystem';\n\nexport { _TroubleshootingGuideErrorBar } from './TroubleshootingGuideErrorBar';\nexport type {\n _TroubleshootingGuideErrorBarStrings,\n _TroubleshootingGuideErrorBarProps\n} from './TroubleshootingGuideErrorBar';\n\nexport { _DevicePermissionDropdown } from './DevicePermissions/DevicePermissionDropdown';\nexport type {\n _DevicePermissionDropdownStrings,\n _DevicePermissionDropdownProps,\n _PermissionConstraints\n} from './DevicePermissions/DevicePermissionDropdown';\n\nexport { _VideoEffectsItem } from './VideoEffects/VideoEffectsItem';\nexport type { _VideoEffectsItemProps, _VideoEffectsItemStyles } from './VideoEffects/VideoEffectsItem';\nexport {\n _VideoEffectsItemNoBackground,\n _VideoEffectsItemBlur,\n _VideoEffectsItemAddImage\n} from './VideoEffects/PresetVideoEffectsItems';\n\nexport { _VideoBackgroundEffectsPicker } from './VideoEffects/VideoBackgroundEffectsPicker';\nexport type {\n _VideoBackgroundEffectsPickerProps,\n _VideoBackgroundEffectChoiceOption,\n _VideoBackgroundEffectsPickerStyles\n} from './VideoEffects/VideoBackgroundEffectsPicker';\n\nexport type { VerticalGalleryStyles, VerticalGalleryStrings, VerticalGalleryControlBarStyles } from './VerticalGallery';\n\nexport * from './CaptionsBanner';\n\nexport * from './Caption';\n\nexport * from './StartCaptionsButton';\n\nexport * from './CaptionsSettingsModal';\n\n/* @conditional-compile-remove(teams-meeting-conference) */\nexport * from './MeetingConferencePhoneInfo';\n\nexport { _ErrorBoundary } from './ErrorBoundary';\n/* @conditional-compile-remove(notifications) */\nexport * from './Notification';\n/* @conditional-compile-remove(notifications) */\nexport * from './NotificationStack';\n/* @conditional-compile-remove(one-to-n-calling) */\nexport * from './IncomingCallNotification';\n"]}
@@ -61,6 +61,6 @@ export declare const insertImagesToContentString: (content: string, imageUploads
61
61
  /**
62
62
  * @internal
63
63
  */
64
- export declare const removeBrokenImageContent: (content: string) => string;
64
+ export declare const removeBrokenImageContentAndClearImageSizeStyles: (content: string) => string;
65
65
  export {};
66
66
  //# sourceMappingURL=SendBoxUtils.d.ts.map
@@ -60,7 +60,8 @@ export const addUploadedImagesToMessage = (message, uploadInlineImages) => __awa
60
60
  img.width = imageElement.width;
61
61
  img.height = imageElement.height;
62
62
  img.style.aspectRatio = `${imageElement.width} / ${imageElement.height}`;
63
- // Clear maxWidth and maxHeight styles so that they can set in the style attribute
63
+ // Clear maxWidth and maxHeight styles that are set by roosterJS.
64
+ // This is so that they can be set in messageThread styles without using the important flag.
64
65
  img.style.maxWidth = '';
65
66
  img.style.maxHeight = '';
66
67
  resolve();
@@ -158,7 +159,7 @@ export const insertImagesToContentString = (content, imageUploadsInProgress, onC
158
159
  /**
159
160
  * @internal
160
161
  */
161
- export const removeBrokenImageContent = (content) => {
162
+ export const removeBrokenImageContentAndClearImageSizeStyles = (content) => {
162
163
  const document = new DOMParser().parseFromString(content, 'text/html');
163
164
  document.querySelectorAll('img').forEach((img) => {
164
165
  // Before submitting/resend the message, we need to trim the unnecessary attributes such as src,
@@ -169,9 +170,11 @@ export const removeBrokenImageContent = (content) => {
169
170
  img.removeAttribute('class');
170
171
  img.removeAttribute('src');
171
172
  img.removeAttribute('data-ui-id');
172
- img.style.width = '';
173
- img.style.height = '';
174
173
  }
174
+ // Clear maxWidth and maxHeight styles that are set by roosterJS.
175
+ // This is so that they can be set in messageThread styles without using the important flag.
176
+ img.style.maxWidth = '';
177
+ img.style.maxHeight = '';
175
178
  });
176
179
  return document.body.innerHTML;
177
180
  };
@@ -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,uBAAmE,EAC1D,EAAE;IACX,OAAO,CAAC,CAAC,CAAA,uBAAuB,aAAvB,uBAAuB,uBAAvB,uBAAuB,CAAE,IAAI,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC,UAAU,CAAC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B,GAAG,CAAC,eAAe,CAAC,YAAY,CAAC,CAAC;YAClC,GAAG,CAAC,KAAK,CAAC,KAAK,GAAG,EAAE,CAAC;YACrB,GAAG,CAAC,KAAK,CAAC,MAAM,GAAG,EAAE,CAAC;QACxB,CAAC;IACH,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 uploadInlineImages: 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 = uploadInlineImages.find(\n (imageUpload) => !imageUpload.error && (imageUpload.url === img.src || imageUpload.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 so that they can set in the style attribute\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 imageUploadsInProgress: 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 {\n imageSrcArray,\n imageUploadsInProgress,\n messageId,\n editBoxOnCancelInlineImageUpload,\n sendBoxOnCancelInlineImageUpload\n } = props;\n if (imageSrcArray && imageUploadsInProgress && imageUploadsInProgress?.length > 0) {\n imageUploadsInProgress?.map((uploadImage) => {\n if (uploadImage.url && !imageSrcArray?.includes(uploadImage.url)) {\n sendBoxOnCancelInlineImageUpload && sendBoxOnCancelInlineImageUpload(uploadImage.id);\n editBoxOnCancelInlineImageUpload && editBoxOnCancelInlineImageUpload(uploadImage.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 imageUploadsInProgress?: AttachmentMetadataInProgress[],\n onCompleted?: (content: string) => void\n): Promise<void> => {\n if (!imageUploadsInProgress || imageUploadsInProgress.length <= 0) {\n onCompleted?.(content);\n }\n const newContent = await addUploadedImagesToMessage(content, imageUploadsInProgress ?? []);\n onCompleted?.(newContent);\n};\n\n/* @conditional-compile-remove(rich-text-editor-image-upload) */\n/**\n * @internal\n */\nexport const removeBrokenImageContent = (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 img.style.width = '';\n img.style.height = '';\n }\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,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,uBAAmE,EAC1D,EAAE;IACX,OAA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,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,4FAA4F;QAC5F,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 uploadInlineImages: 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 = uploadInlineImages.find(\n (imageUpload) => !imageUpload.error && (imageUpload.url === img.src || imageUpload.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 imageUploadsInProgress: 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 {\n imageSrcArray,\n imageUploadsInProgress,\n messageId,\n editBoxOnCancelInlineImageUpload,\n sendBoxOnCancelInlineImageUpload\n } = props;\n if (imageSrcArray && imageUploadsInProgress && imageUploadsInProgress?.length > 0) {\n imageUploadsInProgress?.map((uploadImage) => {\n if (uploadImage.url && !imageSrcArray?.includes(uploadImage.url)) {\n sendBoxOnCancelInlineImageUpload && sendBoxOnCancelInlineImageUpload(uploadImage.id);\n editBoxOnCancelInlineImageUpload && editBoxOnCancelInlineImageUpload(uploadImage.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 imageUploadsInProgress?: AttachmentMetadataInProgress[],\n onCompleted?: (content: string) => void\n): Promise<void> => {\n if (!imageUploadsInProgress || imageUploadsInProgress.length <= 0) {\n onCompleted?.(content);\n }\n const newContent = await addUploadedImagesToMessage(content, imageUploadsInProgress ?? []);\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 // 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 });\n return document.body.innerHTML;\n};\n"]}
@@ -24,7 +24,7 @@
24
24
  "placeholderText": "Enter a message",
25
25
  "textTooLong": "Your message length is over the maximum limit.",
26
26
  "sendButtonAriaLabel": "Send message",
27
- "attachmentUploadsPendingError": "Uploading... Please wait.",
27
+ "attachmentUploadsPendingError": "File is uploading, please wait.",
28
28
  "removeAttachment": "Remove file",
29
29
  "uploading": "Uploading",
30
30
  "uploadCompleted": "Upload completed",
@@ -34,7 +34,8 @@
34
34
  "placeholderText": "Enter a message",
35
35
  "textTooLong": "Your message length is over the maximum limit.",
36
36
  "sendButtonAriaLabel": "Send message",
37
- "attachmentUploadsPendingError": "Uploading... Please wait.",
37
+ "attachmentUploadsPendingError": "File is uploading, please wait.",
38
+ "imageUploadsPendingError": "Image is uploading, please wait.",
38
39
  "removeAttachment": "Remove file",
39
40
  "uploading": "Uploading",
40
41
  "uploadCompleted": "Upload completed",
@@ -225,9 +226,12 @@
225
226
  "richTextDeleteRowMenu": "Delete row",
226
227
  "richTextDeleteTableMenu": "Delete table",
227
228
  "richTextToolbarMoreButtonAriaLabel": "More options",
228
- "attachmentUploadsPendingError": "Uploading... Please wait.",
229
+ "attachmentUploadsPendingError": "File is uploading, please wait.",
230
+ "imageUploadsPendingError": "Image is uploading, please wait.",
229
231
  "richTextNewBulletedListItemAnnouncement": "Bullet, new line",
230
- "richTextNewNumberedListItemAnnouncement": "{0}, new line"
232
+ "richTextNewNumberedListItemAnnouncement": "{0}, new line",
233
+ "richTextBulletedListAppliedAnnouncement": "Bulleted list applied",
234
+ "richTextNumberedListAppliedAnnouncement": "Numbered list applied"
231
235
  },
232
236
  "errorBar": {
233
237
  "unableToReachChatService": "You are offline",
@@ -49,6 +49,8 @@ import { isMicrosoftTeamsUserIdentifier } from '@azure/communication-common';
49
49
  import { SEND_BOX_UPLOADS_KEY_VALUE } from '../common/constants';
50
50
  /* @conditional-compile-remove(rich-text-editor-image-upload) */
51
51
  import { ImageUploadReducer } from './ImageUpload/ImageUploadReducer';
52
+ /* @conditional-compile-remove(rich-text-editor-image-upload) */
53
+ import { useLocale } from '../localization';
52
54
  /**
53
55
  * @private
54
56
  */
@@ -67,6 +69,8 @@ export const ChatScreen = (props) => {
67
69
  const adapter = useAdapter();
68
70
  const theme = useTheme();
69
71
  /* @conditional-compile-remove(rich-text-editor-image-upload) */
72
+ const localeStrings = useLocale().strings;
73
+ /* @conditional-compile-remove(rich-text-editor-image-upload) */
70
74
  const [textOnlyChat, setTextOnlyChat] = useState(false);
71
75
  /* @conditional-compile-remove(rich-text-editor-image-upload) */
72
76
  const [isACSChat, setIsACSChat] = useState(false);
@@ -395,7 +399,7 @@ export const ChatScreen = (props) => {
395
399
  ? Object.assign(Object.assign({}, richTextEditorOptions), {
396
400
  /* @conditional-compile-remove(rich-text-editor-image-upload) */
397
401
  onUploadInlineImage: (imageUrl, imageFileName, messageId) => {
398
- onUploadInlineImageForEditBox(imageUrl, imageFileName, messageId, adapter, handleEditBoxInlineImageUploadAction);
402
+ onUploadInlineImageForEditBox(imageUrl, imageFileName, messageId, adapter, handleEditBoxInlineImageUploadAction, localeStrings.chat);
399
403
  },
400
404
  /* @conditional-compile-remove(rich-text-editor-image-upload) */
401
405
  messagesImageUploadsInProgress: getEditBoxMessagesImageUploadsInProgress(editBoxInlineImageUploads),
@@ -407,7 +411,8 @@ export const ChatScreen = (props) => {
407
411
  options === null || options === void 0 ? void 0 : options.richTextEditor,
408
412
  /* @conditional-compile-remove(rich-text-editor-image-upload) */ richTextEditorOptions,
409
413
  /* @conditional-compile-remove(rich-text-editor-image-upload) */ editBoxInlineImageUploads,
410
- /* @conditional-compile-remove(rich-text-editor-image-upload) */ adapter
414
+ /* @conditional-compile-remove(rich-text-editor-image-upload) */ adapter,
415
+ /* @conditional-compile-remove(rich-text-editor-image-upload) */ localeStrings.chat
411
416
  ]);
412
417
  /* @conditional-compile-remove(rich-text-editor-composite-support) */
413
418
  const richTextSendBoxOptions = useMemo(() => {
@@ -415,7 +420,7 @@ export const ChatScreen = (props) => {
415
420
  ? Object.assign(Object.assign({}, richTextEditorOptions), {
416
421
  /* @conditional-compile-remove(rich-text-editor-image-upload) */
417
422
  onUploadInlineImage: (imageUrl, imageFileName) => {
418
- onUploadInlineImageForSendBox(imageUrl, imageFileName, adapter, handleSendBoxInlineImageUploadAction);
423
+ onUploadInlineImageForSendBox(imageUrl, imageFileName, adapter, handleSendBoxInlineImageUploadAction, localeStrings.chat);
419
424
  },
420
425
  // onUploadInlineImageForSendBox,
421
426
  /* @conditional-compile-remove(rich-text-editor-image-upload) */
@@ -428,6 +433,7 @@ export const ChatScreen = (props) => {
428
433
  options === null || options === void 0 ? void 0 : options.richTextEditor,
429
434
  /* @conditional-compile-remove(rich-text-editor-image-upload) */ richTextEditorOptions,
430
435
  /* @conditional-compile-remove(rich-text-editor-image-upload) */ sendBoxInlineImageUploads,
436
+ /* @conditional-compile-remove(rich-text-editor-image-upload) */ localeStrings.chat,
431
437
  adapter
432
438
  ]);
433
439
  return (React.createElement(Stack, { className: chatContainer, grow: true },