@ramathibodi/nuxt-commons 4.0.11 → 4.0.13

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.
Files changed (52) hide show
  1. package/dist/module.json +1 -1
  2. package/dist/runtime/components/dialog/ImportProgress.d.vue.ts +35 -0
  3. package/dist/runtime/components/dialog/ImportProgress.vue +53 -0
  4. package/dist/runtime/components/dialog/ImportProgress.vue.d.ts +35 -0
  5. package/dist/runtime/components/document/TemplateBuilder.d.vue.ts +2 -2
  6. package/dist/runtime/components/document/TemplateBuilder.vue +113 -8
  7. package/dist/runtime/components/document/TemplateBuilder.vue.d.ts +2 -2
  8. package/dist/runtime/components/form/ActionPad.vue +1 -0
  9. package/dist/runtime/components/form/Birthdate.d.vue.ts +3 -3
  10. package/dist/runtime/components/form/Birthdate.vue.d.ts +3 -3
  11. package/dist/runtime/components/form/Date.vue +11 -6
  12. package/dist/runtime/components/form/Dialog.d.vue.ts +1 -5
  13. package/dist/runtime/components/form/Dialog.vue +1 -0
  14. package/dist/runtime/components/form/Dialog.vue.d.ts +1 -5
  15. package/dist/runtime/components/form/EditPad.vue +1 -0
  16. package/dist/runtime/components/form/Pad.d.vue.ts +24 -0
  17. package/dist/runtime/components/form/Pad.vue +11 -6
  18. package/dist/runtime/components/form/Pad.vue.d.ts +24 -0
  19. package/dist/runtime/components/form/Time.vue +10 -5
  20. package/dist/runtime/components/form/images/Edit.d.vue.ts +1 -3
  21. package/dist/runtime/components/form/images/Edit.vue.d.ts +1 -3
  22. package/dist/runtime/components/model/AutoRefreshChip.d.vue.ts +16 -0
  23. package/dist/runtime/components/model/AutoRefreshChip.vue +34 -0
  24. package/dist/runtime/components/model/AutoRefreshChip.vue.d.ts +16 -0
  25. package/dist/runtime/components/model/Pad.vue +2 -1
  26. package/dist/runtime/components/model/Table.d.vue.ts +158 -61
  27. package/dist/runtime/components/model/Table.vue +129 -7
  28. package/dist/runtime/components/model/Table.vue.d.ts +158 -61
  29. package/dist/runtime/components/model/iterator.d.vue.ts +198 -78
  30. package/dist/runtime/components/model/iterator.vue +140 -9
  31. package/dist/runtime/components/model/iterator.vue.d.ts +198 -78
  32. package/dist/runtime/composables/apiModel.d.ts +22 -3
  33. package/dist/runtime/composables/apiModel.js +27 -19
  34. package/dist/runtime/composables/autoRefresh.d.ts +42 -0
  35. package/dist/runtime/composables/autoRefresh.js +57 -0
  36. package/dist/runtime/composables/document/template.d.ts +61 -0
  37. package/dist/runtime/composables/document/template.js +60 -1
  38. package/dist/runtime/composables/document/validateTemplate.d.ts +62 -0
  39. package/dist/runtime/composables/document/validateTemplate.js +378 -0
  40. package/dist/runtime/composables/graphqlModel.d.ts +22 -3
  41. package/dist/runtime/composables/graphqlModel.js +27 -19
  42. package/dist/runtime/composables/graphqlModelOperation.d.ts +1 -0
  43. package/dist/runtime/composables/importProgress.d.ts +34 -0
  44. package/dist/runtime/composables/importProgress.js +50 -0
  45. package/dist/runtime/composables/modelAutoRefresh.d.ts +29 -0
  46. package/dist/runtime/composables/modelAutoRefresh.js +16 -0
  47. package/dist/runtime/composables/utils/validation.d.ts +4 -0
  48. package/dist/runtime/composables/utils/validation.js +2 -0
  49. package/dist/runtime/utils/virtualize.d.ts +15 -0
  50. package/dist/runtime/utils/virtualize.js +10 -0
  51. package/package.json +3 -2
  52. package/scripts/validate-document-template.mjs +158 -0
@@ -1,5 +1,5 @@
1
1
  <script setup>
2
- import { computed, watch, nextTick, ref, useAttrs } from "vue";
2
+ import { computed, watch, nextTick, ref, markRaw, useAttrs } from "vue";
3
3
  import { VDataTable } from "vuetify/components/VDataTable";
4
4
  import { clone } from "lodash-es";
5
5
  import { useGraphqlModel } from "../../composables/graphqlModel";
@@ -7,6 +7,8 @@ import { useApiModel } from "../../composables/apiModel";
7
7
  import { usePerPagePreference } from "../../composables/perPagePreference";
8
8
  import { useDialog } from "../../composables/dialog";
9
9
  import { useUserPermission } from "../../composables/userPermission";
10
+ import { useModelAutoRefresh } from "../../composables/modelAutoRefresh";
11
+ import { shouldVirtualize } from "../../utils/virtualize";
10
12
  import { useState } from "#imports";
11
13
  defineOptions({
12
14
  inheritAttrs: false
@@ -28,11 +30,18 @@ const props = defineProps({
28
30
  search: { type: String, required: false },
29
31
  saveAndStay: { type: Boolean, required: false, default: false },
30
32
  stringFields: { type: Array, required: false, default: () => [] },
33
+ importConcurrency: { type: Number, required: false, default: 3 },
31
34
  onlyOwnerEdit: { type: Boolean, required: false, default: false },
32
35
  onlyOwnerOverridePermission: { type: [String, Array], required: false },
33
36
  api: { type: Boolean, required: false, default: false },
34
37
  perPageStorageKey: { type: String, required: false },
35
38
  perPageStorageEnabled: { type: Boolean, required: false, default: true },
39
+ autoRefresh: { type: [Number, Boolean], required: false, default: false },
40
+ autoRefreshDefault: { type: Number, required: false, default: 60 },
41
+ autoRefreshControl: { type: Boolean, required: false, default: true },
42
+ virtual: { type: Boolean, required: false, default: void 0 },
43
+ virtualThreshold: { type: Number, required: false, default: 500 },
44
+ virtualHeight: { type: [Number, String], required: false, default: "70vh" },
36
45
  modelName: { type: String, required: true },
37
46
  modelKey: { type: String, required: false, default: "id" },
38
47
  modelBy: { type: Object, required: false, default: void 0 },
@@ -70,6 +79,7 @@ const {
70
79
  itemsLength,
71
80
  search,
72
81
  setSearch,
82
+ currentOptions,
73
83
  canServerPageable,
74
84
  canServerSearch,
75
85
  canCreate,
@@ -81,8 +91,14 @@ const {
81
91
  deleteItem,
82
92
  loadItems,
83
93
  reload,
84
- isLoading
94
+ isLoading,
95
+ importProgress
85
96
  } = props.api ? useApiModel(props) : useGraphqlModel(props);
97
+ const { autoRefresh, manualReload } = useModelAutoRefresh(props, {
98
+ reload,
99
+ isLoading,
100
+ isDialogOpen
101
+ });
86
102
  function openDialog(item) {
87
103
  isDialogReadonly.value = false;
88
104
  currentItem.value = item;
@@ -126,14 +142,26 @@ const canEditRow = function(item) {
126
142
  }
127
143
  return true;
128
144
  };
129
- const operation = ref({ openDialog, openDialogReadonly, createItem, importItems, updateItem, deleteItem, reload, setSearch, canServerPageable, canServerSearch, canCreate, canUpdate, canDelete, canEditRow, onlyOwnerEdit: props.onlyOwnerEdit, onlyOwnerOverridePermission: props.onlyOwnerOverridePermission });
145
+ const operation = ref({ openDialog, openDialogReadonly, createItem, importItems, updateItem, deleteItem, reload, setSearch, canServerPageable, canServerSearch, canCreate, canUpdate, canDelete, canEditRow, onlyOwnerEdit: props.onlyOwnerEdit, onlyOwnerOverridePermission: props.onlyOwnerOverridePermission, autoRefresh: markRaw(autoRefresh) });
146
+ const useVirtual = computed(() => shouldVirtualize(items.value.length, props.virtual, props.virtualThreshold));
147
+ const virtualPerPageOptions = computed(
148
+ () => plainAttrs.value["items-per-page-options"] ?? plainAttrs.value["itemsPerPageOptions"] ?? [{ value: 25, title: "25" }, { value: 50, title: "50" }, { value: 100, title: "100" }, { value: -1, title: "All" }]
149
+ );
150
+ function onVirtualPerPageChange(value) {
151
+ itemsPerPageInternal.value = value;
152
+ loadItems({
153
+ page: 1,
154
+ itemsPerPage: Number(value),
155
+ sortBy: currentOptions.value?.sortBy ?? []
156
+ });
157
+ }
130
158
  const computedInitialData = computed(() => {
131
159
  return Object.assign({}, props.initialData, props.modelBy);
132
160
  });
133
161
  watch(() => props.search, () => {
134
162
  search.value = props.search;
135
163
  }, { immediate: true });
136
- defineExpose({ reload, operation, items });
164
+ defineExpose({ reload, operation, items, autoRefresh, importProgress });
137
165
  </script>
138
166
 
139
167
  <template>
@@ -155,16 +183,26 @@ defineExpose({ reload, operation, items });
155
183
  <VToolbarTitle class="pl-3">
156
184
  <slot
157
185
  name="title"
158
- :reload="reload"
186
+ :reload="manualReload"
159
187
  >
160
188
  {{ title }}
161
189
  <v-icon
162
190
  size="small"
163
- @click="reload"
191
+ @click="manualReload"
164
192
  >
165
193
  mdi mdi-refresh
166
194
  </v-icon>
167
195
  </slot>
196
+ <slot
197
+ name="autoRefreshControl"
198
+ v-bind="autoRefresh"
199
+ >
200
+ <ModelAutoRefreshChip
201
+ v-if="props.autoRefreshControl"
202
+ :control="autoRefresh"
203
+ :color="toolbarColor"
204
+ />
205
+ </slot>
168
206
  </VToolbarTitle>
169
207
  </v-col>
170
208
  <v-col cols="5">
@@ -214,7 +252,7 @@ defineExpose({ reload, operation, items });
214
252
  </VToolbar>
215
253
  </slot>
216
254
  <v-data-table-server
217
- v-if="canServerPageable"
255
+ v-if="canServerPageable && !useVirtual"
218
256
  v-bind="plainAttrs"
219
257
  v-model:items-per-page="itemsPerPageInternal"
220
258
  color="primary"
@@ -264,6 +302,72 @@ defineExpose({ reload, operation, items });
264
302
  />
265
303
  </template>
266
304
  </v-data-table-server>
305
+ <v-data-table-virtual
306
+ v-else-if="useVirtual"
307
+ v-bind="plainAttrs"
308
+ color="primary"
309
+ :items="items"
310
+ :item-value="props.modelKey"
311
+ :search="search"
312
+ :loading="isLoading"
313
+ :height="props.virtualHeight"
314
+ fixed-header
315
+ >
316
+ <!-- @ts-ignore -->
317
+ <template
318
+ v-for="(_, name, index) in $slots"
319
+ :key="index"
320
+ #[name]="slotData"
321
+ >
322
+ <slot
323
+ :name="name"
324
+ v-bind="slotData || {}"
325
+ :operation="operation"
326
+ />
327
+ </template>
328
+ <!-- action-column: keep in sync with the v-data-table-server and v-data-table branches -->
329
+ <template
330
+ v-if="!$slots['item.action']"
331
+ #item.action="{ item }"
332
+ >
333
+ <v-btn
334
+ v-if="!canUpdate || !canEditRow(item)"
335
+ variant="flat"
336
+ density="compact"
337
+ icon="mdi mdi-note-search"
338
+ @click="openDialogReadonly(item)"
339
+ />
340
+ <v-btn
341
+ v-if="canUpdate && canEditRow(item)"
342
+ variant="flat"
343
+ density="compact"
344
+ icon="mdi mdi-note-edit"
345
+ @click="openDialog(item)"
346
+ />
347
+ <v-btn
348
+ v-if="canDelete && canEditRow(item)"
349
+ variant="flat"
350
+ density="compact"
351
+ icon="mdi mdi-delete"
352
+ @click="confirmDeleteItem(item)"
353
+ />
354
+ </template>
355
+ <template #bottom>
356
+ <div class="d-flex align-center justify-end pa-2 ga-3">
357
+ <span class="text-caption text-medium-emphasis">{{ items.length }} rows</span>
358
+ <v-select
359
+ :model-value="itemsPerPageInternal"
360
+ :items="virtualPerPageOptions"
361
+ label="Items per page"
362
+ density="compact"
363
+ variant="outlined"
364
+ hide-details
365
+ style="max-width: 130px"
366
+ @update:model-value="onVirtualPerPageChange"
367
+ />
368
+ </div>
369
+ </template>
370
+ </v-data-table-virtual>
267
371
  <v-data-table
268
372
  v-else
269
373
  v-bind="plainAttrs"
@@ -354,5 +458,23 @@ defineExpose({ reload, operation, items });
354
458
  />
355
459
  </template>
356
460
  </FormDialog>
461
+ <slot
462
+ name="importProgress"
463
+ :is-importing="importProgress.isImporting.value"
464
+ :total="importProgress.total.value"
465
+ :processed="importProgress.processed.value"
466
+ :succeeded="importProgress.succeeded.value"
467
+ :failed="importProgress.failed.value"
468
+ :percent="importProgress.percent.value"
469
+ >
470
+ <DialogImportProgress
471
+ :model-value="importProgress.isImporting.value"
472
+ :total="importProgress.total.value"
473
+ :processed="importProgress.processed.value"
474
+ :succeeded="importProgress.succeeded.value"
475
+ :failed="importProgress.failed.value"
476
+ :percent="importProgress.percent.value"
477
+ />
478
+ </slot>
357
479
  </v-card>
358
480
  </template>
@@ -18,11 +18,18 @@ interface Props extends /* @vue-ignore */ InstanceType<typeof VDataTable['$props
18
18
  search?: string;
19
19
  saveAndStay?: boolean;
20
20
  stringFields?: Array<string>;
21
+ importConcurrency?: number;
21
22
  onlyOwnerEdit?: boolean;
22
23
  onlyOwnerOverridePermission?: string | string[];
23
24
  api?: boolean;
24
25
  perPageStorageKey?: string;
25
26
  perPageStorageEnabled?: boolean;
27
+ autoRefresh?: number | boolean;
28
+ autoRefreshDefault?: number;
29
+ autoRefreshControl?: boolean;
30
+ virtual?: boolean;
31
+ virtualThreshold?: number;
32
+ virtualHeight?: number | string;
26
33
  }
27
34
  /**
28
35
  * Public props accepted by ModelTable.
@@ -36,12 +43,12 @@ declare var __VLS_8: {
36
43
  operation: {
37
44
  openDialog: typeof openDialog;
38
45
  openDialogReadonly: typeof openDialogReadonly;
39
- createItem: (item: Record<string, any>, callback?: FormDialogCallback, importing?: boolean) => Promise<any>;
40
- importItems: (importItemsList: Record<string, any>[], callback?: FormDialogCallback) => void;
41
- updateItem: (item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>;
42
- deleteItem: (item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>;
43
- reload: () => void;
44
- setSearch: (keyword: string) => void;
46
+ createItem: ((item: Record<string, any>, callback?: FormDialogCallback, importing?: boolean) => Promise<void>) | ((item: Record<string, any>, callback?: FormDialogCallback, importing?: boolean) => Promise<any>);
47
+ importItems: ((importData: Record<string, any>[], callback?: FormDialogCallback) => void) | ((importData: Record<string, any>[], callback?: FormDialogCallback) => void);
48
+ updateItem: ((item: Record<string, any>, callback?: FormDialogCallback) => Promise<void>) | ((item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>);
49
+ deleteItem: ((item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>) | ((item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>);
50
+ reload: (() => Promise<void> | undefined) | (() => Promise<void>);
51
+ setSearch: ((keyword: string) => void) | ((keyword: string) => void);
45
52
  canServerPageable: boolean;
46
53
  canServerSearch: boolean;
47
54
  canCreate: boolean;
@@ -50,20 +57,31 @@ declare var __VLS_8: {
50
57
  canEditRow: (item: Record<string, any>) => boolean;
51
58
  onlyOwnerEdit: boolean;
52
59
  onlyOwnerOverridePermission: string | string[] | undefined;
60
+ autoRefresh: import("vue").Raw<import("#imports").UseAutoRefreshHandle>;
53
61
  };
54
62
  }, __VLS_34: {
55
63
  reload: () => void;
56
- }, __VLS_50: {
64
+ }, __VLS_44: {
65
+ enabled: import("vue").ComputedRef<boolean>;
66
+ isActive: import("vue").ComputedRef<boolean>;
67
+ isLoading: import("vue").ComputedRef<boolean>;
68
+ intervalSeconds: import("vue").ComputedRef<number>;
69
+ remainingSeconds: import("vue").Ref<number>;
70
+ isUserPaused: import("vue").Ref<boolean>;
71
+ togglePause: () => void;
72
+ reset: () => void;
73
+ reload: () => void | Promise<void>;
74
+ }, __VLS_57: {
57
75
  items: Record<string, any>[];
58
76
  operation: {
59
77
  openDialog: typeof openDialog;
60
78
  openDialogReadonly: typeof openDialogReadonly;
61
- createItem: (item: Record<string, any>, callback?: FormDialogCallback, importing?: boolean) => Promise<any>;
62
- importItems: (importItemsList: Record<string, any>[], callback?: FormDialogCallback) => void;
63
- updateItem: (item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>;
64
- deleteItem: (item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>;
65
- reload: () => void;
66
- setSearch: (keyword: string) => void;
79
+ createItem: ((item: Record<string, any>, callback?: FormDialogCallback, importing?: boolean) => Promise<void>) | ((item: Record<string, any>, callback?: FormDialogCallback, importing?: boolean) => Promise<any>);
80
+ importItems: ((importData: Record<string, any>[], callback?: FormDialogCallback) => void) | ((importData: Record<string, any>[], callback?: FormDialogCallback) => void);
81
+ updateItem: ((item: Record<string, any>, callback?: FormDialogCallback) => Promise<void>) | ((item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>);
82
+ deleteItem: ((item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>) | ((item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>);
83
+ reload: (() => Promise<void> | undefined) | (() => Promise<void>);
84
+ setSearch: ((keyword: string) => void) | ((keyword: string) => void);
67
85
  canServerPageable: boolean;
68
86
  canServerSearch: boolean;
69
87
  canCreate: boolean;
@@ -72,18 +90,19 @@ declare var __VLS_8: {
72
90
  canEditRow: (item: Record<string, any>) => boolean;
73
91
  onlyOwnerEdit: boolean;
74
92
  onlyOwnerOverridePermission: string | string[] | undefined;
93
+ autoRefresh: import("vue").Raw<import("#imports").UseAutoRefreshHandle>;
75
94
  };
76
- }, __VLS_63: {
95
+ }, __VLS_70: {
77
96
  items: Record<string, any>[];
78
97
  operation: {
79
98
  openDialog: typeof openDialog;
80
99
  openDialogReadonly: typeof openDialogReadonly;
81
- createItem: (item: Record<string, any>, callback?: FormDialogCallback, importing?: boolean) => Promise<any>;
82
- importItems: (importItemsList: Record<string, any>[], callback?: FormDialogCallback) => void;
83
- updateItem: (item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>;
84
- deleteItem: (item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>;
85
- reload: () => void;
86
- setSearch: (keyword: string) => void;
100
+ createItem: ((item: Record<string, any>, callback?: FormDialogCallback, importing?: boolean) => Promise<void>) | ((item: Record<string, any>, callback?: FormDialogCallback, importing?: boolean) => Promise<any>);
101
+ importItems: ((importData: Record<string, any>[], callback?: FormDialogCallback) => void) | ((importData: Record<string, any>[], callback?: FormDialogCallback) => void);
102
+ updateItem: ((item: Record<string, any>, callback?: FormDialogCallback) => Promise<void>) | ((item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>);
103
+ deleteItem: ((item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>) | ((item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>);
104
+ reload: (() => Promise<void> | undefined) | (() => Promise<void>);
105
+ setSearch: ((keyword: string) => void) | ((keyword: string) => void);
87
106
  canServerPageable: boolean;
88
107
  canServerSearch: boolean;
89
108
  canCreate: boolean;
@@ -92,17 +111,18 @@ declare var __VLS_8: {
92
111
  canEditRow: (item: Record<string, any>) => boolean;
93
112
  onlyOwnerEdit: boolean;
94
113
  onlyOwnerOverridePermission: string | string[] | undefined;
114
+ autoRefresh: import("vue").Raw<import("#imports").UseAutoRefreshHandle>;
95
115
  };
96
- }, __VLS_95: never, __VLS_96: {
116
+ }, __VLS_102: never, __VLS_103: {
97
117
  operation: {
98
118
  openDialog: typeof openDialog;
99
119
  openDialogReadonly: typeof openDialogReadonly;
100
- createItem: (item: Record<string, any>, callback?: FormDialogCallback, importing?: boolean) => Promise<any>;
101
- importItems: (importItemsList: Record<string, any>[], callback?: FormDialogCallback) => void;
102
- updateItem: (item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>;
103
- deleteItem: (item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>;
104
- reload: () => void;
105
- setSearch: (keyword: string) => void;
120
+ createItem: ((item: Record<string, any>, callback?: FormDialogCallback, importing?: boolean) => Promise<void>) | ((item: Record<string, any>, callback?: FormDialogCallback, importing?: boolean) => Promise<any>);
121
+ importItems: ((importData: Record<string, any>[], callback?: FormDialogCallback) => void) | ((importData: Record<string, any>[], callback?: FormDialogCallback) => void);
122
+ updateItem: ((item: Record<string, any>, callback?: FormDialogCallback) => Promise<void>) | ((item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>);
123
+ deleteItem: ((item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>) | ((item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>);
124
+ reload: (() => Promise<void> | undefined) | (() => Promise<void>);
125
+ setSearch: ((keyword: string) => void) | ((keyword: string) => void);
106
126
  canServerPageable: boolean;
107
127
  canServerSearch: boolean;
108
128
  canCreate: boolean;
@@ -111,17 +131,18 @@ declare var __VLS_8: {
111
131
  canEditRow: (item: Record<string, any>) => boolean;
112
132
  onlyOwnerEdit: boolean;
113
133
  onlyOwnerOverridePermission: string | string[] | undefined;
134
+ autoRefresh: import("vue").Raw<import("#imports").UseAutoRefreshHandle>;
114
135
  };
115
- }, __VLS_128: never, __VLS_129: {
136
+ }, __VLS_135: never, __VLS_136: {
116
137
  operation: {
117
138
  openDialog: typeof openDialog;
118
139
  openDialogReadonly: typeof openDialogReadonly;
119
- createItem: (item: Record<string, any>, callback?: FormDialogCallback, importing?: boolean) => Promise<any>;
120
- importItems: (importItemsList: Record<string, any>[], callback?: FormDialogCallback) => void;
121
- updateItem: (item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>;
122
- deleteItem: (item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>;
123
- reload: () => void;
124
- setSearch: (keyword: string) => void;
140
+ createItem: ((item: Record<string, any>, callback?: FormDialogCallback, importing?: boolean) => Promise<void>) | ((item: Record<string, any>, callback?: FormDialogCallback, importing?: boolean) => Promise<any>);
141
+ importItems: ((importData: Record<string, any>[], callback?: FormDialogCallback) => void) | ((importData: Record<string, any>[], callback?: FormDialogCallback) => void);
142
+ updateItem: ((item: Record<string, any>, callback?: FormDialogCallback) => Promise<void>) | ((item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>);
143
+ deleteItem: ((item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>) | ((item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>);
144
+ reload: (() => Promise<void> | undefined) | (() => Promise<void>);
145
+ setSearch: ((keyword: string) => void) | ((keyword: string) => void);
125
146
  canServerPageable: boolean;
126
147
  canServerSearch: boolean;
127
148
  canCreate: boolean;
@@ -130,26 +151,60 @@ declare var __VLS_8: {
130
151
  canEditRow: (item: Record<string, any>) => boolean;
131
152
  onlyOwnerEdit: boolean;
132
153
  onlyOwnerOverridePermission: string | string[] | undefined;
154
+ autoRefresh: import("vue").Raw<import("#imports").UseAutoRefreshHandle>;
133
155
  };
134
- }, __VLS_164: any, __VLS_167: any, __VLS_170: any;
156
+ }, __VLS_176: never, __VLS_177: {
157
+ operation: {
158
+ openDialog: typeof openDialog;
159
+ openDialogReadonly: typeof openDialogReadonly;
160
+ createItem: ((item: Record<string, any>, callback?: FormDialogCallback, importing?: boolean) => Promise<void>) | ((item: Record<string, any>, callback?: FormDialogCallback, importing?: boolean) => Promise<any>);
161
+ importItems: ((importData: Record<string, any>[], callback?: FormDialogCallback) => void) | ((importData: Record<string, any>[], callback?: FormDialogCallback) => void);
162
+ updateItem: ((item: Record<string, any>, callback?: FormDialogCallback) => Promise<void>) | ((item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>);
163
+ deleteItem: ((item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>) | ((item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>);
164
+ reload: (() => Promise<void> | undefined) | (() => Promise<void>);
165
+ setSearch: ((keyword: string) => void) | ((keyword: string) => void);
166
+ canServerPageable: boolean;
167
+ canServerSearch: boolean;
168
+ canCreate: boolean;
169
+ canUpdate: boolean;
170
+ canDelete: boolean;
171
+ canEditRow: (item: Record<string, any>) => boolean;
172
+ onlyOwnerEdit: boolean;
173
+ onlyOwnerOverridePermission: string | string[] | undefined;
174
+ autoRefresh: import("vue").Raw<import("#imports").UseAutoRefreshHandle>;
175
+ };
176
+ }, __VLS_212: any, __VLS_215: any, __VLS_218: any, __VLS_220: {
177
+ isImporting: boolean;
178
+ total: number;
179
+ processed: number;
180
+ succeeded: number;
181
+ failed: number;
182
+ percent: number;
183
+ };
135
184
  type __VLS_Slots = {} & {
136
- [K in NonNullable<typeof __VLS_95>]?: (props: typeof __VLS_96) => any;
185
+ [K in NonNullable<typeof __VLS_102>]?: (props: typeof __VLS_103) => any;
186
+ } & {
187
+ [K in NonNullable<typeof __VLS_135>]?: (props: typeof __VLS_136) => any;
137
188
  } & {
138
- [K in NonNullable<typeof __VLS_128>]?: (props: typeof __VLS_129) => any;
189
+ [K in NonNullable<typeof __VLS_176>]?: (props: typeof __VLS_177) => any;
139
190
  } & {
140
191
  header?: (props: typeof __VLS_8) => any;
141
192
  } & {
142
193
  title?: (props: typeof __VLS_34) => any;
143
194
  } & {
144
- search?: (props: typeof __VLS_50) => any;
195
+ autoRefreshControl?: (props: typeof __VLS_44) => any;
145
196
  } & {
146
- toolbarItems?: (props: typeof __VLS_63) => any;
197
+ search?: (props: typeof __VLS_57) => any;
147
198
  } & {
148
- form?: (props: typeof __VLS_164) => any;
199
+ toolbarItems?: (props: typeof __VLS_70) => any;
149
200
  } & {
150
- formTitle?: (props: typeof __VLS_167) => any;
201
+ form?: (props: typeof __VLS_212) => any;
151
202
  } & {
152
- formAction?: (props: typeof __VLS_170) => any;
203
+ formTitle?: (props: typeof __VLS_215) => any;
204
+ } & {
205
+ formAction?: (props: typeof __VLS_218) => any;
206
+ } & {
207
+ importProgress?: (props: typeof __VLS_220) => any;
153
208
  };
154
209
  declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<__VLS_Props>, {
155
210
  noDataText: string;
@@ -164,20 +219,27 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
164
219
  modelBy: undefined;
165
220
  fields: () => never[];
166
221
  stringFields: () => never[];
222
+ importConcurrency: number;
167
223
  onlyOwnerEdit: boolean;
168
224
  api: boolean;
169
225
  perPageStorageEnabled: boolean;
226
+ autoRefresh: boolean;
227
+ autoRefreshDefault: number;
228
+ autoRefreshControl: boolean;
229
+ virtual: undefined;
230
+ virtualThreshold: number;
231
+ virtualHeight: string;
170
232
  }>>, {
171
- reload: () => void;
233
+ reload: (() => Promise<void> | undefined) | (() => Promise<void>);
172
234
  operation: import("vue").Ref<{
173
235
  openDialog: typeof openDialog;
174
236
  openDialogReadonly: typeof openDialogReadonly;
175
- createItem: (item: Record<string, any>, callback?: FormDialogCallback, importing?: boolean) => Promise<any>;
176
- importItems: (importItemsList: Record<string, any>[], callback?: FormDialogCallback) => void;
177
- updateItem: (item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>;
178
- deleteItem: (item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>;
179
- reload: () => void;
180
- setSearch: (keyword: string) => void;
237
+ createItem: ((item: Record<string, any>, callback?: FormDialogCallback, importing?: boolean) => Promise<void>) | ((item: Record<string, any>, callback?: FormDialogCallback, importing?: boolean) => Promise<any>);
238
+ importItems: ((importData: Record<string, any>[], callback?: FormDialogCallback) => void) | ((importData: Record<string, any>[], callback?: FormDialogCallback) => void);
239
+ updateItem: ((item: Record<string, any>, callback?: FormDialogCallback) => Promise<void>) | ((item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>);
240
+ deleteItem: ((item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>) | ((item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>);
241
+ reload: (() => Promise<void> | undefined) | (() => Promise<void>);
242
+ setSearch: ((keyword: string) => void) | ((keyword: string) => void);
181
243
  canServerPageable: boolean;
182
244
  canServerSearch: boolean;
183
245
  canCreate: boolean;
@@ -186,15 +248,16 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
186
248
  canEditRow: (item: Record<string, any>) => boolean;
187
249
  onlyOwnerEdit: boolean;
188
250
  onlyOwnerOverridePermission: string | string[] | undefined;
251
+ autoRefresh: import("vue").Raw<import("#imports").UseAutoRefreshHandle>;
189
252
  }, {
190
253
  openDialog: typeof openDialog;
191
254
  openDialogReadonly: typeof openDialogReadonly;
192
- createItem: (item: Record<string, any>, callback?: FormDialogCallback, importing?: boolean) => Promise<any>;
193
- importItems: (importItemsList: Record<string, any>[], callback?: FormDialogCallback) => void;
194
- updateItem: (item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>;
195
- deleteItem: (item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>;
196
- reload: () => void;
197
- setSearch: (keyword: string) => void;
255
+ createItem: ((item: Record<string, any>, callback?: FormDialogCallback, importing?: boolean) => Promise<void>) | ((item: Record<string, any>, callback?: FormDialogCallback, importing?: boolean) => Promise<any>);
256
+ importItems: ((importData: Record<string, any>[], callback?: FormDialogCallback) => void) | ((importData: Record<string, any>[], callback?: FormDialogCallback) => void);
257
+ updateItem: ((item: Record<string, any>, callback?: FormDialogCallback) => Promise<void>) | ((item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>);
258
+ deleteItem: ((item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>) | ((item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>);
259
+ reload: (() => Promise<void> | undefined) | (() => Promise<void>);
260
+ setSearch: ((keyword: string) => void) | ((keyword: string) => void);
198
261
  canServerPageable: import("vue").ComputedRef<boolean>;
199
262
  canServerSearch: import("vue").ComputedRef<boolean>;
200
263
  canCreate: import("vue").ComputedRef<boolean>;
@@ -203,15 +266,16 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
203
266
  canEditRow: (item: Record<string, any>) => boolean;
204
267
  onlyOwnerEdit: boolean;
205
268
  onlyOwnerOverridePermission: string | string[] | undefined;
269
+ autoRefresh: import("vue").Raw<import("#imports").UseAutoRefreshHandle>;
206
270
  } | {
207
271
  openDialog: typeof openDialog;
208
272
  openDialogReadonly: typeof openDialogReadonly;
209
- createItem: (item: Record<string, any>, callback?: FormDialogCallback, importing?: boolean) => Promise<any>;
210
- importItems: (importItemsList: Record<string, any>[], callback?: FormDialogCallback) => void;
211
- updateItem: (item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>;
212
- deleteItem: (item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>;
213
- reload: () => void;
214
- setSearch: (keyword: string) => void;
273
+ createItem: ((item: Record<string, any>, callback?: FormDialogCallback, importing?: boolean) => Promise<void>) | ((item: Record<string, any>, callback?: FormDialogCallback, importing?: boolean) => Promise<any>);
274
+ importItems: ((importData: Record<string, any>[], callback?: FormDialogCallback) => void) | ((importData: Record<string, any>[], callback?: FormDialogCallback) => void);
275
+ updateItem: ((item: Record<string, any>, callback?: FormDialogCallback) => Promise<void>) | ((item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>);
276
+ deleteItem: ((item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>) | ((item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>);
277
+ reload: (() => Promise<void> | undefined) | (() => Promise<void>);
278
+ setSearch: ((keyword: string) => void) | ((keyword: string) => void);
215
279
  canServerPageable: boolean;
216
280
  canServerSearch: boolean;
217
281
  canCreate: boolean;
@@ -220,8 +284,34 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
220
284
  canEditRow: (item: Record<string, any>) => boolean;
221
285
  onlyOwnerEdit: boolean;
222
286
  onlyOwnerOverridePermission: string | string[] | undefined;
287
+ autoRefresh: import("vue").Raw<import("#imports").UseAutoRefreshHandle>;
223
288
  }>;
224
289
  items: import("vue").Ref<Record<string, any>[], Record<string, any>[]>;
290
+ autoRefresh: import("#imports").UseAutoRefreshHandle;
291
+ importProgress: {
292
+ isImporting: import("vue").Ref<boolean, boolean>;
293
+ total: import("vue").Ref<number, number>;
294
+ processed: import("vue").Ref<number, number>;
295
+ succeeded: import("vue").Ref<number, number>;
296
+ failed: import("vue").Ref<number, number>;
297
+ errors: import("vue").Ref<{
298
+ index: number;
299
+ message: string;
300
+ }[], import("#imports").ImportError[] | {
301
+ index: number;
302
+ message: string;
303
+ }[]>;
304
+ percent: import("vue").ComputedRef<number>;
305
+ reset: () => void;
306
+ run: <T = any>(items: T[], worker: import("#imports").ImportWorker<T>, options?: {
307
+ concurrency
308
+ /**
309
+ * ModelTable connects model metadata to reusable selection, labeling, iterator, or table UI patterns.
310
+ * This doc block is consumed by vue-docgen for generated API documentation.
311
+ */
312
+ ?: number;
313
+ }) => Promise<import("#imports").ImportSummary>;
314
+ };
225
315
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
226
316
  delete: (...args: any[]) => void;
227
317
  create: (...args: any[]) => void;
@@ -241,9 +331,16 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
241
331
  modelBy: undefined;
242
332
  fields: () => never[];
243
333
  stringFields: () => never[];
334
+ importConcurrency: number;
244
335
  onlyOwnerEdit: boolean;
245
336
  api: boolean;
246
337
  perPageStorageEnabled: boolean;
338
+ autoRefresh: boolean;
339
+ autoRefreshDefault: number;
340
+ autoRefreshControl: boolean;
341
+ virtual: undefined;
342
+ virtualThreshold: number;
343
+ virtualHeight: string;
247
344
  }>>> & Readonly<{
248
345
  onDelete?: ((...args: any[]) => any) | undefined;
249
346
  onCreate?: ((...args: any[]) => any) | undefined;