Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
changeExampleData: (example: ReactExampleDescription) => {
dispatch(changeExample(example));
dispatch(Actions.init(example.data, example.schema, example.uischema));
Actions.setConfig(example.config)(dispatch);
},
getComponent: (example: ReactExampleDescription) =>
import { combineReducers, Reducer } from 'redux';
import { jsonformsReducer, JsonFormsState } from '@jsonforms/core';
import { angularMaterialRenderers } from '../../src/index';
import { ExampleDescription, getExamples } from '@jsonforms/examples';
export const rootReducer: Reducer = combineReducers({
jsonforms: jsonformsReducer(),
examples: (state: ExampleDescription[] = []) => state
});
export const initialState = {
jsonforms: {
renderers: angularMaterialRenderers
},
examples: {
data: getExamples()
}
};
export const renderExample = (
renderers: { tester: RankedTester; renderer: any }[],
cells: { tester: RankedTester; cell: any }[],
...additionalStoreParams: AdditionalStoreParams[]
) => {
const exampleData = enhanceExample(getExamples());
const store = setupStore(
exampleData,
cells,
renderers,
additionalStoreParams
);
ReactDOM.render(
,
document.getElementById('root')
);
};
customReactExtension: (dispatch: Dispatch) => (
),
onChange: i18n.onChange
)
});
return array;
case 'i18n':
return Object.assign({}, e, {
customReactExtension: (dispatch: Dispatch) => (
),
onChange: i18n.onChange
});
case '1220':
const issue_1220 = Object.assign({}, e, {
customReactExtension: (dispatch: Dispatch) => (
<div>
<button>
Issue1220Example.registerIssue1220UISchema(dispatch)
}
>
Register Issue 1220 UISchema
</button>
<button>
Issue1220Example.unregisterIssue1220UISchema(dispatch)
}</button></div>
onClick={() =>
Issue1220Example.registerIssue1220UISchema(dispatch)
}
onClick={() =>
Issue1220Example.unregisterIssue1220UISchema(dispatch)
}
onClick={() =>
NestedArrayExample.registerNestedArrayUISchema(dispatch)
}
onClick={() =>
NestedArrayExample.unregisterNestedArrayUISchema(dispatch)
}
<button>
Issue1220Example.unregisterIssue1220UISchema(dispatch)
}
>
Unregister Issue 1220 UISchema
</button>
)
});
return issue_1220;
case 'onChange':
return {
...e,
onChange: OnChangeExample.onChange
};
default:
return e;
}
});