@oiij/naive-ui 0.0.41 → 0.0.43
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/dist/components/config-providers/index.d.ts +8 -7
- package/dist/components/copy-button/index.d.ts +3 -2
- package/dist/components/data-table-plus/index.d.ts +10 -8
- package/dist/components/full-loading/index.d.ts +2 -1
- package/dist/components/preset-form/index.d.ts +7 -9
- package/dist/components/preset-input/_utils.d.ts +3 -5
- package/dist/components/preset-input/index.d.ts +2 -5
- package/dist/components/preset-picker/PresetPicker.vue.d.ts +1 -1
- package/dist/components/preset-picker/index.d.ts +5 -4
- package/dist/components/preset-select/PresetSelect.vue.d.ts +4 -4
- package/dist/components/preset-select/index.d.ts +3 -2
- package/dist/components/search-input/index.d.ts +3 -2
- package/dist/components/toggle-editor/ToggleEditor.vue.d.ts +2 -1
- package/dist/components/tooltip-button/index.d.ts +3 -2
- package/dist/components/transition/index.d.ts +2 -1
- package/dist/components/type-writer/TypeWriter.vue.d.ts +2 -2
- package/dist/components.cjs +10 -10
- package/dist/components.js +13 -12
- package/dist/components.umd.cjs +9 -9
- package/package.json +3 -3
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import { ConfigProviderProps, DialogProviderInst, DialogProviderProps, LoadingBarProviderInst, LoadingBarProviderProps, MessageProviderInst, MessageProviderProps, ModalProviderInst, ModalProviderProps, NotificationProviderInst, NotificationProviderProps } from 'naive-ui';
|
|
2
|
+
import { ClassStyle } from '../data-table-plus';
|
|
2
3
|
import { FullLoadingProps } from '../full-loading/index';
|
|
3
4
|
export { default as NConfigProviders } from './ConfigProviders.vue';
|
|
4
5
|
export interface ConfigProvidersProps {
|
|
5
6
|
globalStyle?: boolean;
|
|
6
|
-
configProviderProps?: ConfigProviderProps;
|
|
7
|
-
loadingBarProps?: LoadingBarProviderProps;
|
|
8
|
-
fullLoadingProps?: FullLoadingProps;
|
|
9
|
-
dialogProviderProps?: DialogProviderProps;
|
|
10
|
-
modalProviderProps?: ModalProviderProps;
|
|
11
|
-
notificationProviderProps?: NotificationProviderProps;
|
|
12
|
-
messageProviderProps?: MessageProviderProps;
|
|
7
|
+
configProviderProps?: ConfigProviderProps & ClassStyle;
|
|
8
|
+
loadingBarProps?: LoadingBarProviderProps & ClassStyle;
|
|
9
|
+
fullLoadingProps?: FullLoadingProps & ClassStyle;
|
|
10
|
+
dialogProviderProps?: DialogProviderProps & ClassStyle;
|
|
11
|
+
modalProviderProps?: ModalProviderProps & ClassStyle;
|
|
12
|
+
notificationProviderProps?: NotificationProviderProps & ClassStyle;
|
|
13
|
+
messageProviderProps?: MessageProviderProps & ClassStyle;
|
|
13
14
|
}
|
|
14
15
|
export interface LoadingIns {
|
|
15
16
|
start: () => void;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { UseClipboardOptions } from '@vueuse/core';
|
|
2
2
|
import { ButtonProps, TooltipProps } from 'naive-ui';
|
|
3
|
+
import { ClassStyle } from '../data-table-plus';
|
|
3
4
|
export { default as NCopyButton } from './CopyButton.vue';
|
|
4
5
|
export interface CopyButtonProps {
|
|
5
6
|
value?: string;
|
|
6
7
|
config?: UseClipboardOptions<string | undefined>;
|
|
7
|
-
tooltipProps?: TooltipProps;
|
|
8
|
-
buttonProps?: ButtonProps;
|
|
8
|
+
tooltipProps?: TooltipProps & ClassStyle;
|
|
9
|
+
buttonProps?: ButtonProps & ClassStyle;
|
|
9
10
|
}
|
|
@@ -6,6 +6,10 @@ import { PresetInputOptions } from '../preset-input/index';
|
|
|
6
6
|
import { RemoteRequestEmits, RemoteRequestProps, RObject } from '../remote-request/index';
|
|
7
7
|
import { SearchInputProps } from '../search-input/index';
|
|
8
8
|
export { default as NDataTablePlus } from './DataTablePlus.vue';
|
|
9
|
+
export type ClassStyle = {
|
|
10
|
+
class?: string;
|
|
11
|
+
style?: CSSProperties | string;
|
|
12
|
+
};
|
|
9
13
|
export interface DataTablePlusExposeActions<P extends RObject = RObject, D extends RObject = RObject> {
|
|
10
14
|
run: (params: P) => void;
|
|
11
15
|
runAsync: (params: P) => Promise<D>;
|
|
@@ -51,23 +55,21 @@ export type DataTablePlusProps<P extends RObject = RObject, D extends RObject =
|
|
|
51
55
|
title?: string;
|
|
52
56
|
columns?: DataTableColumns<R>;
|
|
53
57
|
filterOptions?: DataTablePlusFilterOptions<P, D, R>;
|
|
54
|
-
filterGridProps?: GridProps;
|
|
55
|
-
filterFlexProps?: FlexProps;
|
|
58
|
+
filterGridProps?: GridProps & ClassStyle;
|
|
59
|
+
filterFlexProps?: FlexProps & ClassStyle;
|
|
56
60
|
filterLayout?: 'grid' | 'flex' | ['grid' | 'flex'];
|
|
57
61
|
filterCollapsedType?: 'collapsed' | 'modal';
|
|
58
62
|
filterModalTrigger?: 'manual' | 'auto';
|
|
59
63
|
filterLabel?: string;
|
|
60
|
-
filterModalProps?: ModalProps;
|
|
64
|
+
filterModalProps?: ModalProps & ClassStyle;
|
|
61
65
|
contextMenuOptions?: DropdownOption[];
|
|
62
66
|
fields?: DataTablePlusFields;
|
|
63
|
-
search?: SearchInputProps | boolean;
|
|
64
|
-
pagination?: Omit<PaginationProps, 'page' | 'pageSize'> | boolean;
|
|
67
|
+
search?: SearchInputProps & ClassStyle | boolean;
|
|
68
|
+
pagination?: Omit<PaginationProps, 'page' | 'pageSize'> & ClassStyle | boolean;
|
|
65
69
|
clearable?: boolean;
|
|
66
70
|
columnsFilterOptions?: (filters: DataTableFilterState) => Record<string, any>;
|
|
67
71
|
columnsSorterOptions?: (sorters: Record<string, DataTableSortState>) => Record<string, any>;
|
|
68
|
-
dataTableProps?: DataTableProps;
|
|
69
|
-
customStyle?: CSSProperties;
|
|
70
|
-
customClass?: string;
|
|
72
|
+
dataTableProps?: DataTableProps & ClassStyle;
|
|
71
73
|
};
|
|
72
74
|
export type DataTablePlusEmits<P extends RObject = RObject, D extends RObject = RObject, R extends RObject = RObject> = RemoteRequestEmits<P, D> & {
|
|
73
75
|
(e: 'clickRow', row: R, index: number, event: MouseEvent, currentData: R[]): void;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { SpinProps } from 'naive-ui';
|
|
2
2
|
import { CSSProperties, RendererElement } from 'vue';
|
|
3
|
+
import { ClassStyle } from '../data-table-plus';
|
|
3
4
|
export { default as NFullLoading } from './FullLoading.vue';
|
|
4
5
|
export interface FullLoadingProps {
|
|
5
6
|
show?: boolean;
|
|
@@ -8,5 +9,5 @@ export interface FullLoadingProps {
|
|
|
8
9
|
blur?: boolean;
|
|
9
10
|
disableScroll?: boolean;
|
|
10
11
|
scrollSelector?: string | HTMLElement;
|
|
11
|
-
spinProps?: Omit<SpinProps, 'show'
|
|
12
|
+
spinProps?: Omit<SpinProps, 'show'> & ClassStyle;
|
|
12
13
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { FlexProps, FormItemProps, FormItemRule, FormProps, FormRules, GridItemProps, GridProps } from 'naive-ui';
|
|
2
|
-
import {
|
|
2
|
+
import { VNode } from 'vue';
|
|
3
3
|
import { NaiveFormClearRules, NaiveFormReturns, NaiveFormRules } from '../../composables/useNaiveForm';
|
|
4
|
+
import { ClassStyle } from '../data-table-plus';
|
|
4
5
|
import { PresetInputOptions } from '../preset-input/index';
|
|
5
6
|
export type { NaiveFormRules } from '../../composables/useNaiveForm';
|
|
6
7
|
export { default as NPresetForm } from './PresetForm.vue';
|
|
@@ -10,16 +11,13 @@ export type PresetFormExposeActions<V extends Record<string, any> = Record<strin
|
|
|
10
11
|
};
|
|
11
12
|
export type PresetFormOptionsItem<V extends Record<string, any> = Record<string, any>> = PresetInputOptions & {
|
|
12
13
|
key?: keyof V;
|
|
13
|
-
label?: string | boolean |
|
|
14
|
-
style?: CSSProperties;
|
|
15
|
-
class?: string;
|
|
16
|
-
});
|
|
14
|
+
label?: string | boolean | FormItemProps & ClassStyle;
|
|
17
15
|
rules?: FormRules | FormItemRule | FormItemRule[];
|
|
18
16
|
required?: boolean;
|
|
19
17
|
collapsed?: boolean;
|
|
20
18
|
hidden?: boolean | ((refs: PresetFormExposeRefs<V>) => boolean);
|
|
21
19
|
gridSpan?: string | number;
|
|
22
|
-
gridItemProps?: GridItemProps;
|
|
20
|
+
gridItemProps?: GridItemProps & ClassStyle;
|
|
23
21
|
render?: (refs: PresetFormExposeRefs<V>, actions: PresetFormExposeActions<V>) => VNode | null;
|
|
24
22
|
};
|
|
25
23
|
export type PresetFormOptions<V extends Record<string, any> = Record<string, any>> = PresetFormOptionsItem<V>[];
|
|
@@ -28,8 +26,8 @@ export interface PresetFormProps<V extends Record<string, any> = Record<string,
|
|
|
28
26
|
values?: V;
|
|
29
27
|
rules?: NaiveFormRules<V>;
|
|
30
28
|
clearRules?: NaiveFormClearRules;
|
|
31
|
-
formProps?: FormProps;
|
|
32
|
-
gridProps?: GridProps;
|
|
33
|
-
flexProps?: FlexProps;
|
|
29
|
+
formProps?: FormProps & ClassStyle;
|
|
30
|
+
gridProps?: GridProps & ClassStyle;
|
|
31
|
+
flexProps?: FlexProps & ClassStyle;
|
|
34
32
|
layout?: 'grid' | 'flex' | ['grid' | 'flex'];
|
|
35
33
|
}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { FormItemProps } from 'naive-ui';
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
class?: string;
|
|
6
|
-
}), defaultProps?: FormItemProps): VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
2
|
+
import { VNode } from 'vue';
|
|
3
|
+
import { ClassStyle } from '../data-table-plus';
|
|
4
|
+
export declare function renderLabel(children: VNode | null, label?: string | boolean | (FormItemProps & ClassStyle), defaultProps?: FormItemProps): VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
7
5
|
[key: string]: any;
|
|
8
6
|
}> | null;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ButtonProps, CheckboxGroupProps, CheckboxProps, ColorPickerProps, DatePickerProps, DividerProps, DynamicTagsProps, InputNumberProps, InputProps, RadioGroupProps, RadioProps, RateProps, SelectProps, SliderProps, SwitchProps, TimePickerProps } from 'naive-ui';
|
|
2
|
-
import {
|
|
2
|
+
import { ClassStyle } from '../data-table-plus';
|
|
3
3
|
import { SearchInputProps } from '../search-input/index';
|
|
4
4
|
export { default as NPresetInput } from './PresetInput.vue';
|
|
5
5
|
export interface PresetInputType {
|
|
@@ -28,10 +28,7 @@ export interface PresetInputType {
|
|
|
28
28
|
export type PresetInputOptions = {
|
|
29
29
|
[K in keyof PresetInputType]: {
|
|
30
30
|
type?: K;
|
|
31
|
-
props?: PresetInputType[K] &
|
|
32
|
-
style?: CSSProperties;
|
|
33
|
-
class?: string;
|
|
34
|
-
};
|
|
31
|
+
props?: PresetInputType[K] & ClassStyle;
|
|
35
32
|
};
|
|
36
33
|
}[keyof PresetInputType];
|
|
37
34
|
export interface PresetInputProps<V> {
|
|
@@ -11,7 +11,7 @@ declare const _default: <V extends PresetPickerValue, R extends RObject>(__VLS_p
|
|
|
11
11
|
readonly onMaskClick?: (() => any) | undefined;
|
|
12
12
|
readonly onNegativeClick?: (() => any) | undefined;
|
|
13
13
|
readonly "onUpdate:show"?: ((value: boolean) => any) | undefined;
|
|
14
|
-
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, "
|
|
14
|
+
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, "onUpdate:value" | "onUpdate:show" | "onClose" | "onEsc" | "onAfterEnter" | "onAfterLeave" | "onPositiveClick" | "onNegativeClick" | "onMaskClick"> & PresetPickerProps<V, R> & Partial<{}>> & import('vue').PublicProps;
|
|
15
15
|
expose(exposed: import('vue').ShallowUnwrapRef<{
|
|
16
16
|
refs: PresetPickerExposeRefs<R>;
|
|
17
17
|
actions: PresetPickerExposeActions<R>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { BadgeProps, ButtonProps, DataTableColumns, ModalProps } from 'naive-ui';
|
|
2
2
|
import { TableSelectionColumn } from 'naive-ui/es/data-table/src/interface';
|
|
3
3
|
import { Ref } from 'vue';
|
|
4
|
+
import { ClassStyle } from '../data-table-plus';
|
|
4
5
|
import { RObject } from '../remote-request/index';
|
|
5
6
|
export { default as NPresetPicker } from './PresetPicker.vue';
|
|
6
7
|
export type PresetPickerValue = string | number | (string | number)[] | null;
|
|
@@ -35,10 +36,10 @@ export type PresetPickerProps<V extends PresetPickerValue, R extends RObject = R
|
|
|
35
36
|
label?: string;
|
|
36
37
|
value?: string;
|
|
37
38
|
};
|
|
38
|
-
buttonProps?: ButtonProps;
|
|
39
|
-
clearButtonProps?: ButtonProps;
|
|
40
|
-
badgeProps?: BadgeProps;
|
|
41
|
-
modalProps?: ModalProps;
|
|
39
|
+
buttonProps?: ButtonProps & ClassStyle;
|
|
40
|
+
clearButtonProps?: ButtonProps & ClassStyle;
|
|
41
|
+
badgeProps?: BadgeProps & ClassStyle;
|
|
42
|
+
modalProps?: ModalProps & ClassStyle;
|
|
42
43
|
};
|
|
43
44
|
export type PresetPickerEmits<V extends PresetPickerValue, R extends RObject = RObject> = {
|
|
44
45
|
(e: 'update:value', val: V | null, raw: R | R[] | null): void;
|
|
@@ -7,16 +7,16 @@ declare const _default: <V extends PresetSelectValue, P extends RObject, D exten
|
|
|
7
7
|
readonly onError?: ((err: Error, params: P[]) => any) | undefined;
|
|
8
8
|
readonly onFocus?: ((ev: FocusEvent) => any) | undefined;
|
|
9
9
|
readonly onScroll?: ((ev: Event) => any) | undefined;
|
|
10
|
-
readonly onClear?: (() => any) | undefined;
|
|
11
|
-
readonly onSearch?: ((value: string) => any) | undefined;
|
|
12
|
-
readonly onCreate?: ((label: string) => any) | undefined;
|
|
13
10
|
readonly onSuccess?: ((data: D, params: P[]) => any) | undefined;
|
|
14
11
|
readonly "onUpdate:value"?: ((val: V | null, option: SelectOption | SelectOption[] | null, raw: R | R[] | null) => any) | undefined;
|
|
12
|
+
readonly onClear?: (() => any) | undefined;
|
|
13
|
+
readonly onSearch?: ((value: string) => any) | undefined;
|
|
15
14
|
readonly onFinally?: ((params: P[], data?: D | undefined, err?: Error | undefined) => any) | undefined;
|
|
16
15
|
readonly onBefore?: ((params: P[]) => any) | undefined;
|
|
17
16
|
readonly "onUpdate:page"?: ((page: number) => any) | undefined;
|
|
18
17
|
readonly "onUpdate:pageSize"?: ((pageSize: number) => any) | undefined;
|
|
19
|
-
|
|
18
|
+
readonly onCreate?: ((label: string) => any) | undefined;
|
|
19
|
+
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, "onFocus" | "onBlur" | "onClear" | "onUpdate:value" | "onError" | "onScroll" | "onCreate" | "onSearch" | "onSuccess" | "onFinally" | "onBefore" | "onUpdate:page" | "onUpdate:pageSize"> & PresetSelectProps<V, P, D, R> & Partial<{}>> & import('vue').PublicProps;
|
|
20
20
|
expose(exposed: import('vue').ShallowUnwrapRef<{
|
|
21
21
|
refs: PresetSelectExposeRefs<P, D, R>;
|
|
22
22
|
actions: PresetSelectExposeActions<P, D>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { PaginationProps, SelectGroupOption, SelectInst, SelectOption, SelectProps } from 'naive-ui';
|
|
2
2
|
import { ShallowRef } from 'vue';
|
|
3
|
+
import { ClassStyle } from '../data-table-plus';
|
|
3
4
|
import { DataTablePlusExposeActions, DataTablePlusExposeRefsBase } from '../data-table-plus/index';
|
|
4
5
|
import { RemoteRequestEmits, RemoteRequestProps, RObject } from '../remote-request/index';
|
|
5
6
|
export { default as NPresetSelect } from './PresetSelect.vue';
|
|
@@ -25,8 +26,8 @@ export type PresetSelectProps<V extends PresetSelectValue, P extends RObject = R
|
|
|
25
26
|
debounce?: boolean | number;
|
|
26
27
|
optionFormat?: OptionFormat<R>;
|
|
27
28
|
fields?: PresetSelectFields;
|
|
28
|
-
selectProps?: SelectProps;
|
|
29
|
-
pagination?: Omit<PaginationProps, 'page' | 'pageSize'> | boolean;
|
|
29
|
+
selectProps?: SelectProps & ClassStyle;
|
|
30
|
+
pagination?: Omit<PaginationProps, 'page' | 'pageSize'> & ClassStyle | boolean;
|
|
30
31
|
};
|
|
31
32
|
export type PresetSelectEmits<V extends PresetSelectValue, P extends RObject = RObject, D extends RObject = RObject, R extends RObject = RObject> = RemoteRequestEmits<P, D> & {
|
|
32
33
|
(e: 'blur', ev: FocusEvent): void;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ButtonProps, InputProps } from 'naive-ui';
|
|
2
|
+
import { ClassStyle } from '../data-table-plus';
|
|
2
3
|
export { default as NSearchInput } from './SearchInput.vue';
|
|
3
4
|
export interface SearchInputProps {
|
|
4
5
|
value?: string | null;
|
|
@@ -7,6 +8,6 @@ export interface SearchInputProps {
|
|
|
7
8
|
loading?: boolean;
|
|
8
9
|
autoTrigger?: boolean | number;
|
|
9
10
|
searchButton?: 'text' | 'icon' | boolean;
|
|
10
|
-
inputProps?: InputProps;
|
|
11
|
-
buttonProps?: ButtonProps;
|
|
11
|
+
inputProps?: InputProps & ClassStyle;
|
|
12
|
+
buttonProps?: ButtonProps & ClassStyle;
|
|
12
13
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { ButtonProps, TooltipProps } from 'naive-ui';
|
|
2
|
+
import { ClassStyle } from '../data-table-plus';
|
|
2
3
|
export { default as NTooltipButton } from './TooltipButton.vue';
|
|
3
4
|
export interface TooltipButtonProps {
|
|
4
5
|
value?: string;
|
|
5
|
-
tooltipProps?: TooltipProps;
|
|
6
|
-
buttonProps?: ButtonProps;
|
|
6
|
+
tooltipProps?: TooltipProps & ClassStyle;
|
|
7
|
+
buttonProps?: ButtonProps & ClassStyle;
|
|
7
8
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { TransitionProps as BaseTransitionProps } from 'vue';
|
|
2
|
+
import { ClassStyle } from '../data-table-plus';
|
|
2
3
|
export { default as NTransition } from './BaseTransition.vue';
|
|
3
4
|
export interface TransitionProps {
|
|
4
5
|
name?: string;
|
|
5
|
-
transitionProps?: BaseTransitionProps;
|
|
6
|
+
transitionProps?: BaseTransitionProps & ClassStyle;
|
|
6
7
|
}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { TypeWriterProps } from './index';
|
|
2
2
|
declare const _default: import('vue').DefineComponent<TypeWriterProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
3
3
|
start: () => any;
|
|
4
|
+
stop: (v: string) => any;
|
|
4
5
|
update: (v: {
|
|
5
6
|
index: number;
|
|
6
7
|
value: string;
|
|
7
8
|
}) => any;
|
|
8
|
-
stop: (v: string) => any;
|
|
9
9
|
}, string, import('vue').PublicProps, Readonly<TypeWriterProps> & Readonly<{
|
|
10
10
|
onStart?: (() => any) | undefined;
|
|
11
|
+
onStop?: ((v: string) => any) | undefined;
|
|
11
12
|
onUpdate?: ((v: {
|
|
12
13
|
index: number;
|
|
13
14
|
value: string;
|
|
14
15
|
}) => any) | undefined;
|
|
15
|
-
onStop?: ((v: string) => any) | undefined;
|
|
16
16
|
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
17
17
|
export default _default;
|