How to use the @jsonforms/examples.getExamples function in @jsonforms/examples

To help you get started, we’ve selected a few @jsonforms/examples 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 eclipsesource / jsonforms / packages / angular-material / example / app / store.ts View on Github external
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()
  }
};
github eclipsesource / jsonforms / packages / example / src / index.tsx View on Github external
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')
  );
};