Skip to content

Commit 7857c69

Browse files
committed
Union UISchemaElement type
1 parent 9acd631 commit 7857c69

File tree

1 file changed

+20
-9
lines changed

1 file changed

+20
-9
lines changed

packages/core/src/models/uischema.ts

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
/*
22
The MIT License
3-
3+
44
Copyright (c) 2017-2019 EclipseSource Munich
55
https://github.com/eclipsesource/jsonforms
6-
6+
77
Permission is hereby granted, free of charge, to any person obtaining a copy
88
of this software and associated documentation files (the "Software"), to deal
99
in the Software without restriction, including without limitation the rights
1010
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
1111
copies of the Software, and to permit persons to whom the Software is
1212
furnished to do so, subject to the following conditions:
13-
13+
1414
The above copyright notice and this permission notice shall be included in
1515
all copies or substantial portions of the Software.
16-
16+
1717
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1818
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1919
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -174,7 +174,7 @@ export interface AndCondition extends ComposableCondition {
174174
/**
175175
* Common base interface for any UI schema element.
176176
*/
177-
export interface UISchemaElement {
177+
export interface BaseUISchemaElement {
178178
/**
179179
* The type of this UI schema element.
180180
*/
@@ -195,7 +195,7 @@ export interface UISchemaElement {
195195
* Represents a layout element which can order its children
196196
* in a specific way.
197197
*/
198-
export interface Layout extends UISchemaElement {
198+
export interface Layout extends BaseUISchemaElement {
199199
/**
200200
* The child elements of this layout.
201201
*/
@@ -241,7 +241,7 @@ export interface LabelDescription {
241241
/**
242242
* A label element.
243243
*/
244-
export interface LabelElement extends UISchemaElement, Internationalizable {
244+
export interface LabelElement extends BaseUISchemaElement, Internationalizable {
245245
type: 'Label';
246246
/**
247247
* The text of label.
@@ -254,7 +254,7 @@ export interface LabelElement extends UISchemaElement, Internationalizable {
254254
* to which part of the schema the control should be bound.
255255
*/
256256
export interface ControlElement
257-
extends UISchemaElement,
257+
extends BaseUISchemaElement,
258258
Scoped,
259259
Labelable<string | boolean | LabelDescription>,
260260
Internationalizable {
@@ -274,7 +274,7 @@ export interface Category extends Layout, Labeled, Internationalizable {
274274
* the categorization element can be used to represent recursive structures like trees.
275275
*/
276276
export interface Categorization
277-
extends UISchemaElement,
277+
extends BaseUISchemaElement,
278278
Labeled,
279279
Internationalizable {
280280
type: 'Categorization';
@@ -284,3 +284,14 @@ export interface Categorization
284284
*/
285285
elements: (Category | Categorization)[];
286286
}
287+
288+
export type UISchemaElement =
289+
| BaseUISchemaElement
290+
| ControlElement
291+
| Layout
292+
| LabelElement
293+
| GroupLayout
294+
| Category
295+
| Categorization
296+
| VerticalLayout
297+
| HorizontalLayout;

0 commit comments

Comments
 (0)