@bigbinary/neetoui 5.0.4 → 5.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.cjs.js CHANGED
@@ -28053,7 +28053,7 @@ var AsyncCreatableSelect = /*#__PURE__*/React$5.forwardRef(function (props, ref)
28053
28053
  }, selectProps));
28054
28054
  });
28055
28055
 
28056
- var _excluded$b = ["size", "label", "required", "error", "helpText", "className", "innerRef", "isCreateable", "strategy", "id", "labelProps", "value", "defaultValue", "components"];
28056
+ var _excluded$b = ["size", "label", "required", "error", "helpText", "className", "innerRef", "isCreateable", "strategy", "id", "labelProps", "value", "defaultValue", "components", "optionRemapping"];
28057
28057
  function ownKeys$7(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
28058
28058
  function _objectSpread$7(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$7(Object(source), !0).forEach(function (key) { _defineProperty$7(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$7(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
28059
28059
  var SIZES$3 = {
@@ -28096,6 +28096,8 @@ var Select = function Select(_ref) {
28096
28096
  value = _ref.value,
28097
28097
  defaultValue = _ref.defaultValue,
28098
28098
  componentOverrides = _ref.components,
28099
+ _ref$optionRemapping = _ref.optionRemapping,
28100
+ optionRemapping = _ref$optionRemapping === void 0 ? {} : _ref$optionRemapping,
28099
28101
  otherProps = _objectWithoutProperties$1(_ref, _excluded$b);
28100
28102
  var inputId = useId(id);
28101
28103
  var Parent = StateManagedSelect;
@@ -28105,6 +28107,12 @@ var Select = function Select(_ref) {
28105
28107
  if (otherProps.loadOptions) {
28106
28108
  Parent = isCreateable ? AsyncCreatableSelect : AsyncSelect;
28107
28109
  }
28110
+ if (optionRemapping.value) {
28111
+ otherProps.getOptionValue = prop(optionRemapping.value);
28112
+ }
28113
+ if (optionRemapping.label) {
28114
+ otherProps.getOptionLabel = prop(optionRemapping.label);
28115
+ }
28108
28116
  var portalProps = strategy === STRATEGIES.fixed && {
28109
28117
  menuPortalTarget: document.body,
28110
28118
  styles: {