@ramathibodi/nuxt-commons 4.0.12 → 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 (27) 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.vue +112 -7
  6. package/dist/runtime/components/model/Pad.vue +2 -1
  7. package/dist/runtime/components/model/Table.d.vue.ts +79 -12
  8. package/dist/runtime/components/model/Table.vue +106 -3
  9. package/dist/runtime/components/model/Table.vue.d.ts +79 -12
  10. package/dist/runtime/components/model/iterator.d.vue.ts +117 -29
  11. package/dist/runtime/components/model/iterator.vue +117 -5
  12. package/dist/runtime/components/model/iterator.vue.d.ts +117 -29
  13. package/dist/runtime/composables/apiModel.d.ts +20 -1
  14. package/dist/runtime/composables/apiModel.js +24 -16
  15. package/dist/runtime/composables/document/template.d.ts +61 -0
  16. package/dist/runtime/composables/document/template.js +59 -0
  17. package/dist/runtime/composables/document/validateTemplate.d.ts +62 -0
  18. package/dist/runtime/composables/document/validateTemplate.js +378 -0
  19. package/dist/runtime/composables/graphqlModel.d.ts +20 -1
  20. package/dist/runtime/composables/graphqlModel.js +24 -16
  21. package/dist/runtime/composables/graphqlModelOperation.d.ts +1 -0
  22. package/dist/runtime/composables/importProgress.d.ts +34 -0
  23. package/dist/runtime/composables/importProgress.js +50 -0
  24. package/dist/runtime/utils/virtualize.d.ts +15 -0
  25. package/dist/runtime/utils/virtualize.js +10 -0
  26. package/package.json +2 -1
  27. package/scripts/validate-document-template.mjs +158 -0
package/dist/module.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "compatibility": {
5
5
  "nuxt": "^4.3.1"
6
6
  },
7
- "version": "4.0.12",
7
+ "version": "4.0.13",
8
8
  "builder": {
9
9
  "@nuxt/module-builder": "1.0.2",
10
10
  "unbuild": "3.6.1"
@@ -0,0 +1,35 @@
1
+ /**
2
+ * Public props accepted by DialogImportProgress.
3
+ * Document each prop field with intent, defaults, and side effects for clear generated docs.
4
+ */
5
+ interface DialogImportProgressProps {
6
+ modelValue: boolean;
7
+ total: number;
8
+ processed: number;
9
+ succeeded?: number;
10
+ failed?: number;
11
+ percent: number;
12
+ title?: string;
13
+ color?: string;
14
+ }
15
+ declare var __VLS_20: {};
16
+ type __VLS_Slots = {} & {
17
+ default?: (props: typeof __VLS_20) => any;
18
+ };
19
+ declare const __VLS_base: import("vue").DefineComponent<DialogImportProgressProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
20
+ "update:modelValue": (...args: any[]) => void;
21
+ }, string, import("vue").PublicProps, Readonly<DialogImportProgressProps> & Readonly<{
22
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
23
+ }>, {
24
+ title: string;
25
+ succeeded: number;
26
+ failed: number;
27
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
28
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
29
+ declare const _default: typeof __VLS_export;
30
+ export default _default;
31
+ type __VLS_WithSlots<T, S> = T & {
32
+ new (): {
33
+ $slots: S;
34
+ };
35
+ };
@@ -0,0 +1,53 @@
1
+ <script setup>
2
+ import { ref, watch } from "vue";
3
+ const props = defineProps({
4
+ modelValue: { type: Boolean, required: true },
5
+ total: { type: Number, required: true },
6
+ processed: { type: Number, required: true },
7
+ succeeded: { type: Number, required: false, default: 0 },
8
+ failed: { type: Number, required: false, default: 0 },
9
+ percent: { type: Number, required: true },
10
+ title: { type: String, required: false, default: "\u0E01\u0E33\u0E25\u0E31\u0E07\u0E19\u0E33\u0E40\u0E02\u0E49\u0E32\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25" },
11
+ color: { type: String, required: false }
12
+ });
13
+ const emit = defineEmits(["update:modelValue"]);
14
+ const dialogVisible = ref(props.modelValue);
15
+ watch(() => props.modelValue, (newValue) => {
16
+ dialogVisible.value = newValue;
17
+ });
18
+ watch(() => dialogVisible.value, (newValue) => {
19
+ emit("update:modelValue", newValue);
20
+ });
21
+ </script>
22
+
23
+ <template>
24
+ <v-dialog
25
+ v-model="dialogVisible"
26
+ persistent
27
+ max-width="500"
28
+ >
29
+ <v-card :color="props.color">
30
+ <v-card-text>
31
+ <div class="text-center mb-2">
32
+ <slot>{{ props.title }}</slot>
33
+ </div>
34
+ <div class="text-center text-body-2 mb-2">
35
+ {{ props.processed }} / {{ props.total }}
36
+ <span
37
+ v-if="props.failed > 0"
38
+ class="text-medium-emphasis"
39
+ >
40
+ (ล้มเหลว {{ props.failed }})
41
+ </span>
42
+ </div>
43
+ </v-card-text>
44
+ <v-progress-linear
45
+ :model-value="props.percent"
46
+ height="20"
47
+ color="primary"
48
+ >
49
+ <strong>{{ props.percent }}%</strong>
50
+ </v-progress-linear>
51
+ </v-card>
52
+ </v-dialog>
53
+ </template>
@@ -0,0 +1,35 @@
1
+ /**
2
+ * Public props accepted by DialogImportProgress.
3
+ * Document each prop field with intent, defaults, and side effects for clear generated docs.
4
+ */
5
+ interface DialogImportProgressProps {
6
+ modelValue: boolean;
7
+ total: number;
8
+ processed: number;
9
+ succeeded?: number;
10
+ failed?: number;
11
+ percent: number;
12
+ title?: string;
13
+ color?: string;
14
+ }
15
+ declare var __VLS_20: {};
16
+ type __VLS_Slots = {} & {
17
+ default?: (props: typeof __VLS_20) => any;
18
+ };
19
+ declare const __VLS_base: import("vue").DefineComponent<DialogImportProgressProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
20
+ "update:modelValue": (...args: any[]) => void;
21
+ }, string, import("vue").PublicProps, Readonly<DialogImportProgressProps> & Readonly<{
22
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
23
+ }>, {
24
+ title: string;
25
+ succeeded: number;
26
+ failed: number;
27
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
28
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
29
+ declare const _default: typeof __VLS_export;
30
+ export default _default;
31
+ type __VLS_WithSlots<T, S> = T & {
32
+ new (): {
33
+ $slots: S;
34
+ };
35
+ };
@@ -2,12 +2,21 @@
2
2
  import { computed, ref, watch } from "vue";
3
3
  import * as prettier from "prettier";
4
4
  import prettierPluginHtml from "prettier/plugins/html";
5
- import { useDocumentTemplate, validationRulesRegex, optionStringToChoiceObject } from "../../composables/document/template";
5
+ import {
6
+ useDocumentTemplate,
7
+ validationRulesRegex,
8
+ optionStringToChoiceObject,
9
+ printConfigToRows,
10
+ rowsToPrintConfig,
11
+ printConfigToAttributes,
12
+ configStringToRows,
13
+ rowsToConfigString
14
+ } from "../../composables/document/template";
6
15
  import {
7
16
  useDocumentTemplateInputTypes
8
17
  } from "../../composables/document/templateInputTypes";
9
18
  import { autoActionHeader, templateToHeader } from "../../composables/document/templateFormTable";
10
- import { cloneDeep } from "lodash-es";
19
+ import { cloneDeep, isPlainObject } from "lodash-es";
11
20
  import VueJsonPretty from "vue-json-pretty";
12
21
  import "vue-json-pretty/lib/styles.css";
13
22
  import { safeParseJSONDeep } from "../../utils/object";
@@ -92,6 +101,51 @@ const choiceHeaders = ref([
92
101
  width: "120px"
93
102
  }
94
103
  ]);
104
+ const printConfigHeaders = ref([
105
+ {
106
+ title: "Attribute",
107
+ key: "key"
108
+ },
109
+ {
110
+ title: "Value",
111
+ key: "value"
112
+ },
113
+ {
114
+ title: "Action",
115
+ key: "action",
116
+ width: "120px"
117
+ }
118
+ ]);
119
+ function itemsForEdit(items) {
120
+ return items.map((item) => isPlainObject(item.printConfig) ? { ...item, printConfig: printConfigToRows(item.printConfig) } : item);
121
+ }
122
+ function itemsForStore(items) {
123
+ return items.map((item) => {
124
+ if (Array.isArray(item.printConfig)) {
125
+ const map = rowsToPrintConfig(item.printConfig);
126
+ const { printConfig, ...rest } = item;
127
+ return Object.keys(map).length ? { ...rest, printConfig: map } : rest;
128
+ }
129
+ if (typeof item.printConfig === "string" && item.printConfig.trim() === "") {
130
+ const { printConfig, ...rest } = item;
131
+ return rest;
132
+ }
133
+ return item;
134
+ });
135
+ }
136
+ function setPrintConfigMode(item, mode) {
137
+ if (mode === "raw") {
138
+ if (typeof item.printConfig === "string") return;
139
+ item.printConfig = rowsToConfigString(Array.isArray(item.printConfig) ? item.printConfig : []);
140
+ } else {
141
+ if (Array.isArray(item.printConfig)) return;
142
+ item.printConfig = configStringToRows(typeof item.printConfig === "string" ? item.printConfig : "");
143
+ }
144
+ }
145
+ function printConfigPreview(printConfig) {
146
+ if (Array.isArray(printConfig)) return printConfigToAttributes(rowsToPrintConfig(printConfig));
147
+ return printConfigToAttributes(printConfig);
148
+ }
95
149
  function isValidJsonArrayOfObjects(str) {
96
150
  try {
97
151
  const parsed = JSON.parse(str);
@@ -101,19 +155,19 @@ function isValidJsonArrayOfObjects(str) {
101
155
  }
102
156
  }
103
157
  watch(templateItems, (newValue) => {
104
- if (!isAdvanceMode.value) modelValue.value = JSON.stringify(newValue);
158
+ if (!isAdvanceMode.value) modelValue.value = JSON.stringify(itemsForStore(newValue));
105
159
  }, { deep: true });
106
160
  watch(modelValue, (newValue) => {
107
- if (typeof newValue === "string" && isValidJsonArrayOfObjects(newValue)) templateItems.value = JSON.parse(newValue);
161
+ if (typeof newValue === "string" && isValidJsonArrayOfObjects(newValue)) templateItems.value = itemsForEdit(JSON.parse(newValue));
108
162
  else if (typeof newValue === "string") advanceModeCode.value = newValue;
109
- else if (newValue) templateItems.value = cloneDeep(newValue);
163
+ else if (newValue) templateItems.value = itemsForEdit(cloneDeep(newValue));
110
164
  }, { deep: true, immediate: true });
111
165
  watch(advanceModeCode, (newValue) => {
112
166
  if (isAdvanceMode.value) modelValue.value = newValue;
113
167
  });
114
168
  async function convertToAdvanceMode() {
115
169
  if (!isAdvanceMode.value) {
116
- modelValue.value = await prettier.format(useDocumentTemplate(templateItems.value).replaceAll(">", ">\n"), { parser: "html", plugins: [prettierPluginHtml] });
170
+ modelValue.value = await prettier.format(useDocumentTemplate(itemsForStore(templateItems.value)).replaceAll(">", ">\n"), { parser: "html", plugins: [prettierPluginHtml] });
117
171
  }
118
172
  }
119
173
  const inputTypes = computed(() => useDocumentTemplateInputTypes());
@@ -403,6 +457,54 @@ const ruleOptions = (inputType) => (value) => {
403
457
  label="Retrieved Value"
404
458
  />
405
459
  </v-col>
460
+ <v-col cols="12">
461
+ <div class="d-flex align-center ga-2 mb-1">
462
+ <span class="opacity-60">Print Config</span>
463
+ <span class="text-caption opacity-60">— print/docx-only; ignored by the form renderer</span>
464
+ <v-spacer />
465
+ <v-btn-toggle
466
+ :model-value="typeof data.printConfig === 'string' ? 'raw' : 'map'"
467
+ @update:model-value="(mode) => setPrintConfigMode(data, mode)"
468
+ density="compact"
469
+ variant="outlined"
470
+ divided
471
+ mandatory
472
+ >
473
+ <v-btn value="map" size="small">Key / Value</v-btn>
474
+ <v-btn value="raw" size="small">Raw string</v-btn>
475
+ </v-btn-toggle>
476
+ </div>
477
+ <v-textarea
478
+ v-if="typeof data.printConfig === 'string'"
479
+ v-model="data.printConfig"
480
+ label="Print Config (raw attributes)"
481
+ placeholder="format=dd/MM/yyyy; locale=th_TH"
482
+ auto-grow
483
+ rows="1"
484
+ />
485
+ <form-table
486
+ v-else
487
+ v-model="data.printConfig"
488
+ :headers="printConfigHeaders"
489
+ title="Print Config"
490
+ >
491
+ <template #form="{ data: rowData, rules }">
492
+ <v-container fluid>
493
+ <v-row density="compact">
494
+ <v-col cols="6">
495
+ <v-text-field v-model="rowData.key" label="Attribute" :rules="[rules.require()]" />
496
+ </v-col>
497
+ <v-col cols="6">
498
+ <v-text-field v-model="rowData.value" label="Value (blank = flag)" />
499
+ </v-col>
500
+ </v-row>
501
+ </v-container>
502
+ </template>
503
+ </form-table>
504
+ <div class="text-caption opacity-60 mt-1" v-if="printConfigPreview(data.printConfig)">
505
+ Appends to placeholder: <code>{{ printConfigPreview(data.printConfig) }}</code>
506
+ </div>
507
+ </v-col>
406
508
  </v-row>
407
509
  </v-container>
408
510
  </v-expansion-panel-text>
@@ -438,7 +540,7 @@ const ruleOptions = (inputType) => (value) => {
438
540
  elevation="1"
439
541
  max-height="250"
440
542
  class="overflow-y-auto my-1 pa-2"
441
- v-if="props.item.inputType == 'CustomCode' || props.item.validationRules || props.item.inputOptions || props.item.inputAttributes || props.item.columnAttributes || props.item.conditionalDisplay || props.item.computedValue || props.item.retrievedValue"
543
+ v-if="props.item.inputType == 'CustomCode' || props.item.validationRules || props.item.inputOptions || props.item.inputAttributes || props.item.columnAttributes || props.item.conditionalDisplay || props.item.computedValue || props.item.retrievedValue || printConfigPreview(props.item.printConfig)"
442
544
  >
443
545
  <template v-if="props.item.inputType == 'CustomCode'">
444
546
  <b>Custom Code :</b><br>
@@ -466,6 +568,9 @@ const ruleOptions = (inputType) => (value) => {
466
568
  <template v-if="props.item.retrievedValue">
467
569
  <b>Retrieved Value :</b> {{ props.item.retrievedValue }}<br>
468
570
  </template>
571
+ <template v-if="printConfigPreview(props.item.printConfig)">
572
+ <b>Print Config :</b> <code>{{ printConfigPreview(props.item.printConfig) }}</code><br>
573
+ </template>
469
574
  </v-sheet>
470
575
  </template>
471
576
  </FormTable>
@@ -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,6 +18,7 @@ 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;
@@ -26,6 +27,9 @@ interface Props extends /* @vue-ignore */ InstanceType<typeof VDataTable['$props
26
27
  autoRefresh?: number | boolean;
27
28
  autoRefreshDefault?: number;
28
29
  autoRefreshControl?: boolean;
30
+ virtual?: boolean;
31
+ virtualThreshold?: number;
32
+ virtualHeight?: number | string;
29
33
  }
30
34
  /**
31
35
  * Public props accepted by ModelTable.
@@ -40,7 +44,7 @@ declare var __VLS_8: {
40
44
  openDialog: typeof openDialog;
41
45
  openDialogReadonly: typeof openDialogReadonly;
42
46
  createItem: ((item: Record<string, any>, callback?: FormDialogCallback, importing?: boolean) => Promise<void>) | ((item: Record<string, any>, callback?: FormDialogCallback, importing?: boolean) => Promise<any>);
43
- importItems: ((importItems: Record<string, any>[], callback?: FormDialogCallback) => void) | ((importItemsList: Record<string, any>[], callback?: FormDialogCallback) => void);
47
+ importItems: ((importData: Record<string, any>[], callback?: FormDialogCallback) => void) | ((importData: Record<string, any>[], callback?: FormDialogCallback) => void);
44
48
  updateItem: ((item: Record<string, any>, callback?: FormDialogCallback) => Promise<void>) | ((item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>);
45
49
  deleteItem: ((item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>) | ((item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>);
46
50
  reload: (() => Promise<void> | undefined) | (() => Promise<void>);
@@ -73,7 +77,7 @@ declare var __VLS_8: {
73
77
  openDialog: typeof openDialog;
74
78
  openDialogReadonly: typeof openDialogReadonly;
75
79
  createItem: ((item: Record<string, any>, callback?: FormDialogCallback, importing?: boolean) => Promise<void>) | ((item: Record<string, any>, callback?: FormDialogCallback, importing?: boolean) => Promise<any>);
76
- importItems: ((importItems: Record<string, any>[], callback?: FormDialogCallback) => void) | ((importItemsList: Record<string, any>[], callback?: FormDialogCallback) => void);
80
+ importItems: ((importData: Record<string, any>[], callback?: FormDialogCallback) => void) | ((importData: Record<string, any>[], callback?: FormDialogCallback) => void);
77
81
  updateItem: ((item: Record<string, any>, callback?: FormDialogCallback) => Promise<void>) | ((item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>);
78
82
  deleteItem: ((item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>) | ((item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>);
79
83
  reload: (() => Promise<void> | undefined) | (() => Promise<void>);
@@ -94,7 +98,7 @@ declare var __VLS_8: {
94
98
  openDialog: typeof openDialog;
95
99
  openDialogReadonly: typeof openDialogReadonly;
96
100
  createItem: ((item: Record<string, any>, callback?: FormDialogCallback, importing?: boolean) => Promise<void>) | ((item: Record<string, any>, callback?: FormDialogCallback, importing?: boolean) => Promise<any>);
97
- importItems: ((importItems: Record<string, any>[], callback?: FormDialogCallback) => void) | ((importItemsList: Record<string, any>[], callback?: FormDialogCallback) => void);
101
+ importItems: ((importData: Record<string, any>[], callback?: FormDialogCallback) => void) | ((importData: Record<string, any>[], callback?: FormDialogCallback) => void);
98
102
  updateItem: ((item: Record<string, any>, callback?: FormDialogCallback) => Promise<void>) | ((item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>);
99
103
  deleteItem: ((item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>) | ((item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>);
100
104
  reload: (() => Promise<void> | undefined) | (() => Promise<void>);
@@ -114,7 +118,7 @@ declare var __VLS_8: {
114
118
  openDialog: typeof openDialog;
115
119
  openDialogReadonly: typeof openDialogReadonly;
116
120
  createItem: ((item: Record<string, any>, callback?: FormDialogCallback, importing?: boolean) => Promise<void>) | ((item: Record<string, any>, callback?: FormDialogCallback, importing?: boolean) => Promise<any>);
117
- importItems: ((importItems: Record<string, any>[], callback?: FormDialogCallback) => void) | ((importItemsList: Record<string, any>[], callback?: FormDialogCallback) => void);
121
+ importItems: ((importData: Record<string, any>[], callback?: FormDialogCallback) => void) | ((importData: Record<string, any>[], callback?: FormDialogCallback) => void);
118
122
  updateItem: ((item: Record<string, any>, callback?: FormDialogCallback) => Promise<void>) | ((item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>);
119
123
  deleteItem: ((item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>) | ((item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>);
120
124
  reload: (() => Promise<void> | undefined) | (() => Promise<void>);
@@ -134,7 +138,7 @@ declare var __VLS_8: {
134
138
  openDialog: typeof openDialog;
135
139
  openDialogReadonly: typeof openDialogReadonly;
136
140
  createItem: ((item: Record<string, any>, callback?: FormDialogCallback, importing?: boolean) => Promise<void>) | ((item: Record<string, any>, callback?: FormDialogCallback, importing?: boolean) => Promise<any>);
137
- importItems: ((importItems: Record<string, any>[], callback?: FormDialogCallback) => void) | ((importItemsList: Record<string, any>[], callback?: FormDialogCallback) => void);
141
+ importItems: ((importData: Record<string, any>[], callback?: FormDialogCallback) => void) | ((importData: Record<string, any>[], callback?: FormDialogCallback) => void);
138
142
  updateItem: ((item: Record<string, any>, callback?: FormDialogCallback) => Promise<void>) | ((item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>);
139
143
  deleteItem: ((item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>) | ((item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>);
140
144
  reload: (() => Promise<void> | undefined) | (() => Promise<void>);
@@ -149,11 +153,40 @@ declare var __VLS_8: {
149
153
  onlyOwnerOverridePermission: string | string[] | undefined;
150
154
  autoRefresh: import("vue").Raw<import("#imports").UseAutoRefreshHandle>;
151
155
  };
152
- }, __VLS_171: any, __VLS_174: any, __VLS_177: 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
+ };
153
184
  type __VLS_Slots = {} & {
154
185
  [K in NonNullable<typeof __VLS_102>]?: (props: typeof __VLS_103) => any;
155
186
  } & {
156
187
  [K in NonNullable<typeof __VLS_135>]?: (props: typeof __VLS_136) => any;
188
+ } & {
189
+ [K in NonNullable<typeof __VLS_176>]?: (props: typeof __VLS_177) => any;
157
190
  } & {
158
191
  header?: (props: typeof __VLS_8) => any;
159
192
  } & {
@@ -165,11 +198,13 @@ type __VLS_Slots = {} & {
165
198
  } & {
166
199
  toolbarItems?: (props: typeof __VLS_70) => any;
167
200
  } & {
168
- form?: (props: typeof __VLS_171) => any;
201
+ form?: (props: typeof __VLS_212) => any;
169
202
  } & {
170
- formTitle?: (props: typeof __VLS_174) => any;
203
+ formTitle?: (props: typeof __VLS_215) => any;
171
204
  } & {
172
- formAction?: (props: typeof __VLS_177) => any;
205
+ formAction?: (props: typeof __VLS_218) => any;
206
+ } & {
207
+ importProgress?: (props: typeof __VLS_220) => any;
173
208
  };
174
209
  declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<__VLS_Props>, {
175
210
  noDataText: string;
@@ -184,19 +219,23 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
184
219
  modelBy: undefined;
185
220
  fields: () => never[];
186
221
  stringFields: () => never[];
222
+ importConcurrency: number;
187
223
  onlyOwnerEdit: boolean;
188
224
  api: boolean;
189
225
  perPageStorageEnabled: boolean;
190
226
  autoRefresh: boolean;
191
227
  autoRefreshDefault: number;
192
228
  autoRefreshControl: boolean;
229
+ virtual: undefined;
230
+ virtualThreshold: number;
231
+ virtualHeight: string;
193
232
  }>>, {
194
233
  reload: (() => Promise<void> | undefined) | (() => Promise<void>);
195
234
  operation: import("vue").Ref<{
196
235
  openDialog: typeof openDialog;
197
236
  openDialogReadonly: typeof openDialogReadonly;
198
237
  createItem: ((item: Record<string, any>, callback?: FormDialogCallback, importing?: boolean) => Promise<void>) | ((item: Record<string, any>, callback?: FormDialogCallback, importing?: boolean) => Promise<any>);
199
- importItems: ((importItems: Record<string, any>[], callback?: FormDialogCallback) => void) | ((importItemsList: Record<string, any>[], callback?: FormDialogCallback) => void);
238
+ importItems: ((importData: Record<string, any>[], callback?: FormDialogCallback) => void) | ((importData: Record<string, any>[], callback?: FormDialogCallback) => void);
200
239
  updateItem: ((item: Record<string, any>, callback?: FormDialogCallback) => Promise<void>) | ((item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>);
201
240
  deleteItem: ((item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>) | ((item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>);
202
241
  reload: (() => Promise<void> | undefined) | (() => Promise<void>);
@@ -214,7 +253,7 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
214
253
  openDialog: typeof openDialog;
215
254
  openDialogReadonly: typeof openDialogReadonly;
216
255
  createItem: ((item: Record<string, any>, callback?: FormDialogCallback, importing?: boolean) => Promise<void>) | ((item: Record<string, any>, callback?: FormDialogCallback, importing?: boolean) => Promise<any>);
217
- importItems: ((importItems: Record<string, any>[], callback?: FormDialogCallback) => void) | ((importItemsList: Record<string, any>[], callback?: FormDialogCallback) => void);
256
+ importItems: ((importData: Record<string, any>[], callback?: FormDialogCallback) => void) | ((importData: Record<string, any>[], callback?: FormDialogCallback) => void);
218
257
  updateItem: ((item: Record<string, any>, callback?: FormDialogCallback) => Promise<void>) | ((item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>);
219
258
  deleteItem: ((item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>) | ((item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>);
220
259
  reload: (() => Promise<void> | undefined) | (() => Promise<void>);
@@ -232,7 +271,7 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
232
271
  openDialog: typeof openDialog;
233
272
  openDialogReadonly: typeof openDialogReadonly;
234
273
  createItem: ((item: Record<string, any>, callback?: FormDialogCallback, importing?: boolean) => Promise<void>) | ((item: Record<string, any>, callback?: FormDialogCallback, importing?: boolean) => Promise<any>);
235
- importItems: ((importItems: Record<string, any>[], callback?: FormDialogCallback) => void) | ((importItemsList: Record<string, any>[], callback?: FormDialogCallback) => void);
274
+ importItems: ((importData: Record<string, any>[], callback?: FormDialogCallback) => void) | ((importData: Record<string, any>[], callback?: FormDialogCallback) => void);
236
275
  updateItem: ((item: Record<string, any>, callback?: FormDialogCallback) => Promise<void>) | ((item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>);
237
276
  deleteItem: ((item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>) | ((item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>);
238
277
  reload: (() => Promise<void> | undefined) | (() => Promise<void>);
@@ -249,6 +288,30 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
249
288
  }>;
250
289
  items: import("vue").Ref<Record<string, any>[], Record<string, any>[]>;
251
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
+ };
252
315
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
253
316
  delete: (...args: any[]) => void;
254
317
  create: (...args: any[]) => void;
@@ -268,12 +331,16 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
268
331
  modelBy: undefined;
269
332
  fields: () => never[];
270
333
  stringFields: () => never[];
334
+ importConcurrency: number;
271
335
  onlyOwnerEdit: boolean;
272
336
  api: boolean;
273
337
  perPageStorageEnabled: boolean;
274
338
  autoRefresh: boolean;
275
339
  autoRefreshDefault: number;
276
340
  autoRefreshControl: boolean;
341
+ virtual: undefined;
342
+ virtualThreshold: number;
343
+ virtualHeight: string;
277
344
  }>>> & Readonly<{
278
345
  onDelete?: ((...args: any[]) => any) | undefined;
279
346
  onCreate?: ((...args: any[]) => any) | undefined;