@robot-admin/naive-ui-components 0.42.2 → 0.43.0
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/CHANGELOG.md +9 -0
- package/README.md +1 -1
- package/README_EN.md +1 -1
- package/dist/C_ResourceSchedule.css +51 -27
- package/dist/C_ResourceSchedule.d.cts +2 -2
- package/dist/C_ResourceSchedule.d.ts +2 -2
- package/dist/C_ResourceSchedule2.cjs +1 -1
- package/dist/C_ResourceSchedule2.js +1 -1
- package/dist/C_SplitPane.css +68 -66
- package/dist/C_SplitPane2.cjs +1 -1
- package/dist/C_SplitPane2.js +1 -1
- package/dist/C_Table.base.css +128 -115
- package/dist/C_Table.css +128 -115
- package/dist/C_Table2.cjs +4 -4
- package/dist/C_Table2.js +4 -4
- package/dist/C_Tabs.css +9 -9
- package/dist/component-config.d.ts +3 -0
- package/dist/constants.d.cts +1 -1
- package/dist/constants.d.ts +1 -1
- package/dist/constants3.d.cts +8 -8
- package/dist/constants3.d.ts +8 -8
- package/dist/constants4.d.cts +7 -7
- package/dist/constants4.d.ts +7 -7
- package/dist/context.d.cts +3 -0
- package/dist/data2.d.cts +16 -12
- package/dist/data2.d.ts +16 -12
- package/dist/data3.cjs +1 -1
- package/dist/data3.js +1 -1
- package/dist/editors.d.cts +9 -8
- package/dist/editors.d.ts +9 -8
- package/dist/graphics.d.cts +1 -1
- package/dist/graphics.d.ts +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index11.vue.d.ts +3 -3
- package/dist/index12.vue.d.cts +3 -3
- package/dist/index14.vue.d.ts +2 -2
- package/dist/index15.vue.d.cts +2 -2
- package/dist/index17.vue.d.ts +1 -1
- package/dist/index18.vue.d.cts +1 -1
- package/dist/index19.vue.d.ts +2 -2
- package/dist/index20.vue.d.cts +2 -2
- package/dist/index20.vue.d.ts +2 -2
- package/dist/index21.vue.d.cts +2 -2
- package/dist/index21.vue.d.ts +9 -9
- package/dist/index22.vue.d.cts +9 -9
- package/dist/index23.vue.d.ts +2 -2
- package/dist/index24.vue.d.cts +2 -2
- package/dist/index24.vue.d.ts +1 -1
- package/dist/index25.vue.d.cts +1 -1
- package/dist/index26.vue.d.ts +1 -1
- package/dist/index27.vue.d.cts +1 -1
- package/dist/index27.vue.d.ts +1 -1
- package/dist/index28.vue.d.cts +1 -1
- package/dist/index29.vue.d.cts +2 -2
- package/dist/index29.vue.d.ts +2 -2
- package/dist/index3.vue.d.cts +4 -4
- package/dist/index3.vue.d.ts +4 -4
- package/dist/index31.vue.d.cts +1 -1
- package/dist/index31.vue.d.ts +1 -1
- package/dist/index34.vue.d.cts +13 -2
- package/dist/index34.vue.d.ts +13 -2
- package/dist/index35.vue.d.cts +2 -2
- package/dist/index35.vue.d.ts +2 -2
- package/dist/index38.vue.d.cts +2 -2
- package/dist/index38.vue.d.ts +2 -2
- package/dist/index39.vue.d.cts +1 -1
- package/dist/index39.vue.d.ts +1 -1
- package/dist/index41.vue.d.cts +1 -1
- package/dist/index41.vue.d.ts +1 -1
- package/dist/index42.vue.d.cts +4 -4
- package/dist/index42.vue.d.ts +4 -4
- package/dist/index5.vue.d.cts +1 -1
- package/dist/index5.vue.d.ts +1 -1
- package/dist/index6.vue.d.cts +2 -2
- package/dist/index6.vue.d.ts +2 -2
- package/dist/localSource.cjs +1 -1
- package/dist/localSource.d.cts +9 -4
- package/dist/localSource.d.ts +9 -4
- package/dist/localSource.js +1 -1
- package/dist/style.css +256 -217
- package/dist/useCalendarEvents.d.cts +1 -1
- package/dist/useCalendarEvents.d.ts +1 -1
- package/dist/useCollapsePanel.d.cts +6 -6
- package/dist/useCollapsePanel.d.ts +6 -6
- package/dist/useCropperCore.d.cts +1 -1
- package/dist/useCropperCore.d.ts +1 -1
- package/dist/useFullscreen.d.cts +4 -4
- package/dist/useFullscreen.d.ts +4 -4
- package/dist/useQRCode.d.cts +3 -3
- package/dist/useQRCode.d.ts +3 -3
- package/dist/useSignatureHistory.d.cts +2 -2
- package/dist/useSignatureHistory.d.ts +2 -2
- package/dist/useSplitResize.d.cts +5 -4
- package/dist/useSplitResize.d.ts +5 -4
- package/dist/verification.d.cts +2 -2
- package/dist/verification.d.ts +2 -2
- package/docs/guides/data-picker.md +2 -0
- package/docs/guides/data-workflows.md +4 -0
- package/docs/guides/resource-schedule.md +4 -0
- package/docs/guides/split-pane.en.md +2 -0
- package/docs/guides/split-pane.md +2 -0
- package/package.json +1 -1
package/dist/index29.vue.d.ts
CHANGED
|
@@ -46,8 +46,8 @@ interface NotificationInboxEmits<T extends NotificationMessage = NotificationMes
|
|
|
46
46
|
declare const __VLS_export: <T extends NotificationMessage, V extends string, A extends string>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
47
47
|
props: vue.PublicProps & __VLS_PrettifyLocal<NotificationInboxProps<T, V, A> & {
|
|
48
48
|
onSelect?: ((item: T) => any) | undefined;
|
|
49
|
-
onAction?: ((key: A, item: T) => any) | undefined;
|
|
50
49
|
onRetry?: (() => any) | undefined;
|
|
50
|
+
onAction?: ((key: A, item: T) => any) | undefined;
|
|
51
51
|
"onUpdate:activeView"?: ((value: V) => any) | undefined;
|
|
52
52
|
}> & (typeof globalThis extends {
|
|
53
53
|
__VLS_PROPS_FALLBACK: infer P;
|
|
@@ -61,7 +61,7 @@ declare const __VLS_export: <T extends NotificationMessage, V extends string, A
|
|
|
61
61
|
} & {
|
|
62
62
|
footer?: (props: {}) => any;
|
|
63
63
|
};
|
|
64
|
-
emit: ((evt: "select", item: T) => void) & ((evt: "
|
|
64
|
+
emit: ((evt: "select", item: T) => void) & ((evt: "retry") => void) & ((evt: "action", key: A, item: T) => void) & ((evt: "update:activeView", value: V) => void);
|
|
65
65
|
}>) => vue.VNode & {
|
|
66
66
|
__ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
|
|
67
67
|
};
|
package/dist/index3.vue.d.cts
CHANGED
|
@@ -62,20 +62,20 @@ declare const __VLS_export: vue.DefineComponent<AudioPlayerProps, {}, {}, {}, {}
|
|
|
62
62
|
play: (index: number) => any;
|
|
63
63
|
pause: () => any;
|
|
64
64
|
ended: (index: number) => any;
|
|
65
|
-
modeChange: (mode: NonNullable<"list" | "
|
|
65
|
+
modeChange: (mode: NonNullable<"list" | "loop" | "single" | "shuffle" | undefined>) => any;
|
|
66
66
|
}, string, vue.PublicProps, Readonly<AudioPlayerProps> & Readonly<{
|
|
67
67
|
onError?: ((error: unknown) => any) | undefined;
|
|
68
68
|
onPlay?: ((index: number) => any) | undefined;
|
|
69
69
|
onPause?: (() => any) | undefined;
|
|
70
70
|
onEnded?: ((index: number) => any) | undefined;
|
|
71
|
-
onModeChange?: ((mode: NonNullable<"list" | "
|
|
71
|
+
onModeChange?: ((mode: NonNullable<"list" | "loop" | "single" | "shuffle" | undefined>) => any) | undefined;
|
|
72
72
|
}>, {
|
|
73
|
-
theme: "default" | "minimal";
|
|
74
73
|
mode: "list" | "loop" | "single" | "shuffle";
|
|
74
|
+
theme: "default" | "minimal";
|
|
75
|
+
autoplay: boolean;
|
|
75
76
|
initialIndex: number;
|
|
76
77
|
showPlaylist: boolean;
|
|
77
78
|
showCover: boolean;
|
|
78
|
-
autoplay: boolean;
|
|
79
79
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
80
80
|
declare const _default: typeof __VLS_export;
|
|
81
81
|
//#endregion
|
package/dist/index3.vue.d.ts
CHANGED
|
@@ -62,20 +62,20 @@ declare const __VLS_export: vue.DefineComponent<AudioPlayerProps, {}, {}, {}, {}
|
|
|
62
62
|
play: (index: number) => any;
|
|
63
63
|
pause: () => any;
|
|
64
64
|
ended: (index: number) => any;
|
|
65
|
-
modeChange: (mode: NonNullable<"list" | "
|
|
65
|
+
modeChange: (mode: NonNullable<"list" | "loop" | "single" | "shuffle" | undefined>) => any;
|
|
66
66
|
}, string, vue.PublicProps, Readonly<AudioPlayerProps> & Readonly<{
|
|
67
67
|
onError?: ((error: unknown) => any) | undefined;
|
|
68
68
|
onPlay?: ((index: number) => any) | undefined;
|
|
69
69
|
onPause?: (() => any) | undefined;
|
|
70
70
|
onEnded?: ((index: number) => any) | undefined;
|
|
71
|
-
onModeChange?: ((mode: NonNullable<"list" | "
|
|
71
|
+
onModeChange?: ((mode: NonNullable<"list" | "loop" | "single" | "shuffle" | undefined>) => any) | undefined;
|
|
72
72
|
}>, {
|
|
73
|
-
theme: "default" | "minimal";
|
|
74
73
|
mode: "list" | "loop" | "single" | "shuffle";
|
|
74
|
+
theme: "default" | "minimal";
|
|
75
|
+
autoplay: boolean;
|
|
75
76
|
initialIndex: number;
|
|
76
77
|
showPlaylist: boolean;
|
|
77
78
|
showCover: boolean;
|
|
78
|
-
autoplay: boolean;
|
|
79
79
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
80
80
|
declare const _default: typeof __VLS_export;
|
|
81
81
|
//#endregion
|
package/dist/index31.vue.d.cts
CHANGED
|
@@ -38,8 +38,8 @@ type __VLS_Slots = {} & {
|
|
|
38
38
|
};
|
|
39
39
|
declare const __VLS_base: vue.DefineComponent<ProgressProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<ProgressProps> & Readonly<{}>, {
|
|
40
40
|
status: "default" | "success" | "error" | "warning" | "info";
|
|
41
|
-
time: number;
|
|
42
41
|
strokeWidth: number;
|
|
42
|
+
time: number;
|
|
43
43
|
percentage: number | number[];
|
|
44
44
|
isAnimation: boolean;
|
|
45
45
|
indicatorPlacement: "inside" | "outside";
|
package/dist/index31.vue.d.ts
CHANGED
|
@@ -38,8 +38,8 @@ type __VLS_Slots = {} & {
|
|
|
38
38
|
};
|
|
39
39
|
declare const __VLS_base: vue.DefineComponent<ProgressProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<ProgressProps> & Readonly<{}>, {
|
|
40
40
|
status: "default" | "success" | "error" | "warning" | "info";
|
|
41
|
-
time: number;
|
|
42
41
|
strokeWidth: number;
|
|
42
|
+
time: number;
|
|
43
43
|
percentage: number | number[];
|
|
44
44
|
isAnimation: boolean;
|
|
45
45
|
indicatorPlacement: "inside" | "outside";
|
package/dist/index34.vue.d.cts
CHANGED
|
@@ -4,6 +4,7 @@ import * as vue from "vue";
|
|
|
4
4
|
|
|
5
5
|
//#region src/components/C_ResourceSchedule/types.d.ts
|
|
6
6
|
type ResourceScheduleKey = string | number;
|
|
7
|
+
type ResourceScheduleBookingTone = 'neutral' | 'info' | 'success' | 'warning' | 'error';
|
|
7
8
|
/** Millisecond timestamps. Start is inclusive and end is exclusive. */
|
|
8
9
|
type ResourceScheduleRange = readonly [start: number, end: number];
|
|
9
10
|
interface ResourceScheduleResource {
|
|
@@ -34,6 +35,15 @@ interface ResourceScheduleProps<R extends ResourceScheduleResource = ResourceSch
|
|
|
34
35
|
timeZone?: string;
|
|
35
36
|
/** Including the two range boundaries. Defaults to 7, bounded between 2 and 24. */
|
|
36
37
|
tickCount?: number;
|
|
38
|
+
/** Explicit timestamps override evenly spaced ticks when any fall within range. */
|
|
39
|
+
axisTicks?: readonly number[];
|
|
40
|
+
formatTick?: (time: number) => string;
|
|
41
|
+
bookingTone?: (booking: B) => ResourceScheduleBookingTone | undefined;
|
|
42
|
+
/** Replaces the default accessible booking label. Conflict information is appended. */
|
|
43
|
+
bookingLabel?: (booking: B) => string;
|
|
44
|
+
/** Opts a booking into activation with double click or Enter. */
|
|
45
|
+
activatable?: (booking: B) => boolean;
|
|
46
|
+
hideDetails?: boolean;
|
|
37
47
|
navigation?: boolean;
|
|
38
48
|
density?: ComponentDensity;
|
|
39
49
|
locale?: ComponentLocale;
|
|
@@ -45,6 +55,7 @@ declare const __VLS_export: <R extends ResourceScheduleResource = ResourceSchedu
|
|
|
45
55
|
onSelect?: ((booking: B) => any) | undefined;
|
|
46
56
|
"onUpdate:modelValue"?: ((key: B["key"]) => any) | undefined;
|
|
47
57
|
"onUpdate:range"?: ((range: ResourceScheduleRange) => any) | undefined;
|
|
58
|
+
onActivate?: ((booking: B) => any) | undefined;
|
|
48
59
|
}> & (typeof globalThis extends {
|
|
49
60
|
__VLS_PROPS_FALLBACK: infer P;
|
|
50
61
|
} ? P : {});
|
|
@@ -54,11 +65,11 @@ declare const __VLS_export: <R extends ResourceScheduleResource = ResourceSchedu
|
|
|
54
65
|
booking?: (props: ResourceScheduleBookingSlot<R, B>) => unknown;
|
|
55
66
|
details?: (props: ResourceScheduleBookingSlot<R, B>) => unknown;
|
|
56
67
|
};
|
|
57
|
-
emit: ((evt: "select", booking: B) => void) & ((evt: "update:modelValue", key: B["key"]) => void) & ((evt: "update:range", range: ResourceScheduleRange) => void);
|
|
68
|
+
emit: ((evt: "select", booking: B) => void) & ((evt: "update:modelValue", key: B["key"]) => void) & ((evt: "update:range", range: ResourceScheduleRange) => void) & ((evt: "activate", booking: B) => void);
|
|
58
69
|
}>) => vue.VNode & {
|
|
59
70
|
__ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
|
|
60
71
|
};
|
|
61
72
|
declare const _default: typeof __VLS_export;
|
|
62
73
|
type __VLS_PrettifyLocal<T> = (T extends any ? { [K in keyof T]: T[K] } : { [K in keyof T as K]: T[K] }) & {};
|
|
63
74
|
//#endregion
|
|
64
|
-
export {
|
|
75
|
+
export { ResourceScheduleKey as a, ResourceScheduleResource as c, ResourceScheduleBookingTone as i, ResourceScheduleBooking as n, ResourceScheduleProps as o, ResourceScheduleBookingSlot as r, ResourceScheduleRange as s, _default as t };
|
package/dist/index34.vue.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ import * as vue from "vue";
|
|
|
4
4
|
|
|
5
5
|
//#region src/components/C_ResourceSchedule/types.d.ts
|
|
6
6
|
type ResourceScheduleKey = string | number;
|
|
7
|
+
type ResourceScheduleBookingTone = 'neutral' | 'info' | 'success' | 'warning' | 'error';
|
|
7
8
|
/** Millisecond timestamps. Start is inclusive and end is exclusive. */
|
|
8
9
|
type ResourceScheduleRange = readonly [start: number, end: number];
|
|
9
10
|
interface ResourceScheduleResource {
|
|
@@ -34,6 +35,15 @@ interface ResourceScheduleProps<R extends ResourceScheduleResource = ResourceSch
|
|
|
34
35
|
timeZone?: string;
|
|
35
36
|
/** Including the two range boundaries. Defaults to 7, bounded between 2 and 24. */
|
|
36
37
|
tickCount?: number;
|
|
38
|
+
/** Explicit timestamps override evenly spaced ticks when any fall within range. */
|
|
39
|
+
axisTicks?: readonly number[];
|
|
40
|
+
formatTick?: (time: number) => string;
|
|
41
|
+
bookingTone?: (booking: B) => ResourceScheduleBookingTone | undefined;
|
|
42
|
+
/** Replaces the default accessible booking label. Conflict information is appended. */
|
|
43
|
+
bookingLabel?: (booking: B) => string;
|
|
44
|
+
/** Opts a booking into activation with double click or Enter. */
|
|
45
|
+
activatable?: (booking: B) => boolean;
|
|
46
|
+
hideDetails?: boolean;
|
|
37
47
|
navigation?: boolean;
|
|
38
48
|
density?: ComponentDensity;
|
|
39
49
|
locale?: ComponentLocale;
|
|
@@ -45,6 +55,7 @@ declare const __VLS_export: <R extends ResourceScheduleResource = ResourceSchedu
|
|
|
45
55
|
onSelect?: ((booking: B) => any) | undefined;
|
|
46
56
|
"onUpdate:modelValue"?: ((key: B["key"]) => any) | undefined;
|
|
47
57
|
"onUpdate:range"?: ((range: ResourceScheduleRange) => any) | undefined;
|
|
58
|
+
onActivate?: ((booking: B) => any) | undefined;
|
|
48
59
|
}> & (typeof globalThis extends {
|
|
49
60
|
__VLS_PROPS_FALLBACK: infer P;
|
|
50
61
|
} ? P : {});
|
|
@@ -54,11 +65,11 @@ declare const __VLS_export: <R extends ResourceScheduleResource = ResourceSchedu
|
|
|
54
65
|
booking?: (props: ResourceScheduleBookingSlot<R, B>) => unknown;
|
|
55
66
|
details?: (props: ResourceScheduleBookingSlot<R, B>) => unknown;
|
|
56
67
|
};
|
|
57
|
-
emit: ((evt: "select", booking: B) => void) & ((evt: "update:modelValue", key: B["key"]) => void) & ((evt: "update:range", range: ResourceScheduleRange) => void);
|
|
68
|
+
emit: ((evt: "select", booking: B) => void) & ((evt: "update:modelValue", key: B["key"]) => void) & ((evt: "update:range", range: ResourceScheduleRange) => void) & ((evt: "activate", booking: B) => void);
|
|
58
69
|
}>) => vue.VNode & {
|
|
59
70
|
__ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
|
|
60
71
|
};
|
|
61
72
|
declare const _default: typeof __VLS_export;
|
|
62
73
|
type __VLS_PrettifyLocal<T> = (T extends any ? { [K in keyof T]: T[K] } : { [K in keyof T as K]: T[K] }) & {};
|
|
63
74
|
//#endregion
|
|
64
|
-
export {
|
|
75
|
+
export { ResourceScheduleKey as a, ResourceScheduleResource as c, ResourceScheduleBookingTone as i, ResourceScheduleBooking as n, ResourceScheduleProps as o, ResourceScheduleBookingSlot as r, ResourceScheduleRange as s, _default as t };
|
package/dist/index35.vue.d.cts
CHANGED
|
@@ -28,13 +28,13 @@ interface ScanInputEmits {
|
|
|
28
28
|
//#region src/components/C_ScanInput/index.vue.d.ts
|
|
29
29
|
declare const __VLS_export: vue.DefineComponent<ScanInputProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
30
30
|
"update:modelValue": (value: string) => any;
|
|
31
|
-
error: (error: unknown, input: "camera" | "photo") => any;
|
|
32
31
|
submit: (value: string) => any;
|
|
32
|
+
error: (error: unknown, input: "camera" | "photo") => any;
|
|
33
33
|
scan: (result: ScanResult, input: "camera" | "photo") => any;
|
|
34
34
|
}, string, vue.PublicProps, Readonly<ScanInputProps> & Readonly<{
|
|
35
35
|
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
36
|
-
onError?: ((error: unknown, input: "camera" | "photo") => any) | undefined;
|
|
37
36
|
onSubmit?: ((value: string) => any) | undefined;
|
|
37
|
+
onError?: ((error: unknown, input: "camera" | "photo") => any) | undefined;
|
|
38
38
|
onScan?: ((result: ScanResult, input: "camera" | "photo") => any) | undefined;
|
|
39
39
|
}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
40
40
|
declare const _default: typeof __VLS_export;
|
package/dist/index35.vue.d.ts
CHANGED
|
@@ -28,13 +28,13 @@ interface ScanInputEmits {
|
|
|
28
28
|
//#region src/components/C_ScanInput/index.vue.d.ts
|
|
29
29
|
declare const __VLS_export: vue.DefineComponent<ScanInputProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
30
30
|
"update:modelValue": (value: string) => any;
|
|
31
|
-
error: (error: unknown, input: "camera" | "photo") => any;
|
|
32
31
|
submit: (value: string) => any;
|
|
32
|
+
error: (error: unknown, input: "camera" | "photo") => any;
|
|
33
33
|
scan: (result: ScanResult, input: "camera" | "photo") => any;
|
|
34
34
|
}, string, vue.PublicProps, Readonly<ScanInputProps> & Readonly<{
|
|
35
35
|
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
36
|
-
onError?: ((error: unknown, input: "camera" | "photo") => any) | undefined;
|
|
37
36
|
onSubmit?: ((value: string) => any) | undefined;
|
|
37
|
+
onError?: ((error: unknown, input: "camera" | "photo") => any) | undefined;
|
|
38
38
|
onScan?: ((result: ScanResult, input: "camera" | "photo") => any) | undefined;
|
|
39
39
|
}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
40
40
|
declare const _default: typeof __VLS_export;
|
package/dist/index38.vue.d.cts
CHANGED
|
@@ -88,9 +88,9 @@ type __VLS_Slots = {} & {
|
|
|
88
88
|
declare const __VLS_base: vue.DefineComponent<SkeletonProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<SkeletonProps> & Readonly<{}>, {
|
|
89
89
|
repeat: number;
|
|
90
90
|
loading: boolean;
|
|
91
|
-
borderRadius: string;
|
|
92
|
-
animation: SkeletonAnimation;
|
|
93
91
|
preset: SkeletonPreset;
|
|
92
|
+
animation: SkeletonAnimation;
|
|
93
|
+
borderRadius: string;
|
|
94
94
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
95
95
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
96
96
|
declare const _default: typeof __VLS_export;
|
package/dist/index38.vue.d.ts
CHANGED
|
@@ -88,9 +88,9 @@ type __VLS_Slots = {} & {
|
|
|
88
88
|
declare const __VLS_base: vue.DefineComponent<SkeletonProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<SkeletonProps> & Readonly<{}>, {
|
|
89
89
|
repeat: number;
|
|
90
90
|
loading: boolean;
|
|
91
|
-
borderRadius: string;
|
|
92
|
-
animation: SkeletonAnimation;
|
|
93
91
|
preset: SkeletonPreset;
|
|
92
|
+
animation: SkeletonAnimation;
|
|
93
|
+
borderRadius: string;
|
|
94
94
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
95
95
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
96
96
|
declare const _default: typeof __VLS_export;
|
package/dist/index39.vue.d.cts
CHANGED
|
@@ -29,9 +29,9 @@ declare const __VLS_export: vue.DefineComponent<StepsProps, {}, {}, {}, {}, vue.
|
|
|
29
29
|
"onUpdate:current"?: ((args_0: number) => any) | undefined;
|
|
30
30
|
}>, {
|
|
31
31
|
direction: "horizontal" | "vertical";
|
|
32
|
+
connected: boolean;
|
|
32
33
|
clickable: boolean;
|
|
33
34
|
current: number;
|
|
34
|
-
connected: boolean;
|
|
35
35
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
36
36
|
declare const _default: typeof __VLS_export;
|
|
37
37
|
//#endregion
|
package/dist/index39.vue.d.ts
CHANGED
|
@@ -29,9 +29,9 @@ declare const __VLS_export: vue.DefineComponent<StepsProps, {}, {}, {}, {}, vue.
|
|
|
29
29
|
"onUpdate:current"?: ((args_0: number) => any) | undefined;
|
|
30
30
|
}>, {
|
|
31
31
|
direction: "horizontal" | "vertical";
|
|
32
|
+
connected: boolean;
|
|
32
33
|
clickable: boolean;
|
|
33
34
|
current: number;
|
|
34
|
-
connected: boolean;
|
|
35
35
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
36
36
|
declare const _default: typeof __VLS_export;
|
|
37
37
|
//#endregion
|
package/dist/index41.vue.d.cts
CHANGED
|
@@ -78,10 +78,10 @@ declare const __VLS_export: vue.DefineComponent<__VLS_Props, {
|
|
|
78
78
|
onClose?: ((fallbackPath: string) => any) | undefined;
|
|
79
79
|
onCloseAll?: (() => any) | undefined;
|
|
80
80
|
}>, {
|
|
81
|
-
persistKey: string;
|
|
82
81
|
homePath: string;
|
|
83
82
|
homeTitle: string;
|
|
84
83
|
homeIcon: string;
|
|
84
|
+
persistKey: string;
|
|
85
85
|
contextMenuLabels: ContextMenuLabels;
|
|
86
86
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
87
87
|
declare const _default: typeof __VLS_export;
|
package/dist/index41.vue.d.ts
CHANGED
|
@@ -78,10 +78,10 @@ declare const __VLS_export: vue.DefineComponent<__VLS_Props, {
|
|
|
78
78
|
onClose?: ((fallbackPath: string) => any) | undefined;
|
|
79
79
|
onCloseAll?: (() => any) | undefined;
|
|
80
80
|
}>, {
|
|
81
|
-
persistKey: string;
|
|
82
81
|
homePath: string;
|
|
83
82
|
homeTitle: string;
|
|
84
83
|
homeIcon: string;
|
|
84
|
+
persistKey: string;
|
|
85
85
|
contextMenuLabels: ContextMenuLabels;
|
|
86
86
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
87
87
|
declare const _default: typeof __VLS_export;
|
package/dist/index42.vue.d.cts
CHANGED
|
@@ -84,16 +84,16 @@ declare const __VLS_base: vue.DefineComponent<TimelineProps, {
|
|
|
84
84
|
/** 展开全部可折叠项。批量更新不会发出单条 expand 事件。 */expandAll: () => void; /** 折叠全部可折叠项。批量更新不会发出单条 expand 事件。 */
|
|
85
85
|
collapseAll: () => void;
|
|
86
86
|
}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {} & {
|
|
87
|
-
expand: (item: TimelineItem, expanded: boolean) => any;
|
|
88
87
|
"item-click": (item: TimelineItem, index: number) => any;
|
|
88
|
+
expand: (item: TimelineItem, expanded: boolean) => any;
|
|
89
89
|
}, string, vue.PublicProps, Readonly<TimelineProps> & Readonly<{
|
|
90
|
-
onExpand?: ((item: TimelineItem, expanded: boolean) => any) | undefined;
|
|
91
90
|
"onItem-click"?: ((item: TimelineItem, index: number) => any) | undefined;
|
|
91
|
+
onExpand?: ((item: TimelineItem, expanded: boolean) => any) | undefined;
|
|
92
92
|
}>, {
|
|
93
|
-
items: TimelineItem[];
|
|
94
|
-
size: "small" | "medium" | "large";
|
|
95
93
|
reverse: boolean;
|
|
94
|
+
size: "small" | "medium" | "large";
|
|
96
95
|
mode: "vertical" | "horizontal";
|
|
96
|
+
items: TimelineItem[];
|
|
97
97
|
labelPlacement: "left" | "right" | "alternate";
|
|
98
98
|
pending: boolean;
|
|
99
99
|
lineType: "solid" | "dashed" | "dotted";
|
package/dist/index42.vue.d.ts
CHANGED
|
@@ -84,16 +84,16 @@ declare const __VLS_base: vue.DefineComponent<TimelineProps, {
|
|
|
84
84
|
/** 展开全部可折叠项。批量更新不会发出单条 expand 事件。 */expandAll: () => void; /** 折叠全部可折叠项。批量更新不会发出单条 expand 事件。 */
|
|
85
85
|
collapseAll: () => void;
|
|
86
86
|
}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {} & {
|
|
87
|
-
expand: (item: TimelineItem, expanded: boolean) => any;
|
|
88
87
|
"item-click": (item: TimelineItem, index: number) => any;
|
|
88
|
+
expand: (item: TimelineItem, expanded: boolean) => any;
|
|
89
89
|
}, string, vue.PublicProps, Readonly<TimelineProps> & Readonly<{
|
|
90
|
-
onExpand?: ((item: TimelineItem, expanded: boolean) => any) | undefined;
|
|
91
90
|
"onItem-click"?: ((item: TimelineItem, index: number) => any) | undefined;
|
|
91
|
+
onExpand?: ((item: TimelineItem, expanded: boolean) => any) | undefined;
|
|
92
92
|
}>, {
|
|
93
|
-
items: TimelineItem[];
|
|
94
|
-
size: "small" | "medium" | "large";
|
|
95
93
|
reverse: boolean;
|
|
94
|
+
size: "small" | "medium" | "large";
|
|
96
95
|
mode: "vertical" | "horizontal";
|
|
96
|
+
items: TimelineItem[];
|
|
97
97
|
labelPlacement: "left" | "right" | "alternate";
|
|
98
98
|
pending: boolean;
|
|
99
99
|
lineType: "solid" | "dashed" | "dotted";
|
package/dist/index5.vue.d.cts
CHANGED
|
@@ -61,8 +61,8 @@ declare const __VLS_export: vue.DefineComponent<AvatarGroupProps, {}, {}, {}, {}
|
|
|
61
61
|
onOverflowClick?: ((hiddenItems: AvatarItem[]) => any) | undefined;
|
|
62
62
|
}>, {
|
|
63
63
|
direction: "ltr" | "rtl";
|
|
64
|
-
max: number;
|
|
65
64
|
size: number;
|
|
65
|
+
max: number;
|
|
66
66
|
overlap: number;
|
|
67
67
|
shape: "circle" | "square";
|
|
68
68
|
showStatus: boolean;
|
package/dist/index5.vue.d.ts
CHANGED
|
@@ -61,8 +61,8 @@ declare const __VLS_export: vue.DefineComponent<AvatarGroupProps, {}, {}, {}, {}
|
|
|
61
61
|
onOverflowClick?: ((hiddenItems: AvatarItem[]) => any) | undefined;
|
|
62
62
|
}>, {
|
|
63
63
|
direction: "ltr" | "rtl";
|
|
64
|
-
max: number;
|
|
65
64
|
size: number;
|
|
65
|
+
max: number;
|
|
66
66
|
overlap: number;
|
|
67
67
|
shape: "circle" | "square";
|
|
68
68
|
showStatus: boolean;
|
package/dist/index6.vue.d.cts
CHANGED
|
@@ -27,11 +27,11 @@ declare const __VLS_export: vue.DefineComponent<BarcodeProps, {}, {}, {}, {}, vu
|
|
|
27
27
|
label: string;
|
|
28
28
|
height: number;
|
|
29
29
|
width: number;
|
|
30
|
-
|
|
30
|
+
fontSize: number;
|
|
31
31
|
format: "CODE128" | "CODE39" | "EAN13" | "EAN8" | "UPC" | "ITF14" | "MSI" | "pharmacode";
|
|
32
32
|
showText: boolean;
|
|
33
|
-
fontSize: number;
|
|
34
33
|
textPosition: "bottom" | "top";
|
|
34
|
+
background: string;
|
|
35
35
|
showBorder: boolean;
|
|
36
36
|
showLabel: boolean;
|
|
37
37
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
package/dist/index6.vue.d.ts
CHANGED
|
@@ -27,11 +27,11 @@ declare const __VLS_export: vue.DefineComponent<BarcodeProps, {}, {}, {}, {}, vu
|
|
|
27
27
|
label: string;
|
|
28
28
|
height: number;
|
|
29
29
|
width: number;
|
|
30
|
-
|
|
30
|
+
fontSize: number;
|
|
31
31
|
format: "CODE128" | "CODE39" | "EAN13" | "EAN8" | "UPC" | "ITF14" | "MSI" | "pharmacode";
|
|
32
32
|
showText: boolean;
|
|
33
|
-
fontSize: number;
|
|
34
33
|
textPosition: "bottom" | "top";
|
|
34
|
+
background: string;
|
|
35
35
|
showBorder: boolean;
|
|
36
36
|
showLabel: boolean;
|
|
37
37
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
package/dist/localSource.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
require(`./chunk.cjs`);const e=require(`./data2.cjs`),t=require(`./C_DataPicker2.cjs`);let n=require(`vue`);function r(e){if(e!==void 0){if(typeof e?.then==`function`)throw Promise.resolve(e).catch(()=>void 0),TypeError(`[C_DataPicker] mapFields 必须同步返回字段对象`);if(Object.prototype.toString.call(e)!==`[object Object]`)throw TypeError(`[C_DataPicker] mapFields 必须返回字段对象`);return e}}function i(i){let{mapFields:a,onSelect:o,"onUpdate:modelValue":s,...c}=i;return(l,u,d,f)=>{let{value:p,disabled:m,readonly:h,presentation:g}=l,_=l[`onUpdate:value`],v=a?f?.commitValue:void 0;if(a&&!v)throw TypeError(`[C_DataPicker] mapFields 需要表单的关联字段提交能力`);let y;return(0,n.createVNode)(t.t,{...c,modelValue:t.r(p),disabled:m===!0,readonly:h===!0,presentation:g===`inline`||g===`modal`||g===`popover`?g:i.presentation,"onUpdate:modelValue":async e=>{if(v){y=e;return}return Array.isArray(_)?_.forEach(t=>t(e)):_?.(e),await(0,n.nextTick)(),s?.(e)},onSelect:async(...i)=>{if(v&&a&&y!==void 0){let c=y;if(y=void 0,!v(c,n=>{let o=t.r(n);if(!e.a(c,o))return r(a({rows:i[0],value:c,previousValue:o}))}))return;await(0,n.nextTick)(),await Promise.all([Promise.resolve().then(()=>s?.(c)),Promise.resolve().then(()=>o?.(...i))]);return}return await(0,n.nextTick)(),o?.(...i)}})}}function a(e){let{onSelect:r,...i}=e;return({value:e,updateValue:a,disabled:o,readonly:s})=>(0,n.createVNode)(t.t,{...i,modelValue:t.r(e),disabled:o,readonly:s,"onUpdate:modelValue":a,onSelect:async(...e)=>{await(0,n.nextTick)(),r?.(...e)}})}function o({rows:e,searchText:n,code:
|
|
1
|
+
require(`./chunk.cjs`);const e=require(`./data2.cjs`),t=require(`./C_DataPicker2.cjs`);let n=require(`vue`);function r(e){if(e!==void 0){if(typeof e?.then==`function`)throw Promise.resolve(e).catch(()=>void 0),TypeError(`[C_DataPicker] mapFields 必须同步返回字段对象`);if(Object.prototype.toString.call(e)!==`[object Object]`)throw TypeError(`[C_DataPicker] mapFields 必须返回字段对象`);return e}}function i(i){let{mapFields:a,onSelect:o,"onUpdate:modelValue":s,...c}=i;return(l,u,d,f)=>{let{value:p,disabled:m,readonly:h,presentation:g}=l,_=l[`onUpdate:value`],v=a?f?.commitValue:void 0;if(a&&!v)throw TypeError(`[C_DataPicker] mapFields 需要表单的关联字段提交能力`);let y;return(0,n.createVNode)(t.t,{...c,modelValue:t.r(p),disabled:m===!0,readonly:h===!0,presentation:g===`inline`||g===`modal`||g===`popover`?g:i.presentation,"onUpdate:modelValue":async e=>{if(v){y=e;return}return Array.isArray(_)?_.forEach(t=>t(e)):_?.(e),await(0,n.nextTick)(),s?.(e)},onSelect:async(...i)=>{if(v&&a&&y!==void 0){let c=y;if(y=void 0,!v(c,n=>{let o=t.r(n);if(!e.a(c,o))return r(a({rows:i[0],value:c,previousValue:o}))}))return;await(0,n.nextTick)(),await Promise.all([Promise.resolve().then(()=>s?.(c)),Promise.resolve().then(()=>o?.(...i))]);return}return await(0,n.nextTick)(),o?.(...i)}})}}function a(e){let{onSelect:r,...i}=e;return({value:e,updateValue:a,disabled:o,readonly:s})=>(0,n.createVNode)(t.t,{...i,modelValue:t.r(e),disabled:o,readonly:s,"onUpdate:modelValue":a,onSelect:async(...e)=>{await(0,n.nextTick)(),r?.(...e)}})}function o({rows:e,searchText:n,filter:r,code:i,...a}){let o=n??a.label,s={...a,request:async({page:t,pageSize:n,search:i,filters:a,signal:s})=>{s.throwIfAborted();let c=i.trim().toLowerCase(),l=c&&o?e=>o(e).toLowerCase().includes(c):void 0,u={search:i},d=r||l?e.filter(e=>(!l||l(e))&&(!r||r(e,a,u))):e;s.throwIfAborted();let f=(t-1)*n;return{rows:d.slice(f,f+n),total:d.length}},resolve:async(n,r)=>{r.throwIfAborted();let i=new Set(n);return e.filter(e=>i.has(t.n(a,e)))}};return i&&(s.resolveCodes=async(t,n)=>{n.throwIfAborted();let r=new Set(t),a=new Map;for(let t of e){let e=i(t);if(r.has(e)){if(a.has(e))throw TypeError(`[C_DataPicker] 粘贴编码必须唯一`);a.set(e,t)}}return a}),s}Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return i}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return o}});
|
package/dist/localSource.d.cts
CHANGED
|
@@ -76,19 +76,24 @@ declare function createDataPickerSearchField<T extends object, TFilters extends
|
|
|
76
76
|
//#endregion
|
|
77
77
|
//#region src/components/C_DataPicker/localSource.d.ts
|
|
78
78
|
/** 本地候选沿用远程选择器的分页和名称回显协议。 */
|
|
79
|
-
interface LocalDataPickerSourceOptions<T extends object, V extends DataPickerValue = DataPickerValue
|
|
79
|
+
interface LocalDataPickerSourceOptions<T extends object, V extends DataPickerValue = DataPickerValue, F extends object = Record<string, unknown>> extends Pick<DataPickerSourceInput<T, F, V>, 'rowKey' | 'label' | 'value' | 'debounce' | 'minChars'> {
|
|
80
80
|
rows: readonly T[];
|
|
81
81
|
/** 默认按名称搜索,需要匹配编码等字段时返回对应文本。 */
|
|
82
|
-
searchText?: (row: T) => string;
|
|
82
|
+
searchText?: false | ((row: T) => string);
|
|
83
|
+
/** 在分页前应用结构化条件;由本地规则接管关键词时可设置 searchText: false。 */
|
|
84
|
+
filter?: (row: T, filters: Readonly<F> | undefined, context: {
|
|
85
|
+
search: string;
|
|
86
|
+
}) => boolean;
|
|
83
87
|
/** 粘贴编码与提交值不一致时提供精确文本映射。 */
|
|
84
88
|
code?: (row: T) => string;
|
|
85
89
|
}
|
|
86
90
|
/** 用已有数组构建可搜索、可分页且支持初值回显的候选源。 */
|
|
87
|
-
declare function createLocalDataPickerSource<T extends object, V extends DataPickerValue = DataPickerValue
|
|
91
|
+
declare function createLocalDataPickerSource<T extends object, V extends DataPickerValue = DataPickerValue, F extends object = Record<string, unknown>>({
|
|
88
92
|
rows,
|
|
89
93
|
searchText,
|
|
94
|
+
filter,
|
|
90
95
|
code,
|
|
91
96
|
...identity
|
|
92
|
-
}: LocalDataPickerSourceOptions<T, V>): DataPickerSourceInput<T,
|
|
97
|
+
}: LocalDataPickerSourceOptions<T, V, F>): DataPickerSourceInput<T, F, V>;
|
|
93
98
|
//#endregion
|
|
94
99
|
export { createDataPickerField as a, DataPickerFieldSelection as i, createLocalDataPickerSource as n, _default as o, createDataPickerSearchField as r, LocalDataPickerSourceOptions as t };
|
package/dist/localSource.d.ts
CHANGED
|
@@ -76,19 +76,24 @@ declare function createDataPickerSearchField<T extends object, TFilters extends
|
|
|
76
76
|
//#endregion
|
|
77
77
|
//#region src/components/C_DataPicker/localSource.d.ts
|
|
78
78
|
/** 本地候选沿用远程选择器的分页和名称回显协议。 */
|
|
79
|
-
interface LocalDataPickerSourceOptions<T extends object, V extends DataPickerValue = DataPickerValue
|
|
79
|
+
interface LocalDataPickerSourceOptions<T extends object, V extends DataPickerValue = DataPickerValue, F extends object = Record<string, unknown>> extends Pick<DataPickerSourceInput<T, F, V>, 'rowKey' | 'label' | 'value' | 'debounce' | 'minChars'> {
|
|
80
80
|
rows: readonly T[];
|
|
81
81
|
/** 默认按名称搜索,需要匹配编码等字段时返回对应文本。 */
|
|
82
|
-
searchText?: (row: T) => string;
|
|
82
|
+
searchText?: false | ((row: T) => string);
|
|
83
|
+
/** 在分页前应用结构化条件;由本地规则接管关键词时可设置 searchText: false。 */
|
|
84
|
+
filter?: (row: T, filters: Readonly<F> | undefined, context: {
|
|
85
|
+
search: string;
|
|
86
|
+
}) => boolean;
|
|
83
87
|
/** 粘贴编码与提交值不一致时提供精确文本映射。 */
|
|
84
88
|
code?: (row: T) => string;
|
|
85
89
|
}
|
|
86
90
|
/** 用已有数组构建可搜索、可分页且支持初值回显的候选源。 */
|
|
87
|
-
declare function createLocalDataPickerSource<T extends object, V extends DataPickerValue = DataPickerValue
|
|
91
|
+
declare function createLocalDataPickerSource<T extends object, V extends DataPickerValue = DataPickerValue, F extends object = Record<string, unknown>>({
|
|
88
92
|
rows,
|
|
89
93
|
searchText,
|
|
94
|
+
filter,
|
|
90
95
|
code,
|
|
91
96
|
...identity
|
|
92
|
-
}: LocalDataPickerSourceOptions<T, V>): DataPickerSourceInput<T,
|
|
97
|
+
}: LocalDataPickerSourceOptions<T, V, F>): DataPickerSourceInput<T, F, V>;
|
|
93
98
|
//#endregion
|
|
94
99
|
export { createDataPickerField as a, DataPickerFieldSelection as i, createLocalDataPickerSource as n, _default as o, createDataPickerSearchField as r, LocalDataPickerSourceOptions as t };
|
package/dist/localSource.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./data2.js";import{n as t,r as n,t as r}from"./C_DataPicker2.js";import{createVNode as i,nextTick as a}from"vue";function o(e){if(e!==void 0){if(typeof e?.then==`function`)throw Promise.resolve(e).catch(()=>void 0),TypeError(`[C_DataPicker] mapFields 必须同步返回字段对象`);if(Object.prototype.toString.call(e)!==`[object Object]`)throw TypeError(`[C_DataPicker] mapFields 必须返回字段对象`);return e}}function s(t){let{mapFields:s,onSelect:c,"onUpdate:modelValue":l,...u}=t;return(d,f,p,m)=>{let{value:h,disabled:g,readonly:_,presentation:v}=d,y=d[`onUpdate:value`],b=s?m?.commitValue:void 0;if(s&&!b)throw TypeError(`[C_DataPicker] mapFields 需要表单的关联字段提交能力`);let x;return i(r,{...u,modelValue:n(h),disabled:g===!0,readonly:_===!0,presentation:v===`inline`||v===`modal`||v===`popover`?v:t.presentation,"onUpdate:modelValue":async e=>{if(b){x=e;return}return Array.isArray(y)?y.forEach(t=>t(e)):y?.(e),await a(),l?.(e)},onSelect:async(...t)=>{if(b&&s&&x!==void 0){let r=x;if(x=void 0,!b(r,i=>{let a=n(i);if(!e(r,a))return o(s({rows:t[0],value:r,previousValue:a}))}))return;await a(),await Promise.all([Promise.resolve().then(()=>l?.(r)),Promise.resolve().then(()=>c?.(...t))]);return}return await a(),c?.(...t)}})}}function c(e){let{onSelect:t,...o}=e;return({value:e,updateValue:s,disabled:c,readonly:l})=>i(r,{...o,modelValue:n(e),disabled:c,readonly:l,"onUpdate:modelValue":s,onSelect:async(...e)=>{await a(),t?.(...e)}})}function l({rows:e,searchText:n,code:
|
|
1
|
+
import{a as e}from"./data2.js";import{n as t,r as n,t as r}from"./C_DataPicker2.js";import{createVNode as i,nextTick as a}from"vue";function o(e){if(e!==void 0){if(typeof e?.then==`function`)throw Promise.resolve(e).catch(()=>void 0),TypeError(`[C_DataPicker] mapFields 必须同步返回字段对象`);if(Object.prototype.toString.call(e)!==`[object Object]`)throw TypeError(`[C_DataPicker] mapFields 必须返回字段对象`);return e}}function s(t){let{mapFields:s,onSelect:c,"onUpdate:modelValue":l,...u}=t;return(d,f,p,m)=>{let{value:h,disabled:g,readonly:_,presentation:v}=d,y=d[`onUpdate:value`],b=s?m?.commitValue:void 0;if(s&&!b)throw TypeError(`[C_DataPicker] mapFields 需要表单的关联字段提交能力`);let x;return i(r,{...u,modelValue:n(h),disabled:g===!0,readonly:_===!0,presentation:v===`inline`||v===`modal`||v===`popover`?v:t.presentation,"onUpdate:modelValue":async e=>{if(b){x=e;return}return Array.isArray(y)?y.forEach(t=>t(e)):y?.(e),await a(),l?.(e)},onSelect:async(...t)=>{if(b&&s&&x!==void 0){let r=x;if(x=void 0,!b(r,i=>{let a=n(i);if(!e(r,a))return o(s({rows:t[0],value:r,previousValue:a}))}))return;await a(),await Promise.all([Promise.resolve().then(()=>l?.(r)),Promise.resolve().then(()=>c?.(...t))]);return}return await a(),c?.(...t)}})}}function c(e){let{onSelect:t,...o}=e;return({value:e,updateValue:s,disabled:c,readonly:l})=>i(r,{...o,modelValue:n(e),disabled:c,readonly:l,"onUpdate:modelValue":s,onSelect:async(...e)=>{await a(),t?.(...e)}})}function l({rows:e,searchText:n,filter:r,code:i,...a}){let o=n??a.label,s={...a,request:async({page:t,pageSize:n,search:i,filters:a,signal:s})=>{s.throwIfAborted();let c=i.trim().toLowerCase(),l=c&&o?e=>o(e).toLowerCase().includes(c):void 0,u={search:i},d=r||l?e.filter(e=>(!l||l(e))&&(!r||r(e,a,u))):e;s.throwIfAborted();let f=(t-1)*n;return{rows:d.slice(f,f+n),total:d.length}},resolve:async(n,r)=>{r.throwIfAborted();let i=new Set(n);return e.filter(e=>i.has(t(a,e)))}};return i&&(s.resolveCodes=async(t,n)=>{n.throwIfAborted();let r=new Set(t),a=new Map;for(let t of e){let e=i(t);if(r.has(e)){if(a.has(e))throw TypeError(`[C_DataPicker] 粘贴编码必须唯一`);a.set(e,t)}}return a}),s}export{c as n,s as r,l as t};
|