@aplus-frontend/ui 6.39.0 → 6.39.2

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 (59) hide show
  1. package/es/index.mjs +62 -60
  2. package/es/src/ap-form/drawer-form/index.vue.d.ts +4 -0
  3. package/es/src/ap-modal/utils/createModal.mjs +34 -36
  4. package/es/src/business/ag-grid-modal/hooks/use-ag-grid-modal.d.ts +1 -1
  5. package/es/src/business/ag-grid-modal/hooks/use-ag-grid-modal.mjs +74 -37
  6. package/es/src/business/ag-grid-modal/hooks/use-ag-grid-select-modal.mjs +142 -99
  7. package/es/src/business/ag-grid-modal/index.d.ts +1 -0
  8. package/es/src/business/ag-grid-modal/index.mjs +4 -2
  9. package/es/src/business/ag-grid-modal/interface.d.ts +15 -4
  10. package/es/src/business/ag-grid-modal/modal-layout/index.vue.d.ts +1 -0
  11. package/es/src/business/ag-grid-modal/modal-layout/index.vue2.mjs +48 -44
  12. package/es/src/business/ag-grid-modal/selected-items/default.vue.d.ts +25 -0
  13. package/es/src/business/ag-grid-modal/selected-items/default.vue.mjs +4 -0
  14. package/es/src/business/ag-grid-modal/selected-items/default.vue2.mjs +33 -0
  15. package/es/src/business/ag-grid-modal/selected-items/index.d.ts +36 -0
  16. package/es/src/business/ag-grid-modal/selected-items/index.mjs +8 -0
  17. package/es/src/business/ag-grid-modal/selected-items/style/css.d.ts +0 -0
  18. package/es/src/business/ag-grid-modal/selected-items/style/css.js +1 -0
  19. package/es/src/business/ag-grid-modal/selected-items/style/index.d.ts +0 -0
  20. package/es/src/business/ag-grid-modal/selected-items/style/index.js +1 -0
  21. package/es/src/business/ag-grid-modal/utils.d.ts +2 -0
  22. package/es/src/business/ag-grid-modal/utils.mjs +1 -1
  23. package/es/src/index.mjs +66 -64
  24. package/es/src/path-map.mjs +2 -1
  25. package/es/src/version.d.ts +1 -1
  26. package/es/src/version.mjs +1 -1
  27. package/lib/index.js +1 -1
  28. package/lib/src/ap-form/drawer-form/index.vue.d.ts +4 -0
  29. package/lib/src/ap-modal/utils/createModal.js +1 -1
  30. package/lib/src/business/ag-grid-modal/hooks/use-ag-grid-modal.d.ts +1 -1
  31. package/lib/src/business/ag-grid-modal/hooks/use-ag-grid-modal.js +1 -1
  32. package/lib/src/business/ag-grid-modal/hooks/use-ag-grid-select-modal.js +1 -1
  33. package/lib/src/business/ag-grid-modal/index.d.ts +1 -0
  34. package/lib/src/business/ag-grid-modal/index.js +1 -1
  35. package/lib/src/business/ag-grid-modal/interface.d.ts +15 -4
  36. package/lib/src/business/ag-grid-modal/modal-layout/index.vue.d.ts +1 -0
  37. package/lib/src/business/ag-grid-modal/modal-layout/index.vue2.js +1 -1
  38. package/lib/src/business/ag-grid-modal/selected-items/default.vue.d.ts +25 -0
  39. package/lib/src/business/ag-grid-modal/selected-items/default.vue.js +1 -0
  40. package/lib/src/business/ag-grid-modal/selected-items/default.vue2.js +1 -0
  41. package/lib/src/business/ag-grid-modal/selected-items/index.d.ts +36 -0
  42. package/lib/src/business/ag-grid-modal/selected-items/index.js +1 -0
  43. package/lib/src/business/ag-grid-modal/selected-items/style/css.cjs +1 -0
  44. package/lib/src/business/ag-grid-modal/selected-items/style/css.d.ts +0 -0
  45. package/lib/src/business/ag-grid-modal/selected-items/style/index.cjs +1 -0
  46. package/lib/src/business/ag-grid-modal/selected-items/style/index.d.ts +0 -0
  47. package/lib/src/business/ag-grid-modal/utils.d.ts +2 -0
  48. package/lib/src/business/ag-grid-modal/utils.js +1 -1
  49. package/lib/src/index.js +1 -1
  50. package/lib/src/path-map.js +1 -1
  51. package/lib/src/version.d.ts +1 -1
  52. package/lib/src/version.js +1 -1
  53. package/package.json +5 -5
  54. package/theme/ag-grid-modal/index.css +19 -2
  55. package/theme/ag-grid-modal/index.less +24 -8
  56. package/theme/ag-grid-modal/selected-items.css +72 -0
  57. package/theme/ag-grid-modal/selected-items.less +34 -0
  58. package/theme/index.css +45 -2
  59. package/theme/index.less +2 -1
@@ -1,122 +1,165 @@
1
- import { createVNode as r, onUnmounted as O } from "vue";
2
- import { ApModal as _ } from "../../../ap-modal/index.mjs";
1
+ import { defineComponent as L, reactive as q, createVNode as i, onUnmounted as v } from "vue";
2
+ import { ApModal as G } from "../../../ap-modal/index.mjs";
3
3
  import "../../../ag-grid/index.mjs";
4
- import { AsyncCallback as L, genRequest as P, delRowKeyField as H, getModalLayoutConfig as T, addRowKeyField as j } from "../utils.mjs";
5
- import { useAgGridInstance as q } from "./use-ag-grid-instance.mjs";
6
- import { isFunction as u, omit as h } from "lodash-unified";
7
- import { ROW_KEY as v } from "../constants.mjs";
8
- import { useModalTitle as F } from "./use-modal-title.mjs";
9
- import { message as G } from "@aplus-frontend/antdv";
4
+ import { AsyncCallback as H, genRequest as T, delRowKeyField as F, addRowKeyField as D, getModalLayoutConfig as b } from "../utils.mjs";
5
+ import { useAgGridInstance as E } from "./use-ag-grid-instance.mjs";
6
+ import { isFunction as m, isEmpty as p, omitBy as U, isUndefined as W, omit as K } from "lodash-unified";
7
+ import { ROW_KEY as $ } from "../constants.mjs";
8
+ import { useModalTitle as z } from "./use-modal-title.mjs";
9
+ import { message as B } from "@aplus-frontend/antdv";
10
10
  import "../../../config-provider/index.mjs";
11
11
  import "../modal-layout/index.vue.mjs";
12
12
  import "../wrapper/index.vue.mjs";
13
- import { useLocale as D } from "../../../config-provider/hooks/use-locale.mjs";
14
- import E from "../wrapper/index.vue2.mjs";
15
- import U from "../modal-layout/index.vue2.mjs";
16
- import W from "../../../ag-grid/index.vue.mjs";
17
- function le(e) {
18
- let i;
19
- const c = new L(), [C, b] = F(), {
20
- t: K
21
- } = D(), [n, k] = q({
22
- onSelectedRows(t) {
23
- b.setCount(t?.length || 0);
13
+ import { useLocale as N } from "../../../config-provider/hooks/use-locale.mjs";
14
+ import V from "../wrapper/index.vue2.mjs";
15
+ import Y from "../modal-layout/index.vue2.mjs";
16
+ import J from "../../../ag-grid/index.vue.mjs";
17
+ function fe(o) {
18
+ let d, f = null, g = null;
19
+ const c = new H(), [k, x] = z(), {
20
+ t: S
21
+ } = N(), [a, M] = E({
22
+ onSelectedRows(e) {
23
+ x.setCount(e?.length || 0);
24
24
  }
25
- }), f = P(e.api, e.getRowKey, n.setDataSourceLength), d = u(e.getRowKey) ? e.getRowKey : (t) => t[e.getRowKey], x = () => {
26
- const t = e.mergeRule || "old", o = n.getSelectedRows() || [];
25
+ }), y = T(o.api, o.getRowKey, a.setDataSourceLength), w = (e) => {
26
+ const {
27
+ title: t,
28
+ width: n,
29
+ modalProps: r,
30
+ ...s
31
+ } = m(e) ? e(o) : e;
32
+ p(s) || g?.(s);
33
+ const l = U({
34
+ title: t,
35
+ width: n,
36
+ modalProps: r
37
+ }, W);
38
+ p(l) || f?.update(l);
39
+ }, u = m(o.getRowKey) ? o.getRowKey : (e) => e[o.getRowKey], I = () => {
40
+ const e = o.mergeRule || "old", t = a.getSelectedRows() || [];
27
41
  return {
28
- keys: M(o),
29
- rows: o.map((l) => {
30
- const s = d(l);
31
- return t === "old" && i?.[s] ? i[s] : H(l);
42
+ keys: _(t),
43
+ rows: t.map((s) => {
44
+ const l = u(s);
45
+ return e === "old" && d?.[l] ? d[l] : F(s);
32
46
  })
33
47
  };
34
- }, g = async () => {
35
- const t = x(), o = e.maxCount || 1 / 0;
36
- return t.keys.length > o ? (G.warning(K("ap.apTableModal.messageMaxCount", {
37
- maxCount: o
38
- })), Promise.reject()) : (await e.beforeOk?.(t), e.finishCallback?.(t), c.resolve(t), t);
39
- }, S = () => {
40
- c.reject("modal is closed!"), n.setInstance(void 0), n.setDataSourceLength(0);
41
- }, w = T(e.modalLayout);
42
- function y(t) {
43
- const o = t?.map((a) => j(a, e.getRowKey));
44
- return r(k, null, {
45
- default: () => [r(E, {
46
- rowHeight: e.rowHeight
47
- }, {
48
- default: () => [e.renderHeader?.(h(n, "setInstance")), r(U, w.props, {
49
- default: () => [r(W, {
50
- ref: n.setInstance,
51
- searchForm: {
52
- sortable: !1,
53
- resize: {
54
- target: "form"
55
- }
56
- },
57
- rowKey: u(e.getRowKey) ? v : e.getRowKey,
58
- request: f.request,
59
- style: {
60
- padding: "0px"
61
- },
62
- rowHeight: e.rowHeight,
63
- columns: e.columns,
64
- rowSelection: {
65
- defaultSelectedRows: o,
66
- preserveSelectedRowKeys: !0,
67
- type: e.mode || "checkbox",
68
- fixed: "left",
69
- columnWidth: 38,
70
- disabled(a) {
71
- return u(e.disabledCheckbox) ? e.disabledCheckbox(a, h(n, "setInstance")) : e.disabledCheckbox ?? !1;
72
- }
73
- }
74
- }, e.gridSlots)],
75
- ...w.slots
76
- })]
77
- })]
78
- });
48
+ }, C = async () => {
49
+ const e = I(), t = o.maxCount || 1 / 0;
50
+ return e.keys.length > t ? (B.warning(S("ap.apTableModal.messageMaxCount", {
51
+ maxCount: t
52
+ })), Promise.reject()) : (await o.beforeOk?.(e), o.finishCallback?.(e), c.resolve(e), e);
53
+ }, O = () => {
54
+ c.reject("modal is closed!");
55
+ }, P = /* @__PURE__ */ L({
56
+ name: "AgGridModalSelectContent",
57
+ props: {
58
+ modalConfig: {
59
+ type: Object,
60
+ required: !0
61
+ },
62
+ selectedRows: {
63
+ type: Array,
64
+ default: () => []
65
+ }
66
+ },
67
+ setup(e) {
68
+ const t = q(e.modalConfig);
69
+ return g = (n) => {
70
+ Object.assign(t, n);
71
+ }, () => {
72
+ const n = e.selectedRows?.map((r) => D(r, t.getRowKey));
73
+ return i(M, null, {
74
+ default: () => [i(V, {
75
+ rowHeight: t.rowHeight
76
+ }, {
77
+ default: () => [o.renderHeader?.(K(a, "setInstance"), {
78
+ updateProps: w
79
+ }), i(Y, b(t.modalLayout).props, {
80
+ default: () => [i(J, {
81
+ ref: a.setInstance,
82
+ searchForm: {
83
+ sortable: !1,
84
+ resize: {
85
+ target: "form"
86
+ }
87
+ },
88
+ rowKey: m(t.getRowKey) ? $ : t.getRowKey,
89
+ request: y.request,
90
+ style: {
91
+ padding: "0px"
92
+ },
93
+ rowHeight: t.rowHeight,
94
+ columns: t.columns,
95
+ rowSelection: {
96
+ defaultSelectedRows: n,
97
+ preserveSelectedRowKeys: !0,
98
+ type: t.mode || "checkbox",
99
+ fixed: "left",
100
+ columnWidth: 38,
101
+ disabled(r) {
102
+ return m(t.disabledCheckbox) ? t.disabledCheckbox(r, K(a, "setInstance")) : t.disabledCheckbox ?? !1;
103
+ }
104
+ }
105
+ }, t.gridSlots)],
106
+ ...b(t.modalLayout).slots
107
+ })]
108
+ })]
109
+ });
110
+ };
111
+ }
112
+ });
113
+ function R(e) {
114
+ return i(P, {
115
+ modalConfig: o,
116
+ selectedRows: e
117
+ }, null);
79
118
  }
80
- function I() {
81
- const t = Object.values(i || {}), o = y(t);
82
- _.createModal({
83
- title: r(C, {
84
- title: e.title,
85
- maxCount: e.maxCount || 1 / 0
86
- }, e.modalTitleSlots),
87
- width: e.width,
119
+ function A() {
120
+ const e = Object.values(d || {}), t = R(e);
121
+ f = G.createModal({
122
+ title: i(k, {
123
+ title: o.title,
124
+ maxCount: o.maxCount || 1 / 0
125
+ }, o.modalTitleSlots),
126
+ width: o.width,
88
127
  destroyOnClose: !0,
89
128
  maskClosable: !1,
90
- onOk: g,
91
- onCancel: S,
92
- content: o,
93
- ...e.modalProps || {}
129
+ onOk: C,
130
+ onCancel: O,
131
+ afterOpenChange(n) {
132
+ n === !1 && (a.setInstance(void 0), a.setDataSourceLength(0));
133
+ },
134
+ content: t,
135
+ ...o.modalProps || {}
94
136
  });
95
137
  }
96
- function M(t) {
97
- return t?.map(d) || [];
138
+ function _(e) {
139
+ return e?.map(u) || [];
98
140
  }
99
- function R(t, o, a = !1) {
100
- if (i = t?.reduce((m, l) => {
101
- const s = d(l);
102
- return m[s] = l, m;
103
- }, {}), f.setExtraParams(o?.extraParams), I(), a)
141
+ function h(e, t, n = !1) {
142
+ if (d = e?.reduce((r, s) => {
143
+ const l = u(s);
144
+ return r[l] = s, r;
145
+ }, {}), y.setExtraParams(t?.extraParams), A(), n)
104
146
  return c.buildPromise();
105
147
  }
106
- function A(t, o) {
107
- return R(t, o, !0);
148
+ function j(e, t) {
149
+ return h(e, t, !0);
108
150
  }
109
- return O(() => {
151
+ return v(() => {
110
152
  c.reject("component is Unmounted!");
111
153
  }), {
112
- open: R,
113
- asyncOpen: A,
114
- refresh: n.refresh,
115
- getAgGridInstance: n.getInstance,
116
- genContent: y,
117
- validate: g
154
+ open: h,
155
+ asyncOpen: j,
156
+ refresh: a.refresh,
157
+ getAgGridInstance: a.getInstance,
158
+ genContent: R,
159
+ validate: C,
160
+ updateProps: w
118
161
  };
119
162
  }
120
163
  export {
121
- le as useAgGridSelectModal
164
+ fe as useAgGridSelectModal
122
165
  };
@@ -1,2 +1,3 @@
1
1
  export { useAgGridModal } from './hooks/use-ag-grid-modal';
2
2
  export { useAgGridSelectModal } from './hooks/use-ag-grid-select-modal';
3
+ export { ApSelectedItems } from './selected-items';
@@ -1,6 +1,8 @@
1
1
  import { useAgGridModal as r } from "./hooks/use-ag-grid-modal.mjs";
2
- import { useAgGridSelectModal as l } from "./hooks/use-ag-grid-select-modal.mjs";
2
+ import { useAgGridSelectModal as d } from "./hooks/use-ag-grid-select-modal.mjs";
3
+ import { ApSelectedItems as m } from "./selected-items/index.mjs";
3
4
  export {
5
+ m as ApSelectedItems,
4
6
  r as useAgGridModal,
5
- l as useAgGridSelectModal
7
+ d as useAgGridSelectModal
6
8
  };
@@ -4,16 +4,20 @@ import { CreateModalFuncProps } from '../../ap-modal';
4
4
  import { Recordable } from '../../type';
5
5
  import { GridApi } from './hooks/use-ag-grid-instance';
6
6
  export type GetRowKey<TableRowType> = ((record: TableRowType) => string | number) | string;
7
+ export type UpdatePropsFn<T> = (props: Partial<AgGridPreviewModalProps<T>> | ((props: AgGridPreviewModalProps<T>) => Partial<AgGridPreviewModalProps<T>>)) => void;
8
+ export type UpdateSelectPropsFn<T> = (props: Partial<AgGridSelectModalProps<T>> | ((props: AgGridSelectModalProps<T>) => Partial<AgGridSelectModalProps<T>>)) => void;
7
9
  /** AgGridModal 基础类型 */
8
10
  export interface AgGridModalBasicProps<TableRowType = any> {
9
- title: VNodeChild;
11
+ title?: VNodeChild;
10
12
  width?: string | number;
11
13
  modalProps?: Omit<CreateModalFuncProps, 'content'>;
12
- columns: AgGridColumnType[];
14
+ columns: AgGridColumnType<TableRowType, any>[];
13
15
  getRowKey: GetRowKey<TableRowType>;
14
16
  api?: (params: any) => Promise<RequestReturn<TableRowType>>;
15
17
  /** 渲染头部信息 */
16
- renderHeader?: (gridApi: Omit<GridApi, 'setInstance'>) => VNodeChild;
18
+ renderHeader?: (gridApi: Omit<GridApi, 'setInstance'>, modalApi: {
19
+ updateProps: UpdatePropsFn<TableRowType>;
20
+ }) => VNodeChild;
17
21
  rowHeight?: number;
18
22
  }
19
23
  /** 刷新方式 */
@@ -24,13 +28,15 @@ export interface AgGridPreviewModalProps<RowType = any> extends AgGridModalBasic
24
28
  gridSlots?: AgGridSlots<RowType>;
25
29
  }
26
30
  /** 只读模式返回值 */
27
- export interface PreviewModalReturnType {
31
+ export interface PreviewModalReturnType<RowType = any> {
28
32
  /** 打开弹框 */
29
33
  open(opt?: OpenOptions): void;
30
34
  /** 刷新表格数据 */
31
35
  refresh: (type: RefreshType) => void;
32
36
  /** 获取ag-grid实例 */
33
37
  getAgGridInstance: () => AgGridExpose | undefined;
38
+ /** 修改hook的props */
39
+ updateProps: UpdatePropsFn<RowType>;
34
40
  }
35
41
  export interface OpenOptions {
36
42
  /** 发起网络请求携带的额外参数 */
@@ -82,6 +88,8 @@ export interface SelectModalReturnType<T = any> {
82
88
  genContent: (selectedRows?: T[]) => VNodeChild;
83
89
  /** 获取数据并校验 */
84
90
  validate: () => Promise<OpenReturnType<T>>;
91
+ /** 修改hook的props */
92
+ updateProps: UpdateSelectPropsFn<T>;
85
93
  }
86
94
  export interface RequestReturn<T = any> {
87
95
  records: T[];
@@ -108,6 +116,8 @@ export interface ModalLayoutProps {
108
116
  rightContentStyle?: StyleValue;
109
117
  /** 中间分割线向上偏移量 */
110
118
  dividerOffset?: number;
119
+ /** 是否有边框 */
120
+ bordered?: boolean;
111
121
  }
112
122
  /** modal-layout配置 */
113
123
  export interface ModalLayoutConfig<T = any> extends ModalLayoutProps {
@@ -125,6 +135,7 @@ export interface ModalLayoutConfig<T = any> extends ModalLayoutProps {
125
135
  record: T;
126
136
  actions: {
127
137
  deleteItem: (record: T) => void;
138
+ deleteCurrent: () => void;
128
139
  };
129
140
  }) => any;
130
141
  }
@@ -15,6 +15,7 @@ declare function __VLS_template(): {
15
15
  record: any;
16
16
  actions: {
17
17
  deleteItem: (record: any) => void;
18
+ deleteCurrent: () => void;
18
19
  };
19
20
  }): any;
20
21
  rightBottom?(_: {
@@ -1,72 +1,73 @@
1
- import { defineComponent as B, computed as N, createElementBlock as y, renderSlot as r, openBlock as a, normalizeStyle as g, normalizeClass as n, unref as e, createElementVNode as i, createBlock as c, createCommentVNode as v, withCtx as s, resolveDynamicComponent as O, h as x, Fragment as h, createVNode as b, createTextVNode as S, toDisplayString as T, renderList as I } from "vue";
1
+ import { defineComponent as N, computed as I, createElementBlock as p, renderSlot as a, openBlock as n, normalizeStyle as g, normalizeClass as o, unref as e, createElementVNode as i, createBlock as v, createCommentVNode as h, withCtx as s, resolveDynamicComponent as M, h as O, Fragment as b, createVNode as m, createTextVNode as S, toDisplayString as T, renderList as V } from "vue";
2
2
  import "../../../config-provider/index.mjs";
3
3
  import { ApTitle as k } from "../../ap-title/index.mjs";
4
- import { Button as M, Empty as C } from "@aplus-frontend/antdv";
5
- import { useAgGridModalInject as V } from "../hooks/use-ag-grid-instance.mjs";
6
- import { useLocale as w } from "../../../config-provider/hooks/use-locale.mjs";
7
- import { useNamespace as L } from "../../../config-provider/hooks/use-namespace.mjs";
8
- const q = /* @__PURE__ */ B({
4
+ import { Button as w, Empty as C } from "@aplus-frontend/antdv";
5
+ import { useAgGridModalInject as L } from "../hooks/use-ag-grid-instance.mjs";
6
+ import { useLocale as j } from "../../../config-provider/hooks/use-locale.mjs";
7
+ import { useNamespace as x } from "../../../config-provider/hooks/use-namespace.mjs";
8
+ const H = /* @__PURE__ */ N({
9
9
  __name: "index",
10
10
  props: {
11
11
  leftTitle: { type: [String, Object, Number, Boolean, null, Array], default: "" },
12
12
  rightContentStyle: { type: [Boolean, null, String, Object, Array] },
13
13
  dividerOffset: {},
14
+ bordered: { type: Boolean },
14
15
  layoutType: { default: void 0 }
15
16
  },
16
- setup(E) {
17
- const { t: p } = w(), d = V(), l = N(() => d?.selectedRows?.value || []), u = E, $ = () => {
18
- if (console.log("props.dividerOffset", u), u.dividerOffset != null)
17
+ setup(B) {
18
+ const { t: f } = j(), d = L(), r = I(() => d?.selectedRows?.value || []), y = B, E = () => {
19
+ if (y.dividerOffset != null)
19
20
  return {
20
- "--ag-grid-modal-layout-divider-offset": `${u.dividerOffset}px`
21
+ "--ag-grid-modal-layout-divider-offset": `${y.dividerOffset}px`
21
22
  };
22
- }, A = () => {
23
+ }, $ = () => {
23
24
  d?.clearAllSelected();
24
- }, m = (t) => {
25
+ }, u = (t) => {
25
26
  d?.removeSelected(t);
26
- }, { m: o } = L("ag-grid-modal");
27
- return (t, j) => t.layoutType === "two-column" ? (a(), y("div", {
27
+ }, { e: A, m: l } = x("ag-grid-modal");
28
+ return (t, D) => t.layoutType === "two-column" ? (n(), p("div", {
28
29
  key: 0,
29
- class: n(e(o)("table-layout")),
30
- style: g($())
30
+ class: o([e(l)("table-layout"), t.bordered ? e(l)("bordered") : ""]),
31
+ style: g(E())
31
32
  }, [
32
33
  i("div", {
33
- class: n(e(o)("table-layout-left"))
34
+ class: o(e(l)("table-layout-left"))
34
35
  }, [
35
- t.leftTitle ? (a(), c(e(k), {
36
+ t.leftTitle ? (n(), v(e(k), {
36
37
  key: 0,
37
38
  style: { "margin-bottom": "16px" }
38
39
  }, {
39
40
  prefix: s(() => [
40
- (a(), c(O(x(h, [t.leftTitle]))))
41
+ (n(), v(M(O(b, [t.leftTitle]))))
41
42
  ]),
42
43
  _: 1
43
- })) : v("", !0),
44
+ })) : h("", !0),
44
45
  i("div", {
45
- class: n(e(o)("table-layout-left-content"))
46
+ class: o(e(l)("table-layout-left-content"))
46
47
  }, [
47
- r(t.$slots, "default")
48
+ a(t.$slots, "default")
48
49
  ], 2)
49
50
  ], 2),
50
51
  i("div", {
51
- class: n(e(o)("table-layout-right")),
52
+ class: o(e(l)("table-layout-right")),
52
53
  style: g(t.rightContentStyle)
53
54
  }, [
54
- b(e(k), null, {
55
+ m(e(k), null, {
55
56
  prefix: s(() => [
56
- r(t.$slots, "rightTitle", {
57
- count: l.value.length
57
+ a(t.$slots, "rightTitle", {
58
+ count: r.value.length
58
59
  }, () => [
59
- S(T(`${e(p)("ap.apTableModal.selected")} (${l.value.length})`), 1)
60
+ S(T(`${e(f)("ap.apTableModal.selected")} (${r.value.length})`), 1)
60
61
  ])
61
62
  ]),
62
63
  suffix: s(() => [
63
- b(e(M), {
64
+ m(e(w), {
64
65
  type: "link",
65
66
  style: { padding: "0px", height: "22px", "border-width": "0px" },
66
- onClick: A
67
+ onClick: $
67
68
  }, {
68
69
  default: s(() => [
69
- S(T(e(p)("ap.apTableModal.clear")), 1)
70
+ S(T(e(f)("ap.apTableModal.clear")), 1)
70
71
  ]),
71
72
  _: 1
72
73
  })
@@ -74,29 +75,32 @@ const q = /* @__PURE__ */ B({
74
75
  _: 3
75
76
  }),
76
77
  i("div", {
77
- class: n(e(o)("table-layout-right-content"))
78
+ class: o(e(l)("table-layout-right-content"))
78
79
  }, [
79
- (a(!0), y(h, null, I(l.value, (f) => r(t.$slots, "renderSelectedItem", {
80
- key: f,
81
- record: f,
82
- actions: { deleteItem: m }
80
+ (n(!0), p(b, null, V(r.value, (c) => a(t.$slots, "renderSelectedItem", {
81
+ key: c,
82
+ record: c,
83
+ actions: { deleteItem: u, deleteCurrent: () => u(c) }
83
84
  })), 128)),
84
- l.value.length === 0 ? (a(), c(e(C), {
85
+ r.value.length === 0 ? (n(), p("div", {
85
86
  key: 0,
86
- image: e(C).PRESENTED_IMAGE_SIMPLE,
87
- style: { "margin-top": "100px" }
88
- }, null, 8, ["image"])) : v("", !0)
87
+ class: o(e(A)("empty"))
88
+ }, [
89
+ m(e(C), {
90
+ image: e(C).PRESENTED_IMAGE_SIMPLE
91
+ }, null, 8, ["image"])
92
+ ], 2)) : h("", !0)
89
93
  ], 2),
90
94
  i("div", null, [
91
- r(t.$slots, "rightBottom", {
92
- records: l.value,
93
- actions: { deleteItem: m }
95
+ a(t.$slots, "rightBottom", {
96
+ records: r.value,
97
+ actions: { deleteItem: u }
94
98
  })
95
99
  ])
96
100
  ], 6)
97
- ], 6)) : r(t.$slots, "default", { key: 1 });
101
+ ], 6)) : a(t.$slots, "default", { key: 1 });
98
102
  }
99
103
  });
100
104
  export {
101
- q as default
105
+ H as default
102
106
  };
@@ -0,0 +1,25 @@
1
+ import { StyleValue, DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
2
+ type __VLS_Props = {
3
+ style?: StyleValue;
4
+ };
5
+ declare function __VLS_template(): {
6
+ attrs: Partial<{}>;
7
+ slots: {
8
+ default?(_: {}): any;
9
+ };
10
+ refs: {};
11
+ rootEl: HTMLDivElement;
12
+ };
13
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
14
+ declare const __VLS_component: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
15
+ clickDel: (...args: any[]) => void;
16
+ }, string, PublicProps, Readonly<__VLS_Props> & Readonly<{
17
+ onClickDel?: ((...args: any[]) => any) | undefined;
18
+ }>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
19
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
20
+ export default _default;
21
+ type __VLS_WithTemplateSlots<T, S> = T & {
22
+ new (): {
23
+ $slots: S;
24
+ };
25
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./default.vue2.mjs";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,33 @@
1
+ import { defineComponent as c, createElementBlock as i, openBlock as m, normalizeClass as l, unref as e, normalizeStyle as p, createElementVNode as n, renderSlot as d, createVNode as f } from "vue";
2
+ import { IconApAdLineCloseDrawer as u } from "@aplus-frontend/icon";
3
+ import "../../../config-provider/index.mjs";
4
+ import { useNamespace as k } from "../../../config-provider/hooks/use-namespace.mjs";
5
+ const N = /* @__PURE__ */ c({
6
+ __name: "default",
7
+ props: {
8
+ style: { type: [Boolean, null, String, Object, Array] }
9
+ },
10
+ emits: ["clickDel"],
11
+ setup(y, { emit: s }) {
12
+ const { e: t } = k("ap-selected-items"), r = s, a = () => r("clickDel");
13
+ return (o, _) => (m(), i("div", {
14
+ style: p(o.style),
15
+ class: l(e(t)("default"))
16
+ }, [
17
+ n("div", {
18
+ class: l(e(t)("default-content"))
19
+ }, [
20
+ d(o.$slots, "default")
21
+ ], 2),
22
+ n("span", {
23
+ class: l(e(t)("del-icon")),
24
+ onClick: a
25
+ }, [
26
+ f(e(u))
27
+ ], 2)
28
+ ], 6));
29
+ }
30
+ });
31
+ export {
32
+ N as default
33
+ };
@@ -0,0 +1,36 @@
1
+ import { CreateComponentPublicInstanceWithMixins, StyleValue, ComponentOptionsMixin, PublicProps, GlobalComponents, GlobalDirectives, ComponentProvideOptions, ComponentOptionsBase, VNodeProps, AllowedComponentProps, ComponentCustomProps } from 'vue';
2
+ export declare const ApSelectedItems: {
3
+ Default: {
4
+ new (...args: any[]): CreateComponentPublicInstanceWithMixins<Readonly<{
5
+ style?: StyleValue;
6
+ }> & Readonly<{
7
+ onClickDel?: ((...args: any[]) => any) | undefined;
8
+ }>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
9
+ clickDel: (...args: any[]) => void;
10
+ }, PublicProps, {}, false, {}, {}, GlobalComponents, GlobalDirectives, string, {}, HTMLDivElement, ComponentProvideOptions, {
11
+ P: {};
12
+ B: {};
13
+ D: {};
14
+ C: {};
15
+ M: {};
16
+ Defaults: {};
17
+ }, Readonly<{
18
+ style?: StyleValue;
19
+ }> & Readonly<{
20
+ onClickDel?: ((...args: any[]) => any) | undefined;
21
+ }>, {}, {}, {}, {}, {}>;
22
+ __isFragment?: never;
23
+ __isTeleport?: never;
24
+ __isSuspense?: never;
25
+ } & ComponentOptionsBase<Readonly<{
26
+ style?: StyleValue;
27
+ }> & Readonly<{
28
+ onClickDel?: ((...args: any[]) => any) | undefined;
29
+ }>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
30
+ clickDel: (...args: any[]) => void;
31
+ }, string, {}, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & VNodeProps & AllowedComponentProps & ComponentCustomProps & (new () => {
32
+ $slots: {
33
+ default?(_: {}): any;
34
+ };
35
+ });
36
+ };
@@ -0,0 +1,8 @@
1
+ import "./default.vue.mjs";
2
+ import t from "./default.vue2.mjs";
3
+ const o = {
4
+ Default: t
5
+ };
6
+ export {
7
+ o as ApSelectedItems
8
+ };
@@ -0,0 +1 @@
1
+ import '@aplus-frontend/ui/theme/ag-grid-modal/selected-items.css';
@@ -0,0 +1 @@
1
+ import '@aplus-frontend/ui/theme/ag-grid-modal/selected-items.less';
@@ -17,12 +17,14 @@ export declare function getModalLayoutConfig(props?: ModalLayoutConfig): {
17
17
  readonly leftTitle?: string | VNodeChild;
18
18
  readonly rightContentStyle?: StyleValue;
19
19
  readonly dividerOffset?: number;
20
+ readonly bordered?: boolean;
20
21
  };
21
22
  slots: {
22
23
  renderSelectedItem: ((props: {
23
24
  record: any;
24
25
  actions: {
25
26
  deleteItem: (record: any) => void;
27
+ deleteCurrent: () => void;
26
28
  };
27
29
  }) => any) | undefined;
28
30
  rightTitle: ((selectedCount: number) => any) | undefined;