@ramathibodi/nuxt-commons 4.0.3 → 4.0.5
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/README.md +5 -0
- package/dist/module.json +1 -1
- package/dist/runtime/components/model/Table.d.vue.ts +50 -50
- package/dist/runtime/components/model/Table.vue.d.ts +50 -50
- package/dist/runtime/components/model/iterator.d.vue.ts +62 -62
- package/dist/runtime/components/model/iterator.vue.d.ts +62 -62
- package/dist/runtime/composables/alert.d.ts +50 -2
- package/dist/runtime/composables/apiLookupList.d.ts +3 -2
- package/dist/runtime/composables/apiLookupList.js +5 -16
- package/dist/runtime/composables/apiModel.d.ts +9 -9
- package/dist/runtime/composables/apiModel.js +16 -22
- package/dist/runtime/composables/apiModelItem.js +6 -23
- package/dist/runtime/composables/apiModelOperation.d.ts +19 -0
- package/dist/runtime/composables/apiModelOperation.js +56 -0
- package/dist/runtime/composables/graphqlOperation.js +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -107,6 +107,11 @@ npm run lint
|
|
|
107
107
|
npm run test
|
|
108
108
|
```
|
|
109
109
|
|
|
110
|
+
## Concepts
|
|
111
|
+
|
|
112
|
+
- [Model Components — Endpoint Reference](docs/model-endpoints.md) — how `modelName` translates to GraphQL operations and REST API endpoints, with body/response shapes and the `By<Qualifier>` rule for `model/*` components.
|
|
113
|
+
- [Document Template JSON Spec](docs/document-template-json-spec.md) — schema and conventions for document templates.
|
|
114
|
+
|
|
110
115
|
## Documentation
|
|
111
116
|
|
|
112
117
|
Generate documentation artifacts from source:
|
package/dist/module.json
CHANGED
|
@@ -34,12 +34,12 @@ declare var __VLS_8: {
|
|
|
34
34
|
operation: {
|
|
35
35
|
openDialog: typeof openDialog;
|
|
36
36
|
openDialogReadonly: typeof openDialogReadonly;
|
|
37
|
-
createItem: (
|
|
38
|
-
importItems: (
|
|
39
|
-
updateItem: (
|
|
40
|
-
deleteItem: (
|
|
41
|
-
reload: (
|
|
42
|
-
setSearch: (
|
|
37
|
+
createItem: (item: Record<string, any>, callback?: FormDialogCallback, importing?: boolean) => Promise<any>;
|
|
38
|
+
importItems: (importItemsList: Record<string, any>[], callback?: FormDialogCallback) => void;
|
|
39
|
+
updateItem: (item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>;
|
|
40
|
+
deleteItem: (item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>;
|
|
41
|
+
reload: () => void;
|
|
42
|
+
setSearch: (keyword: string) => void;
|
|
43
43
|
canServerPageable: boolean;
|
|
44
44
|
canServerSearch: boolean;
|
|
45
45
|
canCreate: boolean;
|
|
@@ -50,18 +50,18 @@ declare var __VLS_8: {
|
|
|
50
50
|
onlyOwnerOverridePermission: string | string[] | undefined;
|
|
51
51
|
};
|
|
52
52
|
}, __VLS_34: {
|
|
53
|
-
reload: (
|
|
53
|
+
reload: () => void;
|
|
54
54
|
}, __VLS_50: {
|
|
55
55
|
items: Record<string, any>[];
|
|
56
56
|
operation: {
|
|
57
57
|
openDialog: typeof openDialog;
|
|
58
58
|
openDialogReadonly: typeof openDialogReadonly;
|
|
59
|
-
createItem: (
|
|
60
|
-
importItems: (
|
|
61
|
-
updateItem: (
|
|
62
|
-
deleteItem: (
|
|
63
|
-
reload: (
|
|
64
|
-
setSearch: (
|
|
59
|
+
createItem: (item: Record<string, any>, callback?: FormDialogCallback, importing?: boolean) => Promise<any>;
|
|
60
|
+
importItems: (importItemsList: Record<string, any>[], callback?: FormDialogCallback) => void;
|
|
61
|
+
updateItem: (item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>;
|
|
62
|
+
deleteItem: (item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>;
|
|
63
|
+
reload: () => void;
|
|
64
|
+
setSearch: (keyword: string) => void;
|
|
65
65
|
canServerPageable: boolean;
|
|
66
66
|
canServerSearch: boolean;
|
|
67
67
|
canCreate: boolean;
|
|
@@ -76,12 +76,12 @@ declare var __VLS_8: {
|
|
|
76
76
|
operation: {
|
|
77
77
|
openDialog: typeof openDialog;
|
|
78
78
|
openDialogReadonly: typeof openDialogReadonly;
|
|
79
|
-
createItem: (
|
|
80
|
-
importItems: (
|
|
81
|
-
updateItem: (
|
|
82
|
-
deleteItem: (
|
|
83
|
-
reload: (
|
|
84
|
-
setSearch: (
|
|
79
|
+
createItem: (item: Record<string, any>, callback?: FormDialogCallback, importing?: boolean) => Promise<any>;
|
|
80
|
+
importItems: (importItemsList: Record<string, any>[], callback?: FormDialogCallback) => void;
|
|
81
|
+
updateItem: (item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>;
|
|
82
|
+
deleteItem: (item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>;
|
|
83
|
+
reload: () => void;
|
|
84
|
+
setSearch: (keyword: string) => void;
|
|
85
85
|
canServerPageable: boolean;
|
|
86
86
|
canServerSearch: boolean;
|
|
87
87
|
canCreate: boolean;
|
|
@@ -95,12 +95,12 @@ declare var __VLS_8: {
|
|
|
95
95
|
operation: {
|
|
96
96
|
openDialog: typeof openDialog;
|
|
97
97
|
openDialogReadonly: typeof openDialogReadonly;
|
|
98
|
-
createItem: (
|
|
99
|
-
importItems: (
|
|
100
|
-
updateItem: (
|
|
101
|
-
deleteItem: (
|
|
102
|
-
reload: (
|
|
103
|
-
setSearch: (
|
|
98
|
+
createItem: (item: Record<string, any>, callback?: FormDialogCallback, importing?: boolean) => Promise<any>;
|
|
99
|
+
importItems: (importItemsList: Record<string, any>[], callback?: FormDialogCallback) => void;
|
|
100
|
+
updateItem: (item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>;
|
|
101
|
+
deleteItem: (item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>;
|
|
102
|
+
reload: () => void;
|
|
103
|
+
setSearch: (keyword: string) => void;
|
|
104
104
|
canServerPageable: boolean;
|
|
105
105
|
canServerSearch: boolean;
|
|
106
106
|
canCreate: boolean;
|
|
@@ -114,12 +114,12 @@ declare var __VLS_8: {
|
|
|
114
114
|
operation: {
|
|
115
115
|
openDialog: typeof openDialog;
|
|
116
116
|
openDialogReadonly: typeof openDialogReadonly;
|
|
117
|
-
createItem: (
|
|
118
|
-
importItems: (
|
|
119
|
-
updateItem: (
|
|
120
|
-
deleteItem: (
|
|
121
|
-
reload: (
|
|
122
|
-
setSearch: (
|
|
117
|
+
createItem: (item: Record<string, any>, callback?: FormDialogCallback, importing?: boolean) => Promise<any>;
|
|
118
|
+
importItems: (importItemsList: Record<string, any>[], callback?: FormDialogCallback) => void;
|
|
119
|
+
updateItem: (item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>;
|
|
120
|
+
deleteItem: (item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>;
|
|
121
|
+
reload: () => void;
|
|
122
|
+
setSearch: (keyword: string) => void;
|
|
123
123
|
canServerPageable: boolean;
|
|
124
124
|
canServerSearch: boolean;
|
|
125
125
|
canCreate: boolean;
|
|
@@ -165,16 +165,16 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
165
165
|
onlyOwnerEdit: boolean;
|
|
166
166
|
api: boolean;
|
|
167
167
|
}>>, {
|
|
168
|
-
reload: (
|
|
168
|
+
reload: () => void;
|
|
169
169
|
operation: import("vue").Ref<{
|
|
170
170
|
openDialog: typeof openDialog;
|
|
171
171
|
openDialogReadonly: typeof openDialogReadonly;
|
|
172
|
-
createItem: (
|
|
173
|
-
importItems: (
|
|
174
|
-
updateItem: (
|
|
175
|
-
deleteItem: (
|
|
176
|
-
reload: (
|
|
177
|
-
setSearch: (
|
|
172
|
+
createItem: (item: Record<string, any>, callback?: FormDialogCallback, importing?: boolean) => Promise<any>;
|
|
173
|
+
importItems: (importItemsList: Record<string, any>[], callback?: FormDialogCallback) => void;
|
|
174
|
+
updateItem: (item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>;
|
|
175
|
+
deleteItem: (item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>;
|
|
176
|
+
reload: () => void;
|
|
177
|
+
setSearch: (keyword: string) => void;
|
|
178
178
|
canServerPageable: boolean;
|
|
179
179
|
canServerSearch: boolean;
|
|
180
180
|
canCreate: boolean;
|
|
@@ -186,12 +186,12 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
186
186
|
}, {
|
|
187
187
|
openDialog: typeof openDialog;
|
|
188
188
|
openDialogReadonly: typeof openDialogReadonly;
|
|
189
|
-
createItem: (
|
|
190
|
-
importItems: (
|
|
191
|
-
updateItem: (
|
|
192
|
-
deleteItem: (
|
|
193
|
-
reload: (
|
|
194
|
-
setSearch: (
|
|
189
|
+
createItem: (item: Record<string, any>, callback?: FormDialogCallback, importing?: boolean) => Promise<any>;
|
|
190
|
+
importItems: (importItemsList: Record<string, any>[], callback?: FormDialogCallback) => void;
|
|
191
|
+
updateItem: (item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>;
|
|
192
|
+
deleteItem: (item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>;
|
|
193
|
+
reload: () => void;
|
|
194
|
+
setSearch: (keyword: string) => void;
|
|
195
195
|
canServerPageable: import("vue").ComputedRef<boolean>;
|
|
196
196
|
canServerSearch: import("vue").ComputedRef<boolean>;
|
|
197
197
|
canCreate: import("vue").ComputedRef<boolean>;
|
|
@@ -203,12 +203,12 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
203
203
|
} | {
|
|
204
204
|
openDialog: typeof openDialog;
|
|
205
205
|
openDialogReadonly: typeof openDialogReadonly;
|
|
206
|
-
createItem: (
|
|
207
|
-
importItems: (
|
|
208
|
-
updateItem: (
|
|
209
|
-
deleteItem: (
|
|
210
|
-
reload: (
|
|
211
|
-
setSearch: (
|
|
206
|
+
createItem: (item: Record<string, any>, callback?: FormDialogCallback, importing?: boolean) => Promise<any>;
|
|
207
|
+
importItems: (importItemsList: Record<string, any>[], callback?: FormDialogCallback) => void;
|
|
208
|
+
updateItem: (item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>;
|
|
209
|
+
deleteItem: (item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>;
|
|
210
|
+
reload: () => void;
|
|
211
|
+
setSearch: (keyword: string) => void;
|
|
212
212
|
canServerPageable: boolean;
|
|
213
213
|
canServerSearch: boolean;
|
|
214
214
|
canCreate: boolean;
|
|
@@ -34,12 +34,12 @@ declare var __VLS_8: {
|
|
|
34
34
|
operation: {
|
|
35
35
|
openDialog: typeof openDialog;
|
|
36
36
|
openDialogReadonly: typeof openDialogReadonly;
|
|
37
|
-
createItem: (
|
|
38
|
-
importItems: (
|
|
39
|
-
updateItem: (
|
|
40
|
-
deleteItem: (
|
|
41
|
-
reload: (
|
|
42
|
-
setSearch: (
|
|
37
|
+
createItem: (item: Record<string, any>, callback?: FormDialogCallback, importing?: boolean) => Promise<any>;
|
|
38
|
+
importItems: (importItemsList: Record<string, any>[], callback?: FormDialogCallback) => void;
|
|
39
|
+
updateItem: (item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>;
|
|
40
|
+
deleteItem: (item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>;
|
|
41
|
+
reload: () => void;
|
|
42
|
+
setSearch: (keyword: string) => void;
|
|
43
43
|
canServerPageable: boolean;
|
|
44
44
|
canServerSearch: boolean;
|
|
45
45
|
canCreate: boolean;
|
|
@@ -50,18 +50,18 @@ declare var __VLS_8: {
|
|
|
50
50
|
onlyOwnerOverridePermission: string | string[] | undefined;
|
|
51
51
|
};
|
|
52
52
|
}, __VLS_34: {
|
|
53
|
-
reload: (
|
|
53
|
+
reload: () => void;
|
|
54
54
|
}, __VLS_50: {
|
|
55
55
|
items: Record<string, any>[];
|
|
56
56
|
operation: {
|
|
57
57
|
openDialog: typeof openDialog;
|
|
58
58
|
openDialogReadonly: typeof openDialogReadonly;
|
|
59
|
-
createItem: (
|
|
60
|
-
importItems: (
|
|
61
|
-
updateItem: (
|
|
62
|
-
deleteItem: (
|
|
63
|
-
reload: (
|
|
64
|
-
setSearch: (
|
|
59
|
+
createItem: (item: Record<string, any>, callback?: FormDialogCallback, importing?: boolean) => Promise<any>;
|
|
60
|
+
importItems: (importItemsList: Record<string, any>[], callback?: FormDialogCallback) => void;
|
|
61
|
+
updateItem: (item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>;
|
|
62
|
+
deleteItem: (item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>;
|
|
63
|
+
reload: () => void;
|
|
64
|
+
setSearch: (keyword: string) => void;
|
|
65
65
|
canServerPageable: boolean;
|
|
66
66
|
canServerSearch: boolean;
|
|
67
67
|
canCreate: boolean;
|
|
@@ -76,12 +76,12 @@ declare var __VLS_8: {
|
|
|
76
76
|
operation: {
|
|
77
77
|
openDialog: typeof openDialog;
|
|
78
78
|
openDialogReadonly: typeof openDialogReadonly;
|
|
79
|
-
createItem: (
|
|
80
|
-
importItems: (
|
|
81
|
-
updateItem: (
|
|
82
|
-
deleteItem: (
|
|
83
|
-
reload: (
|
|
84
|
-
setSearch: (
|
|
79
|
+
createItem: (item: Record<string, any>, callback?: FormDialogCallback, importing?: boolean) => Promise<any>;
|
|
80
|
+
importItems: (importItemsList: Record<string, any>[], callback?: FormDialogCallback) => void;
|
|
81
|
+
updateItem: (item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>;
|
|
82
|
+
deleteItem: (item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>;
|
|
83
|
+
reload: () => void;
|
|
84
|
+
setSearch: (keyword: string) => void;
|
|
85
85
|
canServerPageable: boolean;
|
|
86
86
|
canServerSearch: boolean;
|
|
87
87
|
canCreate: boolean;
|
|
@@ -95,12 +95,12 @@ declare var __VLS_8: {
|
|
|
95
95
|
operation: {
|
|
96
96
|
openDialog: typeof openDialog;
|
|
97
97
|
openDialogReadonly: typeof openDialogReadonly;
|
|
98
|
-
createItem: (
|
|
99
|
-
importItems: (
|
|
100
|
-
updateItem: (
|
|
101
|
-
deleteItem: (
|
|
102
|
-
reload: (
|
|
103
|
-
setSearch: (
|
|
98
|
+
createItem: (item: Record<string, any>, callback?: FormDialogCallback, importing?: boolean) => Promise<any>;
|
|
99
|
+
importItems: (importItemsList: Record<string, any>[], callback?: FormDialogCallback) => void;
|
|
100
|
+
updateItem: (item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>;
|
|
101
|
+
deleteItem: (item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>;
|
|
102
|
+
reload: () => void;
|
|
103
|
+
setSearch: (keyword: string) => void;
|
|
104
104
|
canServerPageable: boolean;
|
|
105
105
|
canServerSearch: boolean;
|
|
106
106
|
canCreate: boolean;
|
|
@@ -114,12 +114,12 @@ declare var __VLS_8: {
|
|
|
114
114
|
operation: {
|
|
115
115
|
openDialog: typeof openDialog;
|
|
116
116
|
openDialogReadonly: typeof openDialogReadonly;
|
|
117
|
-
createItem: (
|
|
118
|
-
importItems: (
|
|
119
|
-
updateItem: (
|
|
120
|
-
deleteItem: (
|
|
121
|
-
reload: (
|
|
122
|
-
setSearch: (
|
|
117
|
+
createItem: (item: Record<string, any>, callback?: FormDialogCallback, importing?: boolean) => Promise<any>;
|
|
118
|
+
importItems: (importItemsList: Record<string, any>[], callback?: FormDialogCallback) => void;
|
|
119
|
+
updateItem: (item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>;
|
|
120
|
+
deleteItem: (item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>;
|
|
121
|
+
reload: () => void;
|
|
122
|
+
setSearch: (keyword: string) => void;
|
|
123
123
|
canServerPageable: boolean;
|
|
124
124
|
canServerSearch: boolean;
|
|
125
125
|
canCreate: boolean;
|
|
@@ -165,16 +165,16 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
165
165
|
onlyOwnerEdit: boolean;
|
|
166
166
|
api: boolean;
|
|
167
167
|
}>>, {
|
|
168
|
-
reload: (
|
|
168
|
+
reload: () => void;
|
|
169
169
|
operation: import("vue").Ref<{
|
|
170
170
|
openDialog: typeof openDialog;
|
|
171
171
|
openDialogReadonly: typeof openDialogReadonly;
|
|
172
|
-
createItem: (
|
|
173
|
-
importItems: (
|
|
174
|
-
updateItem: (
|
|
175
|
-
deleteItem: (
|
|
176
|
-
reload: (
|
|
177
|
-
setSearch: (
|
|
172
|
+
createItem: (item: Record<string, any>, callback?: FormDialogCallback, importing?: boolean) => Promise<any>;
|
|
173
|
+
importItems: (importItemsList: Record<string, any>[], callback?: FormDialogCallback) => void;
|
|
174
|
+
updateItem: (item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>;
|
|
175
|
+
deleteItem: (item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>;
|
|
176
|
+
reload: () => void;
|
|
177
|
+
setSearch: (keyword: string) => void;
|
|
178
178
|
canServerPageable: boolean;
|
|
179
179
|
canServerSearch: boolean;
|
|
180
180
|
canCreate: boolean;
|
|
@@ -186,12 +186,12 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
186
186
|
}, {
|
|
187
187
|
openDialog: typeof openDialog;
|
|
188
188
|
openDialogReadonly: typeof openDialogReadonly;
|
|
189
|
-
createItem: (
|
|
190
|
-
importItems: (
|
|
191
|
-
updateItem: (
|
|
192
|
-
deleteItem: (
|
|
193
|
-
reload: (
|
|
194
|
-
setSearch: (
|
|
189
|
+
createItem: (item: Record<string, any>, callback?: FormDialogCallback, importing?: boolean) => Promise<any>;
|
|
190
|
+
importItems: (importItemsList: Record<string, any>[], callback?: FormDialogCallback) => void;
|
|
191
|
+
updateItem: (item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>;
|
|
192
|
+
deleteItem: (item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>;
|
|
193
|
+
reload: () => void;
|
|
194
|
+
setSearch: (keyword: string) => void;
|
|
195
195
|
canServerPageable: import("vue").ComputedRef<boolean>;
|
|
196
196
|
canServerSearch: import("vue").ComputedRef<boolean>;
|
|
197
197
|
canCreate: import("vue").ComputedRef<boolean>;
|
|
@@ -203,12 +203,12 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
203
203
|
} | {
|
|
204
204
|
openDialog: typeof openDialog;
|
|
205
205
|
openDialogReadonly: typeof openDialogReadonly;
|
|
206
|
-
createItem: (
|
|
207
|
-
importItems: (
|
|
208
|
-
updateItem: (
|
|
209
|
-
deleteItem: (
|
|
210
|
-
reload: (
|
|
211
|
-
setSearch: (
|
|
206
|
+
createItem: (item: Record<string, any>, callback?: FormDialogCallback, importing?: boolean) => Promise<any>;
|
|
207
|
+
importItems: (importItemsList: Record<string, any>[], callback?: FormDialogCallback) => void;
|
|
208
|
+
updateItem: (item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>;
|
|
209
|
+
deleteItem: (item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>;
|
|
210
|
+
reload: () => void;
|
|
211
|
+
setSearch: (keyword: string) => void;
|
|
212
212
|
canServerPageable: boolean;
|
|
213
213
|
canServerSearch: boolean;
|
|
214
214
|
canCreate: boolean;
|
|
@@ -37,12 +37,12 @@ declare function openDialog(item?: object): void;
|
|
|
37
37
|
declare var __VLS_15: {
|
|
38
38
|
operation: {
|
|
39
39
|
openDialog: typeof openDialog;
|
|
40
|
-
createItem: (
|
|
41
|
-
importItems: (
|
|
42
|
-
updateItem: (
|
|
43
|
-
deleteItem: (
|
|
44
|
-
reload: (
|
|
45
|
-
setSearch: (
|
|
40
|
+
createItem: (item: Record<string, any>, callback?: import("../../types/formDialog.js").FormDialogCallback, importing?: boolean) => Promise<any>;
|
|
41
|
+
importItems: (importItemsList: Record<string, any>[], callback?: import("../../types/formDialog.js").FormDialogCallback) => void;
|
|
42
|
+
updateItem: (item: Record<string, any>, callback?: import("../../types/formDialog.js").FormDialogCallback) => Promise<any>;
|
|
43
|
+
deleteItem: (item: Record<string, any>, callback?: import("../../types/formDialog.js").FormDialogCallback) => Promise<any>;
|
|
44
|
+
reload: () => void;
|
|
45
|
+
setSearch: (keyword: string) => void;
|
|
46
46
|
canServerPageable: boolean;
|
|
47
47
|
canServerSearch: boolean;
|
|
48
48
|
canCreate: boolean;
|
|
@@ -73,12 +73,12 @@ declare var __VLS_15: {
|
|
|
73
73
|
item: import("vuetify/lib/components/VDataIterator/composables/items.mjs").DataIteratorItem<Record<string, any>>;
|
|
74
74
|
operation: {
|
|
75
75
|
openDialog: typeof openDialog;
|
|
76
|
-
createItem: (
|
|
77
|
-
importItems: (
|
|
78
|
-
updateItem: (
|
|
79
|
-
deleteItem: (
|
|
80
|
-
reload: (
|
|
81
|
-
setSearch: (
|
|
76
|
+
createItem: (item: Record<string, any>, callback?: import("../../types/formDialog.js").FormDialogCallback, importing?: boolean) => Promise<any>;
|
|
77
|
+
importItems: (importItemsList: Record<string, any>[], callback?: import("../../types/formDialog.js").FormDialogCallback) => void;
|
|
78
|
+
updateItem: (item: Record<string, any>, callback?: import("../../types/formDialog.js").FormDialogCallback) => Promise<any>;
|
|
79
|
+
deleteItem: (item: Record<string, any>, callback?: import("../../types/formDialog.js").FormDialogCallback) => Promise<any>;
|
|
80
|
+
reload: () => void;
|
|
81
|
+
setSearch: (keyword: string) => void;
|
|
82
82
|
canServerPageable: boolean;
|
|
83
83
|
canServerSearch: boolean;
|
|
84
84
|
canCreate: boolean;
|
|
@@ -92,12 +92,12 @@ declare var __VLS_15: {
|
|
|
92
92
|
items: Record<string, any>[];
|
|
93
93
|
operation: {
|
|
94
94
|
openDialog: typeof openDialog;
|
|
95
|
-
createItem: (
|
|
96
|
-
importItems: (
|
|
97
|
-
updateItem: (
|
|
98
|
-
deleteItem: (
|
|
99
|
-
reload: (
|
|
100
|
-
setSearch: (
|
|
95
|
+
createItem: (item: Record<string, any>, callback?: import("../../types/formDialog.js").FormDialogCallback, importing?: boolean) => Promise<any>;
|
|
96
|
+
importItems: (importItemsList: Record<string, any>[], callback?: import("../../types/formDialog.js").FormDialogCallback) => void;
|
|
97
|
+
updateItem: (item: Record<string, any>, callback?: import("../../types/formDialog.js").FormDialogCallback) => Promise<any>;
|
|
98
|
+
deleteItem: (item: Record<string, any>, callback?: import("../../types/formDialog.js").FormDialogCallback) => Promise<any>;
|
|
99
|
+
reload: () => void;
|
|
100
|
+
setSearch: (keyword: string) => void;
|
|
101
101
|
canServerPageable: boolean;
|
|
102
102
|
canServerSearch: boolean;
|
|
103
103
|
canCreate: boolean;
|
|
@@ -124,17 +124,17 @@ declare var __VLS_15: {
|
|
|
124
124
|
itemsCount: number;
|
|
125
125
|
groupedItems: readonly (import("vuetify/lib/components/VDataIterator/composables/items.mjs").DataIteratorItem<Record<string, any>> | import("vuetify/lib/components/VDataTable/composables/group.mjs").Group<import("vuetify/lib/components/VDataIterator/composables/items.mjs").DataIteratorItem<Record<string, any>>> | import("vuetify/lib/components/VDataTable/composables/group.mjs").GroupSummary<import("vuetify/lib/components/VDataIterator/composables/items.mjs").DataIteratorItem<Record<string, any>>>)[];
|
|
126
126
|
}, __VLS_92: {
|
|
127
|
-
reload: (
|
|
127
|
+
reload: () => void;
|
|
128
128
|
}, __VLS_108: {
|
|
129
129
|
items: Record<string, any>[];
|
|
130
130
|
operation: {
|
|
131
131
|
openDialog: typeof openDialog;
|
|
132
|
-
createItem: (
|
|
133
|
-
importItems: (
|
|
134
|
-
updateItem: (
|
|
135
|
-
deleteItem: (
|
|
136
|
-
reload: (
|
|
137
|
-
setSearch: (
|
|
132
|
+
createItem: (item: Record<string, any>, callback?: import("../../types/formDialog.js").FormDialogCallback, importing?: boolean) => Promise<any>;
|
|
133
|
+
importItems: (importItemsList: Record<string, any>[], callback?: import("../../types/formDialog.js").FormDialogCallback) => void;
|
|
134
|
+
updateItem: (item: Record<string, any>, callback?: import("../../types/formDialog.js").FormDialogCallback) => Promise<any>;
|
|
135
|
+
deleteItem: (item: Record<string, any>, callback?: import("../../types/formDialog.js").FormDialogCallback) => Promise<any>;
|
|
136
|
+
reload: () => void;
|
|
137
|
+
setSearch: (keyword: string) => void;
|
|
138
138
|
canServerPageable: boolean;
|
|
139
139
|
canServerSearch: boolean;
|
|
140
140
|
canCreate: boolean;
|
|
@@ -145,12 +145,12 @@ declare var __VLS_15: {
|
|
|
145
145
|
items: Record<string, any>[];
|
|
146
146
|
operation: {
|
|
147
147
|
openDialog: typeof openDialog;
|
|
148
|
-
createItem: (
|
|
149
|
-
importItems: (
|
|
150
|
-
updateItem: (
|
|
151
|
-
deleteItem: (
|
|
152
|
-
reload: (
|
|
153
|
-
setSearch: (
|
|
148
|
+
createItem: (item: Record<string, any>, callback?: import("../../types/formDialog.js").FormDialogCallback, importing?: boolean) => Promise<any>;
|
|
149
|
+
importItems: (importItemsList: Record<string, any>[], callback?: import("../../types/formDialog.js").FormDialogCallback) => void;
|
|
150
|
+
updateItem: (item: Record<string, any>, callback?: import("../../types/formDialog.js").FormDialogCallback) => Promise<any>;
|
|
151
|
+
deleteItem: (item: Record<string, any>, callback?: import("../../types/formDialog.js").FormDialogCallback) => Promise<any>;
|
|
152
|
+
reload: () => void;
|
|
153
|
+
setSearch: (keyword: string) => void;
|
|
154
154
|
canServerPageable: boolean;
|
|
155
155
|
canServerSearch: boolean;
|
|
156
156
|
canCreate: boolean;
|
|
@@ -160,12 +160,12 @@ declare var __VLS_15: {
|
|
|
160
160
|
}, __VLS_175: never, __VLS_176: {
|
|
161
161
|
operation: {
|
|
162
162
|
openDialog: typeof openDialog;
|
|
163
|
-
createItem: (
|
|
164
|
-
importItems: (
|
|
165
|
-
updateItem: (
|
|
166
|
-
deleteItem: (
|
|
167
|
-
reload: (
|
|
168
|
-
setSearch: (
|
|
163
|
+
createItem: (item: Record<string, any>, callback?: import("../../types/formDialog.js").FormDialogCallback, importing?: boolean) => Promise<any>;
|
|
164
|
+
importItems: (importItemsList: Record<string, any>[], callback?: import("../../types/formDialog.js").FormDialogCallback) => void;
|
|
165
|
+
updateItem: (item: Record<string, any>, callback?: import("../../types/formDialog.js").FormDialogCallback) => Promise<any>;
|
|
166
|
+
deleteItem: (item: Record<string, any>, callback?: import("../../types/formDialog.js").FormDialogCallback) => Promise<any>;
|
|
167
|
+
reload: () => void;
|
|
168
|
+
setSearch: (keyword: string) => void;
|
|
169
169
|
canServerPageable: boolean;
|
|
170
170
|
canServerSearch: boolean;
|
|
171
171
|
canCreate: boolean;
|
|
@@ -175,12 +175,12 @@ declare var __VLS_15: {
|
|
|
175
175
|
}, __VLS_201: never, __VLS_202: {
|
|
176
176
|
operation: {
|
|
177
177
|
openDialog: typeof openDialog;
|
|
178
|
-
createItem: (
|
|
179
|
-
importItems: (
|
|
180
|
-
updateItem: (
|
|
181
|
-
deleteItem: (
|
|
182
|
-
reload: (
|
|
183
|
-
setSearch: (
|
|
178
|
+
createItem: (item: Record<string, any>, callback?: import("../../types/formDialog.js").FormDialogCallback, importing?: boolean) => Promise<any>;
|
|
179
|
+
importItems: (importItemsList: Record<string, any>[], callback?: import("../../types/formDialog.js").FormDialogCallback) => void;
|
|
180
|
+
updateItem: (item: Record<string, any>, callback?: import("../../types/formDialog.js").FormDialogCallback) => Promise<any>;
|
|
181
|
+
deleteItem: (item: Record<string, any>, callback?: import("../../types/formDialog.js").FormDialogCallback) => Promise<any>;
|
|
182
|
+
reload: () => void;
|
|
183
|
+
setSearch: (keyword: string) => void;
|
|
184
184
|
canServerPageable: boolean;
|
|
185
185
|
canServerSearch: boolean;
|
|
186
186
|
canCreate: boolean;
|
|
@@ -233,15 +233,15 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
233
233
|
itemsPerPage: number;
|
|
234
234
|
api: boolean;
|
|
235
235
|
}>>, {
|
|
236
|
-
reload: (
|
|
236
|
+
reload: () => void;
|
|
237
237
|
operation: import("vue").Ref<{
|
|
238
238
|
openDialog: typeof openDialog;
|
|
239
|
-
createItem: (
|
|
240
|
-
importItems: (
|
|
241
|
-
updateItem: (
|
|
242
|
-
deleteItem: (
|
|
243
|
-
reload: (
|
|
244
|
-
setSearch: (
|
|
239
|
+
createItem: (item: Record<string, any>, callback?: import("../../types/formDialog.js").FormDialogCallback, importing?: boolean) => Promise<any>;
|
|
240
|
+
importItems: (importItemsList: Record<string, any>[], callback?: import("../../types/formDialog.js").FormDialogCallback) => void;
|
|
241
|
+
updateItem: (item: Record<string, any>, callback?: import("../../types/formDialog.js").FormDialogCallback) => Promise<any>;
|
|
242
|
+
deleteItem: (item: Record<string, any>, callback?: import("../../types/formDialog.js").FormDialogCallback) => Promise<any>;
|
|
243
|
+
reload: () => void;
|
|
244
|
+
setSearch: (keyword: string) => void;
|
|
245
245
|
canServerPageable: boolean;
|
|
246
246
|
canServerSearch: boolean;
|
|
247
247
|
canCreate: boolean;
|
|
@@ -249,12 +249,12 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
249
249
|
canDelete: boolean;
|
|
250
250
|
}, {
|
|
251
251
|
openDialog: typeof openDialog;
|
|
252
|
-
createItem: (
|
|
253
|
-
importItems: (
|
|
254
|
-
updateItem: (
|
|
255
|
-
deleteItem: (
|
|
256
|
-
reload: (
|
|
257
|
-
setSearch: (
|
|
252
|
+
createItem: (item: Record<string, any>, callback?: import("../../types/formDialog.js").FormDialogCallback, importing?: boolean) => Promise<any>;
|
|
253
|
+
importItems: (importItemsList: Record<string, any>[], callback?: import("../../types/formDialog.js").FormDialogCallback) => void;
|
|
254
|
+
updateItem: (item: Record<string, any>, callback?: import("../../types/formDialog.js").FormDialogCallback) => Promise<any>;
|
|
255
|
+
deleteItem: (item: Record<string, any>, callback?: import("../../types/formDialog.js").FormDialogCallback) => Promise<any>;
|
|
256
|
+
reload: () => void;
|
|
257
|
+
setSearch: (keyword: string) => void;
|
|
258
258
|
canServerPageable: import("vue").ComputedRef<boolean>;
|
|
259
259
|
canServerSearch: import("vue").ComputedRef<boolean>;
|
|
260
260
|
canCreate: import("vue").ComputedRef<boolean>;
|
|
@@ -262,12 +262,12 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
262
262
|
canDelete: import("vue").ComputedRef<boolean>;
|
|
263
263
|
} | {
|
|
264
264
|
openDialog: typeof openDialog;
|
|
265
|
-
createItem: (
|
|
266
|
-
importItems: (
|
|
267
|
-
updateItem: (
|
|
268
|
-
deleteItem: (
|
|
269
|
-
reload: (
|
|
270
|
-
setSearch: (
|
|
265
|
+
createItem: (item: Record<string, any>, callback?: import("../../types/formDialog.js").FormDialogCallback, importing?: boolean) => Promise<any>;
|
|
266
|
+
importItems: (importItemsList: Record<string, any>[], callback?: import("../../types/formDialog.js").FormDialogCallback) => void;
|
|
267
|
+
updateItem: (item: Record<string, any>, callback?: import("../../types/formDialog.js").FormDialogCallback) => Promise<any>;
|
|
268
|
+
deleteItem: (item: Record<string, any>, callback?: import("../../types/formDialog.js").FormDialogCallback) => Promise<any>;
|
|
269
|
+
reload: () => void;
|
|
270
|
+
setSearch: (keyword: string) => void;
|
|
271
271
|
canServerPageable: boolean;
|
|
272
272
|
canServerSearch: boolean;
|
|
273
273
|
canCreate: boolean;
|
|
@@ -37,12 +37,12 @@ declare function openDialog(item?: object): void;
|
|
|
37
37
|
declare var __VLS_15: {
|
|
38
38
|
operation: {
|
|
39
39
|
openDialog: typeof openDialog;
|
|
40
|
-
createItem: (
|
|
41
|
-
importItems: (
|
|
42
|
-
updateItem: (
|
|
43
|
-
deleteItem: (
|
|
44
|
-
reload: (
|
|
45
|
-
setSearch: (
|
|
40
|
+
createItem: (item: Record<string, any>, callback?: import("../../types/formDialog.js").FormDialogCallback, importing?: boolean) => Promise<any>;
|
|
41
|
+
importItems: (importItemsList: Record<string, any>[], callback?: import("../../types/formDialog.js").FormDialogCallback) => void;
|
|
42
|
+
updateItem: (item: Record<string, any>, callback?: import("../../types/formDialog.js").FormDialogCallback) => Promise<any>;
|
|
43
|
+
deleteItem: (item: Record<string, any>, callback?: import("../../types/formDialog.js").FormDialogCallback) => Promise<any>;
|
|
44
|
+
reload: () => void;
|
|
45
|
+
setSearch: (keyword: string) => void;
|
|
46
46
|
canServerPageable: boolean;
|
|
47
47
|
canServerSearch: boolean;
|
|
48
48
|
canCreate: boolean;
|
|
@@ -73,12 +73,12 @@ declare var __VLS_15: {
|
|
|
73
73
|
item: import("vuetify/lib/components/VDataIterator/composables/items.mjs").DataIteratorItem<Record<string, any>>;
|
|
74
74
|
operation: {
|
|
75
75
|
openDialog: typeof openDialog;
|
|
76
|
-
createItem: (
|
|
77
|
-
importItems: (
|
|
78
|
-
updateItem: (
|
|
79
|
-
deleteItem: (
|
|
80
|
-
reload: (
|
|
81
|
-
setSearch: (
|
|
76
|
+
createItem: (item: Record<string, any>, callback?: import("../../types/formDialog.js").FormDialogCallback, importing?: boolean) => Promise<any>;
|
|
77
|
+
importItems: (importItemsList: Record<string, any>[], callback?: import("../../types/formDialog.js").FormDialogCallback) => void;
|
|
78
|
+
updateItem: (item: Record<string, any>, callback?: import("../../types/formDialog.js").FormDialogCallback) => Promise<any>;
|
|
79
|
+
deleteItem: (item: Record<string, any>, callback?: import("../../types/formDialog.js").FormDialogCallback) => Promise<any>;
|
|
80
|
+
reload: () => void;
|
|
81
|
+
setSearch: (keyword: string) => void;
|
|
82
82
|
canServerPageable: boolean;
|
|
83
83
|
canServerSearch: boolean;
|
|
84
84
|
canCreate: boolean;
|
|
@@ -92,12 +92,12 @@ declare var __VLS_15: {
|
|
|
92
92
|
items: Record<string, any>[];
|
|
93
93
|
operation: {
|
|
94
94
|
openDialog: typeof openDialog;
|
|
95
|
-
createItem: (
|
|
96
|
-
importItems: (
|
|
97
|
-
updateItem: (
|
|
98
|
-
deleteItem: (
|
|
99
|
-
reload: (
|
|
100
|
-
setSearch: (
|
|
95
|
+
createItem: (item: Record<string, any>, callback?: import("../../types/formDialog.js").FormDialogCallback, importing?: boolean) => Promise<any>;
|
|
96
|
+
importItems: (importItemsList: Record<string, any>[], callback?: import("../../types/formDialog.js").FormDialogCallback) => void;
|
|
97
|
+
updateItem: (item: Record<string, any>, callback?: import("../../types/formDialog.js").FormDialogCallback) => Promise<any>;
|
|
98
|
+
deleteItem: (item: Record<string, any>, callback?: import("../../types/formDialog.js").FormDialogCallback) => Promise<any>;
|
|
99
|
+
reload: () => void;
|
|
100
|
+
setSearch: (keyword: string) => void;
|
|
101
101
|
canServerPageable: boolean;
|
|
102
102
|
canServerSearch: boolean;
|
|
103
103
|
canCreate: boolean;
|
|
@@ -124,17 +124,17 @@ declare var __VLS_15: {
|
|
|
124
124
|
itemsCount: number;
|
|
125
125
|
groupedItems: readonly (import("vuetify/lib/components/VDataIterator/composables/items.mjs").DataIteratorItem<Record<string, any>> | import("vuetify/lib/components/VDataTable/composables/group.mjs").Group<import("vuetify/lib/components/VDataIterator/composables/items.mjs").DataIteratorItem<Record<string, any>>> | import("vuetify/lib/components/VDataTable/composables/group.mjs").GroupSummary<import("vuetify/lib/components/VDataIterator/composables/items.mjs").DataIteratorItem<Record<string, any>>>)[];
|
|
126
126
|
}, __VLS_92: {
|
|
127
|
-
reload: (
|
|
127
|
+
reload: () => void;
|
|
128
128
|
}, __VLS_108: {
|
|
129
129
|
items: Record<string, any>[];
|
|
130
130
|
operation: {
|
|
131
131
|
openDialog: typeof openDialog;
|
|
132
|
-
createItem: (
|
|
133
|
-
importItems: (
|
|
134
|
-
updateItem: (
|
|
135
|
-
deleteItem: (
|
|
136
|
-
reload: (
|
|
137
|
-
setSearch: (
|
|
132
|
+
createItem: (item: Record<string, any>, callback?: import("../../types/formDialog.js").FormDialogCallback, importing?: boolean) => Promise<any>;
|
|
133
|
+
importItems: (importItemsList: Record<string, any>[], callback?: import("../../types/formDialog.js").FormDialogCallback) => void;
|
|
134
|
+
updateItem: (item: Record<string, any>, callback?: import("../../types/formDialog.js").FormDialogCallback) => Promise<any>;
|
|
135
|
+
deleteItem: (item: Record<string, any>, callback?: import("../../types/formDialog.js").FormDialogCallback) => Promise<any>;
|
|
136
|
+
reload: () => void;
|
|
137
|
+
setSearch: (keyword: string) => void;
|
|
138
138
|
canServerPageable: boolean;
|
|
139
139
|
canServerSearch: boolean;
|
|
140
140
|
canCreate: boolean;
|
|
@@ -145,12 +145,12 @@ declare var __VLS_15: {
|
|
|
145
145
|
items: Record<string, any>[];
|
|
146
146
|
operation: {
|
|
147
147
|
openDialog: typeof openDialog;
|
|
148
|
-
createItem: (
|
|
149
|
-
importItems: (
|
|
150
|
-
updateItem: (
|
|
151
|
-
deleteItem: (
|
|
152
|
-
reload: (
|
|
153
|
-
setSearch: (
|
|
148
|
+
createItem: (item: Record<string, any>, callback?: import("../../types/formDialog.js").FormDialogCallback, importing?: boolean) => Promise<any>;
|
|
149
|
+
importItems: (importItemsList: Record<string, any>[], callback?: import("../../types/formDialog.js").FormDialogCallback) => void;
|
|
150
|
+
updateItem: (item: Record<string, any>, callback?: import("../../types/formDialog.js").FormDialogCallback) => Promise<any>;
|
|
151
|
+
deleteItem: (item: Record<string, any>, callback?: import("../../types/formDialog.js").FormDialogCallback) => Promise<any>;
|
|
152
|
+
reload: () => void;
|
|
153
|
+
setSearch: (keyword: string) => void;
|
|
154
154
|
canServerPageable: boolean;
|
|
155
155
|
canServerSearch: boolean;
|
|
156
156
|
canCreate: boolean;
|
|
@@ -160,12 +160,12 @@ declare var __VLS_15: {
|
|
|
160
160
|
}, __VLS_175: never, __VLS_176: {
|
|
161
161
|
operation: {
|
|
162
162
|
openDialog: typeof openDialog;
|
|
163
|
-
createItem: (
|
|
164
|
-
importItems: (
|
|
165
|
-
updateItem: (
|
|
166
|
-
deleteItem: (
|
|
167
|
-
reload: (
|
|
168
|
-
setSearch: (
|
|
163
|
+
createItem: (item: Record<string, any>, callback?: import("../../types/formDialog.js").FormDialogCallback, importing?: boolean) => Promise<any>;
|
|
164
|
+
importItems: (importItemsList: Record<string, any>[], callback?: import("../../types/formDialog.js").FormDialogCallback) => void;
|
|
165
|
+
updateItem: (item: Record<string, any>, callback?: import("../../types/formDialog.js").FormDialogCallback) => Promise<any>;
|
|
166
|
+
deleteItem: (item: Record<string, any>, callback?: import("../../types/formDialog.js").FormDialogCallback) => Promise<any>;
|
|
167
|
+
reload: () => void;
|
|
168
|
+
setSearch: (keyword: string) => void;
|
|
169
169
|
canServerPageable: boolean;
|
|
170
170
|
canServerSearch: boolean;
|
|
171
171
|
canCreate: boolean;
|
|
@@ -175,12 +175,12 @@ declare var __VLS_15: {
|
|
|
175
175
|
}, __VLS_201: never, __VLS_202: {
|
|
176
176
|
operation: {
|
|
177
177
|
openDialog: typeof openDialog;
|
|
178
|
-
createItem: (
|
|
179
|
-
importItems: (
|
|
180
|
-
updateItem: (
|
|
181
|
-
deleteItem: (
|
|
182
|
-
reload: (
|
|
183
|
-
setSearch: (
|
|
178
|
+
createItem: (item: Record<string, any>, callback?: import("../../types/formDialog.js").FormDialogCallback, importing?: boolean) => Promise<any>;
|
|
179
|
+
importItems: (importItemsList: Record<string, any>[], callback?: import("../../types/formDialog.js").FormDialogCallback) => void;
|
|
180
|
+
updateItem: (item: Record<string, any>, callback?: import("../../types/formDialog.js").FormDialogCallback) => Promise<any>;
|
|
181
|
+
deleteItem: (item: Record<string, any>, callback?: import("../../types/formDialog.js").FormDialogCallback) => Promise<any>;
|
|
182
|
+
reload: () => void;
|
|
183
|
+
setSearch: (keyword: string) => void;
|
|
184
184
|
canServerPageable: boolean;
|
|
185
185
|
canServerSearch: boolean;
|
|
186
186
|
canCreate: boolean;
|
|
@@ -233,15 +233,15 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
233
233
|
itemsPerPage: number;
|
|
234
234
|
api: boolean;
|
|
235
235
|
}>>, {
|
|
236
|
-
reload: (
|
|
236
|
+
reload: () => void;
|
|
237
237
|
operation: import("vue").Ref<{
|
|
238
238
|
openDialog: typeof openDialog;
|
|
239
|
-
createItem: (
|
|
240
|
-
importItems: (
|
|
241
|
-
updateItem: (
|
|
242
|
-
deleteItem: (
|
|
243
|
-
reload: (
|
|
244
|
-
setSearch: (
|
|
239
|
+
createItem: (item: Record<string, any>, callback?: import("../../types/formDialog.js").FormDialogCallback, importing?: boolean) => Promise<any>;
|
|
240
|
+
importItems: (importItemsList: Record<string, any>[], callback?: import("../../types/formDialog.js").FormDialogCallback) => void;
|
|
241
|
+
updateItem: (item: Record<string, any>, callback?: import("../../types/formDialog.js").FormDialogCallback) => Promise<any>;
|
|
242
|
+
deleteItem: (item: Record<string, any>, callback?: import("../../types/formDialog.js").FormDialogCallback) => Promise<any>;
|
|
243
|
+
reload: () => void;
|
|
244
|
+
setSearch: (keyword: string) => void;
|
|
245
245
|
canServerPageable: boolean;
|
|
246
246
|
canServerSearch: boolean;
|
|
247
247
|
canCreate: boolean;
|
|
@@ -249,12 +249,12 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
249
249
|
canDelete: boolean;
|
|
250
250
|
}, {
|
|
251
251
|
openDialog: typeof openDialog;
|
|
252
|
-
createItem: (
|
|
253
|
-
importItems: (
|
|
254
|
-
updateItem: (
|
|
255
|
-
deleteItem: (
|
|
256
|
-
reload: (
|
|
257
|
-
setSearch: (
|
|
252
|
+
createItem: (item: Record<string, any>, callback?: import("../../types/formDialog.js").FormDialogCallback, importing?: boolean) => Promise<any>;
|
|
253
|
+
importItems: (importItemsList: Record<string, any>[], callback?: import("../../types/formDialog.js").FormDialogCallback) => void;
|
|
254
|
+
updateItem: (item: Record<string, any>, callback?: import("../../types/formDialog.js").FormDialogCallback) => Promise<any>;
|
|
255
|
+
deleteItem: (item: Record<string, any>, callback?: import("../../types/formDialog.js").FormDialogCallback) => Promise<any>;
|
|
256
|
+
reload: () => void;
|
|
257
|
+
setSearch: (keyword: string) => void;
|
|
258
258
|
canServerPageable: import("vue").ComputedRef<boolean>;
|
|
259
259
|
canServerSearch: import("vue").ComputedRef<boolean>;
|
|
260
260
|
canCreate: import("vue").ComputedRef<boolean>;
|
|
@@ -262,12 +262,12 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
262
262
|
canDelete: import("vue").ComputedRef<boolean>;
|
|
263
263
|
} | {
|
|
264
264
|
openDialog: typeof openDialog;
|
|
265
|
-
createItem: (
|
|
266
|
-
importItems: (
|
|
267
|
-
updateItem: (
|
|
268
|
-
deleteItem: (
|
|
269
|
-
reload: (
|
|
270
|
-
setSearch: (
|
|
265
|
+
createItem: (item: Record<string, any>, callback?: import("../../types/formDialog.js").FormDialogCallback, importing?: boolean) => Promise<any>;
|
|
266
|
+
importItems: (importItemsList: Record<string, any>[], callback?: import("../../types/formDialog.js").FormDialogCallback) => void;
|
|
267
|
+
updateItem: (item: Record<string, any>, callback?: import("../../types/formDialog.js").FormDialogCallback) => Promise<any>;
|
|
268
|
+
deleteItem: (item: Record<string, any>, callback?: import("../../types/formDialog.js").FormDialogCallback) => Promise<any>;
|
|
269
|
+
reload: () => void;
|
|
270
|
+
setSearch: (keyword: string) => void;
|
|
271
271
|
canServerPageable: boolean;
|
|
272
272
|
canServerSearch: boolean;
|
|
273
273
|
canCreate: boolean;
|
|
@@ -1,6 +1,54 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
2
|
+
* Reactive alert queue shared between `createAlert()` (provider) and `useAlert()` (consumer).
|
|
3
|
+
*
|
|
4
|
+
* ## Setup
|
|
5
|
+
* `createAlert()` must be called **once** in an ancestor component — typically the root
|
|
6
|
+
* `app.vue` in a Nuxt app — to register the provider via Vue `provide()`. The `<Alert />`
|
|
7
|
+
* component only *consumes* the queue; it does not set it up. If no ancestor calls
|
|
8
|
+
* `createAlert()`, every `useAlert()` call returns `null` and toast pushes will throw.
|
|
9
|
+
*
|
|
10
|
+
* ```vue
|
|
11
|
+
* <!-- app.vue -->
|
|
12
|
+
* <script lang="ts" setup>
|
|
13
|
+
* createAlert()
|
|
14
|
+
* </script>
|
|
15
|
+
*
|
|
16
|
+
* <template>
|
|
17
|
+
* <VApp>
|
|
18
|
+
* <NuxtLayout><NuxtPage /></NuxtLayout>
|
|
19
|
+
* <DialogHost />
|
|
20
|
+
* <Alert />
|
|
21
|
+
* </VApp>
|
|
22
|
+
* </template>
|
|
23
|
+
* ```
|
|
24
|
+
*
|
|
25
|
+
* ## Usage
|
|
26
|
+
* `useAlert()` returns an `AlertProvide | null`. There are **no** convenience methods
|
|
27
|
+
* like `.success()` / `.error()` / `.warning()` / `.info()` — push items via `addAlert`:
|
|
28
|
+
*
|
|
29
|
+
* ```ts
|
|
30
|
+
* const alert = useAlert()
|
|
31
|
+
* alert?.addAlert({ alertType: 'success', message: 'Saved' })
|
|
32
|
+
* alert?.addAlert({ alertType: 'error', message: 'Failed: ' + err.message })
|
|
33
|
+
* alert?.addAlert({ alertType: 'warning', message: 'Check your input' })
|
|
34
|
+
* alert?.addAlert({ alertType: 'info', message: 'Processing...' })
|
|
35
|
+
* ```
|
|
36
|
+
*
|
|
37
|
+
* `alertType` must be one of `'success' | 'error' | 'warning' | 'info'`. `message` is
|
|
38
|
+
* required — items without a `message` are silently dropped. Optional fields:
|
|
39
|
+
* `alertLocation` (default `'default'`, lets multiple `<Alert />` hosts filter),
|
|
40
|
+
* `alertExpireIn` (ms, default 60000), `alertIcon`, `data`.
|
|
41
|
+
*
|
|
42
|
+
* Always null-check the handle: `alert?.addAlert(...)`.
|
|
43
|
+
*
|
|
44
|
+
* ## Returned API (`AlertProvide`)
|
|
45
|
+
* - `addAlert(item)` — push a new alert onto the queue.
|
|
46
|
+
* - `takeAlert(location?)` — pop the next alert for the given location (default `'default'`).
|
|
47
|
+
* - `hasAlert(location?)` — whether anything is queued for the given location.
|
|
48
|
+
* - `clear()` — drop all queued alerts.
|
|
49
|
+
* - `items` — the underlying reactive ref (for custom consumers).
|
|
50
|
+
*
|
|
51
|
+
* Expired items (past `alertDateTime + alertExpireIn`) are auto-pruned once per second.
|
|
4
52
|
*/
|
|
5
53
|
import { type InjectionKey, type Ref } from 'vue';
|
|
6
54
|
import type { AlertItem } from '../types/alert.js';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* useApiLookupList loads and normalizes lookup options for fields that depend on remote or cached reference lists
|
|
3
|
-
*
|
|
2
|
+
* useApiLookupList loads and normalizes lookup options for fields that depend on remote or cached reference lists.
|
|
3
|
+
* Routes both the lookup-load Read (props.modelName) and the selection-resolution Read (props.modelSelectedItem)
|
|
4
|
+
* through useApiModelOperation, which owns the API-mode URL/body rules.
|
|
4
5
|
* This doc block is consumed by vue-docgen for generated API documentation.
|
|
5
6
|
*/
|
|
6
7
|
import { type Ref } from 'vue';
|
|
@@ -2,8 +2,7 @@ import { computed, ref, shallowRef, watch } from "vue";
|
|
|
2
2
|
import { watchDebounced } from "@vueuse/core";
|
|
3
3
|
import { union, isEmpty, isArray, sortBy, castArray } from "lodash-es";
|
|
4
4
|
import { useFuzzy } from "./utils/fuzzy.js";
|
|
5
|
-
import {
|
|
6
|
-
import { buildApiEndpoint } from "./apiModel.js";
|
|
5
|
+
import { useApiModelOperation } from "./apiModelOperation.js";
|
|
7
6
|
export function useApiLookupList(props, emit, selectedItems) {
|
|
8
7
|
const modelItems = shallowRef([]);
|
|
9
8
|
const items = shallowRef([]);
|
|
@@ -50,13 +49,8 @@ export function useApiLookupList(props, emit, selectedItems) {
|
|
|
50
49
|
variables[props.serverSearchKey] = searchData.value;
|
|
51
50
|
}
|
|
52
51
|
try {
|
|
53
|
-
const
|
|
54
|
-
|
|
55
|
-
{ fields: queryFields.value, variables },
|
|
56
|
-
void 0,
|
|
57
|
-
void 0,
|
|
58
|
-
props.cache
|
|
59
|
-
);
|
|
52
|
+
const ops = useApiModelOperation(props.modelName);
|
|
53
|
+
const result = await ops.read(queryFields.value, variables, props.cache);
|
|
60
54
|
if (id !== requestId) return;
|
|
61
55
|
if (isArray(result)) {
|
|
62
56
|
modelItems.value = result;
|
|
@@ -127,13 +121,8 @@ export function useApiLookupList(props, emit, selectedItems) {
|
|
|
127
121
|
const key = props.modelSelectedItemKey || "id";
|
|
128
122
|
const variables = { ...props.modelSelectedItemBy || {} };
|
|
129
123
|
variables[key] = stillMissing;
|
|
130
|
-
const
|
|
131
|
-
|
|
132
|
-
{ fields: queryFields.value, variables },
|
|
133
|
-
void 0,
|
|
134
|
-
void 0,
|
|
135
|
-
props.cache
|
|
136
|
-
);
|
|
124
|
+
const ops = useApiModelOperation(props.modelSelectedItem);
|
|
125
|
+
const result = await ops.read(queryFields.value, variables, props.cache);
|
|
137
126
|
const resolved = castArray(result);
|
|
138
127
|
for (const obj of resolved) {
|
|
139
128
|
const v = obj?.[props.itemValue];
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import type { FormDialogCallback } from '../types/formDialog.js';
|
|
2
2
|
import { type GraphqlModelConfigProps } from './graphqlModelOperation.js';
|
|
3
|
-
|
|
4
|
-
headers?: any[];
|
|
5
|
-
}
|
|
6
|
-
interface ApiInitialDataProps {
|
|
7
|
-
initialData?: Record<string, any>;
|
|
8
|
-
}
|
|
3
|
+
import type { HeaderProps, InitialDataProps } from './graphqlModel.js';
|
|
9
4
|
export interface ApiModelProps {
|
|
10
5
|
api?: boolean;
|
|
11
6
|
}
|
|
12
|
-
export type ApiModelComposableProps = GraphqlModelConfigProps & Partial<
|
|
7
|
+
export type ApiModelComposableProps = GraphqlModelConfigProps & Partial<HeaderProps> & Partial<InitialDataProps>;
|
|
8
|
+
/**
|
|
9
|
+
* Strip a `By<Qualifier>` suffix from a model name (mirrors GraphQL's
|
|
10
|
+
* `computedModelName` rule). Used for mutation/search endpoint resolution.
|
|
11
|
+
* Reads keep the full modelName so qualifiers like `ByGroupKey` survive.
|
|
12
|
+
*/
|
|
13
|
+
export declare function stripModelByQualifier(modelName: string): string;
|
|
13
14
|
/**
|
|
14
15
|
* Build a REST API endpoint URL for a model.
|
|
15
16
|
* @param modelName - The model name (e.g., 'Patient')
|
|
@@ -32,9 +33,8 @@ export declare function useApiModel<T extends ApiModelComposableProps>(props: T)
|
|
|
32
33
|
createItem: (item: Record<string, any>, callback?: FormDialogCallback, importing?: boolean) => Promise<any>;
|
|
33
34
|
importItems: (importItemsList: Record<string, any>[], callback?: FormDialogCallback) => void;
|
|
34
35
|
updateItem: (item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>;
|
|
35
|
-
deleteItem: (item: Record<string, any>, callback?: FormDialogCallback) => Promise<
|
|
36
|
+
deleteItem: (item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>;
|
|
36
37
|
loadItems: (options: any) => void;
|
|
37
38
|
reload: () => void;
|
|
38
39
|
isLoading: import("vue").Ref<boolean, boolean>;
|
|
39
40
|
};
|
|
40
|
-
export {};
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import { computed, onMounted, ref } from "vue";
|
|
2
2
|
import { watchDebounced } from "@vueuse/core";
|
|
3
3
|
import { useAlert } from "./alert.js";
|
|
4
|
-
import {
|
|
4
|
+
import { useApiModelOperation } from "./apiModelOperation.js";
|
|
5
5
|
import { arrayWrap } from "../utils/array.js";
|
|
6
6
|
import pLimit from "p-limit";
|
|
7
|
+
export function stripModelByQualifier(modelName) {
|
|
8
|
+
return modelName.split("By")[0].trim();
|
|
9
|
+
}
|
|
7
10
|
export function buildApiEndpoint(modelName, action) {
|
|
8
11
|
const lowercasedName = modelName.charAt(0).toLowerCase() + modelName.slice(1);
|
|
9
12
|
const base = `/model/${lowercasedName}`;
|
|
@@ -11,7 +14,7 @@ export function buildApiEndpoint(modelName, action) {
|
|
|
11
14
|
}
|
|
12
15
|
export function useApiModel(props) {
|
|
13
16
|
const alert = useAlert();
|
|
14
|
-
const
|
|
17
|
+
const ops = computed(() => useApiModelOperation(props.modelName));
|
|
15
18
|
const items = ref([]);
|
|
16
19
|
const itemsLength = ref(0);
|
|
17
20
|
const search = ref();
|
|
@@ -46,13 +49,9 @@ export function useApiModel(props) {
|
|
|
46
49
|
}
|
|
47
50
|
return [.../* @__PURE__ */ new Set([...fieldsProps, ...tmpFields])];
|
|
48
51
|
});
|
|
49
|
-
function getModelName() {
|
|
50
|
-
return props.modelName.split("By")[0].trim();
|
|
51
|
-
}
|
|
52
52
|
function createItem(item, callback, importing = false) {
|
|
53
53
|
isLoading.value = true;
|
|
54
|
-
|
|
55
|
-
return api.postPromise(endpoint, { input: item, fields: fields.value }).then((result) => {
|
|
54
|
+
return ops.value.create(item, fields.value).then((result) => {
|
|
56
55
|
if (canServerPageable.value) {
|
|
57
56
|
if (!importing) loadItems(currentOptions.value);
|
|
58
57
|
} else {
|
|
@@ -89,8 +88,7 @@ export function useApiModel(props) {
|
|
|
89
88
|
}
|
|
90
89
|
function updateItem(item, callback) {
|
|
91
90
|
isLoading.value = true;
|
|
92
|
-
|
|
93
|
-
return api.postPromise(endpoint, { input: item, fields: fields.value }).then((result) => {
|
|
91
|
+
return ops.value.update(item, fields.value).then((result) => {
|
|
94
92
|
if (canServerPageable.value) {
|
|
95
93
|
loadItems(currentOptions.value);
|
|
96
94
|
} else {
|
|
@@ -110,8 +108,7 @@ export function useApiModel(props) {
|
|
|
110
108
|
}
|
|
111
109
|
function deleteItem(item, callback) {
|
|
112
110
|
isLoading.value = true;
|
|
113
|
-
|
|
114
|
-
return api.postPromise(endpoint, { input: item, fields: fields.value }).catch((error) => {
|
|
111
|
+
return ops.value.delete(item, fields.value).catch((error) => {
|
|
115
112
|
alert?.addAlert({ alertType: "error", message: error?.message || String(error) });
|
|
116
113
|
}).finally(() => {
|
|
117
114
|
isLoading.value = false;
|
|
@@ -121,17 +118,15 @@ export function useApiModel(props) {
|
|
|
121
118
|
}
|
|
122
119
|
function loadItems(options) {
|
|
123
120
|
currentOptions.value = options;
|
|
124
|
-
const endpoint = buildApiEndpoint(getModelName(), "pageable");
|
|
125
121
|
isLoading.value = true;
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
fields: fields.value,
|
|
122
|
+
ops.value.readPageable(
|
|
123
|
+
fields.value,
|
|
124
|
+
props.modelBy,
|
|
125
|
+
{
|
|
131
126
|
page: options?.page,
|
|
132
127
|
perPage: options?.itemsPerPage,
|
|
133
128
|
sortBy: options?.sortBy
|
|
134
|
-
}
|
|
129
|
+
}
|
|
135
130
|
).then((result) => {
|
|
136
131
|
items.value = result.data;
|
|
137
132
|
itemsLength.value = result.meta.totalItems;
|
|
@@ -148,10 +143,9 @@ export function useApiModel(props) {
|
|
|
148
143
|
loadItems(currentOptions.value);
|
|
149
144
|
} else {
|
|
150
145
|
isLoading.value = true;
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
{ variables: props.modelBy, fields: fields.value }
|
|
146
|
+
ops.value.read(
|
|
147
|
+
fields.value,
|
|
148
|
+
props.modelBy
|
|
155
149
|
).then((result) => {
|
|
156
150
|
items.value = arrayWrap(result);
|
|
157
151
|
}).catch((error) => {
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { computed, ref, watch } from "vue";
|
|
2
2
|
import { useAlert } from "./alert.js";
|
|
3
|
-
import {
|
|
4
|
-
import { buildApiEndpoint } from "./apiModel.js";
|
|
3
|
+
import { useApiModelOperation } from "./apiModelOperation.js";
|
|
5
4
|
export function useApiModelItem(props) {
|
|
6
5
|
const alert = useAlert();
|
|
7
|
-
const
|
|
6
|
+
const ops = computed(() => useApiModelOperation(props.modelName));
|
|
8
7
|
const modelBy = ref();
|
|
9
8
|
const item = ref();
|
|
10
9
|
const isLoading = ref(false);
|
|
@@ -20,11 +19,7 @@ export function useApiModelItem(props) {
|
|
|
20
19
|
function reload() {
|
|
21
20
|
isLoading.value = true;
|
|
22
21
|
item.value = void 0;
|
|
23
|
-
|
|
24
|
-
return api.postPromise(endpoint, {
|
|
25
|
-
variables: computedModelBy.value,
|
|
26
|
-
fields: fields.value
|
|
27
|
-
}).then((result) => {
|
|
22
|
+
return ops.value.read(fields.value, computedModelBy.value).then((result) => {
|
|
28
23
|
if (Array.isArray(result)) {
|
|
29
24
|
alert?.addAlert({ alertType: "error", message: "Return result is not single item" });
|
|
30
25
|
} else {
|
|
@@ -38,11 +33,7 @@ export function useApiModelItem(props) {
|
|
|
38
33
|
}
|
|
39
34
|
function createItem(createItem2, callback) {
|
|
40
35
|
isLoading.value = true;
|
|
41
|
-
|
|
42
|
-
return api.postPromise(endpoint, {
|
|
43
|
-
input: createItem2,
|
|
44
|
-
fields: fields.value
|
|
45
|
-
}).then((result) => {
|
|
36
|
+
return ops.value.create(createItem2, fields.value).then((result) => {
|
|
46
37
|
item.value = result;
|
|
47
38
|
}).catch((error) => {
|
|
48
39
|
alert?.addAlert({ alertType: "error", message: error?.message ?? error });
|
|
@@ -54,11 +45,7 @@ export function useApiModelItem(props) {
|
|
|
54
45
|
}
|
|
55
46
|
function updateItem(updateItem2, callback) {
|
|
56
47
|
isLoading.value = true;
|
|
57
|
-
|
|
58
|
-
return api.postPromise(endpoint, {
|
|
59
|
-
input: updateItem2,
|
|
60
|
-
fields: fields.value
|
|
61
|
-
}).then((result) => {
|
|
48
|
+
return ops.value.update(updateItem2, fields.value).then((result) => {
|
|
62
49
|
item.value = result;
|
|
63
50
|
}).catch((error) => {
|
|
64
51
|
alert?.addAlert({ alertType: "error", message: error?.message ?? error });
|
|
@@ -70,11 +57,7 @@ export function useApiModelItem(props) {
|
|
|
70
57
|
}
|
|
71
58
|
function deleteItem(deleteItem2, callback) {
|
|
72
59
|
isLoading.value = true;
|
|
73
|
-
|
|
74
|
-
return api.postPromise(endpoint, {
|
|
75
|
-
input: deleteItem2,
|
|
76
|
-
fields: fields.value
|
|
77
|
-
}).catch((error) => {
|
|
60
|
+
return ops.value.delete(deleteItem2, fields.value).catch((error) => {
|
|
78
61
|
alert?.addAlert({ alertType: "error", message: error?.message ?? error });
|
|
79
62
|
}).finally(() => {
|
|
80
63
|
isLoading.value = false;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export interface ApiModelPageable {
|
|
2
|
+
page?: number;
|
|
3
|
+
perPage?: number;
|
|
4
|
+
sortBy?: any;
|
|
5
|
+
}
|
|
6
|
+
export interface ApiModelOperationCallables<TItem = any, TInput = any> {
|
|
7
|
+
read: <T = TItem>(fields?: Array<string | object>, variables?: Record<string, any>, cache?: boolean | number) => Promise<T>;
|
|
8
|
+
readPageable: <T = TItem>(fields?: Array<string | object>, variables?: Record<string, any>, pageable?: ApiModelPageable) => Promise<{
|
|
9
|
+
data: T[];
|
|
10
|
+
meta: {
|
|
11
|
+
totalItems: number;
|
|
12
|
+
};
|
|
13
|
+
}>;
|
|
14
|
+
search: <T = TItem>(fields?: Array<string | object>, variables?: Record<string, any>, search?: any) => Promise<T[]>;
|
|
15
|
+
create: <T = TItem>(input: TInput | Record<string, any>, fields?: Array<string | object>) => Promise<T>;
|
|
16
|
+
update: <T = TItem>(input: TInput | Record<string, any>, fields?: Array<string | object>) => Promise<T>;
|
|
17
|
+
delete: <T = any>(input: TInput | Record<string, any>, fields?: Array<string | object>) => Promise<T>;
|
|
18
|
+
}
|
|
19
|
+
export declare function useApiModelOperation<TItem = any, TInput = any>(modelName: string): ApiModelOperationCallables<TItem, TInput>;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { useApi } from "./api.js";
|
|
2
|
+
import { buildApiEndpoint, stripModelByQualifier } from "./apiModel.js";
|
|
3
|
+
import { buildFields } from "./graphqlOperation.js";
|
|
4
|
+
import { useGraphqlBridge } from "../bridges/graphql.js";
|
|
5
|
+
export function useApiModelOperation(modelName) {
|
|
6
|
+
const api = useApi();
|
|
7
|
+
function prepFields(fields) {
|
|
8
|
+
const { graphqlType } = useGraphqlBridge();
|
|
9
|
+
const schema = graphqlType?.[modelName];
|
|
10
|
+
if (!schema) return fields;
|
|
11
|
+
return buildFields(schema, fields, 0);
|
|
12
|
+
}
|
|
13
|
+
return {
|
|
14
|
+
read: (fields, variables, cache) => {
|
|
15
|
+
const endpoint = buildApiEndpoint(modelName);
|
|
16
|
+
return api.postPromise(
|
|
17
|
+
endpoint,
|
|
18
|
+
{ variables, fields: prepFields(fields) },
|
|
19
|
+
void 0,
|
|
20
|
+
void 0,
|
|
21
|
+
cache
|
|
22
|
+
);
|
|
23
|
+
},
|
|
24
|
+
readPageable: (fields, variables, pageable) => {
|
|
25
|
+
const endpoint = buildApiEndpoint(modelName, "pageable");
|
|
26
|
+
return api.postPromise(endpoint, {
|
|
27
|
+
...variables || {},
|
|
28
|
+
variables,
|
|
29
|
+
fields: prepFields(fields),
|
|
30
|
+
page: pageable?.page,
|
|
31
|
+
perPage: pageable?.perPage,
|
|
32
|
+
sortBy: pageable?.sortBy
|
|
33
|
+
});
|
|
34
|
+
},
|
|
35
|
+
search: (fields, variables, search) => {
|
|
36
|
+
const endpoint = buildApiEndpoint(modelName, "search");
|
|
37
|
+
return api.postPromise(endpoint, {
|
|
38
|
+
variables,
|
|
39
|
+
fields: prepFields(fields),
|
|
40
|
+
search
|
|
41
|
+
});
|
|
42
|
+
},
|
|
43
|
+
create: (input, fields) => {
|
|
44
|
+
const endpoint = buildApiEndpoint(stripModelByQualifier(modelName), "create");
|
|
45
|
+
return api.postPromise(endpoint, { input, fields: prepFields(fields) });
|
|
46
|
+
},
|
|
47
|
+
update: (input, fields) => {
|
|
48
|
+
const endpoint = buildApiEndpoint(stripModelByQualifier(modelName), "update");
|
|
49
|
+
return api.postPromise(endpoint, { input, fields: prepFields(fields) });
|
|
50
|
+
},
|
|
51
|
+
delete: (input, fields) => {
|
|
52
|
+
const endpoint = buildApiEndpoint(stripModelByQualifier(modelName), "delete");
|
|
53
|
+
return api.postPromise(endpoint, { input, fields: prepFields(fields) });
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
}
|
|
@@ -7,6 +7,7 @@ export function buildFields(operationFields, fields, depth = 0) {
|
|
|
7
7
|
if (!operationFields) return [];
|
|
8
8
|
if (isClassConstructor(fields)) fields = classAttributes(fields);
|
|
9
9
|
if (!fields || fields.length == 0) fields = ["*"];
|
|
10
|
+
else fields = [...fields];
|
|
10
11
|
if (fields.includes("*")) {
|
|
11
12
|
operationFields.fields.forEach((field) => {
|
|
12
13
|
if (!fields.includes(field) && !field.toLowerCase().endsWith("base64") && !field.toLowerCase().endsWith("base64string")) fields.push(field);
|