Function: createEditorRenderingAdapter()
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
| Parameter | Type |
|---|---|
ctx | ValueRenderingAdapterContext |
Returns
object
applyValueAtPath
applyValueAtPath: (path, nextValue) => void;Parameters
| Parameter | Type |
|---|---|
path | (string | number)[] |
nextValue | any |
Returns
void
buildObjectFieldValue
buildObjectFieldValue: (params) => any;Parameters
| Parameter | Type |
|---|---|
params | { objectValue: any; propKey: string; resolvedSchema: any; selectedLanguage?: string; value: any; } |
params.objectValue | any |
params.propKey | string |
params.resolvedSchema | any |
params.selectedLanguage? | string |
params.value | any |
Returns
any
coerceInputValue
coerceInputValue: (schema, value) => any;Parameters
| Parameter | Type |
|---|---|
schema | any |
value | any |
Returns
any
getEnumOptions
getEnumOptions: (schema) => any;Parameters
| Parameter | Type |
|---|---|
schema | any |
Returns
any
getInputKey
getInputKey: (path) => string;Parameters
| Parameter | Type |
|---|---|
path | (string | number)[] |
Returns
string
getObjectPropertyKeys
getObjectPropertyKeys: (resolvedSchema) => string[];Parameters
| Parameter | Type |
|---|---|
resolvedSchema | any |
Returns
string[]
getUnionLabel
getUnionLabel: (schema, index) => any;Parameters
| Parameter | Type |
|---|---|
schema | any |
index | number |
Returns
any
getUnionList
getUnionList: (schemaNode) => any;Parameters
| Parameter | Type |
|---|---|
schemaNode | any |
Returns
any
getUnionState
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
| Parameter | Type |
|---|---|
params | { path: (string | number)[]; schemaNode: any; value: any; } |
params.path | (string | number)[] |
params.schemaNode | any |
params.value | any |
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
isNumericSchema: (schema) => boolean;Parameters
| Parameter | Type |
|---|---|
schema | any |
Returns
boolean
matchUnionIndex
matchUnionIndex: (unionList, currentValue) => any;Parameters
| Parameter | Type |
|---|---|
unionList | any[] |
currentValue | any |
Returns
any
normalizeTempValue
normalizeTempValue: (tempValue, resolvedSchema) => any;Parameters
| Parameter | Type |
|---|---|
tempValue | any |
resolvedSchema | any |
Returns
any
onSelectionInput
onSelectionInput: (params) => void;Parameters
| Parameter | Type |
|---|---|
params | { path: (string | number)[]; rawValue: unknown; readOnly: boolean; state: any; value: any; } |
params.path | (string | number)[] |
params.rawValue | unknown |
params.readOnly | boolean |
params.state | any |
params.value | any |
Returns
void
onValueChange
onValueChange: (params) => void;Parameters
| Parameter | Type |
|---|---|
params | { inputKey: string; nextValue: any; path: AdapterPath; readOnly: boolean; } |
params.inputKey | string |
params.nextValue | any |
params.path | AdapterPath |
params.readOnly | boolean |
Returns
void
resolveLocalValue
resolveLocalValue: (params) => object;Parameters
| Parameter | Type |
|---|---|
params | { existingValue: any; path: AdapterPath; schemaNode: any; } |
params.existingValue | any |
params.path | AdapterPath |
params.schemaNode | any |
Returns
object
inputKey
inputKey: string;localValue
localValue: any;normalizedTempValue
normalizedTempValue: any;resolvedSchema
resolvedSchema: any;typeName
typeName: string | undefined;valueFromSchema
valueFromSchema: unknown;resolveSchema
resolveSchema: (schemaNode) => object;Parameters
| Parameter | Type |
|---|---|
schemaNode | any |
Returns
object
resolved
resolved: ResolvedSchemaNode | null | undefined;resolvedSchema
resolvedSchema: any = resolvedNode;typeName
typeName: string | undefined = resolved.refName;switchUnionSelection
switchUnionSelection: (params) => void;Parameters
| Parameter | Type |
|---|---|
params | { nextIndex: number; path: (string | number)[]; readOnly: boolean; state: any; value: any; } |
params.nextIndex | number |
params.path | (string | number)[] |
params.readOnly | boolean |
params.state | any |
params.value | any |
Returns
void
toSelectionIndex
toSelectionIndex: (rawValue) => number;Parameters
| Parameter | Type |
|---|---|
rawValue | unknown |
Returns
number
withUnionType
withUnionType: (nextValue, unionSchema) => any;Parameters
| Parameter | Type |
|---|---|
nextValue | any |
unionSchema | any |
Returns
any