@synergy-client/types 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +67 -19
- package/dist/module-api.js +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
export type ViewType = 'list' | 'detail' | 'other' | 'worker' | 'static' | 'select' | 'component' | 'print';
|
|
2
|
-
export
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
export type ItemType = 'objectField' | 'field' | 'advancedComponent' | 'dynamic' | 'tabs' | 'tab' | 'radio' | 'file' | 'img' | 'text' | 'dynamicList' | 'dynamicTable' | 'group' | 'card' | 'progress' | 'calendar' | 'link' | 'button' | 'tablePart';
|
|
3
|
+
export type FieldType = 'object' | 'text' | 'number' | 'enum' | 'boolean' | 'date' | 'datetime' | 'time' | 'textarea';
|
|
4
|
+
export type ToolbarPosition = 'top' | 'bottom' | 'none';
|
|
5
|
+
export type ToolbarButtonsPosition = 'left' | 'right' | 'middle' | 'none';
|
|
6
6
|
/** A form element (field, group, table, button, ...). */
|
|
7
7
|
export interface ViewItem {
|
|
8
8
|
id: string;
|
|
9
|
-
type:
|
|
9
|
+
type: ItemType;
|
|
10
10
|
name: string;
|
|
11
11
|
label: string;
|
|
12
12
|
labelPosition: 'left' | 'top' | 'none';
|
|
13
13
|
groupType?: 'toolbar' | 'collapsible';
|
|
14
14
|
tagName?: string;
|
|
15
|
+
tagRef?: any;
|
|
15
16
|
multiType: boolean;
|
|
16
17
|
multiTypeVariant: 'common' | 'objects';
|
|
17
18
|
fieldPath: string;
|
|
@@ -19,43 +20,71 @@ export interface ViewItem {
|
|
|
19
20
|
dataLinked?: boolean;
|
|
20
21
|
dataPath?: string;
|
|
21
22
|
defaultValue?: any;
|
|
22
|
-
fieldType:
|
|
23
|
+
fieldType: FieldType;
|
|
24
|
+
valueTypes?: any;
|
|
25
|
+
selectView?: any;
|
|
23
26
|
viewAttribute: boolean;
|
|
24
27
|
ref: null | string;
|
|
25
28
|
required: boolean;
|
|
26
29
|
visible: boolean;
|
|
27
30
|
translate: boolean;
|
|
28
31
|
newRow: boolean;
|
|
32
|
+
noGreed?: boolean;
|
|
29
33
|
fieldCols: number;
|
|
30
34
|
labelCols: number;
|
|
31
35
|
contentCols: number | null;
|
|
32
36
|
itemOffset: number;
|
|
33
37
|
dataType: 'string' | 'integer' | 'decimal' | 'date' | 'enum';
|
|
34
38
|
dateType: 'date' | 'datetime' | 'time';
|
|
39
|
+
detailView: null;
|
|
35
40
|
disabled: boolean;
|
|
36
41
|
options?: any;
|
|
37
42
|
format: string | null;
|
|
38
43
|
filter?: any;
|
|
44
|
+
filters?: any;
|
|
45
|
+
lang: any;
|
|
39
46
|
switch?: boolean;
|
|
40
47
|
maxLength: string | null;
|
|
41
48
|
numberPrecision: string | null;
|
|
42
49
|
numberScale: string | null;
|
|
43
50
|
onChange: string | null;
|
|
44
51
|
placeholder: string | null;
|
|
52
|
+
component?: any;
|
|
45
53
|
icon: string;
|
|
46
54
|
tooltip?: any;
|
|
47
55
|
classes: string | null;
|
|
48
56
|
styles: string | null;
|
|
49
57
|
inputClasses: string | null;
|
|
50
58
|
inputStyles: string | null;
|
|
59
|
+
browseText?: any;
|
|
60
|
+
accept?: any;
|
|
61
|
+
noDrop?: boolean;
|
|
51
62
|
multiple?: boolean;
|
|
63
|
+
appObjectId?: any;
|
|
52
64
|
showTotals?: boolean;
|
|
65
|
+
disableSorting?: boolean;
|
|
66
|
+
disableRowset?: boolean;
|
|
67
|
+
hideToolbar?: boolean;
|
|
68
|
+
hideActions?: boolean;
|
|
53
69
|
usePagination?: boolean;
|
|
54
70
|
rowsLimit?: number;
|
|
55
71
|
maxHeight?: number;
|
|
56
72
|
selectBtn?: boolean;
|
|
57
73
|
openBtn?: boolean;
|
|
58
74
|
addBtn?: boolean;
|
|
75
|
+
hyperLink?: boolean;
|
|
76
|
+
beforeSelect?: any;
|
|
77
|
+
maxRows?: number;
|
|
78
|
+
rowsCount?: number;
|
|
79
|
+
variant?: string;
|
|
80
|
+
pill?: boolean;
|
|
81
|
+
squared?: boolean;
|
|
82
|
+
block?: boolean;
|
|
83
|
+
toggleGroup?: any;
|
|
84
|
+
itemIcon?: any;
|
|
85
|
+
max?: any;
|
|
86
|
+
textVariant?: any;
|
|
87
|
+
bgVariant?: any;
|
|
59
88
|
attrs: any;
|
|
60
89
|
/** Nested items (for groups/tables). */
|
|
61
90
|
items?: ViewItem[];
|
|
@@ -96,24 +125,38 @@ export interface ObjectField {
|
|
|
96
125
|
name: string;
|
|
97
126
|
title: string;
|
|
98
127
|
ref: string | string[] | null;
|
|
99
|
-
lang
|
|
128
|
+
lang: any;
|
|
100
129
|
type: string | null;
|
|
101
|
-
filter
|
|
102
|
-
format
|
|
130
|
+
filter: string | null;
|
|
131
|
+
format: string | null;
|
|
132
|
+
leadingAlias: any;
|
|
103
133
|
primaryKey: boolean;
|
|
104
134
|
leading: boolean;
|
|
135
|
+
decryptable: boolean;
|
|
105
136
|
multiType: boolean;
|
|
106
137
|
multiTypeVariant: 'common' | 'objects';
|
|
107
|
-
defaultValue
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
138
|
+
defaultValue: any;
|
|
139
|
+
standard?: any;
|
|
140
|
+
dbName: string;
|
|
141
|
+
dateType: string;
|
|
142
|
+
notNull: boolean;
|
|
143
|
+
autoIncrement: boolean;
|
|
144
|
+
unique: boolean;
|
|
145
|
+
index: boolean;
|
|
146
|
+
password: boolean;
|
|
111
147
|
isTablePart: boolean;
|
|
112
148
|
model?: string;
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
149
|
+
role: string | null;
|
|
150
|
+
fullSearch: boolean;
|
|
151
|
+
fullName?: string;
|
|
152
|
+
typeOptions: any;
|
|
153
|
+
virtual: boolean;
|
|
154
|
+
comment: string | null;
|
|
155
|
+
confidential?: boolean;
|
|
156
|
+
confidentialRoleId?: string | null;
|
|
116
157
|
fields?: ObjectField[];
|
|
158
|
+
get: any;
|
|
159
|
+
set: any;
|
|
117
160
|
}
|
|
118
161
|
/** A toolbar button/group. */
|
|
119
162
|
export interface ToolbarItem {
|
|
@@ -130,18 +173,23 @@ export interface ToolbarItem {
|
|
|
130
173
|
hidden: boolean;
|
|
131
174
|
tooltip?: string;
|
|
132
175
|
type?: string;
|
|
133
|
-
click?:
|
|
176
|
+
click?: Function;
|
|
134
177
|
items?: ToolbarItem[];
|
|
135
178
|
}
|
|
136
179
|
export interface Toolbar {
|
|
137
|
-
position:
|
|
138
|
-
buttonsPosition:
|
|
180
|
+
position: ToolbarPosition;
|
|
181
|
+
buttonsPosition: ToolbarButtonsPosition;
|
|
139
182
|
classes: string | null;
|
|
140
183
|
styles: string | null;
|
|
141
184
|
items: ToolbarItem[];
|
|
142
185
|
staticItems: ToolbarItem[];
|
|
143
186
|
commonCommands: ToolbarItem[];
|
|
144
187
|
}
|
|
188
|
+
export interface SortBy {
|
|
189
|
+
key: string;
|
|
190
|
+
order?: 'asc' | 'desc' | string;
|
|
191
|
+
sortByOrig?: any;
|
|
192
|
+
}
|
|
145
193
|
/** List/table view data (list and select forms). */
|
|
146
194
|
export interface ListViewTable {
|
|
147
195
|
items: any[];
|
package/dist/module-api.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const moduleApiDts = "type ViewType = 'list' | 'detail' | 'other' | 'worker' | 'static' | 'select' | 'component' | 'print';\
|
|
1
|
+
export const moduleApiDts = "type ViewType = 'list' | 'detail' | 'other' | 'worker' | 'static' | 'select' | 'component' | 'print';\ntype ItemType = 'objectField' | 'field' | 'advancedComponent' | 'dynamic' | 'tabs' | 'tab' | 'radio' | 'file' | 'img' | 'text' | 'dynamicList' | 'dynamicTable' | 'group' | 'card' | 'progress' | 'calendar' | 'link' | 'button' | 'tablePart';\ntype FieldType = 'object' | 'text' | 'number' | 'enum' | 'boolean' | 'date' | 'datetime' | 'time' | 'textarea';\ntype ToolbarPosition = 'top' | 'bottom' | 'none';\ntype ToolbarButtonsPosition = 'left' | 'right' | 'middle' | 'none';\n/** A form element (field, group, table, button, ...). */\ninterface ViewItem {\n id: string;\n type: ItemType;\n name: string;\n label: string;\n labelPosition: 'left' | 'top' | 'none';\n groupType?: 'toolbar' | 'collapsible';\n tagName?: string;\n tagRef?: any;\n multiType: boolean;\n multiTypeVariant: 'common' | 'objects';\n fieldPath: string;\n fieldTypePath?: string;\n dataLinked?: boolean;\n dataPath?: string;\n defaultValue?: any;\n fieldType: FieldType;\n valueTypes?: any;\n selectView?: any;\n viewAttribute: boolean;\n ref: null | string;\n required: boolean;\n visible: boolean;\n translate: boolean;\n newRow: boolean;\n noGreed?: boolean;\n fieldCols: number;\n labelCols: number;\n contentCols: number | null;\n itemOffset: number;\n dataType: 'string' | 'integer' | 'decimal' | 'date' | 'enum';\n dateType: 'date' | 'datetime' | 'time';\n detailView: null;\n disabled: boolean;\n options?: any;\n format: string | null;\n filter?: any;\n filters?: any;\n lang: any;\n switch?: boolean;\n maxLength: string | null;\n numberPrecision: string | null;\n numberScale: string | null;\n onChange: string | null;\n placeholder: string | null;\n component?: any;\n icon: string;\n tooltip?: any;\n classes: string | null;\n styles: string | null;\n inputClasses: string | null;\n inputStyles: string | null;\n browseText?: any;\n accept?: any;\n noDrop?: boolean;\n multiple?: boolean;\n appObjectId?: any;\n showTotals?: boolean;\n disableSorting?: boolean;\n disableRowset?: boolean;\n hideToolbar?: boolean;\n hideActions?: boolean;\n usePagination?: boolean;\n rowsLimit?: number;\n maxHeight?: number;\n selectBtn?: boolean;\n openBtn?: boolean;\n addBtn?: boolean;\n hyperLink?: boolean;\n beforeSelect?: any;\n maxRows?: number;\n rowsCount?: number;\n variant?: string;\n pill?: boolean;\n squared?: boolean;\n block?: boolean;\n toggleGroup?: any;\n itemIcon?: any;\n max?: any;\n textVariant?: any;\n bgVariant?: any;\n attrs: any;\n /** Nested items (for groups/tables). */\n items?: ViewItem[];\n}\n/** A view attribute (form-level field, not bound to the object). */\ninterface ViewAttribute {\n id: string;\n title: string;\n name: string;\n type: 'field' | 'tableField' | 'dynamicTable' | null;\n dataType: string | null;\n standard?: boolean;\n multiType: boolean;\n multiTypeVariant: 'common' | 'objects';\n typeOptions?: any;\n dateType: string;\n defaultValue?: any;\n format: string | null;\n ref: string | string[] | null;\n lang?: any;\n tableName?: string | null;\n childs: ViewAttribute[];\n}\ninterface ViewAttributeTreeItem extends Omit<ViewAttribute, 'id' | 'childs'> {\n attrId: string;\n path: string;\n fullName: string;\n fullPath: string;\n fullTitle: string;\n expanded?: boolean;\n viewAttribute?: boolean;\n dependent: boolean;\n childs: ViewAttributeTreeItem[];\n}\n/** A field of an app object (catalog/document/register). */\ninterface ObjectField {\n id: string;\n name: string;\n title: string;\n ref: string | string[] | null;\n lang: any;\n type: string | null;\n filter: string | null;\n format: string | null;\n leadingAlias: any;\n primaryKey: boolean;\n leading: boolean;\n decryptable: boolean;\n multiType: boolean;\n multiTypeVariant: 'common' | 'objects';\n defaultValue: any;\n standard?: any;\n dbName: string;\n dateType: string;\n notNull: boolean;\n autoIncrement: boolean;\n unique: boolean;\n index: boolean;\n password: boolean;\n isTablePart: boolean;\n model?: string;\n role: string | null;\n fullSearch: boolean;\n fullName?: string;\n typeOptions: any;\n virtual: boolean;\n comment: string | null;\n confidential?: boolean;\n confidentialRoleId?: string | null;\n fields?: ObjectField[];\n get: any;\n set: any;\n}\n/** A toolbar button/group. */\ninterface ToolbarItem {\n id: string;\n title: string;\n icon?: string | null;\n presentation: string;\n variant: string;\n size: string;\n disabled: boolean;\n visible: boolean;\n systemDisabled: boolean;\n systemVisible: boolean;\n hidden: boolean;\n tooltip?: string;\n type?: string;\n click?: Function;\n items?: ToolbarItem[];\n}\ninterface Toolbar {\n position: ToolbarPosition;\n buttonsPosition: ToolbarButtonsPosition;\n classes: string | null;\n styles: string | null;\n items: ToolbarItem[];\n staticItems: ToolbarItem[];\n commonCommands: ToolbarItem[];\n}\ninterface SortBy {\n key: string;\n order?: 'asc' | 'desc' | string;\n sortByOrig?: any;\n}\n/** List/table view data (list and select forms). */\ninterface ListViewTable {\n items: any[];\n fields: any[];\n total: number;\n page: number;\n limit: number;\n filters: Record<string, any>;\n sort: SortBy[];\n folders: {\n items: any[];\n expanded: any[];\n };\n}\n/** Current route (vue-router). */\ninterface Route {\n path: string;\n fullPath: string;\n name?: string | symbol | null;\n params: Record<string, any>;\n query: Record<string, any>;\n hash: string;\n meta: Record<string, any>;\n}\n/** Router instance (vue-router). */\ninterface Router {\n push(to: any): Promise<any>;\n replace(to: any): Promise<any>;\n back(): void;\n forward(): void;\n go(delta: number): void;\n}\n/** Entity data store (useStore('object'), or a view's `store`). */\ninterface Store {\n findByPk(payload?: any): Promise<any>;\n findAll(payload?: any): Promise<any>;\n count(payload?: any): Promise<number>;\n create(payload?: any): Promise<any>;\n createItem(payload?: any): Promise<any>;\n update(payload?: any): Promise<any>;\n updateItem(payload?: any): Promise<any>;\n delete(payload?: any): Promise<any>;\n deleteItem(payload?: any): Promise<any>;\n addNewItem(payload?: any): Promise<any>;\n changeDeletionMark(payload?: any): Promise<any>;\n getView(): {\n object: any;\n attrs: any;\n objectMeta: any;\n };\n}";
|
package/package.json
CHANGED