ax-libs 0.0.5 → 0.0.6

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.
@@ -6,7 +6,6 @@ export * from './ui/useAxModal';
6
6
  export * from './ui/useAxFormModal';
7
7
  export * from './ui/useAxTable';
8
8
  export * from './ui/useAxForm';
9
- export * from './ui/useAxLayout';
10
9
  export * from './common/useComponentPool';
11
10
  export * from './common/useDefineProps';
12
11
  export * from './ui/exposed/useFormExposed';
@@ -12,7 +12,7 @@ type UseAxFormModalReturn<T extends Record<string, any>, R = any> = readonly [
12
12
  fieldsApi: ListApi<AxFormItemOptions<T>>;
13
13
  buttonApi: ListApi<AxButtonOptions>;
14
14
  requestApi: FetchApi<T, R>;
15
- close?: () => void;
15
+ close: () => void;
16
16
  open: () => void;
17
17
  } & FormApi
18
18
  ];
@@ -1,9 +1,9 @@
1
1
  import { AxButtonProps } from '../../..';
2
2
  import { ButtonProps } from 'element-plus';
3
- declare const __VLS_export: <T = ButtonProps>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
3
+ declare const __VLS_export: <T extends Record<string, any> = ButtonProps>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
4
4
  props: import('vue').PublicProps & __VLS_PrettifyLocal<AxButtonProps<T> & {
5
- onClick?: (() => any) | undefined;
6
- onDblclick?: (() => any) | undefined;
5
+ onClick?: ((data?: any) => any) | undefined;
6
+ onDblclick?: ((data?: any) => any) | undefined;
7
7
  }> & (typeof globalThis extends {
8
8
  __VLS_PROPS_FALLBACK: infer P;
9
9
  } ? P : {});
@@ -12,7 +12,7 @@ declare const __VLS_export: <T = ButtonProps>(__VLS_props: NonNullable<Awaited<t
12
12
  slots: {
13
13
  default?: (props: {}) => any;
14
14
  };
15
- emit: ((evt: "click") => void) & ((evt: "dblclick") => void);
15
+ emit: ((evt: "click", data?: any) => void) & ((evt: "dblclick", data?: any) => void);
16
16
  }>) => import('vue').VNode & {
17
17
  __ctx?: Awaited<typeof __VLS_setup>;
18
18
  };
@@ -1,7 +1,7 @@
1
1
  export * from './props';
2
- export declare const AxButton: <T = import('element-plus').ButtonProps>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: {
2
+ export declare const AxButton: <T extends Record<string, any> = import('element-plus').ButtonProps>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: {
3
3
  attrs: any;
4
- emit: ((evt: "click") => void) & ((evt: "dblclick") => void);
4
+ emit: ((evt: "click", data?: any) => void) & ((evt: "dblclick", data?: any) => void);
5
5
  slots: {
6
6
  default?: (props: {}) => any;
7
7
  };
@@ -12,8 +12,10 @@ export declare const AxButton: <T = import('element-plus').ButtonProps>(__VLS_pr
12
12
  text?: string | undefined;
13
13
  auth?: string | undefined;
14
14
  className?: string | undefined;
15
- onClick?: (() => any) | undefined;
16
- onDblclick?: (() => any) | undefined;
15
+ disabled?: ((data?: any) => boolean) | boolean | undefined;
16
+ hidden?: ((data?: any) => boolean) | boolean | undefined;
17
+ onClick?: ((data?: any) => any) | undefined;
18
+ onDblclick?: ((data?: any) => any) | undefined;
17
19
  } & (typeof globalThis extends {
18
20
  __VLS_PROPS_FALLBACK: infer P;
19
21
  } ? P : {});
@@ -22,7 +24,7 @@ export declare const AxButton: <T = import('element-plus').ButtonProps>(__VLS_pr
22
24
  slots: {
23
25
  default?: (props: {}) => any;
24
26
  };
25
- emit: ((evt: "click") => void) & ((evt: "dblclick") => void);
27
+ emit: ((evt: "click", data?: any) => void) & ((evt: "dblclick", data?: any) => void);
26
28
  }>) => import('vue').VNode & {
27
29
  __ctx?: Awaited<typeof __VLS_setup>;
28
30
  };
@@ -1,15 +1,17 @@
1
1
  import { ButtonProps } from 'element-plus';
2
2
  import { EmitsToProps } from '../../../../utils';
3
- export interface AxButtonProps<T = ButtonProps> {
3
+ export interface AxButtonProps<T extends Record<string, any> = ButtonProps> {
4
4
  type?: string;
5
5
  componentProps?: T;
6
6
  text?: string;
7
7
  auth?: string;
8
8
  className?: string;
9
+ disabled?: ((data?: any) => boolean) | boolean;
10
+ hidden?: ((data?: any) => boolean) | boolean;
9
11
  }
10
12
  export interface AxButtonEmits {
11
- 'click': [];
12
- 'dblclick': [];
13
+ 'click': [data?: any];
14
+ 'dblclick': [data?: any];
13
15
  }
14
16
  export interface AxButtonOptions extends AxButtonProps, EmitsToProps<AxButtonEmits> {
15
17
  }
@@ -2,4 +2,3 @@ export * from './button';
2
2
  export * from './form';
3
3
  export * from './modal';
4
4
  export * from './table';
5
- export * from './layout';
@@ -15,7 +15,6 @@ export declare const AxFormModal: <T extends Record<string, any>>(__VLS_props: N
15
15
  title?: string | undefined;
16
16
  appendTo?: (string | HTMLElement) | undefined;
17
17
  top?: string | undefined;
18
- zIndex?: number | undefined;
19
18
  transition?: import('element-plus').DialogTransition | undefined;
20
19
  direction?: "ltr" | "rtl" | "ttb" | "btt" | undefined;
21
20
  resizable?: boolean | undefined;
@@ -34,6 +33,7 @@ export declare const AxFormModal: <T extends Record<string, any>>(__VLS_props: N
34
33
  closeDelay?: number | undefined;
35
34
  modalClass?: string | undefined;
36
35
  width?: string | number | undefined;
36
+ zIndex?: number | undefined;
37
37
  trapFocus?: boolean | undefined;
38
38
  center?: boolean | undefined;
39
39
  alignCenter?: boolean | undefined;
@@ -0,0 +1,4 @@
1
+ import { ColumnActions } from './props.ts';
2
+ declare const __VLS_export: import('vue').DefineComponent<ColumnActions, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<ColumnActions> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
3
+ declare const _default: typeof __VLS_export;
4
+ export default _default;
@@ -0,0 +1,8 @@
1
+ import { AxButtonOptions } from '../../../..';
2
+ import { ListConfig } from '../../../../../hooks';
3
+ export interface ColumnActions extends Omit<ListConfig<AxButtonOptions>, 'key'> {
4
+ type?: 'button' | 'text';
5
+ buttonList?: AxButtonOptions[];
6
+ info?: any;
7
+ disabled?: ((data: any) => boolean) | boolean;
8
+ }
@@ -0,0 +1 @@
1
+ export declare const initTableColumns: () => void;
@@ -1,3 +1,5 @@
1
1
  import { TableColumnCtx } from 'element-plus';
2
2
  export interface AxTableColumnProps extends Partial<TableColumnCtx> {
3
+ type?: string;
4
+ componentProps?: Record<string, any>;
3
5
  }
@@ -1,4 +1,4 @@
1
- import { AxTableColumnProps } from './props';
1
+ import { AxTableColumnProps } from '../../..';
2
2
  declare const __VLS_export: import('vue').DefineComponent<AxTableColumnProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<AxTableColumnProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
3
3
  declare const _default: typeof __VLS_export;
4
4
  export default _default;
@@ -1 +1,3 @@
1
- export {};
1
+ import { Component } from 'vue';
2
+ export declare const columnFields: Record<string, Component>;
3
+ export declare const addColumnField: (type: string, component: Component) => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ax-libs",
3
- "version": "0.0.5",
3
+ "version": "0.0.6",
4
4
  "module": "./dist/ax-lib.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "private": false,
@@ -1,14 +0,0 @@
1
- import { Component } from 'vue';
2
- export interface AxLayoutOptions {
3
- type?: string;
4
- footer?: Component;
5
- header?: Component;
6
- main?: Component;
7
- aside?: Component;
8
- }
9
- export declare function useAxLayout(options?: AxLayoutOptions): readonly [import('vue').DefineComponent<{}, () => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
10
- [key: string]: any;
11
- }>, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>, {
12
- readonly setType: import('..').StateApi<string>;
13
- readonly setSlots: import('..').StateApi<import('lodash').Omit<AxLayoutOptions, "type">>;
14
- }];
@@ -1,19 +0,0 @@
1
- declare var __VLS_1: {}, __VLS_3: {}, __VLS_5: {}, __VLS_7: {};
2
- type __VLS_Slots = {} & {
3
- aside?: (props: typeof __VLS_1) => any;
4
- } & {
5
- header?: (props: typeof __VLS_3) => any;
6
- } & {
7
- main?: (props: typeof __VLS_5) => any;
8
- } & {
9
- footer?: (props: typeof __VLS_7) => any;
10
- };
11
- declare const __VLS_base: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
12
- declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
13
- declare const _default: typeof __VLS_export;
14
- export default _default;
15
- type __VLS_WithSlots<T, S> = T & {
16
- new (): {
17
- $slots: S;
18
- };
19
- };
@@ -1 +0,0 @@
1
- export declare const initLayoutFields: () => void;
@@ -1,19 +0,0 @@
1
- declare var __VLS_1: {}, __VLS_3: {}, __VLS_5: {}, __VLS_7: {};
2
- type __VLS_Slots = {} & {
3
- header?: (props: typeof __VLS_1) => any;
4
- } & {
5
- aside?: (props: typeof __VLS_3) => any;
6
- } & {
7
- main?: (props: typeof __VLS_5) => any;
8
- } & {
9
- footer?: (props: typeof __VLS_7) => any;
10
- };
11
- declare const __VLS_base: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
12
- declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
13
- declare const _default: typeof __VLS_export;
14
- export default _default;
15
- type __VLS_WithSlots<T, S> = T & {
16
- new (): {
17
- $slots: S;
18
- };
19
- };
@@ -1,18 +0,0 @@
1
- export declare const AxLayout: {
2
- new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('./props').AxLayoutProps> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
3
- P: {};
4
- B: {};
5
- D: {};
6
- C: {};
7
- M: {};
8
- Defaults: {};
9
- }, Readonly<import('./props').AxLayoutProps> & Readonly<{}>, {}, {}, {}, {}, {}>;
10
- __isFragment?: never;
11
- __isTeleport?: never;
12
- __isSuspense?: never;
13
- } & import('vue').ComponentOptionsBase<Readonly<import('./props').AxLayoutProps> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
14
- $slots: {
15
- [x: string]: ((props: {}) => any) | undefined;
16
- };
17
- });
18
- export default AxLayout;
@@ -1,14 +0,0 @@
1
- import { AxLayoutProps } from './props';
2
- declare var __VLS_10: string, __VLS_11: {};
3
- type __VLS_Slots = {} & {
4
- [K in NonNullable<typeof __VLS_10>]?: (props: typeof __VLS_11) => any;
5
- };
6
- declare const __VLS_base: import('vue').DefineComponent<AxLayoutProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<AxLayoutProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
7
- declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
8
- declare const _default: typeof __VLS_export;
9
- export default _default;
10
- type __VLS_WithSlots<T, S> = T & {
11
- new (): {
12
- $slots: S;
13
- };
14
- };
@@ -1,3 +0,0 @@
1
- export interface AxLayoutProps {
2
- type?: string;
3
- }
@@ -1,3 +0,0 @@
1
- export * from './util';
2
- export * from './components/layout';
3
- export * from './components/fields';
@@ -1,3 +0,0 @@
1
- import { Component } from 'vue';
2
- export declare const layoutFields: Record<string, Component>;
3
- export declare const addLayoutField: (name: string, component: Component) => void;
@@ -1,4 +0,0 @@
1
- /**
2
- * 平展树形对象
3
- * */
4
- export declare const flattenTree: <T>(treeData: T[], childrenKey?: keyof T) => T[];