How to use the @talend/react-cmf.actions.components 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 / data-prep / dataprep-webapp / src / app / next / sagas / search.saga.js View on Github external
let label = inventory.type;
			if (categories) {
				label = categories.find(category => category.type === inventory.type).label;
			}

			return {
				title: label,
				icon: {
					name: 'fixme', // inventory.iconName,
					title: label,
				},
				suggestions,
			};
		});

	yield put(actions.components.mergeState('Container(Typeahead)', 'headerbar:search', { searching: false }));
	yield put(actions.collections.addOrReplace('search', items));
}
github Talend / data-prep / dataprep-webapp / src / app / next / components / FolderCreatorModal / actions.js View on Github external
export function setError(event, error) {
	return actions.components.mergeState('Translate(FolderCreatorModal)', 'default', {
		error,
	});
}
github Talend / data-prep / dataprep-webapp / src / app / next / sagas / effects / folder.effects.js View on Github external
export function* removeFolder() {
	const uris = yield select(state => state.cmf.collections.getIn(['settings', 'uris']));
	const folderId = yield select(state =>
		state.cmf.components.getIn(['CMFContainer(ConfirmDialog)', 'ConfirmDialog', 'folderId']),
	);

	yield put(
		actions.components.mergeState(
			'CMFContainer(ConfirmDialog)',
			'ConfirmDialog',
			new Map({ loading: true }),
		),
	);
	const { response } = yield call(http.delete, `${uris.get('apiFolders')}/${folderId}`);
	if (response.ok) {
		yield call(refreshCurrentFolder);
		const folderName = yield select(state =>
			state.cmf.components.getIn(['CMFContainer(ConfirmDialog)', 'ConfirmDialog', 'folderName']),
		);
		yield put(
			creators.notification.success(null, {
				title: i18next.t('tdp-app:FOLDER_REMOVE_NOTIFICATION_TITLE'),
				message: i18next.t('tdp-app:FOLDER_REMOVE_NOTIFICATION_MESSAGE', {
					name: folderName,
github Talend / data-prep / dataprep-webapp / src / app / next / sagas / preparation.saga.js View on Github external
function* openAbout() {
	while (true) {
		yield take(OPEN_PREPARATION_CREATOR);
		yield put(actions.components.mergeState('PreparationCreatorModal', 'default', { show: true }));
	}
}
github Talend / data-prep / dataprep-webapp / src / app / saga / help.saga.js View on Github external
function* openAbout() {
	while (true) {
		yield take(OPEN_ABOUT);
		yield put(actions.components.mergeState('AboutModal', 'default', { show: true }));
	}
}
github Talend / data-prep / dataprep-webapp / src / app / next / sagas / effects / folder.effects.js View on Github external
yield call(refreshCurrentFolder);
		const folderName = yield select(state =>
			state.cmf.components.getIn(['CMFContainer(ConfirmDialog)', 'ConfirmDialog', 'folderName']),
		);
		yield put(
			creators.notification.success(null, {
				title: i18next.t('tdp-app:FOLDER_REMOVE_NOTIFICATION_TITLE'),
				message: i18next.t('tdp-app:FOLDER_REMOVE_NOTIFICATION_MESSAGE', {
					name: folderName,
				}),
			}),
		);
	}
	yield call(closeRemoveFolderModal);
	yield put(
		actions.components.mergeState(
			'CMFContainer(ConfirmDialog)',
			'ConfirmDialog',
			new Map({ loading: false }),
		),
	);
}
github Talend / data-prep / dataprep-webapp / src / app / next / sagas / effects / preparation.effects.js View on Github external
export function* openPreparationCreatorModal() {
	yield put(actions.components.mergeState('PreparationCreatorModal', 'default', { show: true }));
}