Skip to content

Commit

Permalink
feat: include REFERENCE_TABLE type
Browse files Browse the repository at this point in the history
  • Loading branch information
dnlkoch committed Sep 14, 2023
1 parent 42bd28d commit fb19e25
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
8 changes: 6 additions & 2 deletions src/model/Application.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import { CrsDefinition } from '@terrestris/ol-util/dist/ProjectionUtil/ProjectionUtil';
import {
CrsDefinition
} from '@terrestris/ol-util/dist/ProjectionUtil/ProjectionUtil';

import BaseEntity, { BaseEntityArgs } from './BaseEntity';
import BaseEntity, {
BaseEntityArgs
} from './BaseEntity';
import {
DefaultLayerClientConfig,
DefaultLayerSourceConfig
Expand Down
10 changes: 9 additions & 1 deletion src/model/Layer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,13 @@ export interface PropertyFormItemEditConfig extends PropertyFormItemReadConfig {
required?: boolean;
}

export interface PropertyFormItemEditDefaultConfig extends PropertyFormItemEditConfig {}

export interface PropertyFormItemEditReferenceTableConfig extends PropertyFormItemEditConfig {
editFormConfig: PropertyFormItemEditConfig[];
tablePropertyName?: string;
}

export interface PropertyFormTabConfig<T extends PropertyFormItemReadConfig> {
title: string;
children?: T[];
Expand All @@ -59,7 +66,8 @@ export interface DefaultLayerClientConfig {
searchConfig?: SearchConfig;
propertyConfig?: DefaultLayerPropertyConfig[];
featureInfoFormConfig?: PropertyFormTabConfig<PropertyFormItemReadConfig>[];
editFormConfig?: PropertyFormTabConfig<PropertyFormItemEditConfig>[];
editFormConfig?: PropertyFormTabConfig<PropertyFormItemEditDefaultConfig |
PropertyFormItemEditReferenceTableConfig>[];
crossOrigin?: string;
opacity?: number;
downloadConfig?: DownloadConfig[];
Expand Down
2 changes: 1 addition & 1 deletion src/model/enum/EditFormComponentType.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export type EditFormComponentType = 'CHECKBOX' | 'DATE' | 'DISPLAY' | 'INPUT' | 'NUMBER' |
'SELECT' | 'SWITCH' | 'TEXTAREA' | 'UPLOAD';
'REFERENCE_TABLE' | 'SELECT' | 'SWITCH' | 'TEXTAREA' | 'UPLOAD';

export default EditFormComponentType;

0 comments on commit fb19e25

Please sign in to comment.