Skip to content

Rename editor package to material-tree-renderer #1018

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
108 changes: 0 additions & 108 deletions packages/editor/src/helpers/util.ts

This file was deleted.

116 changes: 0 additions & 116 deletions packages/editor/src/tree/Dialog.tsx

This file was deleted.

2 changes: 1 addition & 1 deletion packages/example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test --env=jsdom",
"test": "echo 'Nothing to do'",
"eject": "react-scripts eject"
}
}
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react';
import { Provider } from 'react-redux';
import EditorIde from '../src/EditorIde';
import EditorIde from '../src/ThemedTreeWithDetail';
import EditorBar from './app-bar/EditorBar';
import {
getData,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@jsonforms/editor",
"name": "@jsonforms/material-tree-renderer",
"version": "2.0.2",
"description": "Editor package for JSON Forms",
"description": "Material-based tree renderer for JSON Forms",
"repository": "https://github.com/eclipsesource/jsonforms",
"bugs": "https://github.com/eclipsesource/jsonforms/issues",
"homepage": "http://jsonforms.io/",
Expand All @@ -26,7 +26,7 @@
"test": "jest --no-cache",
"test-cov": "jest --no-cache",
"report": "../../node_modules/.bin/nyc report --reporter=html",
"doc": "../../node_modules/.bin/typedoc --name 'JSON Forms Editor' --mode file --excludeExternals --theme ../../typedoc-jsonforms --out docs src"
"doc": "../../node_modules/.bin/typedoc --name 'JSON Forms Material Tree Renderer' --mode file --excludeExternals --theme ../../typedoc-jsonforms --out docs src"
},
"jest": {
"moduleFileExtensions": [
Expand Down Expand Up @@ -54,7 +54,6 @@
"dependencies": {
"@jsonforms/core": "^2.0.2",
"@jsonforms/react": "^2.0.2",
"@jsonforms/webcomponent": "^2.0.2",
"@material-ui/core": "^1.2.1",
"@material-ui/icons": "^1.0.0",
"ajv": "^6.4.0",
Expand All @@ -71,7 +70,6 @@
},
"devDependencies": {
"@jsonforms/material-renderers": "^2.0.2",
"@jsonforms/vanilla-renderers": "^2.0.2",
"@types/lodash": "^4.14.104",
"@types/node": "^8.0.0",
"awesome-typescript-loader": "^3.1.3",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react';
import { TreeRenderer } from './tree/TreeRenderer';
import { TreeWithDetailRenderer } from './tree/TreeWithDetailRenderer';
import { createMuiTheme, MuiThemeProvider, withStyles } from '@material-ui/core/styles';

const theme = createMuiTheme({
Expand All @@ -12,18 +12,18 @@ const theme = createMuiTheme({
});

const styles = {
editor: {
treeWithDetail: {
margin: 'auto',
width: '100%'
},
};

const EditorIde = props => {
const ThemedTreeWithDetail = props => {
const { classes, uischema, schema, filterPredicate, labelProvider, imageProvider} = props;
return (
<MuiThemeProvider theme={theme}>
<TreeRenderer
className={classes.editor}
<TreeWithDetailRenderer
className={classes.treeWithDetail}
uischema={uischema}
schema={schema}
filterPredicate={filterPredicate}
Expand All @@ -34,4 +34,4 @@ const EditorIde = props => {
);
};

export default withStyles(styles)(EditorIde);
export default withStyles(styles)(ThemedTreeWithDetail);
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import {
UISchemaElement
} from '@jsonforms/core';

export interface MasterDetailLayout extends UISchemaElement, Scopable {
type: 'MasterDetailLayout';
export interface TreeWithDetail extends UISchemaElement, Scopable {
type: 'TreeWithDetail';
/**
* An optional label that will be associated with the control
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,23 @@ import { JsonSchema7 } from '@jsonforms/core';
import { ModelMapping } from './helpers/container.util';

// TODO remove when it is no longer needed by the schema service impl: Besides that it is obsolete
/**
* @deprecated
*/
export interface EditorContext {
dataSchema: JsonSchema7;
identifyingProperty: string;
modelMapping: ModelMapping;
}

/**
* @deprecated
*/
export interface StringMap {
[property: string]: string;
}

/**
* @deprecated
*/
export interface ModelMapping {
attribute: string;
mapping: StringMap;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import { JsonSchema } from '@jsonforms/core';

/**
* Interface defining a minimal interface for a JsonSchema-based editor.
*
* @deprecated
*/
export interface Editor {
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@ import { Property } from '../services/property.util';
*
* @param data The data object to match
* @param properties The array of properties of root schema
* @param modelMapping The model mapping used to filter properties of the given data
* @param filterPredicate used to filter properties of the given data
* @return The matching {@link Property}
*/
// TODO type model mapping
export const matchContainerProperty =
(data: Object, properties: Property[], filterPredicate: any) => {
// TODO improve handling
Expand Down
Loading