1 | export enum PropertyPlace {
|
2 | show = 'show',
|
3 | list = 'list',
|
4 | edit = 'edit',
|
5 | filter = 'filter',
|
6 | }
|
7 |
|
8 | /**
|
9 | * JSON representation of a Property.
|
10 | */
|
11 | type PropertyJSON = {
|
12 | /**
|
13 | * If given property should be treated as a title
|
14 | */
|
15 | isTitle: boolean;
|
16 | /**
|
17 | * If given property should be treaten as a Id field
|
18 | */
|
19 | isId: boolean;
|
20 | /**
|
21 | * Property position on a list
|
22 | */
|
23 | position: number;
|
24 | /**
|
25 | * If property is sortable
|
26 | */
|
27 | isSortable: boolean;
|
28 | /**
|
29 | * If property has restricted number of values
|
30 | */
|
31 | availableValues: Array<{label: string; value: string}> | null;
|
32 | /**
|
33 | * Property uniq name/path
|
34 | */
|
35 | name: string;
|
36 | /**
|
37 | * Property label
|
38 | */
|
39 | label: string;
|
40 | /**
|
41 | * Property type
|
42 | */
|
43 | type: string;
|
44 | /**
|
45 | * Has a name of a resource to which it is a reference.
|
46 | * For instance property `userId` will have here `Users`
|
47 | */
|
48 | reference: string | null;
|
49 | /**
|
50 | * Indicates if property is an array of properties
|
51 | */
|
52 | isArray: boolean;
|
53 | /**
|
54 | * Contain list of all sub properties
|
55 | */
|
56 | subProperties: Array<PropertyJSON>;
|
57 | /**
|
58 | * All components overriden by the user in PropertyOptions
|
59 | */
|
60 | components?: {
|
61 | show?: string;
|
62 | edit?: string;
|
63 | filter?: string;
|
64 | list?: string;
|
65 | };
|
66 | }
|