@rjsf/utils 5.3.0 → 5.4.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.
@@ -2467,6 +2467,10 @@
2467
2467
  return id + "-" + optionIndex;
2468
2468
  }
2469
2469
 
2470
+ function labelValue(label, hideLabel, fallback) {
2471
+ return hideLabel ? fallback : label;
2472
+ }
2473
+
2470
2474
  /** Converts a local Date string into a UTC date string
2471
2475
  *
2472
2476
  * @param dateString - The string representation of a date as accepted by the `Date()` constructor
@@ -2765,6 +2769,8 @@
2765
2769
  TranslatableString["ClearLabel"] = "Clear";
2766
2770
  /** Aria date label, used by DateWidget */
2767
2771
  TranslatableString["AriaDateLabel"] = "Select a date";
2772
+ /** File preview label, used by FileWidget */
2773
+ TranslatableString["PreviewLabel"] = "Preview";
2768
2774
  /** Decrement button aria label, used by UpDownWidget */
2769
2775
  TranslatableString["DecrementAriaLabel"] = "Decrease value by 1";
2770
2776
  /** Increment button aria label, used by UpDownWidget */
@@ -2861,6 +2867,7 @@
2861
2867
  exports.isMultiSelect = isMultiSelect;
2862
2868
  exports.isObject = isObject;
2863
2869
  exports.isSelect = isSelect;
2870
+ exports.labelValue = labelValue;
2864
2871
  exports.localToUTC = localToUTC;
2865
2872
  exports.mergeDefaultsWithFormData = mergeDefaultsWithFormData;
2866
2873
  exports.mergeObjects = mergeObjects;