roosterjs 9.55.0 → 9.56.0

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.
@@ -3,7 +3,7 @@
3
3
 
4
4
  import * as FluentUIReact from '@fluentui/react/dist/react';
5
5
 
6
- // Type definitions for roosterjs (Version 9.0.4)
6
+ // Type definitions for roosterjs (Version 9.0.5)
7
7
  // Generated by dts tool from roosterjs
8
8
  // Project: https://github.com/Microsoft/roosterjs
9
9
 
@@ -4571,9 +4571,11 @@ var classNames = (0, Styling_1.mergeStyleSets)({
4571
4571
  * @internal
4572
4572
  */
4573
4573
  function InputDialogItem(props) {
4574
+ var _a;
4574
4575
  var itemName = props.itemName, strings = props.strings, items = props.items, currentValues = props.currentValues, onChanged = props.onChanged, onEnterKey = props.onEnterKey, rows = props.rows;
4575
- var _a = items[itemName], labelKey = _a.labelKey, unlocalizedLabel = _a.unlocalizedLabel, autoFocus = _a.autoFocus;
4576
+ var _b = items[itemName], labelKey = _b.labelKey, unlocalizedLabel = _b.unlocalizedLabel, autoFocus = _b.autoFocus;
4576
4577
  var value = currentValues[itemName];
4578
+ var label = (_a = (labelKey ? (0, index_1.getLocalizedString)(strings, labelKey, unlocalizedLabel) : undefined)) !== null && _a !== void 0 ? _a : undefined;
4577
4579
  var onValueChange = React.useCallback(function (_, newValue) {
4578
4580
  onChanged(itemName, newValue);
4579
4581
  }, [itemName, onChanged]);
@@ -4583,9 +4585,9 @@ function InputDialogItem(props) {
4583
4585
  }
4584
4586
  }, [onEnterKey]);
4585
4587
  return (React.createElement("div", null,
4586
- labelKey ? React.createElement("div", null, (0, index_1.getLocalizedString)(strings, labelKey, unlocalizedLabel)) : null,
4588
+ label ? React.createElement("div", null, label) : null,
4587
4589
  React.createElement("div", null,
4588
- React.createElement(TextField_1.TextField, { role: "textbox", type: "text", className: classNames.inputBox, value: value, onChange: onValueChange, onKeyPress: onKeyPress, autoFocus: autoFocus, rows: rows, multiline: !!rows }))));
4590
+ React.createElement(TextField_1.TextField, { role: "textbox", type: "text", ariaLabel: label, className: classNames.inputBox, value: value, onChange: onValueChange, onKeyPress: onKeyPress, autoFocus: autoFocus, rows: rows, multiline: !!rows }))));
4589
4591
  }
4590
4592
  exports.InputDialogItem = InputDialogItem;
4591
4593