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

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.
@@ -22,6 +22,7 @@ import {
22
22
  SchemaUtilsType,
23
23
  StrictRJSFSchema,
24
24
  UI_OPTIONS_KEY,
25
+ UI_GLOBAL_OPTIONS_KEY,
25
26
  UiSchema,
26
27
  } from '@rjsf/utils';
27
28
  import cloneDeep from 'lodash/cloneDeep';
@@ -101,10 +102,6 @@ export const LAYOUT_GRID_UI_OPTION = 'layoutGrid';
101
102
  */
102
103
  export const LAYOUT_GRID_OPTION = `ui:${LAYOUT_GRID_UI_OPTION}`;
103
104
 
104
- /** The constant representing the global UI Options object potentially contained within the `uiSchema`
105
- */
106
- export const UI_GLOBAL_OPTIONS = 'ui:global_options';
107
-
108
105
  /** Type used to return options list and whether it has a discriminator */
109
106
  type OneOfOptionsInfoType<S extends StrictRJSFSchema = RJSFSchema> = { options: S[]; hasDiscriminator: boolean };
110
107
 
@@ -386,7 +383,7 @@ export default class LayoutGridField<
386
383
  schemaReadonly?: boolean,
387
384
  forceReadonly?: boolean,
388
385
  ) {
389
- const globalUiOptions = get(uiSchema, [UI_GLOBAL_OPTIONS], {});
386
+ const globalUiOptions = get(uiSchema, [UI_GLOBAL_OPTIONS_KEY], {});
390
387
  const localUiSchema = get(uiSchema, field);
391
388
  const localUiOptions = { ...get(localUiSchema, [UI_OPTIONS_KEY], {}), ...uiProps, ...globalUiOptions };
392
389
  const fieldUiSchema = { ...localUiSchema };
@@ -395,7 +392,7 @@ export default class LayoutGridField<
395
392
  }
396
393
  if (!isEmpty(globalUiOptions)) {
397
394
  // pass the global uiOptions down to the field uiSchema so that they can be applied to all nested fields
398
- set(fieldUiSchema, [UI_GLOBAL_OPTIONS], globalUiOptions);
395
+ set(fieldUiSchema, [UI_GLOBAL_OPTIONS_KEY], globalUiOptions);
399
396
  }
400
397
  let { readonly: uiReadonly } = getUiOptions<T, S, F>(fieldUiSchema);
401
398
  if (forceReadonly === true || (isUndefined(uiReadonly) && schemaReadonly === true)) {