@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,8 +1,9 @@
1
1
  <script setup>
2
- import { ref, watch, watchEffect, nextTick } from "vue";
2
+ import { ref, watch, watchEffect, nextTick, computed } from "vue";
3
3
  import { VTextField } from "vuetify/components/VTextField";
4
- import Datepicker from "@vuepic/vue-datepicker";
4
+ import { VueDatePicker as Datepicker } from "@vuepic/vue-datepicker";
5
5
  import "@vuepic/vue-datepicker/dist/main.css";
6
+ import { th, enUS } from "date-fns/locale";
6
7
  import { Datetime } from "../../utils/datetime";
7
8
  const props = defineProps({
8
9
  enableSeconds: { type: Boolean, required: false, default: false },
@@ -13,6 +14,11 @@ const props = defineProps({
13
14
  const emit = defineEmits(["update:modelValue"]);
14
15
  const time = ref(null);
15
16
  const tempTime = ref(null);
17
+ const datepickerLocale = computed(() => props.locale === "TH" ? th : enUS);
18
+ const datepickerTimeConfig = computed(() => ({
19
+ enableSeconds: props.enableSeconds,
20
+ minutesGridIncrement: 1
21
+ }));
16
22
  const isMenuOpen = ref(false);
17
23
  const isTextFieldFocused = ref(false);
18
24
  const isTextFieldTyped = ref(false);
@@ -130,13 +136,12 @@ defineExpose({
130
136
  <Datepicker
131
137
  v-model="time"
132
138
  model-type="HH:mm:ss"
133
- :enable-seconds="enableSeconds"
134
- minutes-grid-increment="1"
139
+ :time-config="datepickerTimeConfig"
135
140
  time-picker
136
141
  auto-apply
137
142
  :close-on-auto-apply="false"
138
143
  inline
139
- :locale="locale"
144
+ :locale="datepickerLocale"
140
145
  @update:model-value="setDatePicker"
141
146
  />
142
147
  </v-menu>
@@ -16,11 +16,9 @@ type __VLS_ModelProps = {
16
16
  };
17
17
  type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
18
18
  declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
19
- close: (...args: any[]) => void;
20
- "update:modelValue": (value: string | undefined) => void;
19
+ "update:modelValue": (value: string | undefined) => any;
21
20
  }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
22
21
  "onUpdate:modelValue"?: ((value: string | undefined) => any) | undefined;
23
- onClose?: ((...args: any[]) => any) | undefined;
24
22
  }>, {
25
23
  maxWidth: string | number;
26
24
  imageFormat: ImageFormat;
@@ -16,11 +16,9 @@ type __VLS_ModelProps = {
16
16
  };
17
17
  type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
18
18
  declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
19
- close: (...args: any[]) => void;
20
- "update:modelValue": (value: string | undefined) => void;
19
+ "update:modelValue": (value: string | undefined) => any;
21
20
  }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
22
21
  "onUpdate:modelValue"?: ((value: string | undefined) => any) | undefined;
23
- onClose?: ((...args: any[]) => any) | undefined;
24
22
  }>, {
25
23
  maxWidth: string | number;
26
24
  imageFormat: ImageFormat;
@@ -0,0 +1,16 @@
1
+ /**
2
+ * ModelAutoRefreshChip renders the toolbar countdown/pause chip for ModelTable and
3
+ * ModelIterator. Pass the handle returned by `useAutoRefresh` as `control`. Renders
4
+ * nothing unless auto-refresh is enabled, so callers can mount it unconditionally.
5
+ * This doc block is consumed by vue-docgen for generated API documentation.
6
+ */
7
+ import type { UseAutoRefreshHandle } from '../../composables/autoRefresh.js';
8
+ interface Props {
9
+ control: UseAutoRefreshHandle;
10
+ color?: string;
11
+ }
12
+ declare const __VLS_export: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
13
+ color: string;
14
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
15
+ declare const _default: typeof __VLS_export;
16
+ export default _default;
@@ -0,0 +1,34 @@
1
+ <script setup>
2
+ const props = defineProps({
3
+ control: { type: Object, required: true },
4
+ color: { type: String, required: false, default: "primary" }
5
+ });
6
+ </script>
7
+
8
+ <template>
9
+ <v-chip
10
+ v-if="props.control.enabled.value"
11
+ class="ml-2"
12
+ density="compact"
13
+ :color="props.color"
14
+ variant="elevated"
15
+ >
16
+ <v-icon
17
+ size="small"
18
+ start
19
+ >
20
+ mdi mdi-autorenew
21
+ </v-icon>
22
+ <span v-if="props.control.isLoading.value">—</span>
23
+ <span v-else-if="!props.control.isActive.value">paused</span>
24
+ <span v-else>{{ props.control.remainingSeconds.value }}s</span>
25
+ <v-btn
26
+ class="ml-1"
27
+ density="compact"
28
+ variant="text"
29
+ size="x-small"
30
+ :icon="props.control.isUserPaused.value ? 'mdi mdi-play' : 'mdi mdi-pause'"
31
+ @click="props.control.togglePause"
32
+ />
33
+ </v-chip>
34
+ </template>
@@ -0,0 +1,16 @@
1
+ /**
2
+ * ModelAutoRefreshChip renders the toolbar countdown/pause chip for ModelTable and
3
+ * ModelIterator. Pass the handle returned by `useAutoRefresh` as `control`. Renders
4
+ * nothing unless auto-refresh is enabled, so callers can mount it unconditionally.
5
+ * This doc block is consumed by vue-docgen for generated API documentation.
6
+ */
7
+ import type { UseAutoRefreshHandle } from '../../composables/autoRefresh.js';
8
+ interface Props {
9
+ control: UseAutoRefreshHandle;
10
+ color?: string;
11
+ }
12
+ declare const __VLS_export: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
13
+ color: string;
14
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
15
+ declare const _default: typeof __VLS_export;
16
+ export default _default;
@@ -19,7 +19,8 @@ const props = defineProps({
19
19
  operationUpdate: { type: [Object, String], required: false },
20
20
  operationDelete: { type: [Object, String], required: false },
21
21
  operationRead: { type: [Object, String], required: false },
22
- fields: { type: Array, required: false, default: () => ["*"] }
22
+ fields: { type: Array, required: false, default: () => ["*"] },
23
+ importConcurrency: { type: Number, required: false }
23
24
  });
24
25
  const emit = defineEmits(["create", "update"]);
25
26
  const {
@@ -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;