roosterjs 9.55.0 → 9.57.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
 
@@ -4570,9 +4570,11 @@ var classNames = (0, Styling_1.mergeStyleSets)({
4570
4570
  * @internal
4571
4571
  */
4572
4572
  function InputDialogItem(props) {
4573
+ var _a;
4573
4574
  var itemName = props.itemName, strings = props.strings, items = props.items, currentValues = props.currentValues, onChanged = props.onChanged, onEnterKey = props.onEnterKey, rows = props.rows;
4574
- var _a = items[itemName], labelKey = _a.labelKey, unlocalizedLabel = _a.unlocalizedLabel, autoFocus = _a.autoFocus;
4575
+ var _b = items[itemName], labelKey = _b.labelKey, unlocalizedLabel = _b.unlocalizedLabel, autoFocus = _b.autoFocus;
4575
4576
  var value = currentValues[itemName];
4577
+ var label = (_a = (labelKey ? (0, index_1.getLocalizedString)(strings, labelKey, unlocalizedLabel) : undefined)) !== null && _a !== void 0 ? _a : undefined;
4576
4578
  var onValueChange = React.useCallback(function (_, newValue) {
4577
4579
  onChanged(itemName, newValue);
4578
4580
  }, [itemName, onChanged]);
@@ -4582,9 +4584,9 @@ function InputDialogItem(props) {
4582
4584
  }
4583
4585
  }, [onEnterKey]);
4584
4586
  return (React.createElement("div", null,
4585
- labelKey ? React.createElement("div", null, (0, index_1.getLocalizedString)(strings, labelKey, unlocalizedLabel)) : null,
4587
+ label ? React.createElement("div", null, label) : null,
4586
4588
  React.createElement("div", null,
4587
- React.createElement(TextField_1.TextField, { role: "textbox", type: "text", className: classNames.inputBox, value: value, onChange: onValueChange, onKeyPress: onKeyPress, autoFocus: autoFocus, rows: rows, multiline: !!rows }))));
4589
+ 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 }))));
4588
4590
  }
4589
4591
  exports.InputDialogItem = InputDialogItem;
4590
4592