@mythpe/quasar-ui-qui 0.5.49 → 0.5.50
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/components/datatable/MDatatable/MDatatable.d.ts +260 -0
- package/dist/components/datatable/MDatatable/MDatatable.vue.d.ts +47856 -0
- package/dist/components/datatable/MDatatable/index.d.ts +4 -0
- package/dist/components/datatable/MDtAvatar/MDtAvatar.d.ts +13 -0
- package/dist/components/datatable/MDtAvatar/MDtAvatar.vue.d.ts +18 -0
- package/dist/components/datatable/MDtAvatar/index.d.ts +4 -0
- package/dist/components/datatable/MDtBtn/MDtBtn.d.ts +20 -0
- package/dist/components/datatable/MDtBtn/MDtBtn.vue.d.ts +44 -0
- package/dist/components/datatable/MDtBtn/index.d.ts +4 -0
- package/dist/components/datatable/MDtColorColumn/MDtColorColumn.d.ts +12 -0
- package/dist/components/datatable/MDtColorColumn/MDtColorColumn.vue.d.ts +28 -0
- package/dist/components/datatable/MDtColorColumn/index.d.ts +4 -0
- package/dist/components/datatable/MDtContextmenuItems/MDtContextmenuItems.d.ts +13 -0
- package/dist/components/datatable/MDtContextmenuItems/MDtContextmenuItems.vue.d.ts +47 -0
- package/dist/components/datatable/MDtContextmenuItems/index.d.ts +4 -0
- package/dist/components/datatable/MDtCopyColumn/MDtCopyColumn.d.ts +15 -0
- package/dist/components/datatable/MDtCopyColumn/MDtCopyColumn.vue.d.ts +31 -0
- package/dist/components/datatable/MDtCopyColumn/index.d.ts +4 -0
- package/dist/components/datatable/MDtDescColumn/MDtDescColumn.d.ts +11 -0
- package/dist/components/datatable/MDtDescColumn/MDtDescColumn.vue.d.ts +27 -0
- package/dist/components/datatable/MDtDescColumn/index.d.ts +4 -0
- package/dist/components/datatable/MDtImageColumn/MDtImageColumn.d.ts +13 -0
- package/dist/components/datatable/MDtImageColumn/MDtImageColumn.vue.d.ts +22 -0
- package/dist/components/datatable/MDtImageColumn/index.d.ts +4 -0
- package/dist/components/datatable/MDtSarColumn/MDtSarColumn.d.ts +15 -0
- package/dist/components/datatable/MDtSarColumn/MDtSarColumn.vue.d.ts +31 -0
- package/dist/components/datatable/MDtSarColumn/index.d.ts +4 -0
- package/dist/components/datatable/MDtUrlColumn/MDtUrlColumn.d.ts +12 -0
- package/dist/components/datatable/MDtUrlColumn/MDtUrlColumn.vue.d.ts +34 -0
- package/dist/components/datatable/MDtUrlColumn/index.d.ts +4 -0
- package/dist/components/datatable/index.d.ts +12 -0
- package/dist/components/dialog/MModalMenu/MModalMenu.d.ts +11 -0
- package/dist/components/dialog/MModalMenu/MModalMenu.vue.d.ts +63 -0
- package/dist/components/dialog/MModalMenu/index.d.ts +4 -0
- package/dist/components/dialog/index.d.ts +1 -0
- package/dist/components/form/MAvatarViewer/MAvatarViewer.vue.d.ts +2 -2
- package/dist/components/form/MAxios/MAxios.vue.d.ts +13 -13
- package/dist/components/form/MCheckbox/MCheckbox.vue.d.ts +18 -18
- package/dist/components/form/MCkeditor/MCkeditor.vue.d.ts +8 -8
- package/dist/components/form/MColor/MColor.vue.d.ts +2 -2
- package/dist/components/form/MDate/MDate.vue.d.ts +7 -7
- package/dist/components/form/MEditor/MEditor.vue.d.ts +9 -9
- package/dist/components/form/MEmail/MEmail.vue.d.ts +10 -10
- package/dist/components/form/MFile/MFile.vue.d.ts +12 -12
- package/dist/components/form/MInput/MInput.vue.d.ts +8 -8
- package/dist/components/form/MOptions/MOptions.vue.d.ts +9 -9
- package/dist/components/form/MPassword/MPassword.vue.d.ts +10 -10
- package/dist/components/form/MPhone/MPhone.vue.d.ts +10 -10
- package/dist/components/form/MPicker/MPicker.vue.d.ts +6 -6
- package/dist/components/form/MRadio/MRadio.vue.d.ts +12 -12
- package/dist/components/form/MSelect/MSelect.vue.d.ts +6 -6
- package/dist/components/form/MSignaturePad/MSignaturePad.vue.d.ts +11 -11
- package/dist/components/form/MTime/MTime.vue.d.ts +7 -7
- package/dist/components/form/MToggle/MToggle.vue.d.ts +11 -11
- package/dist/components/form/MUploader/MUploader.vue.d.ts +1 -1
- package/dist/components/form/MUploader/MUploaderItem.vue.d.ts +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/composables/index.d.ts +1 -0
- package/dist/composables/useDtHelpers.d.ts +3565 -0
- package/dist/composables/useMyth.d.ts +3 -1
- package/dist/index.common.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/types/global-components.d.ts +12 -1
- package/dist/types/helpers.d.ts +13 -0
- package/dist/types/index.d.ts +0 -2
- package/package.json +1 -1
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
import { ComputedRef, MaybeRef, MaybeRefOrGetter, Ref, UnwrapRef, VNode } from 'vue';
|
|
2
|
+
import { GenericFormValues } from '../../form';
|
|
3
|
+
import { NamedColor, QTableProps } from 'quasar';
|
|
4
|
+
import { ApiMetaResource, ApiServicesSchema, ClassProp, StyleProp } from '../../../types';
|
|
5
|
+
import { RouteLocationRaw } from 'vue-router';
|
|
6
|
+
import { MDtBtnProps } from '../MDtBtn';
|
|
7
|
+
export type MDtItem<T extends object = Record<string, any>> = T & {
|
|
8
|
+
id: any;
|
|
9
|
+
value: any;
|
|
10
|
+
} & Record<string, any>;
|
|
11
|
+
export type MDtItemIndex = number;
|
|
12
|
+
export type MDtExportOptions = 'pdf' | 'excel';
|
|
13
|
+
export interface MDatatablePagination {
|
|
14
|
+
/**
|
|
15
|
+
* Column name (from column definition)
|
|
16
|
+
*/
|
|
17
|
+
sortBy?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Is sorting in descending order?
|
|
20
|
+
*/
|
|
21
|
+
descending?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Page number (1-based)
|
|
24
|
+
*/
|
|
25
|
+
page: number;
|
|
26
|
+
/**
|
|
27
|
+
* How many rows per page? 0 means Infinite
|
|
28
|
+
*/
|
|
29
|
+
rowsPerPage?: number;
|
|
30
|
+
/**
|
|
31
|
+
* For server-side fetching only. How many total database rows are there to be added to the table.
|
|
32
|
+
*/
|
|
33
|
+
rowsNumber?: number;
|
|
34
|
+
}
|
|
35
|
+
export type MDatatableFilterForm = Partial<GenericFormValues>;
|
|
36
|
+
export interface FetchRowsArgs {
|
|
37
|
+
filter?: string | null;
|
|
38
|
+
pagination?: MDatatablePagination;
|
|
39
|
+
}
|
|
40
|
+
export interface ApiServiceParams {
|
|
41
|
+
filter?: Record<string, any>;
|
|
42
|
+
search?: string | null;
|
|
43
|
+
searchColumns?: string[] | string;
|
|
44
|
+
headerItems?: any[] | string[] | string;
|
|
45
|
+
ids?: number[];
|
|
46
|
+
indexType: 'index' | 'pdf' | 'excel';
|
|
47
|
+
fdt: 'i' | 'e' | 'u' | 'c' | 's' | 'd';
|
|
48
|
+
requestWith?: string;
|
|
49
|
+
itemsPerPage: number;
|
|
50
|
+
page: number;
|
|
51
|
+
sortBy?: string;
|
|
52
|
+
sortDesc?: number;
|
|
53
|
+
toUrl?: MDtExportOptions | boolean;
|
|
54
|
+
[key: string]: any;
|
|
55
|
+
}
|
|
56
|
+
export type MDtMythApiServicesSchema = ApiServicesSchema<MDtItem>;
|
|
57
|
+
export type MDatatableMetaServer = ApiMetaResource;
|
|
58
|
+
export type MDtControlOptions = {
|
|
59
|
+
name?: 'control' | string;
|
|
60
|
+
justify?: 'start' | 'center' | 'end' | 'around' | 'between' | undefined | null;
|
|
61
|
+
style?: StyleProp;
|
|
62
|
+
align?: 'left' | 'right' | 'center' | undefined | null;
|
|
63
|
+
};
|
|
64
|
+
export type MDatatableOptions = {
|
|
65
|
+
hasAction: Ref<boolean>;
|
|
66
|
+
loading: Ref<boolean>;
|
|
67
|
+
search: Ref<string | null | undefined>;
|
|
68
|
+
pagination: Ref<MDatatablePagination>;
|
|
69
|
+
meta: Ref<MDatatableMetaServer>;
|
|
70
|
+
filter: Ref<MDatatableFilterForm>;
|
|
71
|
+
tempFilter: Ref<MDatatableFilterForm>;
|
|
72
|
+
selected: Ref<MDtItem[]>;
|
|
73
|
+
fullscreen: Ref<boolean>;
|
|
74
|
+
getHeaders: ComputedRef<string[] | Partial<QTableProps['columns']> | any[]>;
|
|
75
|
+
controlProps: ComputedRef<Required<MDtControlOptions>>;
|
|
76
|
+
visibleHeaders: Ref<any[]>;
|
|
77
|
+
};
|
|
78
|
+
export type MDatatableDialogsOptions = {
|
|
79
|
+
filter: Ref<boolean>;
|
|
80
|
+
show: Ref<boolean>;
|
|
81
|
+
form: Ref<boolean>;
|
|
82
|
+
isUpdate: Ref<boolean>;
|
|
83
|
+
item: MaybeRef<any> | undefined;
|
|
84
|
+
index: Ref<MDtItemIndex | undefined>;
|
|
85
|
+
errors: Record<string | number | symbol, string[]> | any;
|
|
86
|
+
};
|
|
87
|
+
type E = MDatatableDialogsOptions['item'];
|
|
88
|
+
export type GenericMDtBtn = Record<string, any> & {
|
|
89
|
+
name: string;
|
|
90
|
+
label?: string | ((item: any, index: number) => string);
|
|
91
|
+
contextLabel?: string | null;
|
|
92
|
+
tooltip?: string | ((item: any, index: number) => string);
|
|
93
|
+
click?: <V extends E>(item: UnwrapRef<V> | Ref<V> | V, index: UnwrapRef<MDatatableDialogsOptions['index']>) => void;
|
|
94
|
+
multiClick?: <V extends E = E>(items: V[]) => void;
|
|
95
|
+
showIf?: boolean | ((item: UnwrapRef<MDatatableDialogsOptions['item']>, index: UnwrapRef<MDatatableDialogsOptions['index']>) => boolean);
|
|
96
|
+
order?: number;
|
|
97
|
+
attr?: Partial<MDtBtnProps> & Partial<{
|
|
98
|
+
icon?: string;
|
|
99
|
+
textColor?: NamedColor | undefined;
|
|
100
|
+
color?: NamedColor | undefined;
|
|
101
|
+
}>;
|
|
102
|
+
};
|
|
103
|
+
export interface MDatatableProps<I extends GenericFormValues = GenericFormValues> extends Omit<QTableProps, 'rows' | 'rowsPerPageOptions' | 'visibleColumns'> {
|
|
104
|
+
rows?: any[];
|
|
105
|
+
control?: any;
|
|
106
|
+
defaultItem?: any;
|
|
107
|
+
contextItems?: any;
|
|
108
|
+
contextItemsLength?: number;
|
|
109
|
+
hideAutoMessage?: boolean;
|
|
110
|
+
headers: string[] | Partial<QTableProps['columns']> | any[];
|
|
111
|
+
serviceName?: any;
|
|
112
|
+
requestParams?: any;
|
|
113
|
+
pdf?: boolean;
|
|
114
|
+
excel?: boolean;
|
|
115
|
+
exportUrl?: any | boolean;
|
|
116
|
+
importBtn?: boolean;
|
|
117
|
+
noExampleBtn?: boolean;
|
|
118
|
+
hideSearch?: boolean;
|
|
119
|
+
hideTitle?: boolean;
|
|
120
|
+
searchDebounce?: string | number;
|
|
121
|
+
withIndex?: string | string[];
|
|
122
|
+
withStore?: string | string[];
|
|
123
|
+
withShow?: string | string[];
|
|
124
|
+
withUpdate?: string | string[];
|
|
125
|
+
hideAddBtn?: boolean;
|
|
126
|
+
storeBtnFn?: (item: MDtItem<I>) => boolean;
|
|
127
|
+
hideUpdateBtn?: boolean;
|
|
128
|
+
updateBtnFn?: (item: MDtItem<I>) => boolean;
|
|
129
|
+
cloneBtn?: boolean;
|
|
130
|
+
cloneBtnFn?: (item: MDtItem<I>) => boolean;
|
|
131
|
+
hideShowBtn?: boolean;
|
|
132
|
+
showBtnFn?: (item: MDtItem<I>) => boolean;
|
|
133
|
+
hideDestroyBtn?: boolean;
|
|
134
|
+
destroyBtnFn?: (item: MDtItem<I>) => boolean;
|
|
135
|
+
storeRoute?: string | RouteLocationRaw;
|
|
136
|
+
storeQueryParams?: boolean;
|
|
137
|
+
noStoreClose?: boolean;
|
|
138
|
+
updateRoute?: string | RouteLocationRaw;
|
|
139
|
+
updateQueryParams?: boolean;
|
|
140
|
+
noUpdateClose?: boolean;
|
|
141
|
+
noAutoClose?: boolean;
|
|
142
|
+
showRoute?: string | RouteLocationRaw;
|
|
143
|
+
showQueryParams?: boolean;
|
|
144
|
+
noMouse?: boolean;
|
|
145
|
+
noRefreshBtn?: boolean;
|
|
146
|
+
endReach?: boolean;
|
|
147
|
+
showSelection?: boolean;
|
|
148
|
+
hideSelection?: boolean;
|
|
149
|
+
multiSelection?: boolean;
|
|
150
|
+
multiDestroy?: boolean;
|
|
151
|
+
rowsPerPageOptions?: (string | number)[];
|
|
152
|
+
ignoreKeys?: string[] | ((form: Record<string, any>) => string[]) | any[];
|
|
153
|
+
manageColumns?: boolean;
|
|
154
|
+
manageColumnsInline?: boolean;
|
|
155
|
+
visibleColumns?: (string | null | undefined)[] | any[];
|
|
156
|
+
/**
|
|
157
|
+
* Show Add btn top of the table.
|
|
158
|
+
*/
|
|
159
|
+
addTopBtn?: boolean;
|
|
160
|
+
/**
|
|
161
|
+
* Show Add btn inside more list
|
|
162
|
+
*/
|
|
163
|
+
addListBtn?: boolean;
|
|
164
|
+
/**
|
|
165
|
+
* Show Fab Add btn
|
|
166
|
+
*/
|
|
167
|
+
addFabBtn?: boolean;
|
|
168
|
+
/**
|
|
169
|
+
* make datatable fullscreen mode
|
|
170
|
+
*/
|
|
171
|
+
fullscreenBtn?: boolean;
|
|
172
|
+
/**
|
|
173
|
+
* Auto actions body headers 'control'
|
|
174
|
+
*/
|
|
175
|
+
noBodyControl?: boolean;
|
|
176
|
+
/**
|
|
177
|
+
* Auto actions card 'control'
|
|
178
|
+
*/
|
|
179
|
+
showCardControlHeader?: boolean;
|
|
180
|
+
/**
|
|
181
|
+
* Set datatable to fixed view
|
|
182
|
+
*/
|
|
183
|
+
fixed?: boolean;
|
|
184
|
+
/**
|
|
185
|
+
* Names of image columns in the table.
|
|
186
|
+
*/
|
|
187
|
+
imageColumns?: string[] | any[];
|
|
188
|
+
/**
|
|
189
|
+
* How to display the image button in the table.
|
|
190
|
+
*/
|
|
191
|
+
imageMode?: 'icon' | 'image';
|
|
192
|
+
/**
|
|
193
|
+
* Image size in display
|
|
194
|
+
*/
|
|
195
|
+
imageSize?: string;
|
|
196
|
+
/**
|
|
197
|
+
* Remove the default back btn.
|
|
198
|
+
* use router back
|
|
199
|
+
*/
|
|
200
|
+
noBackBtn?: boolean;
|
|
201
|
+
/**
|
|
202
|
+
* default back icon.
|
|
203
|
+
*/
|
|
204
|
+
backIcon?: string;
|
|
205
|
+
/**
|
|
206
|
+
* Names of url/link columns in the table.
|
|
207
|
+
*/
|
|
208
|
+
urlColumns?: MaybeRefOrGetter<string[]>;
|
|
209
|
+
/**
|
|
210
|
+
* Names of color pattern columns in the table.
|
|
211
|
+
*/
|
|
212
|
+
colorColumns?: MaybeRefOrGetter<string[]>;
|
|
213
|
+
/**
|
|
214
|
+
* Names of SAR columns in the table.
|
|
215
|
+
*/
|
|
216
|
+
sarColumns?: MaybeRefOrGetter<string[]>;
|
|
217
|
+
/**
|
|
218
|
+
* Names of a text want to show copy btn
|
|
219
|
+
*/
|
|
220
|
+
copyColumns?: MaybeRefOrGetter<string[]>;
|
|
221
|
+
/**
|
|
222
|
+
* Names of a text want to show be truncate text
|
|
223
|
+
*/
|
|
224
|
+
descColumns?: MaybeRefOrGetter<string[]>;
|
|
225
|
+
/**
|
|
226
|
+
* Help Tooltip
|
|
227
|
+
*/
|
|
228
|
+
help?: string;
|
|
229
|
+
/**
|
|
230
|
+
* Subtitle of table
|
|
231
|
+
*/
|
|
232
|
+
subtitle?: string;
|
|
233
|
+
/**
|
|
234
|
+
* Subtitle of class
|
|
235
|
+
*/
|
|
236
|
+
subtitleClass?: ClassProp;
|
|
237
|
+
/**
|
|
238
|
+
* Show, hide, wrap the button in the table.
|
|
239
|
+
*/
|
|
240
|
+
noWrapBtn?: boolean;
|
|
241
|
+
/**
|
|
242
|
+
* Align all table columns to the left, center, or right.
|
|
243
|
+
*/
|
|
244
|
+
align?: 'left' | 'right' | 'center';
|
|
245
|
+
/**
|
|
246
|
+
* too small a screen size in px.
|
|
247
|
+
*/
|
|
248
|
+
tooSmall?: number;
|
|
249
|
+
/**
|
|
250
|
+
* transformer for form data
|
|
251
|
+
*/
|
|
252
|
+
transformer?: (formData: any) => any;
|
|
253
|
+
}
|
|
254
|
+
export interface MDatatableSlots {
|
|
255
|
+
/**
|
|
256
|
+
* Default slot in the Devland unslotted content of the component
|
|
257
|
+
*/
|
|
258
|
+
default: () => VNode[];
|
|
259
|
+
}
|
|
260
|
+
export {};
|