@aplus-frontend/ui 7.18.0 → 7.19.0-beta.0
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.
- package/es/src/ag-grid/context.mjs +1 -1
- package/es/src/ag-grid/editable/form-item.vue.d.ts +4 -2
- package/es/src/ag-grid/editable/index.vue.d.ts +4 -2
- package/es/src/ag-grid/hooks/use-pinned-row.mjs +2 -2
- package/es/src/ag-grid/index.vue.d.ts +4 -2
- package/es/src/ag-grid/index.vue.mjs +1 -1
- package/es/src/ap-field/cascader/use-options.d.ts +4 -4
- package/es/src/ap-field/date/index.vue.d.ts +1 -0
- package/es/src/ap-field/date-range/index.vue.d.ts +1 -0
- package/es/src/ap-field/select/use-select-options.d.ts +2 -2
- package/es/src/ap-field/text/password.vue.d.ts +4 -4
- package/es/src/ap-field/tree-select/use-request.d.ts +4 -4
- package/es/src/ap-form/ap-form.vue.d.ts +2 -1
- package/es/src/ap-form/context.mjs +1 -1
- package/es/src/ap-form/drawer-form/index.vue.d.ts +4 -3
- package/es/src/ap-form/item/index.vue.d.ts +6 -6
- package/es/src/ap-form/item-group/helper.mjs +2 -2
- package/es/src/ap-form/items/date/index.vue.d.ts +11 -9
- package/es/src/ap-form/items/date-range/index.vue.d.ts +15 -13
- package/es/src/ap-form/items/number/index.vue.d.ts +3 -2
- package/es/src/ap-form/items/select/index.vue.d.ts +8 -8
- package/es/src/ap-form/modal-form/index.vue.d.ts +4 -3
- package/es/src/ap-form/provider/context.mjs +1 -1
- package/es/src/ap-form/search-form/index.vue.d.ts +4 -3
- package/es/src/ap-grid/editable/form-item.vue.d.ts +4 -2
- package/es/src/ap-grid/editable/index.vue.d.ts +4 -2
- package/es/src/ap-grid/index.vue.d.ts +4 -2
- package/es/src/ap-grid/utils/table.mjs +2 -2
- package/es/src/ap-list/index.vue.d.ts +4 -2
- package/es/src/ap-modal/utils/confirm.d.ts +1 -1
- package/es/src/ap-pro-card/components/card/index.vue2.mjs +2 -2
- package/es/src/ap-table/ap-table.vue.d.ts +4 -2
- package/es/src/ap-table/components/setting/context.mjs +1 -1
- package/es/src/ap-table/components/setting/sorter/context.mjs +1 -1
- package/es/src/ap-table/components/setting/template/edit-form.vue.d.ts +3 -2
- package/es/src/ap-table/constants.d.ts +22 -20
- package/es/src/ap-table/context.mjs +1 -1
- package/es/src/ap-table/hooks/use-table-paging-ng.d.ts +1 -1
- package/es/src/ap-table/hooks/use-table-paging-ng.mjs +7 -7
- package/es/src/ap-table/hooks/use-table-template-storage.d.ts +9 -9
- package/es/src/ap-table/utils.mjs +1 -1
- package/es/src/business/ag-grid-modal/hooks/use-ag-grid-instance.mjs +1 -1
- package/es/src/business/ap-batch-action-group/index.d.ts +3 -3
- package/es/src/business/ap-download/hooks/index.mjs +1 -1
- package/es/src/business/ap-draggable-grid/ApDraggableGrid.vue.d.ts +1 -1
- package/es/src/business/ap-draggable-grid/ApDraggableGrid.vue2.mjs +3 -1
- package/es/src/business/ap-draggable-grid/index.d.ts +1 -1
- package/es/src/business/ap-expand-alert/ApExpandAlert.vue.d.ts +4 -2
- package/es/src/business/ap-keep-alive/hook.mjs +1 -1
- package/es/src/business/ap-keep-alive/utils.mjs +1 -1
- package/es/src/business/ap-select-layout/index.d.ts +4 -2
- package/es/src/business/ap-select-layout/select-layout.vue.d.ts +4 -2
- package/es/src/business/ap-table-modal/index.d.ts +5 -17
- package/es/src/business/ap-upload/components/MultipleFile.vue.d.ts +1 -1
- package/es/src/business/ap-value-select-card/index.vue.d.ts +4 -2
- package/es/src/business/ap-view/ap-view.vue.d.ts +5 -0
- package/es/src/business/ap-view/ap-view.vue2.mjs +142 -122
- package/es/src/business/ap-view/components/main-button-content.vue.d.ts +3 -2
- package/es/src/business/ap-view/components/menu-list-content.vue.d.ts +3 -2
- package/es/src/business/ap-view/hooks/use-send-to-url.d.ts +11 -0
- package/es/src/business/ap-view/hooks/use-send-to-url.mjs +38 -0
- package/es/src/business/ap-view/hooks/use-view-provide.mjs +1 -1
- package/es/src/business/ap-view/index.d.ts +13 -0
- package/es/src/business/ap-view/interface.d.ts +10 -0
- package/es/src/business/ap-view/utils/query.d.ts +4 -0
- package/es/src/business/ap-view/utils/query.mjs +26 -0
- package/es/src/check-card/context.mjs +1 -1
- package/es/src/config-provider/constants.mjs +1 -1
- package/es/src/config-provider/hooks/use-locale.mjs +1 -1
- package/es/src/config-provider/hooks/use-namespace.d.ts +1 -5
- package/es/src/config-provider/hooks/use-namespace.mjs +1 -1
- package/es/src/config-provider/hooks/use-token.mjs +1 -1
- package/es/src/editable-table/form-item.vue.d.ts +4 -2
- package/es/src/editable-table/index.vue.d.ts +4 -2
- package/es/src/editable-table/utils.mjs +1 -1
- package/es/src/scroll-view/index.vue.d.ts +5 -5
- package/es/src/tests/wrapper.d.ts +4 -4
- package/es/src/text/context.mjs +1 -1
- package/es/src/time-ago/useTimeAgo.mjs +1 -1
- package/es/src/utils/slot.mjs +1 -1
- package/es/src/version.d.ts +1 -1
- package/es/src/version.mjs +1 -1
- package/lib/src/ag-grid/editable/form-item.vue.d.ts +4 -2
- package/lib/src/ag-grid/editable/index.vue.d.ts +4 -2
- package/lib/src/ag-grid/hooks/use-pinned-row.js +1 -1
- package/lib/src/ag-grid/index.vue.d.ts +4 -2
- package/lib/src/ag-grid/index.vue.js +1 -1
- package/lib/src/ap-field/cascader/use-options.d.ts +4 -4
- package/lib/src/ap-field/date/index.vue.d.ts +1 -0
- package/lib/src/ap-field/date-range/index.vue.d.ts +1 -0
- package/lib/src/ap-field/select/use-select-options.d.ts +2 -2
- package/lib/src/ap-field/text/password.vue.d.ts +4 -4
- package/lib/src/ap-field/tree-select/use-request.d.ts +4 -4
- package/lib/src/ap-form/ap-form.vue.d.ts +2 -1
- package/lib/src/ap-form/drawer-form/index.vue.d.ts +4 -3
- package/lib/src/ap-form/item/index.vue.d.ts +6 -6
- package/lib/src/ap-form/items/date/index.vue.d.ts +11 -9
- package/lib/src/ap-form/items/date-range/index.vue.d.ts +15 -13
- package/lib/src/ap-form/items/number/index.vue.d.ts +3 -2
- package/lib/src/ap-form/items/select/index.vue.d.ts +8 -8
- package/lib/src/ap-form/modal-form/index.vue.d.ts +4 -3
- package/lib/src/ap-form/search-form/index.vue.d.ts +4 -3
- package/lib/src/ap-grid/editable/form-item.vue.d.ts +4 -2
- package/lib/src/ap-grid/editable/index.vue.d.ts +4 -2
- package/lib/src/ap-grid/index.vue.d.ts +4 -2
- package/lib/src/ap-grid/utils/table.js +1 -1
- package/lib/src/ap-list/index.vue.d.ts +4 -2
- package/lib/src/ap-modal/utils/confirm.d.ts +1 -1
- package/lib/src/ap-table/ap-table.vue.d.ts +4 -2
- package/lib/src/ap-table/components/setting/template/edit-form.vue.d.ts +3 -2
- package/lib/src/ap-table/constants.d.ts +22 -20
- package/lib/src/ap-table/hooks/use-table-paging-ng.d.ts +1 -1
- package/lib/src/ap-table/hooks/use-table-paging-ng.js +1 -1
- package/lib/src/ap-table/hooks/use-table-template-storage.d.ts +9 -9
- package/lib/src/business/ap-batch-action-group/index.d.ts +3 -3
- package/lib/src/business/ap-draggable-grid/ApDraggableGrid.vue.d.ts +1 -1
- package/lib/src/business/ap-draggable-grid/ApDraggableGrid.vue2.js +1 -1
- package/lib/src/business/ap-draggable-grid/index.d.ts +1 -1
- package/lib/src/business/ap-expand-alert/ApExpandAlert.vue.d.ts +4 -2
- package/lib/src/business/ap-select-layout/index.d.ts +4 -2
- package/lib/src/business/ap-select-layout/select-layout.vue.d.ts +4 -2
- package/lib/src/business/ap-table-modal/index.d.ts +5 -17
- package/lib/src/business/ap-upload/components/MultipleFile.vue.d.ts +1 -1
- package/lib/src/business/ap-value-select-card/index.vue.d.ts +4 -2
- package/lib/src/business/ap-view/ap-view.vue.d.ts +5 -0
- package/lib/src/business/ap-view/ap-view.vue2.js +1 -1
- package/lib/src/business/ap-view/components/main-button-content.vue.d.ts +3 -2
- package/lib/src/business/ap-view/components/menu-list-content.vue.d.ts +3 -2
- package/lib/src/business/ap-view/hooks/use-send-to-url.d.ts +11 -0
- package/lib/src/business/ap-view/hooks/use-send-to-url.js +1 -0
- package/lib/src/business/ap-view/index.d.ts +13 -0
- package/lib/src/business/ap-view/interface.d.ts +10 -0
- package/lib/src/business/ap-view/utils/query.d.ts +4 -0
- package/lib/src/business/ap-view/utils/query.js +1 -0
- package/lib/src/config-provider/hooks/use-namespace.d.ts +1 -5
- package/lib/src/editable-table/form-item.vue.d.ts +4 -2
- package/lib/src/editable-table/index.vue.d.ts +4 -2
- package/lib/src/scroll-view/index.vue.d.ts +5 -5
- package/lib/src/tests/wrapper.d.ts +4 -4
- package/lib/src/time-ago/useTimeAgo.js +1 -1
- package/lib/src/version.d.ts +1 -1
- package/lib/src/version.js +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ApExpandAlertProps } from './interface';
|
|
2
|
-
import { VNodeProps, AllowedComponentProps, ComponentCustomProps, PublicProps, ShallowUnwrapRef, VNode } from 'vue';
|
|
2
|
+
import { VNodeProps, AllowedComponentProps, ComponentCustomProps, PublicProps, ShallowUnwrapRef, VNode, RendererNode, RendererElement } 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 onClose?: ((args_0: MouseEvent) => any) | undefined;
|
|
@@ -24,7 +24,9 @@ declare const _default: <T extends Record<string, any>>(__VLS_props: NonNullable
|
|
|
24
24
|
}): any;
|
|
25
25
|
};
|
|
26
26
|
emit: ((evt: "close", args_0: MouseEvent) => void) & ((evt: "expand", args_0: "collapse" | "expand") => void) & ((evt: "choose", args_0: T) => void);
|
|
27
|
-
}>) => VNode
|
|
27
|
+
}>) => VNode<RendererNode, RendererElement, {
|
|
28
|
+
[key: string]: any;
|
|
29
|
+
}> & {
|
|
28
30
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
29
31
|
};
|
|
30
32
|
export default _default;
|
|
@@ -4,7 +4,7 @@ const o = (r) => {
|
|
|
4
4
|
if (typeof e == "string") return;
|
|
5
5
|
const n = Array.isArray(e) ? e : null;
|
|
6
6
|
if (n)
|
|
7
|
-
return n.filter((t) => !["string", "number", "boolean"].includes(typeof t)).filter((t) => t && typeof t == "object" && "type" in t ? t.type !=
|
|
7
|
+
return n.filter((t) => !["string", "number", "boolean"].includes(typeof t)).filter((t) => t && typeof t == "object" && "type" in t ? t.type != Symbol.for("v-cmt") : !1);
|
|
8
8
|
}, l = (r) => {
|
|
9
9
|
if (r) {
|
|
10
10
|
if (r.length > 1)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ApSelectItem } from './interface';
|
|
2
|
-
import { PublicProps, ShallowUnwrapRef, VNode, Plugin } from 'vue';
|
|
2
|
+
import { PublicProps, ShallowUnwrapRef, VNode, RendererNode, RendererElement, Plugin } from 'vue';
|
|
3
3
|
export * from './interface';
|
|
4
4
|
declare const ApSelectLayout: (<T extends ApSelectItem>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: {
|
|
5
5
|
attrs: any;
|
|
@@ -38,7 +38,9 @@ declare const ApSelectLayout: (<T extends ApSelectItem>(__VLS_props: NonNullable
|
|
|
38
38
|
(event: "afterEnter", el: Element): void;
|
|
39
39
|
(event: "afterLeave", el: Element): void;
|
|
40
40
|
};
|
|
41
|
-
}>) => VNode
|
|
41
|
+
}>) => VNode<RendererNode, RendererElement, {
|
|
42
|
+
[key: string]: any;
|
|
43
|
+
}> & {
|
|
42
44
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
43
45
|
}) & ( Plugin & (new (...args: any[]) => {
|
|
44
46
|
$props: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ApSelectItem, ApSelectLayoutProps } from './interface';
|
|
2
|
-
import { VNodeProps, AllowedComponentProps, ComponentCustomProps, PublicProps, ShallowUnwrapRef, VNode } from 'vue';
|
|
2
|
+
import { VNodeProps, AllowedComponentProps, ComponentCustomProps, PublicProps, ShallowUnwrapRef, VNode, RendererNode, RendererElement } from 'vue';
|
|
3
3
|
declare const _default: <T extends ApSelectItem>(__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 onOnSelect?: ((value: T) => any) | undefined;
|
|
@@ -19,7 +19,9 @@ declare const _default: <T extends ApSelectItem>(__VLS_props: NonNullable<Awaite
|
|
|
19
19
|
(event: "afterEnter", el: Element): void;
|
|
20
20
|
(event: "afterLeave", el: Element): void;
|
|
21
21
|
};
|
|
22
|
-
}>) => VNode
|
|
22
|
+
}>) => VNode<RendererNode, RendererElement, {
|
|
23
|
+
[key: string]: any;
|
|
24
|
+
}> & {
|
|
23
25
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
24
26
|
};
|
|
25
27
|
export default _default;
|
|
@@ -4,9 +4,9 @@ import { CreateComponentPublicInstanceWithMixins, ComponentOptionsMixin, PublicP
|
|
|
4
4
|
import { ApTableModalProps, OpenOptions, OpenReturnType } from './interface';
|
|
5
5
|
import { Recordable } from '../../type';
|
|
6
6
|
import { TableColumnsType } from '@aplus-frontend/antdv';
|
|
7
|
+
import { InternalPagingType } from '../../ap-table/hooks/use-table-paging-ng';
|
|
7
8
|
import { ApFormSearchFormPopoverSorterItem } from '../..';
|
|
8
9
|
import { MaskType } from '@aplus-frontend/antdv/es/_util/hooks/useMergedMask';
|
|
9
|
-
import { InternalPagingType } from '../../ap-table/hooks/use-table-paging-ng';
|
|
10
10
|
/**
|
|
11
11
|
*
|
|
12
12
|
*/
|
|
@@ -44,14 +44,8 @@ declare const ApTableModal: {
|
|
|
44
44
|
};
|
|
45
45
|
y: undefined;
|
|
46
46
|
};
|
|
47
|
-
getPaging: () =>
|
|
48
|
-
|
|
49
|
-
pageSize: number;
|
|
50
|
-
}>;
|
|
51
|
-
setPaging: (nextPaging: Partial<{
|
|
52
|
-
current: number;
|
|
53
|
-
pageSize: number;
|
|
54
|
-
}>, refreshImmediately?: boolean) => void;
|
|
47
|
+
getPaging: () => InternalPagingType;
|
|
48
|
+
setPaging: (nextPaging: InternalPagingType, refreshImmediately?: boolean) => void;
|
|
55
49
|
getSearchFormSorterItems: () => ApFormSearchFormPopoverSorterItem[];
|
|
56
50
|
setSearchFormSorterItems: (sortedItems: ApFormSearchFormPopoverSorterItem[]) => void;
|
|
57
51
|
resetSearchFormSorterItems: () => void;
|
|
@@ -156,14 +150,8 @@ declare const ApTableModal: {
|
|
|
156
150
|
};
|
|
157
151
|
y: undefined;
|
|
158
152
|
};
|
|
159
|
-
getPaging: () =>
|
|
160
|
-
|
|
161
|
-
pageSize: number;
|
|
162
|
-
}>;
|
|
163
|
-
setPaging: (nextPaging: Partial<{
|
|
164
|
-
current: number;
|
|
165
|
-
pageSize: number;
|
|
166
|
-
}>, refreshImmediately?: boolean) => void;
|
|
153
|
+
getPaging: () => InternalPagingType;
|
|
154
|
+
setPaging: (nextPaging: InternalPagingType, refreshImmediately?: boolean) => void;
|
|
167
155
|
getSearchFormSorterItems: () => ApFormSearchFormPopoverSorterItem[];
|
|
168
156
|
setSearchFormSorterItems: (sortedItems: ApFormSearchFormPopoverSorterItem[]) => void;
|
|
169
157
|
resetSearchFormSorterItems: () => 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, UploadListType, UploadLocale, UploadListProgressProps, ItemRender } from '@aplus-frontend/antdv/es/upload/interface';
|
|
3
|
+
import { UploadType, UploadFile, FileType, HttpRequestHeader, ShowUploadListInterface, UploadChangeParam, UploadListType, UploadLocale, UploadListProgressProps, ItemRender } from '@aplus-frontend/antdv/es/upload/interface';
|
|
4
4
|
import { AcceptConfig, 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,5 +1,5 @@
|
|
|
1
1
|
import { ApValueSelectCardProps, ApValueSelectCardOption } from './interface';
|
|
2
|
-
import { VNodeProps, AllowedComponentProps, ComponentCustomProps, PublicProps, ShallowUnwrapRef, Ref, ComputedRef, VNode } from 'vue';
|
|
2
|
+
import { VNodeProps, AllowedComponentProps, ComponentCustomProps, PublicProps, ShallowUnwrapRef, Ref, ComputedRef, VNode, RendererNode, RendererElement } from 'vue';
|
|
3
3
|
declare const _default: <T 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<Pick<Partial<{}> & Omit<{
|
|
5
5
|
readonly onChange?: ((keys: (string | number)[]) => any) | undefined;
|
|
@@ -45,7 +45,9 @@ declare const _default: <T extends Record<string, any> = Record<string, any>>(__
|
|
|
45
45
|
(e: "remove", key: string | number): void;
|
|
46
46
|
(e: "highlight", keys: (string | number)[]): void;
|
|
47
47
|
};
|
|
48
|
-
}>) => VNode
|
|
48
|
+
}>) => VNode<RendererNode, RendererElement, {
|
|
49
|
+
[key: string]: any;
|
|
50
|
+
}> & {
|
|
49
51
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
50
52
|
};
|
|
51
53
|
export default _default;
|
|
@@ -1,11 +1,16 @@
|
|
|
1
|
+
import { Recordable } from '../../type';
|
|
1
2
|
import { ApViewProps } from './interface';
|
|
2
3
|
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
3
4
|
declare const _default: DefineComponent<ApViewProps, {
|
|
4
5
|
setFirstDefaultSystemView: (value: boolean) => void;
|
|
6
|
+
setInitToUrl: (value: boolean) => void;
|
|
7
|
+
mountedData: Recordable;
|
|
5
8
|
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ApViewProps> & Readonly<{}>, {
|
|
6
9
|
manual: boolean;
|
|
7
10
|
maxViewNum: number;
|
|
11
|
+
sendToUrl: boolean;
|
|
8
12
|
isDefaultSystemView: boolean;
|
|
9
13
|
isFirstDefaultSystemView: boolean;
|
|
14
|
+
initToUrl: boolean;
|
|
10
15
|
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
11
16
|
export default _default;
|
|
@@ -1,20 +1,21 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { isValid as
|
|
3
|
-
import { useInjectApTable as
|
|
1
|
+
import { defineComponent as z, computed as c, ref as d, createVNode as g, watch as R, createBlock as q, openBlock as H, unref as f, mergeProps as J, withCtx as Q, createElementVNode as X, normalizeClass as Z } from "vue";
|
|
2
|
+
import { isValid as ee } from "@aplus-frontend/utils";
|
|
3
|
+
import { useInjectApTable as te } from "../../ap-table/context.mjs";
|
|
4
4
|
import "../../config-provider/index.mjs";
|
|
5
|
-
import { ApBatchActionGroup as
|
|
5
|
+
import { ApBatchActionGroup as ae } from "../ap-batch-action-group/index.mjs";
|
|
6
6
|
import "./components/main-button-content.vue.mjs";
|
|
7
7
|
import "./components/menu-list-content.vue.mjs";
|
|
8
|
-
import {
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
|
|
8
|
+
import { useSendToUrl as ie } from "./hooks/use-send-to-url.mjs";
|
|
9
|
+
import { useViewProvide as oe } from "./hooks/use-view-provide.mjs";
|
|
10
|
+
import se from "./icons/line-down.vue.mjs";
|
|
11
|
+
import re from "./style/index.mjs";
|
|
12
|
+
import { SYSTEM_VIEW_KEY as v } from "./utils/enum.mjs";
|
|
13
|
+
import { useGlobalConfig as le } from "../../config-provider/hooks/use-global-config.mjs";
|
|
14
|
+
import { useNamespace as ne } from "../../config-provider/hooks/use-namespace.mjs";
|
|
15
|
+
import { useLocale as me } from "../../config-provider/hooks/use-locale.mjs";
|
|
16
|
+
import ue from "./components/main-button-content.vue2.mjs";
|
|
17
|
+
import ce from "./components/menu-list-content.vue2.mjs";
|
|
18
|
+
const Ie = /* @__PURE__ */ z({
|
|
18
19
|
name: "ApView",
|
|
19
20
|
__name: "ap-view",
|
|
20
21
|
props: {
|
|
@@ -37,171 +38,190 @@ const De = /* @__PURE__ */ U({
|
|
|
37
38
|
default: !1
|
|
38
39
|
},
|
|
39
40
|
emptyData: {},
|
|
40
|
-
extraParams: {}
|
|
41
|
+
extraParams: {},
|
|
42
|
+
sendToUrl: {
|
|
43
|
+
type: Boolean,
|
|
44
|
+
default: !0
|
|
45
|
+
},
|
|
46
|
+
initToUrl: {
|
|
47
|
+
type: Boolean,
|
|
48
|
+
default: !0
|
|
49
|
+
}
|
|
41
50
|
},
|
|
42
|
-
setup(
|
|
43
|
-
expose:
|
|
51
|
+
setup(N, {
|
|
52
|
+
expose: _
|
|
44
53
|
}) {
|
|
45
|
-
const
|
|
46
|
-
b:
|
|
47
|
-
} =
|
|
48
|
-
t:
|
|
49
|
-
} =
|
|
50
|
-
viewKey:
|
|
51
|
-
viewName:
|
|
54
|
+
const a = N, O = le("viewCacheOption"), {
|
|
55
|
+
b: V
|
|
56
|
+
} = ne("ap-view"), {
|
|
57
|
+
t: x
|
|
58
|
+
} = me(), F = re("ap-view"), S = c(() => ({
|
|
59
|
+
viewKey: v,
|
|
60
|
+
viewName: x("ap.apView.systemView")
|
|
52
61
|
})), {
|
|
53
|
-
getSearchFormValues:
|
|
62
|
+
getSearchFormValues: B,
|
|
54
63
|
setSearchFormValues: L,
|
|
55
|
-
submit:
|
|
56
|
-
reset:
|
|
57
|
-
submitWith:
|
|
58
|
-
getSearchFormSorterItems:
|
|
59
|
-
setSearchFormSorterItems:
|
|
60
|
-
resetSearchFormSorterItems:
|
|
61
|
-
} =
|
|
62
|
-
let
|
|
63
|
-
const
|
|
64
|
+
submit: P,
|
|
65
|
+
reset: E,
|
|
66
|
+
submitWith: k,
|
|
67
|
+
getSearchFormSorterItems: A,
|
|
68
|
+
setSearchFormSorterItems: W,
|
|
69
|
+
resetSearchFormSorterItems: j
|
|
70
|
+
} = te(), G = d(!1), h = d(!1), w = d("");
|
|
71
|
+
let n = !1, C = !1, K = !0;
|
|
72
|
+
const $ = {
|
|
64
73
|
dropdownType: "dropdown",
|
|
65
|
-
content:
|
|
66
|
-
maxViewNum:
|
|
74
|
+
content: g(ue, {
|
|
75
|
+
maxViewNum: a.maxViewNum
|
|
67
76
|
}, null)
|
|
68
|
-
},
|
|
77
|
+
}, o = d([S.value]), M = c(() => o.value.map((t) => ({
|
|
69
78
|
id: t.viewKey,
|
|
70
|
-
content:
|
|
79
|
+
content: g(ce, {
|
|
71
80
|
view: t
|
|
72
81
|
}, null)
|
|
73
|
-
}))),
|
|
74
|
-
getSearchFormValues:
|
|
82
|
+
}))), s = {
|
|
83
|
+
getSearchFormValues: B,
|
|
75
84
|
setSearchFormValues: L,
|
|
76
|
-
submit:
|
|
77
|
-
reset:
|
|
78
|
-
submitWith:
|
|
79
|
-
getSearchFormSorterItems:
|
|
80
|
-
setSearchFormSorterItems:
|
|
81
|
-
resetSearchFormSorterItems:
|
|
82
|
-
...
|
|
83
|
-
},
|
|
84
|
-
...
|
|
85
|
-
...
|
|
86
|
-
},
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
85
|
+
submit: P,
|
|
86
|
+
reset: E,
|
|
87
|
+
submitWith: k,
|
|
88
|
+
getSearchFormSorterItems: A,
|
|
89
|
+
setSearchFormSorterItems: W,
|
|
90
|
+
resetSearchFormSorterItems: j,
|
|
91
|
+
...a.saveDataSource
|
|
92
|
+
}, y = {
|
|
93
|
+
...O.value,
|
|
94
|
+
...a.viewCacheOption
|
|
95
|
+
}, {
|
|
96
|
+
mountedData: b,
|
|
97
|
+
isValidMountedData: T
|
|
98
|
+
} = ie({
|
|
99
|
+
saveDataSource: s,
|
|
100
|
+
sendToUrl: c(() => a.sendToUrl),
|
|
101
|
+
tableKey: c(() => a.tableKey)
|
|
102
|
+
}), U = () => a.isDefaultSystemView ? v : (a.isFirstDefaultSystemView || C) && n ? v : o.value.find((i) => i.isDefault)?.viewKey ?? v, m = (t) => {
|
|
103
|
+
w.value = t;
|
|
104
|
+
const i = o.value.find((e) => e.viewKey === w.value);
|
|
105
|
+
i && setTimeout(() => {
|
|
106
|
+
i.viewKey === v ? n ? a.manual || (a.sendToUrl && K && a.initToUrl && T.value && s?.setSearchFormValues?.(b.value), s?.submitWith?.()) : a.manual || (s?.resetSearchFormSorterItems?.(), s?.reset?.()) : (a.sendToUrl && K && a.initToUrl && T.value && n ? s?.setSearchFormValues?.(b.value) : s?.setSearchFormValues?.({
|
|
107
|
+
...Object.fromEntries(Object.keys(s?.getSearchFormValues?.() ?? {}).map((e) => [e, void 0])) ?? {},
|
|
108
|
+
...a?.emptyData ?? {},
|
|
109
|
+
...[...s?.getSearchFormSorterItems?.() ?? [], ...a?.extraParams?.map((e) => ({
|
|
94
110
|
name: e
|
|
95
|
-
})) ?? []].reduce((e,
|
|
96
|
-
}),
|
|
111
|
+
})) ?? []].reduce((e, r) => (i.viewConfig?.searchForm?.[r.name] && (e[r.name] = i.viewConfig?.searchForm?.[r.name]), e), {}) ?? {}
|
|
112
|
+
}), s?.setSearchFormSorterItems?.(i.viewConfig?.sorterItems ?? []), n ? a.manual || s?.submitWith?.() : s?.submit?.()), n = !1;
|
|
97
113
|
});
|
|
98
|
-
},
|
|
114
|
+
}, I = {
|
|
99
115
|
getViewList: async (t) => {
|
|
100
116
|
try {
|
|
101
117
|
const {
|
|
102
|
-
tableKey:
|
|
103
|
-
} = t, e = await
|
|
104
|
-
tableKey:
|
|
118
|
+
tableKey: i
|
|
119
|
+
} = t, e = await y?.getViewList?.({
|
|
120
|
+
tableKey: i
|
|
105
121
|
});
|
|
106
|
-
return
|
|
122
|
+
return o.value = [S.value, ...e ?? []], m(U()), o.value;
|
|
107
123
|
} catch {
|
|
108
|
-
return
|
|
124
|
+
return o.value = [S.value], m(v), o.value;
|
|
109
125
|
}
|
|
110
126
|
},
|
|
111
127
|
addView: async (t) => {
|
|
112
128
|
const {
|
|
113
|
-
tableKey:
|
|
129
|
+
tableKey: i,
|
|
114
130
|
viewKey: e,
|
|
115
|
-
viewName:
|
|
116
|
-
isDefault:
|
|
117
|
-
viewConfig:
|
|
131
|
+
viewName: r,
|
|
132
|
+
isDefault: l,
|
|
133
|
+
viewConfig: p
|
|
118
134
|
} = t;
|
|
119
|
-
await
|
|
120
|
-
tableKey:
|
|
135
|
+
await y?.addView?.({
|
|
136
|
+
tableKey: i,
|
|
121
137
|
viewKey: e,
|
|
122
|
-
viewName:
|
|
123
|
-
isDefault:
|
|
124
|
-
viewConfig:
|
|
125
|
-
}),
|
|
126
|
-
...
|
|
138
|
+
viewName: r,
|
|
139
|
+
isDefault: l,
|
|
140
|
+
viewConfig: p
|
|
141
|
+
}), l && (o.value = o.value.map((u) => ({
|
|
142
|
+
...u,
|
|
127
143
|
isDefault: !1
|
|
128
|
-
}))),
|
|
144
|
+
}))), o.value = [...o.value, {
|
|
129
145
|
viewKey: e,
|
|
130
|
-
viewName:
|
|
131
|
-
isDefault:
|
|
132
|
-
viewConfig:
|
|
146
|
+
viewName: r,
|
|
147
|
+
isDefault: l,
|
|
148
|
+
viewConfig: p
|
|
133
149
|
}], m(e);
|
|
134
150
|
},
|
|
135
151
|
changeView: async (t) => {
|
|
136
152
|
const {
|
|
137
|
-
tableKey:
|
|
153
|
+
tableKey: i,
|
|
138
154
|
viewKey: e,
|
|
139
|
-
viewName:
|
|
140
|
-
isDefault:
|
|
141
|
-
viewConfig:
|
|
155
|
+
viewName: r,
|
|
156
|
+
isDefault: l,
|
|
157
|
+
viewConfig: p
|
|
142
158
|
} = t;
|
|
143
|
-
await
|
|
144
|
-
tableKey:
|
|
159
|
+
await y?.changeView?.({
|
|
160
|
+
tableKey: i,
|
|
145
161
|
viewKey: e,
|
|
146
|
-
viewName:
|
|
147
|
-
isDefault:
|
|
148
|
-
viewConfig:
|
|
149
|
-
}),
|
|
150
|
-
...
|
|
162
|
+
viewName: r,
|
|
163
|
+
isDefault: l,
|
|
164
|
+
viewConfig: p
|
|
165
|
+
}), l && (o.value = o.value.map((D) => ({
|
|
166
|
+
...D,
|
|
151
167
|
isDefault: !1
|
|
152
168
|
})));
|
|
153
|
-
const
|
|
154
|
-
|
|
169
|
+
const u = o.value.find((D) => D.viewKey === e);
|
|
170
|
+
u && (u.viewName = r, u.isDefault = l, u.viewConfig = p), m(e);
|
|
155
171
|
},
|
|
156
172
|
removeView: async (t) => {
|
|
157
173
|
const {
|
|
158
|
-
tableKey:
|
|
174
|
+
tableKey: i,
|
|
159
175
|
viewKey: e
|
|
160
176
|
} = t;
|
|
161
|
-
await
|
|
162
|
-
tableKey:
|
|
177
|
+
await y?.removeView?.({
|
|
178
|
+
tableKey: i,
|
|
163
179
|
viewKey: e
|
|
164
|
-
}),
|
|
180
|
+
}), o.value = o.value.filter((r) => r.viewKey !== e), e === w.value && m(U());
|
|
165
181
|
}
|
|
166
|
-
},
|
|
167
|
-
tableKey:
|
|
168
|
-
currentViewKey:
|
|
182
|
+
}, Y = {
|
|
183
|
+
tableKey: c(() => a.tableKey),
|
|
184
|
+
currentViewKey: w,
|
|
169
185
|
changeCurrentViewKey: m,
|
|
170
|
-
popoverOpen:
|
|
171
|
-
menuOpen:
|
|
172
|
-
viewList:
|
|
173
|
-
viewListCRUD:
|
|
174
|
-
saveDataSource:
|
|
186
|
+
popoverOpen: G,
|
|
187
|
+
menuOpen: h,
|
|
188
|
+
viewList: o,
|
|
189
|
+
viewListCRUD: I,
|
|
190
|
+
saveDataSource: s
|
|
175
191
|
};
|
|
176
|
-
return
|
|
177
|
-
|
|
192
|
+
return oe(Y), R(() => a.tableKey, (t) => {
|
|
193
|
+
ee(t) && (n = !0, I?.getViewList?.({
|
|
178
194
|
tableKey: t
|
|
179
195
|
}));
|
|
180
196
|
}, {
|
|
181
197
|
immediate: !0
|
|
182
|
-
}),
|
|
198
|
+
}), _({
|
|
183
199
|
setFirstDefaultSystemView: (t) => {
|
|
184
|
-
|
|
185
|
-
}
|
|
186
|
-
|
|
200
|
+
C = t;
|
|
201
|
+
},
|
|
202
|
+
setInitToUrl: (t) => {
|
|
203
|
+
K = t;
|
|
204
|
+
},
|
|
205
|
+
mountedData: c(() => b.value)
|
|
206
|
+
}), (t, i) => (H(), q(f(ae), J({
|
|
187
207
|
...t.$attrs
|
|
188
208
|
}, {
|
|
189
|
-
open:
|
|
190
|
-
"onUpdate:open":
|
|
191
|
-
class: [
|
|
192
|
-
"button-props":
|
|
193
|
-
"menu-list":
|
|
194
|
-
"overlay-class-name": [
|
|
209
|
+
open: h.value,
|
|
210
|
+
"onUpdate:open": i[0] || (i[0] = (e) => h.value = e),
|
|
211
|
+
class: [f(V)(), f(F)],
|
|
212
|
+
"button-props": $,
|
|
213
|
+
"menu-list": M.value,
|
|
214
|
+
"overlay-class-name": [f(V)("overlay"), f(F)],
|
|
195
215
|
trigger: "click",
|
|
196
216
|
placement: "bottom"
|
|
197
217
|
}), {
|
|
198
|
-
icon:
|
|
199
|
-
class:
|
|
200
|
-
}, [
|
|
218
|
+
icon: Q(() => [X("div", {
|
|
219
|
+
class: Z([f(V)("icon")])
|
|
220
|
+
}, [g(se)], 2)]),
|
|
201
221
|
_: 1
|
|
202
222
|
}, 16, ["open", "class", "menu-list", "overlay-class-name"]));
|
|
203
223
|
}
|
|
204
224
|
});
|
|
205
225
|
export {
|
|
206
|
-
|
|
226
|
+
Ie as default
|
|
207
227
|
};
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { ApFormProps, UpdateModelOptimizeFn, ApFormInternalInstance, WatchFunc } from '../../../ap-form';
|
|
2
2
|
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions, ComponentInternalInstance, ExtractPropTypes, PropType, HTMLAttributes, VNodeProps, AllowedComponentProps, ComponentCustomProps, CreateComponentPublicInstanceWithMixins, GlobalComponents, GlobalDirectives, Slot, ComponentPublicInstance, ComponentOptionsBase, DebuggerEvent, nextTick, WatchOptions, WatchStopHandle, ShallowUnwrapRef, ComponentCustomProperties } from 'vue';
|
|
3
3
|
import { ColSize } from '@aplus-frontend/antdv/es/grid';
|
|
4
|
-
import { FormLabelAlign, ValidateMessages, FieldData, ValidateErrorEntity, NamePath, ValidateOptions, InternalNamePath } from '@aplus-frontend/antdv/es/form/interface';
|
|
4
|
+
import { FormLabelAlign, ValidateMessages, FieldData, ValidateErrorEntity, NamePath, RuleObject, ValidateOptions, InternalNamePath } from '@aplus-frontend/antdv/es/form/interface';
|
|
5
5
|
import { RequiredMark } from '@aplus-frontend/antdv/es/form/Form';
|
|
6
6
|
import { RuleObject } from '@aplus-frontend/antdv/es/form';
|
|
7
7
|
import { Options } from '../../../../node_modules/scroll-into-view-if-needed';
|
|
8
8
|
import { Recordable } from '../../../type';
|
|
9
9
|
import { VueTypeDef, VueTypeValidableDef } from '../../../../node_modules/vue-types';
|
|
10
|
+
import { SizeType } from '@aplus-frontend/antdv/es/config-provider';
|
|
10
11
|
import { SizeType } from '@aplus-frontend/antdv/es/button';
|
|
11
12
|
import { VueNode } from '@aplus-frontend/antdv/es/_util/type';
|
|
12
13
|
import { OnCleanup } from '@vue/reactivity';
|
|
@@ -109,7 +110,7 @@ declare const _default: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOp
|
|
|
109
110
|
readonly onValidate?: ((name: string | number | string[] | number[], status: boolean, errors: string[]) => void) | undefined;
|
|
110
111
|
readonly initialValues?: Recordable | undefined;
|
|
111
112
|
readonly onValuesChange?: ((changedValues: Recordable, allValues: Recordable, fieldName: NamePath) => void) | undefined;
|
|
112
|
-
readonly syncToUrl?: boolean | ((values: Recordable, type: "get" | "set") => Recordable) | undefined;
|
|
113
|
+
readonly syncToUrl?: (boolean | ((values: Recordable, type: "get" | "set") => Recordable)) | undefined;
|
|
113
114
|
readonly syncToUrlPriority?: boolean | undefined;
|
|
114
115
|
readonly autoFocusFirstInput?: boolean | undefined;
|
|
115
116
|
} & VNodeProps & AllowedComponentProps & ComponentCustomProps;
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { ViewListModel } from '../interface';
|
|
2
2
|
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions, ComponentInternalInstance, ExtractPropTypes, PropType, HTMLAttributes, VNodeProps, AllowedComponentProps, ComponentCustomProps, CreateComponentPublicInstanceWithMixins, GlobalComponents, GlobalDirectives, Slot, ComponentPublicInstance, ComponentOptionsBase, DebuggerEvent, nextTick, WatchOptions, WatchStopHandle, ShallowUnwrapRef, ComponentCustomProperties } from 'vue';
|
|
3
3
|
import { ColSize } from '@aplus-frontend/antdv/es/grid';
|
|
4
|
-
import { FormLabelAlign, ValidateMessages, FieldData, ValidateErrorEntity, NamePath, ValidateOptions, InternalNamePath } from '@aplus-frontend/antdv/es/form/interface';
|
|
4
|
+
import { FormLabelAlign, ValidateMessages, FieldData, ValidateErrorEntity, NamePath, RuleObject, ValidateOptions, InternalNamePath } from '@aplus-frontend/antdv/es/form/interface';
|
|
5
5
|
import { RequiredMark } from '@aplus-frontend/antdv/es/form/Form';
|
|
6
6
|
import { RuleObject } from '@aplus-frontend/antdv/es/form';
|
|
7
7
|
import { Options } from '../../../../node_modules/scroll-into-view-if-needed';
|
|
8
8
|
import { Recordable } from '../../../type';
|
|
9
9
|
import { VueTypeDef, VueTypeValidableDef } from '../../../../node_modules/vue-types';
|
|
10
|
+
import { SizeType } from '@aplus-frontend/antdv/es/config-provider';
|
|
10
11
|
import { SizeType } from '@aplus-frontend/antdv/es/button';
|
|
11
12
|
import { VueNode } from '@aplus-frontend/antdv/es/_util/type';
|
|
12
13
|
import { ApFormProps, UpdateModelOptimizeFn, ApFormInternalInstance, WatchFunc } from '../../../ap-form';
|
|
@@ -110,7 +111,7 @@ declare const _default: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOp
|
|
|
110
111
|
readonly onValidate?: ((name: string | number | string[] | number[], status: boolean, errors: string[]) => void) | undefined;
|
|
111
112
|
readonly initialValues?: Recordable | undefined;
|
|
112
113
|
readonly onValuesChange?: ((changedValues: Recordable, allValues: Recordable, fieldName: NamePath) => void) | undefined;
|
|
113
|
-
readonly syncToUrl?: boolean | ((values: Recordable, type: "get" | "set") => Recordable) | undefined;
|
|
114
|
+
readonly syncToUrl?: (boolean | ((values: Recordable, type: "get" | "set") => Recordable)) | undefined;
|
|
114
115
|
readonly syncToUrlPriority?: boolean | undefined;
|
|
115
116
|
readonly autoFocusFirstInput?: boolean | undefined;
|
|
116
117
|
} & VNodeProps & AllowedComponentProps & ComponentCustomProps;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ComputedRef } from 'vue';
|
|
2
|
+
import { Recordable } from '../../../type';
|
|
3
|
+
import { SaveDataSource } from '../interface';
|
|
4
|
+
export declare const useSendToUrl: (option: {
|
|
5
|
+
saveDataSource: SaveDataSource;
|
|
6
|
+
sendToUrl: ComputedRef<boolean>;
|
|
7
|
+
tableKey: ComputedRef<string>;
|
|
8
|
+
}) => {
|
|
9
|
+
mountedData: ComputedRef<Recordable>;
|
|
10
|
+
isValidMountedData: ComputedRef<boolean>;
|
|
11
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { isObjectWithContent as c } from "@aplus-frontend/utils";
|
|
2
|
+
import { ref as d, onMounted as m, onUnmounted as f, computed as n } from "vue";
|
|
3
|
+
import { getUrlQuery as v, setUrlQuery as p } from "../utils/query.mjs";
|
|
4
|
+
const U = (u) => {
|
|
5
|
+
const { saveDataSource: s, sendToUrl: i, tableKey: o } = u;
|
|
6
|
+
let a, e, r = !1;
|
|
7
|
+
const t = d({});
|
|
8
|
+
return m(() => {
|
|
9
|
+
if (i?.value) {
|
|
10
|
+
try {
|
|
11
|
+
t.value = JSON.parse(
|
|
12
|
+
atob(v()[o.value] ?? "")
|
|
13
|
+
);
|
|
14
|
+
} catch {
|
|
15
|
+
t.value = {};
|
|
16
|
+
}
|
|
17
|
+
a = setInterval(() => {
|
|
18
|
+
try {
|
|
19
|
+
const l = btoa(
|
|
20
|
+
JSON.stringify(s?.getSearchFormValues?.() ?? {})
|
|
21
|
+
);
|
|
22
|
+
l !== e && (e = l, r = !0);
|
|
23
|
+
} catch {
|
|
24
|
+
e = "";
|
|
25
|
+
}
|
|
26
|
+
r && (p({ [o.value]: e }), r = !1);
|
|
27
|
+
}, 500);
|
|
28
|
+
}
|
|
29
|
+
}), f(() => {
|
|
30
|
+
a && clearInterval(a);
|
|
31
|
+
}), {
|
|
32
|
+
mountedData: n(() => t.value),
|
|
33
|
+
isValidMountedData: n(() => c(t.value))
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
export {
|
|
37
|
+
U as useSendToUrl
|
|
38
|
+
};
|