@aplus-frontend/ui 6.31.1 → 6.33.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/index.mjs +65 -61
- package/es/src/ag-grid/components/body-cell/index.vue2.mjs +14 -12
- package/es/src/ag-grid/editable/form-item.vue.d.ts +16 -0
- package/es/src/ag-grid/editable/form-item.vue.mjs +215 -0
- package/es/src/ag-grid/editable/form-item.vue2.mjs +4 -0
- package/es/src/ag-grid/editable/index.vue.d.ts +18 -0
- package/es/src/ag-grid/editable/index.vue.mjs +233 -0
- package/es/src/ag-grid/editable/index.vue2.mjs +4 -0
- package/es/src/ag-grid/editable/interface.d.ts +96 -0
- package/es/src/ag-grid/editable/interface.mjs +1 -0
- package/es/src/ag-grid/editable/style/css.d.ts +0 -0
- package/es/src/ag-grid/editable/style/css.js +1 -0
- package/es/src/ag-grid/editable/style/index.d.ts +0 -0
- package/es/src/ag-grid/editable/style/index.js +1 -0
- package/es/src/ag-grid/editable/utils.d.ts +5 -0
- package/es/src/ag-grid/editable/utils.mjs +23 -0
- package/es/src/ag-grid/hooks/use-editable-api.d.ts +15 -0
- package/es/src/ag-grid/hooks/use-editable-api.mjs +150 -0
- package/es/src/ag-grid/hooks/use-editable-columns.d.ts +6 -0
- package/es/src/ag-grid/hooks/use-editable-columns.mjs +96 -0
- package/es/src/ag-grid/hooks/use-editable-form-item-api.d.ts +15 -0
- package/es/src/ag-grid/hooks/use-editable-form-item-api.mjs +174 -0
- package/es/src/ag-grid/index.d.ts +4 -1
- package/es/src/ag-grid/index.mjs +3 -0
- package/es/src/ag-grid/index.vue.mjs +70 -66
- package/es/src/ag-grid/interface.d.ts +20 -1
- package/es/src/ag-grid/utils.d.ts +2 -0
- package/es/src/ag-grid/utils.mjs +12 -7
- package/es/src/ap-drawer/interface.d.ts +5 -0
- package/es/src/ap-drawer/utils/createDrawer.mjs +22 -19
- package/es/src/ap-field/date/index.vue.mjs +29 -28
- package/es/src/ap-field/radio/index.vue.d.ts +4 -0
- package/es/src/ap-field/radio/index.vue.mjs +9 -8
- package/es/src/ap-field/radio/read.vue2.mjs +5 -4
- package/es/src/ap-field/rate/index.vue.d.ts +20 -0
- package/es/src/ap-field/rate/index.vue.mjs +12 -11
- package/es/src/ap-form/interface.d.ts +4 -0
- package/es/src/ap-form/item/index.vue.mjs +41 -39
- package/es/src/ap-form/items/checkbox/index.vue.mjs +5 -5
- package/es/src/ap-form/items/date/index.vue.mjs +9 -9
- package/es/src/ap-form/items/date-range/index.vue.mjs +8 -8
- package/es/src/ap-form/items/number/index.vue.mjs +11 -11
- package/es/src/ap-form/items/radio/index.vue.d.ts +8 -0
- package/es/src/ap-form/items/radio/index.vue.mjs +6 -6
- package/es/src/ap-form/items/select/index.vue.mjs +3 -3
- package/es/src/ap-form/items/switch/index.vue.mjs +2 -2
- package/es/src/ap-form/items/text/index.vue2.mjs +12 -12
- package/es/src/ap-form/items/text/password.vue.mjs +2 -2
- package/es/src/ap-form/items/text-area/index.vue.d.ts +4 -4
- package/es/src/ap-form/items/text-area/index.vue.mjs +3 -3
- package/es/src/ap-form/items/tree-select/index.vue.mjs +6 -6
- package/es/src/ap-form/render/item.vue.mjs +6 -5
- package/es/src/ap-grid/utils/editable.d.ts +2 -1
- package/es/src/ap-modal/index.d.ts +1 -0
- package/es/src/ap-modal/index.mjs +29 -27
- package/es/src/ap-modal/interface.d.ts +5 -0
- package/es/src/ap-modal/utils/confirm.mjs +35 -34
- package/es/src/ap-modal/utils/createModal.mjs +39 -37
- package/es/src/ap-modal/utils/util.d.ts +3 -0
- package/es/src/ap-modal/utils/util.mjs +8 -2
- package/es/src/ap-table/constants.d.ts +4 -0
- package/es/src/ap-table/interface.d.ts +5 -0
- package/es/src/ap-table/utils.mjs +76 -71
- package/es/src/ap-upload/components/MultipleFile.vue.d.ts +10 -0
- package/es/src/business/ap-appendix/ap-appendix.vue2.mjs +67 -68
- package/es/src/business/ap-view/ap-view.vue2.mjs +20 -18
- package/es/src/business/ap-view/interface.d.ts +4 -0
- package/es/src/business/batch-input-group/form-item.vue.mjs +1 -1
- package/es/src/config-provider/config-provider.mjs +32 -24
- package/es/src/editable-table/utils.d.ts +3 -2
- package/es/src/index.mjs +57 -53
- package/es/src/version.d.ts +1 -1
- package/es/src/version.mjs +1 -1
- package/lib/index.js +1 -1
- package/lib/src/ag-grid/components/body-cell/index.vue2.js +1 -1
- package/lib/src/ag-grid/editable/form-item.vue.d.ts +16 -0
- package/lib/src/ag-grid/editable/form-item.vue.js +1 -0
- package/lib/src/ag-grid/editable/form-item.vue2.js +1 -0
- package/lib/src/ag-grid/editable/index.vue.d.ts +18 -0
- package/lib/src/ag-grid/editable/index.vue.js +1 -0
- package/lib/src/ag-grid/editable/index.vue2.js +1 -0
- package/lib/src/ag-grid/editable/interface.d.ts +96 -0
- package/lib/src/ag-grid/editable/interface.js +1 -0
- package/lib/src/ag-grid/editable/style/css.cjs +1 -0
- package/lib/src/ag-grid/editable/style/css.d.ts +0 -0
- package/lib/src/ag-grid/editable/style/index.cjs +1 -0
- package/lib/src/ag-grid/editable/style/index.d.ts +0 -0
- package/lib/src/ag-grid/editable/utils.d.ts +5 -0
- package/lib/src/ag-grid/editable/utils.js +1 -0
- package/lib/src/ag-grid/hooks/use-editable-api.d.ts +15 -0
- package/lib/src/ag-grid/hooks/use-editable-api.js +1 -0
- package/lib/src/ag-grid/hooks/use-editable-columns.d.ts +6 -0
- package/lib/src/ag-grid/hooks/use-editable-columns.js +1 -0
- package/lib/src/ag-grid/hooks/use-editable-form-item-api.d.ts +15 -0
- package/lib/src/ag-grid/hooks/use-editable-form-item-api.js +1 -0
- package/lib/src/ag-grid/index.d.ts +4 -1
- package/lib/src/ag-grid/index.js +1 -1
- package/lib/src/ag-grid/index.vue.js +1 -1
- package/lib/src/ag-grid/interface.d.ts +20 -1
- package/lib/src/ag-grid/utils.d.ts +2 -0
- package/lib/src/ag-grid/utils.js +1 -1
- package/lib/src/ap-drawer/interface.d.ts +5 -0
- package/lib/src/ap-drawer/utils/createDrawer.js +1 -1
- package/lib/src/ap-field/date/index.vue.js +1 -1
- package/lib/src/ap-field/radio/index.vue.d.ts +4 -0
- package/lib/src/ap-field/radio/index.vue.js +1 -1
- package/lib/src/ap-field/radio/read.vue2.js +1 -1
- package/lib/src/ap-field/rate/index.vue.d.ts +20 -0
- package/lib/src/ap-field/rate/index.vue.js +1 -1
- package/lib/src/ap-form/interface.d.ts +4 -0
- package/lib/src/ap-form/item/index.vue.js +1 -1
- package/lib/src/ap-form/items/checkbox/index.vue.js +1 -1
- package/lib/src/ap-form/items/date/index.vue.js +1 -1
- package/lib/src/ap-form/items/date-range/index.vue.js +1 -1
- package/lib/src/ap-form/items/number/index.vue.js +1 -1
- package/lib/src/ap-form/items/radio/index.vue.d.ts +8 -0
- package/lib/src/ap-form/items/radio/index.vue.js +1 -1
- package/lib/src/ap-form/items/select/index.vue.js +1 -1
- package/lib/src/ap-form/items/switch/index.vue.js +1 -1
- package/lib/src/ap-form/items/text/index.vue2.js +1 -1
- package/lib/src/ap-form/items/text/password.vue.js +1 -1
- package/lib/src/ap-form/items/text-area/index.vue.d.ts +4 -4
- package/lib/src/ap-form/items/text-area/index.vue.js +1 -1
- package/lib/src/ap-form/items/tree-select/index.vue.js +1 -1
- package/lib/src/ap-form/render/item.vue.js +1 -1
- package/lib/src/ap-grid/utils/editable.d.ts +2 -1
- package/lib/src/ap-modal/index.d.ts +1 -0
- package/lib/src/ap-modal/index.js +1 -1
- package/lib/src/ap-modal/interface.d.ts +5 -0
- package/lib/src/ap-modal/utils/confirm.js +1 -1
- package/lib/src/ap-modal/utils/createModal.js +1 -1
- package/lib/src/ap-modal/utils/util.d.ts +3 -0
- package/lib/src/ap-modal/utils/util.js +1 -1
- package/lib/src/ap-table/constants.d.ts +4 -0
- package/lib/src/ap-table/interface.d.ts +5 -0
- package/lib/src/ap-table/utils.js +1 -1
- package/lib/src/ap-upload/components/MultipleFile.vue.d.ts +10 -0
- package/lib/src/business/ap-appendix/ap-appendix.vue2.js +1 -1
- package/lib/src/business/ap-view/ap-view.vue2.js +1 -1
- package/lib/src/business/ap-view/interface.d.ts +4 -0
- package/lib/src/business/batch-input-group/form-item.vue.js +1 -1
- package/lib/src/config-provider/config-provider.js +1 -1
- package/lib/src/editable-table/utils.d.ts +3 -2
- package/lib/src/index.js +1 -1
- package/lib/src/version.d.ts +1 -1
- package/lib/src/version.js +1 -1
- package/package.json +3 -3
- package/theme/ag-grid/editable.css +52 -0
- package/theme/ag-grid/editable.less +11 -0
- package/theme/ag-grid/index.css +19 -0
- package/theme/ag-grid/index.less +2 -0
- package/theme/ap-appendix/ap-appendix.css +4 -13
- package/theme/ap-appendix/ap-appendix.less +5 -12
- package/theme/ap-form/ap-form-item.css +12 -0
- package/theme/ap-form/ap-form-item.less +12 -0
- package/theme/ap-form/index.css +12 -0
- package/theme/ap-form/search-form.css +12 -0
- package/theme/ap-grid/editable.css +1 -0
- package/theme/ap-grid/editable.less +1 -0
- package/theme/ap-grid/index.css +13 -0
- package/theme/ap-grid/index.less +1 -0
- package/theme/ap-table/ap-table.css +12 -0
- package/theme/ap-table-modal/index.css +12 -0
- package/theme/css-var.css +2 -0
- package/theme/css-var.less +4 -0
- package/theme/editable-table/index.css +13 -0
- package/theme/editable-table/index.less +1 -0
- package/theme/index.css +28 -13
- package/es/src/business/ap-appendix/icons/empty-admin-icon.vue.d.ts +0 -3
- package/es/src/business/ap-appendix/icons/empty-admin-icon.vue.mjs +0 -20
- package/es/src/business/ap-appendix/icons/empty-aplus-icon.vue.d.ts +0 -3
- package/es/src/business/ap-appendix/icons/empty-aplus-icon.vue.mjs +0 -20
- package/lib/src/business/ap-appendix/icons/empty-admin-icon.vue.d.ts +0 -3
- package/lib/src/business/ap-appendix/icons/empty-admin-icon.vue.js +0 -1
- package/lib/src/business/ap-appendix/icons/empty-aplus-icon.vue.d.ts +0 -3
- package/lib/src/business/ap-appendix/icons/empty-aplus-icon.vue.js +0 -1
|
@@ -1,76 +1,77 @@
|
|
|
1
|
-
import { render as s, cloneVNode as h, createVNode as
|
|
2
|
-
import
|
|
3
|
-
import { omit as
|
|
1
|
+
import { render as s, cloneVNode as h, createVNode as p, mergeProps as m } from "vue";
|
|
2
|
+
import b from "@aplus-frontend/antdv/es/modal/ConfirmDialog";
|
|
3
|
+
import { omit as P } from "lodash-unified";
|
|
4
4
|
import "../../config-provider/index.mjs";
|
|
5
5
|
import { getConfirmLocale as w } from "@aplus-frontend/antdv/es/modal/locale";
|
|
6
6
|
import { globalConfigForApi as v } from "@aplus-frontend/antdv/es/config-provider";
|
|
7
7
|
import c from "./destroyFns.mjs";
|
|
8
|
+
import { getModalGlobalAppContext as A } from "./util.mjs";
|
|
8
9
|
import { globalConfigCached as D, ConfigProvider as F } from "../../config-provider/config-provider.mjs";
|
|
9
|
-
const
|
|
10
|
+
const G = (e) => {
|
|
10
11
|
const f = document.createDocumentFragment();
|
|
11
12
|
let n = {
|
|
12
|
-
...
|
|
13
|
+
...P(e, ["parentContext", "appContext"]),
|
|
13
14
|
close: l,
|
|
14
15
|
open: !0,
|
|
15
16
|
centered: !0
|
|
16
17
|
}, i = null;
|
|
17
|
-
function x(...
|
|
18
|
+
function x(...o) {
|
|
18
19
|
i && (s(null, f), i = null);
|
|
19
|
-
const r =
|
|
20
|
+
const r = o.some((t) => t && t.triggerCancel);
|
|
20
21
|
e.onCancel && r && e.onCancel(() => {
|
|
21
|
-
}, ...
|
|
22
|
-
for (let
|
|
23
|
-
if (c[
|
|
24
|
-
c.splice(
|
|
22
|
+
}, ...o.slice(1));
|
|
23
|
+
for (let t = 0; t < c.length; t++)
|
|
24
|
+
if (c[t] === l) {
|
|
25
|
+
c.splice(t, 1);
|
|
25
26
|
break;
|
|
26
27
|
}
|
|
27
28
|
}
|
|
28
|
-
function l(...
|
|
29
|
+
function l(...o) {
|
|
29
30
|
n = {
|
|
30
31
|
...n,
|
|
31
32
|
open: !1,
|
|
32
33
|
afterClose: () => {
|
|
33
|
-
typeof e.afterClose == "function" && e.afterClose(), x.apply(this,
|
|
34
|
+
typeof e.afterClose == "function" && e.afterClose(), x.apply(this, o);
|
|
34
35
|
}
|
|
35
|
-
}, n.visible && delete n.visible,
|
|
36
|
+
}, n.visible && delete n.visible, a(n);
|
|
36
37
|
}
|
|
37
|
-
function
|
|
38
|
-
typeof
|
|
38
|
+
function a(o) {
|
|
39
|
+
typeof o == "function" ? n = o(n) : n = {
|
|
39
40
|
...n,
|
|
40
|
-
...
|
|
41
|
+
...o
|
|
41
42
|
}, i && s(h(i, {
|
|
42
43
|
...n
|
|
43
44
|
}), f);
|
|
44
45
|
}
|
|
45
|
-
const d = (
|
|
46
|
+
const d = (o) => {
|
|
46
47
|
const r = {
|
|
47
48
|
...v,
|
|
48
49
|
...D.value
|
|
49
|
-
},
|
|
50
|
-
return
|
|
51
|
-
prefixCls:
|
|
50
|
+
}, t = r.prefixCls, u = o.prefixCls || `${t}-modal`, y = r.iconPrefixCls, C = w();
|
|
51
|
+
return p(F, m(r, {
|
|
52
|
+
prefixCls: t
|
|
52
53
|
}), {
|
|
53
|
-
default: () => [
|
|
54
|
-
rootPrefixCls:
|
|
54
|
+
default: () => [p(b, m(o, {
|
|
55
|
+
rootPrefixCls: t,
|
|
55
56
|
prefixCls: u,
|
|
56
|
-
iconPrefixCls:
|
|
57
|
+
iconPrefixCls: y,
|
|
57
58
|
locale: C,
|
|
58
|
-
cancelText:
|
|
59
|
+
cancelText: o.cancelText || C.cancelText
|
|
59
60
|
}), null)]
|
|
60
61
|
});
|
|
61
62
|
};
|
|
62
|
-
function
|
|
63
|
-
const r =
|
|
64
|
-
...
|
|
63
|
+
function g(o) {
|
|
64
|
+
const r = A(), t = p(d, {
|
|
65
|
+
...o
|
|
65
66
|
});
|
|
66
|
-
return
|
|
67
|
+
return t.appContext = e.appContext || r || t.appContext, s(t, f), t;
|
|
67
68
|
}
|
|
68
|
-
return i =
|
|
69
|
+
return i = g(n), c.push(l), {
|
|
69
70
|
destroy: l,
|
|
70
|
-
update:
|
|
71
|
+
update: a
|
|
71
72
|
};
|
|
72
73
|
};
|
|
73
|
-
function
|
|
74
|
+
function M(e) {
|
|
74
75
|
return {
|
|
75
76
|
...e,
|
|
76
77
|
type: "warning"
|
|
@@ -101,10 +102,10 @@ function z(e) {
|
|
|
101
102
|
};
|
|
102
103
|
}
|
|
103
104
|
export {
|
|
104
|
-
|
|
105
|
+
G as default,
|
|
105
106
|
z as withConfirm,
|
|
106
107
|
q as withError,
|
|
107
108
|
S as withInfo,
|
|
108
109
|
j as withSuccess,
|
|
109
|
-
|
|
110
|
+
M as withWarn
|
|
110
111
|
};
|
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
import { render as m, defineComponent as
|
|
2
|
-
import { Modal as
|
|
3
|
-
import { ConfigProvider as
|
|
4
|
-
import { omit as
|
|
5
|
-
import { isNumeric as
|
|
1
|
+
import { render as m, defineComponent as b, createVNode as l, mergeProps as k, h as w } from "vue";
|
|
2
|
+
import { Modal as P } from "@aplus-frontend/antdv";
|
|
3
|
+
import { ConfigProvider as N, globalConfigCached as f } from "../../config-provider/config-provider.mjs";
|
|
4
|
+
import { omit as L } from "lodash-unified";
|
|
5
|
+
import { isNumeric as M } from "@aplus-frontend/utils";
|
|
6
6
|
import "../../config-provider/index.mjs";
|
|
7
|
-
import { getContainerDom as
|
|
8
|
-
import { getTopWindow as
|
|
9
|
-
import { useNamespace as
|
|
10
|
-
const
|
|
11
|
-
let o,
|
|
7
|
+
import { getContainerDom as u, getModalGlobalAppContext as A } from "./util.mjs";
|
|
8
|
+
import { getTopWindow as E } from "../../utils/index.mjs";
|
|
9
|
+
import { useNamespace as T } from "../../config-provider/hooks/use-namespace.mjs";
|
|
10
|
+
const z = (p) => {
|
|
11
|
+
let o, t;
|
|
12
12
|
const {
|
|
13
13
|
destroyOnClose: a = !0,
|
|
14
|
-
wrapperOffset:
|
|
15
|
-
} =
|
|
16
|
-
b:
|
|
17
|
-
} =
|
|
14
|
+
wrapperOffset: n = !1
|
|
15
|
+
} = p, {
|
|
16
|
+
b: s
|
|
17
|
+
} = T("ap-modal");
|
|
18
18
|
function i() {
|
|
19
19
|
o && o(!1), setTimeout(() => {
|
|
20
20
|
m(null, r), r.parentElement?.removeChild(r);
|
|
21
21
|
}, 500);
|
|
22
22
|
}
|
|
23
|
-
function
|
|
23
|
+
function h() {
|
|
24
24
|
o && o(!0);
|
|
25
25
|
}
|
|
26
26
|
function c() {
|
|
27
27
|
o && o(!1);
|
|
28
28
|
}
|
|
29
|
-
function
|
|
30
|
-
|
|
29
|
+
function C(e) {
|
|
30
|
+
t && t(e);
|
|
31
31
|
}
|
|
32
|
-
const
|
|
32
|
+
const g = /* @__PURE__ */ b({
|
|
33
33
|
data() {
|
|
34
34
|
return {
|
|
35
35
|
open: a,
|
|
36
|
-
props:
|
|
36
|
+
props: p
|
|
37
37
|
};
|
|
38
38
|
},
|
|
39
39
|
created() {
|
|
40
40
|
o = (e) => {
|
|
41
41
|
this.open = e;
|
|
42
|
-
},
|
|
42
|
+
}, t = (e) => {
|
|
43
43
|
this.props = {
|
|
44
44
|
...this.props,
|
|
45
45
|
...e
|
|
@@ -56,54 +56,56 @@ const q = (s) => {
|
|
|
56
56
|
},
|
|
57
57
|
async handleOk() {
|
|
58
58
|
try {
|
|
59
|
-
if (
|
|
59
|
+
if (t({
|
|
60
60
|
confirmLoading: !0
|
|
61
61
|
}), this.props?.onOk) {
|
|
62
62
|
const e = this.props?.content?.component?.exposed ?? void 0;
|
|
63
63
|
await this.props.onOk(e);
|
|
64
64
|
}
|
|
65
|
-
|
|
65
|
+
t({
|
|
66
66
|
confirmLoading: !1
|
|
67
67
|
}), a ? i() : c();
|
|
68
68
|
} catch {
|
|
69
|
-
|
|
69
|
+
t({
|
|
70
70
|
confirmLoading: !1
|
|
71
71
|
});
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
74
|
},
|
|
75
75
|
render() {
|
|
76
|
-
const e =
|
|
77
|
-
return
|
|
78
|
-
default: () => [
|
|
76
|
+
const e = L(this.props, ["onCancel", "onOk", "open", "onUpdate:open", "getContainer", "icon"]);
|
|
77
|
+
return l(N, f.value, {
|
|
78
|
+
default: () => [l(P, k({
|
|
79
79
|
class: {
|
|
80
|
-
[
|
|
81
|
-
[
|
|
80
|
+
[s()]: !0,
|
|
81
|
+
[s("wrapper")]: n
|
|
82
82
|
},
|
|
83
83
|
open: this.open,
|
|
84
84
|
onCancel: this.handleCancel,
|
|
85
85
|
onOk: this.handleOk,
|
|
86
86
|
centered: !0
|
|
87
87
|
}, e), {
|
|
88
|
-
default: () => [
|
|
88
|
+
default: () => [l("div", {
|
|
89
89
|
class: {
|
|
90
|
-
[
|
|
90
|
+
[s("body-wrapper")]: n
|
|
91
91
|
},
|
|
92
|
-
style:
|
|
93
|
-
maxHeight: `calc(100vh - ${(
|
|
92
|
+
style: n === !1 ? {} : {
|
|
93
|
+
maxHeight: `calc(100vh - ${(n === !0 ? 100 : M(n) ? Number(n) : 100) * 2}px)`
|
|
94
94
|
}
|
|
95
95
|
}, [this.props?.content])]
|
|
96
96
|
})]
|
|
97
97
|
});
|
|
98
98
|
}
|
|
99
|
-
}),
|
|
100
|
-
|
|
99
|
+
}), x = u(f?.value?.getPopupContainer), v = u(p.getContainer), O = x || v || E().document.body, r = document.createElement("div");
|
|
100
|
+
O.appendChild(r);
|
|
101
|
+
const d = w(g), y = A();
|
|
102
|
+
return d.appContext = p.appContext || y || d.appContext, m(d, r), {
|
|
101
103
|
destroy: i,
|
|
102
|
-
update:
|
|
103
|
-
open:
|
|
104
|
+
update: C,
|
|
105
|
+
open: h,
|
|
104
106
|
close: c
|
|
105
107
|
};
|
|
106
108
|
};
|
|
107
109
|
export {
|
|
108
|
-
|
|
110
|
+
z as createModal
|
|
109
111
|
};
|
|
@@ -1 +1,4 @@
|
|
|
1
|
+
import { AppContext } from 'vue';
|
|
1
2
|
export declare const getContainerDom: (params?: HTMLElement | Element | (() => HTMLElement | Element)) => Element | undefined;
|
|
3
|
+
export declare const setModalGlobalAppContext: (appContext: AppContext) => void;
|
|
4
|
+
export declare const getModalGlobalAppContext: () => AppContext;
|
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
const
|
|
1
|
+
const e = (t) => typeof t == "function" ? t?.() : t;
|
|
2
|
+
let o;
|
|
3
|
+
const n = (t) => {
|
|
4
|
+
o = t;
|
|
5
|
+
}, l = () => o;
|
|
2
6
|
export {
|
|
3
|
-
|
|
7
|
+
e as getContainerDom,
|
|
8
|
+
l as getModalGlobalAppContext,
|
|
9
|
+
n as setModalGlobalAppContext
|
|
4
10
|
};
|
|
@@ -745,6 +745,7 @@ export declare const apTableFormItemMap: {
|
|
|
745
745
|
default: RadioGroupButtonStyle;
|
|
746
746
|
};
|
|
747
747
|
id: StringConstructor;
|
|
748
|
+
block: BooleanConstructor;
|
|
748
749
|
optionType: {
|
|
749
750
|
type: PropType<RadioGroupOptionType>;
|
|
750
751
|
default: RadioGroupOptionType;
|
|
@@ -760,6 +761,7 @@ export declare const apTableFormItemMap: {
|
|
|
760
761
|
}>> & Readonly<{}>, () => VueNode, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, {
|
|
761
762
|
size: "default" | "small" | "large";
|
|
762
763
|
onChange: (e: RadioChangeEvent) => void;
|
|
764
|
+
block: boolean;
|
|
763
765
|
disabled: boolean;
|
|
764
766
|
'onUpdate:value': (val: any) => void;
|
|
765
767
|
options: (string | number | RadioGroupChildOption)[];
|
|
@@ -793,6 +795,7 @@ export declare const apTableFormItemMap: {
|
|
|
793
795
|
default: RadioGroupButtonStyle;
|
|
794
796
|
};
|
|
795
797
|
id: StringConstructor;
|
|
798
|
+
block: BooleanConstructor;
|
|
796
799
|
optionType: {
|
|
797
800
|
type: PropType<RadioGroupOptionType>;
|
|
798
801
|
default: RadioGroupOptionType;
|
|
@@ -808,6 +811,7 @@ export declare const apTableFormItemMap: {
|
|
|
808
811
|
}>> & Readonly<{}>, () => VueNode, {}, {}, {}, {
|
|
809
812
|
size: "default" | "small" | "large";
|
|
810
813
|
onChange: (e: RadioChangeEvent) => void;
|
|
814
|
+
block: boolean;
|
|
811
815
|
disabled: boolean;
|
|
812
816
|
'onUpdate:value': (val: any) => void;
|
|
813
817
|
options: (string | number | RadioGroupChildOption)[];
|
|
@@ -216,6 +216,11 @@ export type ApColumnType<RecordType = any, ExtraValueType = 'text', ValueType ex
|
|
|
216
216
|
originalNode?: VNode;
|
|
217
217
|
originalText?: any;
|
|
218
218
|
}) => any;
|
|
219
|
+
/**
|
|
220
|
+
* 是否在表头渲染必填标记
|
|
221
|
+
* @description 仅限内部使用
|
|
222
|
+
*/
|
|
223
|
+
_requireMark?: boolean;
|
|
219
224
|
} : never;
|
|
220
225
|
export type RequestData<T> = {
|
|
221
226
|
data: T[] | undefined;
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { isVNode as T, createVNode as
|
|
2
|
-
import { isObject as d, isArray as u, isUndefined as
|
|
3
|
-
import { apTableRenderItemMap as P, apTableFormItemMap as
|
|
4
|
-
import { isType as
|
|
1
|
+
import { isVNode as T, createVNode as s, mergeProps as a, cloneVNode as h, createTextVNode as C, Fragment as j } from "vue";
|
|
2
|
+
import { isObject as d, isArray as u, isUndefined as E, isFunction as g, omit as O, isBoolean as v, isString as x, isEqual as F, sortBy as m, isPlainObject as y, every as N, isEmpty as R } from "lodash-unified";
|
|
3
|
+
import { apTableRenderItemMap as P, apTableFormItemMap as S } from "./constants.mjs";
|
|
4
|
+
import { isType as I } from "@fruits-chain/utils";
|
|
5
5
|
import "../ap-form/index.mjs";
|
|
6
|
-
import { Tooltip as
|
|
6
|
+
import { Tooltip as V } from "@aplus-frontend/antdv";
|
|
7
7
|
import { QuestionCircleOutlined as w } from "@ant-design/icons-vue";
|
|
8
8
|
import A from "../ap-form/item/index.vue.mjs";
|
|
9
|
-
function
|
|
9
|
+
function M(e) {
|
|
10
10
|
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !T(e);
|
|
11
11
|
}
|
|
12
|
-
const
|
|
12
|
+
const _ = (e, t, n) => {
|
|
13
13
|
let o = {};
|
|
14
14
|
return d(e) ? Object.keys(e).forEach((r) => {
|
|
15
|
-
d(e[r]) ? o[r] =
|
|
15
|
+
d(e[r]) ? o[r] = _(e[r], t[r], n) : o[r] = n(e[r], t);
|
|
16
16
|
}) : o = n(e, t), o;
|
|
17
|
-
},
|
|
17
|
+
}, z = (e, t) => {
|
|
18
18
|
switch (e) {
|
|
19
19
|
case "dayjs":
|
|
20
20
|
return t.valueOf();
|
|
@@ -35,15 +35,15 @@ const M = (e, t, n) => {
|
|
|
35
35
|
return t;
|
|
36
36
|
}
|
|
37
37
|
};
|
|
38
|
-
function
|
|
38
|
+
function G(e) {
|
|
39
39
|
return u(e) ? e.join(".") : e;
|
|
40
40
|
}
|
|
41
|
-
function
|
|
41
|
+
function q(e) {
|
|
42
42
|
const t = Object.prototype.toString.call(e).match(/^\[object (.*)\]$/)[1].toLowerCase();
|
|
43
43
|
return t === "string" && typeof e == "object" ? "object" : e === null ? "null" : e === void 0 ? "undefined" : t;
|
|
44
44
|
}
|
|
45
|
-
const
|
|
46
|
-
if (
|
|
45
|
+
const W = (e) => {
|
|
46
|
+
if (q(e) === "map")
|
|
47
47
|
return e;
|
|
48
48
|
const t = /* @__PURE__ */ new Map();
|
|
49
49
|
for (const [n, o] of Object.entries(e || {})) {
|
|
@@ -52,41 +52,41 @@ const q = (e) => {
|
|
|
52
52
|
}
|
|
53
53
|
return t;
|
|
54
54
|
}, b = (e) => {
|
|
55
|
-
const t = [], n =
|
|
55
|
+
const t = [], n = W(e);
|
|
56
56
|
return n.forEach((o, r) => {
|
|
57
|
-
const
|
|
58
|
-
if (
|
|
59
|
-
if (typeof
|
|
57
|
+
const i = n.get(r) || n.get(`${r}`);
|
|
58
|
+
if (i) {
|
|
59
|
+
if (typeof i == "object" && i?.text) {
|
|
60
60
|
t.push({
|
|
61
|
-
text:
|
|
61
|
+
text: i?.text,
|
|
62
62
|
value: r,
|
|
63
|
-
label:
|
|
64
|
-
disabled:
|
|
63
|
+
label: i?.text,
|
|
64
|
+
disabled: i.disabled
|
|
65
65
|
});
|
|
66
66
|
return;
|
|
67
67
|
}
|
|
68
68
|
t.push({
|
|
69
|
-
text:
|
|
70
|
-
label:
|
|
69
|
+
text: i,
|
|
70
|
+
label: i,
|
|
71
71
|
value: r
|
|
72
72
|
});
|
|
73
73
|
}
|
|
74
74
|
}), t;
|
|
75
|
-
},
|
|
76
|
-
function
|
|
75
|
+
}, X = (e) => E(e) || e < 0 ? 0 : e;
|
|
76
|
+
function B(e, t) {
|
|
77
77
|
return !e || !g(e) ? e : e(t);
|
|
78
78
|
}
|
|
79
|
-
function
|
|
79
|
+
function Y(e) {
|
|
80
80
|
let t = e.valueType || "text";
|
|
81
81
|
return e.valueEnum && (t = "status"), t;
|
|
82
82
|
}
|
|
83
|
-
function
|
|
83
|
+
function Z(e, t, n, o) {
|
|
84
84
|
const r = P[e];
|
|
85
|
-
return r ?
|
|
85
|
+
return r ? s(r, a(t, {
|
|
86
86
|
mode: "read"
|
|
87
87
|
}), null) : o?.[e]?.render?.(t.value, n, t) || t.value;
|
|
88
88
|
}
|
|
89
|
-
function
|
|
89
|
+
function ee(e, t) {
|
|
90
90
|
if (e.customRenderFormItem)
|
|
91
91
|
return () => {
|
|
92
92
|
const r = e.customRenderFormItem(e);
|
|
@@ -96,47 +96,47 @@ function Z(e, t) {
|
|
|
96
96
|
...r.props || {}
|
|
97
97
|
});
|
|
98
98
|
};
|
|
99
|
-
const n =
|
|
99
|
+
const n = S[e.valueType];
|
|
100
100
|
if (n)
|
|
101
|
-
return () =>
|
|
101
|
+
return () => s(n, a(e.fieldProps, {
|
|
102
102
|
span: e.span
|
|
103
103
|
}), null);
|
|
104
104
|
const o = t?.[e.valueType];
|
|
105
105
|
return () => {
|
|
106
106
|
const r = o?.renderFormItem?.(e.fieldProps.field);
|
|
107
|
-
return r ?
|
|
107
|
+
return r ? s(A, a(e.fieldProps, {
|
|
108
108
|
span: e.span
|
|
109
|
-
}),
|
|
109
|
+
}), M(r) ? r : {
|
|
110
110
|
default: () => [r]
|
|
111
111
|
}) : null;
|
|
112
112
|
};
|
|
113
113
|
}
|
|
114
|
-
function
|
|
115
|
-
const n =
|
|
114
|
+
function te(e, t) {
|
|
115
|
+
const n = B(e.fieldProps, t), o = n?.field || n || {}, r = e.valueType === "switch", i = e.valueType === "index", f = r ? {
|
|
116
116
|
checked: t.value
|
|
117
117
|
} : {
|
|
118
|
-
value:
|
|
118
|
+
value: i ? t.index + 1 : t.value
|
|
119
119
|
};
|
|
120
120
|
return e.valueEnum && (o.valueEnum = e.valueEnum), {
|
|
121
|
-
...
|
|
121
|
+
...O(o, ["request"]),
|
|
122
122
|
...f
|
|
123
123
|
};
|
|
124
124
|
}
|
|
125
|
-
function
|
|
125
|
+
function ne(e) {
|
|
126
126
|
const t = {
|
|
127
127
|
...e
|
|
128
128
|
};
|
|
129
|
-
return
|
|
129
|
+
return v(e.filters) && e.filters && e.valueEnum && (t.filters = b(e.valueEnum)), t;
|
|
130
130
|
}
|
|
131
|
-
function
|
|
131
|
+
function re(e, t) {
|
|
132
132
|
const n = t || {};
|
|
133
133
|
return e.valueEnum && !n.field?.options && (n.field = {
|
|
134
134
|
...n.field,
|
|
135
135
|
options: b(e.valueEnum)
|
|
136
136
|
}), n;
|
|
137
137
|
}
|
|
138
|
-
function
|
|
139
|
-
if (!
|
|
138
|
+
function oe(e) {
|
|
139
|
+
if (!I("Object")(e))
|
|
140
140
|
return e;
|
|
141
141
|
try {
|
|
142
142
|
return JSON.stringify(e);
|
|
@@ -144,29 +144,34 @@ function re(e) {
|
|
|
144
144
|
return e;
|
|
145
145
|
}
|
|
146
146
|
}
|
|
147
|
-
function
|
|
147
|
+
function ie(e, t, n, o) {
|
|
148
148
|
const r = n?.({
|
|
149
149
|
title: e.title,
|
|
150
150
|
column: e
|
|
151
|
-
}),
|
|
152
|
-
if (r &&
|
|
151
|
+
}), i = r?.filter((l) => l.type !== Symbol.for("v-cmt")) || [];
|
|
152
|
+
if (r && i.length > 0)
|
|
153
153
|
return r;
|
|
154
|
-
const c =
|
|
154
|
+
const c = x(e.title) ? s("span", {
|
|
155
155
|
class: t,
|
|
156
156
|
title: e.title
|
|
157
|
-
}, [e.
|
|
158
|
-
|
|
157
|
+
}, [e._requireMark ? s("span", {
|
|
158
|
+
style: {
|
|
159
|
+
color: "#FF4D4F",
|
|
160
|
+
paddingRight: "2px"
|
|
161
|
+
}
|
|
162
|
+
}, [C("*")]) : null, e.title]) : e.title, p = e.tooltip ? g(e.tooltip) ? e.tooltip(e) : s(j, null, [e.tooltip]) : null;
|
|
163
|
+
return p ? s("span", {
|
|
159
164
|
style: {
|
|
160
165
|
display: "inline-flex",
|
|
161
166
|
alignItems: "center",
|
|
162
167
|
maxWidth: "100%"
|
|
163
168
|
}
|
|
164
|
-
}, [c,
|
|
169
|
+
}, [c, s(V, {
|
|
165
170
|
title: p,
|
|
166
171
|
placement: "bottom",
|
|
167
172
|
getPopupContainer: (l) => l.closest(".ant-table") || l.closest(".ant-modal") || l.closest(".vxe-table") || document.body
|
|
168
173
|
}, {
|
|
169
|
-
default: () => [
|
|
174
|
+
default: () => [s(w, {
|
|
170
175
|
style: {
|
|
171
176
|
paddingInline: "4px",
|
|
172
177
|
color: o,
|
|
@@ -178,41 +183,41 @@ function oe(e, t, n, o) {
|
|
|
178
183
|
function se(e, t) {
|
|
179
184
|
const n = [];
|
|
180
185
|
function o(r) {
|
|
181
|
-
for (const
|
|
182
|
-
|
|
186
|
+
for (const i of r)
|
|
187
|
+
i.children?.length ? o(i.children) : n.push(t(i));
|
|
183
188
|
}
|
|
184
189
|
return o(e), n;
|
|
185
190
|
}
|
|
186
|
-
function
|
|
191
|
+
function le(e, t) {
|
|
187
192
|
if (u(e) && u(t))
|
|
188
|
-
return
|
|
193
|
+
return F(m(e), m(t));
|
|
189
194
|
if (y(e) && y(t)) {
|
|
190
|
-
const n = (o) => N(o, (r) => r == null) ||
|
|
195
|
+
const n = (o) => N(o, (r) => r == null) || R(o);
|
|
191
196
|
if (n(e) && n(t))
|
|
192
197
|
return !0;
|
|
193
198
|
}
|
|
194
199
|
}
|
|
195
|
-
function
|
|
200
|
+
function ue(e) {
|
|
196
201
|
if (e !== !1)
|
|
197
202
|
return e;
|
|
198
203
|
}
|
|
199
204
|
export {
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
205
|
+
ne as apColumnToColumn,
|
|
206
|
+
G as dataIndexToStr,
|
|
207
|
+
ue as falseToUndefined,
|
|
208
|
+
_ as formatParamsValueType,
|
|
209
|
+
X as getColumnOrder,
|
|
210
|
+
B as getFieldProps,
|
|
211
|
+
ee as getSearchFormItemRenderNode,
|
|
212
|
+
Z as getTableCellRenderNode,
|
|
213
|
+
te as getTableRenderProps,
|
|
214
|
+
Y as getTableRenderType,
|
|
215
|
+
ie as getTableTitle,
|
|
216
|
+
le as isEqualCustom,
|
|
217
|
+
W as objectToMap,
|
|
218
|
+
oe as objectToString,
|
|
219
|
+
z as parseFieldValue,
|
|
215
220
|
se as recursionApColumns,
|
|
216
|
-
|
|
221
|
+
re as updateFormProps,
|
|
217
222
|
b as valueEnumToArray
|
|
218
223
|
};
|
|
@@ -179,6 +179,10 @@ declare const _default: DefineComponent<{}, {
|
|
|
179
179
|
file: UploadFile<any>;
|
|
180
180
|
}) => VueNode;
|
|
181
181
|
};
|
|
182
|
+
pastable: {
|
|
183
|
+
type: BooleanConstructor;
|
|
184
|
+
default: boolean;
|
|
185
|
+
};
|
|
182
186
|
}>> & Readonly<{}>, () => VueNode, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, {
|
|
183
187
|
progress: UploadListProgressProps;
|
|
184
188
|
type: UploadType;
|
|
@@ -209,6 +213,7 @@ declare const _default: DefineComponent<{}, {
|
|
|
209
213
|
customRequest: (options: UploadRequestOption<any>) => void;
|
|
210
214
|
withCredentials: boolean;
|
|
211
215
|
openFileDialogOnClick: boolean;
|
|
216
|
+
pastable: boolean;
|
|
212
217
|
fileList: UploadFile<any>[];
|
|
213
218
|
defaultFileList: UploadFile<any>[];
|
|
214
219
|
showUploadList: boolean | ShowUploadListInterface;
|
|
@@ -405,6 +410,10 @@ declare const _default: DefineComponent<{}, {
|
|
|
405
410
|
file: UploadFile<any>;
|
|
406
411
|
}) => VueNode;
|
|
407
412
|
};
|
|
413
|
+
pastable: {
|
|
414
|
+
type: BooleanConstructor;
|
|
415
|
+
default: boolean;
|
|
416
|
+
};
|
|
408
417
|
}>> & Readonly<{}>, () => VueNode, {}, {}, {}, {
|
|
409
418
|
progress: UploadListProgressProps;
|
|
410
419
|
type: UploadType;
|
|
@@ -435,6 +444,7 @@ declare const _default: DefineComponent<{}, {
|
|
|
435
444
|
customRequest: (options: UploadRequestOption<any>) => void;
|
|
436
445
|
withCredentials: boolean;
|
|
437
446
|
openFileDialogOnClick: boolean;
|
|
447
|
+
pastable: boolean;
|
|
438
448
|
fileList: UploadFile<any>[];
|
|
439
449
|
defaultFileList: UploadFile<any>[];
|
|
440
450
|
showUploadList: boolean | ShowUploadListInterface;
|