@ithinkdt/ui 4.0.0-6 → 4.0.0-601

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