How to use the @talend/json-schema-form-core.sfPath.name function in @talend/json-schema-form-core

To help you get started, we’ve selected a few @talend/json-schema-form-core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Talend / ui / packages / forms / src / compound / widgets / Widget / Widget.component.js View on Github external
export default function Widget({ id, schema }) {
	const { properties } = useContext(formContext);
	const WidgetComponent = widgetDictionary[schema.widget || schema.type];
	const value = getValue(properties, schema);
	const widgetId = sfPath.name(schema.key, '_', id);

	return ;
}
Widget.propTypes = {
github Talend / ui / packages / forms / src / UIForm-v3 / schema / Widget / Widget.component.js View on Github external
const values = rhf.getValues({ nest: true });
	if (!shouldRender(condition, values, key)) {
		return null;
	}

	const widgetName = widget || type;
	const WidgetImpl = getWidget(displayMode || schema.displayMode, widgetName, widgets);
	if (!WidgetImpl) {
		return <p>Widget not found {widgetName}</p>;
	}

	const instance = (
		
	);

	if (tooltip) {
		return (
			
				<div>{instance}</div>
			
		);
github Talend / ui / packages / forms / src / UIForm / Widget / Widget.component.js View on Github external
tooltip,
		tooltipPlacement,
	} = props.schema;
	const widgetId = widget || type;

	if (widgetId === 'hidden' || !shouldRender(condition, props.properties, key)) {
		return null;
	}

	const WidgetImpl = getWidget(props.displayMode || displayMode, widgetId, props.widgets);

	if (!WidgetImpl) {
		return <p>Widget not found {widgetId}</p>;
	}

	const id = sfPath.name(key, '_', props.id);
	const error = getError(props.errors, props.schema);
	const errorMessage = validationMessage || error;
	const all = {
		...props,
		id,
		key: id,
		options,
		errorMessage,
		isValid: !error,
		value: getValue(props.properties, props.schema),
		valueIsUpdating: isUpdating(props.updating, props.schema.key),
	};

	if (tooltip) {
		return (

@talend/json-schema-form-core

JSON-Schema and JSON-UI-Schema utilities for form generation.

MIT
Latest version published 5 months ago

Package Health Score

62 / 100
Full package analysis