@oiij/naive-ui 0.0.4 → 0.0.5

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.
@@ -1,4 +1,4 @@
1
- import { BubbleProps } from './index';
1
+ import { BubbleProps } from '.';
2
2
  declare function __VLS_template(): {
3
3
  attrs: Partial<{}>;
4
4
  slots: {
@@ -1,4 +1,4 @@
1
- import { ConfigProvidersProps } from './index';
1
+ import { ConfigProvidersProps } from '.';
2
2
  declare function __VLS_template(): {
3
3
  attrs: Partial<{}>;
4
4
  slots: {
@@ -1,4 +1,4 @@
1
- import { CopyButtonProps } from './index';
1
+ import { CopyButtonProps } from '.';
2
2
  declare function __VLS_template(): {
3
3
  attrs: Partial<{}>;
4
4
  slots: {
@@ -1,16 +1,18 @@
1
- import { DataTableBaseColumn, DataTableColumns, DataTableFilterState, DataTableInst, DataTableProps, DataTableSortState, DropdownOption, PaginationProps } from 'naive-ui';
1
+ import { DataTableBaseColumn, DataTableColumns, DataTableFilterState, DataTableProps, DataTableSortState, DropdownOption, GridProps, PaginationProps } from 'naive-ui';
2
2
  import { CSSProperties } from 'vue';
3
3
  import { UseRequestOptions, UseRequestPlugin } from 'vue-hooks-plus/es/useRequest/types';
4
- import { ClickRowType, ContextMenuSelectType, DataTableFilterOptions } from './index';
4
+ import { ContextMenuSelectType, DataTablePlusClickRowType, DataTablePlusExposeActions, DataTablePlusExposeRefs, DataTablePlusFields, DataTablePlusFilterOptions } from '.';
5
5
  declare const _default: <P extends Record<string, any>, D extends Record<string, any>, R extends 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<{
6
6
  props: __VLS_PrettifyLocal<any & {
7
7
  api: (params: P) => Promise<D>;
8
8
  defaultParams?: P;
9
+ manual?: boolean;
9
10
  columns?: DataTableColumns<R>;
10
- filterOptions?: DataTableFilterOptions<P, D>;
11
+ filterOptions?: DataTablePlusFilterOptions<P, D, R>;
12
+ filterGridProps?: GridProps;
11
13
  contextMenuOptions?: DropdownOption[];
12
- fields?: Record<"page" | "pageSize" | "filter" | "sorter" | "list" | "count" | "rowKey", string>;
13
- pagination?: Omit<PaginationProps, "page" | "pageSize">;
14
+ fields?: DataTablePlusFields;
15
+ pagination?: Omit<PaginationProps, "page" | "pageSize"> | boolean;
14
16
  dataTableProps?: DataTableProps;
15
17
  requestOptions?: UseRequestOptions<D, P[]>;
16
18
  requestPlugins?: UseRequestPlugin<D, P[]>[];
@@ -18,50 +20,32 @@ declare const _default: <P extends Record<string, any>, D extends Record<string,
18
20
  customClass?: string;
19
21
  } & Partial<{}>> & import('vue').PublicProps;
20
22
  expose(exposed: import('vue').ShallowUnwrapRef<{
21
- data: Readonly<import('vue').Ref<D | undefined, D | undefined>>;
22
- params: Readonly<import('vue').Ref<[] | P[], [] | P[]>>;
23
- error: Readonly<import('vue').Ref<Error | undefined, Error | undefined>>;
24
- actions: {
25
- run: (_params: Partial<P>) => void;
26
- runAsync: (_params: Partial<P>) => Promise<D>;
27
- refresh: () => void;
28
- refreshAsync: () => Promise<D>;
29
- cancel: () => void;
30
- mutate: (data?: D | ((oldData?: D | undefined) => D | undefined) | undefined) => void;
31
- setParams: (_params: Partial<P>) => void;
32
- };
33
- dataTableRef: Readonly<import('vue').ShallowRef<DataTableInst | null>>;
23
+ refs: DataTablePlusExposeRefs<P, D, R>;
24
+ actions: DataTablePlusExposeActions<P, D>;
34
25
  }>): void;
35
26
  attrs: any;
36
27
  slots: {
37
28
  filter?(_: {
38
- params: P;
39
- data: D | undefined;
40
- actions: {
41
- run: (_params: Partial<P>) => void;
42
- runAsync: (_params: Partial<P>) => Promise<D>;
43
- refresh: () => void;
44
- refreshAsync: () => Promise<D>;
45
- cancel: () => void;
46
- mutate: (data?: D | ((oldData?: D | undefined) => D | undefined) | undefined) => void;
47
- setParams: (_params: Partial<P>) => void;
48
- };
49
- dataTableRef: DataTableInst | null;
29
+ refs: DataTablePlusExposeRefs<P, D, R>;
30
+ actions: DataTablePlusExposeActions<P, D>;
50
31
  }): any;
51
32
  };
52
33
  emit: {
53
- (e: "loaded", data: D): void;
54
- (e: "clickRow", data: ClickRowType<R>): void;
55
- (e: "contextMenuRow", data: ClickRowType<R>): void;
34
+ (e: "before", params: P[]): void;
35
+ (e: "success", data: D, params: P[]): void;
36
+ (e: "error", err: Error, params: P[]): void;
37
+ (e: "finally", params: P[], data?: D, err?: Error): void;
38
+ (e: "clickRow", data: DataTablePlusClickRowType<R>): void;
39
+ (e: "contextMenuRow", data: DataTablePlusClickRowType<R>): void;
56
40
  (e: "contextMenuSelect", data: ContextMenuSelectType<R>): void;
57
- (e: "load", rowData: object): Promise<void>;
41
+ (e: "load", row: R): Promise<void>;
58
42
  (e: "scroll", ev: Event): void;
59
- (e: "update:checkedRowKeys", keys: (number | string)[], rows: object[], meta: {
60
- row: object | undefined;
43
+ (e: "update:checkedRowKeys", keys: keyof R_1[], rows: R[], meta: {
44
+ row: R | undefined;
61
45
  action: "check" | "uncheck" | "checkAll" | "uncheckAll";
62
46
  }): void;
63
- (e: "update:expandedRowKeys", keys: (number | string)[]): void;
64
- (e: "update:filters", filters: DataTableFilterState, initiatorColumn: DataTableBaseColumn): void;
47
+ (e: "update:expandedRowKeys", keys: R[]): void;
48
+ (e: "update:filters", filterState: DataTableFilterState, sourceColumn: DataTableBaseColumn<import('naive-ui/es/data-table/src/interface').InternalRowData>): void;
65
49
  (e: "update:sorter", options: DataTableSortState | DataTableSortState[] | null): void;
66
50
  (e: "update:page", page: number): void;
67
51
  (e: "update:pageSize", pageSize: number): void;
@@ -1,47 +1,38 @@
1
- import { DataTableInst, DatePickerProps, DropdownOption, FormItemProps, InputProps, SelectProps, SwitchProps, TimePickerProps } from 'naive-ui';
2
- import { CSSProperties, VNode } from 'vue';
3
- import { SearchInputProps } from '../index';
1
+ import { DataTableInst, DropdownOption, GridItemProps } from 'naive-ui';
2
+ import { ComputedRef, Ref, ShallowRef, VNode } from 'vue';
3
+ import { useRequestResult } from 'vue-hooks-plus/es/useRequest/types';
4
+ import { PresetInputOptions } from '../preset-input';
4
5
  export { default as NDataTablePlus } from './DataTablePlus.vue';
5
- interface FilterTypeProps {
6
- 'date-picker': DatePickerProps;
7
- 'input': InputProps;
8
- 'search': SearchInputProps;
9
- 'select': SelectProps;
10
- 'switch': SwitchProps;
11
- 'time-picker': TimePickerProps;
12
- }
13
- interface Actions<P extends Record<string, any>, D extends Record<string, any>> {
6
+ export interface DataTablePlusExposeActions<P extends Record<string, any>, D extends Record<string, any>> {
14
7
  run: (params: P) => void;
15
8
  runAsync: (params: P) => Promise<D>;
16
9
  refresh: () => void;
17
10
  refreshAsync: () => Promise<D>;
18
11
  cancel: () => void;
19
12
  mutate: (data?: D | ((oldData?: D | undefined) => D | undefined) | undefined) => void;
20
- setParams: (params: P) => void;
13
+ setParam: (params: Partial<P>) => void;
14
+ runParam: (params: Partial<P>) => void;
15
+ runParamAsync: (params: Partial<P>) => Promise<D>;
16
+ }
17
+ export interface DataTablePlusPagination {
18
+ page: number;
19
+ pageSize: number;
20
+ itemCount: number;
21
21
  }
22
- export type DataTableFilterOptions<P extends Record<string, any>, D extends Record<string, any>> = {
23
- [K in keyof FilterTypeProps]: {
24
- key?: keyof P;
25
- title?: string;
26
- type?: K;
27
- collapsed?: boolean;
28
- props?: FilterTypeProps[K] & {
29
- style?: CSSProperties;
30
- class?: string;
31
- };
32
- labelProps?: FormItemProps & {
33
- style?: CSSProperties;
34
- class?: string;
35
- };
36
- render?: (opt: {
37
- params: P;
38
- data?: D;
39
- actions: Actions<P, D>;
40
- dataTableRef: DataTableInst | null;
41
- }) => VNode;
42
- };
43
- }[keyof FilterTypeProps][];
44
- export interface ClickRowType<R extends Record<string, any>> {
22
+ export type DataTablePlusExposeRefsBase<P extends Record<string, any>, D extends Record<string, any>, R extends Record<string, any>> = Pick<useRequestResult<D, P[], false, false>, 'loading' | 'data' | 'error' | 'params'> & {
23
+ pagination: Readonly<Ref<DataTablePlusPagination, DataTablePlusPagination>>;
24
+ rawList: ComputedRef<R[]>;
25
+ };
26
+ export type DataTablePlusExposeRefs<P extends Record<string, any>, D extends Record<string, any>, R extends Record<string, any>> = DataTablePlusExposeRefsBase<P, D, R> & {
27
+ dataTableRef: Readonly<ShallowRef<DataTableInst | null>>;
28
+ };
29
+ export type DataTablePlusFilterOptions<P extends Record<string, any>, D extends Record<string, any>, R extends Record<string, any>> = (PresetInputOptions & {
30
+ key?: keyof P;
31
+ collapsed?: boolean;
32
+ gridItemProps?: GridItemProps;
33
+ render?: (refs: DataTablePlusExposeRefs<P, D, R>, actions: DataTablePlusExposeActions<P, D>) => VNode;
34
+ })[];
35
+ export interface DataTablePlusClickRowType<R extends Record<string, any>> {
45
36
  row: R;
46
37
  index: number;
47
38
  event: MouseEvent;
@@ -51,3 +42,9 @@ export interface ContextMenuSelectType<R extends Record<string, any>> {
51
42
  option: DropdownOption;
52
43
  row?: R;
53
44
  }
45
+ export type DataTablePlusFields = Partial<Record<'page' | 'pageSize' | 'filter' | 'sorter' | 'list' | 'count' | 'rowKey', string>>;
46
+ export type OnUpdateCheckedRowKeysParams<R extends Record<string, any>> = (keys: keyof R[], rows: R[], meta: {
47
+ row: R | undefined;
48
+ action: 'check' | 'uncheck' | 'checkAll' | 'uncheckAll';
49
+ }) => void;
50
+ export type OnUpdateExpandedRowKeysParams<R extends Record<string, any>> = (keys: R[]) => void;
@@ -2,6 +2,10 @@ export * from './bubble';
2
2
  export * from './config-providers';
3
3
  export * from './copy-button';
4
4
  export * from './data-table-plus';
5
+ export * from './preset-form';
6
+ export * from './preset-input';
7
+ export * from './preset-select';
8
+ export * from './remote-request';
5
9
  export * from './search-input';
6
10
  export * from './toggle-editor';
7
11
  export * from './tooltip-button';
@@ -0,0 +1,68 @@
1
+ import { FormProps, GridProps } from 'naive-ui';
2
+ import { PresetFormOptions } from '.';
3
+ import { NaiveFormRules } from '../../composables';
4
+ declare const _default: <V extends 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
+ props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
6
+ readonly onValidated?: ((val: V) => any) | undefined;
7
+ } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, "onValidated"> & {
8
+ options?: PresetFormOptions<V>;
9
+ values?: V;
10
+ rules: NaiveFormRules<V>;
11
+ formProps?: FormProps;
12
+ gridProps?: GridProps;
13
+ } & Partial<{}>> & import('vue').PublicProps;
14
+ expose(exposed: import('vue').ShallowUnwrapRef<{
15
+ refs: {
16
+ formRef: import('vue').Ref<import('naive-ui').FormInst | undefined, import('naive-ui').FormInst | undefined>;
17
+ formValue: import('vue').Ref<V, V>;
18
+ formRules: Partial<Record<keyof V, import('naive-ui').FormItemRule | import('naive-ui').FormRules | import('naive-ui').FormItemRule[]>> | undefined;
19
+ formProps: {
20
+ ref: import('vue').Ref<import('naive-ui').FormInst | undefined, import('naive-ui').FormInst | undefined>;
21
+ model: import('vue').Reactive<V>;
22
+ rules: Partial<Record<keyof V, import('naive-ui').FormItemRule | import('naive-ui').FormRules | import('naive-ui').FormItemRule[]>> | undefined;
23
+ };
24
+ };
25
+ actions: {
26
+ validate: () => Promise<unknown[]> | undefined;
27
+ resetValidation: () => void;
28
+ resetForm: () => void;
29
+ reset: () => void;
30
+ clear: () => void;
31
+ onValidated: import('@vueuse/core').EventHookOn<[V]>;
32
+ setValue: (value: Partial<V>) => void;
33
+ };
34
+ }>): void;
35
+ attrs: any;
36
+ slots: {
37
+ header?(_: {}): any;
38
+ default?(_: {
39
+ refs: {
40
+ formRef: import('vue').Ref<import('naive-ui').FormInst | undefined, import('naive-ui').FormInst | undefined>;
41
+ formValue: import('vue').Ref<V, V>;
42
+ formRules: Partial<Record<keyof V, import('naive-ui').FormItemRule | import('naive-ui').FormRules | import('naive-ui').FormItemRule[]>> | undefined;
43
+ formProps: {
44
+ ref: import('vue').Ref<import('naive-ui').FormInst | undefined, import('naive-ui').FormInst | undefined>;
45
+ model: import('vue').Reactive<V>;
46
+ rules: Partial<Record<keyof V, import('naive-ui').FormItemRule | import('naive-ui').FormRules | import('naive-ui').FormItemRule[]>> | undefined;
47
+ };
48
+ };
49
+ actions: {
50
+ validate: () => Promise<unknown[]> | undefined;
51
+ resetValidation: () => void;
52
+ resetForm: () => void;
53
+ reset: () => void;
54
+ clear: () => void;
55
+ onValidated: import('@vueuse/core').EventHookOn<[V]>;
56
+ setValue: (value: Partial<V>) => void;
57
+ };
58
+ }): any;
59
+ footer?(_: {}): any;
60
+ };
61
+ emit: (e: "validated", val: V) => void;
62
+ }>) => import('vue').VNode & {
63
+ __ctx?: Awaited<typeof __VLS_setup>;
64
+ };
65
+ export default _default;
66
+ type __VLS_PrettifyLocal<T> = {
67
+ [K in keyof T]: T[K];
68
+ } & {};
@@ -0,0 +1,15 @@
1
+ import { GridItemProps } from 'naive-ui';
2
+ import { VNode } from 'vue';
3
+ import { NaiveFormReturns } from '../../composables';
4
+ import { PresetInputOptions } from '../preset-input';
5
+ export type { NaiveFormRules } from '../../composables';
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'> & {
9
+ setValue: (value: Partial<V>) => void;
10
+ };
11
+ export type PresetFormOptions<V extends Record<string, any>> = (PresetInputOptions & {
12
+ key?: keyof V;
13
+ gridItemProps?: GridItemProps;
14
+ render?: (refs: PresetFormExposeRefs<V>, actions: PresetFormExposeActions<V>) => VNode;
15
+ })[];
@@ -0,0 +1,20 @@
1
+ import { PresetInputOptions } from '.';
2
+ declare const _default: <V extends 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
+ props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
4
+ readonly "onUpdate:value"?: ((val?: V | undefined) => any) | undefined;
5
+ } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, "onUpdate:value"> & {
6
+ value?: V;
7
+ path?: string;
8
+ options?: PresetInputOptions;
9
+ } & Partial<{}>> & import('vue').PublicProps;
10
+ expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
11
+ attrs: any;
12
+ slots: {};
13
+ emit: (e: "update:value", val?: V) => void;
14
+ }>) => import('vue').VNode & {
15
+ __ctx?: Awaited<typeof __VLS_setup>;
16
+ };
17
+ export default _default;
18
+ type __VLS_PrettifyLocal<T> = {
19
+ [K in keyof T]: T[K];
20
+ } & {};
@@ -0,0 +1,26 @@
1
+ import { ButtonProps, DatePickerProps, FormItemProps, InputProps, SelectProps, SwitchProps, TimePickerProps } from 'naive-ui';
2
+ import { CSSProperties } from 'vue';
3
+ import { SearchInputProps } from '..';
4
+ export { default as NPresetInput } from './PresetInput.vue';
5
+ interface PresetInputType {
6
+ 'date-picker': DatePickerProps;
7
+ 'input': InputProps;
8
+ 'search': SearchInputProps;
9
+ 'select': SelectProps;
10
+ 'switch': SwitchProps;
11
+ 'time-picker': TimePickerProps;
12
+ 'button': ButtonProps;
13
+ }
14
+ export type PresetInputOptions = {
15
+ [K in keyof PresetInputType]: {
16
+ type?: K;
17
+ label?: string | boolean | (FormItemProps & {
18
+ style?: CSSProperties;
19
+ class?: string;
20
+ });
21
+ props?: PresetInputType[K] & {
22
+ style?: CSSProperties;
23
+ class?: string;
24
+ };
25
+ };
26
+ }[keyof PresetInputType];
@@ -0,0 +1,51 @@
1
+ import { PaginationProps, SelectOption, SelectProps } from 'naive-ui';
2
+ import { UseRequestOptions, UseRequestPlugin } from 'vue-hooks-plus/es/useRequest/types';
3
+ import { OptionFormat, PresetSelectExposeActions, PresetSelectExposeRefs, PresetSelectFields, PresetSelectValue } from '.';
4
+ declare const _default: <P extends Record<string, any>, D extends Record<string, any>, R extends 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
+ props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
6
+ readonly onError?: ((err: Error, params: P[]) => any) | undefined;
7
+ readonly onSuccess?: ((data: D, params: P[]) => any) | undefined;
8
+ readonly "onUpdate:value"?: ((val: string | number | (string | number)[] | null, option: SelectOption | SelectOption[] | null, raw: R | R[] | null) => any) | undefined;
9
+ readonly onBefore?: ((params: P[]) => any) | undefined;
10
+ readonly "onUpdate:page"?: ((page: number) => any) | undefined;
11
+ readonly "onUpdate:pageSize"?: ((pageSize: number) => any) | undefined;
12
+ readonly onFinally?: ((params: P[], data?: D | undefined, err?: Error | undefined) => any) | undefined;
13
+ } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, "onError" | "onUpdate:value" | "onUpdate:page" | "onUpdate:pageSize" | "onBefore" | "onSuccess" | "onFinally"> & {
14
+ api: (params: P) => Promise<D>;
15
+ value?: PresetSelectValue;
16
+ fallbackLabel?: string;
17
+ defaultParams?: P;
18
+ manual?: boolean;
19
+ multiple?: boolean;
20
+ disabled?: boolean;
21
+ optionFormat?: OptionFormat<R>;
22
+ fields?: PresetSelectFields;
23
+ selectProps?: SelectProps;
24
+ pagination?: Omit<PaginationProps, "page" | "pageSize"> | boolean;
25
+ requestOptions?: UseRequestOptions<D, P[]>;
26
+ requestPlugins?: UseRequestPlugin<D, P[]>[];
27
+ } & Partial<{}>> & import('vue').PublicProps;
28
+ expose(exposed: import('vue').ShallowUnwrapRef<{
29
+ refs: PresetSelectExposeRefs<P, D, R>;
30
+ actions: PresetSelectExposeActions<P, D>;
31
+ }>): void;
32
+ attrs: any;
33
+ slots: {
34
+ action?(_: {}): any;
35
+ };
36
+ emit: {
37
+ (e: "before", params: P[]): void;
38
+ (e: "success", data: D, params: P[]): void;
39
+ (e: "error", err: Error, params: P[]): void;
40
+ (e: "finally", params: P[], data?: D, err?: Error): void;
41
+ (e: "update:value", val: string | number | (string | number)[] | null, option: SelectOption | SelectOption[] | null, raw: R | R[] | null): void;
42
+ (e: "update:page", page: number): void;
43
+ (e: "update:pageSize", pageSize: number): void;
44
+ };
45
+ }>) => import('vue').VNode & {
46
+ __ctx?: Awaited<typeof __VLS_setup>;
47
+ };
48
+ export default _default;
49
+ type __VLS_PrettifyLocal<T> = {
50
+ [K in keyof T]: T[K];
51
+ } & {};
@@ -0,0 +1,17 @@
1
+ import { SelectGroupOption, SelectInst, SelectOption } from 'naive-ui';
2
+ import { ShallowRef } from 'vue';
3
+ import { DataTablePlusExposeActions, DataTablePlusExposeRefsBase } from '../data-table-plus';
4
+ export { default as NPresetSelect } from './PresetSelect.vue';
5
+ export type OptionFormat<R extends Record<string, any>> = (row: R) => SelectOption | SelectGroupOption;
6
+ export type PresetSelectValue = string | number | (string | number)[] | null;
7
+ export type PresetSelectUpdateValue<R extends Record<string, any>> = (val: string | number | (string | number)[] | null, option: SelectOption | SelectOption[] | null, raw: R | R[] | null) => void;
8
+ export type PresetSelectFields = Partial<Record<'page' | 'pageSize' | 'search' | 'list' | 'count' | 'rowKey' | 'label' | 'value' | 'children', string>>;
9
+ export interface PresetSelectPagination {
10
+ page: number;
11
+ pageSize: number;
12
+ itemCount: number;
13
+ }
14
+ export type PresetSelectExposeRefs<P extends Record<string, any>, D extends Record<string, any>, R extends Record<string, any>> = DataTablePlusExposeRefsBase<P, D, R> & {
15
+ selectRef: Readonly<ShallowRef<SelectInst | null>>;
16
+ };
17
+ export type PresetSelectExposeActions<P extends Record<string, any>, D extends Record<string, any>> = DataTablePlusExposeActions<P, D>;
@@ -0,0 +1,70 @@
1
+ import { UseRequestOptions, UseRequestPlugin } from 'vue-hooks-plus/es/useRequest/types';
2
+ import { RemoteRequestFields } from '.';
3
+ declare const _default: <P extends Record<string, any>, D extends 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
+ props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
5
+ readonly onError?: ((err: Error, params: P[]) => any) | undefined;
6
+ readonly onSuccess?: ((data: D, params: P[]) => any) | undefined;
7
+ readonly onBefore?: ((params: P[]) => any) | undefined;
8
+ readonly onFinally?: ((params: P[], data?: D | undefined, err?: Error | undefined) => any) | undefined;
9
+ } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, "onError" | "onBefore" | "onSuccess" | "onFinally"> & {
10
+ api: (params: P) => Promise<D>;
11
+ defaultParams?: P;
12
+ manual?: boolean;
13
+ fields?: RemoteRequestFields;
14
+ requestOptions?: UseRequestOptions<D, P[]>;
15
+ requestPlugins?: UseRequestPlugin<D, P[]>[];
16
+ } & Partial<{}>> & import('vue').PublicProps;
17
+ expose(exposed: import('vue').ShallowUnwrapRef<{
18
+ refs: {
19
+ loading: Readonly<import('vue').Ref<boolean, boolean>>;
20
+ data: Readonly<import('vue').Ref<D | undefined, D | undefined>>;
21
+ error: Readonly<import('vue').Ref<Error | undefined, Error | undefined>>;
22
+ params: Readonly<import('vue').Ref<[] | P[], [] | P[]>>;
23
+ };
24
+ actions: {
25
+ run: (...params: P[]) => void;
26
+ runAsync: (...params: P[]) => Promise<D>;
27
+ refresh: () => void;
28
+ refreshAsync: () => Promise<D>;
29
+ cancel: () => void;
30
+ mutate: (data?: D | ((oldData?: D | undefined) => D | undefined) | undefined) => void;
31
+ setParam: (_params: Partial<P>) => void;
32
+ runParam: (_params: Partial<P>) => void;
33
+ runParamAsync: (_params: Partial<P>) => Promise<D>;
34
+ };
35
+ }>): void;
36
+ attrs: any;
37
+ slots: {
38
+ default?(_: {
39
+ refs: {
40
+ loading: Readonly<import('vue').Ref<boolean, boolean>>;
41
+ data: Readonly<import('vue').Ref<D | undefined, D | undefined>>;
42
+ error: Readonly<import('vue').Ref<Error | undefined, Error | undefined>>;
43
+ params: Readonly<import('vue').Ref<[] | P[], [] | P[]>>;
44
+ };
45
+ actions: {
46
+ run: (...params: P[]) => void;
47
+ runAsync: (...params: P[]) => Promise<D>;
48
+ refresh: () => void;
49
+ refreshAsync: () => Promise<D>;
50
+ cancel: () => void;
51
+ mutate: (data?: D | ((oldData?: D | undefined) => D | undefined) | undefined) => void;
52
+ setParam: (_params: Partial<P>) => void;
53
+ runParam: (_params: Partial<P>) => void;
54
+ runParamAsync: (_params: Partial<P>) => Promise<D>;
55
+ };
56
+ }): any;
57
+ };
58
+ emit: {
59
+ (e: "before", params: P[]): void;
60
+ (e: "success", data: D, params: P[]): void;
61
+ (e: "error", err: Error, params: P[]): void;
62
+ (e: "finally", params: P[], data?: D, err?: Error): void;
63
+ };
64
+ }>) => import('vue').VNode & {
65
+ __ctx?: Awaited<typeof __VLS_setup>;
66
+ };
67
+ export default _default;
68
+ type __VLS_PrettifyLocal<T> = {
69
+ [K in keyof T]: T[K];
70
+ } & {};
@@ -0,0 +1,2 @@
1
+ export { default as NRemoteRequest } from './RemoteRequest.vue';
2
+ export type RemoteRequestFields = Partial<Record<string, string>>;
@@ -1,4 +1,4 @@
1
- import { SearchInputProps } from './index';
1
+ import { SearchInputProps } from '.';
2
2
  declare function __VLS_template(): {
3
3
  attrs: Partial<{}>;
4
4
  slots: {
@@ -1,4 +1,4 @@
1
- import { TooltipButtonProps } from './index';
1
+ import { TooltipButtonProps } from '.';
2
2
  declare function __VLS_template(): {
3
3
  attrs: Partial<{}>;
4
4
  slots: {
@@ -1,4 +1,4 @@
1
- import { TypeWriterProps } from './index';
1
+ import { TypeWriterProps } from '.';
2
2
  declare const _default: import('vue').DefineComponent<TypeWriterProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
3
3
  start: () => any;
4
4
  update: (v: {