@azure/communication-react 1.15.0-alpha-202404040013 → 1.15.0-alpha-202404050013

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 (24) hide show
  1. package/dist/dist-cjs/communication-react/{ChatMessageComponentAsRichTextEditBox-ButXxDca.js → ChatMessageComponentAsRichTextEditBox-B3cXye-F.js} +2 -2
  2. package/dist/dist-cjs/communication-react/{ChatMessageComponentAsRichTextEditBox-ButXxDca.js.map → ChatMessageComponentAsRichTextEditBox-B3cXye-F.js.map} +1 -1
  3. package/dist/dist-cjs/communication-react/{index-BK44EyzL.js → index-C4BFVPuO.js} +68 -9
  4. package/dist/dist-cjs/communication-react/index-C4BFVPuO.js.map +1 -0
  5. package/dist/dist-cjs/communication-react/index.js +1 -1
  6. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js +1 -1
  7. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js.map +1 -1
  8. package/dist/dist-esm/react-components/src/components/RichTextEditor/Buttons/Table/RichTextInsertTableButton.js.map +1 -1
  9. package/dist/dist-esm/react-components/src/components/RichTextEditor/Buttons/Table/RichTextTableContextMenu.js +11 -2
  10. package/dist/dist-esm/react-components/src/components/RichTextEditor/Buttons/Table/RichTextTableContextMenu.js.map +1 -1
  11. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/CopyPastePlugin.d.ts +16 -0
  12. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/CopyPastePlugin.js +36 -0
  13. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/CopyPastePlugin.js.map +1 -0
  14. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextEditor.js +11 -1
  15. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextEditor.js.map +1 -1
  16. package/dist/dist-esm/react-components/src/components/VideoGallery/ParticipantVideoTileOverlay.js +2 -1
  17. package/dist/dist-esm/react-components/src/components/VideoGallery/ParticipantVideoTileOverlay.js.map +1 -1
  18. package/dist/dist-esm/react-components/src/components/VideoGallery/RemoteContentShareReactionOverlay.js +2 -2
  19. package/dist/dist-esm/react-components/src/components/VideoGallery/RemoteContentShareReactionOverlay.js.map +1 -1
  20. package/dist/dist-esm/react-components/src/components/styles/RichTextEditor.styles.d.ts +4 -0
  21. package/dist/dist-esm/react-components/src/components/styles/RichTextEditor.styles.js +6 -0
  22. package/dist/dist-esm/react-components/src/components/styles/RichTextEditor.styles.js.map +1 -1
  23. package/package.json +13 -12
  24. package/dist/dist-cjs/communication-react/index-BK44EyzL.js.map +0 -1
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-BK44EyzL.js');
3
+ var index = require('./index-C4BFVPuO.js');
4
4
  require('react');
5
5
  require('@fluentui/react');
6
6
  require('@fluentui/react-components');
@@ -2,5 +2,5 @@
2
2
  // Copyright (c) Microsoft Corporation.
3
3
  // Licensed under the MIT License.
4
4
  // GENERATED FILE. DO NOT EDIT MANUALLY.
5
- module.exports = '1.15.0-alpha-202404040013';
5
+ module.exports = '1.15.0-alpha-202404050013';
6
6
  //# sourceMappingURL=telemetryVersion.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"telemetryVersion.js","sourceRoot":"","sources":["../../../../../acs-ui-common/src/telemetryVersion.js"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;AAElC,wCAAwC;AAExC,MAAM,CAAC,OAAO,GAAG,2BAA2B,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n// GENERATED FILE. DO NOT EDIT MANUALLY.\n\nmodule.exports = '1.15.0-alpha-202404040013';\n"]}
1
+ {"version":3,"file":"telemetryVersion.js","sourceRoot":"","sources":["../../../../../acs-ui-common/src/telemetryVersion.js"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;AAElC,wCAAwC;AAExC,MAAM,CAAC,OAAO,GAAG,2BAA2B,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n// GENERATED FILE. DO NOT EDIT MANUALLY.\n\nmodule.exports = '1.15.0-alpha-202404050013';\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"RichTextInsertTableButton.js","sourceRoot":"","sources":["../../../../../../../../../react-components/src/components/RichTextEditor/Buttons/Table/RichTextInsertTableButton.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,WAAW,IAAI,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAGvE,OAAO,EAAE,wBAAwB,EAAE,sBAAsB,EAAE,MAAM,uCAAuC,CAAC;AACzG,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,sBAAsB,EAAE,QAAQ,EAAE,MAAM,mCAAmC,CAAC;AAErF,kGAAkG;AAElG;;GAEG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAC/B,KAAY,EACZ,aAAqB,EACrB,gBAAwB,EACF,EAAE;IACxB,OAAO;QACL,GAAG,EAAE,uBAAuB;QAC5B,eAAe,EAAE,cAAc;QAC/B,4CAA4C;QAC5C,QAAQ,EAAE,EAAE;QACZ,OAAO,EAAE,CAAC,MAAM,EAAE,GAAG,EAAE,EAAE;YACvB,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC;YACtC,iBAAiB,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,CAAC,CAAC;QACzC,CAAC;QACD,YAAY,EAAE;YACZ,KAAK,EAAE;gBACL,6DAA6D;gBAC7D,eAAe,EAAE,UAAU,sBAAsB,QAAQ;aAC1D;YACD,UAAU,EAAE,CAAC,IAAI,EAAE,OAAO,EAAE,EAAE;gBAC5B,OAAO,CACL,oBAAC,uBAAuB,IACtB,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,KAAK,EACZ,gBAAgB,EAAE,gBAAgB,EAClC,aAAa,EAAE,aAAa,GAC5B,CACH,CAAC;YACJ,CAAC;YACD,2BAA2B,EAAE;gBAC3B,SAAS,EAAE,wBAAwB;aACpC;SACF;QACD,oBAAoB,EAAE;YACpB,wBAAwB;YACxB,aAAa,EAAE;gBACb,MAAM,EAAE,IAAI;aACb;YACD,YAAY,EAAE,GAAG,EAAE;gBACjB,OAAO,oBAAC,SAAS,OAAG,CAAC;YACvB,CAAC;YACD,YAAY,EAAE,sBAAsB,CAAC,KAAK,CAAC;YAC3C,QAAQ,EAAE,KAAK;SAChB;KACF,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,SAAS,GAAG,GAAgB,EAAE;IAClC,OAAO;IACL,qGAAqG;IACrG,oBAAC,KAAK;QACJ,oBAAC,IAAI,IAAC,QAAQ,EAAC,+BAA+B,EAAC,SAAS,EAAE,iCAAiC,GAAI;QAC/F,oBAAC,IAAI,IAAC,QAAQ,EAAC,gCAAgC,EAAC,SAAS,EAAE,kCAAkC,GAAI,CAC3F,CACT,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React from 'react';\nimport { Icon, Stack } from '@fluentui/react';\nimport { insertTable as insertTableAction } from './insertTableAction';\nimport type { RibbonButton } from 'roosterjs-react';\nimport type { Theme } from '@fluentui/react';\nimport { insertTableMenuTablePane, ribbonTableButtonStyle } from '../../../styles/RichTextEditor.styles';\nimport { RichTextInsertTablePane } from './RichTextInsertTablePane';\nimport { ColumnRowReplaceString, parseKey } from '../../../utils/RichTextTableUtils';\n\n// This file uses RoosterJS React package implementation with updates to UI components and styles.\n\n/**\n * \"Insert table\" button for the RoosterJS ribbon\n */\nexport const insertTableButton = (\n theme: Theme,\n maxRowsNumber: number,\n maxColumnsNumber: number\n): RibbonButton<string> => {\n return {\n key: 'buttonNameInsertTable',\n unlocalizedText: 'Insert table',\n // Icon will be set in onRenderIcon callback\n iconName: '',\n onClick: (editor, key) => {\n const { row, column } = parseKey(key);\n insertTableAction(editor, column, row);\n },\n dropDownMenu: {\n items: {\n // the key of the item is also used as a key for localization\n insertTablePane: `Insert ${ColumnRowReplaceString} table`\n },\n itemRender: (item, onClick) => {\n return (\n <RichTextInsertTablePane\n item={item}\n onClick={onClick}\n theme={theme}\n maxColumnsNumber={maxColumnsNumber}\n maxRowsNumber={maxRowsNumber}\n />\n );\n },\n commandBarSubMenuProperties: {\n className: insertTableMenuTablePane\n }\n },\n commandBarProperties: {\n // hide the chevron icon\n menuIconProps: {\n hidden: true\n },\n onRenderIcon: () => {\n return <TableIcon />;\n },\n buttonStyles: ribbonTableButtonStyle(theme),\n canCheck: false\n }\n };\n};\n\nconst TableIcon = (): JSX.Element => {\n return (\n // update the visibility of the Table Icon with css classes that are triggered by command bar's state\n <Stack>\n <Icon iconName=\"RichTextInsertTableFilledIcon\" className={'ribbon-table-button-filled-icon'} />\n <Icon iconName=\"RichTextInsertTableRegularIcon\" className={'ribbon-table-button-regular-icon'} />\n </Stack>\n );\n};\n"]}
1
+ {"version":3,"file":"RichTextInsertTableButton.js","sourceRoot":"","sources":["../../../../../../../../../react-components/src/components/RichTextEditor/Buttons/Table/RichTextInsertTableButton.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,WAAW,IAAI,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAGvE,OAAO,EAAE,wBAAwB,EAAE,sBAAsB,EAAE,MAAM,uCAAuC,CAAC;AACzG,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,sBAAsB,EAAE,QAAQ,EAAE,MAAM,mCAAmC,C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,SAAS,EAAE,iCAAiC,GAAI;QAC/F,oBAAC,IAAI,IAAC,QAAQ,EAAC,gCAAgC,EAAC,SAAS,EAAE,kCAAkC,GAAI,CAC3F,CACT,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React from 'react';\nimport { Icon, Stack } from '@fluentui/react';\nimport { insertTable as insertTableAction } from './insertTableAction';\nimport type { RibbonButton } from 'roosterjs-react';\nimport type { IContextualMenuItem, Theme } from '@fluentui/react';\nimport { insertTableMenuTablePane, ribbonTableButtonStyle } from '../../../styles/RichTextEditor.styles';\nimport { RichTextInsertTablePane } from './RichTextInsertTablePane';\nimport { ColumnRowReplaceString, parseKey } from '../../../utils/RichTextTableUtils';\nimport type { IEditor } from 'roosterjs-editor-types-compatible';\n\n// This file uses RoosterJS React package implementation with updates to UI components and styles.\n\n/**\n * \"Insert table\" button for the RoosterJS ribbon\n */\nexport const insertTableButton = (\n theme: Theme,\n maxRowsNumber: number,\n maxColumnsNumber: number\n): RibbonButton<string> => {\n return {\n key: 'buttonNameInsertTable',\n unlocalizedText: 'Insert table',\n // Icon will be set in onRenderIcon callback\n iconName: '',\n onClick: (editor: IEditor, key: string) => {\n const { row, column } = parseKey(key);\n insertTableAction(editor, column, row);\n },\n dropDownMenu: {\n items: {\n // the key of the item is also used as a key for localization\n insertTablePane: `Insert ${ColumnRowReplaceString} table`\n },\n itemRender: (\n item: IContextualMenuItem,\n onClick: (e: React.MouseEvent<Element> | React.KeyboardEvent<Element>, item: IContextualMenuItem) => void\n ) => {\n return (\n <RichTextInsertTablePane\n item={item}\n onClick={onClick}\n theme={theme}\n maxColumnsNumber={maxColumnsNumber}\n maxRowsNumber={maxRowsNumber}\n />\n );\n },\n commandBarSubMenuProperties: {\n className: insertTableMenuTablePane\n }\n },\n commandBarProperties: {\n // hide the chevron icon\n menuIconProps: {\n hidden: true\n },\n onRenderIcon: () => {\n return <TableIcon />;\n },\n buttonStyles: ribbonTableButtonStyle(theme),\n canCheck: false\n }\n };\n};\n\nconst TableIcon = (): JSX.Element => {\n return (\n // update the visibility of the Table Icon with css classes that are triggered by command bar's state\n <Stack>\n <Icon iconName=\"RichTextInsertTableFilledIcon\" className={'ribbon-table-button-filled-icon'} />\n <Icon iconName=\"RichTextInsertTableRegularIcon\" className={'ribbon-table-button-regular-icon'} />\n </Stack>\n );\n};\n"]}
@@ -4,6 +4,7 @@ import { editTable } from 'roosterjs-editor-api';
4
4
  import { CompatibleTableOperation } from 'roosterjs-editor-types-compatible';
5
5
  import { createContextMenuProvider } from 'roosterjs-react';
6
6
  import { tableContextMenuStrings } from '../../../utils/RichTextEditorStringsUtils';
7
+ import { tableContextMenuIconStyles } from '../../../styles/RichTextEditor.styles';
7
8
  const onClick = (key, editor) => {
8
9
  editor.focus();
9
10
  const operation = TableEditOperationMap[key];
@@ -29,7 +30,11 @@ const tableEditInsertMenuItem = {
29
30
  menuNameTableInsertLeft: 'Insert left123 ',
30
31
  menuNameTableInsertRight: 'Insert right'
31
32
  },
32
- onClick
33
+ onClick,
34
+ iconProps: {
35
+ iconName: 'RichTextTableInsertMenuIcon',
36
+ styles: { root: tableContextMenuIconStyles }
37
+ }
33
38
  };
34
39
  const tableEditDeleteMenuItem = {
35
40
  key: 'menuNameTableDelete',
@@ -39,7 +44,11 @@ const tableEditDeleteMenuItem = {
39
44
  menuNameTableDeleteRow: 'Delete row',
40
45
  menuNameTableDeleteTable: 'Delete table'
41
46
  },
42
- onClick
47
+ onClick,
48
+ iconProps: {
49
+ iconName: 'RichTextTableDeleteMenuIcon',
50
+ styles: { root: tableContextMenuIconStyles }
51
+ }
43
52
  };
44
53
  const tableActions = [tableEditInsertMenuItem, tableEditDeleteMenuItem];
45
54
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"RichTextTableContextMenu.js","sourceRoot":"","sources":["../../../../../../../../../react-components/src/components/RichTextEditor/Buttons/Table/RichTextTableContextMenu.tsx"],"names":[],"mappings":"AAAA,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B,EAAE,YAAY;QACpC,wBAAwB,EAAE,cAAc;KACzC;IACD,OAAO;CACR,CAAC;AAEF,MAAM,YAAY,GAA8B,CAAC,uBAAuB,EAAE,uBAAuB,CAAC,CAAC;AAEnG;;;GAGG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,OAAkC,EAAgB,EAAE;IAC9F,OAAO,yBAAyB,CAC9B,WAAW,EACX,YAAY,EACZ,uBAAuB,CAAC,OAAO,aAAP,OAAO,cAAP,OAAO,GAAI,EAAE,CAAC,EACtC,CAAC,MAAe,EAAE,IAAU,EAAE,EAAE,CAAC,CAAC,CAAC,eAAe,CAAC,MAAM,EAAE,IAAI,CAAC,CACjE,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,eAAe,GAAG,CAAC,MAAe,EAAE,IAAU,EAAgE,EAAE;IACpH,MAAM,EAAE,GAAG,MAAM,CAAC,kBAAkB,CAAC,OAAO,EAAE,IAAI,CAAyB,CAAC;IAC5E,MAAM,KAAK,GAAG,EAAE,IAAK,MAAM,CAAC,kBAAkB,CAAC,OAAO,EAAE,EAAE,CAAsB,CAAC;IAEjF,OAAO,CAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,iBAAiB,EAAC,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;AACzD,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport { editTable } from 'roosterjs-editor-api';\nimport { CompatibleTableOperation, EditorPlugin, IEditor } from 'roosterjs-editor-types-compatible';\nimport { ContextMenuItem, createContextMenuProvider, LocalizedStrings } from 'roosterjs-react';\nimport { tableContextMenuStrings } from '../../../utils/RichTextEditorStringsUtils';\n\nconst onClick = (key: string, editor: IEditor): void => {\n editor.focus();\n const operation = TableEditOperationMap[key];\n if (typeof operation === 'number') {\n editTable(editor, operation);\n }\n};\n\nconst TableEditOperationMap: Partial<Record<string, CompatibleTableOperation>> = {\n menuNameTableInsertAbove: CompatibleTableOperation.InsertAbove,\n menuNameTableInsertBelow: CompatibleTableOperation.InsertBelow,\n menuNameTableInsertLeft: CompatibleTableOperation.InsertLeft,\n menuNameTableInsertRight: CompatibleTableOperation.InsertRight,\n menuNameTableDeleteTable: CompatibleTableOperation.DeleteTable,\n menuNameTableDeleteColumn: CompatibleTableOperation.DeleteColumn,\n menuNameTableDeleteRow: CompatibleTableOperation.DeleteRow\n};\n\nconst tableEditInsertMenuItem: ContextMenuItem<string> = {\n key: 'menuNameTableInsert',\n unlocalizedText: 'Insert123',\n subItems: {\n menuNameTableInsertAbove: 'Insert above121312 ',\n menuNameTableInsertBelow: 'Insert below',\n menuNameTableInsertLeft: 'Insert left123 ',\n menuNameTableInsertRight: 'Insert right'\n },\n onClick\n};\n\nconst tableEditDeleteMenuItem: ContextMenuItem<string> = {\n key: 'menuNameTableDelete',\n unlocalizedText: 'Delete',\n subItems: {\n menuNameTableDeleteColumn: 'Delete column',\n menuNameTableDeleteRow: 'Delete row',\n menuNameTableDeleteTable: 'Delete table'\n },\n onClick\n};\n\nconst tableActions: ContextMenuItem<string>[] = [tableEditInsertMenuItem, tableEditDeleteMenuItem];\n\n/**\n * Create a new instance of ContextMenuProvider to support table editing functionalities in context menu\n * @returns A new ContextMenuProvider\n */\nexport const createTableEditMenuProvider = (strings?: LocalizedStrings<string>): EditorPlugin => {\n return createContextMenuProvider(\n 'tableEdit',\n tableActions,\n tableContextMenuStrings(strings ?? {}),\n (editor: IEditor, node: Node) => !!getEditingTable(editor, node)\n );\n};\n\nconst getEditingTable = (editor: IEditor, node: Node): { table: HTMLTableElement; td: HTMLTableCellElement } | null => {\n const td = editor.getElementAtCursor('TD,TH', node) as HTMLTableCellElement;\n const table = td && (editor.getElementAtCursor('table', td) as HTMLTableElement);\n\n return table?.isContentEditable ? { table, td } : null;\n};\n"]}
1
+ {"version":3,"file":"RichTextTableContextMenu.js","sourceRoot":"","sources":["../../../../../../../../../react-components/src/components/Rich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js-editor-api';\nimport { CompatibleTableOperation, EditorPlugin, IEditor } from 'roosterjs-editor-types-compatible';\nimport { ContextMenuItem, createContextMenuProvider, LocalizedStrings } from 'roosterjs-react';\nimport { tableContextMenuStrings } from '../../../utils/RichTextEditorStringsUtils';\nimport { tableContextMenuIconStyles } from '../../../styles/RichTextEditor.styles';\n\nconst onClick = (key: string, editor: IEditor): void => {\n editor.focus();\n const operation = TableEditOperationMap[key];\n if (typeof operation === 'number') {\n editTable(editor, operation);\n }\n};\n\nconst TableEditOperationMap: Partial<Record<string, CompatibleTableOperation>> = {\n menuNameTableInsertAbove: CompatibleTableOperation.InsertAbove,\n menuNameTableInsertBelow: CompatibleTableOperation.InsertBelow,\n menuNameTableInsertLeft: CompatibleTableOperation.InsertLeft,\n menuNameTableInsertRight: CompatibleTableOperation.InsertRight,\n menuNameTableDeleteTable: CompatibleTableOperation.DeleteTable,\n menuNameTableDeleteColumn: CompatibleTableOperation.DeleteColumn,\n menuNameTableDeleteRow: CompatibleTableOperation.DeleteRow\n};\n\nconst tableEditInsertMenuItem: ContextMenuItem<string> = {\n key: 'menuNameTableInsert',\n unlocalizedText: 'Insert123',\n subItems: {\n menuNameTableInsertAbove: 'Insert above121312 ',\n menuNameTableInsertBelow: 'Insert below',\n menuNameTableInsertLeft: 'Insert left123 ',\n menuNameTableInsertRight: 'Insert right'\n },\n onClick,\n iconProps: {\n iconName: 'RichTextTableInsertMenuIcon',\n styles: { root: tableContextMenuIconStyles }\n }\n};\n\nconst tableEditDeleteMenuItem: ContextMenuItem<string> = {\n key: 'menuNameTableDelete',\n unlocalizedText: 'Delete',\n subItems: {\n menuNameTableDeleteColumn: 'Delete column',\n menuNameTableDeleteRow: 'Delete row',\n menuNameTableDeleteTable: 'Delete table'\n },\n onClick,\n iconProps: {\n iconName: 'RichTextTableDeleteMenuIcon',\n styles: { root: tableContextMenuIconStyles }\n }\n};\n\nconst tableActions: ContextMenuItem<string>[] = [tableEditInsertMenuItem, tableEditDeleteMenuItem];\n\n/**\n * Create a new instance of ContextMenuProvider to support table editing functionalities in context menu\n * @returns A new ContextMenuProvider\n */\nexport const createTableEditMenuProvider = (strings?: LocalizedStrings<string>): EditorPlugin => {\n return createContextMenuProvider(\n 'tableEdit',\n tableActions,\n tableContextMenuStrings(strings ?? {}),\n (editor: IEditor, node: Node) => !!getEditingTable(editor, node)\n );\n};\n\nconst getEditingTable = (editor: IEditor, node: Node): { table: HTMLTableElement; td: HTMLTableCellElement } | null => {\n const td = editor.getElementAtCursor('TD,TH', node) as HTMLTableCellElement;\n const table = td && (editor.getElementAtCursor('table', td) as HTMLTableElement);\n\n return table?.isContentEditable ? { table, td } : null;\n};\n"]}
@@ -0,0 +1,16 @@
1
+ import type { PluginEvent, EditorPlugin } from 'roosterjs-editor-types';
2
+ /**
3
+ * CopyPastePlugin is a plugin for handling copy and paste events in the editor.
4
+ */
5
+ export default class CopyPastePlugin implements EditorPlugin {
6
+ getName(): string;
7
+ initialize(): void;
8
+ dispose(): void;
9
+ onPluginEvent(event: PluginEvent): void;
10
+ }
11
+ /**
12
+ * @internal
13
+ * Exported only for unit testing
14
+ */
15
+ export declare const removeImageElement: (event: PluginEvent) => void;
16
+ //# sourceMappingURL=CopyPastePlugin.d.ts.map
@@ -0,0 +1,36 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT License.
3
+ import { CompatiblePluginEventType, CompatiblePasteType } from 'roosterjs-editor-types-compatible';
4
+ /**
5
+ * CopyPastePlugin is a plugin for handling copy and paste events in the editor.
6
+ */
7
+ export default class CopyPastePlugin {
8
+ getName() {
9
+ return 'CopyPastePlugin';
10
+ }
11
+ initialize() { }
12
+ dispose() { }
13
+ onPluginEvent(event) {
14
+ removeImageElement(event);
15
+ }
16
+ }
17
+ /**
18
+ * @internal
19
+ * Exported only for unit testing
20
+ */
21
+ export const removeImageElement = (event) => {
22
+ // We don't support the pasting options such as paste as image yet.
23
+ if (event.eventType === CompatiblePluginEventType.BeforePaste && event.pasteType === CompatiblePasteType.Normal) {
24
+ event.fragment.querySelectorAll('img').forEach((image) => {
25
+ // If the image is the only child of its parent, remove all the parents of this img element.
26
+ let parentNode = image.parentElement;
27
+ let currentNode = image;
28
+ while ((parentNode === null || parentNode === void 0 ? void 0 : parentNode.childNodes.length) === 1) {
29
+ currentNode = parentNode;
30
+ parentNode = parentNode.parentElement;
31
+ }
32
+ currentNode === null || currentNode === void 0 ? void 0 : currentNode.remove();
33
+ });
34
+ }
35
+ };
36
+ //# sourceMappingURL=CopyPastePlugin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CopyPastePlugin.js","sourceRoot":"","sources":["../../../../../../../../react-components/src/components/RichTextEditor/Plugins/CopyPastePlugin.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,yBAAyB,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AAEnG;;GAEG;AACH,MAAM,CAAC,OAAO,OAAO,eAAe;IAClC,OAAO;QACL,OAAO,iBAAiB,CAAC;IAC3B,CAAC;IAED,UAAU,KAAU,CAAC;IAErB,OAAO,KAAU,CAAC;IAElB,aAAa,CAAC,KAAkB;QAC9B,kBAAkB,CAAC,KAAK,CAAC,CAAC;IAC5B,CAAC;CACF;AAED;;;GAGG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,KAAkB,EAAQ,EAAE;IAC7D,mEAAmE;IACnE,IAAI,KAAK,CAAC,SAAS,KAAK,yBAAyB,CAAC,WAAW,IAAI,KAAK,CAAC,SAAS,KAAK,mBAAmB,CAAC,MAAM,EAAE,CAAC;QAChH,KAAK,CAAC,QAAQ,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE;YACvD,4FAA4F;YAC5F,IAAI,UAAU,GAAuB,KAAK,CAAC,aAAa,CAAC;YACzD,IAAI,WAAW,GAAgB,KAAK,CAAC;YACrC,OAAO,CAAA,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,UAAU,CAAC,MAAM,MAAK,CAAC,EAAE,CAAC;gBAC3C,WAAW,GAAG,UAAU,CAAC;gBACzB,UAAU,GAAG,UAAU,CAAC,aAAa,CAAC;YACxC,CAAC;YACD,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,MAAM,EAAE,CAAC;QACxB,CAAC,CAAC,CAAC;IACL,CAAC;AACH,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { PluginEvent, EditorPlugin } from 'roosterjs-editor-types';\nimport { CompatiblePluginEventType, CompatiblePasteType } from 'roosterjs-editor-types-compatible';\n\n/**\n * CopyPastePlugin is a plugin for handling copy and paste events in the editor.\n */\nexport default class CopyPastePlugin implements EditorPlugin {\n getName(): string {\n return 'CopyPastePlugin';\n }\n\n initialize(): void {}\n\n dispose(): void {}\n\n onPluginEvent(event: PluginEvent): void {\n removeImageElement(event);\n }\n}\n\n/**\n * @internal\n * Exported only for unit testing\n */\nexport const removeImageElement = (event: PluginEvent): void => {\n // We don't support the pasting options such as paste as image yet.\n if (event.eventType === CompatiblePluginEventType.BeforePaste && event.pasteType === CompatiblePasteType.Normal) {\n event.fragment.querySelectorAll('img').forEach((image) => {\n // If the image is the only child of its parent, remove all the parents of this img element.\n let parentNode: HTMLElement | null = image.parentElement;\n let currentNode: HTMLElement = image;\n while (parentNode?.childNodes.length === 1) {\n currentNode = parentNode;\n parentNode = parentNode.parentElement;\n }\n currentNode?.remove();\n });\n }\n};\n"]}
@@ -10,6 +10,7 @@ import { ribbonButtons } from './Buttons/RichTextRibbonButtons';
10
10
  import { isDarkThemed } from '../../theming/themeUtils';
11
11
  import { ribbonButtonsStrings } from '../utils/RichTextEditorStringsUtils';
12
12
  import { createTableEditMenuProvider } from './Buttons/Table/RichTextTableContextMenu';
13
+ import CopyPastePlugin from './Plugins/CopyPastePlugin';
13
14
  /**
14
15
  * A component to wrap RoosterJS Rich Text Editor.
15
16
  *
@@ -60,7 +61,16 @@ export const RichTextEditor = React.forwardRef((props, ref) => {
60
61
  const updateContentPlugin = createUpdateContentPlugin(UpdateMode.OnContentChangedEvent | UpdateMode.OnUserInput, (content) => {
61
62
  onChange && onChange(content);
62
63
  });
63
- return [contentEdit, placeholderPlugin, updateContentPlugin, ribbonPlugin, contextPlugin, tableEditMenuProvider];
64
+ const copyPastePlugin = new CopyPastePlugin();
65
+ return [
66
+ contentEdit,
67
+ placeholderPlugin,
68
+ updateContentPlugin,
69
+ ribbonPlugin,
70
+ contextPlugin,
71
+ tableEditMenuProvider,
72
+ copyPastePlugin
73
+ ];
64
74
  }, [onChange, placeholderPlugin, ribbonPlugin, strings]);
65
75
  const ribbon = useMemo(() => {
66
76
  const buttons = ribbonButtons(theme);
@@ -1 +1 @@
1
- {"version":3,"file":"RichTextEditor.js","sourceRoot":"","sources":["../../../../../../../react-components/src/components/RichTextEditor/RichTextEditor.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,mBAAmB,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC5F,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAE/C,OAAO,EACL,OAAO,EACP,yBAAyB,EACzB,UAAU,EACV,kBAAkB,EAClB,MAAM,EACN,uBAAuB,EACxB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,iBAAiB,EACjB,yBAAyB,EACzB,WAAW,EACX,0BAA0B,EAC1B,mBAAmB,EACpB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAEhE,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,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ClE,aAAa,EAAE,KAAK;oBACpB,MAAM,EAAE,yBAAyB,CAAC,KAAK,CAAC;iBACzC;aACF,EACD,OAAO,EAAE,oBAAoB,CAAC,OAAO,CAAC,iBACzB,yBAAyB,GACtC,CACH,CAAC;IACJ,CAAC,EAAE,CAAC,OAAO,EAAE,YAAY,EAAE,KAAK,CAAC,CAAC,CAAC;IAEnC,MAAM,aAAa,GAAkB,OAAO,CAAC,GAAG,EAAE;QAChD,qHAAqH;QACrH,8KAA8K;QAC9K,gDAAgD;QAChD,OAAO;YACL,eAAe,EAAE,aAAa;SAC/B,CAAC;IACJ,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,CACL,4CAAkB,0BAA0B;QACzC,4BAA4B,IAAI,MAAM;QACvC,6BAAK,SAAS,EAAE,0BAA0B,CAAC,KAAK,EAAE,CAAC,4BAA4B,CAAC;YAC9E,oBAAC,OAAO,IACN,aAAa,EAAE,aAAa,EAC5B,cAAc,EAAE,cAAc,EAC9B,UAAU,EAAE,YAAY,CAAC,KAAK,CAAC,EAC/B,OAAO,EAAE,OAAO,EAChB,SAAS,EAAE,mBAAmB,CAAC,KAAK,CAAC,MAAM,CAAC,EAC5C,aAAa,EAAE,aAAa;gBAC5B,8DAA8D;gBAC9D,yBAAyB,EAAE,MAAM;gBACjC,2FAA2F;gBAC3F,sBAAsB,EAAE,IAAI,iBACf,0BAA0B;gBACvC,+EAA+E;gBAC/E,SAAS,EAAE,KAAK,CAAC,SAAS,GAC1B,CACE,CACF,CACP,CAAC;AACJ,CAAC,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport React, { useCallback, useEffect, useImperativeHandle, useMemo, useRef } from 'react';\nimport { ContentEdit, Watermark } from 'roosterjs-editor-plugins';\nimport { Editor } from 'roosterjs-editor-core';\nimport type { DefaultFormat, EditorOptions, IEditor } from 'roosterjs-editor-types-compatible';\nimport {\n Rooster,\n createUpdateContentPlugin,\n UpdateMode,\n createRibbonPlugin,\n Ribbon,\n createContextMenuPlugin\n} from 'roosterjs-react';\nimport {\n ribbonButtonStyle,\n ribbonOverflowButtonStyle,\n ribbonStyle,\n richTextEditorWrapperStyle,\n richTextEditorStyle\n} from '../styles/RichTextEditor.styles';\nimport { useTheme } from '../../theming';\nimport { ribbonButtons } from './Buttons/RichTextRibbonButtons';\nimport { RichTextSendBoxStrings } from './RichTextSendBox';\nimport { isDarkThemed } from '../../theming/themeUtils';\nimport { ribbonButtonsStrings } from '../utils/RichTextEditorStringsUtils';\nimport { createTableEditMenuProvider } from './Buttons/Table/RichTextTableContextMenu';\n\n/**\n * Props for {@link RichTextEditor}.\n *\n * @private\n */\nexport interface RichTextEditorStyleProps {\n minHeight: string;\n maxHeight: string;\n}\n\n/**\n * Props for {@link RichTextEditor}.\n *\n * @private\n */\nexport interface RichTextEditorProps {\n initialContent?: string;\n onChange: (newValue?: string) => void;\n onKeyDown?: (ev: React.KeyboardEvent<HTMLElement>) => void;\n placeholderText?: string;\n strings: Partial<RichTextSendBoxStrings>;\n showRichTextEditorFormatting: boolean;\n styles: RichTextEditorStyleProps;\n}\n\n/**\n * Props for {@link RichTextEditor}.\n *\n * @beta\n */\nexport interface RichTextEditorComponentRef {\n focus: () => void;\n setEmptyContent: () => void;\n}\n\n/**\n * A component to wrap RoosterJS Rich Text Editor.\n *\n * @beta\n */\nexport const RichTextEditor = React.forwardRef<RichTextEditorComponentRef, RichTextEditorProps>((props, ref) => {\n const { initialContent, onChange, placeholderText, strings, showRichTextEditorFormatting } = props;\n const editor = useRef<IEditor | null>(null);\n const theme = useTheme();\n useImperativeHandle(\n ref,\n () => {\n return {\n focus() {\n if (editor.current) {\n editor.current.focus();\n }\n },\n setEmptyContent() {\n if (editor.current) {\n editor.current.setContent('');\n }\n }\n };\n },\n []\n );\n\n const ribbonPlugin = React.useMemo(() => {\n return createRibbonPlugin();\n }, []);\n\n const editorCreator = useCallback(\n (div: HTMLDivElement, options: EditorOptions) => {\n editor.current = new Editor(div, options);\n return editor.current;\n },\n // trigger force editor reset when strings are changed to update context menu strings\n // see RosterJS documentation for 'editorCreator' for more details\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [strings]\n );\n\n const placeholderPlugin = React.useMemo(() => {\n return new Watermark('');\n }, []);\n\n useEffect(() => {\n if (placeholderText !== undefined) {\n placeholderPlugin.updateWatermark(placeholderText);\n }\n }, [placeholderPlugin, placeholderText]);\n\n const plugins = useMemo(() => {\n // contextPlugin and tableEditMenuProvider allow to show insert/delete menu for the table\n const contextPlugin = createContextMenuPlugin();\n const tableEditMenuProvider = createTableEditMenuProvider(strings);\n const contentEdit = new ContentEdit();\n const updateContentPlugin = createUpdateContentPlugin(\n UpdateMode.OnContentChangedEvent | UpdateMode.OnUserInput,\n (content: string) => {\n onChange && onChange(content);\n }\n );\n return [contentEdit, placeholderPlugin, updateContentPlugin, ribbonPlugin, contextPlugin, tableEditMenuProvider];\n }, [onChange, placeholderPlugin, ribbonPlugin, strings]);\n\n const ribbon = useMemo(() => {\n const buttons = ribbonButtons(theme);\n\n return (\n <Ribbon\n styles={ribbonStyle}\n buttons={buttons}\n plugin={ribbonPlugin}\n overflowButtonProps={{\n styles: ribbonButtonStyle(theme),\n menuProps: {\n items: [], // CommandBar will determine items rendered in overflow\n isBeakVisible: false,\n styles: ribbonOverflowButtonStyle(theme)\n }\n }}\n strings={ribbonButtonsStrings(strings)}\n data-testid={'rich-text-editor-ribbon'}\n />\n );\n }, [strings, ribbonPlugin, theme]);\n\n const defaultFormat: DefaultFormat = useMemo(() => {\n // without setting any styles, text input is not handled properly for tables (when insert or paste one in the editor)\n // because of https://github.com/microsoft/roosterjs/blob/14dbb947e3ae94580109cbd05e48ceb05327c4dc/packages/roosterjs-editor-core/lib/corePlugins/TypeInContainerPlugin.ts#L75\n // this issue is fixed for content model package\n return {\n backgroundColor: 'transparent'\n };\n }, []);\n\n return (\n <div data-testid={'rich-text-editor-wrapper'}>\n {showRichTextEditorFormatting && ribbon}\n <div className={richTextEditorWrapperStyle(theme, !showRichTextEditorFormatting)}>\n <Rooster\n defaultFormat={defaultFormat}\n initialContent={initialContent}\n inDarkMode={isDarkThemed(theme)}\n plugins={plugins}\n className={richTextEditorStyle(props.styles)}\n editorCreator={editorCreator}\n // TODO: confirm the color during inline images implementation\n imageSelectionBorderColor={'blue'}\n // doNotAdjustEditorColor is used to fix the default background color for Rooster component\n doNotAdjustEditorColor={true}\n data-testid={'rooster-rich-text-editor'}\n // if we don't use 'allowKeyboardEventPropagation' only the enter key is caught\n onKeyDown={props.onKeyDown}\n />\n </div>\n </div>\n );\n});\n"]}
1
+ {"version":3,"file":"RichTextEditor.js","sourceRoot":"","sources":["../../../../../../../react-components/src/components/RichTextEditor/RichTextEditor.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,mBAAmB,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC5F,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAE/C,OAAO,EACL,OAAO,EACP,yBAAyB,EACzB,UAAU,EACV,kBAAkB,EAClB,MAAM,EACN,uBAAuB,EACxB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,iBAAiB,EACjB,yBAAyB,EACzB,WAAW,EACX,0BAA0B,EAC1B,mBAAmB,EACpB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAEhE,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,EAAE,2BAA2B,EAAE,MAAM,0CAA0C,CAAC;AACvF,OAAO,eAAe,MA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pB,MAAM,EAAE,yBAAyB,CAAC,KAAK,CAAC;iBACzC;aACF,EACD,OAAO,EAAE,oBAAoB,CAAC,OAAO,CAAC,iBACzB,yBAAyB,GACtC,CACH,CAAC;IACJ,CAAC,EAAE,CAAC,OAAO,EAAE,YAAY,EAAE,KAAK,CAAC,CAAC,CAAC;IAEnC,MAAM,aAAa,GAAkB,OAAO,CAAC,GAAG,EAAE;QAChD,qHAAqH;QACrH,8KAA8K;QAC9K,gDAAgD;QAChD,OAAO;YACL,eAAe,EAAE,aAAa;SAC/B,CAAC;IACJ,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,CACL,4CAAkB,0BAA0B;QACzC,4BAA4B,IAAI,MAAM;QACvC,6BAAK,SAAS,EAAE,0BAA0B,CAAC,KAAK,EAAE,CAAC,4BAA4B,CAAC;YAC9E,oBAAC,OAAO,IACN,aAAa,EAAE,aAAa,EAC5B,cAAc,EAAE,cAAc,EAC9B,UAAU,EAAE,YAAY,CAAC,KAAK,CAAC,EAC/B,OAAO,EAAE,OAAO,EAChB,SAAS,EAAE,mBAAmB,CAAC,KAAK,CAAC,MAAM,CAAC,EAC5C,aAAa,EAAE,aAAa;gBAC5B,8DAA8D;gBAC9D,yBAAyB,EAAE,MAAM;gBACjC,2FAA2F;gBAC3F,sBAAsB,EAAE,IAAI,iBACf,0BAA0B;gBACvC,+EAA+E;gBAC/E,SAAS,EAAE,KAAK,CAAC,SAAS,GAC1B,CACE,CACF,CACP,CAAC;AACJ,CAAC,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport React, { useCallback, useEffect, useImperativeHandle, useMemo, useRef } from 'react';\nimport { ContentEdit, Watermark } from 'roosterjs-editor-plugins';\nimport { Editor } from 'roosterjs-editor-core';\nimport type { DefaultFormat, EditorOptions, IEditor } from 'roosterjs-editor-types-compatible';\nimport {\n Rooster,\n createUpdateContentPlugin,\n UpdateMode,\n createRibbonPlugin,\n Ribbon,\n createContextMenuPlugin\n} from 'roosterjs-react';\nimport {\n ribbonButtonStyle,\n ribbonOverflowButtonStyle,\n ribbonStyle,\n richTextEditorWrapperStyle,\n richTextEditorStyle\n} from '../styles/RichTextEditor.styles';\nimport { useTheme } from '../../theming';\nimport { ribbonButtons } from './Buttons/RichTextRibbonButtons';\nimport { RichTextSendBoxStrings } from './RichTextSendBox';\nimport { isDarkThemed } from '../../theming/themeUtils';\nimport { ribbonButtonsStrings } from '../utils/RichTextEditorStringsUtils';\nimport { createTableEditMenuProvider } from './Buttons/Table/RichTextTableContextMenu';\nimport CopyPastePlugin from './Plugins/CopyPastePlugin';\n\n/**\n * Props for {@link RichTextEditor}.\n *\n * @private\n */\nexport interface RichTextEditorStyleProps {\n minHeight: string;\n maxHeight: string;\n}\n\n/**\n * Props for {@link RichTextEditor}.\n *\n * @private\n */\nexport interface RichTextEditorProps {\n initialContent?: string;\n onChange: (newValue?: string) => void;\n onKeyDown?: (ev: React.KeyboardEvent<HTMLElement>) => void;\n placeholderText?: string;\n strings: Partial<RichTextSendBoxStrings>;\n showRichTextEditorFormatting: boolean;\n styles: RichTextEditorStyleProps;\n}\n\n/**\n * Props for {@link RichTextEditor}.\n *\n * @beta\n */\nexport interface RichTextEditorComponentRef {\n focus: () => void;\n setEmptyContent: () => void;\n}\n\n/**\n * A component to wrap RoosterJS Rich Text Editor.\n *\n * @beta\n */\nexport const RichTextEditor = React.forwardRef<RichTextEditorComponentRef, RichTextEditorProps>((props, ref) => {\n const { initialContent, onChange, placeholderText, strings, showRichTextEditorFormatting } = props;\n const editor = useRef<IEditor | null>(null);\n const theme = useTheme();\n useImperativeHandle(\n ref,\n () => {\n return {\n focus() {\n if (editor.current) {\n editor.current.focus();\n }\n },\n setEmptyContent() {\n if (editor.current) {\n editor.current.setContent('');\n }\n }\n };\n },\n []\n );\n\n const ribbonPlugin = React.useMemo(() => {\n return createRibbonPlugin();\n }, []);\n\n const editorCreator = useCallback(\n (div: HTMLDivElement, options: EditorOptions) => {\n editor.current = new Editor(div, options);\n return editor.current;\n },\n // trigger force editor reset when strings are changed to update context menu strings\n // see RosterJS documentation for 'editorCreator' for more details\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [strings]\n );\n\n const placeholderPlugin = React.useMemo(() => {\n return new Watermark('');\n }, []);\n\n useEffect(() => {\n if (placeholderText !== undefined) {\n placeholderPlugin.updateWatermark(placeholderText);\n }\n }, [placeholderPlugin, placeholderText]);\n\n const plugins = useMemo(() => {\n // contextPlugin and tableEditMenuProvider allow to show insert/delete menu for the table\n const contextPlugin = createContextMenuPlugin();\n const tableEditMenuProvider = createTableEditMenuProvider(strings);\n const contentEdit = new ContentEdit();\n const updateContentPlugin = createUpdateContentPlugin(\n UpdateMode.OnContentChangedEvent | UpdateMode.OnUserInput,\n (content: string) => {\n onChange && onChange(content);\n }\n );\n const copyPastePlugin = new CopyPastePlugin();\n return [\n contentEdit,\n placeholderPlugin,\n updateContentPlugin,\n ribbonPlugin,\n contextPlugin,\n tableEditMenuProvider,\n copyPastePlugin\n ];\n }, [onChange, placeholderPlugin, ribbonPlugin, strings]);\n\n const ribbon = useMemo(() => {\n const buttons = ribbonButtons(theme);\n\n return (\n <Ribbon\n styles={ribbonStyle}\n buttons={buttons}\n plugin={ribbonPlugin}\n overflowButtonProps={{\n styles: ribbonButtonStyle(theme),\n menuProps: {\n items: [], // CommandBar will determine items rendered in overflow\n isBeakVisible: false,\n styles: ribbonOverflowButtonStyle(theme)\n }\n }}\n strings={ribbonButtonsStrings(strings)}\n data-testid={'rich-text-editor-ribbon'}\n />\n );\n }, [strings, ribbonPlugin, theme]);\n\n const defaultFormat: DefaultFormat = useMemo(() => {\n // without setting any styles, text input is not handled properly for tables (when insert or paste one in the editor)\n // because of https://github.com/microsoft/roosterjs/blob/14dbb947e3ae94580109cbd05e48ceb05327c4dc/packages/roosterjs-editor-core/lib/corePlugins/TypeInContainerPlugin.ts#L75\n // this issue is fixed for content model package\n return {\n backgroundColor: 'transparent'\n };\n }, []);\n\n return (\n <div data-testid={'rich-text-editor-wrapper'}>\n {showRichTextEditorFormatting && ribbon}\n <div className={richTextEditorWrapperStyle(theme, !showRichTextEditorFormatting)}>\n <Rooster\n defaultFormat={defaultFormat}\n initialContent={initialContent}\n inDarkMode={isDarkThemed(theme)}\n plugins={plugins}\n className={richTextEditorStyle(props.styles)}\n editorCreator={editorCreator}\n // TODO: confirm the color during inline images implementation\n imageSelectionBorderColor={'blue'}\n // doNotAdjustEditorColor is used to fix the default background color for Rooster component\n doNotAdjustEditorColor={true}\n data-testid={'rooster-rich-text-editor'}\n // if we don't use 'allowKeyboardEventPropagation' only the enter key is caught\n onKeyDown={props.onKeyDown}\n />\n </div>\n </div>\n );\n});\n"]}
@@ -57,7 +57,8 @@ export const ParticipantVideoTileOverlay = React.memo((props) => {
57
57
  display: 'flex',
58
58
  justifyContent: 'center',
59
59
  alignItems: 'center',
60
- backgroundColor: canRenderReaction ? 'rgba(0, 0, 0, 0.5)' : 'transparent'
60
+ backgroundColor: canRenderReaction ? 'rgba(0, 0, 0, 0.5)' : 'transparent',
61
+ borderRadius: '0.25rem'
61
62
  }) },
62
63
  React.createElement("div", { style: { height: '33.33%' } }),
63
64
  canRenderReaction && isValidImageSource && (React.createElement("div", { style: {
@@ -1 +1 @@
1
- {"version":3,"file":"ParticipantVideoTileOverlay.js","sourceRoot":"","sources":["../../../../../../../react-components/src/components/VideoGallery/ParticipantVideoTileOverlay.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,2CAA2C;AAC3C,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAGhE,2CAA2C;AAC3C,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAC1G,2CAA2C;AAC3C,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACrD,2CAA2C;AAC3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AE;YAC3C,OAAO,EAAE,MAAM;YACf,cAAc,EAAE,QAAQ;YACxB,UAAU,EAAE,QAAQ;YACpB,eAAe,EAAE,iBAAiB,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC,aAAa;SAC1E,CAAC;QAEF,6BAAK,KAAK,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAQ;QACvC,iBAAiB,IAAI,kBAAkB,IAAI,CAC1C,6BACE,KAAK,EAAE;gBACL,SAAS,EAAE,GAAG,SAAS,IAAI;gBAC3B,MAAM,EAAE,GAAG,SAAS,IAAI;gBACxB,KAAK,EAAE,GAAG,SAAS,IAAI;aACxB;YAED,6BAAK,SAAS,EAAE,uBAAuB,EAAE,GAAI,CACzC,CACP,CACK,CACT,CAAC;AACJ,CAAC,CACF,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/* @conditional-compile-remove(reaction) */\nimport React, { useCallback, useEffect, useState } from 'react';\n/* @conditional-compile-remove(reaction) */\nimport { Reaction, ReactionResources } from '../../types';\n/* @conditional-compile-remove(reaction) */\nimport { getEmojiFrameCount, getEmojiFrameSize, getEmojiResource } from './utils/videoGalleryLayoutUtils';\n/* @conditional-compile-remove(reaction) */\nimport { Stack, mergeStyles } from '@fluentui/react';\n/* @conditional-compile-remove(reaction) */\nimport { reactionRenderingStyle, videoContainerStyles } from '../styles/VideoTile.styles';\n/* @conditional-compile-remove(reaction) */\nimport {\n REACTION_DEFAULT_RESOURCE_FRAME_SIZE_PX,\n REACTION_NUMBER_OF_ANIMATION_FRAMES,\n REACTION_SCREEN_SHARE_ANIMATION_TIME_MS,\n REACTION_START_DISPLAY_SIZE,\n getReceivedUnixTime\n} from './utils/reactionUtils';\n\n/* @conditional-compile-remove(reaction) */\n/**\n * Reaction overlay component for Grid\n *\n * Can be used with {@link MeetingReactionOverlay}.\n *\n * @internal\n */\nexport const ParticipantVideoTileOverlay = React.memo(\n (props: { reaction?: Reaction; reactionResources: ReactionResources; emojiSize?: number }) => {\n const { reaction, reactionResources, emojiSize = REACTION_START_DISPLAY_SIZE } = props;\n const [isValidImageSource, setIsValidImageSource] = useState<boolean>(false);\n\n const backgroundImageUrl =\n reaction !== undefined && reactionResources !== undefined\n ? getEmojiResource(reaction?.reactionType, reactionResources)\n : undefined;\n\n const frameCount =\n reaction !== undefined && reactionResources !== undefined\n ? getEmojiFrameCount(reaction?.reactionType, reactionResources)\n : undefined;\n\n const frameSize =\n reaction !== undefined && reactionResources !== undefined\n ? getEmojiFrameSize(reaction?.reactionType, reactionResources)\n : undefined;\n\n const currentUnixTimeStamp = Date.now();\n const receivedUnixTimestamp = reaction ? getReceivedUnixTime(reaction.receivedOn) : undefined;\n const canRenderReaction =\n (receivedUnixTimestamp\n ? currentUnixTimeStamp - receivedUnixTimestamp < REACTION_SCREEN_SHARE_ANIMATION_TIME_MS\n : false) && backgroundImageUrl !== undefined;\n\n useEffect(() => {\n if (!backgroundImageUrl || backgroundImageUrl.length === 0) {\n return;\n }\n\n fetch(`${backgroundImageUrl}`)\n .then((res) => {\n setIsValidImageSource(res.ok);\n })\n .catch((warning) => console.warn(`Sprite image for animation rendering failed with warning: ${warning}`));\n\n return () => setIsValidImageSource(false);\n }, [backgroundImageUrl]);\n\n const spriteImageUrl = backgroundImageUrl ?? undefined;\n const reactionContainerStyles = useCallback(\n () =>\n reactionRenderingStyle({\n spriteImageUrl: spriteImageUrl ?? '',\n emojiSize: emojiSize,\n frameCount: frameCount ?? REACTION_NUMBER_OF_ANIMATION_FRAMES,\n rawFrameSize: frameSize ?? REACTION_DEFAULT_RESOURCE_FRAME_SIZE_PX\n }),\n [spriteImageUrl, emojiSize, frameCount, frameSize]\n );\n\n return (\n <Stack\n className={mergeStyles(videoContainerStyles, {\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n backgroundColor: canRenderReaction ? 'rgba(0, 0, 0, 0.5)' : 'transparent'\n })}\n >\n <div style={{ height: '33.33%' }}></div>\n {canRenderReaction && isValidImageSource && (\n <div\n style={{\n minHeight: `${emojiSize}px`,\n height: `${emojiSize}px`,\n width: `${emojiSize}px`\n }}\n >\n <div className={reactionContainerStyles()} />\n </div>\n )}\n </Stack>\n );\n }\n);\n"]}
1
+ {"version":3,"file":"ParticipantVideoTileOverlay.js","sourceRoot":"","sources":["../../../../../../../react-components/src/components/VideoGallery/ParticipantVideoTileOverlay.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,2CAA2C;AAC3C,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAGhE,2CAA2C;AAC3C,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAC1G,2CAA2C;AAC3C,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACrD,2CAA2C;AAC3C,OAAO,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAC1F,2CAA2C;AAC3C,OAAO,EACL,uCAAuC,EACvC,mCAAmC,EACnC,uCAAuC,EACvC,2BAA2B,EAC3B,mBAAmB,EACpB,MAAM,uBAAuB,CAAC;AAE/B,2CAA2C;AAC3C;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG,KAAK,CAAC,IAAI,CACnD,CAAC,KAAwF,EAAE,EAAE;IAC3F,MAAM,EAAE,QAAQ,EAAE,iBAAiB,EAAE,SAAS,GAAG,2BAA2B,EAAE,GAAG,KAAK,CAAC;IACvF,MAAM,CAAC,kBAAkB,EAAE,qBAAqB,CAAC,GAAG,QAAQ,CAAU,KAAK,CAAC,CAAC;IAE7E,MAAM,kBAAkB,GACtB,QAAQ,KAAK,SAAS,IAAI,iBAAiB,KAAK,SAAS;QACvD,CAAC,CAAC,gBAAgB,CAAC,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,YAA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AAC,KAAK,CAAC,CAAC;IAC5C,CAAC,EAAE,CAAC,kBAAkB,CAAC,CAAC,CAAC;IAEzB,MAAM,cAAc,GAAG,kBAAkB,aAAlB,kBAAkB,cAAlB,kBAAkB,GAAI,SAAS,CAAC;IACvD,MAAM,uBAAuB,GAAG,WAAW,CACzC,GAAG,EAAE,CACH,sBAAsB,CAAC;QACrB,cAAc,EAAE,cAAc,aAAd,cAAc,cAAd,cAAc,GAAI,EAAE;QACpC,SAAS,EAAE,SAAS;QACpB,UAAU,EAAE,UAAU,aAAV,UAAU,cAAV,UAAU,GAAI,mCAAmC;QAC7D,YAAY,EAAE,SAAS,aAAT,SAAS,cAAT,SAAS,GAAI,uCAAuC;KACnE,CAAC,EACJ,CAAC,cAAc,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,CAAC,CACnD,CAAC;IAEF,OAAO,CACL,oBAAC,KAAK,IACJ,SAAS,EAAE,WAAW,CAAC,oBAAoB,EAAE;YAC3C,OAAO,EAAE,MAAM;YACf,cAAc,EAAE,QAAQ;YACxB,UAAU,EAAE,QAAQ;YACpB,eAAe,EAAE,iBAAiB,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC,aAAa;YACzE,YAAY,EAAE,SAAS;SACxB,CAAC;QAEF,6BAAK,KAAK,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAQ;QACvC,iBAAiB,IAAI,kBAAkB,IAAI,CAC1C,6BACE,KAAK,EAAE;gBACL,SAAS,EAAE,GAAG,SAAS,IAAI;gBAC3B,MAAM,EAAE,GAAG,SAAS,IAAI;gBACxB,KAAK,EAAE,GAAG,SAAS,IAAI;aACxB;YAED,6BAAK,SAAS,EAAE,uBAAuB,EAAE,GAAI,CACzC,CACP,CACK,CACT,CAAC;AACJ,CAAC,CACF,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/* @conditional-compile-remove(reaction) */\nimport React, { useCallback, useEffect, useState } from 'react';\n/* @conditional-compile-remove(reaction) */\nimport { Reaction, ReactionResources } from '../../types';\n/* @conditional-compile-remove(reaction) */\nimport { getEmojiFrameCount, getEmojiFrameSize, getEmojiResource } from './utils/videoGalleryLayoutUtils';\n/* @conditional-compile-remove(reaction) */\nimport { Stack, mergeStyles } from '@fluentui/react';\n/* @conditional-compile-remove(reaction) */\nimport { reactionRenderingStyle, videoContainerStyles } from '../styles/VideoTile.styles';\n/* @conditional-compile-remove(reaction) */\nimport {\n REACTION_DEFAULT_RESOURCE_FRAME_SIZE_PX,\n REACTION_NUMBER_OF_ANIMATION_FRAMES,\n REACTION_SCREEN_SHARE_ANIMATION_TIME_MS,\n REACTION_START_DISPLAY_SIZE,\n getReceivedUnixTime\n} from './utils/reactionUtils';\n\n/* @conditional-compile-remove(reaction) */\n/**\n * Reaction overlay component for Grid\n *\n * Can be used with {@link MeetingReactionOverlay}.\n *\n * @internal\n */\nexport const ParticipantVideoTileOverlay = React.memo(\n (props: { reaction?: Reaction; reactionResources: ReactionResources; emojiSize?: number }) => {\n const { reaction, reactionResources, emojiSize = REACTION_START_DISPLAY_SIZE } = props;\n const [isValidImageSource, setIsValidImageSource] = useState<boolean>(false);\n\n const backgroundImageUrl =\n reaction !== undefined && reactionResources !== undefined\n ? getEmojiResource(reaction?.reactionType, reactionResources)\n : undefined;\n\n const frameCount =\n reaction !== undefined && reactionResources !== undefined\n ? getEmojiFrameCount(reaction?.reactionType, reactionResources)\n : undefined;\n\n const frameSize =\n reaction !== undefined && reactionResources !== undefined\n ? getEmojiFrameSize(reaction?.reactionType, reactionResources)\n : undefined;\n\n const currentUnixTimeStamp = Date.now();\n const receivedUnixTimestamp = reaction ? getReceivedUnixTime(reaction.receivedOn) : undefined;\n const canRenderReaction =\n (receivedUnixTimestamp\n ? currentUnixTimeStamp - receivedUnixTimestamp < REACTION_SCREEN_SHARE_ANIMATION_TIME_MS\n : false) && backgroundImageUrl !== undefined;\n\n useEffect(() => {\n if (!backgroundImageUrl || backgroundImageUrl.length === 0) {\n return;\n }\n\n fetch(`${backgroundImageUrl}`)\n .then((res) => {\n setIsValidImageSource(res.ok);\n })\n .catch((warning) => console.warn(`Sprite image for animation rendering failed with warning: ${warning}`));\n\n return () => setIsValidImageSource(false);\n }, [backgroundImageUrl]);\n\n const spriteImageUrl = backgroundImageUrl ?? undefined;\n const reactionContainerStyles = useCallback(\n () =>\n reactionRenderingStyle({\n spriteImageUrl: spriteImageUrl ?? '',\n emojiSize: emojiSize,\n frameCount: frameCount ?? REACTION_NUMBER_OF_ANIMATION_FRAMES,\n rawFrameSize: frameSize ?? REACTION_DEFAULT_RESOURCE_FRAME_SIZE_PX\n }),\n [spriteImageUrl, emojiSize, frameCount, frameSize]\n );\n\n return (\n <Stack\n className={mergeStyles(videoContainerStyles, {\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n backgroundColor: canRenderReaction ? 'rgba(0, 0, 0, 0.5)' : 'transparent',\n borderRadius: '0.25rem'\n })}\n >\n <div style={{ height: '33.33%' }}></div>\n {canRenderReaction && isValidImageSource && (\n <div\n style={{\n minHeight: `${emojiSize}px`,\n height: `${emojiSize}px`,\n width: `${emojiSize}px`\n }}\n >\n <div className={reactionContainerStyles()} />\n </div>\n )}\n </Stack>\n );\n }\n);\n"]}
@@ -117,10 +117,10 @@ export const RemoteContentShareReactionOverlay = React.memo((props) => {
117
117
  }
118
118
  return canRender;
119
119
  };
120
- const containerHeight = hostDivHeight !== null && hostDivHeight !== void 0 ? hostDivHeight : 0;
121
- const containerWidth = hostDivWidth !== null && hostDivWidth !== void 0 ? hostDivWidth : 0;
122
120
  const styleBucket = () => getReactionStyleBucket();
123
121
  const displaySizePx = () => REACTION_START_DISPLAY_SIZE * styleBucket().sizeScale;
122
+ const containerHeight = hostDivHeight !== null && hostDivHeight !== void 0 ? hostDivHeight : 0;
123
+ const containerWidth = (hostDivWidth !== null && hostDivWidth !== void 0 ? hostDivWidth : 0) - displaySizePx();
124
124
  const leftPosition = (position) => generateStartPositionWave(position, containerWidth / 2, true);
125
125
  const reactionMovementStyle = (position) => getReactionMovementStyle(leftPosition(position));
126
126
  return (React.createElement(Stack, { className: mergeStyles(videoContainerStyles, {
@@ -1 +1 @@
1
- {"version":3,"file":"RemoteContentShareReactionOverlay.js","sourceRoot":"","sources":["../../../../../../../react-components/src/components/VideoGallery/RemoteContentShareReactionOverlay.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,2CAA2C;AAC3C,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAGjF,2CAA2C;AAC3C,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACrD,2CAA2C;AAC3C,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAClE,2CAA2C;AAC3C,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACnE,2CAA2C;AAC3C,OAAO,EAEL,yBAAyB,EACzB,wBAAwB,EACxB,sBAAsB,EACtB,mBAAmB,EACnB,sBAAsB,EACtB,oBAAoB,EACpB,qBAAqB,EACtB,MAAM,iCAAiC,CAAC;AACzC,2CAA2C;AAC3C,OAAO,EACL,mCAAmC,EACnC,uCAAuC,EACvC,2BAA2B,EAC3B,cAAc,EACd,mBAAmB,EACpB,MAAM,uBAAuB,CAAC;AAgB/B,2CAA2C;AAC3C,MAAM,oBAAoB,GAAG,EAAE,CAAC;AAChC,2CAA2C;AAC3C,MAAM,qBAAqB,GAAG,CAAC,CAAC;AAChC,2CAA2C;AAC3C,MAAM,4BAA4B,GAAG,EAAE,CAAC;AAExC,2CAA2C;AAC3C;;;GAGG;AACH,MAAM,CAAC,MAAM,iCAAiC,GAAG,KAAK,CAAC,IAAI,CACzD,CAAC,KAMA,EAAE,EAAE;IACH,MAAM,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,aA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,EAAE,QAAQ,CAAC,EAAE,EAAE,QAAQ,CAAC,qBAAqB,CAAC,IAAI;YACpF,sFAAsF;YACtF,mFAAmF;YACnF,qGAAqG;YACrG,sGAAsG;YACtG,uGAAuG;YACvG,6BACE,KAAK,EAAE,mBAAmB,CACxB,eAAe,GAAG,CAAC,EAAE,oEAAoE;gBACzF,CAAC,eAAe,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,QAAQ,CAAC,WAAW,CAAC,cAAc,CAAC,CAClE;gBAED,6BACE,cAAc,EAAE,GAAG,EAAE;wBACnB,qBAAqB,CACnB,QAAQ,CAAC,QAAQ,CAAC,YAAY,EAC9B,QAAQ,CAAC,EAAE,EACX,QAAQ,CAAC,qBAAqB,CAC/B,CAAC;oBACJ,CAAC,EACD,KAAK,EAAE,sBAAsB,CAAC,QAAQ,CAAC,WAAW,CAAC,UAAU,CAAC;oBAE9D,6BAAK,KAAK,EAAE,qBAAqB,CAAC,QAAQ,CAAC,qBAAqB,CAAC;wBAC/D,6BACE,KAAK,EAAE,qBAAqB,CAC1B,mCAAmC,EACnC,aAAa,EAAE,EACf,MAAA,gBAAgB,CAAC,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,QAAQ,CAAC,YAAY,EAAE,iBAAiB,CAAC,mCAAI,EAAE,CAC3E,GACD,CACE,CACF,CACF,CACP,CACG,CACF,CACP,CAAA;KAAA,CAAC,CACI,CACT,CAAC;AACJ,CAAC,CACF,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/* @conditional-compile-remove(reaction) */\nimport React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';\n/* @conditional-compile-remove(reaction) */\nimport { Reaction, ReactionResources, VideoGalleryLocalParticipant, VideoGalleryRemoteParticipant } from '../../types';\n/* @conditional-compile-remove(reaction) */\nimport { Stack, mergeStyles } from '@fluentui/react';\n/* @conditional-compile-remove(reaction) */\nimport { videoContainerStyles } from '../styles/VideoTile.styles';\n/* @conditional-compile-remove(reaction) */\nimport { getEmojiResource } from './utils/videoGalleryLayoutUtils';\n/* @conditional-compile-remove(reaction) */\nimport {\n IReactionStyleBucket,\n generateStartPositionWave,\n getReactionMovementStyle,\n getReactionStyleBucket,\n moveAnimationStyles,\n opacityAnimationStyles,\n reactionOverlayStyle,\n spriteAnimationStyles\n} from '../styles/ReactionOverlay.style';\n/* @conditional-compile-remove(reaction) */\nimport {\n REACTION_NUMBER_OF_ANIMATION_FRAMES,\n REACTION_SCREEN_SHARE_ANIMATION_TIME_MS,\n REACTION_START_DISPLAY_SIZE,\n getCombinedKey,\n getReceivedUnixTime\n} from './utils/reactionUtils';\n\n/* @conditional-compile-remove(reaction) */\ntype VisibleReaction = {\n reaction: Reaction;\n id: string;\n reactionMovementIndex: number;\n styleBucket: IReactionStyleBucket;\n};\n\n/* @conditional-compile-remove(reaction) */\ntype ReceivedReaction = {\n id: string;\n status: 'animating' | 'completedAnimating' | 'ignored';\n};\n\n/* @conditional-compile-remove(reaction) */\nconst MAX_NUMBER_OF_EMOJIS = 50;\n/* @conditional-compile-remove(reaction) */\nconst NUMBER_OF_EMOJI_TYPES = 5;\n/* @conditional-compile-remove(reaction) */\nconst REACTION_POSITION_ARRAY_SIZE = 55;\n\n/* @conditional-compile-remove(reaction) */\n/**\n * The overlay responsible for rendering multiple reactions all at once in presentation mode\n * @internal\n */\nexport const RemoteContentShareReactionOverlay = React.memo(\n (props: {\n reactionResources: ReactionResources;\n localParticipant?: VideoGalleryLocalParticipant;\n remoteParticipants?: VideoGalleryRemoteParticipant[];\n hostDivHeight?: number;\n hostDivWidth?: number;\n }) => {\n const { reactionResources, localParticipant, remoteParticipants, hostDivHeight, hostDivWidth } = props;\n\n // Reactions that are currently being animated\n const [visibleReactions, setVisibleReactions] = useState<VisibleReaction[]>([]);\n\n // Dictionary of userId to a reaction status. This is used to track the latest received reaction\n // per user to avoid animating the same reaction multiple times and to limit the number of\n // active reactions of a certain type.\n const latestReceivedReaction = useRef<Record<string, ReceivedReaction>>({});\n\n // Track the number of active reactions of each type to limit the number of active reactions\n // of a certain type.\n const activeTypeCount = useRef<Record<string, number>>({\n like: 0,\n heart: 0,\n laugh: 0,\n applause: 0,\n surprised: 0\n });\n\n // Used to track the total number of reactions ever played. This is a helper variable\n // to calculate the reaction movement index (i.e. the .left position of the reaction)\n const visibleReactionPosition = useRef<boolean[]>(new Array<boolean>(REACTION_POSITION_ARRAY_SIZE).fill(false));\n\n const remoteParticipantReactions: Reaction[] = useMemo(\n () =>\n remoteParticipants\n ?.map((remoteParticipant) => remoteParticipant.reaction)\n .filter((reaction): reaction is Reaction => !!reaction) ?? [],\n [remoteParticipants]\n );\n\n const findFirstEmptyPosition = (): number => {\n return visibleReactionPosition.current.findIndex((item) => item === false);\n };\n\n const updateVisibleReactions = useCallback(\n (reaction: Reaction, userId: string): void => {\n const combinedKey = getCombinedKey(userId, reaction.reactionType, reaction.receivedOn);\n\n const alreadyHandled = latestReceivedReaction.current[userId]?.id === combinedKey;\n if (alreadyHandled) {\n return;\n }\n\n const activeCount = activeTypeCount.current[reaction.reactionType];\n\n if (activeCount >= MAX_NUMBER_OF_EMOJIS / NUMBER_OF_EMOJI_TYPES) {\n latestReceivedReaction.current[userId] = {\n id: combinedKey,\n status: 'ignored'\n };\n return;\n }\n\n activeTypeCount.current[reaction.reactionType] += 1;\n latestReceivedReaction.current[userId] = {\n id: combinedKey,\n status: 'animating'\n };\n const reactionMovementIndex = findFirstEmptyPosition();\n visibleReactionPosition.current[reactionMovementIndex] = true;\n setVisibleReactions([\n ...visibleReactions,\n {\n reaction: reaction,\n id: combinedKey,\n reactionMovementIndex: reactionMovementIndex,\n styleBucket: getReactionStyleBucket()\n }\n ]);\n return;\n },\n [activeTypeCount, visibleReactions]\n );\n\n const removeVisibleReaction = (reactionType: string, id: string, index: number): void => {\n setVisibleReactions(visibleReactions.filter((reaction) => reaction.id !== id));\n visibleReactionPosition.current[index] = false;\n activeTypeCount.current[reactionType] -= 1;\n Object.entries(latestReceivedReaction.current).forEach(([userId, reaction]) => {\n if (reaction.id === id) {\n latestReceivedReaction.current[userId].status = 'completedAnimating';\n }\n });\n };\n\n // Update visible reactions when local participant sends a reaction\n useEffect(() => {\n if (localParticipant?.reaction) {\n updateVisibleReactions(localParticipant.reaction, localParticipant.userId);\n }\n }, [localParticipant, updateVisibleReactions]);\n\n // Update visible reactions when remote participants send a reaction\n useEffect(() => {\n remoteParticipants?.map((participant) => {\n if (participant?.reaction) {\n updateVisibleReactions(participant.reaction, participant.userId);\n }\n });\n }, [remoteParticipantReactions, remoteParticipants, updateVisibleReactions]);\n\n // Note: canRenderReaction shouldn't be needed as we remove the animation on the onAnimationEnd event\n const canRenderReaction = (reaction: Reaction, id: string, movementIndex: number): boolean => {\n // compare current time to reaction.received at and see if more than 4 seconds has elapsed\n const canRender = Date.now() - getReceivedUnixTime(reaction.receivedOn) < REACTION_SCREEN_SHARE_ANIMATION_TIME_MS;\n\n // Clean up the reaction if it's not in the visible reaction list\n if (!canRender) {\n removeVisibleReaction(reaction?.reactionType, id, movementIndex);\n }\n\n return canRender;\n };\n\n const containerHeight = hostDivHeight ?? 0;\n const containerWidth = hostDivWidth ?? 0;\n\n const styleBucket = (): IReactionStyleBucket => getReactionStyleBucket();\n const displaySizePx = (): number => REACTION_START_DISPLAY_SIZE * styleBucket().sizeScale;\n\n const leftPosition = (position: number): number => generateStartPositionWave(position, containerWidth / 2, true);\n const reactionMovementStyle = (position: number): React.CSSProperties =>\n getReactionMovementStyle(leftPosition(position));\n\n return (\n <Stack\n className={mergeStyles(videoContainerStyles, {\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n backgroundColor: 'transparent'\n })}\n >\n {visibleReactions.map((reaction) => (\n <div key={reaction.id} style={reactionOverlayStyle}>\n <div className=\"reaction-item\">\n {canRenderReaction(reaction.reaction, reaction.id, reaction.reactionMovementIndex) && (\n // First div - Section that fixes the travel height and applies the movement animation\n // Second div - Keeps track of active sprites and responsible for marking, counting\n // and removing reactions. Responsible for opacity controls as the sprite emoji animates\n // Third div - Responsible for calculating the point of X axis where the reaction will start animation\n // Fourth div - Play Animation as the other animation applies on the base play animation for the sprite\n <div\n style={moveAnimationStyles(\n containerHeight / 2, // dividing by two because reactionOverlayStyle height is set to 50%\n (containerHeight / 2) * (1 - reaction.styleBucket.heightMaxScale)\n )}\n >\n <div\n onAnimationEnd={() => {\n removeVisibleReaction(\n reaction.reaction.reactionType,\n reaction.id,\n reaction.reactionMovementIndex\n );\n }}\n style={opacityAnimationStyles(reaction.styleBucket.opacityMax)}\n >\n <div style={reactionMovementStyle(reaction.reactionMovementIndex)}>\n <div\n style={spriteAnimationStyles(\n REACTION_NUMBER_OF_ANIMATION_FRAMES,\n displaySizePx(),\n getEmojiResource(reaction?.reaction.reactionType, reactionResources) ?? ''\n )}\n />\n </div>\n </div>\n </div>\n )}\n </div>\n </div>\n ))}\n </Stack>\n );\n }\n);\n"]}
1
+ {"version":3,"file":"RemoteContentShareReactionOverlay.js","sourceRoot":"","sources":["../../../../../../../react-components/src/components/VideoGallery/RemoteContentShareReactionOverlay.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,2CAA2C;AAC3C,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAGjF,2CAA2C;AAC3C,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACrD,2CAA2C;AAC3C,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAClE,2CAA2C;AAC3C,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACnE,2CAA2C;AAC3C,OAAO,EAEL,yBAAyB,EACzB,wBAAwB,EACxB,sBAAsB,EACtB,mBAAmB,EACnB,sBAAsB,EACtB,oBAAoB,EACpB,qBAAqB,EACtB,MAAM,iCAAiC,CAAC;AACzC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R,QAAQ,CAAE,QAAQ,CAAC,YAAY,EAAE,iBAAiB,CAAC,mCAAI,EAAE,CAC3E,GACD,CACE,CACF,CACF,CACP,CACG,CACF,CACP,CAAA;KAAA,CAAC,CACI,CACT,CAAC;AACJ,CAAC,CACF,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/* @conditional-compile-remove(reaction) */\nimport React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';\n/* @conditional-compile-remove(reaction) */\nimport { Reaction, ReactionResources, VideoGalleryLocalParticipant, VideoGalleryRemoteParticipant } from '../../types';\n/* @conditional-compile-remove(reaction) */\nimport { Stack, mergeStyles } from '@fluentui/react';\n/* @conditional-compile-remove(reaction) */\nimport { videoContainerStyles } from '../styles/VideoTile.styles';\n/* @conditional-compile-remove(reaction) */\nimport { getEmojiResource } from './utils/videoGalleryLayoutUtils';\n/* @conditional-compile-remove(reaction) */\nimport {\n IReactionStyleBucket,\n generateStartPositionWave,\n getReactionMovementStyle,\n getReactionStyleBucket,\n moveAnimationStyles,\n opacityAnimationStyles,\n reactionOverlayStyle,\n spriteAnimationStyles\n} from '../styles/ReactionOverlay.style';\n/* @conditional-compile-remove(reaction) */\nimport {\n REACTION_NUMBER_OF_ANIMATION_FRAMES,\n REACTION_SCREEN_SHARE_ANIMATION_TIME_MS,\n REACTION_START_DISPLAY_SIZE,\n getCombinedKey,\n getReceivedUnixTime\n} from './utils/reactionUtils';\n\n/* @conditional-compile-remove(reaction) */\ntype VisibleReaction = {\n reaction: Reaction;\n id: string;\n reactionMovementIndex: number;\n styleBucket: IReactionStyleBucket;\n};\n\n/* @conditional-compile-remove(reaction) */\ntype ReceivedReaction = {\n id: string;\n status: 'animating' | 'completedAnimating' | 'ignored';\n};\n\n/* @conditional-compile-remove(reaction) */\nconst MAX_NUMBER_OF_EMOJIS = 50;\n/* @conditional-compile-remove(reaction) */\nconst NUMBER_OF_EMOJI_TYPES = 5;\n/* @conditional-compile-remove(reaction) */\nconst REACTION_POSITION_ARRAY_SIZE = 55;\n\n/* @conditional-compile-remove(reaction) */\n/**\n * The overlay responsible for rendering multiple reactions all at once in presentation mode\n * @internal\n */\nexport const RemoteContentShareReactionOverlay = React.memo(\n (props: {\n reactionResources: ReactionResources;\n localParticipant?: VideoGalleryLocalParticipant;\n remoteParticipants?: VideoGalleryRemoteParticipant[];\n hostDivHeight?: number;\n hostDivWidth?: number;\n }) => {\n const { reactionResources, localParticipant, remoteParticipants, hostDivHeight, hostDivWidth } = props;\n\n // Reactions that are currently being animated\n const [visibleReactions, setVisibleReactions] = useState<VisibleReaction[]>([]);\n\n // Dictionary of userId to a reaction status. This is used to track the latest received reaction\n // per user to avoid animating the same reaction multiple times and to limit the number of\n // active reactions of a certain type.\n const latestReceivedReaction = useRef<Record<string, ReceivedReaction>>({});\n\n // Track the number of active reactions of each type to limit the number of active reactions\n // of a certain type.\n const activeTypeCount = useRef<Record<string, number>>({\n like: 0,\n heart: 0,\n laugh: 0,\n applause: 0,\n surprised: 0\n });\n\n // Used to track the total number of reactions ever played. This is a helper variable\n // to calculate the reaction movement index (i.e. the .left position of the reaction)\n const visibleReactionPosition = useRef<boolean[]>(new Array<boolean>(REACTION_POSITION_ARRAY_SIZE).fill(false));\n\n const remoteParticipantReactions: Reaction[] = useMemo(\n () =>\n remoteParticipants\n ?.map((remoteParticipant) => remoteParticipant.reaction)\n .filter((reaction): reaction is Reaction => !!reaction) ?? [],\n [remoteParticipants]\n );\n\n const findFirstEmptyPosition = (): number => {\n return visibleReactionPosition.current.findIndex((item) => item === false);\n };\n\n const updateVisibleReactions = useCallback(\n (reaction: Reaction, userId: string): void => {\n const combinedKey = getCombinedKey(userId, reaction.reactionType, reaction.receivedOn);\n\n const alreadyHandled = latestReceivedReaction.current[userId]?.id === combinedKey;\n if (alreadyHandled) {\n return;\n }\n\n const activeCount = activeTypeCount.current[reaction.reactionType];\n\n if (activeCount >= MAX_NUMBER_OF_EMOJIS / NUMBER_OF_EMOJI_TYPES) {\n latestReceivedReaction.current[userId] = {\n id: combinedKey,\n status: 'ignored'\n };\n return;\n }\n\n activeTypeCount.current[reaction.reactionType] += 1;\n latestReceivedReaction.current[userId] = {\n id: combinedKey,\n status: 'animating'\n };\n const reactionMovementIndex = findFirstEmptyPosition();\n visibleReactionPosition.current[reactionMovementIndex] = true;\n setVisibleReactions([\n ...visibleReactions,\n {\n reaction: reaction,\n id: combinedKey,\n reactionMovementIndex: reactionMovementIndex,\n styleBucket: getReactionStyleBucket()\n }\n ]);\n return;\n },\n [activeTypeCount, visibleReactions]\n );\n\n const removeVisibleReaction = (reactionType: string, id: string, index: number): void => {\n setVisibleReactions(visibleReactions.filter((reaction) => reaction.id !== id));\n visibleReactionPosition.current[index] = false;\n activeTypeCount.current[reactionType] -= 1;\n Object.entries(latestReceivedReaction.current).forEach(([userId, reaction]) => {\n if (reaction.id === id) {\n latestReceivedReaction.current[userId].status = 'completedAnimating';\n }\n });\n };\n\n // Update visible reactions when local participant sends a reaction\n useEffect(() => {\n if (localParticipant?.reaction) {\n updateVisibleReactions(localParticipant.reaction, localParticipant.userId);\n }\n }, [localParticipant, updateVisibleReactions]);\n\n // Update visible reactions when remote participants send a reaction\n useEffect(() => {\n remoteParticipants?.map((participant) => {\n if (participant?.reaction) {\n updateVisibleReactions(participant.reaction, participant.userId);\n }\n });\n }, [remoteParticipantReactions, remoteParticipants, updateVisibleReactions]);\n\n // Note: canRenderReaction shouldn't be needed as we remove the animation on the onAnimationEnd event\n const canRenderReaction = (reaction: Reaction, id: string, movementIndex: number): boolean => {\n // compare current time to reaction.received at and see if more than 4 seconds has elapsed\n const canRender = Date.now() - getReceivedUnixTime(reaction.receivedOn) < REACTION_SCREEN_SHARE_ANIMATION_TIME_MS;\n\n // Clean up the reaction if it's not in the visible reaction list\n if (!canRender) {\n removeVisibleReaction(reaction?.reactionType, id, movementIndex);\n }\n\n return canRender;\n };\n\n const styleBucket = (): IReactionStyleBucket => getReactionStyleBucket();\n const displaySizePx = (): number => REACTION_START_DISPLAY_SIZE * styleBucket().sizeScale;\n\n const containerHeight = hostDivHeight ?? 0;\n const containerWidth = (hostDivWidth ?? 0) - displaySizePx();\n\n const leftPosition = (position: number): number => generateStartPositionWave(position, containerWidth / 2, true);\n const reactionMovementStyle = (position: number): React.CSSProperties =>\n getReactionMovementStyle(leftPosition(position));\n\n return (\n <Stack\n className={mergeStyles(videoContainerStyles, {\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n backgroundColor: 'transparent'\n })}\n >\n {visibleReactions.map((reaction) => (\n <div key={reaction.id} style={reactionOverlayStyle}>\n <div className=\"reaction-item\">\n {canRenderReaction(reaction.reaction, reaction.id, reaction.reactionMovementIndex) && (\n // First div - Section that fixes the travel height and applies the movement animation\n // Second div - Keeps track of active sprites and responsible for marking, counting\n // and removing reactions. Responsible for opacity controls as the sprite emoji animates\n // Third div - Responsible for calculating the point of X axis where the reaction will start animation\n // Fourth div - Play Animation as the other animation applies on the base play animation for the sprite\n <div\n style={moveAnimationStyles(\n containerHeight / 2, // dividing by two because reactionOverlayStyle height is set to 50%\n (containerHeight / 2) * (1 - reaction.styleBucket.heightMaxScale)\n )}\n >\n <div\n onAnimationEnd={() => {\n removeVisibleReaction(\n reaction.reaction.reactionType,\n reaction.id,\n reaction.reactionMovementIndex\n );\n }}\n style={opacityAnimationStyles(reaction.styleBucket.opacityMax)}\n >\n <div style={reactionMovementStyle(reaction.reactionMovementIndex)}>\n <div\n style={spriteAnimationStyles(\n REACTION_NUMBER_OF_ANIMATION_FRAMES,\n displaySizePx(),\n getEmojiResource(reaction?.reaction.reactionType, reactionResources) ?? ''\n )}\n />\n </div>\n </div>\n </div>\n )}\n </div>\n </div>\n ))}\n </Stack>\n );\n }\n);\n"]}
@@ -75,4 +75,8 @@ export declare const insertTableMenuFocusZone: (theme: Theme) => string;
75
75
  * @private
76
76
  */
77
77
  export declare const insertTableMenuTitleStyles: string;
78
+ /**
79
+ * @private
80
+ */
81
+ export declare const tableContextMenuIconStyles: string;
78
82
  //# sourceMappingURL=RichTextEditor.styles.d.ts.map
@@ -283,4 +283,10 @@ export const insertTableMenuTitleStyles = mergeStyles({
283
283
  fontSize: '0.75rem',
284
284
  marginBottom: '0.5rem'
285
285
  });
286
+ /**
287
+ * @private
288
+ */
289
+ export const tableContextMenuIconStyles = mergeStyles({
290
+ marginTop: '0.375rem'
291
+ });
286
292
  //# 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;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,EAAU,EAAE;IACxF,OAAO,WAAW,CAAC;QACjB,UAAU,EAAE,GAAG,YAAY,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,EAAE;QAC9C,kBAAkB,EAAE,SAAS;QAC7B,gBAAgB,EAAE,SAAS;QAC3B,UAAU,EAAE,SAAS;QACrB,QAAQ,EAAE,MAAM;QAChB,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,cAAc;QAEnC,SAAS,EAAE;YACT,UAAU,EAAE,aAAa;YACzB,c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M;CACjB,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,KAAY,EAAU,EAAE;IAC/D,OAAO,WAAW,CAAC;QACjB,UAAU,EAAE,MAAM;QAClB,KAAK,EAAE,MAAM;QACb,MAAM,EAAE,mBAAmB,KAAK,CAAC,OAAO,CAAC,kBAAkB,EAAE;KAC9D,CAAC,CAAC;AACL,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,WAAW,CAAC;IACpD,KAAK,EAAE,MAAM;IACb,MAAM,EAAE,MAAM;IACd,QAAQ,EAAE,SAAS;IACnB,YAAY,EAAE,QAAQ;CACvB,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): string => {\n return mergeStyles({\n paddingTop: `${addTopOffset ? '0.5rem' : '0'}`,\n paddingInlineStart: `0.75rem`,\n paddingInlineEnd: `0.75rem`,\n lineHeight: '1.25rem',\n maxWidth: '100%',\n color: theme.palette.neutralPrimary,\n\n '& table': {\n background: 'transparent',\n borderCollapse: 'collapse',\n width: '100%',\n borderSpacing: '0',\n // don't shrink/expand cells during the input to the table\n tableLayout: 'fixed',\n\n '& tr': {\n background: 'transparent',\n border: `1px solid ${theme.palette.neutralLight}`,\n\n '& td': {\n background: 'transparent',\n border: `1px solid ${theme.palette.neutralLight}`,\n wordBreak: 'normal',\n padding: '0.125rem 0.25rem',\n verticalAlign: 'top'\n }\n }\n }\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 '.ribbon-table-button-regular-icon': {\n display: 'inline-block',\n margin: '-0.25rem 0.25rem 0 0.25rem',\n width: '1.25rem',\n height: '1.25rem'\n },\n '.ribbon-table-button-filled-icon': {\n display: 'none'\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\nconst rootRibbonTableButtonStyle = (theme: Theme): IStyle => {\n // merge IStyles props\n return Object.assign({ minWidth: 'auto' }, ribbonTableButtonRootStyles(theme, false));\n};\n\n/**\n * @private\n */\nexport const ribbonTableButtonStyle = (theme: Theme): Partial<IButtonStyles> => {\n return {\n icon: { height: 'auto' },\n menuIcon: { height: 'auto' },\n root: rootRibbonTableButtonStyle(theme),\n rootChecked: ribbonTableButtonRootStyles(theme, true),\n rootHovered: ribbonTableButtonRootStyles(theme, true),\n rootCheckedHovered: ribbonTableButtonRootStyles(theme, true),\n rootCheckedPressed: ribbonTableButtonRootStyles(theme, true),\n rootPressed: ribbonTableButtonRootStyles(theme, true),\n rootExpanded: ribbonTableButtonRootStyles(theme, true),\n rootExpandedHovered: ribbonTableButtonRootStyles(theme, true)\n };\n};\nconst ribbonTableButtonRootStyles = (theme: Theme, isSelected: boolean): IStyle => {\n return {\n backgroundColor: 'transparent',\n selectors: {\n '.ribbon-table-button-regular-icon': {\n width: '1.25rem',\n height: '1.25rem',\n marginTop: '-0.25rem',\n color: theme.palette.neutralPrimary,\n display: isSelected ? 'none' : 'inline-block'\n },\n '.ribbon-table-button-filled-icon': {\n width: '1.25rem',\n height: '1.25rem',\n marginTop: '-0.25rem',\n color: theme.palette.themePrimary,\n display: isSelected ? 'inline-block' : 'none'\n }\n }\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 rootHovered: {\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.neutralQuaternaryAlt\n },\n '.ms-Button-menuIcon': {\n color: theme.palette.neutralQuaternaryAlt\n }\n }\n }\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\n/**\n * @private\n */\nexport const insertTableMenuCellButtonStyles = (theme: Theme): IStyle => {\n return {\n width: '1rem',\n height: '1rem',\n border: `solid 0.0625rem ${theme.palette.neutralTertiaryAlt}`,\n display: 'inline-block',\n cursor: 'pointer',\n background: 'transparent'\n };\n};\n\n/**\n * @private\n */\nexport const insertTableMenuCellButtonSelectedStyles = (theme: Theme): IStyle => {\n return {\n background: theme.palette.themePrimary\n };\n};\n\n/**\n * @private\n */\nexport const insertTableMenuTablePane = mergeStyles({\n padding: '0.5rem 0.625rem 0.75rem 0.625rem',\n boxSizing: 'content-box',\n minWidth: 'auto'\n});\n\n/**\n * @private\n */\nexport const insertTableMenuFocusZone = (theme: Theme): string => {\n return mergeStyles({\n lineHeight: '12px',\n width: '5rem',\n border: `solid 0.0625rem ${theme.palette.neutralTertiaryAlt}`\n });\n};\n\n/**\n * @private\n */\nexport const insertTableMenuTitleStyles = mergeStyles({\n width: '100%',\n height: '1rem',\n fontSize: '0.75rem',\n marginBottom: '0.5rem'\n});\n"]}
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,EAAU,EAAE;IACxF,OAAO,WAAW,CAAC;QACjB,UAAU,EAAE,GAAG,YAAY,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,EAAE;QAC9C,kBAAkB,EAAE,SAAS;QAC7B,gBAAgB,EAAE,SAAS;QAC3B,UAAU,EAAE,SAAS;QACrB,QAAQ,EAAE,MAAM;QAChB,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,cAAc;QAEnC,SAAS,EAAE;YACT,UAAU,EAAE,aAAa;YACzB,cAAc,EAAE,UAAU;YAC1B,KAAK,EAAE,MAAM;YACb,aAAa,EAAE,GAAG;YAClB,0DAA0D;YAC1D,WAAW,EAAE,OAAO;YAEpB,MAAM,EAAE;gBACN,UAAU,EAAE,aAAa;gBACzB,MAAM,EAAE,aAAa,KAAK,CAAC,OAAO,CAAC,YAAY,EAAE;gBAEjD,MA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AAkB,EAAE;KAC9D,CAAC,CAAC;AACL,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,WAAW,CAAC;IACpD,KAAK,EAAE,MAAM;IACb,MAAM,EAAE,MAAM;IACd,QAAQ,EAAE,SAAS;IACnB,YAAY,EAAE,QAAQ;CACvB,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,WAAW,CAAC;IACpD,SAAS,EAAE,UAAU;CACtB,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): string => {\n return mergeStyles({\n paddingTop: `${addTopOffset ? '0.5rem' : '0'}`,\n paddingInlineStart: `0.75rem`,\n paddingInlineEnd: `0.75rem`,\n lineHeight: '1.25rem',\n maxWidth: '100%',\n color: theme.palette.neutralPrimary,\n\n '& table': {\n background: 'transparent',\n borderCollapse: 'collapse',\n width: '100%',\n borderSpacing: '0',\n // don't shrink/expand cells during the input to the table\n tableLayout: 'fixed',\n\n '& tr': {\n background: 'transparent',\n border: `1px solid ${theme.palette.neutralLight}`,\n\n '& td': {\n background: 'transparent',\n border: `1px solid ${theme.palette.neutralLight}`,\n wordBreak: 'normal',\n padding: '0.125rem 0.25rem',\n verticalAlign: 'top'\n }\n }\n }\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 '.ribbon-table-button-regular-icon': {\n display: 'inline-block',\n margin: '-0.25rem 0.25rem 0 0.25rem',\n width: '1.25rem',\n height: '1.25rem'\n },\n '.ribbon-table-button-filled-icon': {\n display: 'none'\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\nconst rootRibbonTableButtonStyle = (theme: Theme): IStyle => {\n // merge IStyles props\n return Object.assign({ minWidth: 'auto' }, ribbonTableButtonRootStyles(theme, false));\n};\n\n/**\n * @private\n */\nexport const ribbonTableButtonStyle = (theme: Theme): Partial<IButtonStyles> => {\n return {\n icon: { height: 'auto' },\n menuIcon: { height: 'auto' },\n root: rootRibbonTableButtonStyle(theme),\n rootChecked: ribbonTableButtonRootStyles(theme, true),\n rootHovered: ribbonTableButtonRootStyles(theme, true),\n rootCheckedHovered: ribbonTableButtonRootStyles(theme, true),\n rootCheckedPressed: ribbonTableButtonRootStyles(theme, true),\n rootPressed: ribbonTableButtonRootStyles(theme, true),\n rootExpanded: ribbonTableButtonRootStyles(theme, true),\n rootExpandedHovered: ribbonTableButtonRootStyles(theme, true)\n };\n};\nconst ribbonTableButtonRootStyles = (theme: Theme, isSelected: boolean): IStyle => {\n return {\n backgroundColor: 'transparent',\n selectors: {\n '.ribbon-table-button-regular-icon': {\n width: '1.25rem',\n height: '1.25rem',\n marginTop: '-0.25rem',\n color: theme.palette.neutralPrimary,\n display: isSelected ? 'none' : 'inline-block'\n },\n '.ribbon-table-button-filled-icon': {\n width: '1.25rem',\n height: '1.25rem',\n marginTop: '-0.25rem',\n color: theme.palette.themePrimary,\n display: isSelected ? 'inline-block' : 'none'\n }\n }\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 rootHovered: {\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.neutralQuaternaryAlt\n },\n '.ms-Button-menuIcon': {\n color: theme.palette.neutralQuaternaryAlt\n }\n }\n }\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\n/**\n * @private\n */\nexport const insertTableMenuCellButtonStyles = (theme: Theme): IStyle => {\n return {\n width: '1rem',\n height: '1rem',\n border: `solid 0.0625rem ${theme.palette.neutralTertiaryAlt}`,\n display: 'inline-block',\n cursor: 'pointer',\n background: 'transparent'\n };\n};\n\n/**\n * @private\n */\nexport const insertTableMenuCellButtonSelectedStyles = (theme: Theme): IStyle => {\n return {\n background: theme.palette.themePrimary\n };\n};\n\n/**\n * @private\n */\nexport const insertTableMenuTablePane = mergeStyles({\n padding: '0.5rem 0.625rem 0.75rem 0.625rem',\n boxSizing: 'content-box',\n minWidth: 'auto'\n});\n\n/**\n * @private\n */\nexport const insertTableMenuFocusZone = (theme: Theme): string => {\n return mergeStyles({\n lineHeight: '12px',\n width: '5rem',\n border: `solid 0.0625rem ${theme.palette.neutralTertiaryAlt}`\n });\n};\n\n/**\n * @private\n */\nexport const insertTableMenuTitleStyles = mergeStyles({\n width: '100%',\n height: '1rem',\n fontSize: '0.75rem',\n marginBottom: '0.5rem'\n});\n\n/**\n * @private\n */\nexport const tableContextMenuIconStyles = mergeStyles({\n marginTop: '0.375rem'\n});\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@azure/communication-react",
3
- "version": "1.15.0-alpha-202404040013",
3
+ "version": "1.15.0-alpha-202404050013",
4
4
  "sideEffects": false,
5
5
  "description": "React library for building modern communication user experiences utilizing Azure Communication Services",
6
6
  "keywords": [
@@ -26,30 +26,31 @@
26
26
  "@azure/communication-common": "^2.3.1",
27
27
  "@azure/core-paging": "^1.5.0",
28
28
  "@azure/logger": "^1.0.4",
29
- "@fluentui/react-components": "^9.47.2",
30
- "@fluentui/react": "^8.117.0",
29
+ "@fluentui/react-components": "^9.47.3",
30
+ "@fluentui/react": "^8.117.1",
31
31
  "@fluentui/react-file-type-icons": "8.11.5",
32
32
  "@fluentui/react-hooks": "^8.7.0",
33
33
  "@fluentui/react-icons": "^2.0.233",
34
34
  "@fluentui/react-window-provider": "^2.2.18",
35
35
  "@fluentui-contrib/react-chat": "0.1.9",
36
- "@griffel/react": "^1.5.20",
36
+ "@griffel/react": "^1.5.21",
37
37
  "copy-to-clipboard": "^3.3.1",
38
- "dompurify": "^3.0.9",
38
+ "dompurify": "^3.0.11",
39
39
  "events": "^3.3.0",
40
- "html-react-parser": "^5.1.7",
40
+ "html-react-parser": "^5.1.10",
41
41
  "immer": "10.0.4",
42
42
  "memoize-one": "^5.2.1",
43
43
  "nanoid": "3.3.6",
44
44
  "react-linkify": "^1.0.0-alpha",
45
45
  "react-use-draggable-scroll": "^0.4.7",
46
46
  "reselect": "^4.0.0",
47
- "roosterjs-editor-api": "^8.61.0",
48
- "roosterjs-editor-core": "^8.61.0",
49
- "roosterjs-editor-dom": "^8.61.0",
50
- "roosterjs-editor-plugins": "^8.61.0",
51
- "roosterjs-editor-types-compatible": "^8.61.0",
52
- "roosterjs-react": "^8.55.0",
47
+ "roosterjs-editor-api": "^8.62.0",
48
+ "roosterjs-editor-core": "^8.62.0",
49
+ "roosterjs-editor-dom": "^8.62.0",
50
+ "roosterjs-editor-plugins": "^8.62.0",
51
+ "roosterjs-editor-types-compatible": "^8.62.0",
52
+ "roosterjs-editor-types": "^8.62.0",
53
+ "roosterjs-react": "^8.56.0",
53
54
  "textarea-caret-ts": "^4.1.1",
54
55
  "use-debounce": "^10.0.0",
55
56
  "uuid": "^9.0.0"