@aplus-frontend/ui 0.5.15 → 0.5.17

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.
@@ -1,9 +1,9 @@
1
- import { omit as d, isUndefined as n, isFunction as f, isNumber as c } from "lodash-unified";
2
- const h = 30, v = 50;
3
- function R(e) {
4
- var r, l, o;
1
+ import { omit as u, isUndefined as d, isFunction as f, isNumber as c } from "lodash-unified";
2
+ const h = 20, v = 50;
3
+ function y(e) {
4
+ var l, n, i;
5
5
  const t = {
6
- ...d(e, [
6
+ ...u(e, [
7
7
  "columns",
8
8
  "request",
9
9
  "searchForm",
@@ -15,24 +15,31 @@ function R(e) {
15
15
  if (e.adaptive && (t.autoResize = !0, t.height = "100%"), e.columnResizable && (t.columnConfig ? t.columnConfig.resizable = !0 : t.columnConfig = {
16
16
  resizable: !0
17
17
  }), e.rowSelection) {
18
- const i = e.rowSelection === !0 ? {} : e.rowSelection;
19
- i.type === "radio" ? t.radioConfig = {
18
+ const r = e.rowSelection === !0 ? {} : e.rowSelection;
19
+ r.type === "radio" ? t.radioConfig = {
20
20
  highlight: !0,
21
- checkMethod({ row: u }) {
22
- return i.disabled ? !i.disabled(u) : !0;
21
+ checkMethod({ row: o }) {
22
+ return r.disabled ? !r.disabled(o) : !0;
23
23
  },
24
- checkRowKey: (r = i.defaultSelectedRowKeys) == null ? void 0 : r[0],
25
- reserve: n(i.preserveSelectedRowKeys) ? !0 : i.preserveSelectedRowKeys
24
+ visibleMethod({ row: o }) {
25
+ return r.shown ? r.shown(o) : !0;
26
+ },
27
+ checkRowKey: (l = r.defaultSelectedRowKeys) == null ? void 0 : l[0],
28
+ reserve: d(r.preserveSelectedRowKeys) ? !0 : r.preserveSelectedRowKeys
26
29
  } : t.checkboxConfig = {
27
30
  highlight: !0,
28
- checkMethod({ row: u }) {
29
- return i.disabled ? !i.disabled(u) : !0;
31
+ checkMethod({ row: o }) {
32
+ return r.disabled ? !r.disabled(o) : !0;
33
+ },
34
+ visibleMethod({ row: o }) {
35
+ return r.shown ? r.shown(o) : !0;
30
36
  },
31
- checkRowKeys: i.defaultSelectedRowKeys,
32
- reserve: n(i.preserveSelectedRowKeys) ? !0 : i.preserveSelectedRowKeys
37
+ checkRowKeys: r.defaultSelectedRowKeys,
38
+ reserve: d(r.preserveSelectedRowKeys) ? !0 : r.preserveSelectedRowKeys,
39
+ range: r.range || !1
33
40
  };
34
41
  }
35
- return t.border = e.bordered, e.expandable && (t.expandConfig = d(e.expandable, [
42
+ return t.border = e.bordered, e.expandable && (t.expandConfig = u(e.expandable, [
36
43
  "renderContent",
37
44
  "width",
38
45
  "title"
@@ -40,27 +47,27 @@ function R(e) {
40
47
  enabled: !1
41
48
  }, t.virtualYConfig = {
42
49
  enabled: !1
43
- }) : (a(t, "X", (l = e.virtual) == null ? void 0 : l.x), a(t, "Y", (o = e.virtual) == null ? void 0 : o.y)), t;
50
+ }) : (s(t, "X", (n = e.virtual) == null ? void 0 : n.x), s(t, "Y", (i = e.virtual) == null ? void 0 : i.y)), t;
44
51
  }
45
- function a(e, t, r) {
46
- const l = t === "X", o = l ? "virtualXConfig" : "virtualYConfig", i = r !== !1, u = l ? h : v, s = c(r) && r >= 0 ? r : u;
47
- e[o] = {
48
- enabled: i,
49
- gt: s
52
+ function s(e, t, l) {
53
+ const n = t === "X", i = n ? "virtualXConfig" : "virtualYConfig", r = l !== !1, o = n ? h : v, a = c(l) && l >= 0 ? l : o;
54
+ e[i] = {
55
+ enabled: r,
56
+ gt: a
50
57
  };
51
58
  }
52
59
  function b(e) {
53
60
  return e === !0 ? "left" : e;
54
61
  }
55
- function w(e, t) {
56
- const r = e === !0 || !e.type ? "checkbox" : e.type, l = e === !0 ? 60 : e.columnWidth || 60;
57
- let o = e === !0 ? void 0 : b(e.fixed);
58
- return o || (o === !1 ? o = void 0 : o = t.some(
59
- (i) => i.fixed === "left" || i.fixed === !0
62
+ function R(e, t) {
63
+ const l = e === !0 || !e.type ? "checkbox" : e.type, n = e === !0 ? 60 : e.columnWidth || 60;
64
+ let i = e === !0 ? void 0 : b(e.fixed);
65
+ return i || (i === !1 ? i = void 0 : i = t.some(
66
+ (r) => r.fixed === "left" || r.fixed === !0
60
67
  ) ? "left" : void 0), {
61
- type: r,
62
- width: l,
63
- fixed: o
68
+ type: l,
69
+ width: n,
70
+ fixed: i
64
71
  };
65
72
  }
66
73
  function x(e) {
@@ -73,6 +80,6 @@ function x(e) {
73
80
  }
74
81
  export {
75
82
  x as getRowExpandProps,
76
- w as getRowSelectionProps,
77
- R as toVxeProps
83
+ R as getRowSelectionProps,
84
+ y as toVxeProps
78
85
  };
@@ -1,20 +1,20 @@
1
- import { isVNode as E, createVNode as l, mergeProps as y, cloneVNode as j, Fragment as O } from "vue";
2
- import { isObject as a, isArray as c, isUndefined as g, isFunction as T, omit as C, isBoolean as F, isString as N, isEqual as S, sortBy as p, isPlainObject as d, every as I, isEmpty as v } from "lodash-unified";
3
- import { apTableRenderItemMap as V, apTableFormItemMap as P } from "./constants.mjs";
1
+ import { isVNode as E, createVNode as l, mergeProps as b, cloneVNode as j, Fragment as O } from "vue";
2
+ import { isObject as p, isArray as f, isUndefined as g, isFunction as T, omit as C, isBoolean as F, isString as N, isEqual as S, sortBy as d, isPlainObject as m, every as I, isEmpty as v } from "lodash-unified";
3
+ import { apTableRenderItemMap as P, apTableFormItemMap as V } from "./constants.mjs";
4
4
  import { isType as _ } from "@fruits-chain/utils";
5
5
  import "../ap-form/index.mjs";
6
6
  import { Tooltip as w } from "@aplus-frontend/antdv";
7
7
  import { QuestionCircleOutlined as x } from "@ant-design/icons-vue";
8
8
  import "./components/dynamic-component/index.vue.mjs";
9
- import m from "./components/dynamic-component/index.vue2.mjs";
9
+ import y from "./components/dynamic-component/index.vue2.mjs";
10
10
  import A from "../ap-form/item/index.vue.mjs";
11
11
  function R(t) {
12
12
  return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !E(t);
13
13
  }
14
14
  const q = (t, e, n) => {
15
15
  let o = {};
16
- return a(t) ? Object.keys(t).forEach((i) => {
17
- a(t[i]) ? o[i] = q(t[i], e[i], n) : o[i] = n(t[i], e);
16
+ return p(t) ? Object.keys(t).forEach((i) => {
17
+ p(t[i]) ? o[i] = q(t[i], e[i], n) : o[i] = n(t[i], e);
18
18
  }) : o = n(t, e), o;
19
19
  }, k = (t, e) => {
20
20
  switch (t) {
@@ -28,7 +28,7 @@ const q = (t, e, n) => {
28
28
  }
29
29
  case "multiple":
30
30
  case "multipleNumber":
31
- return c(e) ? e : [e];
31
+ return f(e) ? e : [e];
32
32
  case "boolean":
33
33
  return e;
34
34
  case "object":
@@ -38,13 +38,13 @@ const q = (t, e, n) => {
38
38
  }
39
39
  };
40
40
  function H(t) {
41
- return c(t) ? t.join(".") : t;
41
+ return f(t) ? t.join(".") : t;
42
42
  }
43
43
  function W(t) {
44
44
  const e = Object.prototype.toString.call(t).match(/^\[object (.*)\]$/)[1].toLowerCase();
45
45
  return e === "string" && typeof t == "object" ? "object" : t === null ? "null" : t === void 0 ? "undefined" : e;
46
46
  }
47
- const $ = (t) => W(t) === "map" ? t : new Map(Object.entries(t || {})), b = (t) => {
47
+ const $ = (t) => W(t) === "map" ? t : new Map(Object.entries(t || {})), h = (t) => {
48
48
  const e = [], n = $(t);
49
49
  return n.forEach((o, i) => {
50
50
  const r = n.get(i) || n.get(`${i}`);
@@ -75,9 +75,9 @@ function tt(t) {
75
75
  }
76
76
  function et(t, e, n, o) {
77
77
  var s;
78
- const i = V[t];
78
+ const i = P[t];
79
79
  if (i)
80
- return l(i, y(e, {
80
+ return l(i, b(e, {
81
81
  mode: "read"
82
82
  }), null);
83
83
  const r = o == null ? void 0 : o[t];
@@ -86,7 +86,7 @@ function et(t, e, n, o) {
86
86
  function nt(t, e) {
87
87
  if (t.customRenderFormItem)
88
88
  return {
89
- Comp: m,
89
+ Comp: y,
90
90
  render: function(s) {
91
91
  const u = s.item.customRenderFormItem(s.item);
92
92
  return j(u, {
@@ -99,7 +99,7 @@ function nt(t, e) {
99
99
  });
100
100
  }
101
101
  };
102
- const n = P[t.valueType];
102
+ const n = V[t.valueType];
103
103
  if (n)
104
104
  return {
105
105
  Comp: n
@@ -108,7 +108,7 @@ function nt(t, e) {
108
108
  function i(r) {
109
109
  var u;
110
110
  const s = (u = o == null ? void 0 : o.renderFormItem) == null ? void 0 : u.call(o, r.item.fieldProps.field);
111
- return s ? l(A, y(r.item.fieldProps, {
111
+ return s ? l(A, b(r.item.fieldProps, {
112
112
  hidden: r.hidden,
113
113
  class: r.class,
114
114
  span: t.span
@@ -117,7 +117,7 @@ function nt(t, e) {
117
117
  }) : null;
118
118
  }
119
119
  return {
120
- Comp: m,
120
+ Comp: y,
121
121
  render: i
122
122
  };
123
123
  }
@@ -136,14 +136,14 @@ function ot(t) {
136
136
  const e = {
137
137
  ...t
138
138
  };
139
- return F(t.filters) && t.filters && t.valueEnum && (e.filters = b(t.valueEnum)), e;
139
+ return F(t.filters) && t.filters && t.valueEnum && (e.filters = h(t.valueEnum)), e;
140
140
  }
141
141
  function it(t, e) {
142
142
  var o;
143
143
  const n = e || {};
144
144
  return t.valueEnum && !((o = n.field) != null && o.options) && (n.field = {
145
145
  ...n.field,
146
- options: b(t.valueEnum)
146
+ options: h(t.valueEnum)
147
147
  }), n;
148
148
  }
149
149
  function st(t) {
@@ -159,22 +159,23 @@ function ut(t, e, n, o) {
159
159
  const i = n == null ? void 0 : n({
160
160
  title: t.title,
161
161
  column: t
162
- }), r = (i == null ? void 0 : i.filter((h) => h.type !== Symbol.for("v-cmt"))) || [];
162
+ }), r = (i == null ? void 0 : i.filter((c) => c.type !== Symbol.for("v-cmt"))) || [];
163
163
  if (i && r.length > 0)
164
164
  return i;
165
165
  const u = N(t.title) ? l("span", {
166
166
  class: e,
167
167
  title: t.title
168
- }, [t.title]) : t.title, f = t.tooltip ? T(t.tooltip) ? t.tooltip(t) : l(O, null, [t.tooltip]) : null;
169
- return f ? l("span", {
168
+ }, [t.title]) : t.title, a = t.tooltip ? T(t.tooltip) ? t.tooltip(t) : l(O, null, [t.tooltip]) : null;
169
+ return a ? l("span", {
170
170
  style: {
171
171
  display: "inline-flex",
172
172
  alignItems: "center",
173
173
  maxWidth: "100%"
174
174
  }
175
175
  }, [u, l(w, {
176
- title: f,
177
- placement: "bottom"
176
+ title: a,
177
+ placement: "bottom",
178
+ getPopupContainer: (c) => c.closest(".ant-table") || c.closest(".ant-modal") || document.body
178
179
  }, {
179
180
  default: () => [l(x, {
180
181
  style: {
@@ -195,9 +196,9 @@ function lt(t, e) {
195
196
  return o(t), n;
196
197
  }
197
198
  function ct(t, e) {
198
- if (c(t) && c(e))
199
- return S(p(t), p(e));
200
- if (d(t) && d(e)) {
199
+ if (f(t) && f(e))
200
+ return S(d(t), d(e));
201
+ if (m(t) && m(e)) {
201
202
  const n = (o) => I(o, (i) => i == null) || v(o);
202
203
  if (n(t) && n(e))
203
204
  return !0;
@@ -225,5 +226,5 @@ export {
225
226
  k as parseFieldValue,
226
227
  lt as recursionApColumns,
227
228
  it as updateFormProps,
228
- b as valueEnumToArray
229
+ h as valueEnumToArray
229
230
  };
package/es/src/index.d.ts CHANGED
@@ -24,3 +24,4 @@ export * from './full-screen';
24
24
  export * from './resize-observer';
25
25
  export * from './ap-grid';
26
26
  export * from './text';
27
+ export * from './mask';