@oiij/naive-ui 0.0.19 → 0.0.21

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.
Files changed (29) hide show
  1. package/dist/components/config-providers/ConfigProviders.vue.d.ts +1 -1
  2. package/dist/components/config-providers/index.d.ts +1 -1
  3. package/dist/components/copy-button/CopyButton.vue.d.ts +1 -1
  4. package/dist/components/data-table-plus/DataTablePlus.vue.d.ts +1 -1
  5. package/dist/components/data-table-plus/index.d.ts +7 -3
  6. package/dist/components/full-loading/FullLoading.vue.d.ts +1 -1
  7. package/dist/components/preset-form/PresetForm.vue.d.ts +13 -25
  8. package/dist/components/preset-form/index.d.ts +12 -7
  9. package/dist/components/preset-input/PresetInput.vue.d.ts +1 -1
  10. package/dist/components/preset-input/_utils.d.ts +1 -1
  11. package/dist/components/preset-input/index.d.ts +3 -7
  12. package/dist/components/preset-select/PresetSelect.vue.d.ts +1 -1
  13. package/dist/components/remote-request/RemoteRequest.vue.d.ts +1 -1
  14. package/dist/components/search-input/SearchInput.vue.d.ts +1 -1
  15. package/dist/components/tooltip-button/TooltipButton.vue.d.ts +1 -1
  16. package/dist/components/transition/BaseTransition.vue.d.ts +1 -1
  17. package/dist/components/type-writer/TypeWriter.vue.d.ts +1 -1
  18. package/dist/components.cjs +26 -26
  19. package/dist/components.js +6974 -6950
  20. package/dist/components.umd.cjs +28 -28
  21. package/dist/composables/useNaiveForm.cjs +7 -1
  22. package/dist/composables/useNaiveForm.d.cts +13 -10
  23. package/dist/composables/useNaiveForm.d.ts +13 -10
  24. package/dist/composables/useNaiveForm.js +7 -1
  25. package/dist/composables/useNaiveTheme.d.cts +2 -2
  26. package/dist/composables/useNaiveTheme.d.ts +2 -2
  27. package/dist/index.d.cts +2 -2
  28. package/dist/index.d.ts +2 -2
  29. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import { ConfigProvidersProps } from '.';
1
+ import { ConfigProvidersProps } from './index';
2
2
  declare function __VLS_template(): {
3
3
  attrs: Partial<{}>;
4
4
  slots: {
@@ -1,5 +1,5 @@
1
1
  import { ConfigProviderProps, DialogProviderInst, DialogProviderProps, LoadingBarProviderInst, LoadingBarProviderProps, MessageProviderInst, MessageProviderProps, ModalProviderInst, ModalProviderProps, NotificationProviderInst, NotificationProviderProps } from 'naive-ui';
2
- import { FullLoadingProps } from '../full-loading';
2
+ import { FullLoadingProps } from '../full-loading/index';
3
3
  export { default as NConfigProviders } from './ConfigProviders.vue';
4
4
  export interface ConfigProvidersProps {
5
5
  globalStyle?: boolean;
@@ -1,4 +1,4 @@
1
- import { CopyButtonProps } from '.';
1
+ import { CopyButtonProps } from './index';
2
2
  declare function __VLS_template(): {
3
3
  attrs: Partial<{}>;
4
4
  slots: {
@@ -1,6 +1,6 @@
1
1
  import { DataTableSortState } from 'naive-ui';
2
2
  import { FilterState, TableBaseColumn } from 'naive-ui/es/data-table/src/interface';
3
- import { ContextMenuSelectType, DataTablePlusClickRowType, DataTablePlusExposeActions, DataTablePlusExposeRefs, DataTablePlusProps } from '.';
3
+ import { ContextMenuSelectType, DataTablePlusClickRowType, DataTablePlusExposeActions, DataTablePlusExposeRefs, DataTablePlusProps } from './index';
4
4
  declare const _default: <P extends Record<string, any> = Record<string, any>, D extends Record<string, any> = Record<string, any>, R extends Record<string, any> = Record<string, any>>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
5
5
  props: __VLS_PrettifyLocal<any & DataTablePlusProps<P, D, R> & Partial<{}>> & import('vue').PublicProps;
6
6
  expose(exposed: import('vue').ShallowUnwrapRef<{
@@ -1,8 +1,8 @@
1
- import { DataTableColumns, DataTableInst, DataTableProps, DropdownOption, FlexProps, GridItemProps, GridProps, PaginationProps } from 'naive-ui';
1
+ import { DataTableColumns, DataTableInst, DataTableProps, DropdownOption, FlexProps, FormItemProps, GridItemProps, GridProps, PaginationProps } from 'naive-ui';
2
2
  import { ComputedRef, CSSProperties, Ref, ShallowRef, VNode } from 'vue';
3
3
  import { useRequestResult } from 'vue-hooks-plus/es/useRequest/types';
4
- import { PresetInputOptions } from '../preset-input';
5
- import { RemoteRequestProps } from '../remote-request';
4
+ import { PresetInputOptions } from '../preset-input/index';
5
+ import { RemoteRequestProps } from '../remote-request/index';
6
6
  export { default as NDataTablePlus } from './DataTablePlus.vue';
7
7
  export interface DataTablePlusExposeActions<P extends Record<string, any>, D extends Record<string, any>> {
8
8
  run: (params: P) => void;
@@ -29,6 +29,10 @@ export type DataTablePlusExposeRefs<P extends Record<string, any>, D extends Rec
29
29
  };
30
30
  export type DataTablePlusFilterOptions<P extends Record<string, any>, D extends Record<string, any>, R extends Record<string, any>> = (PresetInputOptions & {
31
31
  key?: keyof P;
32
+ label?: string | boolean | (FormItemProps & {
33
+ style?: CSSProperties;
34
+ class?: string;
35
+ });
32
36
  collapsed?: boolean;
33
37
  gridItemProps?: GridItemProps;
34
38
  render?: (refs: DataTablePlusExposeRefs<P, D, R>, actions: DataTablePlusExposeActions<P, D>) => VNode;
@@ -1,4 +1,4 @@
1
- import { FullLoadingProps } from '.';
1
+ import { FullLoadingProps } from './index';
2
2
  declare function __VLS_template(): {
3
3
  attrs: Partial<{}>;
4
4
  slots: {
@@ -1,4 +1,4 @@
1
- import { PresetFormProps } from '.';
1
+ import { PresetFormProps } from './index';
2
2
  declare const _default: <V extends Record<string, any> = Record<string, any>>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
3
3
  props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
4
4
  readonly onValidated?: ((val: V) => any) | undefined;
@@ -8,14 +8,11 @@ declare const _default: <V extends Record<string, any> = Record<string, any>>(__
8
8
  formRef: import('vue').Ref<import('naive-ui').FormInst | undefined, import('naive-ui').FormInst | undefined>;
9
9
  formValue: import('vue').Ref<V, V>;
10
10
  formRules: Partial<Record<keyof V, import('naive-ui').FormItemRule | import('naive-ui').FormRules | import('naive-ui').FormItemRule[]>> | undefined;
11
- formProps: {
12
- ref: import('vue').Ref<import('naive-ui').FormInst | undefined, import('naive-ui').FormInst | undefined>;
13
- model: import('vue').Reactive<V>;
14
- rules: Partial<Record<keyof V, import('naive-ui').FormItemRule | import('naive-ui').FormRules | import('naive-ui').FormItemRule[]>> | undefined;
15
- };
16
11
  };
17
12
  actions: {
18
- validate: () => Promise<unknown[]> | undefined;
13
+ validate: () => Promise<{
14
+ warnings?: import('async-validator').ValidateError[][];
15
+ }>;
19
16
  resetValidation: () => void;
20
17
  resetForm: () => void;
21
18
  reset: () => void;
@@ -31,14 +28,11 @@ declare const _default: <V extends Record<string, any> = Record<string, any>>(__
31
28
  formRef: import('vue').Ref<import('naive-ui').FormInst | undefined, import('naive-ui').FormInst | undefined>;
32
29
  formValue: import('vue').Ref<V, V>;
33
30
  formRules: Partial<Record<keyof V, import('naive-ui').FormItemRule | import('naive-ui').FormRules | import('naive-ui').FormItemRule[]>> | undefined;
34
- formProps: {
35
- ref: import('vue').Ref<import('naive-ui').FormInst | undefined, import('naive-ui').FormInst | undefined>;
36
- model: import('vue').Reactive<V>;
37
- rules: Partial<Record<keyof V, import('naive-ui').FormItemRule | import('naive-ui').FormRules | import('naive-ui').FormItemRule[]>> | undefined;
38
- };
39
31
  };
40
32
  actions: {
41
- validate: () => Promise<unknown[]> | undefined;
33
+ validate: () => Promise<{
34
+ warnings?: import('async-validator').ValidateError[][];
35
+ }>;
42
36
  resetValidation: () => void;
43
37
  resetForm: () => void;
44
38
  reset: () => void;
@@ -52,14 +46,11 @@ declare const _default: <V extends Record<string, any> = Record<string, any>>(__
52
46
  formRef: import('vue').Ref<import('naive-ui').FormInst | undefined, import('naive-ui').FormInst | undefined>;
53
47
  formValue: import('vue').Ref<V, V>;
54
48
  formRules: Partial<Record<keyof V, import('naive-ui').FormItemRule | import('naive-ui').FormRules | import('naive-ui').FormItemRule[]>> | undefined;
55
- formProps: {
56
- ref: import('vue').Ref<import('naive-ui').FormInst | undefined, import('naive-ui').FormInst | undefined>;
57
- model: import('vue').Reactive<V>;
58
- rules: Partial<Record<keyof V, import('naive-ui').FormItemRule | import('naive-ui').FormRules | import('naive-ui').FormItemRule[]>> | undefined;
59
- };
60
49
  };
61
50
  actions: {
62
- validate: () => Promise<unknown[]> | undefined;
51
+ validate: () => Promise<{
52
+ warnings?: import('async-validator').ValidateError[][];
53
+ }>;
63
54
  resetValidation: () => void;
64
55
  resetForm: () => void;
65
56
  reset: () => void;
@@ -73,14 +64,11 @@ declare const _default: <V extends Record<string, any> = Record<string, any>>(__
73
64
  formRef: import('vue').Ref<import('naive-ui').FormInst | undefined, import('naive-ui').FormInst | undefined>;
74
65
  formValue: import('vue').Ref<V, V>;
75
66
  formRules: Partial<Record<keyof V, import('naive-ui').FormItemRule | import('naive-ui').FormRules | import('naive-ui').FormItemRule[]>> | undefined;
76
- formProps: {
77
- ref: import('vue').Ref<import('naive-ui').FormInst | undefined, import('naive-ui').FormInst | undefined>;
78
- model: import('vue').Reactive<V>;
79
- rules: Partial<Record<keyof V, import('naive-ui').FormItemRule | import('naive-ui').FormRules | import('naive-ui').FormItemRule[]>> | undefined;
80
- };
81
67
  };
82
68
  actions: {
83
- validate: () => Promise<unknown[]> | undefined;
69
+ validate: () => Promise<{
70
+ warnings?: import('async-validator').ValidateError[][];
71
+ }>;
84
72
  resetValidation: () => void;
85
73
  resetForm: () => void;
86
74
  reset: () => void;
@@ -1,15 +1,19 @@
1
- import { FlexProps, FormItemRule, FormProps, FormRules, GridItemProps, GridProps } from 'naive-ui';
2
- import { VNode } from 'vue';
3
- import { NaiveFormReturns, NaiveFormRules } from '../../composables';
1
+ import { FlexProps, FormItemProps, FormItemRule, FormProps, FormRules, GridItemProps, GridProps } from 'naive-ui';
2
+ import { CSSProperties, VNode } from 'vue';
3
+ import { NaiveFormClearRules, NaiveFormReturns, NaiveFormRules } from '../../composables/useNaiveForm';
4
4
  import { PresetInputOptions } from '../preset-input';
5
- export type { NaiveFormRules } from '../../composables';
5
+ export type { NaiveFormRules } from '../../';
6
6
  export { default as NPresetForm } from './PresetForm.vue';
7
- export type PresetFormExposeRefs<V extends Record<string, any>> = Pick<NaiveFormReturns<V>, 'formValue' | 'formRef' | 'formRules' | 'formProps'> & {};
8
- export type PresetFormExposeActions<V extends Record<string, any>> = Pick<NaiveFormReturns<V>, 'validate' | 'resetValidation' | 'resetForm' | 'reset' | 'clear' | 'onValidated'> & {
7
+ export type PresetFormExposeRefs<V extends Record<string, any> = Record<string, any>> = Pick<NaiveFormReturns<V>, 'formValue' | 'formRef' | 'formRules'>;
8
+ export type PresetFormExposeActions<V extends Record<string, any> = Record<string, any>> = Pick<NaiveFormReturns<V>, 'validate' | 'resetValidation' | 'resetForm' | 'reset' | 'clear' | 'onValidated'> & {
9
9
  setValues: (value: Partial<V>) => void;
10
10
  };
11
- export type PresetFormOptions<V extends Record<string, any>> = (PresetInputOptions & {
11
+ export type PresetFormOptions<V extends Record<string, any> = Record<string, any>> = (PresetInputOptions & {
12
12
  key?: keyof V;
13
+ label?: string | boolean | (FormItemProps & {
14
+ style?: CSSProperties;
15
+ class?: string;
16
+ });
13
17
  rules?: FormRules | FormItemRule | FormItemRule[];
14
18
  collapsed?: boolean;
15
19
  gridItemProps?: GridItemProps;
@@ -19,6 +23,7 @@ export interface PresetFormProps<V extends Record<string, any> = Record<string,
19
23
  options?: PresetFormOptions<V>;
20
24
  values?: V;
21
25
  rules?: NaiveFormRules<V>;
26
+ clearRules?: NaiveFormClearRules;
22
27
  formProps?: FormProps;
23
28
  gridProps?: GridProps;
24
29
  flexProps?: FlexProps;
@@ -1,4 +1,4 @@
1
- import { PresetInputProps } from '.';
1
+ import { PresetInputProps } from './index';
2
2
  declare const _default: <V>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
3
3
  props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
4
4
  readonly "onUpdate:value"?: ((val?: V | undefined) => any) | undefined;
@@ -3,6 +3,6 @@ import { CSSProperties, VNode } from 'vue';
3
3
  export declare function renderLabel(children: VNode, label?: string | boolean | (FormItemProps & {
4
4
  style?: CSSProperties;
5
5
  class?: string;
6
- }), path?: string): VNode<import('vue').RendererNode, import('vue').RendererElement, {
6
+ }), defaultProps?: FormItemProps): VNode<import('vue').RendererNode, import('vue').RendererElement, {
7
7
  [key: string]: any;
8
8
  }>;
@@ -1,6 +1,6 @@
1
- import { ButtonProps, CheckboxGroupProps, CheckboxProps, ColorPickerProps, DatePickerProps, DynamicTagsProps, FormItemProps, InputNumberProps, InputProps, RadioGroupProps, RadioProps, RateProps, SelectProps, SliderProps, SwitchProps, TimePickerProps } from 'naive-ui';
1
+ import { ButtonProps, CheckboxGroupProps, CheckboxProps, ColorPickerProps, DatePickerProps, DividerProps, DynamicTagsProps, InputNumberProps, InputProps, RadioGroupProps, RadioProps, RateProps, SelectProps, SliderProps, SwitchProps, TimePickerProps } from 'naive-ui';
2
2
  import { CSSProperties } from 'vue';
3
- import { SearchInputProps } from '..';
3
+ import { SearchInputProps } from '../search-input/index';
4
4
  export { default as NPresetInput } from './PresetInput.vue';
5
5
  export interface PresetInputType {
6
6
  'button': ButtonProps;
@@ -8,6 +8,7 @@ export interface PresetInputType {
8
8
  'checkbox': CheckboxGroupProps & {
9
9
  options?: CheckboxProps[];
10
10
  };
11
+ 'divider ': DividerProps;
11
12
  'date-picker': DatePickerProps;
12
13
  'dynamic-tags': DynamicTagsProps;
13
14
  'input': InputProps;
@@ -25,10 +26,6 @@ export interface PresetInputType {
25
26
  export type PresetInputOptions = {
26
27
  [K in keyof PresetInputType]: {
27
28
  type?: K;
28
- label?: string | boolean | (FormItemProps & {
29
- style?: CSSProperties;
30
- class?: string;
31
- });
32
29
  props?: PresetInputType[K] & {
33
30
  style?: CSSProperties;
34
31
  class?: string;
@@ -37,6 +34,5 @@ export type PresetInputOptions = {
37
34
  }[keyof PresetInputType];
38
35
  export interface PresetInputProps<V> {
39
36
  value?: V;
40
- path?: string;
41
37
  options?: PresetInputOptions;
42
38
  }
@@ -1,5 +1,5 @@
1
1
  import { SelectOption } from 'naive-ui';
2
- import { PresetSelectExposeActions, PresetSelectExposeRefs, PresetSelectProps, PresetSelectValue } from '.';
2
+ import { PresetSelectExposeActions, PresetSelectExposeRefs, PresetSelectProps, PresetSelectValue } from './index';
3
3
  declare const _default: <V extends PresetSelectValue = null, P extends Record<string, any> = Record<string, any>, D extends Record<string, any> = Record<string, any>, R extends Record<string, any> = Record<string, any>>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
4
4
  props: __VLS_PrettifyLocal<any & PresetSelectProps<V, P, D, R> & Partial<{}>> & import('vue').PublicProps;
5
5
  expose(exposed: import('vue').ShallowUnwrapRef<{
@@ -1,4 +1,4 @@
1
- import { RemoteRequestProps } from '.';
1
+ import { RemoteRequestProps } from './index';
2
2
  declare const _default: <P extends Record<string, any> = Record<string, any>, D extends Record<string, any> = Record<string, any>>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
3
3
  props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
4
4
  readonly onError?: ((err: Error, params: P[]) => any) | undefined;
@@ -1,4 +1,4 @@
1
- import { SearchInputProps } from '.';
1
+ import { SearchInputProps } from './index';
2
2
  declare function __VLS_template(): {
3
3
  attrs: Partial<{}>;
4
4
  slots: {
@@ -1,4 +1,4 @@
1
- import { TooltipButtonProps } from '.';
1
+ import { TooltipButtonProps } from './index';
2
2
  declare function __VLS_template(): {
3
3
  attrs: Partial<{}>;
4
4
  slots: {
@@ -1,4 +1,4 @@
1
- import { TransitionProps } from '.';
1
+ import { TransitionProps } from './index';
2
2
  declare function __VLS_template(): {
3
3
  attrs: Partial<{}>;
4
4
  slots: {
@@ -1,4 +1,4 @@
1
- import { TypeWriterProps } from '.';
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
4
  update: (v: {