@oiij/naive-ui 0.0.35 → 0.0.37

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.
@@ -22,9 +22,4 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
22
22
 
23
23
  //#endregion
24
24
 
25
- Object.defineProperty(exports, '__toESM', {
26
- enumerable: true,
27
- get: function () {
28
- return __toESM;
29
- }
30
- });
25
+ exports.__toESM = __toESM;
@@ -1,7 +1,26 @@
1
+ import { DataTableBaseColumn, DataTableFilterState, DataTableSortState } from 'naive-ui';
1
2
  import { RObject } from '../remote-request/index';
2
3
  import { DataTablePlusEmits, DataTablePlusExposeActions, DataTablePlusExposeRefs, DataTablePlusProps } from './index';
3
4
  declare const _default: <P extends RObject, D extends RObject, R extends RObject>(__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<any & DataTablePlusProps<P, D, R> & Partial<{}>> & import('vue').PublicProps;
5
+ props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
6
+ readonly onError?: ((err: Error, params: P[]) => any) | undefined;
7
+ readonly onLoad?: ((row: R) => any) | undefined;
8
+ readonly onScroll?: ((ev: Event) => any) | undefined;
9
+ readonly onSuccess?: ((data: D, params: P[]) => any) | undefined;
10
+ readonly onFinally?: ((params: P[], data?: D | undefined, err?: Error | undefined) => any) | undefined;
11
+ readonly onBefore?: ((params: P[]) => any) | undefined;
12
+ readonly onClickRow?: ((row: R, index: number, event: MouseEvent, currentData: R[]) => any) | undefined;
13
+ readonly onContextMenuRow?: ((row: R, index: number, event: MouseEvent, currentData: R[]) => any) | undefined;
14
+ readonly "onUpdate:checkedRowKeys"?: ((keys: (string | number)[], rows: (R | undefined)[], meta: {
15
+ row: R | undefined;
16
+ action: "check" | "uncheck" | "checkAll" | "uncheckAll";
17
+ }, currentData: R[]) => any) | undefined;
18
+ readonly "onUpdate:expandedRowKeys"?: ((keys: (string | number)[], currentData: R[]) => any) | undefined;
19
+ readonly "onUpdate:filters"?: ((filterState: DataTableFilterState, sourceColumn: DataTableBaseColumn) => any) | undefined;
20
+ readonly "onUpdate:sorter"?: ((options: DataTableSortState | DataTableSortState[] | null) => any) | undefined;
21
+ readonly "onUpdate:page"?: ((page: number) => any) | undefined;
22
+ readonly "onUpdate:pageSize"?: ((pageSize: number) => any) | undefined;
23
+ } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, "onLoad" | "onError" | "onScroll" | "onSuccess" | "onFinally" | "onBefore" | "onClickRow" | "onContextMenuRow" | "onUpdate:checkedRowKeys" | "onUpdate:expandedRowKeys" | "onUpdate:filters" | "onUpdate:sorter" | "onUpdate:page" | "onUpdate:pageSize"> & DataTablePlusProps<P, D, R> & Partial<{}>> & import('vue').PublicProps;
5
24
  expose(exposed: import('vue').ShallowUnwrapRef<{
6
25
  refs: DataTablePlusExposeRefs<P, D, R>;
7
26
  actions: DataTablePlusExposeActions<P, D>;
@@ -1,4 +1,4 @@
1
- import { DataTableColumns, DataTableInst, DataTableProps, DataTableSortState, DropdownOption, FlexProps, FormItemProps, GridItemProps, GridProps, PaginationProps } from 'naive-ui';
1
+ import { DataTableColumns, DataTableFilterState, DataTableInst, DataTableProps, DataTableSortState, DropdownOption, FlexProps, FormItemProps, GridItemProps, GridProps, PaginationProps } from 'naive-ui';
2
2
  import { FilterState, TableBaseColumn } from 'naive-ui/es/data-table/src/interface';
3
3
  import { ComputedRef, CSSProperties, Ref, ShallowRef, VNode } from 'vue';
4
4
  import { useRequestResult } from 'vue-hooks-plus/es/useRequest/types';
@@ -27,6 +27,8 @@ export type DataTablePlusExposeRefsBase<P extends RObject, D extends RObject, R
27
27
  rawList: ComputedRef<R[]>;
28
28
  };
29
29
  export type DataTablePlusExposeRefs<P extends RObject, D extends RObject, R extends RObject> = DataTablePlusExposeRefsBase<P, D, R> & {
30
+ filters: Ref<DataTableFilterState | undefined>;
31
+ sorters: Ref<Record<string, DataTableSortState> | undefined>;
30
32
  dataTableRef: Readonly<ShallowRef<DataTableInst | null>>;
31
33
  };
32
34
  export type DataTablePlusFilterOptions<P extends RObject, D extends RObject, R extends RObject> = (PresetInputOptions & {
@@ -52,6 +54,8 @@ export type DataTablePlusProps<P extends RObject, D extends RObject, R extends R
52
54
  fields?: DataTablePlusFields;
53
55
  search?: SearchInputProps | boolean;
54
56
  pagination?: Omit<PaginationProps, 'page' | 'pageSize'> | boolean;
57
+ columnsFilterOptions?: (filters: DataTableFilterState) => Record<string, any>;
58
+ columnsSorterOptions?: (sorters: Record<string, DataTableSortState>) => Record<string, any>;
55
59
  dataTableProps?: DataTableProps;
56
60
  customStyle?: CSSProperties;
57
61
  customClass?: string;
@@ -1,7 +1,17 @@
1
1
  import { RObject } from '../remote-request/index';
2
2
  import { PresetPickerEmits, PresetPickerExposeActions, PresetPickerExposeRefs, PresetPickerProps, PresetPickerValue } from './index';
3
3
  declare const _default: <V extends PresetPickerValue, R extends RObject>(__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<any & PresetPickerProps<V, R> & Partial<{}>> & import('vue').PublicProps;
4
+ props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
5
+ readonly onClose?: (() => any) | undefined;
6
+ readonly "onUpdate:value"?: ((val: V | null, raw: R | R[] | null) => any) | undefined;
7
+ readonly onAfterEnter?: (() => any) | undefined;
8
+ readonly onAfterLeave?: (() => any) | undefined;
9
+ readonly onEsc?: (() => any) | undefined;
10
+ readonly onMaskClick?: (() => any) | undefined;
11
+ readonly onNegativeClick?: (() => any) | undefined;
12
+ readonly onPositiveClick?: (() => any) | undefined;
13
+ readonly "onUpdate:show"?: ((value: boolean) => any) | undefined;
14
+ } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, "onAfterEnter" | "onAfterLeave" | "onUpdate:show" | "onUpdate:value" | "onClose" | "onEsc" | "onMaskClick" | "onNegativeClick" | "onPositiveClick"> & PresetPickerProps<V, R> & Partial<{}>> & import('vue').PublicProps;
5
15
  expose(exposed: import('vue').ShallowUnwrapRef<{
6
16
  refs: PresetPickerExposeRefs<R>;
7
17
  actions: PresetPickerExposeActions<R>;
@@ -1,7 +1,22 @@
1
+ import { SelectOption } from 'naive-ui';
1
2
  import { RObject } from '../remote-request/index';
2
3
  import { PresetSelectEmits, PresetSelectExposeActions, PresetSelectExposeRefs, PresetSelectProps, PresetSelectValue } from './index';
3
4
  declare const _default: <V extends PresetSelectValue, P extends RObject, D extends RObject, R extends RObject>(__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<any & PresetSelectProps<V, P, D, R> & Partial<{}>> & import('vue').PublicProps;
5
+ props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
6
+ readonly onBlur?: ((ev: FocusEvent) => any) | undefined;
7
+ readonly onError?: ((err: Error, params: P[]) => any) | undefined;
8
+ readonly onFocus?: ((ev: FocusEvent) => any) | undefined;
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
+ readonly onSuccess?: ((data: D, params: P[]) => any) | undefined;
14
+ readonly "onUpdate:value"?: ((val: V | null, option: SelectOption | SelectOption[] | null, raw: R | R[] | null) => any) | undefined;
15
+ readonly onFinally?: ((params: P[], data?: D | undefined, err?: Error | undefined) => any) | undefined;
16
+ readonly onBefore?: ((params: P[]) => any) | undefined;
17
+ readonly "onUpdate:page"?: ((page: number) => any) | undefined;
18
+ readonly "onUpdate:pageSize"?: ((pageSize: number) => any) | undefined;
19
+ } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, "onFocus" | "onBlur" | "onError" | "onScroll" | "onClear" | "onUpdate:value" | "onCreate" | "onSearch" | "onSuccess" | "onFinally" | "onBefore" | "onUpdate:page" | "onUpdate:pageSize"> & PresetSelectProps<V, P, D, R> & Partial<{}>> & import('vue').PublicProps;
5
20
  expose(exposed: import('vue').ShallowUnwrapRef<{
6
21
  refs: PresetSelectExposeRefs<P, D, R>;
7
22
  actions: PresetSelectExposeActions<P, D>;