src/interfaces/IParamsColEditor.ts
Properties |
|
autoComplete |
autoComplete:
|
Type : IParamsColEditorAutoComplete
|
Optional |
Defined in src/interfaces/IParamsColEditor.ts:140
|
for autoComplete |
class |
class:
|
Type : any
|
Optional |
Defined in src/interfaces/IParamsColEditor.ts:156
|
custom ngClass |
cols |
cols:
|
Type : IParamsCol[]
|
Optional |
Defined in src/interfaces/IParamsColEditor.ts:146
|
config |
config:
|
Type : any
|
Optional |
Defined in src/interfaces/IParamsColEditor.ts:135
|
for Tinymce |
custom |
custom:
|
Type : literal type
|
Optional |
Defined in src/interfaces/IParamsColEditor.ts:109
|
Need this if type is 'custom' |
datetime |
datetime:
|
Type : literal type
|
Optional |
Defined in src/interfaces/IParamsColEditor.ts:74
|
Need this if type is 'datetime' |
disabled |
disabled:
|
Type : boolean
|
Optional |
Defined in src/interfaces/IParamsColEditor.ts:44
|
Set as disabled |
display |
display:
|
Type : function
|
Optional |
Defined in src/interfaces/IParamsColEditor.ts:89
|
Need this when type is 'pickList' |
filterBy |
filterBy:
|
Type : string
|
Optional |
Defined in src/interfaces/IParamsColEditor.ts:130
|
for pickList |
hidden |
hidden:
|
Type : boolean
|
Optional |
Defined in src/interfaces/IParamsColEditor.ts:49
|
Hide column while editing |
logs |
logs:
|
Type : function
|
Optional |
Defined in src/interfaces/IParamsColEditor.ts:69
|
Need this if type is 'logs' |
offLabel |
offLabel:
|
Type : string
|
Optional |
Defined in src/interfaces/IParamsColEditor.ts:125
|
onChange |
onChange:
|
Type : function
|
Optional |
Defined in src/interfaces/IParamsColEditor.ts:34
|
On field changed |
onLabel |
onLabel:
|
Type : string
|
Optional |
Defined in src/interfaces/IParamsColEditor.ts:124
|
Need this if type is 'switch' |
options |
options:
|
Type : Array<literal type>
|
Optional |
Defined in src/interfaces/IParamsColEditor.ts:54
|
Need this if type is 'enum' |
placeholder |
placeholder:
|
Type : string
|
Optional |
Defined in src/interfaces/IParamsColEditor.ts:39
|
Placeholder |
ref |
ref:
|
Type : literal type
|
Optional |
Defined in src/interfaces/IParamsColEditor.ts:94
|
Need this if type is 'ref' |
title |
title:
|
Type : function
|
Optional |
Defined in src/interfaces/IParamsColEditor.ts:145
|
for object and objects |
type |
type:
|
Type : "autoComplete" | "checkBox" | "chip" | "custom" | "datetime" | "enum" | "file" | "image" | "images" | "layeredCheckBox" | "logs" | "object" | "objects" | "pickList" | "ref" | "switch" | "text" | "textArea" | "tinymce" | "videos" | "virtual"
|
Defined in src/interfaces/IParamsColEditor.ts:8
|
Type of editor. |
upload |
upload:
|
Type : function
|
Optional |
Defined in src/interfaces/IParamsColEditor.ts:84
|
Need this when type is 'file', 'files', 'image', or 'images', 'videos' |
virtual |
virtual:
|
Type : function
|
Optional |
Defined in src/interfaces/IParamsColEditor.ts:151
|
Need this if type is 'virtual' |
import { RestAdminComponent } from '../component';
import { IParamsCol, IParamsColEditorAutoComplete } from './';
export interface IParamsColEditor {
/**
* Type of editor.
*/
type:
| 'autoComplete'
| 'checkBox'
| 'chip'
| 'custom'
| 'datetime'
| 'enum'
| 'file'
| 'image'
| 'images'
| 'layeredCheckBox'
| 'logs'
| 'object'
| 'objects'
| 'pickList'
| 'ref'
| 'switch'
| 'text'
| 'textArea'
| 'tinymce'
| 'videos'
| 'virtual';
/**
* On field changed
*/
onChange?: (self: RestAdminComponent) => void;
/**
* Placeholder
*/
placeholder?: string;
/**
* Set as disabled
*/
disabled?: boolean;
/**
* Hide column while editing
*/
hidden?: boolean;
/**
* Need this if type is 'enum'
*/
options?: Array<{
/**
* Label
*/
label: string;
/**
* value
*/
value: any;
}>;
/**
* Need this if type is 'logs'
*/
logs?: (item: any) => string;
/**
* Need this if type is 'datetime'
*/
datetime?: {
/**
* eg. 2016:2020
*/
yearRange: string;
};
/**
* Need this when type is 'file', 'files', 'image', or 'images', 'videos'
*/
upload?: (file: Blob) => Promise<string>;
/**
* Need this when type is 'pickList'
*/
display?: (item: any) => string;
/**
* Need this if type is 'ref'
*/
ref?: {
/**
* Reference label
*/
label: ((x: any) => string) | String;
/**
* Reference data field
*/
path: string;
};
/**
* Need this if type is 'custom'
*/
custom?: {
/**
* Display
*/
display: (selected: any, key: string) => string;
/**
* Click
*/
onClick: (selected: any, key: string) => Promise<any>;
};
/**
* Need this if type is 'switch'
*/
onLabel?: string;
offLabel?: string;
/**
* for pickList
*/
filterBy?: string;
/**
* for Tinymce
*/
config?: any;
/**
* for autoComplete
*/
autoComplete?: IParamsColEditorAutoComplete;
/**
* for object and objects
*/
title?: (selected: any) => string;
cols?: IParamsCol[];
/**
* Need this if type is 'virtual'
*/
virtual?: (selected: any, key: string) => string;
/**
* custom ngClass
*/
class?: any;
}