@ithinkdt/ui 4.0.0-5 → 4.0.0-500

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.
@@ -0,0 +1,525 @@
1
+ import {
2
+ AnchorProps,
3
+ ButtonProps,
4
+ ButtonSlots,
5
+ CheckboxGroupProps, DataTableInst as NDataTableInst, DataTableProps as NDataTableProps, FlexProps,
6
+ FormItemGiProps as NFormItemGiProps, FormProps as NFormProps, GridItemProps as NGridItemProps, GridProps as NGridProps,
7
+ PopoverProps,
8
+ RadioGroupProps, TransferProps,
9
+ } from 'ithinkdt-ui'
10
+ import Sortable from 'sortablejs'
11
+ import { AllowedComponentProps, MaybeRef, MaybeRefOrGetter, VNodeChild } from 'vue'
12
+ import type { CSSProperties, HTMLAttributes, TemplateRef } from 'vue'
13
+
14
+ import { GenericCtx, GenericExposed, GenericReturn, MaybeArray, MaybePromise, PublicProps } from '@ithinkdt/common'
15
+ import { DictItem } from '@ithinkdt/common/dict'
16
+ import { DescriptionItem, FormItem, PageParams, PresetKeyField, SortParams, TableActionRenderParam, TableColumn, TableTypePresets, ValidationResults, _DataWithPresetKeyField } from '@ithinkdt/page'
17
+
18
+ declare module '@ithinkdt/page' {
19
+
20
+ interface FormRenderExtraOptions {
21
+ showColon?: MaybeRef<boolean | undefined>
22
+ labelWidth?: MaybeRef<string | number | undefined>
23
+ labelAlign?: MaybeRef<'left' | 'right' | 'center' | undefined>
24
+ labelPlacement?: MaybeRef<'left' | 'top' | undefined>
25
+ showRequireMark?: MaybeRef<boolean | undefined>
26
+ requireMarkPlacement?: MaybeRef<'left' | 'right' | 'right-hanging' | undefined>
27
+ showFeedback?: MaybeRef<boolean | undefined>
28
+ }
29
+
30
+ type FormItemOptionKeys = 'size' | 'showLabel' | 'labelWidth' | 'labelStyle' | 'labelAlign' | 'labelPlacement' | 'labelProps'
31
+ | 'showRequireMark' | 'requireMarkPlacement' | 'showFeedback' | 'feedbackClass' | 'feedbackStyle' | 'span' | 'offset'
32
+
33
+ type FormItemOptionExtra = {
34
+ [K in FormItemOptionKeys]?: MaybeRef<NFormItemGiProps[K]>
35
+ }
36
+
37
+ // eslint-disable-next-line ts/no-unused-vars
38
+ interface FormItemOptions<Model extends {}> extends FormItemOptionExtra {
39
+ showColon?: MaybeRef<boolean | undefined>
40
+ rowSpan?: MaybeRef<number | undefined>
41
+ tooltip?: MaybeRefOrGetter<VNodeChild | undefined>
42
+ tooltipPlacement?: MaybeRef<'bottom' | 'icon' | undefined>
43
+ showTooltipWhenReadonly?: MaybeRef<boolean | undefined>
44
+ }
45
+ // eslint-disable-next-line ts/no-unused-vars
46
+ interface FormItem<Model extends {}> extends Pick<NFormItemGiProps, FormItemOptionKeys> {
47
+ showColon?: boolean | undefined
48
+ rowSpan?: number | undefined
49
+ tooltip?: VNodeChild | (() => VNodeChild) | undefined
50
+ tooltipPlacement?: 'bottom' | 'icon' | undefined
51
+ showTooltipWhenReadonly?: boolean | undefined
52
+ }
53
+
54
+ interface FormItemRenderExtraParams {
55
+ size?: 'small' | 'medium' | 'large' | undefined
56
+ }
57
+ }
58
+
59
+ export type NStateButtonProps = ButtonProps & {
60
+ succeeded?: boolean | null | undefined
61
+ successText?: string | undefined
62
+ failureText?: string | undefined
63
+ }
64
+
65
+ export type NStateButtonEmits = {
66
+ (e: 'click', evt: MouseEvent): void
67
+ }
68
+
69
+ export type NStateButtonSlots = ButtonSlots & {
70
+ success?: () => VNodeChild
71
+ failure?: () => VNodeChild
72
+ successIcon?: () => VNodeChild
73
+ failureIcon?: () => VNodeChild
74
+ }
75
+
76
+ export declare function NStateButton(
77
+ props: NStateButtonProps & PublicProps,
78
+ ctx?: Pick<GenericCtx<NStateButtonProps, NStateButtonEmits, NStateButtonSlots>, 'attrs' | 'emit' | 'slots'>,
79
+ expose?: (exposed?: GenericExposed) => void,
80
+ setup?: GenericCtx<NStateButtonProps, NStateButtonEmits, NStateButtonSlots>,
81
+ ): GenericReturn<NStateButtonProps, NStateButtonEmits, NStateButtonSlots>
82
+
83
+ export type DataFormActionsProps = Pick<FlexProps, 'align' | 'justify' | 'vertical' | 'reverse'> & {
84
+ size?: 'small' | 'medium' | 'large' | undefined
85
+ gap?: number | string | undefined
86
+ submitText?: VNodeChild | undefined
87
+ resetText?: VNodeChild | undefined
88
+ cancelText?: VNodeChild | undefined
89
+ showSubmitBtn?: boolean | undefined
90
+ showResetBtn?: boolean | undefined
91
+ showCancelBtn?: boolean | undefined
92
+ submitDisabled?: boolean | undefined
93
+ submitLoading?: boolean | undefined
94
+ succeeded?: boolean | undefined
95
+ successText?: VNodeChild | undefined
96
+ failureText?: VNodeChild | undefined
97
+ onSubmit?: MaybeArray<() => void> | undefined
98
+ onRest?: MaybeArray<() => void> | undefined
99
+ onCancel?: MaybeArray<() => void> | undefined
100
+ nativeButtonType?: boolean | undefined
101
+ }
102
+
103
+ export type DataFormActionsEmits = {
104
+ (e: 'submit'): void
105
+ (e: 'reset'): void
106
+ (e: 'cancel'): void
107
+ }
108
+
109
+ export type DataFormActionsSlots = {
110
+ prefix?: () => VNodeChild
111
+ suffix?: () => VNodeChild
112
+ }
113
+
114
+ export declare function DataFormActions(
115
+ props: DataFormActionsProps & PublicProps,
116
+ ctx?: Pick<GenericCtx<DataFormActionsProps, DataFormActionsEmits, DataFormActionsSlots>, 'attrs' | 'emit' | 'slots'>,
117
+ expose?: (exposed?: GenericExposed) => void,
118
+ setup?: GenericCtx<DataFormActionsProps, DataFormActionsEmits, DataFormActionsSlots>,
119
+ ): GenericReturn<DataFormActionsProps, DataFormActionsEmits, DataFormActionsSlots>
120
+
121
+ export type DataFormProps<Data extends {}> = Omit<NFormProps, 'model' | 'rules' | 'onSubmit' | 'validateMessages'>
122
+ & Omit<DataFormActionsProps, 'onSubmit' | 'size' | 'gap' | 'justify' | 'direction' | 'submitloading'> & {
123
+ items: FormItem<Data>[]
124
+ model: Data
125
+ readonly?: boolean | undefined
126
+ grid?: boolean | NGridProps | undefined
127
+ validation?: { [k in keyof Data]?: ValidationResults } | undefined
128
+ showColon?: boolean | undefined
129
+ tooltipPlacement?: 'bottom' | 'icon' | undefined
130
+ loading?: boolean | undefined
131
+ showAction?: boolean | NGridItemProps & AllowedComponentProps | undefined
132
+ actionJustify?: DataFormActionsProps['justify']
133
+ actionAlign?: DataFormActionsProps['align']
134
+ actionGap?: DataFormActionsProps['gap']
135
+ onSubmit?: MaybeArray<(model: Data) => void> | undefined
136
+ }
137
+
138
+ export type DataFormEmits<Data extends {}> = {
139
+ (e: 'submit', model: Data): void
140
+ (e: 'reset'): void
141
+ (e: 'cancel'): void
142
+ }
143
+
144
+ export type DataFormSlots<_Data extends {}> = {
145
+ action?: (params: { cols: number, spans: number, overflow: boolean }) => VNodeChild
146
+ actionPrefix?: () => VNodeChild
147
+ actionSuffix?: () => VNodeChild
148
+ }
149
+
150
+ export type DataFormInst = {
151
+ }
152
+
153
+ export declare function DataForm<Data extends {}>(
154
+ props: DataFormProps<Data> & PublicProps,
155
+ ctx?: Pick<GenericCtx<DataFormProps<Data>, DataFormEmits<Data>, DataFormSlots<Data>, DataFormInst>, 'attrs' | 'emit' | 'slots'>,
156
+ expose?: (exposed?: GenericExposed<DataFormInst>) => void,
157
+ setup?: GenericCtx<DataFormProps<Data>, DataFormEmits<Data>, DataFormSlots<Data>, DataFormInst>,
158
+ ): GenericReturn<DataFormProps<Data>, DataFormEmits<Data>, DataFormSlots<Data>, DataFormInst>
159
+
160
+ export type DataFilterProps<Data extends {}> = Omit<NFormProps, 'model' | 'rules' | 'onSubmit' | 'validateMessages'> & {
161
+ items: FormItem<Data>[]
162
+ model: Data
163
+ loading?: boolean | undefined
164
+ filterOnReset?: boolean | undefined
165
+ filterText?: VNodeChild | undefined
166
+ resetText?: VNodeChild | undefined
167
+ grid?: boolean | Omit<NGridProps, 'collapsed' | 'collapsedRows'> | undefined
168
+ collapsible?: boolean | undefined
169
+ defaultCollapsed?: boolean | undefined
170
+ collapsedRows?: number | undefined
171
+ showColon?: boolean | undefined
172
+ tooltipPlacement?: 'bottom' | 'icon' | undefined
173
+ customizable?: boolean | undefined
174
+ onFilter?: MaybeArray<(model: Data) => void> | undefined
175
+ onRest?: MaybeArray<() => void> | undefined
176
+ onCustom?: MaybeArray<
177
+ ((reset: true) => void)
178
+ | ((sort: string[]) => void)
179
+ | ((modify: {
180
+ key: string
181
+ hidden: boolean
182
+ }) => void)
183
+ >
184
+ | undefined
185
+ onCollapse?: MaybeArray<(collapsed: boolean) => void> | undefined
186
+ }
187
+
188
+ export type DataFilterEmits<Data extends {}> = {
189
+ (e: 'filter', model: Data): void
190
+ (e: 'reset'): void
191
+ (e: 'custom', param: true | string[] | { key: string, hidden?: boolean }): void
192
+ (e: 'custom', sort: string[]): void
193
+ (e: 'custom', modify: {
194
+ key: string
195
+ hidden?: boolean
196
+ }): void
197
+ (e: 'collpase', collapsed: boolean): void
198
+ }
199
+
200
+ export type DataFilterInst = {
201
+ collapse(this: void, collapsed: boolean): void
202
+ }
203
+
204
+ export declare function DataFilter<Data extends {}>(
205
+ props: DataFilterProps<Data> & PublicProps,
206
+ ctx?: Pick<GenericCtx<DataFilterProps<Data>, DataFilterEmits<Data>, {}, DataFilterInst>, 'attrs' | 'emit' | 'slots'>,
207
+ expose?: (exposed?: GenericExposed<DataFilterInst>) => void,
208
+ setup?: GenericCtx<DataFilterProps<Data>, DataFilterEmits<Data>, {}, DataFilterInst>,
209
+ ): GenericReturn<DataFilterProps<Data>, DataFilterEmits<Data>, {}, DataFilterInst>
210
+
211
+ export type DataTableProps<Data extends {}, KeyField extends keyof Data>
212
+ = Omit<NDataTableProps, 'columns' | 'rowKey' | 'data' | 'checkedRowKeys' | 'defaultCheckedRowKeys' | 'onUpdate:checkedRowKeys' | 'onUpdateCheckedRowKeys'> & {
213
+ columns?: TableColumn<Data>[] | undefined
214
+ data?: Data[] | undefined
215
+ keyField?: KeyField | undefined
216
+ selectedKeys?: Data[KeyField][] | undefined
217
+ highlight?: boolean | Data[KeyField] | undefined
218
+ sorter?: SortParams<Data> | undefined
219
+ onSort?: MaybeArray<(param: SortParams<Data>) => void> | undefined
220
+ onSelect?: MaybeArray<(param: NonNullable<Data[KeyField]>[]) => void> | undefined
221
+ }
222
+
223
+ export type DataTableEmits<Data extends {}, KeyField extends keyof Data> = {
224
+ (e: 'sort', param: SortParams<Data>): void
225
+ (e: 'select', param: Data[KeyField][]): void
226
+ (e: 'highlight', rowKey: Data[KeyField]): void
227
+ (e: 'custom', params: { key: string, width: number }): void
228
+ }
229
+
230
+ export type DataTableInst<Data extends {}, KeyField extends keyof Data> = NDataTableInst & {
231
+ scrollToView(rowKey: Data[KeyField]): void
232
+ }
233
+
234
+ export declare function DataTable<Data extends _DataWithPresetKeyField>(
235
+ props: DataTableProps<Data, PresetKeyField> & PublicProps,
236
+ ctx?: Pick<GenericCtx<DataTableProps<Data, PresetKeyField>, DataTableEmits<Data, PresetKeyField>, {}, DataTableInst<Data, PresetKeyField>>, 'attrs' | 'emit' | 'slots'>,
237
+ expose?: (exposed?: GenericExposed<DataTableInst<Data, PresetKeyField>>) => void,
238
+ setup?: GenericCtx<DataTableProps<Data, PresetKeyField>, DataTableEmits<Data, PresetKeyField>, {}, DataTableInst<Data, PresetKeyField>>,
239
+ ): GenericReturn<DataTableProps<Data, PresetKeyField>, DataTableEmits<Data, PresetKeyField>, {}, DataTableInst<Data, PresetKeyField>>
240
+
241
+ export declare function DataTable<Data extends {}, KeyField extends keyof Data>(
242
+ props: DataTableProps<Data, KeyField> & PublicProps,
243
+ ctx?: Pick<GenericCtx<DataTableProps<Data, KeyField>, DataTableEmits<Data, KeyField>, {}, DataTableInst<Data, KeyField>>, 'attrs' | 'emit' | 'slots'>,
244
+ expose?: (exposed?: GenericExposed<DataTableInst<Data, KeyField>>) => void,
245
+ setup?: GenericCtx<DataTableProps<Data, KeyField>, DataTableEmits<Data, KeyField>, {}, DataTableInst<Data, KeyField>>,
246
+ ): GenericReturn<DataTableProps<Data, KeyField>, DataTableEmits<Data, KeyField>, {}, DataTableInst<Data, KeyField>>
247
+
248
+ export declare function useDataTableDrag<T>(
249
+ tableRef: TemplateRef<HTMLElement>,
250
+ { data, onSort, ...options }: {
251
+ data: MaybeRef<T[]>
252
+ onSort: (info: { from: number, to: number }) => void
253
+ } & Omit<Sortable.Options, 'onSort'>,
254
+ ): void
255
+
256
+ export type DataPaginationProps = (PageParams | { page: PageParams }) & {
257
+ simple?: boolean | undefined
258
+ total: number
259
+ pageSizes?: number[] | undefined
260
+ onChange?: MaybeArray<(value: PageParams) => void> | undefined
261
+ }
262
+
263
+ export type DataPaginationEmits = {
264
+ (e: 'change', value: PageParams): void
265
+ }
266
+
267
+ export declare function DataPagination(
268
+ props: DataPaginationProps & PublicProps,
269
+ ctx?: Pick<GenericCtx<DataPaginationProps, DataPaginationEmits, {}, {}>, 'attrs' | 'emit' | 'slots'>,
270
+ expose?: (exposed?: GenericExposed<{}>) => void,
271
+ setup?: GenericCtx<DataPaginationProps, DataPaginationEmits, {}, {}>,
272
+ ): GenericReturn<DataPaginationProps, DataPaginationEmits, {}, {}>
273
+
274
+ export type DataSelectionProps = {
275
+ 'count': number
276
+ 'modelValue': 'all' | 'selection'
277
+ 'onClear'?: MaybeArray<() => void> | undefined
278
+ 'onUpdate:modelValue'?: MaybeArray<(value: DataSelectionProps['modelValue']) => void> | undefined
279
+ }
280
+
281
+ export type DataSelectionEmits = {
282
+ (e: 'clear'): void
283
+ (e: 'update:modelValue', v: DataSelectionProps['modelValue']): void
284
+ }
285
+
286
+ export declare function DataSelection(
287
+ props: DataSelectionProps & PublicProps,
288
+ ctx?: Pick<GenericCtx<DataSelectionProps, DataSelectionEmits, {}, {}>, 'attrs' | 'emit' | 'slots'>,
289
+ expose?: (exposed?: GenericExposed<{}>) => void,
290
+ setup?: GenericCtx<DataSelectionProps, DataSelectionEmits, {}, {}>,
291
+ ): GenericReturn<DataSelectionProps, DataSelectionEmits, {}, {}>
292
+
293
+ export type DataCustomProps<Data extends {}> = {
294
+ data: Data[]
295
+ hiddenField?: keyof Data | undefined
296
+ fixedField?: keyof Data | undefined
297
+ labelField?: keyof Data | undefined
298
+ keyField?: keyof Data | undefined
299
+ showFixed?: boolean | undefined
300
+ disabledField?: keyof Data | undefined
301
+ visiblityField?: keyof Data | undefined
302
+ labelTitle?: VNodeChild | undefined
303
+ size?: number | undefined
304
+ type?: 'primary' | 'default' | undefined
305
+ onCustom?: MaybeArray<
306
+ ((reset: true) => void)
307
+ | ((sort: string[]) => void)
308
+ | ((modify: {
309
+ key: string
310
+ hidden?: boolean | undefined
311
+ fixed?: 'left' | 'right' | false | undefined
312
+ }) => void)>
313
+ | undefined
314
+ }
315
+
316
+ export type DataCustomEmits = {
317
+ (e: 'custom', reset: true): void
318
+ (e: 'custom', sort: string[]): void
319
+ (e: 'custom', modify: {
320
+ key: string
321
+ hidden?: boolean | undefined
322
+ fixed?: 'left' | 'right' | false | undefined
323
+ }): void
324
+ }
325
+
326
+ export declare function DataCustom<Data extends {}>(
327
+ props: DataCustomProps<Data> & PublicProps,
328
+ ctx?: Pick<GenericCtx<DataCustomProps<Data>, DataCustomEmits, {}, {}>, 'attrs' | 'emit' | 'slots'>,
329
+ expose?: (exposed?: GenericExposed<{}>) => void,
330
+ setup?: GenericCtx<DataCustomProps<Data>, DataCustomEmits, {}, {}>,
331
+ ): GenericReturn<DataCustomProps<Data>, DataCustomEmits, {}, {}>
332
+
333
+ export type DataActionsProps = {
334
+ options?: TableActionRenderParam[] | undefined
335
+ }
336
+
337
+ export type DataActionsEmits = {}
338
+
339
+ export declare function DataActions(
340
+ props: DataActionsProps & PublicProps,
341
+ ctx?: Pick<GenericCtx<DataActionsProps, DataActionsEmits, { default?: () => VNodeChild }, {}>, 'attrs' | 'emit' | 'slots'>,
342
+ expose?: (exposed?: GenericExposed<{}>) => void,
343
+ setup?: GenericCtx<DataActionsProps, DataActionsEmits, { default?: () => VNodeChild }, {}>,
344
+ ): GenericReturn<DataActionsProps, DataActionsEmits, { default?: () => VNodeChild }, {}>
345
+
346
+ export type DataLocaleInputProps = {
347
+ 'label'?: VNodeChild | (() => VNodeChild) | undefined
348
+ 'modelValue'?: Record<string, string | undefined> | null | undefined
349
+ 'supports'?: { label: string, value: string }[] | undefined
350
+ 'defaultLang'?: string | undefined
351
+ 'showLang'?: string | undefined
352
+ 'disabled'?: boolean | undefined
353
+ 'defaultRows'?: number | undefined
354
+ 'onUpdate:modelValue'?: MaybeArray<(modelValue: Record<string, string | undefined> | null) => void> | undefined
355
+ 'onUpdateModelValue'?: MaybeArray<(modelValue: Record<string, string | undefined> | null) => void> | undefined
356
+ }
357
+
358
+ export type DataLocaleInputEmits = {
359
+ (e: 'update:modelValue', modelValue: Record<string, string | undefined> | null | undefined): void
360
+ (e: 'updateModelValue', modelValue: Record<string, string | undefined> | null | undefined): void
361
+ }
362
+
363
+ export declare function DataLocaleInput(
364
+ props: DataLocaleInputProps & PublicProps,
365
+ ctx?: Pick<GenericCtx<DataLocaleInputProps, DataLocaleInputEmits, {}, {}>, 'attrs' | 'emit' | 'slots'>,
366
+ expose?: (exposed?: GenericExposed<{}>) => void,
367
+ setup?: GenericCtx<DataLocaleInputProps, DataLocaleInputEmits, {}, {}>,
368
+ ): GenericReturn<DataLocaleInputProps, DataLocaleInputEmits, {}, {}>
369
+
370
+ export declare function useLocaleEdit(
371
+ title: VNodeChild | (() => VNodeChild),
372
+ onSubmit: (data: Record<string, string | undefined>) => void,
373
+ defaultRows?: MaybeRef<number | undefined>,
374
+ ): {
375
+ open(this: void, data: MaybePromise<Record<string, string | undefined>>, readonly?: boolean): PromiseLike<Record<string, string | undefined>>
376
+ setSupports(this: void, supports: { label: string, value: string, required?: boolean }[]): void
377
+ }
378
+
379
+ export interface CheckboxesProps extends Omit<CheckboxGroupProps, 'value' | 'onUpdate:value' | 'defaultValue'> {
380
+ 'options'?: DictItem[] | Record<string, unknown>[] | undefined
381
+ 'vertical'?: boolean | undefined
382
+ 'default'?: boolean | string | DictItem | undefined
383
+ 'labelPadding'?: CSSProperties['padding']
384
+ 'labelField'?: string | undefined
385
+ 'valueField'?: string | undefined
386
+ 'disabledField'?: string | undefined
387
+ 'modelValue'?: string[] | number[] | null | undefined
388
+ 'onUpdate:modelValue'?: MaybeArray<(modelValue: string[] | number[] | null) => void> | undefined
389
+ 'onUpdateModelValue'?: MaybeArray<(modelValue: string[] | number[] | null) => void> | undefined
390
+ }
391
+
392
+ export interface CheckboxesEmits {
393
+ (e: 'update:modelValue', modelValue: string[] | number[] | null): void
394
+ (e: 'updateModelValue', modelValue: string[] | number[] | null): void
395
+ }
396
+
397
+ export declare function NCheckboxes(
398
+ props: CheckboxesProps & PublicProps,
399
+ ctx?: Pick<GenericCtx<CheckboxesProps, CheckboxesEmits, {}, {}>, 'attrs' | 'emit' | 'slots'>,
400
+ expose?: (exposed?: GenericExposed<{}>) => void,
401
+ setup?: GenericCtx<CheckboxesProps, CheckboxesEmits, {}, {}>,
402
+ ): GenericReturn<CheckboxesProps, CheckboxesEmits, {}, {}>
403
+
404
+ export interface RadiosProps extends Omit<RadioGroupProps, 'value' | 'onUpdate:value' | 'defaultValue'> {
405
+ 'options'?: DictItem[] | Record<string, unknown>[] | undefined
406
+ 'type'?: 'radio' | 'button' | 'button-primary' | undefined
407
+ 'vertical'?: boolean | undefined
408
+ 'default'?: boolean | string | DictItem | undefined
409
+ 'padding'?: CSSProperties['padding']
410
+ 'labelField'?: string | undefined
411
+ 'valueField'?: string | undefined
412
+ 'disabledField'?: string | undefined
413
+ 'modelValue'?: string | number | boolean | null | undefined
414
+ 'onUpdate:modelValue'?: MaybeArray<(modelValue: string | number | boolean | null) => void> | undefined
415
+ 'onUpdateModelValue'?: MaybeArray<(modelValue: string | number | boolean | null) => void> | undefined
416
+ }
417
+
418
+ export interface RadiosEmits {
419
+ (e: 'update:modelValue', modelValue: string | number | boolean | null): void
420
+ (e: 'updateModelValue', modelValue: string | number | boolean | null): void
421
+ }
422
+
423
+ export declare function NRadios(
424
+ props: RadiosProps & PublicProps,
425
+ ctx?: Pick<GenericCtx<RadiosProps, RadiosEmits, {}, {}>, 'attrs' | 'emit' | 'slots'>,
426
+ expose?: (exposed?: GenericExposed<{}>) => void,
427
+ setup?: GenericCtx<RadiosProps, RadiosEmits, {}, {}>,
428
+ ): GenericReturn<RadiosProps, RadiosEmits, {}, {}>
429
+
430
+ export interface UserGroupOption {
431
+ code: string
432
+ name: string
433
+ }
434
+ export interface DeptOption {
435
+ id?: string | undefined
436
+ code: string
437
+ name: string
438
+ children?: DeptOption[]
439
+ }
440
+
441
+ interface UserDeptProps<Multiple extends boolean> {
442
+ 'type'?: 'user' | 'dept' | undefined
443
+ 'selectType'?: 'dropdown' | 'dialog' | 'transfer' | undefined
444
+ 'placeholder'?: string | undefined
445
+ 'menuProps'?: HTMLAttributes | undefined
446
+ 'multiple'?: Multiple | undefined
447
+ 'defaultExpandAll'?: boolean | undefined
448
+ 'filterable'?: boolean | undefined
449
+ 'disabled'?: boolean | undefined
450
+ 'size'?: TransferProps['size']
451
+ 'valueField'?: 'id' | 'username' | 'code' | undefined
452
+ 'users'?: { id?: string | undefined, username: string, nickname: string }[] | undefined
453
+ 'groups'?: UserGroupOption[] | undefined
454
+ 'depts'?: DeptOption[] | undefined
455
+ 'getUsersByGroup'?: ((code: string) => Promise<{ username: string, nickname: string }[]>) | undefined
456
+ 'getUsersByDept'?: ((code: string) => Promise<{ username: string, nickname: string }[]>) | undefined
457
+ 'modelValue'?: Multiple extends true ? (string[] | null | undefined) : (string | null | undefined)
458
+ 'onUpdate:modelValue'?: MaybeArray<(value: Multiple extends true ? string[] : string) => void> | undefined
459
+ 'onUpdateModelValue'?: MaybeArray<(value: Multiple extends true ? string[] : string) => void> | undefined
460
+ }
461
+
462
+ interface UserDeptEmits<Multiple extends boolean> {
463
+ (e: 'update:modelValue', value: Multiple extends true ? string[] : string): void
464
+ (e: 'updateModelValue', value: Multiple extends true ? string[] : string): void
465
+ }
466
+
467
+ export declare function DtUserDept<Multiple extends boolean>(
468
+ props: UserDeptProps<Multiple> & PublicProps,
469
+ ctx?: Pick<GenericCtx<UserDeptProps<Multiple>, UserDeptEmits<Multiple>>, 'attrs' | 'emit' | 'slots'>,
470
+ expose?: (exposed?: GenericExposed<{}>) => void,
471
+ setup?: GenericCtx<UserDeptProps<Multiple>, UserDeptEmits<Multiple>, {}, {}>,
472
+ ): GenericReturn<UserDeptProps<Multiple>, UserDeptEmits<Multiple>, {}, {}>
473
+
474
+ interface UserRenderProps {
475
+ value?: string | string[] | null | undefined
476
+ multiple?: boolean | undefined
477
+ max?: number | undefined
478
+ size?: number | undefined
479
+ placement?: PopoverProps['placement']
480
+ getUsersByUsername?: ((usernames: string[]) => Promise<{ username: string, nickname: string }[]>) | undefined
481
+ }
482
+
483
+ interface UserRenderEmits {
484
+ }
485
+
486
+ export declare const DtUserRender: (
487
+ props: UserRenderProps & PublicProps,
488
+ ctx?: Pick<GenericCtx<UserRenderProps, UserRenderEmits>, 'attrs' | 'emit' | 'slots'>,
489
+ expose?: (exposed?: GenericExposed<{}>) => void,
490
+ setup?: GenericCtx<UserRenderProps, UserRenderEmits, {}, {}>,
491
+ ) => GenericReturn<UserRenderProps, UserRenderEmits, {}, {}>
492
+
493
+ interface DeptRenderProps {
494
+ value?: string | string[] | null | undefined
495
+ multiple?: boolean | undefined
496
+ getDeptsByCode?: (codes: string[]) => Promise<DeptOption[]>
497
+ }
498
+
499
+ interface DeptRenderEmits {
500
+ }
501
+
502
+ export declare const DtDeptRender: (
503
+ props: DeptRenderProps & PublicProps,
504
+ ctx?: Pick<GenericCtx<DeptRenderProps, DeptRenderEmits>, 'attrs' | 'emit' | 'slots'>,
505
+ expose?: (exposed?: GenericExposed<{}>) => void,
506
+ setup?: GenericCtx<DeptRenderProps, DeptRenderEmits, {}, {}>,
507
+ ) => GenericReturn<DeptRenderProps, DeptRenderEmits, {}, {}>
508
+
509
+ export interface DataDescriptionsProps<Data extends object> {
510
+ cols?: number
511
+ data: Data | undefined | null
512
+ items: DescriptionItem<Data>[]
513
+ title?: VNodeChild | ((data: Data | undefined) => VNodeChild)
514
+ anchor?: boolean | AnchorProps & AllowedComponentProps | undefined
515
+ }
516
+
517
+ export interface DataDescriptionsEmits {
518
+ }
519
+
520
+ export declare function DataDescriptions<Data extends {}>(
521
+ props: DataDescriptionsProps<Data> & PublicProps,
522
+ ctx?: Pick<GenericCtx<DataDescriptionsProps<Data>, DataDescriptionsEmits>, 'attrs' | 'emit' | 'slots'>,
523
+ expose?: (exposed?: GenericExposed<{}>) => void,
524
+ setup?: GenericCtx<DataDescriptionsProps<Data>, DataDescriptionsEmits, {}, {}>,
525
+ ): GenericReturn<DataDescriptionsProps<Data>, DataDescriptionsEmits, {}, {}>
@@ -0,0 +1 @@
1
+ export * from '../dist/components.js'