@azure/communication-react 1.14.0-alpha-202403060013 → 1.14.0-alpha-202403070010
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.
- package/dist/communication-react.d.ts +117 -50
- package/dist/dist-cjs/communication-react/RichTextSendBoxWrapper-DQB5BrFt.js +51 -0
- package/dist/dist-cjs/communication-react/RichTextSendBoxWrapper-DQB5BrFt.js.map +1 -0
- package/dist/dist-cjs/communication-react/index-szH03w3_.js +38011 -0
- package/dist/dist-cjs/communication-react/index-szH03w3_.js.map +1 -0
- package/dist/dist-cjs/communication-react/index.js +157 -37619
- package/dist/dist-cjs/communication-react/index.js.map +1 -1
- package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js +1 -1
- package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js.map +1 -1
- package/dist/dist-esm/chat-component-bindings/src/hooks/usePropsFor.d.ts +2 -1
- package/dist/dist-esm/chat-component-bindings/src/hooks/usePropsFor.js +5 -0
- package/dist/dist-esm/chat-component-bindings/src/hooks/usePropsFor.js.map +1 -1
- package/dist/dist-esm/chat-component-bindings/src/messageThreadSelector.js +1 -4
- package/dist/dist-esm/chat-component-bindings/src/messageThreadSelector.js.map +1 -1
- package/dist/dist-esm/communication-react/src/index.d.ts +2 -2
- package/dist/dist-esm/communication-react/src/index.js +2 -0
- package/dist/dist-esm/communication-react/src/index.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsEditBox.d.ts +2 -2
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsEditBox.js +16 -34
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsEditBox.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsRichTextEditBox.d.ts +18 -0
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsRichTextEditBox.js +102 -0
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsRichTextEditBox.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/FileDownloadCards.d.ts +1 -7
- package/dist/dist-esm/react-components/src/components/FileDownloadCards.js +5 -17
- package/dist/dist-esm/react-components/src/components/FileDownloadCards.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/{RTE → RichTextEditor}/RichTextEditor.d.ts +14 -2
- package/dist/dist-esm/react-components/src/components/{RTE → RichTextEditor}/RichTextEditor.js +22 -21
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextEditor.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextInputBoxComponent.d.ts +28 -0
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextInputBoxComponent.js +50 -0
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextInputBoxComponent.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/{RTE/RTERibbonButtons.d.ts → RichTextEditor/RichTextRibbonButtons.d.ts} +2 -2
- package/dist/dist-esm/react-components/src/components/{RTE/RTERibbonButtons.js → RichTextEditor/RichTextRibbonButtons.js} +9 -9
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextRibbonButtons.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/{RTE/RTESendBox.d.ts → RichTextEditor/RichTextSendBox.d.ts} +5 -1
- package/dist/dist-esm/react-components/src/components/{RTE/RTESendBox.js → RichTextEditor/RichTextSendBox.js} +33 -20
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBox.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/{RTE/RTESendBoxErrors.d.ts → RichTextEditor/RichTextSendBoxErrors.d.ts} +3 -3
- package/dist/dist-esm/react-components/src/components/{RTE/RTESendBoxErrors.js → RichTextEditor/RichTextSendBoxErrors.js} +2 -2
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBoxErrors.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/SendBox.js +2 -2
- package/dist/dist-esm/react-components/src/components/SendBox.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/index.d.ts +4 -2
- package/dist/dist-esm/react-components/src/components/index.js +4 -1
- package/dist/dist-esm/react-components/src/components/index.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/styles/ChatMessageComponent.styles.d.ts +4 -0
- package/dist/dist-esm/react-components/src/components/styles/ChatMessageComponent.styles.js +10 -0
- package/dist/dist-esm/react-components/src/components/styles/ChatMessageComponent.styles.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/styles/EditBox.styles.d.ts +10 -4
- package/dist/dist-esm/react-components/src/components/styles/EditBox.styles.js +17 -4
- package/dist/dist-esm/react-components/src/components/styles/EditBox.styles.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/styles/RichTextEditor.styles.d.ts +34 -2
- package/dist/dist-esm/react-components/src/components/styles/RichTextEditor.styles.js +72 -11
- package/dist/dist-esm/react-components/src/components/styles/RichTextEditor.styles.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/styles/RichTextInputBoxComponent.styles.d.ts +17 -0
- package/dist/dist-esm/react-components/src/components/styles/RichTextInputBoxComponent.styles.js +30 -0
- package/dist/dist-esm/react-components/src/components/styles/RichTextInputBoxComponent.styles.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/styles/SendBox.styles.d.ts +15 -0
- package/dist/dist-esm/react-components/src/components/styles/SendBox.styles.js +22 -11
- package/dist/dist-esm/react-components/src/components/styles/SendBox.styles.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentAsEditBoxUtils.d.ts +23 -0
- package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentAsEditBoxUtils.js +44 -0
- package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentAsEditBoxUtils.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/utils/SendBoxUtils.d.ts +1 -1
- package/dist/dist-esm/react-components/src/components/utils/SendBoxUtils.js +1 -1
- package/dist/dist-esm/react-components/src/components/utils/SendBoxUtils.js.map +1 -1
- package/dist/dist-esm/react-components/src/localization/LocalizationProvider.d.ts +2 -2
- package/dist/dist-esm/react-components/src/localization/LocalizationProvider.js.map +1 -1
- package/dist/dist-esm/react-components/src/localization/locales/en-US/strings.json +2 -1
- package/dist/dist-esm/react-components/src/theming/icons.d.ts +10 -8
- package/dist/dist-esm/react-components/src/theming/icons.js +13 -9
- package/dist/dist-esm/react-components/src/theming/icons.js.map +1 -1
- package/dist/dist-esm/react-components/src/types/ChatMessage.d.ts +3 -3
- package/dist/dist-esm/react-components/src/types/ChatMessage.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js +6 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatComposite.d.ts +14 -0
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatComposite.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.d.ts +0 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js +4 -13
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/FileUpload.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/index.d.ts +1 -0
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/index.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/fileUploadsSelector.d.ts +2 -2
- package/dist/dist-esm/react-composites/src/composites/common/RichTextSendBoxWrapper.d.ts +9 -0
- package/dist/dist-esm/react-composites/src/composites/common/RichTextSendBoxWrapper.js +20 -0
- package/dist/dist-esm/react-composites/src/composites/common/RichTextSendBoxWrapper.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/common/SendBox.d.ts +17 -0
- package/dist/dist-esm/react-composites/src/composites/common/SendBox.js +46 -0
- package/dist/dist-esm/react-composites/src/composites/common/SendBox.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/common/icons.d.ts +10 -8
- package/package.json +1 -1
- package/dist/dist-esm/react-components/src/components/RTE/RTEInputBoxComponent.d.ts +0 -25
- package/dist/dist-esm/react-components/src/components/RTE/RTEInputBoxComponent.js +0 -21
- package/dist/dist-esm/react-components/src/components/RTE/RTEInputBoxComponent.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/RTE/RTERibbonButtons.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/RTE/RTESendBox.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/RTE/RTESendBoxErrors.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/RTE/RichTextEditor.js.map +0 -1
@@ -1,8 +1,28 @@
|
|
1
1
|
import { IButtonStyles, ICommandBarStyles, IContextualMenuStyles, Theme } from '@fluentui/react';
|
2
|
+
import { RichTextEditorStyleProps } from '../RichTextEditor/RichTextEditor';
|
2
3
|
/**
|
3
4
|
* @private
|
4
5
|
*/
|
5
|
-
export declare const richTextEditorStyle:
|
6
|
+
export declare const richTextEditorStyle: (props: {
|
7
|
+
minHeight: string;
|
8
|
+
maxHeight: string;
|
9
|
+
}) => string;
|
10
|
+
/**
|
11
|
+
* @private
|
12
|
+
*/
|
13
|
+
export declare const richTextEditorWrapperStyle: (theme: Theme, addTopOffset: boolean, addRightOffset: boolean) => string;
|
14
|
+
/**
|
15
|
+
* @private
|
16
|
+
*/
|
17
|
+
export declare const richTextActionButtonsStackStyle: string;
|
18
|
+
/**
|
19
|
+
* @private
|
20
|
+
*/
|
21
|
+
export declare const richTextActionButtonsStyle: string;
|
22
|
+
/**
|
23
|
+
* @private
|
24
|
+
*/
|
25
|
+
export declare const richTextActionButtonsDividerStyle: (theme: Theme) => string;
|
6
26
|
/**
|
7
27
|
* @private
|
8
28
|
*/
|
@@ -18,5 +38,17 @@ export declare const ribbonDividerStyle: (theme: Theme) => Partial<IButtonStyles
|
|
18
38
|
/**
|
19
39
|
* @private
|
20
40
|
*/
|
21
|
-
export declare const ribbonStyle:
|
41
|
+
export declare const ribbonStyle: Partial<ICommandBarStyles>;
|
42
|
+
/**
|
43
|
+
* @private
|
44
|
+
*/
|
45
|
+
export declare const richTextFormatButtonIconStyle: (theme: Theme, isSelected: boolean) => string;
|
46
|
+
/**
|
47
|
+
* @private
|
48
|
+
*/
|
49
|
+
export declare const editBoxRichTextEditorStyle: () => RichTextEditorStyleProps;
|
50
|
+
/**
|
51
|
+
* @private
|
52
|
+
*/
|
53
|
+
export declare const sendBoxRichTextEditorStyle: (isExpanded: boolean) => RichTextEditorStyleProps;
|
22
54
|
//# sourceMappingURL=RichTextEditor.styles.d.ts.map
|
@@ -1,18 +1,55 @@
|
|
1
1
|
// Copyright (c) Microsoft Corporation.
|
2
2
|
// Licensed under the MIT License.
|
3
3
|
import { mergeStyles } from '@fluentui/react';
|
4
|
+
import { editorTextBoxButtonStyle } from './SendBox.styles';
|
4
5
|
/**
|
5
6
|
* @private
|
6
7
|
*/
|
7
|
-
export const richTextEditorStyle =
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
8
|
+
export const richTextEditorStyle = (props) => {
|
9
|
+
return mergeStyles({
|
10
|
+
border: 'none',
|
11
|
+
overflow: 'auto',
|
12
|
+
outline: 'none',
|
13
|
+
minHeight: props.minHeight,
|
14
|
+
maxHeight: props.maxHeight,
|
15
|
+
maxWidth: '100%'
|
16
|
+
});
|
17
|
+
};
|
18
|
+
/**
|
19
|
+
* @private
|
20
|
+
*/
|
21
|
+
export const richTextEditorWrapperStyle = (theme, addTopOffset, addRightOffset) => {
|
22
|
+
return mergeStyles({
|
23
|
+
padding: `${addTopOffset ? '0.5rem' : '0'} ${addRightOffset ? '0.75rem' : '0'} 0 0.75rem`,
|
24
|
+
lineHeight: '1.25rem',
|
25
|
+
maxWidth: '100%',
|
26
|
+
color: theme.palette.neutralPrimary
|
27
|
+
});
|
28
|
+
};
|
29
|
+
/**
|
30
|
+
* @private
|
31
|
+
*/
|
32
|
+
export const richTextActionButtonsStackStyle = mergeStyles({
|
33
|
+
paddingRight: `0.125rem`
|
15
34
|
});
|
35
|
+
/**
|
36
|
+
* @private
|
37
|
+
*/
|
38
|
+
export const richTextActionButtonsStyle = mergeStyles({
|
39
|
+
height: '2.25rem',
|
40
|
+
width: '2.25rem',
|
41
|
+
margin: 'auto'
|
42
|
+
});
|
43
|
+
/**
|
44
|
+
* @private
|
45
|
+
*/
|
46
|
+
export const richTextActionButtonsDividerStyle = (theme) => {
|
47
|
+
return mergeStyles({
|
48
|
+
color: theme.palette.neutralQuaternaryAlt,
|
49
|
+
margin: '0.375rem -0.5rem 0 -0.5rem',
|
50
|
+
backgroundColor: 'transparent'
|
51
|
+
});
|
52
|
+
};
|
16
53
|
/**
|
17
54
|
* @private
|
18
55
|
*/
|
@@ -84,10 +121,34 @@ export const ribbonDividerStyle = (theme) => {
|
|
84
121
|
/**
|
85
122
|
* @private
|
86
123
|
*/
|
87
|
-
export const ribbonStyle =
|
124
|
+
export const ribbonStyle = {
|
125
|
+
// Override for the default white color of the Ribbon component
|
126
|
+
root: { backgroundColor: 'transparent' }
|
127
|
+
};
|
128
|
+
/**
|
129
|
+
* @private
|
130
|
+
*/
|
131
|
+
export const richTextFormatButtonIconStyle = (theme, isSelected) => {
|
132
|
+
return mergeStyles(editorTextBoxButtonStyle, {
|
133
|
+
color: isSelected ? theme.palette.themePrimary : theme.palette.neutralSecondary
|
134
|
+
});
|
135
|
+
};
|
136
|
+
/**
|
137
|
+
* @private
|
138
|
+
*/
|
139
|
+
export const editBoxRichTextEditorStyle = () => {
|
140
|
+
return {
|
141
|
+
minHeight: '2.25rem',
|
142
|
+
maxHeight: '2.25rem'
|
143
|
+
};
|
144
|
+
};
|
145
|
+
/**
|
146
|
+
* @private
|
147
|
+
*/
|
148
|
+
export const sendBoxRichTextEditorStyle = (isExpanded) => {
|
88
149
|
return {
|
89
|
-
|
90
|
-
|
150
|
+
minHeight: isExpanded ? '5rem' : '1.25rem',
|
151
|
+
maxHeight: '5rem'
|
91
152
|
};
|
92
153
|
};
|
93
154
|
//# sourceMappingURL=RichTextEditor.styles.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"RichTextEditor.styles.js","sourceRoot":"","sources":["../../../../../../../react-components/src/components/styles/RichTextEditor.styles.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAA0E,WAAW,EAAE,MAAM,iBAAiB,CAAC;
|
1
|
+
{"version":3,"file":"RichTextEditor.styles.js","sourceRoot":"","sources":["../../../../../../../react-components/src/components/styles/RichTextEditor.styles.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAA0E,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACtH,OAAO,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAC;AAG5D;;GAEG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,KAA+C,EAAU,EAAE;IAC7F,OAAO,WAAW,CAAC;QACjB,MAAM,EAAE,MAAM;QACd,QAAQ,EAAE,MAAM;QAChB,OAAO,EAAE,MAAM;QACf,SAAS,EAAE,KAAK,CAAC,SAAS;QAC1B,SAAS,EAAE,KAAK,CAAC,SAAS;QAC1B,QAAQ,EAAE,MAAM;KACjB,CAAC,CAAC;AACL,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,KAAY,EAAE,YAAqB,EAAE,cAAuB,EAAU,EAAE;IACjH,OAAO,WAAW,CAAC;QACjB,OAAO,EAAE,GAAG,YAAY,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,IAAI,cAAc,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,YAAY;QACzF,UAAU,EAAE,SAAS;QACrB,QAAQ,EAAE,MAAM;QAChB,KAAK,EAAE,KAAK,CAAC,OAAO,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CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,WAAW,GAA+B;IACrD,+DAA+D;IAC/D,IAAI,EAAE,EAAE,eAAe,EAAE,aAAa,EAAE;CACzC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAAC,KAAY,EAAE,UAAmB,EAAU,EAAE;IACzF,OAAO,WAAW,CAAC,wBAAwB,EAAE;QAC3C,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,gBAAgB;KAChF,CAAC,CAAC;AACL,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,GAA6B,EAAE;IACvE,OAAO;QACL,SAAS,EAAE,SAAS;QACpB,SAAS,EAAE,SAAS;KACrB,CAAC;AACJ,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,UAAmB,EAA4B,EAAE;IAC1F,OAAO;QACL,SAAS,EAAE,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS;QAC1C,SAAS,EAAE,MAAM;KAClB,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport { IButtonStyles, ICommandBarStyles, IContextualMenuStyles, IStyle, Theme, mergeStyles } from '@fluentui/react';\nimport { editorTextBoxButtonStyle } from './SendBox.styles';\nimport { RichTextEditorStyleProps } from '../RichTextEditor/RichTextEditor';\n\n/**\n * @private\n */\nexport const richTextEditorStyle = (props: { minHeight: string; maxHeight: string }): string => {\n return mergeStyles({\n border: 'none',\n overflow: 'auto',\n outline: 'none',\n minHeight: props.minHeight,\n maxHeight: props.maxHeight,\n maxWidth: '100%'\n });\n};\n\n/**\n * @private\n */\nexport const richTextEditorWrapperStyle = (theme: Theme, addTopOffset: boolean, addRightOffset: boolean): string => {\n return mergeStyles({\n padding: `${addTopOffset ? '0.5rem' : '0'} ${addRightOffset ? '0.75rem' : '0'} 0 0.75rem`,\n lineHeight: '1.25rem',\n maxWidth: '100%',\n color: theme.palette.neutralPrimary\n });\n};\n\n/**\n * @private\n */\nexport const richTextActionButtonsStackStyle = mergeStyles({\n paddingRight: `0.125rem`\n});\n\n/**\n * @private\n */\nexport const richTextActionButtonsStyle = mergeStyles({\n height: '2.25rem',\n width: '2.25rem',\n margin: 'auto'\n});\n\n/**\n * @private\n */\nexport const richTextActionButtonsDividerStyle = (theme: Theme): string => {\n return mergeStyles({\n color: theme.palette.neutralQuaternaryAlt,\n margin: '0.375rem -0.5rem 0 -0.5rem',\n backgroundColor: 'transparent'\n });\n};\n\n/**\n * @private\n */\nexport const ribbonOverflowButtonStyle = (theme: Theme): Partial<IContextualMenuStyles> => {\n return {\n subComponentStyles: {\n menuItem: {\n icon: { color: theme.palette.neutralPrimary, paddingTop: '0.5rem' },\n root: ribbonOverflowButtonRootStyles(theme)\n },\n callout: {}\n }\n };\n};\n\nconst ribbonOverflowButtonRootStyles = (theme: Theme): IStyle => {\n return {\n selectors: {\n // Icon's color doesn't work here because of the specificity\n '&:hover': {\n selectors: {\n '.ms-ContextualMenu-icon': {\n color: theme.palette.neutralPrimary\n }\n }\n }\n }\n };\n};\n\nconst ribbonButtonRootStyles = (theme: Theme): IStyle => {\n return {\n backgroundColor: 'transparent',\n selectors: {\n // Icon's color doesn't work here because of the specificity\n '.ms-Button-icon': {\n color: theme.palette.themePrimary\n },\n '.ms-Button-menuIcon': {\n color: theme.palette.themePrimary\n }\n }\n };\n};\n\n/**\n * @private\n */\nexport const ribbonButtonStyle = (theme: Theme): Partial<IButtonStyles> => {\n return {\n icon: { color: theme.palette.neutralPrimary, height: 'auto' },\n menuIcon: { color: theme.palette.neutralPrimary, height: 'auto' },\n root: { minWidth: 'auto', backgroundColor: 'transparent' },\n rootChecked: ribbonButtonRootStyles(theme),\n rootHovered: ribbonButtonRootStyles(theme),\n rootCheckedHovered: ribbonButtonRootStyles(theme),\n rootCheckedPressed: ribbonButtonRootStyles(theme),\n rootPressed: ribbonButtonRootStyles(theme),\n rootExpanded: ribbonButtonRootStyles(theme),\n rootExpandedHovered: ribbonButtonRootStyles(theme)\n };\n};\n\n/**\n * @private\n */\nexport const ribbonDividerStyle = (theme: Theme): Partial<IButtonStyles> => {\n return {\n icon: { color: theme.palette.neutralQuaternaryAlt, margin: '0 -0.5rem', height: 'auto' },\n root: { margin: '0', padding: '0', minWidth: 'auto' }\n };\n};\n\n/**\n * @private\n */\nexport const ribbonStyle: Partial<ICommandBarStyles> = {\n // Override for the default white color of the Ribbon component\n root: { backgroundColor: 'transparent' }\n};\n\n/**\n * @private\n */\nexport const richTextFormatButtonIconStyle = (theme: Theme, isSelected: boolean): string => {\n return mergeStyles(editorTextBoxButtonStyle, {\n color: isSelected ? theme.palette.themePrimary : theme.palette.neutralSecondary\n });\n};\n\n/**\n * @private\n */\nexport const editBoxRichTextEditorStyle = (): RichTextEditorStyleProps => {\n return {\n minHeight: '2.25rem',\n maxHeight: '2.25rem'\n };\n};\n\n/**\n * @private\n */\nexport const sendBoxRichTextEditorStyle = (isExpanded: boolean): RichTextEditorStyleProps => {\n return {\n minHeight: isExpanded ? '5rem' : '1.25rem',\n maxHeight: '5rem'\n };\n};\n"]}
|
package/dist/dist-esm/react-components/src/components/styles/RichTextInputBoxComponent.styles.d.ts
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
import { Theme } from '@fluentui/react';
|
2
|
+
/**
|
3
|
+
* @private
|
4
|
+
*/
|
5
|
+
export declare const inputBoxRichTextStackStyle: string;
|
6
|
+
/**
|
7
|
+
* @private
|
8
|
+
*/
|
9
|
+
export declare const inputBoxContentStackStyle: string;
|
10
|
+
/**
|
11
|
+
* @private
|
12
|
+
*/
|
13
|
+
export declare const richTextBorderBoxStyle: (props: {
|
14
|
+
theme: Theme;
|
15
|
+
disabled: boolean;
|
16
|
+
}) => string;
|
17
|
+
//# sourceMappingURL=RichTextInputBoxComponent.styles.d.ts.map
|
package/dist/dist-esm/react-components/src/components/styles/RichTextInputBoxComponent.styles.js
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
// Copyright (c) Microsoft Corporation.
|
2
|
+
// Licensed under the MIT License.
|
3
|
+
import { mergeStyles } from '@fluentui/react';
|
4
|
+
import { borderEditBoxStyle, defaultSendBoxActiveBorderThicknessREM, defaultSendBoxInactiveBorderThicknessREM } from './SendBox.styles';
|
5
|
+
/**
|
6
|
+
* @private
|
7
|
+
*/
|
8
|
+
export const inputBoxRichTextStackStyle = mergeStyles({ overflow: 'hidden', paddingBottom: '0.375rem' });
|
9
|
+
/**
|
10
|
+
* @private
|
11
|
+
*/
|
12
|
+
export const inputBoxContentStackStyle = mergeStyles({ overflow: 'hidden' });
|
13
|
+
/**
|
14
|
+
* @private
|
15
|
+
*/
|
16
|
+
export const richTextBorderBoxStyle = (props) => {
|
17
|
+
const disabledStyles = {
|
18
|
+
pointerEvents: 'none',
|
19
|
+
backgroundColor: props.theme.palette.neutralLighter,
|
20
|
+
borderRadius: props.theme.effects.roundedCorner4,
|
21
|
+
border: `${defaultSendBoxInactiveBorderThicknessREM}rem solid transparent`,
|
22
|
+
margin: `${defaultSendBoxActiveBorderThicknessREM - defaultSendBoxInactiveBorderThicknessREM}rem`
|
23
|
+
};
|
24
|
+
return mergeStyles(props.disabled
|
25
|
+
? disabledStyles
|
26
|
+
: borderEditBoxStyle(Object.assign(Object.assign({}, props), {
|
27
|
+
// should always be false as we don't want to show the border when there is an error
|
28
|
+
hasErrorMessage: false, defaultBorderColor: props.theme.palette.neutralQuaternaryAlt })));
|
29
|
+
};
|
30
|
+
//# sourceMappingURL=RichTextInputBoxComponent.styles.js.map
|
package/dist/dist-esm/react-components/src/components/styles/RichTextInputBoxComponent.styles.js.map
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"RichTextInputBoxComponent.styles.js","sourceRoot":"","sources":["../../../../../../../react-components/src/components/styles/RichTextInputBoxComponent.styles.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAiB,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC7D,OAAO,EACL,kBAAkB,EAClB,sCAAsC,EACtC,wCAAwC,EACzC,MAAM,kBAAkB,CAAC;AAE1B;;GAEG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,WAAW,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,aAAa,EAAE,UAAU,EAAE,CAAC,CAAC;AAEzG;;GAEG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,WAAW,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC,CAAC;AAE7E;;GAEG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,KAA0C,EAAU,EAAE;IAC3F,MAAM,cAAc,GAAW;QAC7B,aAAa,EAAE,MAAM;QACrB,eAAe,EAAE,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,cAAc;QACnD,YAAY,EAAE,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,cAAc;QAChD,MAAM,EAAE,GAAG,wCAAwC,uBAAuB;QAC1E,MAAM,EAAE,GAAG,sCAAsC,GAAG,wCAAwC,KAAK;KAClG,CAAC;IACF,OAAO,WAAW,CAChB,KAAK,CAAC,QAAQ;QACZ,CAAC,CAAC,cAAc;QAChB,CAAC,CAAC,kBAAkB,iCACb,KAAK;YACR,oFAAoF;YACpF,eAAe,EAAE,KAAK,EACtB,kBAAkB,EAAE,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,oBAAoB,IAC5D,CACP,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport { IStyle, Theme, mergeStyles } from '@fluentui/react';\nimport {\n borderEditBoxStyle,\n defaultSendBoxActiveBorderThicknessREM,\n defaultSendBoxInactiveBorderThicknessREM\n} from './SendBox.styles';\n\n/**\n * @private\n */\nexport const inputBoxRichTextStackStyle = mergeStyles({ overflow: 'hidden', paddingBottom: '0.375rem' });\n\n/**\n * @private\n */\nexport const inputBoxContentStackStyle = mergeStyles({ overflow: 'hidden' });\n\n/**\n * @private\n */\nexport const richTextBorderBoxStyle = (props: { theme: Theme; disabled: boolean }): string => {\n const disabledStyles: IStyle = {\n pointerEvents: 'none',\n backgroundColor: props.theme.palette.neutralLighter,\n borderRadius: props.theme.effects.roundedCorner4,\n border: `${defaultSendBoxInactiveBorderThicknessREM}rem solid transparent`,\n margin: `${defaultSendBoxActiveBorderThicknessREM - defaultSendBoxInactiveBorderThicknessREM}rem`\n };\n return mergeStyles(\n props.disabled\n ? disabledStyles\n : borderEditBoxStyle({\n ...props,\n // should always be false as we don't want to show the border when there is an error\n hasErrorMessage: false,\n defaultBorderColor: props.theme.palette.neutralQuaternaryAlt\n })\n );\n};\n"]}
|
@@ -29,9 +29,15 @@ export declare const sendIconStyle: (props: {
|
|
29
29
|
theme: Theme;
|
30
30
|
hasText: boolean;
|
31
31
|
hasFile: boolean;
|
32
|
+
disabled?: boolean;
|
32
33
|
hasErrorMessage: boolean;
|
33
34
|
customSendIconStyle?: IStyle;
|
35
|
+
defaultTextColor?: string;
|
34
36
|
}) => string;
|
37
|
+
/**
|
38
|
+
* @private
|
39
|
+
*/
|
40
|
+
export declare const editorTextBoxButtonStyle: IStyle;
|
35
41
|
/**
|
36
42
|
* @private
|
37
43
|
*/
|
@@ -56,4 +62,13 @@ export declare const borderAndBoxShadowStyle: (props: {
|
|
56
62
|
hasErrorMessage: boolean;
|
57
63
|
disabled: boolean;
|
58
64
|
}) => string;
|
65
|
+
/**
|
66
|
+
* @private
|
67
|
+
*/
|
68
|
+
export declare const borderEditBoxStyle: (props: {
|
69
|
+
theme: Theme;
|
70
|
+
defaultBorderColor?: string;
|
71
|
+
hasErrorMessage: boolean;
|
72
|
+
disabled: boolean;
|
73
|
+
}) => IStyle;
|
59
74
|
//# sourceMappingURL=SendBox.styles.d.ts.map
|
@@ -32,16 +32,21 @@ export const sendButtonStyle = mergeStyles({
|
|
32
32
|
* @private
|
33
33
|
*/
|
34
34
|
export const sendIconStyle = (props) => {
|
35
|
-
const { theme, hasText,
|
36
|
-
/* @conditional-compile-remove(file-sharing) */ hasFile, hasErrorMessage, customSendIconStyle } = props;
|
35
|
+
const { theme, hasText, disabled = false,
|
36
|
+
/* @conditional-compile-remove(file-sharing) */ hasFile, hasErrorMessage, customSendIconStyle, defaultTextColor = theme.palette.neutralTertiary } = props;
|
37
37
|
const hasNoContent = !hasText && /* @conditional-compile-remove(file-sharing) */ !hasFile;
|
38
|
-
return mergeStyles({
|
39
|
-
|
40
|
-
height: '1.25rem',
|
41
|
-
margin: 'auto',
|
42
|
-
color: hasErrorMessage || hasNoContent ? theme.palette.neutralTertiary : theme.palette.themePrimary
|
38
|
+
return mergeStyles(editorTextBoxButtonStyle, {
|
39
|
+
color: disabled || hasErrorMessage || hasNoContent ? defaultTextColor : theme.palette.themePrimary
|
43
40
|
}, customSendIconStyle);
|
44
41
|
};
|
42
|
+
/**
|
43
|
+
* @private
|
44
|
+
*/
|
45
|
+
export const editorTextBoxButtonStyle = {
|
46
|
+
width: '1.25rem',
|
47
|
+
height: '1.25rem',
|
48
|
+
margin: 'auto'
|
49
|
+
};
|
45
50
|
/**
|
46
51
|
* @private
|
47
52
|
*/
|
@@ -69,12 +74,18 @@ export const defaultSendBoxActiveBorderThicknessREM = 0.125;
|
|
69
74
|
* @private
|
70
75
|
*/
|
71
76
|
export const borderAndBoxShadowStyle = (props) => {
|
72
|
-
|
73
|
-
|
77
|
+
return mergeStyles(borderEditBoxStyle(Object.assign(Object.assign({}, props), { defaultBorderColor: props.theme.palette.neutralSecondary })));
|
78
|
+
};
|
79
|
+
/**
|
80
|
+
* @private
|
81
|
+
*/
|
82
|
+
export const borderEditBoxStyle = (props) => {
|
83
|
+
const { theme, hasErrorMessage, disabled, defaultBorderColor } = props;
|
84
|
+
const borderColor = hasErrorMessage ? theme.semanticColors.errorText : defaultBorderColor;
|
74
85
|
const borderColorActive = hasErrorMessage ? theme.semanticColors.errorText : theme.palette.themePrimary;
|
75
86
|
const borderThickness = disabled ? 0 : defaultSendBoxInactiveBorderThicknessREM;
|
76
87
|
const borderActiveThickness = disabled ? 0 : defaultSendBoxActiveBorderThicknessREM;
|
77
|
-
return
|
88
|
+
return {
|
78
89
|
borderRadius: theme.effects.roundedCorner4,
|
79
90
|
border: `${borderThickness}rem solid ${borderColor}`,
|
80
91
|
// The border thickness of the sendbox wrapper changes on hover, to prevent the border thickness change causing the
|
@@ -84,6 +95,6 @@ export const borderAndBoxShadowStyle = (props) => {
|
|
84
95
|
border: `${borderActiveThickness}rem solid ${borderColorActive}`,
|
85
96
|
margin: `${defaultSendBoxActiveBorderThicknessREM - borderActiveThickness}rem`
|
86
97
|
}
|
87
|
-
}
|
98
|
+
};
|
88
99
|
};
|
89
100
|
//# sourceMappingURL=SendBox.styles.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"SendBox.styles.js","sourceRoot":"","sources":["../../../../../../../react-components/src/components/styles/SendBox.styles.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAU,WAAW,EAAS,MAAM,iBAAiB,CAAC;AAE7D;;GAEG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,aAAa,EAAE,EAAE,SAAS,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE;IACtF,IAAI,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;CAC1B,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,WAAW,CAAC;IAC9C,MAAM,EAAE,SAAS;IACjB,QAAQ,EAAE,QAAQ;IAClB;;OAEG;IACH,oBAAoB,EAAE;QACpB,SAAS,EAAE,SAAS;KACrB;CACF,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,WAAW,CAAC;IACzC,MAAM,EAAE,SAAS;IACjB,KAAK,EAAE,SAAS;CACjB,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,
|
1
|
+
{"version":3,"file":"SendBox.styles.js","sourceRoot":"","sources":["../../../../../../../react-components/src/components/styles/SendBox.styles.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAU,WAAW,EAAS,MAAM,iBAAiB,CAAC;AAE7D;;GAEG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,aAAa,EAAE,EAAE,SAAS,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE;IACtF,IAAI,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;CAC1B,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,WAAW,CAAC;IAC9C,MAAM,EAAE,SAAS;IACjB,QAAQ,EAAE,QAAQ;IAClB;;OAEG;IACH,oBAAoB,EAAE;QACpB,SAAS,EAAE,SAAS;KACrB;CACF,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,WAAW,CAAC;IACzC,MAAM,EAAE,SAAS;IACjB,KAAK,EAAE,SAAS;CACjB,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,KAQ7B,EAAU,EAAE;IACX,MAAM,EACJ,KAAK,EACL,OAAO,EACP,QAAQ,GAAG,KAAK;IAChB,+CAA+C,CAAC,OAAO,EACvD,eAAe,EACf,mBAAmB,EACnB,gBAAgB,GAAG,KAAK,CAAC,OAAO,CAAC,eAAe,EACjD,GAAG,KAAK,CAAC;IACV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GAAG,eAAe,CAAC,CAAC,CAAC,KAAK,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC,CAAC,kBAAkB,CAAC;IAC1F,MAAM,iBAAiB,GAAG,eAAe,CAAC,CAAC,CAAC,KAAK,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,YAAY,CAAC;IAExG,MAAM,eAAe,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,wCAAwC,CAAC;IAChF,MAAM,qBAAqB,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,sCAAsC,CAAC;IAEpF,OAAO;QACL,YAAY,EAAE,KAAK,CAAC,OAAO,CAAC,cAAc;QAC1C,MAAM,EAAE,GAAG,eAAe,aAAa,WAAW,EAAE;QAEpD,mHAAmH;QACnH,uHAAuH;QACvH,MAAM,EAAE,GAAG,sCAAsC,GAAG,eAAe,KAAK;QAExE,wCAAwC,EAAE;YACxC,MAAM,EAAE,GAAG,qBAAqB,aAAa,iBAAiB,EAAE;YAChE,MAAM,EAAE,GAAG,sCAAsC,GAAG,qBAAqB,KAAK;SAC/E;KACF,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { IStyle, mergeStyles, Theme } from '@fluentui/react';\n\n/**\n * @private\n */\nexport const suppressIconStyle = {\n iconContainer: { minHeight: '0', minWidth: '0', height: '0', width: '0', margin: '0' },\n icon: { display: 'none' }\n};\n\n/**\n * @private\n */\nexport const sendBoxWrapperStyles = mergeStyles({\n margin: '0.25rem',\n overflow: 'hidden',\n /**\n * margin-top set for all the child components of sendbox except first\n */\n ':not(:first-child)': {\n marginTop: '0.25rem'\n }\n});\n\n/**\n * @private\n */\nexport const sendButtonStyle = mergeStyles({\n height: '2.25rem',\n width: '2.25rem'\n});\n\n/**\n * @private\n */\nexport const sendIconStyle = (props: {\n theme: Theme;\n hasText: boolean;\n /* @conditional-compile-remove(file-sharing) */ hasFile: boolean;\n disabled?: boolean;\n hasErrorMessage: boolean;\n customSendIconStyle?: IStyle;\n defaultTextColor?: string;\n}): string => {\n const {\n theme,\n hasText,\n disabled = false,\n /* @conditional-compile-remove(file-sharing) */ hasFile,\n hasErrorMessage,\n customSendIconStyle,\n defaultTextColor = theme.palette.neutralTertiary\n } = props;\n const hasNoContent = !hasText && /* @conditional-compile-remove(file-sharing) */ !hasFile;\n return mergeStyles(\n editorTextBoxButtonStyle,\n {\n color: disabled || hasErrorMessage || hasNoContent ? defaultTextColor : theme.palette.themePrimary\n },\n customSendIconStyle\n );\n};\n\n/**\n * @private\n */\nexport const editorTextBoxButtonStyle: IStyle = {\n width: '1.25rem',\n height: '1.25rem',\n margin: 'auto'\n};\n\n/**\n * @private\n */\nexport const fileUploadCardsStyles = mergeStyles({\n margin: '0 0.25rem 0.25rem 0.25rem',\n maxHeight: '12.5rem',\n overflow: 'auto'\n});\n\n/**\n * @private\n */\nexport const fileCardBoxStyle = mergeStyles({\n width: '100%',\n padding: '0.50rem'\n});\n\n/**\n * @private\n */\nexport const defaultSendBoxInactiveBorderThicknessREM = 0.0625;\n/**\n * @private\n */\nexport const defaultSendBoxActiveBorderThicknessREM = 0.125;\n\n/**\n * @private\n */\nexport const borderAndBoxShadowStyle = (props: {\n theme: Theme;\n hasErrorMessage: boolean;\n disabled: boolean;\n}): string => {\n return mergeStyles(borderEditBoxStyle({ ...props, defaultBorderColor: props.theme.palette.neutralSecondary }));\n};\n\n/**\n * @private\n */\nexport const borderEditBoxStyle = (props: {\n theme: Theme;\n defaultBorderColor?: string;\n hasErrorMessage: boolean;\n disabled: boolean;\n}): IStyle => {\n const { theme, hasErrorMessage, disabled, defaultBorderColor } = props;\n const borderColor = hasErrorMessage ? theme.semanticColors.errorText : defaultBorderColor;\n const borderColorActive = hasErrorMessage ? theme.semanticColors.errorText : theme.palette.themePrimary;\n\n const borderThickness = disabled ? 0 : defaultSendBoxInactiveBorderThicknessREM;\n const borderActiveThickness = disabled ? 0 : defaultSendBoxActiveBorderThicknessREM;\n\n return {\n borderRadius: theme.effects.roundedCorner4,\n border: `${borderThickness}rem solid ${borderColor}`,\n\n // The border thickness of the sendbox wrapper changes on hover, to prevent the border thickness change causing the\n // input box to shift we apply a margin to compensate. This margin is then removed on hover when the border is thicker.\n margin: `${defaultSendBoxActiveBorderThicknessREM - borderThickness}rem`,\n\n ':hover, :active, :focus, :focus-within': {\n border: `${borderActiveThickness}rem solid ${borderColorActive}`,\n margin: `${defaultSendBoxActiveBorderThicknessREM - borderActiveThickness}rem`\n }\n };\n};\n"]}
|
package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentAsEditBoxUtils.d.ts
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
import { AttachmentMetadata } from '../FileDownloadCards';
|
3
|
+
import { ChatMessage } from '../../types';
|
4
|
+
/**
|
5
|
+
* @private
|
6
|
+
*/
|
7
|
+
export declare const onRenderCancelIcon: (className: string) => JSX.Element;
|
8
|
+
/**
|
9
|
+
* @private
|
10
|
+
*/
|
11
|
+
export declare const onRenderSubmitIcon: (className: string) => JSX.Element;
|
12
|
+
type MessageState = 'OK' | 'too short' | 'too long';
|
13
|
+
/**
|
14
|
+
* @private
|
15
|
+
*/
|
16
|
+
export declare function getMessageState(messageText: string, attachmentMetadata: AttachmentMetadata[]): MessageState;
|
17
|
+
/**
|
18
|
+
* @private
|
19
|
+
* @TODO: Remove when file-sharing feature becomes stable.
|
20
|
+
*/
|
21
|
+
export declare function getMessageAttachedFilesMetadata(message: ChatMessage): AttachmentMetadata[] | undefined;
|
22
|
+
export {};
|
23
|
+
//# sourceMappingURL=ChatMessageComponentAsEditBoxUtils.d.ts.map
|
package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentAsEditBoxUtils.js
ADDED
@@ -0,0 +1,44 @@
|
|
1
|
+
// Copyright (c) Microsoft Corporation.
|
2
|
+
// Licensed under the MIT License.
|
3
|
+
import React from 'react';
|
4
|
+
import { Icon } from '@fluentui/react';
|
5
|
+
import { isMessageTooLong } from './SendBoxUtils';
|
6
|
+
/**
|
7
|
+
* @private
|
8
|
+
*/
|
9
|
+
export const onRenderCancelIcon = (className) => {
|
10
|
+
return React.createElement(Icon, { iconName: 'EditBoxCancel', className: className });
|
11
|
+
};
|
12
|
+
/**
|
13
|
+
* @private
|
14
|
+
*/
|
15
|
+
export const onRenderSubmitIcon = (className) => {
|
16
|
+
return React.createElement(Icon, { iconName: 'EditBoxSubmit', className: className });
|
17
|
+
};
|
18
|
+
function isMessageEmpty(messageText,
|
19
|
+
/* @conditional-compile-remove(file-sharing) */
|
20
|
+
attachmentMetadata) {
|
21
|
+
/* @conditional-compile-remove(file-sharing) */
|
22
|
+
return messageText.trim().length === 0 && (attachmentMetadata === null || attachmentMetadata === void 0 ? void 0 : attachmentMetadata.length) === 0;
|
23
|
+
return messageText.trim().length === 0;
|
24
|
+
}
|
25
|
+
/**
|
26
|
+
* @private
|
27
|
+
*/
|
28
|
+
export function getMessageState(messageText,
|
29
|
+
/* @conditional-compile-remove(file-sharing) */ attachmentMetadata) {
|
30
|
+
return isMessageEmpty(messageText, /* @conditional-compile-remove(file-sharing) */ attachmentMetadata)
|
31
|
+
? 'too short'
|
32
|
+
: isMessageTooLong(messageText.length)
|
33
|
+
? 'too long'
|
34
|
+
: 'OK';
|
35
|
+
}
|
36
|
+
/* @conditional-compile-remove(file-sharing) */
|
37
|
+
/**
|
38
|
+
* @private
|
39
|
+
* @TODO: Remove when file-sharing feature becomes stable.
|
40
|
+
*/
|
41
|
+
export function getMessageAttachedFilesMetadata(message) {
|
42
|
+
return message.files;
|
43
|
+
}
|
44
|
+
//# sourceMappingURL=ChatMessageComponentAsEditBoxUtils.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"ChatMessageComponentAsEditBoxUtils.js","sourceRoot":"","sources":["../../../../../../../react-components/src/components/utils/ChatMessageComponentAsEdit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O,CAAC,KAAK,CAAC;AACvB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React from 'react';\nimport { Icon } from '@fluentui/react';\n/* @conditional-compile-remove(file-sharing) */\nimport { AttachmentMetadata } from '../FileDownloadCards';\nimport { isMessageTooLong } from './SendBoxUtils';\n/* @conditional-compile-remove(file-sharing) */\nimport { ChatMessage } from '../../types';\n\n/**\n * @private\n */\nexport const onRenderCancelIcon = (className: string): JSX.Element => {\n return <Icon iconName={'EditBoxCancel'} className={className} />;\n};\n\n/**\n * @private\n */\nexport const onRenderSubmitIcon = (className: string): JSX.Element => {\n return <Icon iconName={'EditBoxSubmit'} className={className} />;\n};\n\ntype MessageState = 'OK' | 'too short' | 'too long';\n\nfunction isMessageEmpty(\n messageText: string,\n /* @conditional-compile-remove(file-sharing) */\n attachmentMetadata?: AttachmentMetadata[]\n): boolean {\n /* @conditional-compile-remove(file-sharing) */\n return messageText.trim().length === 0 && attachmentMetadata?.length === 0;\n return messageText.trim().length === 0;\n}\n\n/**\n * @private\n */\nexport function getMessageState(\n messageText: string,\n /* @conditional-compile-remove(file-sharing) */ attachmentMetadata: AttachmentMetadata[]\n): MessageState {\n return isMessageEmpty(messageText, /* @conditional-compile-remove(file-sharing) */ attachmentMetadata)\n ? 'too short'\n : isMessageTooLong(messageText.length)\n ? 'too long'\n : 'OK';\n}\n\n/* @conditional-compile-remove(file-sharing) */\n/**\n * @private\n * @TODO: Remove when file-sharing feature becomes stable.\n */\nexport function getMessageAttachedFilesMetadata(message: ChatMessage): AttachmentMetadata[] | undefined {\n return message.files;\n}\n"]}
|
@@ -14,7 +14,7 @@ export declare const hasCompletedFileUploads: (activeFileUploads: ActiveFileUplo
|
|
14
14
|
/**
|
15
15
|
* @private
|
16
16
|
*/
|
17
|
-
export declare const
|
17
|
+
export declare const isMessageTooLong: (valueLength: number) => boolean;
|
18
18
|
/**
|
19
19
|
* @private
|
20
20
|
*/
|
@@ -23,7 +23,7 @@ export const hasCompletedFileUploads = (activeFileUploads) => {
|
|
23
23
|
/**
|
24
24
|
* @private
|
25
25
|
*/
|
26
|
-
export const
|
26
|
+
export const isMessageTooLong = (valueLength) => {
|
27
27
|
return valueLength > MAXIMUM_LENGTH_OF_MESSAGE;
|
28
28
|
};
|
29
29
|
/**
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"SendBoxUtils.js","sourceRoot":"","sources":["../../../../../../../react-components/src/components/utils/SendBoxUtils.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAKlC;;GAEG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,IAAI,CAAC;AAC9C,MAAM,mBAAmB,GAAG,OAAO,CAAC;AAEpC,+CAA+C;AAC/C;;GAEG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,iBAAiD,EAAW,EAAE;IACrG,OAAO,CAAC,CAAC,CACP,CAAA,iBAAiB,aAAjB,iBAAiB,uBAAjB,iBAAiB,CAAE,MAAM;QACzB,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,CAAC,cAAc,CAAC,CAC9G,CAAC;AACJ,CAAC,CAAC;AAEF,+CAA+C;AAC/C;;GAEG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,iBAAiD,EAAW,EAAE;IACpG,OAAO,CAAC,CAAC,CAAA,iBAAiB,aAAjB,iBAAiB,uBAAjB,iBAAiB,CAAE,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA,CAAC;AAC1D,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,
|
1
|
+
{"version":3,"file":"SendBoxUtils.js","sourceRoot":"","sources":["../../../../../../../react-components/src/components/utils/SendBoxUtils.ts"],"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ile-remove(file-sharing) */\nimport { ActiveFileUpload } from '../FileUploadCards';\n\n/**\n * @private\n */\nexport const MAXIMUM_LENGTH_OF_MESSAGE = 8000;\nconst EMPTY_MESSAGE_REGEX = /^\\s*$/;\n\n/* @conditional-compile-remove(file-sharing) */\n/**\n * @private\n */\nexport const hasIncompleteFileUploads = (activeFileUploads: ActiveFileUpload[] | undefined): boolean => {\n return !!(\n activeFileUploads?.length &&\n !activeFileUploads.filter((fileUpload) => !fileUpload.error).every((fileUpload) => fileUpload.uploadComplete)\n );\n};\n\n/* @conditional-compile-remove(file-sharing) */\n/**\n * @private\n */\nexport const hasCompletedFileUploads = (activeFileUploads: ActiveFileUpload[] | undefined): boolean => {\n return !!activeFileUploads?.find((file) => !file.error);\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"]}
|
@@ -15,7 +15,7 @@ import { ParticipantListStrings } from '../components/ParticipantList';
|
|
15
15
|
import { MentionPopoverStrings } from '../components/MentionPopover';
|
16
16
|
import { ImageOverlayStrings } from '../components/ImageOverlay';
|
17
17
|
import { ReactionButtonStrings } from '../components';
|
18
|
-
import { RichTextSendBoxStrings } from '../components/
|
18
|
+
import { RichTextSendBoxStrings } from '../components/RichTextEditor/RichTextSendBox';
|
19
19
|
/**
|
20
20
|
* Locale information for all components exported from this library.
|
21
21
|
*
|
@@ -63,7 +63,7 @@ export interface ComponentStrings {
|
|
63
63
|
typingIndicator: TypingIndicatorStrings;
|
64
64
|
/** Strings for SendBox */
|
65
65
|
sendBox: SendBoxStrings;
|
66
|
-
/** Strings for
|
66
|
+
/** Strings for RichTextSendBox */
|
67
67
|
richTextSendBox: RichTextSendBoxStrings;
|
68
68
|
/** Strings for MentionPopover */
|
69
69
|
mentionPopover: MentionPopoverStrings;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"LocalizationProvider.js","sourceRoot":"","sources":["../../../../../../react-components/src/localization/LocalizationProvider.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,EAAE,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAiCzD,OAAO,EAAE,sBAAsB,EAAE,MAAM,WAAW,CAAC;AA4JnD;;;;GAIG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,aAAa,CAAkB,sBAAsB,CAAC,CAAC;AAcpF;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,KAAgC,EAAe,EAAE;IACpF,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;IACnC,OAAO,oBAAC,aAAa,CAAC,QAAQ,IAAC,KAAK,EAAE,MAAM,IAAG,QAAQ,CAA0B,CAAC;AACpF,CAAC,CAAC;AAEF,kCAAkC;AAClC,MAAM,CAAC,MAAM,SAAS,GAAG,GAAoB,EAAE,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React, { createContext, useContext } from 'react';\nimport {\n CameraButtonStrings,\n EndCallButtonStrings,\n ErrorBarStrings,\n MessageStatusIndicatorStrings,\n MessageThreadStrings,\n MicrophoneButtonStrings,\n DevicesButtonStrings,\n ParticipantsButtonStrings,\n ParticipantItemStrings,\n ScreenShareButtonStrings,\n SendBoxStrings,\n TypingIndicatorStrings,\n VideoGalleryStrings\n} from '../components';\n/* @conditional-compile-remove(raise-hand) */\nimport { RaiseHandButtonStrings } from '../components';\n/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\nimport { HoldButtonStrings } from '../components';\n/* @conditional-compile-remove(dialpad) */ /* @conditional-compile-remove(PSTN-calls) */\nimport { DialpadStrings } from '../components';\n/* @conditional-compile-remove(call-readiness) */\nimport { SitePermissionsStrings } from '../components/DevicePermissions/SitePermissionsScaffolding';\n/* @conditional-compile-remove(call-readiness) */\nimport { BrowserPermissionDeniedStrings } from '../components/DevicePermissions/BrowserPermissionDenied';\n/* @conditional-compile-remove(call-readiness) */\nimport { BrowserPermissionDeniedIOSStrings } from '../components/DevicePermissions/BrowserPermissionDeniedIOS';\n/* @conditional-compile-remove(call-readiness) */ /* @conditional-compile-remove(unsupported-browser) */\nimport { UnsupportedBrowserStrings } from '../components/UnsupportedBrowser';\n/* @conditional-compile-remove(one-to-n-calling) */\n// @conditional-compile-remove(PSTN-calls)\nimport { VideoTileStrings } from '../components/VideoTile';\nimport { COMPONENT_LOCALE_EN_US } from './locales';\n/* @conditional-compile-remove(unsupported-browser) */\nimport { UnsupportedBrowserVersionStrings } from '../components/UnsupportedBrowserVersion';\n/* @conditional-compile-remove(unsupported-browser) */\nimport { UnsupportedOperatingSystemStrings } from '../components/UnsupportedOperatingSystem';\n/* @conditional-compile-remove(vertical-gallery) */\nimport { VerticalGalleryStrings } from '../components/VerticalGallery';\n/* @conditional-compile-remove(total-participant-count) */\nimport { ParticipantListStrings } from '../components/ParticipantList';\n/* @conditional-compile-remove(mention) */\nimport { MentionPopoverStrings } from '../components/MentionPopover';\n/* @conditional-compile-remove(image-overlay) */\nimport { ImageOverlayStrings } from '../components/ImageOverlay';\n/* @conditional-compile-remove(reaction) */\nimport { ReactionButtonStrings } from '../components';\n/* @conditional-compile-remove(rich-text-editor) */\nimport { RichTextSendBoxStrings } from '../components/RTE/RTESendBox';\n\n/**\n * Locale information for all components exported from this library.\n *\n * @public\n */\nexport interface ComponentLocale {\n /** Strings for components */\n strings: ComponentStrings;\n /* @conditional-compile-remove(date-time-customization) */\n /**\n * Optional function to provide customized date format.\n * @beta\n */\n onDisplayDateTimeString?: (messageDate: Date) => string;\n}\n\n/**\n * Strings used by all components exported from this library.\n *\n * @public\n */\nexport interface ComponentStrings {\n /** Strings for MessageThread */\n messageThread: MessageThreadStrings;\n /** Strings for ParticipantItem */\n participantItem: ParticipantItemStrings;\n /** Strings for CameraButton */\n cameraButton: CameraButtonStrings;\n /** Strings for MicrophoneButton */\n microphoneButton: MicrophoneButtonStrings;\n /** Strings for EndCallButton */\n endCallButton: EndCallButtonStrings;\n /** Strings for DevicesButton */\n devicesButton: DevicesButtonStrings;\n /** Strings for ParticipantsButton */\n participantsButton: ParticipantsButtonStrings;\n /** Strings for ScreenShareButton */\n screenShareButton: ScreenShareButtonStrings;\n /* @conditional-compile-remove(raise-hand) */\n /** Strings for RaiseHandButton */\n raiseHandButton: RaiseHandButtonStrings;\n /* @conditional-compile-remove(reaction) */\n /**\n * Strings for ReactionButton\n * @beta\n * */\n reactionButton: ReactionButtonStrings;\n /** Strings for TypingIndicator */\n typingIndicator: TypingIndicatorStrings;\n /** Strings for SendBox */\n sendBox: SendBoxStrings;\n /* @conditional-compile-remove(rich-text-editor) */\n /** Strings for RTESendBox */\n richTextSendBox: RichTextSendBoxStrings;\n /* @conditional-compile-remove(mention) */\n /** Strings for MentionPopover */\n mentionPopover: MentionPopoverStrings;\n /* @conditional-compile-remove(image-overlay) */\n /** Strings for ImageOverlay */\n imageOverlay: ImageOverlayStrings;\n /** Strings for MessageStatusIndicator */\n messageStatusIndicator: MessageStatusIndicatorStrings;\n /** Strings for ErroBar */\n errorBar: ErrorBarStrings;\n /** Strings for VideoGallery */\n videoGallery: VideoGalleryStrings;\n /* @conditional-compile-remove(dialpad) */ /* @conditional-compile-remove(PSTN-calls) */\n /** Strings for Dialpad */\n dialpad: DialpadStrings;\n /* @conditional-compile-remove(one-to-n-calling) */\n // @conditional-compile-remove(PSTN-calls)\n /** Strings for VideoTile */\n videoTile: VideoTileStrings;\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n /** Strings for HoldButton */\n holdButton: HoldButtonStrings;\n /* @conditional-compile-remove(call-readiness) */\n /** Strings for a site's permission request prompt */\n CameraAndMicrophoneSitePermissionsRequest: SitePermissionsStrings;\n /* @conditional-compile-remove(call-readiness) */\n /** Strings for a site's permission request prompt */\n CameraSitePermissionsRequest: SitePermissionsStrings;\n /* @conditional-compile-remove(call-readiness) */\n /** Strings for a site's permission request prompt */\n MicrophoneSitePermissionsRequest: SitePermissionsStrings;\n /* @conditional-compile-remove(call-readiness) */\n /** Strings for a site's permission generic checking prompt */\n CameraAndMicrophoneSitePermissionsCheck: SitePermissionsStrings;\n /* @conditional-compile-remove(call-readiness) */\n /** Strings for a site's permission generic checking prompt */\n CameraSitePermissionsCheck: SitePermissionsStrings;\n /* @conditional-compile-remove(call-readiness) */\n /** Strings for a site's permission generic checking prompt */\n MicrophoneSitePermissionsCheck: SitePermissionsStrings;\n /* @conditional-compile-remove(call-readiness) */\n /** Strings for a site's permission denied prompt */\n CameraAndMicrophoneSitePermissionsDenied: SitePermissionsStrings;\n /* @conditional-compile-remove(call-readiness) */\n /** Strings for a site's permission denied prompt for safari browsers*/\n CameraAndMicrophoneSitePermissionsDeniedSafari: SitePermissionsStrings;\n /* @conditional-compile-remove(call-readiness) */\n /** Strings for a site's permission denied prompt */\n CameraSitePermissionsDenied: SitePermissionsStrings;\n /* @conditional-compile-remove(call-readiness) */\n /** Strings for a site's permission denied prompt */\n MicrophoneSitePermissionsDenied: SitePermissionsStrings;\n /* @conditional-compile-remove(call-readiness) */\n /** Strings for a site's permission denied prompt for safari browsers*/\n CameraSitePermissionsDeniedSafari: SitePermissionsStrings;\n /* @conditional-compile-remove(call-readiness) */\n /** Strings for a site's permission denied prompt for safari browsers*/\n MicrophoneSitePermissionsDeniedSafari: SitePermissionsStrings;\n /* @conditional-compile-remove(unsupported-browser) */\n /** Strings for unsupported browser UI */\n UnsupportedBrowser: UnsupportedBrowserStrings;\n /* @conditional-compile-remove(unsupported-browser) */\n /** Strings for unsupported browser version UI */\n UnsupportedBrowserVersion: UnsupportedBrowserVersionStrings;\n /* @conditional-compile-remove(unsupported-browser) */\n /** Strings for unsupported browser version UI */\n UnsupportedOperatingSystem: UnsupportedOperatingSystemStrings;\n /* @conditional-compile-remove(call-readiness) */\n /** Strings for BrowserPemissionDenied */\n BrowserPermissionDenied: BrowserPermissionDeniedStrings;\n /* @conditional-compile-remove(call-readiness) */\n /** Strings for BrowserPemissionDeniedIOS */\n BrowserPermissionDeniedIOS: BrowserPermissionDeniedIOSStrings;\n /* @conditional-compile-remove(vertical-gallery) */\n /**\n * Strings for the VerticalGallery.\n */\n verticalGallery: VerticalGalleryStrings;\n /* @conditional-compile-remove(total-participant-count) */\n /** Strings for the participant list component */\n ParticipantList: ParticipantListStrings;\n /* @conditional-compile-remove(hide-attendee-name) */\n}\n\n/**\n * Context for providing localized strings to components exported from this library.\n *\n * @public\n */\nexport const LocaleContext = createContext<ComponentLocale>(COMPONENT_LOCALE_EN_US);\n\n/**\n * Props for {@link LocalizationProvider}.\n *\n * @public\n */\nexport type LocalizationProviderProps = {\n /** Locale context to provide components */\n locale: ComponentLocale;\n /** Children to provide locale context. */\n children: React.ReactNode;\n};\n\n/**\n * Provider to provide localized strings for this library's react components.\n *\n * @remarks Components will be provided localized strings in English (US) by default if this\n * provider is not used.\n *\n * @public\n */\nexport const LocalizationProvider = (props: LocalizationProviderProps): JSX.Element => {\n const { locale, children } = props;\n return <LocaleContext.Provider value={locale}>{children}</LocaleContext.Provider>;\n};\n\n/** React hook to access locale */\nexport const useLocale = (): ComponentLocale => useContext(LocaleContext);\n"]}
|
1
|
+
{"version":3,"file":"LocalizationProvider.js","sourceRoot":"","sources":["../../../../../../react-components/src/localization/LocalizationProvider.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,EAAE,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAiCzD,OAAO,EAAE,sBAAsB,EAAE,MAAM,WAAW,CAAC;AA4JnD;;;;GAIG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,aAAa,CAAkB,sBAAsB,CAAC,CAAC;AAcpF;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,KAAgC,EAAe,EAAE;IACpF,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;IACnC,OAAO,oBAAC,aAAa,CAAC,QAAQ,IAAC,KAAK,EAAE,MAAM,IAAG,QAAQ,CAA0B,CAAC;AACpF,CAAC,CAAC;AAEF,kCAAkC;AAClC,MAAM,CAAC,MAAM,SAAS,GAAG,GAAoB,EAAE,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React, { createContext, useContext } from 'react';\nimport {\n CameraButtonStrings,\n EndCallButtonStrings,\n ErrorBarStrings,\n MessageStatusIndicatorStrings,\n MessageThreadStrings,\n MicrophoneButtonStrings,\n DevicesButtonStrings,\n ParticipantsButtonStrings,\n ParticipantItemStrings,\n ScreenShareButtonStrings,\n SendBoxStrings,\n TypingIndicatorStrings,\n VideoGalleryStrings\n} from '../components';\n/* @conditional-compile-remove(raise-hand) */\nimport { RaiseHandButtonStrings } from '../components';\n/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\nimport { HoldButtonStrings } from '../components';\n/* @conditional-compile-remove(dialpad) */ /* @conditional-compile-remove(PSTN-calls) */\nimport { DialpadStrings } from '../components';\n/* @conditional-compile-remove(call-readiness) */\nimport { SitePermissionsStrings } from '../components/DevicePermissions/SitePermissionsScaffolding';\n/* @conditional-compile-remove(call-readiness) */\nimport { BrowserPermissionDeniedStrings } from '../components/DevicePermissions/BrowserPermissionDenied';\n/* @conditional-compile-remove(call-readiness) */\nimport { BrowserPermissionDeniedIOSStrings } from '../components/DevicePermissions/BrowserPermissionDeniedIOS';\n/* @conditional-compile-remove(call-readiness) */ /* @conditional-compile-remove(unsupported-browser) */\nimport { UnsupportedBrowserStrings } from '../components/UnsupportedBrowser';\n/* @conditional-compile-remove(one-to-n-calling) */\n// @conditional-compile-remove(PSTN-calls)\nimport { VideoTileStrings } from '../components/VideoTile';\nimport { COMPONENT_LOCALE_EN_US } from './locales';\n/* @conditional-compile-remove(unsupported-browser) */\nimport { UnsupportedBrowserVersionStrings } from '../components/UnsupportedBrowserVersion';\n/* @conditional-compile-remove(unsupported-browser) */\nimport { UnsupportedOperatingSystemStrings } from '../components/UnsupportedOperatingSystem';\n/* @conditional-compile-remove(vertical-gallery) */\nimport { VerticalGalleryStrings } from '../components/VerticalGallery';\n/* @conditional-compile-remove(total-participant-count) */\nimport { ParticipantListStrings } from '../components/ParticipantList';\n/* @conditional-compile-remove(mention) */\nimport { MentionPopoverStrings } from '../components/MentionPopover';\n/* @conditional-compile-remove(image-overlay) */\nimport { ImageOverlayStrings } from '../components/ImageOverlay';\n/* @conditional-compile-remove(reaction) */\nimport { ReactionButtonStrings } from '../components';\n/* @conditional-compile-remove(rich-text-editor) */\nimport { RichTextSendBoxStrings } from '../components/RichTextEditor/RichTextSendBox';\n\n/**\n * Locale information for all components exported from this library.\n *\n * @public\n */\nexport interface ComponentLocale {\n /** Strings for components */\n strings: ComponentStrings;\n /* @conditional-compile-remove(date-time-customization) */\n /**\n * Optional function to provide customized date format.\n * @beta\n */\n onDisplayDateTimeString?: (messageDate: Date) => string;\n}\n\n/**\n * Strings used by all components exported from this library.\n *\n * @public\n */\nexport interface ComponentStrings {\n /** Strings for MessageThread */\n messageThread: MessageThreadStrings;\n /** Strings for ParticipantItem */\n participantItem: ParticipantItemStrings;\n /** Strings for CameraButton */\n cameraButton: CameraButtonStrings;\n /** Strings for MicrophoneButton */\n microphoneButton: MicrophoneButtonStrings;\n /** Strings for EndCallButton */\n endCallButton: EndCallButtonStrings;\n /** Strings for DevicesButton */\n devicesButton: DevicesButtonStrings;\n /** Strings for ParticipantsButton */\n participantsButton: ParticipantsButtonStrings;\n /** Strings for ScreenShareButton */\n screenShareButton: ScreenShareButtonStrings;\n /* @conditional-compile-remove(raise-hand) */\n /** Strings for RaiseHandButton */\n raiseHandButton: RaiseHandButtonStrings;\n /* @conditional-compile-remove(reaction) */\n /**\n * Strings for ReactionButton\n * @beta\n * */\n reactionButton: ReactionButtonStrings;\n /** Strings for TypingIndicator */\n typingIndicator: TypingIndicatorStrings;\n /** Strings for SendBox */\n sendBox: SendBoxStrings;\n /* @conditional-compile-remove(rich-text-editor) */\n /** Strings for RichTextSendBox */\n richTextSendBox: RichTextSendBoxStrings;\n /* @conditional-compile-remove(mention) */\n /** Strings for MentionPopover */\n mentionPopover: MentionPopoverStrings;\n /* @conditional-compile-remove(image-overlay) */\n /** Strings for ImageOverlay */\n imageOverlay: ImageOverlayStrings;\n /** Strings for MessageStatusIndicator */\n messageStatusIndicator: MessageStatusIndicatorStrings;\n /** Strings for ErroBar */\n errorBar: ErrorBarStrings;\n /** Strings for VideoGallery */\n videoGallery: VideoGalleryStrings;\n /* @conditional-compile-remove(dialpad) */ /* @conditional-compile-remove(PSTN-calls) */\n /** Strings for Dialpad */\n dialpad: DialpadStrings;\n /* @conditional-compile-remove(one-to-n-calling) */\n // @conditional-compile-remove(PSTN-calls)\n /** Strings for VideoTile */\n videoTile: VideoTileStrings;\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n /** Strings for HoldButton */\n holdButton: HoldButtonStrings;\n /* @conditional-compile-remove(call-readiness) */\n /** Strings for a site's permission request prompt */\n CameraAndMicrophoneSitePermissionsRequest: SitePermissionsStrings;\n /* @conditional-compile-remove(call-readiness) */\n /** Strings for a site's permission request prompt */\n CameraSitePermissionsRequest: SitePermissionsStrings;\n /* @conditional-compile-remove(call-readiness) */\n /** Strings for a site's permission request prompt */\n MicrophoneSitePermissionsRequest: SitePermissionsStrings;\n /* @conditional-compile-remove(call-readiness) */\n /** Strings for a site's permission generic checking prompt */\n CameraAndMicrophoneSitePermissionsCheck: SitePermissionsStrings;\n /* @conditional-compile-remove(call-readiness) */\n /** Strings for a site's permission generic checking prompt */\n CameraSitePermissionsCheck: SitePermissionsStrings;\n /* @conditional-compile-remove(call-readiness) */\n /** Strings for a site's permission generic checking prompt */\n MicrophoneSitePermissionsCheck: SitePermissionsStrings;\n /* @conditional-compile-remove(call-readiness) */\n /** Strings for a site's permission denied prompt */\n CameraAndMicrophoneSitePermissionsDenied: SitePermissionsStrings;\n /* @conditional-compile-remove(call-readiness) */\n /** Strings for a site's permission denied prompt for safari browsers*/\n CameraAndMicrophoneSitePermissionsDeniedSafari: SitePermissionsStrings;\n /* @conditional-compile-remove(call-readiness) */\n /** Strings for a site's permission denied prompt */\n CameraSitePermissionsDenied: SitePermissionsStrings;\n /* @conditional-compile-remove(call-readiness) */\n /** Strings for a site's permission denied prompt */\n MicrophoneSitePermissionsDenied: SitePermissionsStrings;\n /* @conditional-compile-remove(call-readiness) */\n /** Strings for a site's permission denied prompt for safari browsers*/\n CameraSitePermissionsDeniedSafari: SitePermissionsStrings;\n /* @conditional-compile-remove(call-readiness) */\n /** Strings for a site's permission denied prompt for safari browsers*/\n MicrophoneSitePermissionsDeniedSafari: SitePermissionsStrings;\n /* @conditional-compile-remove(unsupported-browser) */\n /** Strings for unsupported browser UI */\n UnsupportedBrowser: UnsupportedBrowserStrings;\n /* @conditional-compile-remove(unsupported-browser) */\n /** Strings for unsupported browser version UI */\n UnsupportedBrowserVersion: UnsupportedBrowserVersionStrings;\n /* @conditional-compile-remove(unsupported-browser) */\n /** Strings for unsupported browser version UI */\n UnsupportedOperatingSystem: UnsupportedOperatingSystemStrings;\n /* @conditional-compile-remove(call-readiness) */\n /** Strings for BrowserPemissionDenied */\n BrowserPermissionDenied: BrowserPermissionDeniedStrings;\n /* @conditional-compile-remove(call-readiness) */\n /** Strings for BrowserPemissionDeniedIOS */\n BrowserPermissionDeniedIOS: BrowserPermissionDeniedIOSStrings;\n /* @conditional-compile-remove(vertical-gallery) */\n /**\n * Strings for the VerticalGallery.\n */\n verticalGallery: VerticalGalleryStrings;\n /* @conditional-compile-remove(total-participant-count) */\n /** Strings for the participant list component */\n ParticipantList: ParticipantListStrings;\n /* @conditional-compile-remove(hide-attendee-name) */\n}\n\n/**\n * Context for providing localized strings to components exported from this library.\n *\n * @public\n */\nexport const LocaleContext = createContext<ComponentLocale>(COMPONENT_LOCALE_EN_US);\n\n/**\n * Props for {@link LocalizationProvider}.\n *\n * @public\n */\nexport type LocalizationProviderProps = {\n /** Locale context to provide components */\n locale: ComponentLocale;\n /** Children to provide locale context. */\n children: React.ReactNode;\n};\n\n/**\n * Provider to provide localized strings for this library's react components.\n *\n * @remarks Components will be provided localized strings in English (US) by default if this\n * provider is not used.\n *\n * @public\n */\nexport const LocalizationProvider = (props: LocalizationProviderProps): JSX.Element => {\n const { locale, children } = props;\n return <LocaleContext.Provider value={locale}>{children}</LocaleContext.Provider>;\n};\n\n/** React hook to access locale */\nexport const useLocale = (): ComponentLocale => useContext(LocaleContext);\n"]}
|
@@ -43,7 +43,8 @@
|
|
43
43
|
"bulletListTooltip": "Bulleted list",
|
44
44
|
"numberListTooltip": "Numbered list",
|
45
45
|
"increaseIndentTooltip": "Increase indent",
|
46
|
-
"decreaseIndentTooltip": "Decrease indent"
|
46
|
+
"decreaseIndentTooltip": "Decrease indent",
|
47
|
+
"richTextFormatButtonTooltip": "Format"
|
47
48
|
},
|
48
49
|
"mentionPopover": {
|
49
50
|
"mentionPopoverHeader": "Suggestions"
|
@@ -108,13 +108,15 @@ export declare const DEFAULT_COMPONENT_ICONS: {
|
|
108
108
|
StartSpotlightContextualMenuItem: React.JSX.Element;
|
109
109
|
StopSpotlightContextualMenuItem: React.JSX.Element;
|
110
110
|
VideoSpotlighted: React.JSX.Element;
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
111
|
+
RichTextBoldButtonIcon: React.JSX.Element;
|
112
|
+
RichTextItalicButtonIcon: React.JSX.Element;
|
113
|
+
RichTextUnderlineButtonIcon: React.JSX.Element;
|
114
|
+
RichTextBulletListButtonIcon: React.JSX.Element;
|
115
|
+
RichTextNumberListButtonIcon: React.JSX.Element;
|
116
|
+
RichTextIndentDecreaseButtonIcon: React.JSX.Element;
|
117
|
+
RichTextIndentIncreaseButtonIcon: React.JSX.Element;
|
118
|
+
RichTextDividerIcon: React.JSX.Element;
|
119
|
+
RichTextEditorButtonIcon: React.JSX.Element;
|
120
|
+
RichTextEditorButtonIconFilled: React.JSX.Element;
|
119
121
|
};
|
120
122
|
//# sourceMappingURL=icons.d.ts.map
|