@rjsf/core 6.0.0-beta.7 → 6.0.0-beta.9

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/dist/core.umd.js CHANGED
@@ -875,7 +875,6 @@
875
875
  var BooleanField_default = BooleanField;
876
876
  var LOOKUP_REGEX = /^\$lookup=(.+)/;
877
877
  var LAYOUT_GRID_UI_OPTION = "layoutGrid";
878
- var UI_GLOBAL_OPTIONS = "ui:global_options";
879
878
  function getNonNullishValue(value, fallback) {
880
879
  return value ?? fallback;
881
880
  }
@@ -898,7 +897,7 @@
898
897
  * @param [forceReadonly] - Optional flag indicating whether the Form itself is in readonly mode
899
898
  */
900
899
  static computeFieldUiSchema(field, uiProps, uiSchema, schemaReadonly, forceReadonly) {
901
- const globalUiOptions = get2(uiSchema, [UI_GLOBAL_OPTIONS], {});
900
+ const globalUiOptions = get2(uiSchema, [utils.UI_GLOBAL_OPTIONS_KEY], {});
902
901
  const localUiSchema = get2(uiSchema, field);
903
902
  const localUiOptions = { ...get2(localUiSchema, [utils.UI_OPTIONS_KEY], {}), ...uiProps, ...globalUiOptions };
904
903
  const fieldUiSchema = { ...localUiSchema };
@@ -906,7 +905,7 @@
906
905
  set(fieldUiSchema, [utils.UI_OPTIONS_KEY], localUiOptions);
907
906
  }
908
907
  if (!isEmpty(globalUiOptions)) {
909
- set(fieldUiSchema, [UI_GLOBAL_OPTIONS], globalUiOptions);
908
+ set(fieldUiSchema, [utils.UI_GLOBAL_OPTIONS_KEY], globalUiOptions);
910
909
  }
911
910
  let { readonly: uiReadonly } = utils.getUiOptions(fieldUiSchema);
912
911
  if (forceReadonly === true || isUndefined(uiReadonly) && schemaReadonly === true) {
package/dist/index.esm.js CHANGED
@@ -13,7 +13,7 @@ import {
13
13
  shouldRender,
14
14
  SUBMIT_BTN_OPTIONS_KEY,
15
15
  toErrorList,
16
- UI_GLOBAL_OPTIONS_KEY,
16
+ UI_GLOBAL_OPTIONS_KEY as UI_GLOBAL_OPTIONS_KEY2,
17
17
  UI_OPTIONS_KEY as UI_OPTIONS_KEY3,
18
18
  validationDataMerge,
19
19
  createErrorHandler,
@@ -942,7 +942,8 @@ import {
942
942
  ONE_OF_KEY,
943
943
  PROPERTIES_KEY,
944
944
  READONLY_KEY,
945
- UI_OPTIONS_KEY
945
+ UI_OPTIONS_KEY,
946
+ UI_GLOBAL_OPTIONS_KEY
946
947
  } from "@rjsf/utils";
947
948
  import cloneDeep2 from "lodash/cloneDeep";
948
949
  import each from "lodash/each";
@@ -964,7 +965,6 @@ import { createElement } from "react";
964
965
  var LOOKUP_REGEX = /^\$lookup=(.+)/;
965
966
  var LAYOUT_GRID_UI_OPTION = "layoutGrid";
966
967
  var LAYOUT_GRID_OPTION = `ui:${LAYOUT_GRID_UI_OPTION}`;
967
- var UI_GLOBAL_OPTIONS = "ui:global_options";
968
968
  function getNonNullishValue(value, fallback) {
969
969
  return value ?? fallback;
970
970
  }
@@ -987,7 +987,7 @@ var LayoutGridField = class _LayoutGridField extends PureComponent {
987
987
  * @param [forceReadonly] - Optional flag indicating whether the Form itself is in readonly mode
988
988
  */
989
989
  static computeFieldUiSchema(field, uiProps, uiSchema, schemaReadonly, forceReadonly) {
990
- const globalUiOptions = get2(uiSchema, [UI_GLOBAL_OPTIONS], {});
990
+ const globalUiOptions = get2(uiSchema, [UI_GLOBAL_OPTIONS_KEY], {});
991
991
  const localUiSchema = get2(uiSchema, field);
992
992
  const localUiOptions = { ...get2(localUiSchema, [UI_OPTIONS_KEY], {}), ...uiProps, ...globalUiOptions };
993
993
  const fieldUiSchema = { ...localUiSchema };
@@ -995,7 +995,7 @@ var LayoutGridField = class _LayoutGridField extends PureComponent {
995
995
  set2(fieldUiSchema, [UI_OPTIONS_KEY], localUiOptions);
996
996
  }
997
997
  if (!isEmpty(globalUiOptions)) {
998
- set2(fieldUiSchema, [UI_GLOBAL_OPTIONS], globalUiOptions);
998
+ set2(fieldUiSchema, [UI_GLOBAL_OPTIONS_KEY], globalUiOptions);
999
999
  }
1000
1000
  let { readonly: uiReadonly } = getUiOptions3(fieldUiSchema);
1001
1001
  if (forceReadonly === true || isUndefined(uiReadonly) && schemaReadonly === true) {
@@ -4748,7 +4748,7 @@ var Form = class extends Component5 {
4748
4748
  formContext: this.props.formContext || formContext,
4749
4749
  schemaUtils,
4750
4750
  translateString: customTranslateString || translateString,
4751
- globalUiOptions: uiSchema[UI_GLOBAL_OPTIONS_KEY]
4751
+ globalUiOptions: uiSchema[UI_GLOBAL_OPTIONS_KEY2]
4752
4752
  };
4753
4753
  }
4754
4754
  /** Provides a function that can be used to programmatically submit the `Form` */