@aplus-frontend/ui 7.12.5 → 7.13.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/components/loading/index.vue.d.ts +3 -0
- package/es/src/ag-grid/components/loading/index.vue.mjs +4 -0
- package/es/src/ag-grid/components/loading/index.vue2.mjs +18 -0
- package/es/src/ag-grid/context.mjs +1 -1
- package/es/src/ag-grid/editable/form-item.vue.d.ts +2 -4
- package/es/src/ag-grid/editable/form-item.vue.mjs +30 -27
- package/es/src/ag-grid/editable/index.vue.d.ts +2 -4
- package/es/src/ag-grid/editable/index.vue.mjs +10 -8
- package/es/src/ag-grid/editable/interface.d.ts +2 -1
- package/es/src/ag-grid/hooks/use-pinned-row.mjs +2 -2
- package/es/src/ag-grid/index.vue.d.ts +2 -4
- package/es/src/ag-grid/index.vue.mjs +209 -202
- package/es/src/ag-grid/interface.d.ts +4 -0
- package/es/src/ag-grid/style/index.mjs +8 -5
- package/es/src/ap-drawer/interface.d.ts +13 -2
- package/es/src/ap-drawer/utils/createDrawer.mjs +37 -32
- package/es/src/ap-field/select/index.vue.d.ts +1 -2
- package/es/src/ap-field/select/index.vue.mjs +126 -88
- package/es/src/ap-field/select/use-select-options.d.ts +2 -2
- package/es/src/ap-field/style/index.mjs +8 -6
- package/es/src/ap-field/style/select.d.ts +2 -0
- package/es/src/ap-field/style/select.mjs +43 -0
- package/es/src/ap-field/tree-select/use-request.d.ts +4 -4
- package/es/src/ap-form/ap-form.vue.d.ts +1 -2
- package/es/src/ap-form/context.mjs +1 -1
- package/es/src/ap-form/drawer-form/index.vue.d.ts +3 -4
- package/es/src/ap-form/item-group/helper.mjs +2 -2
- package/es/src/ap-form/items/number/index.vue.d.ts +4 -5
- package/es/src/ap-form/items/select/index.vue.d.ts +12 -16
- package/es/src/ap-form/items/text/index.vue.d.ts +2 -2
- package/es/src/ap-form/items/text/password.vue.d.ts +2 -2
- package/es/src/ap-form/items/tree-select/index.vue.d.ts +2 -2
- package/es/src/ap-form/modal-form/index.vue.d.ts +3 -4
- package/es/src/ap-form/provider/context.mjs +1 -1
- package/es/src/ap-form/search-form/index.vue.d.ts +3 -4
- package/es/src/ap-grid/editable/form-item.vue.d.ts +2 -4
- package/es/src/ap-grid/editable/index.vue.d.ts +2 -4
- package/es/src/ap-grid/index.vue.d.ts +2 -4
- package/es/src/ap-grid/utils/table.mjs +2 -2
- package/es/src/ap-list/index.vue.d.ts +2 -4
- 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 +2 -4
- package/es/src/ap-table/ap-table.vue2.mjs +15 -16
- package/es/src/ap-table/components/setting/context.d.ts +17 -0
- package/es/src/ap-table/components/setting/context.mjs +18 -0
- package/es/src/ap-table/components/setting/modal/index.vue.d.ts +1 -1
- package/es/src/ap-table/components/setting/modal/index.vue2.mjs +217 -88
- package/es/src/ap-table/components/setting/sorter/context.mjs +1 -1
- package/es/src/ap-table/components/setting/sorter/index.vue2.mjs +49 -51
- package/es/src/ap-table/components/setting/template/edit-form.vue.d.ts +844 -0
- package/es/src/ap-table/components/setting/template/edit-form.vue.mjs +4 -0
- package/es/src/ap-table/components/setting/template/edit-form.vue2.mjs +74 -0
- package/es/src/ap-table/components/setting/template/index.vue.d.ts +11 -0
- package/es/src/ap-table/components/setting/template/index.vue.mjs +4 -0
- package/es/src/ap-table/components/setting/template/index.vue2.mjs +51 -0
- package/es/src/ap-table/components/setting/template/item.vue.d.ts +13 -0
- package/es/src/ap-table/components/setting/template/item.vue.mjs +4 -0
- package/es/src/ap-table/components/setting/template/item.vue2.mjs +77 -0
- package/es/src/ap-table/components/setting/tree-select/index.vue.d.ts +1 -1
- package/es/src/ap-table/components/setting/tree-select/index.vue2.mjs +26 -29
- package/es/src/ap-table/components/setting/utils.d.ts +1 -0
- package/es/src/ap-table/components/setting/utils.mjs +22 -15
- package/es/src/ap-table/constants.d.ts +13 -15
- package/es/src/ap-table/context.mjs +1 -1
- package/es/src/ap-table/hooks/use-table-column-state.d.ts +4 -23
- package/es/src/ap-table/hooks/use-table-column-state.mjs +32 -120
- package/es/src/ap-table/hooks/use-table-template-storage.d.ts +49 -0
- package/es/src/ap-table/hooks/use-table-template-storage.mjs +150 -0
- package/es/src/ap-table/interface.d.ts +26 -3
- package/es/src/ap-table/style/index.d.ts +1 -0
- package/es/src/ap-table/style/index.mjs +2 -1
- package/es/src/ap-table/style/setting.d.ts +2 -0
- package/es/src/ap-table/style/setting.mjs +114 -19
- 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/ag-grid-modal/style/index.mjs +7 -7
- package/es/src/business/ap-attachment/ApAttachment.mjs +96 -89
- package/es/src/business/ap-attachment/style/index.mjs +33 -16
- package/es/src/business/ap-batch-action-group/ApBatchActionGroup.vue2.mjs +24 -22
- package/es/src/business/ap-batch-action-group/MenuItemGroup.vue.d.ts +1 -1
- package/es/src/business/ap-batch-action-group/MenuItemGroup.vue2.mjs +35 -31
- package/es/src/business/ap-batch-action-group/index.d.ts +6 -6
- package/es/src/business/ap-batch-action-group/interface.d.ts +1 -1
- 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 +1 -3
- package/es/src/business/ap-draggable-grid/index.d.ts +1 -1
- package/es/src/business/ap-expand-alert/ApExpandAlert.vue.d.ts +2 -4
- 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 +2 -4
- package/es/src/business/ap-select-layout/select-layout.vue.d.ts +2 -4
- package/es/src/business/ap-table-modal/index.d.ts +17 -5
- package/es/src/business/ap-upload/components/MultipleFile.vue.d.ts +1 -1
- package/es/src/business/ap-upload/components/MultipleFile.vue2.mjs +19 -19
- package/es/src/business/ap-upload/components/Picture.vue2.mjs +34 -34
- package/es/src/business/ap-upload/style/single-file.mjs +2 -2
- package/es/src/business/ap-upload-file/ap-upload-single/style/index.mjs +2 -2
- package/es/src/business/ap-value-select-card/index.vue.d.ts +2 -4
- package/es/src/business/ap-value-select-card/style/index.mjs +3 -2
- package/es/src/business/ap-view/components/main-button-content.vue.d.ts +3 -4
- package/es/src/business/ap-view/components/menu-list-content.vue.d.ts +2 -3
- package/es/src/business/ap-view/components/menu-list-content.vue2.mjs +21 -21
- package/es/src/business/ap-view/hooks/use-view-provide.mjs +1 -1
- package/es/src/business/ap-view/style/index.mjs +2 -2
- package/es/src/business/batch-input-group/index.vue.d.ts +1 -1
- 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 +5 -1
- 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/design-token/index.mjs +5 -5
- package/es/src/editable-table/form-item.vue.d.ts +2 -4
- package/es/src/editable-table/index.vue.d.ts +2 -4
- package/es/src/editable-table/utils.mjs +1 -1
- package/es/src/locale/lang/en.mjs +15 -4
- package/es/src/locale/lang/zh-cn.mjs +18 -7
- 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 +26 -27
- package/es/src/utils/data-range-persets.d.ts +13 -1
- package/es/src/utils/data-range-persets.mjs +80 -60
- package/es/src/utils/index.d.ts +1 -0
- package/es/src/utils/index.mjs +56 -48
- package/es/src/utils/retry.d.ts +12 -0
- package/es/src/utils/retry.mjs +27 -0
- 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/components/loading/index.vue.d.ts +3 -0
- package/lib/src/ag-grid/components/loading/index.vue.js +1 -0
- package/lib/src/ag-grid/components/loading/index.vue2.js +1 -0
- package/lib/src/ag-grid/editable/form-item.vue.d.ts +2 -4
- package/lib/src/ag-grid/editable/form-item.vue.js +1 -1
- package/lib/src/ag-grid/editable/index.vue.d.ts +2 -4
- package/lib/src/ag-grid/editable/index.vue.js +1 -1
- package/lib/src/ag-grid/editable/interface.d.ts +2 -1
- package/lib/src/ag-grid/hooks/use-pinned-row.js +1 -1
- package/lib/src/ag-grid/index.vue.d.ts +2 -4
- package/lib/src/ag-grid/index.vue.js +1 -1
- package/lib/src/ag-grid/interface.d.ts +4 -0
- package/lib/src/ag-grid/style/index.js +1 -1
- package/lib/src/ap-drawer/interface.d.ts +13 -2
- package/lib/src/ap-drawer/utils/createDrawer.js +1 -1
- package/lib/src/ap-field/select/index.vue.d.ts +1 -2
- package/lib/src/ap-field/select/index.vue.js +1 -1
- package/lib/src/ap-field/select/use-select-options.d.ts +2 -2
- package/lib/src/ap-field/style/index.js +1 -1
- package/lib/src/ap-field/style/select.d.ts +2 -0
- package/lib/src/ap-field/style/select.js +1 -0
- package/lib/src/ap-field/tree-select/use-request.d.ts +4 -4
- package/lib/src/ap-form/ap-form.vue.d.ts +1 -2
- package/lib/src/ap-form/drawer-form/index.vue.d.ts +3 -4
- package/lib/src/ap-form/items/number/index.vue.d.ts +4 -5
- package/lib/src/ap-form/items/select/index.vue.d.ts +12 -16
- package/lib/src/ap-form/items/text/index.vue.d.ts +2 -2
- package/lib/src/ap-form/items/text/password.vue.d.ts +2 -2
- package/lib/src/ap-form/items/tree-select/index.vue.d.ts +2 -2
- package/lib/src/ap-form/modal-form/index.vue.d.ts +3 -4
- package/lib/src/ap-form/search-form/index.vue.d.ts +3 -4
- package/lib/src/ap-grid/editable/form-item.vue.d.ts +2 -4
- package/lib/src/ap-grid/editable/index.vue.d.ts +2 -4
- package/lib/src/ap-grid/index.vue.d.ts +2 -4
- package/lib/src/ap-grid/utils/table.js +1 -1
- package/lib/src/ap-list/index.vue.d.ts +2 -4
- package/lib/src/ap-modal/utils/confirm.d.ts +1 -1
- package/lib/src/ap-table/ap-table.vue.d.ts +2 -4
- package/lib/src/ap-table/ap-table.vue2.js +1 -1
- package/lib/src/ap-table/components/setting/context.d.ts +17 -0
- package/lib/src/ap-table/components/setting/context.js +1 -0
- package/lib/src/ap-table/components/setting/modal/index.vue.d.ts +1 -1
- package/lib/src/ap-table/components/setting/modal/index.vue2.js +1 -1
- package/lib/src/ap-table/components/setting/sorter/index.vue2.js +1 -1
- package/lib/src/ap-table/components/setting/template/edit-form.vue.d.ts +844 -0
- package/lib/src/ap-table/components/setting/template/edit-form.vue.js +1 -0
- package/lib/src/ap-table/components/setting/template/edit-form.vue2.js +1 -0
- package/lib/src/ap-table/components/setting/template/index.vue.d.ts +11 -0
- package/lib/src/ap-table/components/setting/template/index.vue.js +1 -0
- package/lib/src/ap-table/components/setting/template/index.vue2.js +1 -0
- package/lib/src/ap-table/components/setting/template/item.vue.d.ts +13 -0
- package/lib/src/ap-table/components/setting/template/item.vue.js +1 -0
- package/lib/src/ap-table/components/setting/template/item.vue2.js +1 -0
- package/lib/src/ap-table/components/setting/tree-select/index.vue.d.ts +1 -1
- package/lib/src/ap-table/components/setting/tree-select/index.vue2.js +1 -1
- package/lib/src/ap-table/components/setting/utils.d.ts +1 -0
- package/lib/src/ap-table/components/setting/utils.js +1 -1
- package/lib/src/ap-table/constants.d.ts +13 -15
- package/lib/src/ap-table/hooks/use-table-column-state.d.ts +4 -23
- package/lib/src/ap-table/hooks/use-table-column-state.js +1 -1
- package/lib/src/ap-table/hooks/use-table-template-storage.d.ts +49 -0
- package/lib/src/ap-table/hooks/use-table-template-storage.js +1 -0
- package/lib/src/ap-table/interface.d.ts +26 -3
- package/lib/src/ap-table/style/index.d.ts +1 -0
- package/lib/src/ap-table/style/index.js +1 -1
- package/lib/src/ap-table/style/setting.d.ts +2 -0
- package/lib/src/ap-table/style/setting.js +1 -1
- package/lib/src/business/ag-grid-modal/style/index.js +1 -1
- package/lib/src/business/ap-attachment/ApAttachment.js +1 -1
- package/lib/src/business/ap-attachment/style/index.js +1 -1
- package/lib/src/business/ap-batch-action-group/ApBatchActionGroup.vue2.js +1 -1
- package/lib/src/business/ap-batch-action-group/MenuItemGroup.vue.d.ts +1 -1
- package/lib/src/business/ap-batch-action-group/MenuItemGroup.vue2.js +1 -1
- package/lib/src/business/ap-batch-action-group/index.d.ts +6 -6
- package/lib/src/business/ap-batch-action-group/interface.d.ts +1 -1
- 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 +2 -4
- package/lib/src/business/ap-select-layout/index.d.ts +2 -4
- package/lib/src/business/ap-select-layout/select-layout.vue.d.ts +2 -4
- package/lib/src/business/ap-table-modal/index.d.ts +17 -5
- package/lib/src/business/ap-upload/components/MultipleFile.vue.d.ts +1 -1
- package/lib/src/business/ap-upload/components/MultipleFile.vue2.js +1 -1
- package/lib/src/business/ap-upload/components/Picture.vue2.js +1 -1
- package/lib/src/business/ap-upload/style/single-file.js +1 -1
- package/lib/src/business/ap-upload-file/ap-upload-single/style/index.js +1 -1
- package/lib/src/business/ap-value-select-card/index.vue.d.ts +2 -4
- package/lib/src/business/ap-value-select-card/style/index.js +1 -1
- package/lib/src/business/ap-view/components/main-button-content.vue.d.ts +3 -4
- package/lib/src/business/ap-view/components/menu-list-content.vue.d.ts +2 -3
- package/lib/src/business/ap-view/components/menu-list-content.vue2.js +1 -1
- package/lib/src/business/ap-view/style/index.js +1 -1
- package/lib/src/business/batch-input-group/index.vue.d.ts +1 -1
- package/lib/src/config-provider/hooks/use-namespace.d.ts +5 -1
- package/lib/src/design-token/index.js +1 -1
- package/lib/src/editable-table/form-item.vue.d.ts +2 -4
- package/lib/src/editable-table/index.vue.d.ts +2 -4
- package/lib/src/locale/lang/en.js +1 -1
- package/lib/src/locale/lang/zh-cn.js +1 -1
- 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/utils/data-range-persets.d.ts +13 -1
- package/lib/src/utils/data-range-persets.js +1 -1
- package/lib/src/utils/index.d.ts +1 -0
- package/lib/src/utils/index.js +1 -1
- package/lib/src/utils/retry.d.ts +12 -0
- package/lib/src/utils/retry.js +1 -0
- package/lib/src/version.d.ts +1 -1
- package/lib/src/version.js +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
2
|
+
declare const _default: DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, HTMLDivElement>;
|
|
3
|
+
export default _default;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { defineComponent as o, createElementBlock as a, openBlock as t, normalizeClass as n, unref as e, createVNode as p } from "vue";
|
|
2
|
+
import { Spin as m } from "@aplus-frontend/antdv";
|
|
3
|
+
import "../../../config-provider/index.mjs";
|
|
4
|
+
import { useNamespace as c } from "../../../config-provider/hooks/use-namespace.mjs";
|
|
5
|
+
const g = /* @__PURE__ */ o({
|
|
6
|
+
__name: "index",
|
|
7
|
+
setup(i) {
|
|
8
|
+
const { e: r } = c("ag-grid");
|
|
9
|
+
return (s, l) => (t(), a("div", {
|
|
10
|
+
class: n(e(r)("table-loading-wrapper"))
|
|
11
|
+
}, [
|
|
12
|
+
p(e(m), { delay: 300 })
|
|
13
|
+
], 2));
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
export {
|
|
17
|
+
g as default
|
|
18
|
+
};
|
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
import { Recordable } from '../../type';
|
|
2
2
|
import { EditableAgGridFormItemExpose, EditableAgGridFormItemProps } from './interface';
|
|
3
|
-
import { VNodeProps, AllowedComponentProps, ComponentCustomProps, PublicProps, ShallowUnwrapRef, VNode
|
|
3
|
+
import { VNodeProps, AllowedComponentProps, ComponentCustomProps, PublicProps, ShallowUnwrapRef, VNode } from 'vue';
|
|
4
4
|
declare const _default: <RecordType extends Recordable = any>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
5
5
|
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & VNodeProps & AllowedComponentProps & ComponentCustomProps, never>, never> & EditableAgGridFormItemProps<RecordType> & Partial<{}>> & PublicProps;
|
|
6
6
|
expose(exposed: ShallowUnwrapRef<EditableAgGridFormItemExpose<RecordType>>): void;
|
|
7
7
|
attrs: any;
|
|
8
8
|
slots: Readonly<Record<string, any>> & Record<string, any>;
|
|
9
9
|
emit: {};
|
|
10
|
-
}>) => VNode
|
|
11
|
-
[key: string]: any;
|
|
12
|
-
}> & {
|
|
10
|
+
}>) => VNode & {
|
|
13
11
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
14
12
|
};
|
|
15
13
|
export default _default;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as A, useSlots as L, ref as g, onMounted as P, watch as G, createElementBlock as W, openBlock as U, Fragment as $, createVNode as p, unref as
|
|
1
|
+
import { defineComponent as A, useSlots as L, ref as g, onMounted as P, watch as G, createElementBlock as W, openBlock as U, Fragment as $, createVNode as p, unref as l, withCtx as h, mergeProps as q, createSlots as J, renderList as Q, renderSlot as X, normalizeProps as Y, guardReactiveProps as Z } from "vue";
|
|
2
2
|
import { cloneDeep as u, isEqual as ee, omit as oe } from "lodash-unified";
|
|
3
3
|
import { ApForm as y } from "../../ap-form/index.mjs";
|
|
4
4
|
import { useInjectForm as te } from "../../ap-form/context.mjs";
|
|
@@ -14,7 +14,7 @@ import { getShadowName as me } from "../utils.mjs";
|
|
|
14
14
|
import { getColumnTransformOptions as ue, arrayToObject as C } from "./utils.mjs";
|
|
15
15
|
import { useNamespace as de } from "../../config-provider/hooks/use-namespace.mjs";
|
|
16
16
|
import { useGlobalConfig as pe } from "../../config-provider/hooks/use-global-config.mjs";
|
|
17
|
-
import
|
|
17
|
+
import fe from "../index.vue.mjs";
|
|
18
18
|
const _e = /* @__PURE__ */ A({
|
|
19
19
|
name: "EditableGrid",
|
|
20
20
|
__name: "form-item",
|
|
@@ -122,6 +122,7 @@ const _e = /* @__PURE__ */ A({
|
|
|
122
122
|
onUpdate: {},
|
|
123
123
|
customRow: {},
|
|
124
124
|
theme: {},
|
|
125
|
+
emptyComponent: {},
|
|
125
126
|
columns: {},
|
|
126
127
|
defaultValue: {},
|
|
127
128
|
onChange: {},
|
|
@@ -136,8 +137,8 @@ const _e = /* @__PURE__ */ A({
|
|
|
136
137
|
}) {
|
|
137
138
|
const B = L(), o = b, {
|
|
138
139
|
b: v
|
|
139
|
-
} = de("editable-aggrid"), x = ie("editable-aggrid"),
|
|
140
|
-
internalInstance:
|
|
140
|
+
} = de("editable-aggrid"), x = ie("editable-aggrid"), r = g(), {
|
|
141
|
+
internalInstance: s
|
|
141
142
|
} = te();
|
|
142
143
|
function I(e) {
|
|
143
144
|
const t = ue(o.columns || []);
|
|
@@ -149,17 +150,18 @@ const _e = /* @__PURE__ */ A({
|
|
|
149
150
|
return a;
|
|
150
151
|
}
|
|
151
152
|
const i = me(o.name);
|
|
152
|
-
let
|
|
153
|
+
let f = [];
|
|
153
154
|
P(() => {
|
|
154
|
-
const e = o.formItem?.initialValue ?? ne(
|
|
155
|
-
e && (
|
|
155
|
+
const e = o.formItem?.initialValue ?? ne(s?.getInitialValues() ?? {}, o.name);
|
|
156
|
+
e && (s?.updateInitialModel(i, C(u(e), o.rowKey)), f = u(e), n.value || _(u(e), "suffix", !0));
|
|
156
157
|
});
|
|
157
|
-
const
|
|
158
|
+
const n = g([]), S = ae(o.name);
|
|
158
159
|
G(() => S.value, (e) => {
|
|
159
|
-
ee(e,
|
|
160
|
+
ee(e, n.value) || c(e ?? u(f));
|
|
160
161
|
}, {
|
|
161
162
|
deep: !0,
|
|
162
|
-
flush: "post"
|
|
163
|
+
flush: "post",
|
|
164
|
+
immediate: !0
|
|
163
165
|
});
|
|
164
166
|
const T = pe("valueTypeMap"), E = re(o, T, i), {
|
|
165
167
|
add: F,
|
|
@@ -172,9 +174,9 @@ const _e = /* @__PURE__ */ A({
|
|
|
172
174
|
setRowData: O,
|
|
173
175
|
clear: H,
|
|
174
176
|
refreshRowIds: d
|
|
175
|
-
} = se(o,
|
|
177
|
+
} = se(o, s, n, i);
|
|
176
178
|
function K() {
|
|
177
|
-
const e =
|
|
179
|
+
const e = r.value?._internalGridApi;
|
|
178
180
|
if (!d.value?.length || !e)
|
|
179
181
|
return;
|
|
180
182
|
const t = d.value.map((a) => e.getRowNode(a)).filter((a) => !!a);
|
|
@@ -183,17 +185,17 @@ const _e = /* @__PURE__ */ A({
|
|
|
183
185
|
force: !0
|
|
184
186
|
}), d.value = [];
|
|
185
187
|
}
|
|
186
|
-
function
|
|
187
|
-
|
|
188
|
+
function c(e) {
|
|
189
|
+
n.value = [...e];
|
|
188
190
|
const t = C(e, o.rowKey);
|
|
189
|
-
|
|
191
|
+
s?.setFieldValue(o.name, [...e]), s?.setFieldValue(i, t);
|
|
190
192
|
}
|
|
191
193
|
function w(e, t) {
|
|
192
|
-
const a = e === "end" ?
|
|
193
|
-
|
|
194
|
+
const a = e === "end" ? n.value.length - 1 : e;
|
|
195
|
+
r.value?.scrollToRow(a, t);
|
|
194
196
|
}
|
|
195
197
|
function M(e, t) {
|
|
196
|
-
|
|
198
|
+
r.value?.scrollToColumn(e, t);
|
|
197
199
|
}
|
|
198
200
|
return R({
|
|
199
201
|
add: F,
|
|
@@ -204,25 +206,26 @@ const _e = /* @__PURE__ */ A({
|
|
|
204
206
|
getRowsData: D,
|
|
205
207
|
setRowData: O,
|
|
206
208
|
clear: H,
|
|
207
|
-
setTableData:
|
|
209
|
+
setTableData: c,
|
|
208
210
|
scrollTo: w,
|
|
209
211
|
scrollToRow: w,
|
|
210
|
-
scrollToColumn: M
|
|
211
|
-
|
|
212
|
+
scrollToColumn: M,
|
|
213
|
+
table: r
|
|
214
|
+
}), (e, t) => (U(), W($, null, [p(l(y).FormItem, {
|
|
212
215
|
hidden: "",
|
|
213
216
|
name: e.name,
|
|
214
217
|
"initial-value": e.formItem?.initialValue,
|
|
215
218
|
transform: I
|
|
216
|
-
}, null, 8, ["name", "initial-value"]), p(
|
|
219
|
+
}, null, 8, ["name", "initial-value"]), p(l(y).FormItem, {
|
|
217
220
|
label: e.label
|
|
218
221
|
}, {
|
|
219
|
-
default: h(() => [p(
|
|
222
|
+
default: h(() => [p(fe, q(l(oe)(o, ["name", "maxLength", "onChange", "defaultValue", "formItem"]), {
|
|
220
223
|
ref_key: "tableRef",
|
|
221
|
-
ref:
|
|
222
|
-
class: [
|
|
224
|
+
ref: r,
|
|
225
|
+
class: [l(v)(), l(x)],
|
|
223
226
|
size: "mini",
|
|
224
|
-
columns:
|
|
225
|
-
"data-source":
|
|
227
|
+
columns: l(E),
|
|
228
|
+
"data-source": n.value,
|
|
226
229
|
"search-form": !1,
|
|
227
230
|
onUpdate: K
|
|
228
231
|
}), J({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Recordable } from '../../type';
|
|
2
2
|
import { EditableAgGridExpose, EditableAgGridProps } from './interface';
|
|
3
|
-
import { VNodeProps, AllowedComponentProps, ComponentCustomProps, PublicProps, ShallowUnwrapRef, VNode
|
|
3
|
+
import { VNodeProps, AllowedComponentProps, ComponentCustomProps, PublicProps, ShallowUnwrapRef, VNode } from 'vue';
|
|
4
4
|
declare const _default: <RecordType extends Recordable = any>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
5
5
|
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
|
|
6
6
|
readonly "onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
@@ -9,9 +9,7 @@ declare const _default: <RecordType extends Recordable = any>(__VLS_props: NonNu
|
|
|
9
9
|
attrs: any;
|
|
10
10
|
slots: Readonly<Record<string, any>> & Record<string, any>;
|
|
11
11
|
emit: (event: "update:value", ...args: any[]) => void;
|
|
12
|
-
}>) => VNode
|
|
13
|
-
[key: string]: any;
|
|
14
|
-
}> & {
|
|
12
|
+
}>) => VNode & {
|
|
15
13
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
16
14
|
};
|
|
17
15
|
export default _default;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as M, useSlots as $, ref as
|
|
2
|
-
import { isEqual as te, isArray as
|
|
1
|
+
import { defineComponent as M, useSlots as $, ref as b, watch as q, unref as l, createBlock as J, openBlock as Q, withCtx as m, createVNode as v, mergeProps as X, createSlots as Y, renderList as Z, renderSlot as ee, normalizeProps as oe, guardReactiveProps as ae } from "vue";
|
|
2
|
+
import { isEqual as te, isArray as R, omit as ne } from "lodash-unified";
|
|
3
3
|
import { ApForm as c } from "../../ap-form/index.mjs";
|
|
4
4
|
import "../../config-provider/index.mjs";
|
|
5
5
|
import "../../hooks/index.mjs";
|
|
@@ -119,6 +119,7 @@ const Fe = /* @__PURE__ */ M({
|
|
|
119
119
|
onUpdate: {},
|
|
120
120
|
customRow: {},
|
|
121
121
|
theme: {},
|
|
122
|
+
emptyComponent: {},
|
|
122
123
|
columns: {},
|
|
123
124
|
value: {},
|
|
124
125
|
defaultValue: {},
|
|
@@ -137,10 +138,10 @@ const Fe = /* @__PURE__ */ M({
|
|
|
137
138
|
}) {
|
|
138
139
|
const S = $(), a = C, {
|
|
139
140
|
b: T
|
|
140
|
-
} = de("editable-aggrid"), F = se("editable-aggrid"), _ = B, i =
|
|
141
|
+
} = de("editable-aggrid"), F = se("editable-aggrid"), _ = B, i = b(), {
|
|
141
142
|
value: s,
|
|
142
143
|
updateValue: y
|
|
143
|
-
} = ue(a, _), r =
|
|
144
|
+
} = ue(a, _), r = b(), E = c.useWatch(a.name, r);
|
|
144
145
|
q(s, (e) => {
|
|
145
146
|
const o = f(e, a.rowKey);
|
|
146
147
|
te(o, l(E)) || r.value?.setFieldValue(a.name, o);
|
|
@@ -172,7 +173,7 @@ const Fe = /* @__PURE__ */ M({
|
|
|
172
173
|
r.value?.resetFields();
|
|
173
174
|
}
|
|
174
175
|
function w(e) {
|
|
175
|
-
return e ? (
|
|
176
|
+
return e ? (R(e) ? e : [e]).map((t) => R(t) ? [a.name, ...t] : [a.name, t]) : void 0;
|
|
176
177
|
}
|
|
177
178
|
function g(e) {
|
|
178
179
|
try {
|
|
@@ -217,7 +218,8 @@ const Fe = /* @__PURE__ */ M({
|
|
|
217
218
|
setTableData: U,
|
|
218
219
|
scrollTo: h,
|
|
219
220
|
scrollToRow: h,
|
|
220
|
-
scrollToColumn: W
|
|
221
|
+
scrollToColumn: W,
|
|
222
|
+
table: i
|
|
221
223
|
}), (e, o) => (Q(), J(l(c), {
|
|
222
224
|
ref_key: "formRef",
|
|
223
225
|
ref: r,
|
|
@@ -228,11 +230,11 @@ const Fe = /* @__PURE__ */ M({
|
|
|
228
230
|
height: "100%"
|
|
229
231
|
}
|
|
230
232
|
}, {
|
|
231
|
-
default: m(() => [
|
|
233
|
+
default: m(() => [v(l(c).FormItem, {
|
|
232
234
|
name: e.name,
|
|
233
235
|
"no-style": ""
|
|
234
236
|
}, {
|
|
235
|
-
default: m(() => [
|
|
237
|
+
default: m(() => [v(me, X(l(ne)(a, ["name", "value", "onUpdate:value", "maxLength", "onChange", "defaultValue"]), {
|
|
236
238
|
ref_key: "tableRef",
|
|
237
239
|
ref: i,
|
|
238
240
|
class: [l(T)(), l(F)],
|
|
@@ -5,7 +5,7 @@ import { ApFormItemProps } from '../../ap-form';
|
|
|
5
5
|
import { ApTableValueFields, ApTableValueTypes, CommonFieldReturnType, FieldPropsType } from '../../ap-table/interface';
|
|
6
6
|
import { EditableTableExpose } from '../../editable-table';
|
|
7
7
|
import { Recordable } from '../../type';
|
|
8
|
-
import { AgGridColumnType, AgGridProps } from '../interface';
|
|
8
|
+
import { AgGridColumnType, AgGridExpose, AgGridProps } from '../interface';
|
|
9
9
|
export type EditableAgGridColumnType<RecordType = any, ExtraValueType = 'text', ValueType extends ApTableValueTypes = ApTableValueTypes, MergedValueType extends ExtraValueType | ValueType = ExtraValueType | ValueType> = MergedValueType extends ExtraValueType | ValueType ? Omit<AgGridColumnType<RecordType, ExtraValueType, ValueType>, 'children' | 'customRender' | 'hideInSearch' | 'customRenderFormItem' | 'fieldProps'> & {
|
|
10
10
|
children?: EditableAgGridColumnType<RecordType, ExtraValueType, ValueType>[];
|
|
11
11
|
/**
|
|
@@ -85,6 +85,7 @@ export type EditableAgGridExpose<RecordType = any, ModelType = RecordType[]> = O
|
|
|
85
85
|
scrollToColumn: (key: string, position?: 'auto' | 'start' | 'middle' | 'end') => void;
|
|
86
86
|
remove: (data: RecordType | RecordType[]) => void;
|
|
87
87
|
validateFieldsReturnTransformed: EditableTableExpose<ModelType, RecordType>['validateFields'];
|
|
88
|
+
table: AgGridExpose;
|
|
88
89
|
};
|
|
89
90
|
export type EditableAgGridFormItemExpose<RecordType = any, ModelType = RecordType[]> = Omit<EditableAgGridExpose<RecordType, ModelType>, 'resetFields' | 'validateFields' | 'validateFieldsReturnTransformed'>;
|
|
90
91
|
export type EditableAgGridFormItemProps<RecordType = any> = Omit<EditableAgGridProps<RecordType>, 'name' | 'value' | 'onUpdate:value'> & {
|
|
@@ -16,7 +16,7 @@ const P = (r) => {
|
|
|
16
16
|
};
|
|
17
17
|
});
|
|
18
18
|
return {
|
|
19
|
-
getRowPinnedCellClass: (o) => (n) => {
|
|
19
|
+
getRowPinnedCellClass: (o) => ((n) => {
|
|
20
20
|
let t;
|
|
21
21
|
const { cellClassName: e } = r.value || {};
|
|
22
22
|
return !n.node.rowPinned || !e ? t = [o(n)] : t = [
|
|
@@ -28,7 +28,7 @@ const P = (r) => {
|
|
|
28
28
|
n.rowIndex
|
|
29
29
|
) : e
|
|
30
30
|
], t.flat().filter(Boolean);
|
|
31
|
-
},
|
|
31
|
+
}),
|
|
32
32
|
rowPinnedGridConfig: d
|
|
33
33
|
};
|
|
34
34
|
};
|
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
import { Recordable } from '../type';
|
|
2
2
|
import { AgGridExpose, AgGridProps, AgGridSlots } from './interface';
|
|
3
|
-
import { VNodeProps, AllowedComponentProps, ComponentCustomProps, PublicProps, ShallowUnwrapRef, VNode
|
|
3
|
+
import { VNodeProps, AllowedComponentProps, ComponentCustomProps, PublicProps, ShallowUnwrapRef, VNode } from 'vue';
|
|
4
4
|
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<{
|
|
5
5
|
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & VNodeProps & AllowedComponentProps & ComponentCustomProps, never>, never> & AgGridProps<RecordType> & Partial<{}>> & PublicProps;
|
|
6
6
|
expose(exposed: ShallowUnwrapRef<AgGridExpose>): void;
|
|
7
7
|
attrs: any;
|
|
8
8
|
slots: Readonly<AgGridSlots<RecordType>> & AgGridSlots<RecordType>;
|
|
9
9
|
emit: {};
|
|
10
|
-
}>) => VNode
|
|
11
|
-
[key: string]: any;
|
|
12
|
-
}> & {
|
|
10
|
+
}>) => VNode & {
|
|
13
11
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
14
12
|
};
|
|
15
13
|
export default _default;
|