@aplus-frontend/ui 0.4.24 → 0.4.25

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 (52) hide show
  1. package/es/src/ap-form/ap-form.vue.d.ts +1 -2
  2. package/es/src/ap-form/drawer-form/index.vue.d.ts +3 -4
  3. package/es/src/ap-form/modal-form/index.vue.d.ts +3 -4
  4. package/es/src/ap-form/search-form/index.vue.d.ts +3 -4
  5. package/es/src/ap-list/index.vue.d.ts +2 -4
  6. package/es/src/ap-table/ap-table.vue.d.ts +2 -4
  7. package/es/src/ap-table/hooks/use-table-column-state.d.ts +4 -4
  8. package/es/src/ap-upload/components/MultipleFile.vue.d.ts +1 -1
  9. package/es/src/ap-upload/components/Picture.vue.d.ts +2 -7
  10. package/es/src/business/ap-attachment/ApAttachment.mjs +31 -31
  11. package/es/src/business/ap-attachment/interface.d.ts +2 -2
  12. package/es/src/business/ap-batch-action-group/ApBatchActionGroup.vue.d.ts +6 -2
  13. package/es/src/business/ap-batch-action-group/ApBatchActionGroup.vue2.mjs +36 -32
  14. package/es/src/business/ap-batch-action-group/index.d.ts +16 -7
  15. package/es/src/business/ap-batch-action-group/interface.d.ts +5 -0
  16. package/es/src/business/ap-expand-alert/ApExpandAlert.vue.d.ts +2 -4
  17. package/es/src/business/ap-expand-alert/index.d.ts +4 -6
  18. package/es/src/business/ap-select-layout/index.d.ts +2 -4
  19. package/es/src/business/ap-select-layout/select-layout.vue.d.ts +2 -4
  20. package/es/src/editable-table/form-item.vue.d.ts +2 -4
  21. package/es/src/editable-table/index.vue.d.ts +2 -4
  22. package/es/src/scroll-view/index.vue.d.ts +5 -5
  23. package/es/src/tests/wrapper.d.ts +4 -4
  24. package/es/src/work-order-modal/work-order-modal.vue.d.ts +2 -3
  25. package/lib/src/ap-form/ap-form.vue.d.ts +1 -2
  26. package/lib/src/ap-form/drawer-form/index.vue.d.ts +3 -4
  27. package/lib/src/ap-form/modal-form/index.vue.d.ts +3 -4
  28. package/lib/src/ap-form/search-form/index.vue.d.ts +3 -4
  29. package/lib/src/ap-list/index.vue.d.ts +2 -4
  30. package/lib/src/ap-table/ap-table.vue.d.ts +2 -4
  31. package/lib/src/ap-table/hooks/use-table-column-state.d.ts +4 -4
  32. package/lib/src/ap-upload/components/MultipleFile.vue.d.ts +1 -1
  33. package/lib/src/ap-upload/components/Picture.vue.d.ts +2 -7
  34. package/lib/src/business/ap-attachment/ApAttachment.js +1 -1
  35. package/lib/src/business/ap-attachment/interface.d.ts +2 -2
  36. package/lib/src/business/ap-batch-action-group/ApBatchActionGroup.vue.d.ts +6 -2
  37. package/lib/src/business/ap-batch-action-group/ApBatchActionGroup.vue2.js +1 -1
  38. package/lib/src/business/ap-batch-action-group/index.d.ts +16 -7
  39. package/lib/src/business/ap-batch-action-group/interface.d.ts +5 -0
  40. package/lib/src/business/ap-expand-alert/ApExpandAlert.vue.d.ts +2 -4
  41. package/lib/src/business/ap-expand-alert/index.d.ts +4 -6
  42. package/lib/src/business/ap-select-layout/index.d.ts +2 -4
  43. package/lib/src/business/ap-select-layout/select-layout.vue.d.ts +2 -4
  44. package/lib/src/editable-table/form-item.vue.d.ts +2 -4
  45. package/lib/src/editable-table/index.vue.d.ts +2 -4
  46. package/lib/src/scroll-view/index.vue.d.ts +5 -5
  47. package/lib/src/tests/wrapper.d.ts +4 -4
  48. package/lib/src/work-order-modal/work-order-modal.vue.d.ts +2 -3
  49. package/package.json +3 -3
  50. package/theme/ap-scroll-bar/index.css +31 -0
  51. package/theme/ap-scroll-bar/index.less +39 -0
  52. package/index.ts +0 -19
@@ -1,5 +1,5 @@
1
1
  import { ApFormProps, WatchFunc, ApFormInternalInstance } from './interface';
2
- import { InternalNamePath, NamePath, ValidateOptions, FormLabelAlign, RuleObject, ValidateMessages, FieldData, ValidateErrorEntity } from '@aplus-frontend/antdv/es/form/interface';
2
+ import { InternalNamePath, NamePath, ValidateOptions, FormLabelAlign, ValidateMessages, FieldData, ValidateErrorEntity } from '@aplus-frontend/antdv/es/form/interface';
3
3
  import { Recordable } from '../type';
4
4
  import { CreateComponentPublicInstanceWithMixins, ExtractPropTypes, PropType, HTMLAttributes, ComponentOptionsMixin, PublicProps, GlobalComponents, GlobalDirectives, ComponentProvideOptions, DefineComponent } from 'vue';
5
5
  import { VueTypeDef, VueTypeValidableDef } from '../../node_modules/vue-types';
@@ -7,7 +7,6 @@ import { ColSize } from '@aplus-frontend/antdv/es/grid';
7
7
  import { RequiredMark } from '@aplus-frontend/antdv/es/form/Form';
8
8
  import { RuleObject } from '@aplus-frontend/antdv/es/form';
9
9
  import { Options } from '../../node_modules/scroll-into-view-if-needed';
10
- import { SizeType } from '@aplus-frontend/antdv/es/config-provider';
11
10
  import { SizeType } from '@aplus-frontend/antdv/es/button';
12
11
  import { VueNode } from '@aplus-frontend/antdv/es/_util/type';
13
12
  declare function __VLS_template(): {
@@ -1,6 +1,6 @@
1
1
  import { ApFormDrawerFormProps, CustomizeResizeType } from '../interface';
2
2
  import { VNode, ComponentInternalInstance, ExtractPropTypes, PropType, HTMLAttributes, VNodeProps, AllowedComponentProps, ComponentCustomProps, CreateComponentPublicInstanceWithMixins, ComponentOptionsMixin, PublicProps, GlobalComponents, GlobalDirectives, ComponentProvideOptions, Slot, ComponentPublicInstance, ComponentOptionsBase, DebuggerEvent, nextTick, WatchOptions, WatchStopHandle, ShallowUnwrapRef, ComponentCustomProperties, DefineComponent, CSSProperties } from 'vue';
3
- import { InternalNamePath, NamePath, ValidateOptions, ValidateMessages, FormLabelAlign, FieldData, ValidateErrorEntity, RuleObject } from '@aplus-frontend/antdv/es/form/interface';
3
+ import { InternalNamePath, NamePath, ValidateOptions, ValidateMessages, FormLabelAlign, FieldData, ValidateErrorEntity } from '@aplus-frontend/antdv/es/form/interface';
4
4
  import { ButtonSize, SizeType } from '@aplus-frontend/antdv/es/button';
5
5
  import { RequiredMark } from '@aplus-frontend/antdv/es/form/Form';
6
6
  import { ColSize } from '@aplus-frontend/antdv/es/grid';
@@ -8,7 +8,6 @@ import { RuleObject } from '@aplus-frontend/antdv/es/form';
8
8
  import { Options } from '../../../node_modules/scroll-into-view-if-needed';
9
9
  import { Recordable } from '../../type';
10
10
  import { VueTypeDef, VueTypeValidableDef } from '../../../node_modules/vue-types';
11
- import { SizeType } from '@aplus-frontend/antdv/es/config-provider';
12
11
  import { VueNode } from '@aplus-frontend/antdv/es/_util/type';
13
12
  import { ApFormProps, ApFormInternalInstance, WatchFunc, ApFormSubmitterConfig } from '..';
14
13
  import { OnCleanup } from '@vue/reactivity';
@@ -118,7 +117,7 @@ declare function __VLS_template(): {
118
117
  readonly onValidate?: ((name: string | number | string[] | number[], status: boolean, errors: string[]) => void) | undefined;
119
118
  readonly initialValues?: Recordable | undefined;
120
119
  readonly onValuesChange?: ((changedValues: Recordable, allValues: Recordable, fieldName: NamePath) => void) | undefined;
121
- readonly syncToUrl?: (boolean | ((values: Recordable, type: "get" | "set") => Recordable)) | undefined;
120
+ readonly syncToUrl?: boolean | ((values: Recordable, type: "get" | "set") => Recordable) | undefined;
122
121
  readonly syncToUrlPriority?: boolean | undefined;
123
122
  } & VNodeProps & AllowedComponentProps & ComponentCustomProps;
124
123
  $attrs: {
@@ -1060,7 +1059,7 @@ declare const __VLS_component: DefineComponent<ApFormDrawerFormProps, {
1060
1059
  readonly onValidate?: ((name: string | number | string[] | number[], status: boolean, errors: string[]) => void) | undefined;
1061
1060
  readonly initialValues?: Recordable | undefined;
1062
1061
  readonly onValuesChange?: ((changedValues: Recordable, allValues: Recordable, fieldName: NamePath) => void) | undefined;
1063
- readonly syncToUrl?: (boolean | ((values: Recordable, type: "get" | "set") => Recordable)) | undefined;
1062
+ readonly syncToUrl?: boolean | ((values: Recordable, type: "get" | "set") => Recordable) | undefined;
1064
1063
  readonly syncToUrlPriority?: boolean | undefined;
1065
1064
  } & VNodeProps & AllowedComponentProps & ComponentCustomProps;
1066
1065
  $attrs: {
@@ -1,6 +1,6 @@
1
1
  import { ApFormModalFormProps } from '../interface';
2
2
  import { VNode, ComponentInternalInstance, ExtractPropTypes, PropType, HTMLAttributes, VNodeProps, AllowedComponentProps, ComponentCustomProps, CreateComponentPublicInstanceWithMixins, ComponentOptionsMixin, PublicProps, GlobalComponents, GlobalDirectives, ComponentProvideOptions, Slot, ComponentPublicInstance, ComponentOptionsBase, DebuggerEvent, nextTick, WatchOptions, WatchStopHandle, ShallowUnwrapRef, ComponentCustomProperties, DefineComponent, CSSProperties } from 'vue';
3
- import { InternalNamePath, NamePath, ValidateOptions, ValidateMessages, FormLabelAlign, FieldData, ValidateErrorEntity, RuleObject } from '@aplus-frontend/antdv/es/form/interface';
3
+ import { InternalNamePath, NamePath, ValidateOptions, ValidateMessages, FormLabelAlign, FieldData, ValidateErrorEntity } from '@aplus-frontend/antdv/es/form/interface';
4
4
  import { Recordable } from '../../type';
5
5
  import { ButtonSize, SizeType, ButtonType, ButtonShape } from '@aplus-frontend/antdv/es/button';
6
6
  import { RequiredMark } from '@aplus-frontend/antdv/es/form/Form';
@@ -8,7 +8,6 @@ import { ColSize } from '@aplus-frontend/antdv/es/grid';
8
8
  import { RuleObject } from '@aplus-frontend/antdv/es/form';
9
9
  import { Options } from '../../../node_modules/scroll-into-view-if-needed';
10
10
  import { VueTypeDef, VueTypeValidableDef } from '../../../node_modules/vue-types';
11
- import { SizeType } from '@aplus-frontend/antdv/es/config-provider';
12
11
  import { VueNode } from '@aplus-frontend/antdv/es/_util/type';
13
12
  import { ApFormProps, ApFormInternalInstance, WatchFunc, ApFormSubmitterConfig } from '..';
14
13
  import { OnCleanup } from '@vue/reactivity';
@@ -118,7 +117,7 @@ declare function __VLS_template(): {
118
117
  readonly onValidate?: ((name: string | number | string[] | number[], status: boolean, errors: string[]) => void) | undefined;
119
118
  readonly initialValues?: Recordable | undefined;
120
119
  readonly onValuesChange?: ((changedValues: Recordable, allValues: Recordable, fieldName: NamePath) => void) | undefined;
121
- readonly syncToUrl?: (boolean | ((values: Recordable, type: "get" | "set") => Recordable)) | undefined;
120
+ readonly syncToUrl?: boolean | ((values: Recordable, type: "get" | "set") => Recordable) | undefined;
122
121
  readonly syncToUrlPriority?: boolean | undefined;
123
122
  } & VNodeProps & AllowedComponentProps & ComponentCustomProps;
124
123
  $attrs: {
@@ -1248,7 +1247,7 @@ declare const __VLS_component: DefineComponent<ApFormModalFormProps, {
1248
1247
  readonly onValidate?: ((name: string | number | string[] | number[], status: boolean, errors: string[]) => void) | undefined;
1249
1248
  readonly initialValues?: Recordable | undefined;
1250
1249
  readonly onValuesChange?: ((changedValues: Recordable, allValues: Recordable, fieldName: NamePath) => void) | undefined;
1251
- readonly syncToUrl?: (boolean | ((values: Recordable, type: "get" | "set") => Recordable)) | undefined;
1250
+ readonly syncToUrl?: boolean | ((values: Recordable, type: "get" | "set") => Recordable) | undefined;
1252
1251
  readonly syncToUrlPriority?: boolean | undefined;
1253
1252
  } & VNodeProps & AllowedComponentProps & ComponentCustomProps;
1254
1253
  $attrs: {
@@ -1,14 +1,13 @@
1
1
  import { ApFormExpose, ApFormSearchFormProps } from '../interface';
2
2
  import { ComponentInternalInstance, ExtractPropTypes, PropType, HTMLAttributes, VNodeProps, AllowedComponentProps, ComponentCustomProps, CreateComponentPublicInstanceWithMixins, ComponentOptionsMixin, PublicProps, GlobalComponents, GlobalDirectives, ComponentProvideOptions, Slot, ComponentPublicInstance, ComponentOptionsBase, DebuggerEvent, nextTick, WatchOptions, WatchStopHandle, ShallowUnwrapRef, ComponentCustomProperties, DefineComponent, ComputedRef } from 'vue';
3
3
  import { ButtonSize, SizeType } from '@aplus-frontend/antdv/es/button';
4
- import { ValidateMessages, FormLabelAlign, FieldData, ValidateErrorEntity, NamePath, RuleObject, ValidateOptions, InternalNamePath } from '@aplus-frontend/antdv/es/form/interface';
4
+ import { ValidateMessages, FormLabelAlign, FieldData, ValidateErrorEntity, NamePath, ValidateOptions, InternalNamePath } from '@aplus-frontend/antdv/es/form/interface';
5
5
  import { RequiredMark } from '@aplus-frontend/antdv/es/form/Form';
6
6
  import { ColSize } from '@aplus-frontend/antdv/es/grid';
7
7
  import { RuleObject } from '@aplus-frontend/antdv/es/form';
8
8
  import { Options } from '../../../node_modules/scroll-into-view-if-needed';
9
9
  import { Recordable } from '../../type';
10
10
  import { VueTypeDef, VueTypeValidableDef } from '../../../node_modules/vue-types';
11
- import { SizeType } from '@aplus-frontend/antdv/es/config-provider';
12
11
  import { VueNode } from '@aplus-frontend/antdv/es/_util/type';
13
12
  import { ApFormProps, ApFormInternalInstance, WatchFunc } from '..';
14
13
  import { OnCleanup } from '@vue/reactivity';
@@ -116,7 +115,7 @@ declare function __VLS_template(): {
116
115
  readonly onValidate?: ((name: string | number | string[] | number[], status: boolean, errors: string[]) => void) | undefined;
117
116
  readonly initialValues?: Recordable | undefined;
118
117
  readonly onValuesChange?: ((changedValues: Recordable, allValues: Recordable, fieldName: NamePath) => void) | undefined;
119
- readonly syncToUrl?: (boolean | ((values: Recordable, type: "get" | "set") => Recordable)) | undefined;
118
+ readonly syncToUrl?: boolean | ((values: Recordable, type: "get" | "set") => Recordable) | undefined;
120
119
  readonly syncToUrlPriority?: boolean | undefined;
121
120
  } & VNodeProps & AllowedComponentProps & ComponentCustomProps;
122
121
  $attrs: {
@@ -953,7 +952,7 @@ declare const __VLS_component: DefineComponent<ApFormSearchFormProps, {
953
952
  readonly onValidate?: ((name: string | number | string[] | number[], status: boolean, errors: string[]) => void) | undefined;
954
953
  readonly initialValues?: Recordable | undefined;
955
954
  readonly onValuesChange?: ((changedValues: Recordable, allValues: Recordable, fieldName: NamePath) => void) | undefined;
956
- readonly syncToUrl?: (boolean | ((values: Recordable, type: "get" | "set") => Recordable)) | undefined;
955
+ readonly syncToUrl?: boolean | ((values: Recordable, type: "get" | "set") => Recordable) | undefined;
957
956
  readonly syncToUrlPriority?: boolean | undefined;
958
957
  } & VNodeProps & AllowedComponentProps & ComponentCustomProps;
959
958
  $attrs: {
@@ -1,6 +1,6 @@
1
1
  import { ApListProps } from './interface';
2
2
  import { Recordable } from '../type';
3
- import { VNodeProps, AllowedComponentProps, ComponentCustomProps, PublicProps, ShallowUnwrapRef, Ref, VNode, RendererNode, RendererElement } from 'vue';
3
+ import { VNodeProps, AllowedComponentProps, ComponentCustomProps, PublicProps, ShallowUnwrapRef, Ref, VNode } from 'vue';
4
4
  import { ApFormSearchFormExpose } from '..';
5
5
  declare const _default: <RecordType extends Recordable>(__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<Pick<Partial<{}> & Omit<{} & VNodeProps & AllowedComponentProps & ComponentCustomProps, never>, never> & ApListProps<RecordType> & Partial<{}>> & PublicProps;
@@ -41,9 +41,7 @@ declare const _default: <RecordType extends Recordable>(__VLS_props: NonNullable
41
41
  }): any;
42
42
  };
43
43
  emit: {};
44
- }>) => VNode<RendererNode, RendererElement, {
45
- [key: string]: any;
46
- }> & {
44
+ }>) => VNode & {
47
45
  __ctx?: Awaited<typeof __VLS_setup>;
48
46
  };
49
47
  export default _default;
@@ -1,7 +1,7 @@
1
1
  import { ApColumnType, ApTableProps } from './interface';
2
2
  import { ColumnsType, ColumnType } from '@aplus-frontend/antdv/es/table';
3
3
  import { RowSelectionReturnType } from './hooks/use-table-row-selection';
4
- import { VNodeProps, AllowedComponentProps, ComponentCustomProps, PublicProps, ShallowUnwrapRef, ComputedRef, Ref, VNode, RendererNode, RendererElement } from 'vue';
4
+ import { VNodeProps, AllowedComponentProps, ComponentCustomProps, PublicProps, ShallowUnwrapRef, ComputedRef, Ref, VNode } from 'vue';
5
5
  declare const _default: <RecordType>(__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<Pick<Partial<{}> & Omit<{} & VNodeProps & AllowedComponentProps & ComponentCustomProps, never>, never> & ApTableProps<RecordType> & Partial<{}>> & PublicProps;
7
7
  expose(exposed: ShallowUnwrapRef<{
@@ -83,9 +83,7 @@ declare const _default: <RecordType>(__VLS_props: NonNullable<Awaited<typeof __V
83
83
  }) => void;
84
84
  };
85
85
  emit: {};
86
- }>) => VNode<RendererNode, RendererElement, {
87
- [key: string]: any;
88
- }> & {
86
+ }>) => VNode & {
89
87
  __ctx?: Awaited<typeof __VLS_setup>;
90
88
  };
91
89
  export default _default;
@@ -4,18 +4,18 @@ export declare const useTableColumnState: (columnSetting: ApTableSettingType, pe
4
4
  columnState: Ref<{
5
5
  key: string | number;
6
6
  show?: boolean | undefined;
7
- fixed?: ("left" | "right") | undefined;
7
+ fixed?: "left" | "right" | undefined;
8
8
  disabled?: boolean | undefined;
9
9
  label?: any;
10
- children?: any[] | undefined;
10
+ children?: /*elided*/ any[] | undefined;
11
11
  order?: number | undefined;
12
12
  }[], ApColumnState[] | {
13
13
  key: string | number;
14
14
  show?: boolean | undefined;
15
- fixed?: ("left" | "right") | undefined;
15
+ fixed?: "left" | "right" | undefined;
16
16
  disabled?: boolean | undefined;
17
17
  label?: any;
18
- children?: any[] | undefined;
18
+ children?: /*elided*/ any[] | undefined;
19
19
  order?: number | undefined;
20
20
  }[]>;
21
21
  selectAll: () => void;
@@ -1,6 +1,6 @@
1
1
  import { UploadFile, UploadChangeParam } from '@aplus-frontend/antdv';
2
2
  import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions, CreateComponentPublicInstanceWithMixins, ExtractPropTypes, PropType, GlobalComponents, GlobalDirectives } from 'vue';
3
- import { UploadType, UploadFile, FileType, HttpRequestHeader, ShowUploadListInterface, UploadChangeParam, UploadListType, UploadLocale, UploadListProgressProps, ItemRender } from '@aplus-frontend/antdv/es/upload/interface';
3
+ import { UploadType, UploadFile, FileType, HttpRequestHeader, ShowUploadListInterface, UploadListType, UploadLocale, UploadListProgressProps, ItemRender } from '@aplus-frontend/antdv/es/upload/interface';
4
4
  import { UploadRequestOption } from '@aplus-frontend/antdv/es/vc-upload/interface';
5
5
  import { VueNode } from '@aplus-frontend/antdv/es/_util/type';
6
6
  declare function setValue(val: (string | Record<string, any>)[]): void;
@@ -1,4 +1,5 @@
1
1
  import { Oss } from '../hooks/useOss';
2
+ import { actionResponse } from '@aplus-frontend/oss';
2
3
  import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
3
4
  declare function setValue(val?: (string | Record<string, any>)[]): void;
4
5
  interface UploadFile extends File {
@@ -17,13 +18,7 @@ declare function __VLS_template(): {
17
18
  pictureContext?(_: {
18
19
  fileList: {
19
20
  oss: {
20
- pauseUpload: (() => Promise<{
21
- status: number;
22
- previewUrl?: string;
23
- saveUrl?: string;
24
- originalFileName?: string;
25
- message: string;
26
- }>) | undefined;
21
+ pauseUpload: (() => Promise< actionResponse>) | undefined;
27
22
  };
28
23
  }[];
29
24
  remove: typeof handleRemove;
@@ -1,55 +1,55 @@
1
- import { defineComponent as _, ref as w, useSlots as j, computed as n, cloneVNode as B, toRaw as v, unref as G, createVNode as l, createTextVNode as H } from "vue";
2
- import { Tooltip as R, Popover as W } from "@aplus-frontend/antdv";
1
+ import { defineComponent as _, ref as F, useSlots as j, computed as n, cloneVNode as K, toRaw as v, unref as B, createVNode as l, createTextVNode as G } from "vue";
2
+ import { Tooltip as H, Popover as R } from "@aplus-frontend/antdv";
3
3
  import "../../config-provider/index.mjs";
4
- import { ApAttachmentProps as q } from "./constans.mjs";
5
- import { getHexWithOpacity as D, getFileInfo as y } from "../../ap-download/utils/getFileInfo.mjs";
6
- import { useOssInit as E } from "../../ap-download/hooks/index.mjs";
7
- import { isArray as J } from "lodash-unified";
4
+ import { ApAttachmentProps as W } from "./constans.mjs";
5
+ import { getHexWithOpacity as q, getFileInfo as w } from "../../ap-download/utils/getFileInfo.mjs";
6
+ import { useOssInit as D } from "../../ap-download/hooks/index.mjs";
7
+ import { isArray as E } from "lodash-unified";
8
8
  import { LoadingOutlined as g } from "@ant-design/icons-vue";
9
- import { useNamespace as K } from "../../config-provider/hooks/use-namespace.mjs";
10
- import { useGlobalConfig as p } from "../../config-provider/hooks/use-global-config.mjs";
9
+ import { useNamespace as J } from "../../config-provider/hooks/use-namespace.mjs";
10
+ import { useGlobalConfig as h } from "../../config-provider/hooks/use-global-config.mjs";
11
11
  import { useLocale as Q } from "../../config-provider/hooks/use-locale.mjs";
12
12
  const ce = /* @__PURE__ */ _({
13
13
  name: "ApAttachment",
14
- props: q(),
14
+ props: W(),
15
15
  setup(e) {
16
16
  const {
17
17
  b: O,
18
18
  e: a
19
- } = K("ap-attachment"), T = p("uiMode"), b = p("apUpload"), h = p("downloadCenterTriggerConfig"), {
19
+ } = J("ap-attachment"), T = h("uiMode"), b = h("apUpload"), N = h("downloadCenterTriggerConfig"), {
20
20
  lang: x,
21
21
  t: m
22
- } = Q(), i = w(!1), c = w(""), d = j(), P = n(() => x.value === "zh-cn" ? "zh_CN" : "en_US"), r = n(() => e.attachmentList.length === 1), A = n(() => e.attachmentList.length > 0 ? e.attachmentList[0].fileName : ""), k = n(() => r.value ? A.value : m("ap.apAttachment.downloadall")), C = n(() => e.color ? e.color : T.value === "aplus" ? "#0070FF" : "#1890FF"), S = n(() => ({
23
- width: r.value ? "auto" : "266px"
22
+ } = Q(), i = F(!1), c = F(""), d = j(), P = n(() => x.value === "zh-cn" ? "zh_CN" : "en_US"), u = n(() => e.attachmentList.length === 1), p = n(() => e.needName ? e.attachmentList.length > 0 && e.needName && e.needName.nameKey ? e.attachmentList[0][e.needName.nameKey] : "" : e.attachmentList.length > 0 ? e.attachmentList[0].fileName : ""), k = n(() => u.value ? p.value : m("ap.apAttachment.downloadall")), A = n(() => e.color ? e.color : T.value === "aplus" ? "#0070FF" : "#1890FF"), S = n(() => ({
23
+ width: u.value ? "auto" : "266px"
24
24
  })), L = n(() => ({
25
- "--download-main-color": C.value,
26
- "--download-main-color-opacity": D(C.value, 0.6)
25
+ "--download-main-color": A.value,
26
+ "--download-main-color-opacity": q(A.value, 0.6)
27
27
  })), V = n(() => {
28
28
  var t;
29
29
  return e.getOssAccess || ((t = b.value) == null ? void 0 : t.getOssAccess);
30
30
  }), z = n(() => {
31
31
  const t = d.default ? d.default()[0] : null;
32
- return t ? B(t, {
32
+ return t ? K(t, {
33
33
  style: {
34
34
  "font-size": "16px"
35
35
  }
36
36
  }) : null;
37
37
  }), f = async (t, s) => {
38
- var o, N;
38
+ var o, C;
39
39
  if (!e.disabled) {
40
40
  i.value = !0, s && (c.value = s);
41
41
  try {
42
- const u = J(v(t)) ? v(t) : [v(t)];
43
- if ((o = h.value) != null && o.trigger) {
44
- const U = y(e.needName, u).map((F) => ({
45
- objectName: F.path,
46
- fileName: F.fileName
42
+ const r = E(v(t)) ? v(t) : [v(t)];
43
+ if ((o = N.value) != null && o.trigger) {
44
+ const U = w(e.needName, r).map((y) => ({
45
+ objectName: y.path,
46
+ fileName: y.fileName
47
47
  }));
48
- (N = h.value) == null || N.trigger(U);
48
+ (C = N.value) == null || C.trigger(U);
49
49
  } else
50
- await (await E(V.value, G(P))).downloadFile(y(e.needName, u));
51
- } catch (u) {
52
- console.error(u);
50
+ await (await D(V.value, B(P))).downloadFile(w(e.needName, r));
51
+ } catch (r) {
52
+ console.error(r);
53
53
  } finally {
54
54
  i.value = !1, c.value = "";
55
55
  }
@@ -78,29 +78,29 @@ const ce = /* @__PURE__ */ _({
78
78
  return ((t = e.attachmentList) == null ? void 0 : t.length) > 0 && l("div", {
79
79
  class: [O()],
80
80
  style: [S.value, L.value]
81
- }, [l(R, {
81
+ }, [l(H, {
82
82
  title: k.value,
83
83
  placement: e.textToolTipPlacement,
84
84
  color: e.toolTipBgColor
85
85
  }, {
86
86
  default: () => [l("div", {
87
87
  class: [a("content")],
88
- onClick: () => f(r.value ? e.attachmentList[0] : e.attachmentList, "global")
88
+ onClick: () => f(u.value ? e.attachmentList[0] : e.attachmentList, "global")
89
89
  }, [i.value && c.value === "global" ? l("div", {
90
90
  class: [a("spin")]
91
91
  }, [l(g, {
92
92
  spin: !0
93
93
  }, null)]) : null, d.default ? l("div", {
94
94
  class: [a("text-render")]
95
- }, [z.value, H(" ")]) : null, l("div", {
95
+ }, [z.value, G(" ")]) : null, l("div", {
96
96
  class: [a("text-inner")]
97
- }, [A.value])])]
98
- }), l(W, {
97
+ }, [p.value])])]
98
+ }), l(R, {
99
99
  content: I(e.attachmentList),
100
100
  placement: e.fileMorePopoverPlacement,
101
101
  color: "#fff"
102
102
  }, {
103
- default: () => [!r.value && l("div", {
103
+ default: () => [!u.value && l("div", {
104
104
  class: [a("more")]
105
105
  }, [m("ap.apAttachment.more")])]
106
106
  })]);
@@ -1,8 +1,8 @@
1
1
  import { ApDownLoadProps } from '../../ap-download/interface';
2
2
  import { TooltipPlacement } from '@aplus-frontend/antdv/es/tooltip';
3
3
  export type AttachmentItemProps = {
4
- fileName: string;
5
- filePath: string;
4
+ fileName?: string;
5
+ filePath?: string;
6
6
  [key: string]: any;
7
7
  };
8
8
  export type ApAttachmentProps = Required<{
@@ -1,5 +1,9 @@
1
1
  import { ApBatchActionGroupProps } from './interface';
2
- import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
2
+ import { DefineComponent, ComputedRef, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
3
+ import { TableColumnType } from '@aplus-frontend/antdv';
3
4
  type __VLS_Props = ApBatchActionGroupProps;
4
- declare const _default: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
5
+ declare const _default: DefineComponent<__VLS_Props, {
6
+ columns: ComputedRef< TableColumnType<any>[]> | undefined;
7
+ dataSource: ComputedRef<any[]> | undefined;
8
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
5
9
  export default _default;
@@ -1,24 +1,25 @@
1
- import { defineComponent as A, computed as n, openBlock as v, createBlock as y, unref as a, mergeProps as m, withCtx as r, createVNode as c, createElementVNode as C, normalizeStyle as D, toDisplayString as h, normalizeClass as N, normalizeProps as R, guardReactiveProps as T, createTextVNode as V, createCommentVNode as $ } from "vue";
2
- import { DropdownButton as x, Dropdown as z } from "@aplus-frontend/antdv";
1
+ import { defineComponent as D, computed as n, openBlock as v, createBlock as y, unref as a, mergeProps as d, withCtx as r, createVNode as c, createElementVNode as N, normalizeStyle as R, toDisplayString as h, normalizeClass as x, normalizeProps as S, guardReactiveProps as V, createTextVNode as $, createCommentVNode as z } from "vue";
2
+ import { DropdownButton as G, Dropdown as M } from "@aplus-frontend/antdv";
3
3
  import "../../ap-button/index.mjs";
4
4
  import "./MenuItemGroup.vue.mjs";
5
5
  import "../../config-provider/index.mjs";
6
- import { DownOutlined as G } from "@ant-design/icons-vue";
7
- import { usePermission as M } from "@aplus-frontend/hooks";
8
- import { useNamespace as S } from "../../config-provider/hooks/use-namespace.mjs";
9
- import { useLocale as F } from "../../config-provider/hooks/use-locale.mjs";
10
- import { useGlobalConfig as O } from "../../config-provider/hooks/use-global-config.mjs";
6
+ import { DownOutlined as F } from "@ant-design/icons-vue";
7
+ import { usePermission as O } from "@aplus-frontend/hooks";
8
+ import { useInjectApTable as j } from "../../ap-table/context.mjs";
9
+ import { useNamespace as E } from "../../config-provider/hooks/use-namespace.mjs";
10
+ import { useLocale as I } from "../../config-provider/hooks/use-locale.mjs";
11
+ import { useGlobalConfig as q } from "../../config-provider/hooks/use-global-config.mjs";
11
12
  import w from "./MenuItemGroup.vue2.mjs";
12
- import E from "../../ap-button/ap-button.vue.mjs";
13
- const ee = /* @__PURE__ */ A({
13
+ import H from "../../ap-button/ap-button.vue.mjs";
14
+ const re = /* @__PURE__ */ D({
14
15
  __name: "ApBatchActionGroup",
15
16
  props: {
16
17
  selectedRows: {},
17
18
  buttonProps: {},
18
19
  menuList: {}
19
20
  },
20
- setup(P) {
21
- const { b: i } = S("ap-batch-action-group"), { t: _ } = F(), e = P, g = O("uiMode"), { hasPermission: k } = M(), p = n(
21
+ setup(P, { expose: _ }) {
22
+ const { b: i } = E("ap-batch-action-group"), { t: g } = I(), { columns: k, dataSource: A } = j(), e = P, B = q("uiMode"), { hasPermission: L } = O(), p = n(
22
23
  () => {
23
24
  var t;
24
25
  return ((t = e == null ? void 0 : e.buttonProps) == null ? void 0 : t.dropdownType) || "default";
@@ -31,24 +32,24 @@ const ee = /* @__PURE__ */ A({
31
32
  ), f = n(
32
33
  () => {
33
34
  var t;
34
- return ((t = e == null ? void 0 : e.buttonProps) == null ? void 0 : t.content) || _("ap.apApBatchActionGroup.batchOperation");
35
+ return ((t = e == null ? void 0 : e.buttonProps) == null ? void 0 : t.content) || g("ap.apApBatchActionGroup.batchOperation");
35
36
  }
36
- ), B = n(() => (e == null ? void 0 : e.selectedRows) || []), d = n(
37
+ ), C = n(() => (e == null ? void 0 : e.selectedRows) || []), m = n(
37
38
  () => {
38
39
  var t;
39
- return ((t = e == null ? void 0 : e.buttonProps) == null ? void 0 : t.disabled) ?? (Array.isArray(e.selectedRows) ? B.value.length === 0 : !1);
40
+ return ((t = e == null ? void 0 : e.buttonProps) == null ? void 0 : t.disabled) ?? (Array.isArray(e.selectedRows) ? C.value.length === 0 : !1);
40
41
  }
41
- ), L = n(() => {
42
+ ), T = n(() => {
42
43
  const t = {
43
44
  aplus: "#0070FF",
44
45
  admin: "#34b77c"
45
46
  };
46
- return u.value === "borderLink" ? d.value ? void 0 : t[g.value] || t.aplus : void 0;
47
+ return u.value === "borderLink" ? m.value ? void 0 : t[B.value] || t.aplus : void 0;
47
48
  }), l = n(() => {
48
49
  var t;
49
50
  return ((t = e == null ? void 0 : e.menuList) == null ? void 0 : t.filter((o) => {
50
51
  let s = o == null ? void 0 : o.ifShow;
51
- return !(o != null && o.ifShow) && (o != null && o.auth) && (s = () => k(o.auth)), (s == null ? void 0 : s()) ?? !0;
52
+ return !(o != null && o.ifShow) && (o != null && o.auth) && (s = () => L(o.auth)), (s == null ? void 0 : s()) ?? !0;
52
53
  })) || [];
53
54
  });
54
55
  function b() {
@@ -57,54 +58,57 @@ const ee = /* @__PURE__ */ A({
57
58
  type: u.value === "borderLink" ? "default" : u.value
58
59
  } : {};
59
60
  }
60
- return (t, o) => l.value.length && p.value === "dropdown" ? (v(), y(a(x), m({
61
+ return _({
62
+ columns: k,
63
+ dataSource: A
64
+ }), (t, o) => l.value.length && p.value === "dropdown" ? (v(), y(a(G), d({
61
65
  key: 0,
62
66
  class: [a(i)()]
63
67
  }, {
64
68
  ...t.$attrs,
65
69
  ...b(),
66
- disabled: d.value
70
+ disabled: m.value
67
71
  }), {
68
72
  overlay: r(() => [
69
- c(w, m({
73
+ c(w, d({
70
74
  ...e
71
75
  }, { "menu-list": l.value }), null, 16, ["menu-list"])
72
76
  ]),
73
77
  default: r(() => [
74
- C("span", {
75
- style: D({
76
- color: L.value
78
+ N("span", {
79
+ style: R({
80
+ color: T.value
77
81
  })
78
82
  }, h(f.value), 5)
79
83
  ]),
80
84
  _: 1
81
- }, 16, ["class"])) : l.value.length && p.value === "default" ? (v(), y(a(z), {
85
+ }, 16, ["class"])) : l.value.length && p.value === "default" ? (v(), y(a(M), {
82
86
  key: 1,
83
- class: N([a(i)()]),
84
- disabled: d.value
87
+ class: x([a(i)()]),
88
+ disabled: m.value
85
89
  }, {
86
90
  overlay: r(() => [
87
- c(w, m({
91
+ c(w, d({
88
92
  ...e
89
93
  }, { "menu-list": l.value }), null, 16, ["menu-list"])
90
94
  ]),
91
95
  default: r(() => [
92
- c(a(E), R(T({
96
+ c(a(H), S(V({
93
97
  ...t.$attrs,
94
98
  ...b(),
95
99
  type: u.value
96
100
  })), {
97
101
  default: r(() => [
98
- V(h(f.value) + " ", 1),
99
- c(a(G))
102
+ $(h(f.value) + " ", 1),
103
+ c(a(F))
100
104
  ]),
101
105
  _: 1
102
106
  }, 16)
103
107
  ]),
104
108
  _: 1
105
- }, 8, ["class", "disabled"])) : $("", !0);
109
+ }, 8, ["class", "disabled"])) : z("", !0);
106
110
  }
107
111
  });
108
112
  export {
109
- ee as default
113
+ re as default
110
114
  };
@@ -1,10 +1,10 @@
1
- import { CreateComponentPublicInstanceWithMixins, ExtractPropTypes, PropType, CSSProperties, ComponentOptionsMixin, PublicProps, GlobalComponents, GlobalDirectives, ComponentProvideOptions, ComponentOptionsBase, VNodeProps, AllowedComponentProps, ComponentCustomProps, Plugin } from 'vue';
1
+ import { CreateComponentPublicInstanceWithMixins, ExtractPropTypes, PropType, CSSProperties, ComputedRef, ComponentOptionsMixin, PublicProps, GlobalComponents, GlobalDirectives, ComponentProvideOptions, ComponentOptionsBase, VNodeProps, AllowedComponentProps, ComponentCustomProps, Plugin } from 'vue';
2
2
  import { ButtonType, ButtonShape, ButtonSize } from '@aplus-frontend/antdv/es/button';
3
3
  import { ButtonHTMLType } from '@aplus-frontend/antdv/es/button/buttonTypes';
4
4
  import { VueTypeValidableDef } from '../../../node_modules/vue-types';
5
5
  import { MouseEventHandler, FocusEventHandler } from '@aplus-frontend/antdv/es/_util/EventInterface';
6
- import { ButtonProps, ItemType, MenuTheme, MenuMode } from '@aplus-frontend/antdv';
7
6
  import { DropdownArrowOptions, Trigger, Align } from '@aplus-frontend/antdv/es/dropdown/props';
7
+ import { ItemType, MenuTheme, MenuMode, TableColumnType, ButtonProps } from '@aplus-frontend/antdv';
8
8
  import { Key } from '@aplus-frontend/antdv/es/_util/type';
9
9
  import { CSSMotionProps } from '@aplus-frontend/antdv/es/_util/transition';
10
10
  import { BuiltinPlacements, TriggerSubMenuAction, SelectEventHandler, MenuClickEventHandler } from '@aplus-frontend/antdv/es/menu/src/interface';
@@ -63,7 +63,7 @@ declare const ApBatchActionGroup: {
63
63
  type: PropType< MouseEventHandler | MouseEventHandler[]>;
64
64
  };
65
65
  }>>, "type" | "onClick"> & {
66
- type?: ButtonProps["type"] | "borderLink";
66
+ type?: ( ButtonType | undefined) | "borderLink";
67
67
  borderLinkColor?: string;
68
68
  minWidth?: boolean | number | string;
69
69
  lazy?: boolean | number;
@@ -302,7 +302,10 @@ declare const ApBatchActionGroup: {
302
302
  content?: string;
303
303
  }) | undefined;
304
304
  menuList?: ApBatchActionGroupMenuProps<any>[] | undefined;
305
- }> & Readonly<{}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, {}, false, {}, {}, GlobalComponents, GlobalDirectives, string, {}, any, ComponentProvideOptions, {
305
+ }> & Readonly<{}>, {
306
+ columns: ComputedRef< TableColumnType<any>[]> | undefined;
307
+ dataSource: ComputedRef<any[]> | undefined;
308
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, {}, false, {}, {}, GlobalComponents, GlobalDirectives, string, {}, any, ComponentProvideOptions, {
306
309
  P: {};
307
310
  B: {};
308
311
  D: {};
@@ -361,7 +364,7 @@ declare const ApBatchActionGroup: {
361
364
  type: PropType< MouseEventHandler | MouseEventHandler[]>;
362
365
  };
363
366
  }>>, "type" | "onClick"> & {
364
- type?: ButtonProps["type"] | "borderLink";
367
+ type?: ( ButtonType | undefined) | "borderLink";
365
368
  borderLinkColor?: string;
366
369
  minWidth?: boolean | number | string;
367
370
  lazy?: boolean | number;
@@ -600,7 +603,10 @@ declare const ApBatchActionGroup: {
600
603
  content?: string;
601
604
  }) | undefined;
602
605
  menuList?: ApBatchActionGroupMenuProps<any>[] | undefined;
603
- }> & Readonly<{}>, {}, {}, {}, {}, {}>;
606
+ }> & Readonly<{}>, {
607
+ columns: ComputedRef< TableColumnType<any>[]> | undefined;
608
+ dataSource: ComputedRef<any[]> | undefined;
609
+ }, {}, {}, {}, {}>;
604
610
  __isFragment?: never;
605
611
  __isTeleport?: never;
606
612
  __isSuspense?: never;
@@ -895,7 +901,10 @@ declare const ApBatchActionGroup: {
895
901
  content?: string;
896
902
  }) | undefined;
897
903
  menuList?: ApBatchActionGroupMenuProps<any>[] | undefined;
898
- }> & Readonly<{}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, {}, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & VNodeProps & AllowedComponentProps & ComponentCustomProps & ( Plugin & (new (...args: any[]) => {
904
+ }> & Readonly<{}>, {
905
+ columns: ComputedRef< TableColumnType<any>[]> | undefined;
906
+ dataSource: ComputedRef<any[]> | undefined;
907
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, {}, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & VNodeProps & AllowedComponentProps & ComponentCustomProps & ( Plugin & (new (...args: any[]) => {
899
908
  $props: {
900
909
  onClick?: () => void;
901
910
  };
@@ -2,6 +2,7 @@ import { ButtonProps, MenuItemProps } from '@aplus-frontend/antdv';
2
2
  import { ApButtonProps } from '../../ap-button/interface';
3
3
  import { DropdownButtonProps } from '@aplus-frontend/antdv/es/dropdown';
4
4
  import { VNodeChild } from 'vue';
5
+ import { ColumnType } from '@aplus-frontend/antdv/es/table';
5
6
  type ApBatchActionGroupButtonType = ButtonProps['type'] | 'borderLink';
6
7
  type MixinButton<T> = Omit<T, 'type'> & {
7
8
  type?: ApBatchActionGroupButtonType;
@@ -41,4 +42,8 @@ export type ApBatchActionGroupProps<RecordType = any> = {
41
42
  */
42
43
  menuList?: ApBatchActionGroupMenuProps<RecordType>[];
43
44
  };
45
+ export type ApBatchActionGroupExpose<RecordType = any> = {
46
+ columns?: ColumnType<any>[];
47
+ dataSource?: RecordType[];
48
+ };
44
49
  export {};
@@ -1,5 +1,5 @@
1
1
  import { ApExpandAlertProps } from './interface';
2
- import { VNodeProps, AllowedComponentProps, ComponentCustomProps, PublicProps, ShallowUnwrapRef, VNode, RendererNode, RendererElement } from 'vue';
2
+ import { VNodeProps, AllowedComponentProps, ComponentCustomProps, PublicProps, ShallowUnwrapRef, VNode } from 'vue';
3
3
  declare const _default: <T 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
4
  props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
5
5
  readonly onExpand?: ((...args: any[]) => any) | undefined;
@@ -23,9 +23,7 @@ declare const _default: <T extends Record<string, any>>(__VLS_props: NonNullable
23
23
  }): any;
24
24
  };
25
25
  emit: (event: "expand" | "choose", ...args: any[]) => void;
26
- }>) => VNode<RendererNode, RendererElement, {
27
- [key: string]: any;
28
- }> & {
26
+ }>) => VNode & {
29
27
  __ctx?: Awaited<typeof __VLS_setup>;
30
28
  };
31
29
  export default _default;