vlite3 0.7.2 → 0.7.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/ColorPicker/ColorIro.vue3.js +2 -2
- package/components/ColorPicker/ColorPicker.vue.js +2 -2
- package/components/DataTable/DataTable.vue.d.ts +1 -1
- package/components/Screen/Screen.vue.d.ts +2 -238
- package/components/Screen/Screen.vue.js +254 -233
- package/components/Screen/ScreenFilter.vue.js +1 -1
- package/components/Workbook/Sheet.vue.d.ts +1 -1
- package/package.json +1 -1
- /package/components/ColorPicker/{ColorIro.vue.js → ColorIro.vue2.js} +0 -0
|
@@ -5,8 +5,8 @@ import O from "../Input.vue.js";
|
|
|
5
5
|
/* empty css */
|
|
6
6
|
import "../../core/config.js";
|
|
7
7
|
import y from "../Button.vue.js";
|
|
8
|
-
import E from "./ColorIro.
|
|
9
|
-
/* empty css
|
|
8
|
+
import E from "./ColorIro.vue2.js";
|
|
9
|
+
/* empty css */
|
|
10
10
|
import { useEyeDropper as P } from "@vueuse/core";
|
|
11
11
|
const I = {
|
|
12
12
|
key: 0,
|
|
@@ -42,10 +42,10 @@ declare const __VLS_component: import('vue').DefineComponent<DataTableProps, {},
|
|
|
42
42
|
headers: import('./types').TableHeader[];
|
|
43
43
|
paginationProps: import('./types').DataTablePaginationProps;
|
|
44
44
|
emptyIcon: string;
|
|
45
|
-
selectedRows: any[];
|
|
46
45
|
showPagination: boolean;
|
|
47
46
|
keyField: string;
|
|
48
47
|
hoverable: boolean;
|
|
48
|
+
selectedRows: any[];
|
|
49
49
|
bordered: boolean;
|
|
50
50
|
sortable: boolean;
|
|
51
51
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
@@ -1,130 +1,5 @@
|
|
|
1
1
|
import { ScreenProps } from './types';
|
|
2
|
-
declare function __VLS_template():
|
|
3
|
-
attrs: Partial<{}>;
|
|
4
|
-
slots: {
|
|
5
|
-
title?(_: {}): any;
|
|
6
|
-
description?(_: {}): any;
|
|
7
|
-
'before-search'?(_: {}): any;
|
|
8
|
-
actions?(_: {}): any;
|
|
9
|
-
'after-add'?(_: {}): any;
|
|
10
|
-
'custom-header'?(_: {}): any;
|
|
11
|
-
'sub-header'?(_: {}): any;
|
|
12
|
-
empty?(_: {}): any;
|
|
13
|
-
};
|
|
14
|
-
refs: {
|
|
15
|
-
exportDataRef: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('../ExportData').ExportDataProps> & Readonly<{}>, {
|
|
16
|
-
exportData: (format: import('../ExportData').ExportFormat, close?: () => void) => Promise<void>;
|
|
17
|
-
availableFormats: import('vue').ComputedRef<{
|
|
18
|
-
label: string;
|
|
19
|
-
value: import('../ExportData').ExportFormat;
|
|
20
|
-
icon: string;
|
|
21
|
-
}[]>;
|
|
22
|
-
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {
|
|
23
|
-
title: string;
|
|
24
|
-
mode: "frontend" | "backend";
|
|
25
|
-
formats: import('../ExportData').ExportFormat[];
|
|
26
|
-
buttonText: string;
|
|
27
|
-
buttonIcon: string;
|
|
28
|
-
}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, HTMLDivElement, import('vue').ComponentProvideOptions, {
|
|
29
|
-
P: {};
|
|
30
|
-
B: {};
|
|
31
|
-
D: {};
|
|
32
|
-
C: {};
|
|
33
|
-
M: {};
|
|
34
|
-
Defaults: {};
|
|
35
|
-
}, Readonly<import('../ExportData').ExportDataProps> & Readonly<{}>, {
|
|
36
|
-
exportData: (format: import('../ExportData').ExportFormat, close?: () => void) => Promise<void>;
|
|
37
|
-
availableFormats: import('vue').ComputedRef<{
|
|
38
|
-
label: string;
|
|
39
|
-
value: import('../ExportData').ExportFormat;
|
|
40
|
-
icon: string;
|
|
41
|
-
}[]>;
|
|
42
|
-
}, {}, {}, {}, {
|
|
43
|
-
title: string;
|
|
44
|
-
mode: "frontend" | "backend";
|
|
45
|
-
formats: import('../ExportData').ExportFormat[];
|
|
46
|
-
buttonText: string;
|
|
47
|
-
buttonIcon: string;
|
|
48
|
-
}>;
|
|
49
|
-
importDataRef: {
|
|
50
|
-
$: import('vue').ComponentInternalInstance;
|
|
51
|
-
$data: {};
|
|
52
|
-
$props: {
|
|
53
|
-
readonly title?: string;
|
|
54
|
-
readonly titleI18n?: string;
|
|
55
|
-
readonly buttonText?: string;
|
|
56
|
-
readonly buttonIcon?: string;
|
|
57
|
-
readonly fields: import('../ImportData').ImportField[];
|
|
58
|
-
readonly batchSize?: number;
|
|
59
|
-
readonly processBatch: (payload: import('../ImportData').ImportBatchPayload) => Promise<import('../ImportData').ImportBatchResult>;
|
|
60
|
-
readonly onComplete?: () => void;
|
|
61
|
-
readonly show?: boolean;
|
|
62
|
-
readonly "onUpdate:show"?: (value: boolean) => any;
|
|
63
|
-
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
|
|
64
|
-
$attrs: {
|
|
65
|
-
[x: string]: unknown;
|
|
66
|
-
};
|
|
67
|
-
$refs: {
|
|
68
|
-
[x: string]: unknown;
|
|
69
|
-
};
|
|
70
|
-
$slots: Readonly<{
|
|
71
|
-
[name: string]: import('vue').Slot<any>;
|
|
72
|
-
}>;
|
|
73
|
-
$root: import('vue').ComponentPublicInstance | null;
|
|
74
|
-
$parent: import('vue').ComponentPublicInstance | null;
|
|
75
|
-
$host: Element | null;
|
|
76
|
-
$emit: (event: "update:show", value: boolean) => void;
|
|
77
|
-
$el: any;
|
|
78
|
-
$options: import('vue').ComponentOptionsBase<Readonly<import('../ImportData').ImportDataProps & {
|
|
79
|
-
show?: boolean;
|
|
80
|
-
}> & Readonly<{
|
|
81
|
-
"onUpdate:show"?: (value: boolean) => any;
|
|
82
|
-
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
83
|
-
"update:show": (value: boolean) => any;
|
|
84
|
-
}, string, {
|
|
85
|
-
title: string;
|
|
86
|
-
batchSize: number;
|
|
87
|
-
show: boolean;
|
|
88
|
-
buttonText: string;
|
|
89
|
-
buttonIcon: string;
|
|
90
|
-
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
|
|
91
|
-
beforeCreate?: (() => void) | (() => void)[];
|
|
92
|
-
created?: (() => void) | (() => void)[];
|
|
93
|
-
beforeMount?: (() => void) | (() => void)[];
|
|
94
|
-
mounted?: (() => void) | (() => void)[];
|
|
95
|
-
beforeUpdate?: (() => void) | (() => void)[];
|
|
96
|
-
updated?: (() => void) | (() => void)[];
|
|
97
|
-
activated?: (() => void) | (() => void)[];
|
|
98
|
-
deactivated?: (() => void) | (() => void)[];
|
|
99
|
-
beforeDestroy?: (() => void) | (() => void)[];
|
|
100
|
-
beforeUnmount?: (() => void) | (() => void)[];
|
|
101
|
-
destroyed?: (() => void) | (() => void)[];
|
|
102
|
-
unmounted?: (() => void) | (() => void)[];
|
|
103
|
-
renderTracked?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
|
|
104
|
-
renderTriggered?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
|
|
105
|
-
errorCaptured?: ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void)[];
|
|
106
|
-
};
|
|
107
|
-
$forceUpdate: () => void;
|
|
108
|
-
$nextTick: typeof import('vue').nextTick;
|
|
109
|
-
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
|
|
110
|
-
} & Readonly<{
|
|
111
|
-
title: string;
|
|
112
|
-
batchSize: number;
|
|
113
|
-
show: boolean;
|
|
114
|
-
buttonText: string;
|
|
115
|
-
buttonIcon: string;
|
|
116
|
-
}> & Omit<Readonly<import('../ImportData').ImportDataProps & {
|
|
117
|
-
show?: boolean;
|
|
118
|
-
}> & Readonly<{
|
|
119
|
-
"onUpdate:show"?: (value: boolean) => any;
|
|
120
|
-
}>, "title" | "batchSize" | "show" | "buttonText" | "buttonIcon"> & import('vue').ShallowUnwrapRef<{}> & {} & import('vue').ComponentCustomProperties & {} & {
|
|
121
|
-
$slots: {
|
|
122
|
-
trigger?(_: {}): any;
|
|
123
|
-
};
|
|
124
|
-
};
|
|
125
|
-
};
|
|
126
|
-
rootEl: HTMLDivElement;
|
|
127
|
-
};
|
|
2
|
+
declare function __VLS_template(): any;
|
|
128
3
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
129
4
|
declare const __VLS_component: import('vue').DefineComponent<ScreenProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
130
5
|
delete: (items: any[]) => any;
|
|
@@ -150,118 +25,7 @@ declare const __VLS_component: import('vue').DefineComponent<ScreenProps, {}, {}
|
|
|
150
25
|
filterSchema: import('../Form').IForm[];
|
|
151
26
|
filterType: "modal" | "dropdown";
|
|
152
27
|
showRefresh: boolean;
|
|
153
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true,
|
|
154
|
-
exportDataRef: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('../ExportData').ExportDataProps> & Readonly<{}>, {
|
|
155
|
-
exportData: (format: import('../ExportData').ExportFormat, close?: () => void) => Promise<void>;
|
|
156
|
-
availableFormats: import('vue').ComputedRef<{
|
|
157
|
-
label: string;
|
|
158
|
-
value: import('../ExportData').ExportFormat;
|
|
159
|
-
icon: string;
|
|
160
|
-
}[]>;
|
|
161
|
-
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {
|
|
162
|
-
title: string;
|
|
163
|
-
mode: "frontend" | "backend";
|
|
164
|
-
formats: import('../ExportData').ExportFormat[];
|
|
165
|
-
buttonText: string;
|
|
166
|
-
buttonIcon: string;
|
|
167
|
-
}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, HTMLDivElement, import('vue').ComponentProvideOptions, {
|
|
168
|
-
P: {};
|
|
169
|
-
B: {};
|
|
170
|
-
D: {};
|
|
171
|
-
C: {};
|
|
172
|
-
M: {};
|
|
173
|
-
Defaults: {};
|
|
174
|
-
}, Readonly<import('../ExportData').ExportDataProps> & Readonly<{}>, {
|
|
175
|
-
exportData: (format: import('../ExportData').ExportFormat, close?: () => void) => Promise<void>;
|
|
176
|
-
availableFormats: import('vue').ComputedRef<{
|
|
177
|
-
label: string;
|
|
178
|
-
value: import('../ExportData').ExportFormat;
|
|
179
|
-
icon: string;
|
|
180
|
-
}[]>;
|
|
181
|
-
}, {}, {}, {}, {
|
|
182
|
-
title: string;
|
|
183
|
-
mode: "frontend" | "backend";
|
|
184
|
-
formats: import('../ExportData').ExportFormat[];
|
|
185
|
-
buttonText: string;
|
|
186
|
-
buttonIcon: string;
|
|
187
|
-
}>;
|
|
188
|
-
importDataRef: {
|
|
189
|
-
$: import('vue').ComponentInternalInstance;
|
|
190
|
-
$data: {};
|
|
191
|
-
$props: {
|
|
192
|
-
readonly title?: string;
|
|
193
|
-
readonly titleI18n?: string;
|
|
194
|
-
readonly buttonText?: string;
|
|
195
|
-
readonly buttonIcon?: string;
|
|
196
|
-
readonly fields: import('../ImportData').ImportField[];
|
|
197
|
-
readonly batchSize?: number;
|
|
198
|
-
readonly processBatch: (payload: import('../ImportData').ImportBatchPayload) => Promise<import('../ImportData').ImportBatchResult>;
|
|
199
|
-
readonly onComplete?: () => void;
|
|
200
|
-
readonly show?: boolean;
|
|
201
|
-
readonly "onUpdate:show"?: (value: boolean) => any;
|
|
202
|
-
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
|
|
203
|
-
$attrs: {
|
|
204
|
-
[x: string]: unknown;
|
|
205
|
-
};
|
|
206
|
-
$refs: {
|
|
207
|
-
[x: string]: unknown;
|
|
208
|
-
};
|
|
209
|
-
$slots: Readonly<{
|
|
210
|
-
[name: string]: import('vue').Slot<any>;
|
|
211
|
-
}>;
|
|
212
|
-
$root: import('vue').ComponentPublicInstance | null;
|
|
213
|
-
$parent: import('vue').ComponentPublicInstance | null;
|
|
214
|
-
$host: Element | null;
|
|
215
|
-
$emit: (event: "update:show", value: boolean) => void;
|
|
216
|
-
$el: any;
|
|
217
|
-
$options: import('vue').ComponentOptionsBase<Readonly<import('../ImportData').ImportDataProps & {
|
|
218
|
-
show?: boolean;
|
|
219
|
-
}> & Readonly<{
|
|
220
|
-
"onUpdate:show"?: (value: boolean) => any;
|
|
221
|
-
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
222
|
-
"update:show": (value: boolean) => any;
|
|
223
|
-
}, string, {
|
|
224
|
-
title: string;
|
|
225
|
-
batchSize: number;
|
|
226
|
-
show: boolean;
|
|
227
|
-
buttonText: string;
|
|
228
|
-
buttonIcon: string;
|
|
229
|
-
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
|
|
230
|
-
beforeCreate?: (() => void) | (() => void)[];
|
|
231
|
-
created?: (() => void) | (() => void)[];
|
|
232
|
-
beforeMount?: (() => void) | (() => void)[];
|
|
233
|
-
mounted?: (() => void) | (() => void)[];
|
|
234
|
-
beforeUpdate?: (() => void) | (() => void)[];
|
|
235
|
-
updated?: (() => void) | (() => void)[];
|
|
236
|
-
activated?: (() => void) | (() => void)[];
|
|
237
|
-
deactivated?: (() => void) | (() => void)[];
|
|
238
|
-
beforeDestroy?: (() => void) | (() => void)[];
|
|
239
|
-
beforeUnmount?: (() => void) | (() => void)[];
|
|
240
|
-
destroyed?: (() => void) | (() => void)[];
|
|
241
|
-
unmounted?: (() => void) | (() => void)[];
|
|
242
|
-
renderTracked?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
|
|
243
|
-
renderTriggered?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
|
|
244
|
-
errorCaptured?: ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void)[];
|
|
245
|
-
};
|
|
246
|
-
$forceUpdate: () => void;
|
|
247
|
-
$nextTick: typeof import('vue').nextTick;
|
|
248
|
-
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
|
|
249
|
-
} & Readonly<{
|
|
250
|
-
title: string;
|
|
251
|
-
batchSize: number;
|
|
252
|
-
show: boolean;
|
|
253
|
-
buttonText: string;
|
|
254
|
-
buttonIcon: string;
|
|
255
|
-
}> & Omit<Readonly<import('../ImportData').ImportDataProps & {
|
|
256
|
-
show?: boolean;
|
|
257
|
-
}> & Readonly<{
|
|
258
|
-
"onUpdate:show"?: (value: boolean) => any;
|
|
259
|
-
}>, "title" | "batchSize" | "show" | "buttonText" | "buttonIcon"> & import('vue').ShallowUnwrapRef<{}> & {} & import('vue').ComponentCustomProperties & {} & {
|
|
260
|
-
$slots: {
|
|
261
|
-
trigger?(_: {}): any;
|
|
262
|
-
};
|
|
263
|
-
};
|
|
264
|
-
}, HTMLDivElement>;
|
|
28
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, any, any>;
|
|
265
29
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
266
30
|
export default _default;
|
|
267
31
|
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
1
|
+
import { defineComponent as Pe, provide as z, useSlots as Ie, computed as i, ref as x, watch as H, resolveComponent as $e, openBlock as l, createElementBlock as s, normalizeClass as N, createElementVNode as y, renderSlot as p, toDisplayString as f, createBlock as c, withCtx as d, createVNode as u, createCommentVNode as m, unref as w, resolveDynamicComponent as K, Fragment as I, mergeProps as g, createTextVNode as B, renderList as Se } from "vue";
|
|
2
|
+
import Te from "../Input.vue.js";
|
|
3
3
|
/* empty css */
|
|
4
4
|
import h from "../Button.vue.js";
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import { usePersistentState as
|
|
16
|
-
import { useVLiteConfig as
|
|
5
|
+
import F from "../Icon.vue.js";
|
|
6
|
+
import Ve from "../Tooltip.vue.js";
|
|
7
|
+
import J from "../Modal.vue.js";
|
|
8
|
+
import Re from "../ConfirmationModal.vue.js";
|
|
9
|
+
import Ee from "../Pagination/Pagination.vue.js";
|
|
10
|
+
import Oe from "../Empty/Empty.vue.js";
|
|
11
|
+
import je from "./ScreenFilter.vue.js";
|
|
12
|
+
import Ae from "../Dropdown/Dropdown.vue.js";
|
|
13
|
+
import Ne from "../ExportData/ExportData.vue.js";
|
|
14
|
+
import Fe from "../ImportData/ImportData.vue.js";
|
|
15
|
+
import { usePersistentState as Le } from "../../utils/usePersistentState.js";
|
|
16
|
+
import { useVLiteConfig as Me } from "../../core/config.js";
|
|
17
17
|
import { $t as r } from "../../utils/i18n.js";
|
|
18
|
-
import { SCREEN_CONTEXT_KEY as
|
|
19
|
-
const
|
|
18
|
+
import { SCREEN_CONTEXT_KEY as Ue } from "../DataTable/types.js";
|
|
19
|
+
const qe = { class: "flex flex-col w-full space-y-8" }, ze = { class: "flex flex-col shrink-0" }, He = {
|
|
20
20
|
key: 0,
|
|
21
21
|
class: "flex items-center! gap-2"
|
|
22
|
-
},
|
|
22
|
+
}, Ke = { class: "text-fs-7.5 font-bold text-foreground" }, Je = {
|
|
23
23
|
key: 0,
|
|
24
24
|
class: "text-sm text-gray-700 mt-1 md:max-w-[450px]"
|
|
25
|
-
},
|
|
25
|
+
}, Qe = { class: "flex flex-col sm:flex-row items-start sm:items-center gap-2.5 w-full justify-end" }, Xe = { class: "flex items-center gap-2 w-full sm:w-auto flex-1 md:flex-none justify-start sm:justify-end" }, Ye = {
|
|
26
26
|
key: 1,
|
|
27
27
|
class: "flex items-center p-1 rounded-md border border-border shrink-0"
|
|
28
|
-
},
|
|
28
|
+
}, Ge = ["title"], We = ["title"], Ze = {
|
|
29
29
|
key: 4,
|
|
30
30
|
class: "w-full md:w-60! max-sm:order-last"
|
|
31
|
-
},
|
|
32
|
-
key:
|
|
31
|
+
}, _e = { class: "flex items-center gap-3 max-sm:w-full sm:w-auto max-sm:order-last" }, et = ["href", "target"], tt = ["href", "target"], at = {
|
|
32
|
+
key: 4,
|
|
33
33
|
class: "p-8 text-center text-muted-foreground border border-dashed border-border rounded-lg"
|
|
34
|
-
},
|
|
34
|
+
}, lt = {
|
|
35
35
|
key: 2,
|
|
36
36
|
class: "-mt-2"
|
|
37
|
-
}, nt = { class: "px-1 py-1 text-sm" },
|
|
37
|
+
}, nt = { class: "px-1 py-1 text-sm" }, ot = { class: "font-medium mb-3 text-muted-foreground" }, it = { class: "space-y-3" }, rt = { key: 4 }, $t = /* @__PURE__ */ Pe({
|
|
38
38
|
__name: "Screen",
|
|
39
39
|
props: {
|
|
40
40
|
name: { default: "" },
|
|
@@ -81,118 +81,118 @@ const Me = { class: "flex flex-col w-full space-y-8" }, Ue = { class: "flex flex
|
|
|
81
81
|
headerClass: {}
|
|
82
82
|
},
|
|
83
83
|
emits: ["add", "delete"],
|
|
84
|
-
setup(t, { emit:
|
|
85
|
-
const
|
|
86
|
-
|
|
84
|
+
setup(t, { emit: ee }) {
|
|
85
|
+
const a = t, $ = Me(), Q = ee;
|
|
86
|
+
z(Ue, {
|
|
87
87
|
disableSearch: !0,
|
|
88
88
|
forceSelectable: !0
|
|
89
89
|
});
|
|
90
|
-
const
|
|
91
|
-
`view-mode-${
|
|
92
|
-
|
|
93
|
-
), S = x(""),
|
|
94
|
-
|
|
95
|
-
const
|
|
96
|
-
|
|
97
|
-
},
|
|
98
|
-
|
|
99
|
-
},
|
|
100
|
-
|
|
90
|
+
const V = Ie(), te = i(() => a.name || a.title || "default-screen"), k = Le(
|
|
91
|
+
`view-mode-${te.value}`,
|
|
92
|
+
a.table || V.table ? "table" : "list"
|
|
93
|
+
), S = x(""), R = x({}), C = x(a.pageInfo?.currentPage || 1), E = x(a.pageInfo?.itemsPerPage || a.paginationProps?.itemsPerPage || 10), v = x([]), O = x([]), T = x(!1);
|
|
94
|
+
z("screen-selected-rows", v), z("screen-request-delete", (e) => D(e));
|
|
95
|
+
const D = (e) => {
|
|
96
|
+
O.value = e, T.value = !0;
|
|
97
|
+
}, ae = () => {
|
|
98
|
+
Q("delete", O.value), T.value = !1, v.value = [];
|
|
99
|
+
}, le = (e) => {
|
|
100
|
+
Q("delete", e), v.value = [];
|
|
101
101
|
};
|
|
102
|
-
|
|
103
|
-
() =>
|
|
102
|
+
H(
|
|
103
|
+
() => a.pageInfo?.currentPage,
|
|
104
104
|
(e) => {
|
|
105
|
-
e && (
|
|
105
|
+
e && (C.value = e);
|
|
106
106
|
}
|
|
107
|
-
),
|
|
108
|
-
() =>
|
|
107
|
+
), H(
|
|
108
|
+
() => a.pageInfo?.itemsPerPage,
|
|
109
109
|
(e) => {
|
|
110
|
-
e && (
|
|
110
|
+
e && (E.value = e);
|
|
111
111
|
}
|
|
112
112
|
);
|
|
113
|
-
let
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
113
|
+
let L = null;
|
|
114
|
+
H(S, () => {
|
|
115
|
+
L && clearTimeout(L), L = setTimeout(() => {
|
|
116
|
+
C.value = 1, P();
|
|
117
117
|
}, 300);
|
|
118
118
|
});
|
|
119
|
-
const
|
|
120
|
-
|
|
121
|
-
},
|
|
122
|
-
|
|
123
|
-
},
|
|
119
|
+
const ne = (e) => {
|
|
120
|
+
C.value = e, P();
|
|
121
|
+
}, oe = (e) => {
|
|
122
|
+
E.value = e, C.value = 1, P();
|
|
123
|
+
}, P = () => {
|
|
124
124
|
const e = {
|
|
125
125
|
pageinfo: {
|
|
126
|
-
page:
|
|
127
|
-
limit:
|
|
126
|
+
page: C.value,
|
|
127
|
+
limit: E.value
|
|
128
128
|
},
|
|
129
129
|
pagination: {
|
|
130
|
-
page:
|
|
131
|
-
limit:
|
|
130
|
+
page: C.value,
|
|
131
|
+
limit: E.value
|
|
132
132
|
},
|
|
133
133
|
search: S.value,
|
|
134
|
-
filter:
|
|
134
|
+
filter: R.value
|
|
135
135
|
};
|
|
136
|
-
|
|
137
|
-
},
|
|
138
|
-
() =>
|
|
139
|
-
),
|
|
136
|
+
a.refetch && a.refetch(e);
|
|
137
|
+
}, X = i(() => k.value === "table" ? a.table || !!V.table : a.list || !!V.list || !!V.grid), ie = i(() => a.data && a.data.length > 0), Y = i(() => a.titleI18n ? r(a.titleI18n) : a.title), G = i(
|
|
138
|
+
() => a.descriptionI18n ? r(a.descriptionI18n) : a.description
|
|
139
|
+
), re = i(() => {
|
|
140
140
|
const e = r("vlite.screen.deleteSelected");
|
|
141
141
|
return e !== "vlite.screen.deleteSelected" ? e : "Delete Selected";
|
|
142
|
-
}),
|
|
142
|
+
}), de = i(() => {
|
|
143
143
|
const e = r("vlite.screen.listView");
|
|
144
144
|
return e !== "vlite.screen.listView" ? e : "List View";
|
|
145
|
-
}),
|
|
145
|
+
}), se = i(() => {
|
|
146
146
|
const e = r("vlite.screen.tableView");
|
|
147
147
|
return e !== "vlite.screen.tableView" ? e : "Table View";
|
|
148
|
-
}),
|
|
148
|
+
}), ce = i(() => {
|
|
149
149
|
const e = r("vlite.screen.refresh");
|
|
150
150
|
return e !== "vlite.screen.refresh" ? e : "Refresh";
|
|
151
|
-
}),
|
|
151
|
+
}), ue = i(() => {
|
|
152
152
|
const e = r("vlite.screen.searchPlaceholder");
|
|
153
153
|
return e !== "vlite.screen.searchPlaceholder" ? e : "Search...";
|
|
154
|
-
}),
|
|
154
|
+
}), me = i(() => {
|
|
155
155
|
const e = r("vlite.screen.confirmDeleteTitle");
|
|
156
156
|
return e !== "vlite.screen.confirmDeleteTitle" ? e : "Confirm Deletion";
|
|
157
|
-
}),
|
|
158
|
-
const e = r("vlite.screen.confirmDeleteDesc", { count:
|
|
159
|
-
return e !== "vlite.screen.confirmDeleteDesc" ? e : `Are you sure you want to delete the selected ${
|
|
160
|
-
}),
|
|
157
|
+
}), fe = i(() => {
|
|
158
|
+
const e = r("vlite.screen.confirmDeleteDesc", { count: O.value.length });
|
|
159
|
+
return e !== "vlite.screen.confirmDeleteDesc" ? e : `Are you sure you want to delete the selected ${O.value.length > 1 ? "items" : "item"}?`;
|
|
160
|
+
}), ve = i(() => {
|
|
161
161
|
const e = r("vlite.screen.confirmDeleteBtn");
|
|
162
162
|
return e !== "vlite.screen.confirmDeleteBtn" ? e : "Delete";
|
|
163
|
-
}),
|
|
163
|
+
}), ge = i(() => {
|
|
164
164
|
const e = r("vlite.screen.cancelBtn");
|
|
165
165
|
return e !== "vlite.screen.cancelBtn" ? e : "Cancel";
|
|
166
|
-
}), he =
|
|
166
|
+
}), he = i(() => {
|
|
167
167
|
const e = r("vlite.screen.missingView");
|
|
168
|
-
return e !== "vlite.screen.missingView" ? e : "Please provide a `:list` or `:table` component.";
|
|
169
|
-
}),
|
|
170
|
-
if (
|
|
171
|
-
if (
|
|
168
|
+
return e !== "vlite.screen.missingView" ? e : "Please provide a `:list` or `:table` component or slot.";
|
|
169
|
+
}), b = i(() => {
|
|
170
|
+
if (a.addBtn?.labelI18n) return r(a.addBtn.labelI18n);
|
|
171
|
+
if (a.addBtn?.label) return a.addBtn.label;
|
|
172
172
|
const e = r("vlite.screen.addNew");
|
|
173
173
|
return e !== "vlite.screen.addNew" ? e : "Add New";
|
|
174
|
-
}),
|
|
175
|
-
const e =
|
|
176
|
-
return e ||
|
|
177
|
-
}),
|
|
174
|
+
}), W = i(() => {
|
|
175
|
+
const e = a.exportSchema && a.exportSchema.length > 0 && a.exportProps !== !1, n = a.importSchema && a.importSchema.length > 0 && a.importProps !== !1;
|
|
176
|
+
return e || n;
|
|
177
|
+
}), M = i(() => {
|
|
178
178
|
const e = r("vlite.screen.exportData");
|
|
179
179
|
return e !== "vlite.screen.exportData" ? e : "Export Data";
|
|
180
|
-
}),
|
|
180
|
+
}), Z = i(() => {
|
|
181
181
|
const e = r("vlite.screen.importData");
|
|
182
182
|
return e !== "vlite.screen.importData" ? e : "Import Data";
|
|
183
|
-
}),
|
|
183
|
+
}), ye = i(() => {
|
|
184
184
|
const e = [];
|
|
185
|
-
return
|
|
186
|
-
}),
|
|
187
|
-
e.value === "export" ?
|
|
188
|
-
},
|
|
185
|
+
return a.exportProps !== !1 && e.push({ value: "export", label: M.value, icon: "lucide:download" }), a.importProps !== !1 && e.push({ value: "import", label: Z.value, icon: "lucide:upload" }), e;
|
|
186
|
+
}), U = x(null), xe = x(null), j = x(!1), q = x(!1), pe = (e) => {
|
|
187
|
+
e.value === "export" ? j.value = !0 : e.value === "import" && (q.value = !0);
|
|
188
|
+
}, we = i(() => a.exportSchema ? a.exportSchema.map((e) => ({
|
|
189
189
|
field: e.name || e.field,
|
|
190
190
|
title: e.label || e.title || e.name || e.field
|
|
191
|
-
})) : []),
|
|
191
|
+
})) : []), be = i(() => a.importSchema ? a.importSchema.map((e) => ({
|
|
192
192
|
field: e.name || e.field,
|
|
193
193
|
title: e.label || e.title || e.name || e.field,
|
|
194
194
|
required: e.required || !1
|
|
195
|
-
})) : []),
|
|
195
|
+
})) : []), Be = async (e) => $?.services?.importApi && a.importType ? await $.services.importApi(a.importType, e) : (console.warn(
|
|
196
196
|
"VLite Screen: No importApi configured or no importType provided for generic import."
|
|
197
197
|
), {
|
|
198
198
|
processed: e.data.length,
|
|
@@ -201,40 +201,40 @@ const Me = { class: "flex flex-col w-full space-y-8" }, Ue = { class: "flex flex
|
|
|
201
201
|
skipped: 0,
|
|
202
202
|
failed: 0,
|
|
203
203
|
errors: []
|
|
204
|
-
}),
|
|
205
|
-
|
|
206
|
-
},
|
|
207
|
-
if (
|
|
208
|
-
const
|
|
204
|
+
}), ke = () => {
|
|
205
|
+
P();
|
|
206
|
+
}, Ce = i(() => a.exportMode || $?.exportData?.mode || "frontend"), De = async (e) => {
|
|
207
|
+
if ($?.services?.exportApi && a.exportType) {
|
|
208
|
+
const n = {
|
|
209
209
|
format: e,
|
|
210
210
|
search: S.value,
|
|
211
|
-
filter:
|
|
211
|
+
filter: R.value
|
|
212
212
|
};
|
|
213
|
-
await
|
|
213
|
+
await $.services.exportApi(a.exportType, n);
|
|
214
214
|
} else
|
|
215
215
|
console.warn(
|
|
216
216
|
"VLite Screen: No exportApi configured or no exportType provided for generic backend export."
|
|
217
217
|
);
|
|
218
218
|
};
|
|
219
|
-
return (e,
|
|
220
|
-
const
|
|
221
|
-
return
|
|
222
|
-
t.customHeader ?
|
|
219
|
+
return (e, n) => {
|
|
220
|
+
const _ = $e("router-link");
|
|
221
|
+
return l(), s("div", qe, [
|
|
222
|
+
t.customHeader ? p(e.$slots, "custom-header", { key: 1 }) : (l(), s("div", {
|
|
223
223
|
key: 0,
|
|
224
|
-
class:
|
|
224
|
+
class: N([t.headerClass, "flex flex-col md:flex-row sm:items-start md:items-center justify-between gap-4"])
|
|
225
225
|
}, [
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
t.info || t.infoI18n ? (
|
|
226
|
+
y("div", ze, [
|
|
227
|
+
p(e.$slots, "title", {}, () => [
|
|
228
|
+
Y.value ? (l(), s("div", He, [
|
|
229
|
+
y("h1", Ke, f(Y.value), 1),
|
|
230
|
+
t.info || t.infoI18n ? (l(), c(Ve, {
|
|
231
231
|
key: 0,
|
|
232
232
|
content: t.info,
|
|
233
233
|
"content-i18n": t.infoI18n,
|
|
234
234
|
placement: "right"
|
|
235
235
|
}, {
|
|
236
236
|
default: d(() => [
|
|
237
|
-
u(
|
|
237
|
+
u(F, {
|
|
238
238
|
icon: "lucide:info",
|
|
239
239
|
class: "w-[18px] h-[18px] mt-3! text-muted-foreground hover:text-foreground cursor-pointer transition-colors outline-none"
|
|
240
240
|
})
|
|
@@ -243,83 +243,83 @@ const Me = { class: "flex flex-col w-full space-y-8" }, Ue = { class: "flex flex
|
|
|
243
243
|
}, 8, ["content", "content-i18n"])) : m("", !0)
|
|
244
244
|
])) : m("", !0)
|
|
245
245
|
]),
|
|
246
|
-
|
|
247
|
-
|
|
246
|
+
p(e.$slots, "description", {}, () => [
|
|
247
|
+
G.value ? (l(), s("p", Je, f(G.value), 1)) : m("", !0)
|
|
248
248
|
])
|
|
249
249
|
]),
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
250
|
+
y("div", Qe, [
|
|
251
|
+
y("div", Xe, [
|
|
252
|
+
v.value.length > 0 ? (l(), c(h, {
|
|
253
253
|
key: 0,
|
|
254
254
|
variant: "outline",
|
|
255
255
|
class: "hover:bg-destructive/10 shrink-0 h-9! w-9!",
|
|
256
256
|
icon: "lucide:trash-2",
|
|
257
|
-
title:
|
|
258
|
-
onClick:
|
|
257
|
+
title: re.value,
|
|
258
|
+
onClick: n[0] || (n[0] = (o) => D(v.value))
|
|
259
259
|
}, null, 8, ["title"])) : m("", !0),
|
|
260
|
-
t.table && t.list ? (
|
|
261
|
-
|
|
262
|
-
onClick:
|
|
263
|
-
class:
|
|
264
|
-
|
|
260
|
+
(t.table || e.$slots.table) && (t.list || e.$slots.list || e.$slots.grid) ? (l(), s("div", Ye, [
|
|
261
|
+
y("button", {
|
|
262
|
+
onClick: n[1] || (n[1] = (o) => k.value = "list"),
|
|
263
|
+
class: N(["p-1.5 rounded", [
|
|
264
|
+
w(k) === "list" ? "bg-secondary/85 dark:bg-secondary shadow-sm text-foreground" : "text-muted-foreground hover:text-foreground"
|
|
265
265
|
]]),
|
|
266
|
-
title:
|
|
266
|
+
title: de.value
|
|
267
267
|
}, [
|
|
268
|
-
u(
|
|
268
|
+
u(F, {
|
|
269
269
|
icon: "lucide:layout-grid",
|
|
270
270
|
class: "w-4 h-4"
|
|
271
271
|
})
|
|
272
|
-
], 10,
|
|
273
|
-
|
|
274
|
-
onClick:
|
|
275
|
-
class:
|
|
276
|
-
|
|
272
|
+
], 10, Ge),
|
|
273
|
+
y("button", {
|
|
274
|
+
onClick: n[2] || (n[2] = (o) => k.value = "table"),
|
|
275
|
+
class: N(["p-1.5 rounded", [
|
|
276
|
+
w(k) === "table" ? "bg-secondary/85 dark:bg-secondary shadow-sm text-foreground" : "text-muted-foreground hover:text-foreground"
|
|
277
277
|
]]),
|
|
278
|
-
title:
|
|
278
|
+
title: se.value
|
|
279
279
|
}, [
|
|
280
|
-
u(
|
|
280
|
+
u(F, {
|
|
281
281
|
icon: "lucide:list",
|
|
282
282
|
class: "w-4 h-4"
|
|
283
283
|
})
|
|
284
|
-
], 10,
|
|
284
|
+
], 10, We)
|
|
285
285
|
])) : m("", !0),
|
|
286
|
-
|
|
287
|
-
t.showRefresh ? (
|
|
286
|
+
p(e.$slots, "before-search"),
|
|
287
|
+
t.showRefresh ? (l(), c(h, {
|
|
288
288
|
key: 2,
|
|
289
289
|
variant: "outline",
|
|
290
290
|
icon: "lucide:refresh-cw",
|
|
291
291
|
size: "lg",
|
|
292
292
|
class: "shrink-0 h-9! w-9!",
|
|
293
|
-
title:
|
|
293
|
+
title: ce.value,
|
|
294
294
|
disabled: t.loading,
|
|
295
|
-
onClick:
|
|
295
|
+
onClick: P
|
|
296
296
|
}, null, 8, ["title", "disabled"])) : m("", !0),
|
|
297
|
-
t.filterSchema && t.filterSchema.length > 0 ? (
|
|
297
|
+
t.filterSchema && t.filterSchema.length > 0 ? (l(), c(je, {
|
|
298
298
|
key: 3,
|
|
299
299
|
schema: t.filterSchema,
|
|
300
300
|
type: t.filterType,
|
|
301
|
-
modelValue:
|
|
302
|
-
"onUpdate:modelValue":
|
|
303
|
-
onChange:
|
|
301
|
+
modelValue: R.value,
|
|
302
|
+
"onUpdate:modelValue": n[3] || (n[3] = (o) => R.value = o),
|
|
303
|
+
onChange: P
|
|
304
304
|
}, null, 8, ["schema", "type", "modelValue"])) : m("", !0),
|
|
305
|
-
t.canSearch ? (
|
|
306
|
-
u(
|
|
305
|
+
t.canSearch ? (l(), s("div", Ze, [
|
|
306
|
+
u(Te, {
|
|
307
307
|
lazy: "",
|
|
308
308
|
modelValue: S.value,
|
|
309
|
-
"onUpdate:modelValue":
|
|
309
|
+
"onUpdate:modelValue": n[4] || (n[4] = (o) => S.value = o),
|
|
310
310
|
icon: "lucide:search",
|
|
311
|
-
placeholder:
|
|
311
|
+
placeholder: ue.value,
|
|
312
312
|
variant: "outline",
|
|
313
313
|
class: "bg-background w-full",
|
|
314
314
|
"show-clear-button": !0
|
|
315
315
|
}, null, 8, ["modelValue", "placeholder"])
|
|
316
316
|
])) : m("", !0)
|
|
317
317
|
]),
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
t.addComponent ? (
|
|
321
|
-
t.addBtn ? (
|
|
322
|
-
t.addBtn.modal ? (
|
|
318
|
+
y("div", _e, [
|
|
319
|
+
p(e.$slots, "actions", {}, () => [
|
|
320
|
+
t.addComponent ? (l(), c(K(t.addComponent), { key: 0 })) : t.canAdd ? (l(), s(I, { key: 1 }, [
|
|
321
|
+
t.addBtn ? (l(), s(I, { key: 0 }, [
|
|
322
|
+
t.addBtn.modal ? (l(), c(J, g({
|
|
323
323
|
key: 0,
|
|
324
324
|
body: t.addBtn.modal
|
|
325
325
|
}, t.addBtn.modalProps, {
|
|
@@ -329,95 +329,95 @@ const Me = { class: "flex flex-col w-full space-y-8" }, Ue = { class: "flex flex
|
|
|
329
329
|
loading: t.loading
|
|
330
330
|
}), {
|
|
331
331
|
trigger: d(() => [
|
|
332
|
-
u(h,
|
|
332
|
+
u(h, g({
|
|
333
333
|
class: "w-full",
|
|
334
334
|
icon: t.addBtn.icon || "fluent:add-16-filled",
|
|
335
335
|
variant: t.addBtn.variant || "primary"
|
|
336
336
|
}, t.addBtn.buttonProps), {
|
|
337
337
|
default: d(() => [
|
|
338
|
-
|
|
338
|
+
B(f(b.value), 1)
|
|
339
339
|
]),
|
|
340
340
|
_: 1
|
|
341
341
|
}, 16, ["icon", "variant"])
|
|
342
342
|
]),
|
|
343
343
|
_: 1
|
|
344
|
-
}, 16, ["body", "refetch", "data", "loading"])) : t.addBtn.to ? (
|
|
344
|
+
}, 16, ["body", "refetch", "data", "loading"])) : t.addBtn.to ? (l(), c(_, {
|
|
345
345
|
key: 1,
|
|
346
346
|
to: t.addBtn.to,
|
|
347
347
|
class: "inline-flex w-full sm:w-auto"
|
|
348
348
|
}, {
|
|
349
349
|
default: d(() => [
|
|
350
|
-
u(h,
|
|
350
|
+
u(h, g({
|
|
351
351
|
class: "w-full",
|
|
352
352
|
icon: t.addBtn.icon || "fluent:add-16-filled",
|
|
353
353
|
variant: t.addBtn.variant || "primary"
|
|
354
354
|
}, t.addBtn.buttonProps), {
|
|
355
355
|
default: d(() => [
|
|
356
|
-
|
|
356
|
+
B(f(b.value), 1)
|
|
357
357
|
]),
|
|
358
358
|
_: 1
|
|
359
359
|
}, 16, ["icon", "variant"])
|
|
360
360
|
]),
|
|
361
361
|
_: 1
|
|
362
|
-
}, 8, ["to"])) : t.addBtn.href ? (
|
|
362
|
+
}, 8, ["to"])) : t.addBtn.href ? (l(), s("a", {
|
|
363
363
|
key: 2,
|
|
364
364
|
href: t.addBtn.href,
|
|
365
365
|
target: t.addBtn.target,
|
|
366
366
|
class: "inline-flex w-full sm:w-auto"
|
|
367
367
|
}, [
|
|
368
|
-
u(h,
|
|
368
|
+
u(h, g({
|
|
369
369
|
class: "w-full",
|
|
370
370
|
icon: t.addBtn.icon || "fluent:add-16-filled",
|
|
371
371
|
variant: t.addBtn.variant || "primary"
|
|
372
372
|
}, t.addBtn.buttonProps), {
|
|
373
373
|
default: d(() => [
|
|
374
|
-
|
|
374
|
+
B(f(b.value), 1)
|
|
375
375
|
]),
|
|
376
376
|
_: 1
|
|
377
377
|
}, 16, ["icon", "variant"])
|
|
378
|
-
], 8,
|
|
378
|
+
], 8, et)) : (l(), c(h, g({
|
|
379
379
|
key: 3,
|
|
380
380
|
class: "w-full sm:w-auto",
|
|
381
381
|
icon: t.addBtn.icon || "fluent:add-16-filled",
|
|
382
382
|
variant: t.addBtn.variant || "primary"
|
|
383
383
|
}, t.addBtn.buttonProps, {
|
|
384
|
-
onClick:
|
|
384
|
+
onClick: n[5] || (n[5] = (o) => t.addBtn.onClick ? t.addBtn.onClick() : e.$emit("add"))
|
|
385
385
|
}), {
|
|
386
386
|
default: d(() => [
|
|
387
|
-
|
|
387
|
+
B(f(b.value), 1)
|
|
388
388
|
]),
|
|
389
389
|
_: 1
|
|
390
390
|
}, 16, ["icon", "variant"]))
|
|
391
391
|
], 64)) : m("", !0)
|
|
392
392
|
], 64)) : m("", !0)
|
|
393
393
|
]),
|
|
394
|
-
|
|
394
|
+
W.value ? (l(), c(Ae, {
|
|
395
395
|
key: 0,
|
|
396
396
|
closeOnSelect: "",
|
|
397
397
|
position: "bottom-end",
|
|
398
|
-
options:
|
|
399
|
-
onOnSelect:
|
|
398
|
+
options: ye.value,
|
|
399
|
+
onOnSelect: pe
|
|
400
400
|
}, {
|
|
401
401
|
trigger: d(() => [
|
|
402
402
|
u(h, {
|
|
403
403
|
variant: "outline",
|
|
404
404
|
icon: "lucide:more-vertical",
|
|
405
405
|
class: "px-2!",
|
|
406
|
-
title:
|
|
406
|
+
title: w(r)("vlite.screen.moreOptions") !== "vlite.screen.moreOptions" ? w(r)("vlite.screen.moreOptions") : "More Options"
|
|
407
407
|
}, null, 8, ["title"])
|
|
408
408
|
]),
|
|
409
409
|
_: 1
|
|
410
410
|
}, 8, ["options"])) : m("", !0),
|
|
411
|
-
|
|
411
|
+
p(e.$slots, "after-add")
|
|
412
412
|
])
|
|
413
413
|
])
|
|
414
414
|
], 2)),
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
class:
|
|
415
|
+
p(e.$slots, "sub-header"),
|
|
416
|
+
y("div", {
|
|
417
|
+
class: N(["flex-1 w-full relative", t.containerClass])
|
|
418
418
|
}, [
|
|
419
|
-
!
|
|
420
|
-
u(
|
|
419
|
+
!ie.value && !t.loading ? p(e.$slots, "empty", { key: 0 }, () => [
|
|
420
|
+
u(w(Oe), {
|
|
421
421
|
title: t.emptyTitle,
|
|
422
422
|
titleI18n: t.emptyTitleI18n,
|
|
423
423
|
description: t.emptyDescription,
|
|
@@ -425,78 +425,78 @@ const Me = { class: "flex flex-col w-full space-y-8" }, Ue = { class: "flex flex
|
|
|
425
425
|
icon: t.emptyIcon
|
|
426
426
|
}, {
|
|
427
427
|
action: d(() => [
|
|
428
|
-
t.addComponent ? (
|
|
429
|
-
t.addBtn ? (
|
|
430
|
-
t.addBtn.modal ? (
|
|
428
|
+
t.addComponent ? (l(), c(K(t.addComponent), { key: 0 })) : t.canAdd ? (l(), s(I, { key: 1 }, [
|
|
429
|
+
t.addBtn ? (l(), s(I, { key: 0 }, [
|
|
430
|
+
t.addBtn.modal ? (l(), c(J, g({
|
|
431
431
|
key: 0,
|
|
432
432
|
body: t.addBtn.modal
|
|
433
433
|
}, t.addBtn.modalProps), {
|
|
434
434
|
trigger: d(() => [
|
|
435
|
-
u(h,
|
|
435
|
+
u(h, g({
|
|
436
436
|
icon: t.addBtn.icon || "fluent:add-16-filled",
|
|
437
437
|
variant: t.addBtn.variant || "primary",
|
|
438
438
|
rounded: "full",
|
|
439
439
|
class: "px-6!"
|
|
440
440
|
}, t.addBtn.buttonProps), {
|
|
441
441
|
default: d(() => [
|
|
442
|
-
|
|
442
|
+
B(f(b.value), 1)
|
|
443
443
|
]),
|
|
444
444
|
_: 1
|
|
445
445
|
}, 16, ["icon", "variant"])
|
|
446
446
|
]),
|
|
447
447
|
_: 1
|
|
448
|
-
}, 16, ["body"])) : t.addBtn.to ? (
|
|
448
|
+
}, 16, ["body"])) : t.addBtn.to ? (l(), c(_, {
|
|
449
449
|
key: 1,
|
|
450
450
|
to: t.addBtn.to,
|
|
451
451
|
class: "inline-flex"
|
|
452
452
|
}, {
|
|
453
453
|
default: d(() => [
|
|
454
|
-
u(h,
|
|
454
|
+
u(h, g({
|
|
455
455
|
icon: t.addBtn.icon || "fluent:add-16-filled",
|
|
456
456
|
variant: t.addBtn.variant || "outline"
|
|
457
457
|
}, t.addBtn.buttonProps), {
|
|
458
458
|
default: d(() => [
|
|
459
|
-
|
|
459
|
+
B(f(b.value), 1)
|
|
460
460
|
]),
|
|
461
461
|
_: 1
|
|
462
462
|
}, 16, ["icon", "variant"])
|
|
463
463
|
]),
|
|
464
464
|
_: 1
|
|
465
|
-
}, 8, ["to"])) : t.addBtn.href ? (
|
|
465
|
+
}, 8, ["to"])) : t.addBtn.href ? (l(), s("a", {
|
|
466
466
|
key: 2,
|
|
467
467
|
href: t.addBtn.href,
|
|
468
468
|
target: t.addBtn.target,
|
|
469
469
|
class: "inline-flex"
|
|
470
470
|
}, [
|
|
471
|
-
u(h,
|
|
471
|
+
u(h, g({
|
|
472
472
|
icon: t.addBtn.icon || "lucide:plus",
|
|
473
473
|
variant: t.addBtn.variant || "outline"
|
|
474
474
|
}, t.addBtn.buttonProps), {
|
|
475
475
|
default: d(() => [
|
|
476
|
-
|
|
476
|
+
B(f(b.value), 1)
|
|
477
477
|
]),
|
|
478
478
|
_: 1
|
|
479
479
|
}, 16, ["icon", "variant"])
|
|
480
|
-
], 8,
|
|
480
|
+
], 8, tt)) : (l(), c(h, g({
|
|
481
481
|
key: 3,
|
|
482
482
|
icon: t.addBtn.icon || "lucide:plus",
|
|
483
483
|
variant: t.addBtn.variant || "outline"
|
|
484
484
|
}, t.addBtn.buttonProps, {
|
|
485
|
-
onClick:
|
|
485
|
+
onClick: n[6] || (n[6] = (o) => t.addBtn.onClick ? t.addBtn.onClick() : e.$emit("add"))
|
|
486
486
|
}), {
|
|
487
487
|
default: d(() => [
|
|
488
|
-
|
|
488
|
+
B(f(b.value), 1)
|
|
489
489
|
]),
|
|
490
490
|
_: 1
|
|
491
491
|
}, 16, ["icon", "variant"]))
|
|
492
|
-
], 64)) : (
|
|
492
|
+
], 64)) : (l(), c(h, {
|
|
493
493
|
key: 1,
|
|
494
494
|
icon: "lucide:plus",
|
|
495
495
|
variant: "outline",
|
|
496
|
-
onClick:
|
|
496
|
+
onClick: n[7] || (n[7] = (o) => e.$emit("add"))
|
|
497
497
|
}, {
|
|
498
498
|
default: d(() => [
|
|
499
|
-
|
|
499
|
+
B(f(b.value), 1)
|
|
500
500
|
]),
|
|
501
501
|
_: 1
|
|
502
502
|
}))
|
|
@@ -504,78 +504,99 @@ const Me = { class: "flex flex-col w-full space-y-8" }, Ue = { class: "flex flex
|
|
|
504
504
|
]),
|
|
505
505
|
_: 1
|
|
506
506
|
}, 8, ["title", "titleI18n", "description", "descriptionI18n", "icon"])
|
|
507
|
-
]) : (
|
|
508
|
-
|
|
507
|
+
]) : (l(), s(I, { key: 1 }, [
|
|
508
|
+
w(k) === "table" && e.$slots.table ? p(e.$slots, "table", {
|
|
509
509
|
key: 0,
|
|
510
510
|
data: t.data,
|
|
511
511
|
loading: t.loading,
|
|
512
|
+
selectedRows: v.value,
|
|
513
|
+
delete: D,
|
|
514
|
+
updateSelectedRows: (o) => v.value = o
|
|
515
|
+
}) : w(k) === "list" && e.$slots.list ? p(e.$slots, "list", {
|
|
516
|
+
key: 1,
|
|
517
|
+
data: t.data,
|
|
518
|
+
loading: t.loading,
|
|
519
|
+
selectedRows: v.value,
|
|
520
|
+
delete: D,
|
|
521
|
+
updateSelectedRows: (o) => v.value = o
|
|
522
|
+
}) : w(k) === "list" && e.$slots.grid ? p(e.$slots, "grid", {
|
|
523
|
+
key: 2,
|
|
524
|
+
data: t.data,
|
|
525
|
+
loading: t.loading,
|
|
526
|
+
selectedRows: v.value,
|
|
527
|
+
delete: D,
|
|
528
|
+
updateSelectedRows: (o) => v.value = o
|
|
529
|
+
}) : X.value ? (l(), c(K(X.value), {
|
|
530
|
+
key: 3,
|
|
531
|
+
data: t.data,
|
|
532
|
+
loading: t.loading,
|
|
512
533
|
refetch: t.refetch,
|
|
513
|
-
selectedRows:
|
|
514
|
-
"onUpdate:selectedRows":
|
|
515
|
-
delete:
|
|
516
|
-
onDelete:
|
|
517
|
-
}, null, 40, ["data", "loading", "refetch", "selectedRows"])) : (
|
|
534
|
+
selectedRows: v.value,
|
|
535
|
+
"onUpdate:selectedRows": n[8] || (n[8] = (o) => v.value = o),
|
|
536
|
+
delete: D,
|
|
537
|
+
onDelete: le
|
|
538
|
+
}, null, 40, ["data", "loading", "refetch", "selectedRows"])) : (l(), s("div", at, f(he.value), 1))
|
|
518
539
|
], 64))
|
|
519
540
|
], 2),
|
|
520
|
-
t.pagination && t.pageInfo && t.pageInfo.totalPages > 1 ? (
|
|
521
|
-
u(
|
|
541
|
+
t.pagination && t.pageInfo && t.pageInfo.totalPages > 1 ? (l(), s("div", lt, [
|
|
542
|
+
u(w(Ee), g({
|
|
522
543
|
"current-page": t.pageInfo.currentPage,
|
|
523
544
|
"total-pages": t.pageInfo.totalPages,
|
|
524
545
|
"total-items": t.pageInfo.totalItems
|
|
525
546
|
}, t.paginationProps, {
|
|
526
|
-
onChange:
|
|
527
|
-
"onUpdate:itemsPerPage":
|
|
547
|
+
onChange: ne,
|
|
548
|
+
"onUpdate:itemsPerPage": oe
|
|
528
549
|
}), null, 16, ["current-page", "total-pages", "total-items"])
|
|
529
550
|
])) : m("", !0),
|
|
530
|
-
u(
|
|
531
|
-
show:
|
|
532
|
-
"onUpdate:show":
|
|
533
|
-
title:
|
|
534
|
-
description:
|
|
535
|
-
"confirm-text":
|
|
536
|
-
"cancel-text":
|
|
551
|
+
u(Re, {
|
|
552
|
+
show: T.value,
|
|
553
|
+
"onUpdate:show": n[9] || (n[9] = (o) => T.value = o),
|
|
554
|
+
title: me.value,
|
|
555
|
+
description: fe.value,
|
|
556
|
+
"confirm-text": ve.value,
|
|
557
|
+
"cancel-text": ge.value,
|
|
537
558
|
variant: "danger",
|
|
538
|
-
onConfirm:
|
|
539
|
-
onCancel:
|
|
559
|
+
onConfirm: ae,
|
|
560
|
+
onCancel: n[10] || (n[10] = (o) => T.value = !1)
|
|
540
561
|
}, null, 8, ["show", "title", "description", "confirm-text", "cancel-text"]),
|
|
541
|
-
|
|
562
|
+
j.value ? (l(), c(J, {
|
|
542
563
|
key: 3,
|
|
543
|
-
show:
|
|
544
|
-
"onUpdate:show":
|
|
545
|
-
title:
|
|
564
|
+
show: j.value,
|
|
565
|
+
"onUpdate:show": n[11] || (n[11] = (o) => j.value = o),
|
|
566
|
+
title: M.value,
|
|
546
567
|
"max-width": "sm:max-w-[400px]"
|
|
547
568
|
}, {
|
|
548
|
-
default: d(({ close:
|
|
549
|
-
u(
|
|
569
|
+
default: d(({ close: o }) => [
|
|
570
|
+
u(Ne, g({
|
|
550
571
|
ref_key: "exportDataRef",
|
|
551
|
-
ref:
|
|
572
|
+
ref: U,
|
|
552
573
|
data: t.data || [],
|
|
553
|
-
fields:
|
|
554
|
-
mode:
|
|
555
|
-
"on-export":
|
|
574
|
+
fields: we.value,
|
|
575
|
+
mode: Ce.value,
|
|
576
|
+
"on-export": De
|
|
556
577
|
}, typeof t.exportProps == "object" ? t.exportProps : {}, {
|
|
557
|
-
title:
|
|
578
|
+
title: M.value,
|
|
558
579
|
class: "hidden!"
|
|
559
580
|
}), null, 16, ["data", "fields", "mode", "title"]),
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
(
|
|
581
|
+
y("div", nt, [
|
|
582
|
+
y("h6", ot, f(w(r)("vlite.exportData.selectFormat") !== "vlite.exportData.selectFormat" ? w(r)("vlite.exportData.selectFormat") : "Select Export Format"), 1),
|
|
583
|
+
y("div", it, [
|
|
584
|
+
(l(!0), s(I, null, Se(U.value?.availableFormats || [
|
|
564
585
|
{ value: "excel", label: "Excel (.xlsx)", icon: "lucide:file-spreadsheet" },
|
|
565
586
|
{ value: "csv", label: "CSV (.csv)", icon: "lucide:file-text" },
|
|
566
587
|
{ value: "json", label: "JSON (.json)", icon: "lucide:file-json" }
|
|
567
|
-
], (
|
|
568
|
-
key:
|
|
588
|
+
], (A) => (l(), c(h, {
|
|
589
|
+
key: A.value,
|
|
569
590
|
variant: "outline",
|
|
570
591
|
class: "w-full flex items-center justify-start gap-3 h-12",
|
|
571
|
-
onClick: (
|
|
592
|
+
onClick: (st) => U.value?.exportData(A.value, o)
|
|
572
593
|
}, {
|
|
573
594
|
default: d(() => [
|
|
574
|
-
u(
|
|
575
|
-
icon:
|
|
595
|
+
u(F, {
|
|
596
|
+
icon: A.icon,
|
|
576
597
|
class: "text-muted-foreground h-5 w-5"
|
|
577
598
|
}, null, 8, ["icon"]),
|
|
578
|
-
|
|
599
|
+
y("span", null, f(A.label), 1)
|
|
579
600
|
]),
|
|
580
601
|
_: 2
|
|
581
602
|
}, 1032, ["onClick"]))), 128))
|
|
@@ -584,17 +605,17 @@ const Me = { class: "flex flex-col w-full space-y-8" }, Ue = { class: "flex flex
|
|
|
584
605
|
]),
|
|
585
606
|
_: 1
|
|
586
607
|
}, 8, ["show", "title"])) : m("", !0),
|
|
587
|
-
|
|
588
|
-
u(
|
|
589
|
-
show:
|
|
590
|
-
"onUpdate:show":
|
|
608
|
+
W.value ? (l(), s("div", rt, [
|
|
609
|
+
u(Fe, g({
|
|
610
|
+
show: q.value,
|
|
611
|
+
"onUpdate:show": n[12] || (n[12] = (o) => q.value = o),
|
|
591
612
|
ref_key: "importDataRef",
|
|
592
613
|
ref: xe,
|
|
593
|
-
fields:
|
|
594
|
-
processBatch:
|
|
595
|
-
onComplete:
|
|
614
|
+
fields: be.value,
|
|
615
|
+
processBatch: Be,
|
|
616
|
+
onComplete: ke
|
|
596
617
|
}, typeof t.importProps == "object" ? t.importProps : {}, {
|
|
597
|
-
title:
|
|
618
|
+
title: Z.value,
|
|
598
619
|
class: "hidden!"
|
|
599
620
|
}), null, 16, ["show", "fields", "title"])
|
|
600
621
|
])) : m("", !0)
|
|
@@ -603,5 +624,5 @@ const Me = { class: "flex flex-col w-full space-y-8" }, Ue = { class: "flex flex
|
|
|
603
624
|
}
|
|
604
625
|
});
|
|
605
626
|
export {
|
|
606
|
-
|
|
627
|
+
$t as default
|
|
607
628
|
};
|
|
@@ -33,9 +33,9 @@ declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, imp
|
|
|
33
33
|
"onEdit-end"?: (id: string) => any;
|
|
34
34
|
onDuplicate?: (id: string) => any;
|
|
35
35
|
}>, {
|
|
36
|
-
confirmDelete: boolean;
|
|
37
36
|
isEditing: boolean;
|
|
38
37
|
canDelete: boolean;
|
|
38
|
+
confirmDelete: boolean;
|
|
39
39
|
allowIconChange: boolean;
|
|
40
40
|
itemClass: string;
|
|
41
41
|
activeItemClass: string;
|
package/package.json
CHANGED
|
File without changes
|