diff --git a/packages/angular-material/example/app/app.component.ts b/packages/angular-material/example/app/app.component.ts index 18b0ec0f9e..17cb1d0d5a 100644 --- a/packages/angular-material/example/app/app.component.ts +++ b/packages/angular-material/example/app/app.component.ts @@ -1,7 +1,7 @@ /* The MIT License - Copyright (c) 2017-2019 EclipseSource Munich + Copyright (c) 2017-2020 EclipseSource Munich https://github.com/eclipsesource/jsonforms Permission is hereby granted, free of charge, to any person obtaining a copy @@ -23,19 +23,34 @@ THE SOFTWARE. */ import { Component } from '@angular/core'; -import { JsonFormsAngularService } from '@jsonforms/angular'; +import { ExampleDescription, getExamples } from '@jsonforms/examples'; import { - Actions, - getData, - getUiSchema, - setLocale, setReadonly, + UISchemaElement, + UISchemaTester, unsetReadonly, - setConfig } from '@jsonforms/core'; -import { getExamples } from '@jsonforms/examples'; -import { of } from 'rxjs'; -import { map } from 'rxjs/operators'; +import { angularMaterialRenderers } from '../../src/index'; +import { clone } from 'lodash'; +const uiSchema = { + type: 'HorizontalLayout', + elements: [ + { + type: 'Control', + scope: '#/properties/buyer/properties/email' + }, + { + type: 'Control', + scope: '#/properties/status' + } + ] +}; +const itemTester: UISchemaTester = (_schema, schemaPath, _path) => { + if (schemaPath === '#/properties/warehouseitems/items') { + return 10; + } + return -1; +}; @Component({ selector: 'app-root', template: ` @@ -45,7 +60,7 @@ import { map } from 'rxjs/operators'; Example: