How to use the @talend/react-cmf.action function in @talend/react-cmf

To help you get started, we’ve selected a few @talend/react-cmf 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 / containers / src / actionAPI.js View on Github external
onClick(event, data) {
					if (info.actionCreator) {
						context.store.dispatch(cmf.action.getActionObject(context, info.id, event, data));
					} else {
						context.store.dispatch(
							Object.assign(
								{
									model,
								},
								info.payload,
							),
						);
					}
				},
			},
github Talend / ui / packages / containers / src / ActionIconToggle / ActionIconToggle.connect.js View on Github external
export function mapStateToProps(state, ownProps) {
	let props = {};
	if (ownProps.actionId) {
		props = cmf.action.getActionInfo(
			{
				registry: cmf.registry.getRegistry(),
				store: {
					getState: () => state,
				},
			},
			ownProps.actionId,
		);
	}
	return props;
}
github Talend / ui / packages / containers / src / ActionButton / ActionButton.connect.js View on Github external
export function mapStateToProps(state, ownProps) {
	let props = {};
	if (ownProps.actionId) {
		props = cmf.action.getActionInfo(
			{
				registry: cmf.registry.getRegistry(),
				store: {
					getState: () => state,
				},
			},
			ownProps.actionId,
		);
	}
	return props;
}
github Talend / ui / packages / containers / src / Action / Action.connect.js View on Github external
export function mapStateToProps(state, ownProps) {
	if (ownProps.actionId) {
		return cmf.action.getActionInfo(
			{
				registry: cmf.registry.getRegistry(),
				store: {
					getState: () => state,
				},
			},
			ownProps.actionId,
		);
	}
	return {};
}
github Talend / ui / packages / containers / src / SidePanel / SidePanel.connect.js View on Github external
function getAction(id, currentRoute, state) {
	const action = { actionId: id };
	const info = cmf.action.getActionInfo(
		{
			registry: cmf.registry.getRegistry(),
			store: {
				getState: () => state,
			},
		},
		id,
	);
	action.label = info.label;
	action.id = info.id;

	const route = get(
		info,
		'payload.cmf.routerReplace',
		get(info, 'payload.cmf.routerPush', get(info, 'href')),
	);
github Talend / ui / packages / containers / src / ActionSplitDropdown / ActionSplitDropdown.connect.js View on Github external
		props.items = props.actionIds.map(itemId => cmf.action.getActionInfo(context, itemId));
	}
github Talend / ui / packages / containers / src / ActionDropdown / ActionDropdown.connect.js View on Github external
		props.items = actionIds.map(itemId => cmf.action.getActionInfo(context, itemId));
	}
github Talend / ui / packages / containers / src / ActionFile / ActionFile.connect.js View on Github external
export function mapStateToProps(state, ownProps) {
	if (!ownProps.actionId) {
		return {};
	}
	return cmf.action.getActionInfo(
		{
			registry: cmf.registry.getRegistry(),
			store: {
				getState: () => state,
			},
		},
		ownProps.actionId,
	);
}