|
|
@ -3,37 +3,150 @@ import { EntityPropList } from '../entity-props'; |
|
|
import { FormPropList } from '../form-props'; |
|
|
import { FormPropList } from '../form-props'; |
|
|
import { PropContributorCallbacks } from '../props'; |
|
|
import { PropContributorCallbacks } from '../props'; |
|
|
|
|
|
|
|
|
|
|
|
export interface EntityExtensionDto { |
|
|
|
|
|
properties: Record<string, ExtensionPropertyDto>; |
|
|
|
|
|
configuration: Record<string, object>; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
export interface ExtensionEnumDto { |
|
|
|
|
|
fields: ExtensionEnumFieldDto[]; |
|
|
|
|
|
localizationResource?: string; |
|
|
|
|
|
transformed?: any; // UI
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
export interface ExtensionEnumFieldDto { |
|
|
|
|
|
name?: string; |
|
|
|
|
|
value: any; // UI, was object
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
export interface ExtensionPropertyApiCreateDto { |
|
|
|
|
|
isAvailable: boolean; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
export interface ExtensionPropertyApiDto { |
|
|
|
|
|
onGet: ExtensionPropertyApiGetDto; |
|
|
|
|
|
onCreate: ExtensionPropertyApiCreateDto; |
|
|
|
|
|
onUpdate: ExtensionPropertyApiUpdateDto; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
export interface ExtensionPropertyApiGetDto { |
|
|
|
|
|
isAvailable: boolean; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
export interface ExtensionPropertyApiUpdateDto { |
|
|
|
|
|
isAvailable: boolean; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
export interface ExtensionPropertyAttributeDto { |
|
|
|
|
|
typeSimple?: string; |
|
|
|
|
|
config: Record<string, any>; // UI, was Record<string, object>
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
export interface ExtensionPropertyDto { |
|
|
|
|
|
type?: string; |
|
|
|
|
|
typeSimple?: ePropType; // UI, was string
|
|
|
|
|
|
displayName: LocalizableStringDto; |
|
|
|
|
|
api: ExtensionPropertyApiDto; |
|
|
|
|
|
ui: ExtensionPropertyUiDto; |
|
|
|
|
|
attributes: ExtensionPropertyAttributeDto[]; |
|
|
|
|
|
configuration: Record<string, any>; // UI, was Record<string, object>;
|
|
|
|
|
|
defaultValue: any; // UI, was object
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
export interface ExtensionPropertyUiDto { |
|
|
|
|
|
onTable: ExtensionPropertyUiTableDto; |
|
|
|
|
|
onCreateForm: ExtensionPropertyUiFormDto; |
|
|
|
|
|
onEditForm: ExtensionPropertyUiFormDto; |
|
|
|
|
|
lookup: ExtensionPropertyUiLookupDto; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
export interface ExtensionPropertyUiFormDto { |
|
|
|
|
|
isVisible: boolean; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
export interface ExtensionPropertyUiLookupDto { |
|
|
|
|
|
url?: string; |
|
|
|
|
|
resultListPropertyName?: string; |
|
|
|
|
|
displayPropertyName?: string; |
|
|
|
|
|
valuePropertyName?: string; |
|
|
|
|
|
filterParamName?: string; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
export interface ExtensionPropertyUiTableDto { |
|
|
|
|
|
isSortable?: boolean; // UI
|
|
|
|
|
|
isVisible: boolean; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
export interface LocalizableStringDto { |
|
|
|
|
|
name?: string; |
|
|
|
|
|
resource?: string; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
export interface ModuleExtensionDto { |
|
|
|
|
|
entities: Record<string, EntityExtensionDto>; |
|
|
|
|
|
configuration: Record<string, object>; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
export interface ObjectExtensionsDto { |
|
|
|
|
|
modules: Record<string, ModuleExtensionDto>; |
|
|
|
|
|
enums: Record<string, ExtensionEnumDto>; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
export interface PropContributors<T = any> { |
|
|
export interface PropContributors<T = any> { |
|
|
prop: PropContributorCallbacks<EntityPropList<T>>; |
|
|
prop: PropContributorCallbacks<EntityPropList<T>>; |
|
|
createForm: PropContributorCallbacks<FormPropList<T>>; |
|
|
createForm: PropContributorCallbacks<FormPropList<T>>; |
|
|
editForm: PropContributorCallbacks<FormPropList<T>>; |
|
|
editForm: PropContributorCallbacks<FormPropList<T>>; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* @deprecated To be deleted in v4.2. |
|
|
|
|
|
*/ |
|
|
export interface Config { |
|
|
export interface Config { |
|
|
objectExtensions: Item; |
|
|
objectExtensions: Item; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* @deprecated Use ObjectExtensionsDto. To be deleted in v4.2. |
|
|
|
|
|
*/ |
|
|
export interface Item { |
|
|
export interface Item { |
|
|
modules: Modules; |
|
|
modules: Modules; |
|
|
enums: Enums; |
|
|
enums: Enums; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* @deprecated Use Record<string, ModuleExtensionDto>. To be deleted in v4.2. |
|
|
|
|
|
*/ |
|
|
export type Modules = Configuration<Module>; |
|
|
export type Modules = Configuration<Module>; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* @deprecated Use ModuleExtensionDto. To be deleted in v4.2. |
|
|
|
|
|
*/ |
|
|
export interface Module { |
|
|
export interface Module { |
|
|
configuration: Configuration; |
|
|
configuration: Configuration; |
|
|
entities: Entities; |
|
|
entities: Entities; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* @deprecated Use Record<string, EntityExtensionDto>. To be deleted in v4.2. |
|
|
|
|
|
*/ |
|
|
export type Entities = Configuration<Entity>; |
|
|
export type Entities = Configuration<Entity>; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* @deprecated Use EntityExtensionDto. To be deleted in v4.2. |
|
|
|
|
|
*/ |
|
|
export interface Entity { |
|
|
export interface Entity { |
|
|
configuration: Configuration; |
|
|
configuration: Configuration; |
|
|
properties: Properties; |
|
|
properties: Properties; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* @deprecated Use Record<string, ExtensionPropertyDto>. To be deleted in v4.2. |
|
|
|
|
|
*/ |
|
|
export type Properties = Configuration<Property>; |
|
|
export type Properties = Configuration<Property>; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* @deprecated Use ExtensionPropertyDto. To be deleted in v4.2. |
|
|
|
|
|
*/ |
|
|
export interface Property { |
|
|
export interface Property { |
|
|
type: string; |
|
|
type: string; |
|
|
typeSimple: ePropType; |
|
|
typeSimple: ePropType; |
|
|
@ -45,51 +158,84 @@ export interface Property { |
|
|
defaultValue?: any; |
|
|
defaultValue?: any; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* @deprecated Use LocalizableStringDto. To be deleted in v4.2. |
|
|
|
|
|
*/ |
|
|
export interface DisplayName { |
|
|
export interface DisplayName { |
|
|
name: string; |
|
|
name: string; |
|
|
resource: string; |
|
|
resource: string; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* @deprecated Use ExtensionPropertyApiDto. To be deleted in v4.2. |
|
|
|
|
|
*/ |
|
|
export interface Api { |
|
|
export interface Api { |
|
|
onGet: ApiConfig; |
|
|
onGet: ApiConfig; |
|
|
onCreate: ApiConfig; |
|
|
onCreate: ApiConfig; |
|
|
onUpdate: ApiConfig; |
|
|
onUpdate: ApiConfig; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* @deprecated Use ExtensionPropertyApiCreateDto. To be deleted in v4.2. |
|
|
|
|
|
*/ |
|
|
export interface ApiConfig { |
|
|
export interface ApiConfig { |
|
|
isAvailable: boolean; |
|
|
isAvailable: boolean; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* @deprecated Use ExtensionPropertyUiDto. To be deleted in v4.2. |
|
|
|
|
|
*/ |
|
|
export interface Ui { |
|
|
export interface Ui { |
|
|
onTable: UiPropConfig; |
|
|
onTable: UiPropConfig; |
|
|
onCreateForm: UiFormConfig; |
|
|
onCreateForm: UiFormConfig; |
|
|
onEditForm: UiFormConfig; |
|
|
onEditForm: UiFormConfig; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* @deprecated Use ExtensionPropertyUiTableDto. To be deleted in v4.2. |
|
|
|
|
|
*/ |
|
|
export interface UiPropConfig { |
|
|
export interface UiPropConfig { |
|
|
isSortable: boolean; |
|
|
isSortable: boolean; |
|
|
isVisible: boolean; |
|
|
isVisible: boolean; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* @deprecated Use ExtensionPropertyUiFormDto. To be deleted in v4.2. |
|
|
|
|
|
*/ |
|
|
export interface UiFormConfig { |
|
|
export interface UiFormConfig { |
|
|
isVisible: boolean; |
|
|
isVisible: boolean; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* @deprecated Use ExtensionPropertyAttributeDto. To be deleted in v4.2. |
|
|
|
|
|
*/ |
|
|
export interface Attribute { |
|
|
export interface Attribute { |
|
|
typeSimple: string; |
|
|
typeSimple: string; |
|
|
config: Configuration; |
|
|
config: Configuration; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* @deprecated To be deleted in v4.2. |
|
|
|
|
|
*/ |
|
|
export type Configuration<T = any> = Record<string, T>; |
|
|
export type Configuration<T = any> = Record<string, T>; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* @deprecated Use Record<string, ExtensionEnumDto>. To be deleted in v4.2. |
|
|
|
|
|
*/ |
|
|
export type Enums = Record<string, Enum>; |
|
|
export type Enums = Record<string, Enum>; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* @deprecated Use ExtensionEnumDto. To be deleted in v4.2. |
|
|
|
|
|
*/ |
|
|
export interface Enum { |
|
|
export interface Enum { |
|
|
fields: EnumMember[]; |
|
|
fields: EnumMember[]; |
|
|
localizationResource?: string; |
|
|
localizationResource?: string; |
|
|
transformed?: any; |
|
|
transformed?: any; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* @deprecated Use ExtensionEnumFieldDto. To be deleted in v4.2. |
|
|
|
|
|
*/ |
|
|
export interface EnumMember { |
|
|
export interface EnumMember { |
|
|
name: string; |
|
|
name: string; |
|
|
value: any; |
|
|
value: any; |
|
|
|