@azure/communication-react 1.9.0-alpha-202310140012 → 1.9.0-alpha-202310181643

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 (20) hide show
  1. package/dist/dist-cjs/communication-react/index.js +58 -36
  2. package/dist/dist-cjs/communication-react/index.js.map +1 -1
  3. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js +1 -1
  4. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js.map +1 -1
  5. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsEditBox.js +16 -14
  6. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsEditBox.js.map +1 -1
  7. package/dist/dist-esm/react-components/src/components/VideoEffects/VideoBackgroundEffectsPicker.js +7 -3
  8. package/dist/dist-esm/react-components/src/components/VideoEffects/VideoBackgroundEffectsPicker.js.map +1 -1
  9. package/dist/dist-esm/react-components/src/components/VideoEffects/VideoEffectsItem.d.ts +4 -0
  10. package/dist/dist-esm/react-components/src/components/VideoEffects/VideoEffectsItem.js +22 -14
  11. package/dist/dist-esm/react-components/src/components/VideoEffects/VideoEffectsItem.js.map +1 -1
  12. package/dist/dist-esm/react-components/src/components/VideoEffects/VideoEffectsItem.styles.d.ts +2 -2
  13. package/dist/dist-esm/react-components/src/components/VideoEffects/VideoEffectsItem.styles.js +8 -5
  14. package/dist/dist-esm/react-components/src/components/VideoEffects/VideoEffectsItem.styles.js.map +1 -1
  15. package/dist/dist-esm/react-components/src/components/styles/ChatMessageComponent.styles.d.ts +4 -0
  16. package/dist/dist-esm/react-components/src/components/styles/ChatMessageComponent.styles.js +8 -3
  17. package/dist/dist-esm/react-components/src/components/styles/ChatMessageComponent.styles.js.map +1 -1
  18. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.d.ts +1 -0
  19. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js.map +1 -1
  20. package/package.json +9 -9
@@ -177,7 +177,7 @@ const _isValidIdentifier = (identifier) => {
177
177
  // Copyright (c) Microsoft Corporation.
178
178
  // Licensed under the MIT License.
179
179
  // GENERATED FILE. DO NOT EDIT MANUALLY.
180
- var telemetryVersion = '1.9.0-alpha-202310140012';
180
+ var telemetryVersion = '1.9.0-alpha-202310181643';
181
181
 
182
182
  // Copyright (c) Microsoft Corporation.
183
183
  /**
@@ -9057,18 +9057,23 @@ const chatMessageFailedTagStyle = (theme) => react.mergeStyles({
9057
9057
  fontSize: theme.fonts.smallPlus.fontSize,
9058
9058
  lineHeight: '1rem'
9059
9059
  });
9060
+ /**
9061
+ * @private
9062
+ */
9063
+ const editChatMessageFailedTagStyle = react.mergeStyles({
9064
+ marginBottom: '0.5rem'
9065
+ });
9060
9066
  /**
9061
9067
  * @private
9062
9068
  */
9063
9069
  const chatMessageFailedTagStackItemStyle = react.mergeStyles({
9064
- alignSelf: 'end',
9065
- paddingBottom: '0.25rem'
9070
+ alignSelf: 'end'
9066
9071
  });
9067
9072
  /**
9068
9073
  * @private
9069
9074
  */
9070
9075
  const editChatMessageButtonsStackStyle = react.mergeStyles({
9071
- padding: '0 0.5rem 0.5rem 0.5rem',
9076
+ padding: '0 0.5rem',
9072
9077
  marginTop: '-0.25rem'
9073
9078
  });
9074
9079
  /**
@@ -9198,19 +9203,21 @@ const ChatMessageComponentAsEditBox = (props) => {
9198
9203
  }, supportNewline: false, maxLength: MAXIMUM_LENGTH_OF_MESSAGE, errorMessage: textTooLongMessage, styles: editBoxStyles,
9199
9204
  /* @conditional-compile-remove(mention) */
9200
9205
  mentionLookupOptions: mentionLookupOptions }),
9201
- React__default["default"].createElement(react.Stack, { horizontal: true, horizontalAlign: "end", verticalAlign: "start", className: editChatMessageButtonsStackStyle, tokens: { childrenGap: '0.25rem' } },
9202
- message.failureReason && (React__default["default"].createElement(react.Stack.Item, { grow: true, className: chatMessageFailedTagStackItemStyle },
9203
- React__default["default"].createElement("div", { className: chatMessageFailedTagStyle(theme) }, message.failureReason))),
9204
- React__default["default"].createElement(InputBoxButton, { className: editingButtonStyle, ariaLabel: strings.editBoxCancelButton, tooltipContent: strings.editBoxCancelButton, onRenderIcon: onRenderThemedCancelIcon, onClick: () => {
9205
- onCancel && onCancel(message.messageId);
9206
- }, id: 'dismissIconWrapper' }),
9207
- React__default["default"].createElement(InputBoxButton, { className: editingButtonStyle, ariaLabel: strings.editBoxSubmitButton, tooltipContent: strings.editBoxSubmitButton, onRenderIcon: onRenderThemedSubmitIcon, onClick: (e) => {
9208
- submitEnabled &&
9209
- onSubmit(textValue, message.metadata, {
9210
- attachedFilesMetadata
9211
- });
9212
- e.stopPropagation();
9213
- }, id: 'submitIconWrapper' })),
9206
+ React__default["default"].createElement(react.Stack, { horizontal: true, horizontalAlign: "end", className: editChatMessageButtonsStackStyle, tokens: { childrenGap: '0.25rem' } },
9207
+ message.failureReason && (React__default["default"].createElement(react.Stack.Item, { grow: true, align: "stretch", className: chatMessageFailedTagStackItemStyle },
9208
+ React__default["default"].createElement("div", { className: react.mergeStyles(chatMessageFailedTagStyle(theme), editChatMessageFailedTagStyle) }, message.failureReason))),
9209
+ React__default["default"].createElement(react.Stack.Item, { align: "end" },
9210
+ React__default["default"].createElement(InputBoxButton, { className: editingButtonStyle, ariaLabel: strings.editBoxCancelButton, tooltipContent: strings.editBoxCancelButton, onRenderIcon: onRenderThemedCancelIcon, onClick: () => {
9211
+ onCancel && onCancel(message.messageId);
9212
+ }, id: 'dismissIconWrapper' })),
9213
+ React__default["default"].createElement(react.Stack.Item, { align: "end" },
9214
+ React__default["default"].createElement(InputBoxButton, { className: editingButtonStyle, ariaLabel: strings.editBoxSubmitButton, tooltipContent: strings.editBoxSubmitButton, onRenderIcon: onRenderThemedSubmitIcon, onClick: (e) => {
9215
+ submitEnabled &&
9216
+ onSubmit(textValue, message.metadata, {
9217
+ attachedFilesMetadata
9218
+ });
9219
+ e.stopPropagation();
9220
+ }, id: 'submitIconWrapper' }))),
9214
9221
  onRenderFileUploads()));
9215
9222
  };
9216
9223
  const bodyClassName = reactComponents.mergeClasses(editContainerStyles.body, message.failureReason !== undefined ? editContainerStyles.bodyError : editContainerStyles.bodyDefault);
@@ -17608,19 +17615,17 @@ const videoEffectsItemContainerStyles = (args) => {
17608
17615
  color: args.theme.palette.neutralPrimary,
17609
17616
  cursor: args.disabled ? 'default' : 'pointer',
17610
17617
  height: VideoEffectsItemContainerHeight,
17611
- position: 'relative',
17612
17618
  width: VideoEffectsItemContainerWidth,
17619
+ border: args.isSelected
17620
+ ? `${borderActiveThickness} solid ${args.theme.palette.themePrimary}`
17621
+ : `${borderDefaultThickness} solid ${args.theme.palette.neutralQuaternaryAlt}`,
17613
17622
  // Use :after to display a border element. This is used to prevent the background image
17614
17623
  // resizing when the border thichkness is changed. We also want the border to be inside
17615
17624
  // the frame of the container, i.e. we want it to expand inwards and not outwards when
17616
17625
  // border thickness changes from hover/selection.
17617
17626
  ':after': {
17618
17627
  content: '""',
17619
- position: 'absolute',
17620
17628
  boxSizing: 'border-box',
17621
- border: args.isSelected
17622
- ? `${borderActiveThickness} solid ${args.theme.palette.themePrimary}`
17623
- : `${borderDefaultThickness} solid ${args.theme.palette.neutralQuaternaryAlt}`,
17624
17629
  height: '100%',
17625
17630
  width: '100%',
17626
17631
  borderRadius: '0.25rem'
@@ -17632,6 +17637,11 @@ const videoEffectsItemContainerStyles = (args) => {
17632
17637
  : `${borderActiveThickness} solid ${args.theme.palette.themePrimary}`
17633
17638
  }
17634
17639
  }
17640
+ },
17641
+ rootFocused: {
17642
+ ':after': {
17643
+ outline: `2px solid ${args.theme.palette.neutralQuaternaryAlt}`
17644
+ }
17635
17645
  }
17636
17646
  };
17637
17647
  };
@@ -17654,19 +17664,27 @@ const _VideoEffectsItem = (props) => {
17654
17664
  disabled,
17655
17665
  backgroundImage
17656
17666
  }), [backgroundImage, disabled, isSelected, theme]);
17667
+ const componentRef = React__default["default"].createRef();
17668
+ React.useEffect(() => {
17669
+ if (props.focusOnMount && componentRef.current) {
17670
+ componentRef.current.focus();
17671
+ }
17672
+ }, [componentRef, props.focusOnMount]);
17657
17673
  return (React__default["default"].createElement(react.TooltipHost, Object.assign({}, props.tooltipProps),
17658
- React__default["default"].createElement(react.Stack, { key: props.itemKey, className: react.mergeStyles((_d = props.styles) === null || _d === void 0 ? void 0 : _d.root), verticalAlign: "center", horizontalAlign: "center", styles: containerStyles, "data-ui-id": `video-effects-item`, onClick: disabled ? undefined : () => { var _a; return (_a = props.onSelect) === null || _a === void 0 ? void 0 : _a.call(props, props.itemKey); }, onKeyDown: disabled
17659
- ? undefined
17660
- : (e) => {
17661
- var _a;
17662
- if (e.key === 'Enter' || e.key === ' ') {
17663
- (_a = props.onSelect) === null || _a === void 0 ? void 0 : _a.call(props, props.itemKey);
17664
- }
17665
- }, tabIndex: props.disabled ? -1 : 0, "aria-label": (_e = props.ariaLabel) !== null && _e !== void 0 ? _e : props.itemKey, "aria-disabled": props.disabled, role: "button" },
17666
- props.iconProps && (React__default["default"].createElement(react.Stack.Item, { styles: { root: (_f = props.styles) === null || _f === void 0 ? void 0 : _f.iconContainer } },
17667
- React__default["default"].createElement(react.Icon, Object.assign({}, props.iconProps)))),
17668
- props.title && (React__default["default"].createElement(react.Stack.Item, { styles: { root: (_g = props.styles) === null || _g === void 0 ? void 0 : _g.textContainer } },
17669
- React__default["default"].createElement(react.Text, { variant: "small" }, props.title))))));
17674
+ React__default["default"].createElement(react.Stack, { key: props.itemKey, className: react.mergeStyles((_d = props.styles) === null || _d === void 0 ? void 0 : _d.root), verticalAlign: "center", horizontalAlign: "center", "data-ui-id": `video-effects-item`, "aria-label": (_e = props.ariaLabel) !== null && _e !== void 0 ? _e : props.itemKey, "aria-disabled": props.disabled },
17675
+ React__default["default"].createElement(react.DefaultButton, { styles: containerStyles(), onClick: disabled ? undefined : () => { var _a; return (_a = props.onSelect) === null || _a === void 0 ? void 0 : _a.call(props, props.itemKey); }, componentRef: componentRef, autoFocus: props.focusOnMount, onKeyDown: disabled
17676
+ ? undefined
17677
+ : (e) => {
17678
+ var _a;
17679
+ if (e.key === 'Enter' || e.key === ' ') {
17680
+ (_a = props.onSelect) === null || _a === void 0 ? void 0 : _a.call(props, props.itemKey);
17681
+ }
17682
+ } },
17683
+ React__default["default"].createElement(react.Stack, { horizontalAlign: 'center', tokens: { childrenGap: '0.15rem' } },
17684
+ props.iconProps && (React__default["default"].createElement(react.Stack.Item, { styles: { root: (_f = props.styles) === null || _f === void 0 ? void 0 : _f.iconContainer } },
17685
+ React__default["default"].createElement(react.Icon, Object.assign({}, props.iconProps)))),
17686
+ props.title && (React__default["default"].createElement(react.Stack.Item, { styles: { root: (_g = props.styles) === null || _g === void 0 ? void 0 : _g.textContainer } },
17687
+ React__default["default"].createElement(react.Text, { variant: "small" }, props.title))))))));
17670
17688
  };
17671
17689
 
17672
17690
  // Copyright (c) Microsoft Corporation.
@@ -17707,8 +17725,12 @@ const _VideoBackgroundEffectsPicker = (props) => {
17707
17725
  optionsByRow.map((options, rowIndex) => {
17708
17726
  var _a;
17709
17727
  return (React__default["default"].createElement(react.Stack, { className: react.mergeStyles((_a = props.styles) === null || _a === void 0 ? void 0 : _a.rowRoot), wrap: props.itemsPerRow === 'wrap', horizontal: true, key: rowIndex, tokens: { childrenGap: '0.5rem' }, "data-ui-id": "video-effects-picker-row" },
17710
- options.map((option) => (React__default["default"].createElement(react.FocusZone, { key: option.itemKey, shouldFocusOnMount: option.itemKey.includes('none') },
17711
- React__default["default"].createElement(_VideoEffectsItem, Object.assign({}, option, { itemKey: option.itemKey }))))),
17728
+ options.map((option, i) => {
17729
+ if (i === 0 && rowIndex === 0) {
17730
+ return (React__default["default"].createElement(_VideoEffectsItem, Object.assign({}, option, { itemKey: option.itemKey, key: option.itemKey, focusOnMount: true })));
17731
+ }
17732
+ return React__default["default"].createElement(_VideoEffectsItem, Object.assign({}, option, { itemKey: option.itemKey, key: option.itemKey }));
17733
+ }),
17712
17734
  fillCount > 0 &&
17713
17735
  rowIndex === optionsByRow.length - 1 &&
17714
17736
  Array.from({ length: fillCount }).map((_, index) => (React__default["default"].createElement(react.Stack, { key: index, styles: hiddenVideoEffectsItemContainerStyles, "data-ui-id": "video-effects-hidden-item" })))));