Skip to content

Function: createEditorRenderingAdapter() ​

ts
function createEditorRenderingAdapter(ctx): object;

Defined in: application/services/adapters/editor-rendering-adapter.ts:10

Combines createValueRenderingAdapter and createUnionRenderingAdapter into a single object. Where both define a member (for example getInputKey and applyValueAtPath), the union adapter's version wins.

Parameters ​

ParameterType
ctxValueRenderingAdapterContext

Returns ​

object

applyValueAtPath ​

ts
applyValueAtPath: (path, nextValue) => void;

Parameters ​

ParameterType
path(string | number)[]
nextValueany

Returns ​

void

buildObjectFieldValue ​

ts
buildObjectFieldValue: (params) => any;

Parameters ​

ParameterType
params{ objectValue: any; propKey: string; resolvedSchema: any; selectedLanguage?: string; value: any; }
params.objectValueany
params.propKeystring
params.resolvedSchemaany
params.selectedLanguage?string
params.valueany

Returns ​

any

coerceInputValue ​

ts
coerceInputValue: (schema, value) => any;

Parameters ​

ParameterType
schemaany
valueany

Returns ​

any

getEnumOptions ​

ts
getEnumOptions: (schema) => any;

Parameters ​

ParameterType
schemaany

Returns ​

any

getInputKey ​

ts
getInputKey: (path) => string;

Parameters ​

ParameterType
path(string | number)[]

Returns ​

string

getObjectPropertyKeys ​

ts
getObjectPropertyKeys: (resolvedSchema) => string[];

Parameters ​

ParameterType
resolvedSchemaany

Returns ​

string[]

getUnionLabel ​

ts
getUnionLabel: (schema, index) => any;

Parameters ​

ParameterType
schemaany
indexnumber

Returns ​

any

getUnionList ​

ts
getUnionList: (schemaNode) => any;

Parameters ​

ParameterType
schemaNodeany

Returns ​

any

getUnionState ​

ts
getUnionState: (params) => 
  | {
  cachedValues?: undefined;
  cacheKey?: undefined;
  detectedIndex?: undefined;
  inputKey?: undefined;
  selectedIndex?: undefined;
  selectedSchema?: undefined;
  selectionKey?: undefined;
  unionList: null;
  unionValue?: undefined;
}
  | {
  cachedValues: any;
  cacheKey: string;
  detectedIndex: any;
  inputKey: string;
  selectedIndex: number;
  selectedSchema: any;
  selectionKey: string;
  unionList: any;
  unionValue: any;
};

Parameters ​

ParameterType
params{ path: (string | number)[]; schemaNode: any; value: any; }
params.path(string | number)[]
params.schemaNodeany
params.valueany

Returns ​

| { cachedValues?: undefined; cacheKey?: undefined; detectedIndex?: undefined; inputKey?: undefined; selectedIndex?: undefined; selectedSchema?: undefined; selectionKey?: undefined; unionList: null; unionValue?: undefined; } | { cachedValues: any; cacheKey: string; detectedIndex: any; inputKey: string; selectedIndex: number; selectedSchema: any; selectionKey: string; unionList: any; unionValue: any; }

isNumericSchema ​

ts
isNumericSchema: (schema) => boolean;

Parameters ​

ParameterType
schemaany

Returns ​

boolean

matchUnionIndex ​

ts
matchUnionIndex: (unionList, currentValue) => any;

Parameters ​

ParameterType
unionListany[]
currentValueany

Returns ​

any

normalizeTempValue ​

ts
normalizeTempValue: (tempValue, resolvedSchema) => any;

Parameters ​

ParameterType
tempValueany
resolvedSchemaany

Returns ​

any

onSelectionInput ​

ts
onSelectionInput: (params) => void;

Parameters ​

ParameterType
params{ path: (string | number)[]; rawValue: unknown; readOnly: boolean; state: any; value: any; }
params.path(string | number)[]
params.rawValueunknown
params.readOnlyboolean
params.stateany
params.valueany

Returns ​

void

onValueChange ​

ts
onValueChange: (params) => void;

Parameters ​

ParameterType
params{ inputKey: string; nextValue: any; path: AdapterPath; readOnly: boolean; }
params.inputKeystring
params.nextValueany
params.pathAdapterPath
params.readOnlyboolean

Returns ​

void

resolveLocalValue ​

ts
resolveLocalValue: (params) => object;

Parameters ​

ParameterType
params{ existingValue: any; path: AdapterPath; schemaNode: any; }
params.existingValueany
params.pathAdapterPath
params.schemaNodeany

Returns ​

object

inputKey ​
ts
inputKey: string;
localValue ​
ts
localValue: any;
normalizedTempValue ​
ts
normalizedTempValue: any;
resolvedSchema ​
ts
resolvedSchema: any;
typeName ​
ts
typeName: string | undefined;
valueFromSchema ​
ts
valueFromSchema: unknown;

resolveSchema ​

ts
resolveSchema: (schemaNode) => object;

Parameters ​

ParameterType
schemaNodeany

Returns ​

object

resolved ​
ts
resolved: ResolvedSchemaNode | null | undefined;
resolvedSchema ​
ts
resolvedSchema: any = resolvedNode;
typeName ​
ts
typeName: string | undefined = resolved.refName;

switchUnionSelection ​

ts
switchUnionSelection: (params) => void;

Parameters ​

ParameterType
params{ nextIndex: number; path: (string | number)[]; readOnly: boolean; state: any; value: any; }
params.nextIndexnumber
params.path(string | number)[]
params.readOnlyboolean
params.stateany
params.valueany

Returns ​

void

toSelectionIndex ​

ts
toSelectionIndex: (rawValue) => number;

Parameters ​

ParameterType
rawValueunknown

Returns ​

number

withUnionType ​

ts
withUnionType: (nextValue, unionSchema) => any;

Parameters ​

ParameterType
nextValueany
unionSchemaany

Returns ​

any