@aplus-frontend/ui 6.41.0 → 6.41.1
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/ap-grid/utils/col.mjs +33 -33
- package/es/src/version.d.ts +1 -1
- package/es/src/version.mjs +1 -1
- package/lib/src/ap-grid/utils/col.js +1 -1
- package/lib/src/version.d.ts +1 -1
- package/lib/src/version.js +1 -1
- package/package.json +1 -1
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { createVNode as u, Fragment as
|
|
2
|
-
import { isArray as
|
|
3
|
-
import { valueEnumToArray as S, objectToString as $, getTableTitle as
|
|
1
|
+
import { createVNode as u, Fragment as T } from "vue";
|
|
2
|
+
import { isArray as x, isUndefined as E, isString as o, isBoolean as F, isNumber as O, pick as R } from "lodash-unified";
|
|
3
|
+
import { valueEnumToArray as S, objectToString as $, getTableTitle as v, getTableRenderType as V, getTableRenderProps as B, getTableCellRenderNode as M } from "../../ap-table/utils.mjs";
|
|
4
4
|
import { noRenderAsFormItemValueList as _ } from "../../ap-table/constants.mjs";
|
|
5
5
|
import "../../ap-table/components/paragraph-ellipsis/index.vue.mjs";
|
|
6
6
|
import j from "../../ap-table/components/paragraph-ellipsis/index.vue2.mjs";
|
|
7
|
-
function
|
|
7
|
+
function c(e, t) {
|
|
8
8
|
if (t)
|
|
9
|
-
return
|
|
9
|
+
return x(t) ? t.reduce((r, n) => r?.[n], e) : e?.[t];
|
|
10
10
|
}
|
|
11
|
-
function
|
|
11
|
+
function A(e) {
|
|
12
12
|
if (!E(e))
|
|
13
|
-
return
|
|
13
|
+
return x(e) ? e.reduce((t, r) => o(r) ? `${t}${t ? "." : ""}${r}` : `${t}[${r}]`, "") : String(e);
|
|
14
14
|
}
|
|
15
|
-
function
|
|
15
|
+
function N(e) {
|
|
16
16
|
if (e)
|
|
17
17
|
return e === !0 ? "left" : e;
|
|
18
18
|
}
|
|
19
19
|
function q(e) {
|
|
20
|
-
return
|
|
20
|
+
return F(e) ? {
|
|
21
21
|
sortable: e
|
|
22
22
|
} : e ? {
|
|
23
23
|
sortable: !0,
|
|
@@ -29,7 +29,7 @@ function q(e) {
|
|
|
29
29
|
}
|
|
30
30
|
function I(e) {
|
|
31
31
|
let t;
|
|
32
|
-
return
|
|
32
|
+
return F(e.filters) && e.valueEnum ? t = S(e.valueEnum) : t = e.filters, t?.map((r) => ({
|
|
33
33
|
label: o(r.text) ? r.text : "",
|
|
34
34
|
value: r.value
|
|
35
35
|
}));
|
|
@@ -65,10 +65,10 @@ function z(e, t, r) {
|
|
|
65
65
|
}
|
|
66
66
|
return r;
|
|
67
67
|
}
|
|
68
|
-
function
|
|
69
|
-
const n =
|
|
70
|
-
return n.field =
|
|
71
|
-
header: () =>
|
|
68
|
+
function y(e, t, r) {
|
|
69
|
+
const n = R(e, ["width", "minWidth", "align"]);
|
|
70
|
+
return n.field = A(e.dataIndex), n.fixed = N(e.fixed), n.slots = {
|
|
71
|
+
header: () => v(e, r, void 0, t)
|
|
72
72
|
}, n.headerAlign = e.align, n.showOverflow = !1, n.showFooterOverflow = !1, n;
|
|
73
73
|
}
|
|
74
74
|
function D(e, t, r) {
|
|
@@ -88,65 +88,65 @@ const G = ({
|
|
|
88
88
|
}), l = M(s, d, t.record, n), a = r.renderText?.({
|
|
89
89
|
value: e,
|
|
90
90
|
...t
|
|
91
|
-
}) || e, p = r.renderText ? u(
|
|
91
|
+
}) || e, p = r.renderText ? u(T, null, [r.renderText?.({
|
|
92
92
|
value: e,
|
|
93
93
|
...t
|
|
94
94
|
})]) : l;
|
|
95
95
|
let f = i ? z(r, a, p) : p;
|
|
96
96
|
if (r.customRender) {
|
|
97
|
-
const
|
|
97
|
+
const w = r._path || [], h = D(t.record, t.rowIndex, t.params?.rowKey);
|
|
98
98
|
f = r.customRender({
|
|
99
99
|
value: e,
|
|
100
100
|
...t,
|
|
101
101
|
column: r,
|
|
102
102
|
originalNode: f,
|
|
103
103
|
originalText: a,
|
|
104
|
-
path: [...
|
|
104
|
+
path: h && [...w, String(h)]
|
|
105
105
|
});
|
|
106
106
|
}
|
|
107
|
-
return u(
|
|
107
|
+
return u(T, null, [f]);
|
|
108
108
|
};
|
|
109
|
-
function
|
|
110
|
-
const i =
|
|
111
|
-
i.field =
|
|
109
|
+
function b(e, t, r, n) {
|
|
110
|
+
const i = R(e, ["width", "minWidth", "align", "resizable", "className", "headerClassName", "footerClassName", "treeNode"]);
|
|
111
|
+
i.field = A(e.dataIndex), i.fixed = N(e.fixed), i.headerAlign = e.align, i.footerAlign = e.align, i.showOverflow = !1, i.showFooterOverflow = !1, Object.assign(i, q(e.sorter)), i.filters = I(e), i.filterMultiple = e.filterMultiple, i.filterMethod = W(e.onFilter);
|
|
112
112
|
const s = ({
|
|
113
113
|
row: d,
|
|
114
114
|
rowIndex: l
|
|
115
115
|
}) => G({
|
|
116
|
-
value:
|
|
117
|
-
text:
|
|
116
|
+
value: c(d, e.dataIndex),
|
|
117
|
+
text: c(d, e.dataIndex),
|
|
118
118
|
record: d,
|
|
119
119
|
index: l,
|
|
120
120
|
renderIndex: l,
|
|
121
121
|
column: e
|
|
122
122
|
}, e, n);
|
|
123
123
|
return i.slots = {
|
|
124
|
-
header: () =>
|
|
124
|
+
header: () => v(e, r, void 0, t),
|
|
125
125
|
default: s,
|
|
126
126
|
footer: s
|
|
127
127
|
}, e.html && (delete i.slots.default, delete i.slots.footer, i.type = "html"), e.seq && (i.type = "seq", i.slots = {}), i;
|
|
128
128
|
}
|
|
129
129
|
function X(e, t, r, n) {
|
|
130
130
|
if (!e.children?.length)
|
|
131
|
-
return
|
|
131
|
+
return b(e, t, r, n);
|
|
132
132
|
function i(d) {
|
|
133
133
|
return d.map((l) => {
|
|
134
134
|
if (l.children?.length) {
|
|
135
|
-
const a =
|
|
135
|
+
const a = y(l, t, r);
|
|
136
136
|
return a.children = i(l.children), a;
|
|
137
137
|
}
|
|
138
|
-
return
|
|
138
|
+
return b(l, t, r, n);
|
|
139
139
|
});
|
|
140
140
|
}
|
|
141
|
-
const s =
|
|
141
|
+
const s = y(e, t, r);
|
|
142
142
|
return s.children = i(e.children), s;
|
|
143
143
|
}
|
|
144
144
|
export {
|
|
145
145
|
G as contentCustom,
|
|
146
|
-
|
|
147
|
-
|
|
146
|
+
A as dataIndexToField,
|
|
147
|
+
c as getValueByDataIndex,
|
|
148
148
|
X as transformCol,
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
149
|
+
N as transformFixed,
|
|
150
|
+
y as transformToColGroup,
|
|
151
|
+
b as transformToColumn
|
|
152
152
|
};
|
package/es/src/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "6.41.
|
|
1
|
+
declare const _default: "6.41.1";
|
|
2
2
|
export default _default;
|
package/es/src/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("vue"),l=require("lodash-unified"),u=require("../../ap-table/utils.js"),q=require("../../ap-table/constants.js");require("../../ap-table/components/paragraph-ellipsis/index.vue.js");const A=require("../../ap-table/components/paragraph-ellipsis/index.vue2.js");function p(e,t){if(t)return l.isArray(t)?t.reduce((r,i)=>r?.[i],e):e?.[t]}function y(e){if(!l.isUndefined(e))return l.isArray(e)?e.reduce((t,r)=>l.isString(r)?`${t}${t?".":""}${r}`:`${t}[${r}]`,""):String(e)}function b(e){if(e)return e===!0?"left":e}function N(e){return l.isBoolean(e)?{sortable:e}:e?{sortable:!0,sortType:e?.type,sortBy:e?.by}:{sortable:!1}}function R(e){let t;return l.isBoolean(e.filters)&&e.valueEnum?t=u.valueEnumToArray(e.valueEnum):t=e.filters,t?.map(r=>({label:l.isString(r.text)?r.text:"",value:r.value}))}function _(e){if(e)return t=>e(t.value,t.row)}function V(e,t){return e?l.isNumber(e)?{tooltip:t,rows:e}:e===!0||e==="tooltip"?{tooltip:t,rows:1}:{tooltip:null,rows:1,htmlTitle:e==="title"?t:""}:!1}function O(e,t,r){if(q.noRenderAsFormItemValueList.includes(e.valueType))return r;if(e.copyable||e.ellipsis){const i=V(e.ellipsis,t),n=u.objectToString(t);return f.createVNode(A.default,{rawValue:n,copyable:e.copyable,ellipsis:i,content:r},null)}return r}function c(e,t,r){const i=l.pick(e,["width","minWidth","align"]);return i.field=y(e.dataIndex),i.fixed=b(e.fixed),i.slots={header:()=>u.getTableTitle(e,r,void 0,t)},i.headerAlign=e.align,i.showOverflow=!1,i.showFooterOverflow=!1,i}function g(e,t,r){if(r)return l.isString(r)?e[r]:r(e,t)}const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("vue"),l=require("lodash-unified"),u=require("../../ap-table/utils.js"),q=require("../../ap-table/constants.js");require("../../ap-table/components/paragraph-ellipsis/index.vue.js");const A=require("../../ap-table/components/paragraph-ellipsis/index.vue2.js");function p(e,t){if(t)return l.isArray(t)?t.reduce((r,i)=>r?.[i],e):e?.[t]}function y(e){if(!l.isUndefined(e))return l.isArray(e)?e.reduce((t,r)=>l.isString(r)?`${t}${t?".":""}${r}`:`${t}[${r}]`,""):String(e)}function b(e){if(e)return e===!0?"left":e}function N(e){return l.isBoolean(e)?{sortable:e}:e?{sortable:!0,sortType:e?.type,sortBy:e?.by}:{sortable:!1}}function R(e){let t;return l.isBoolean(e.filters)&&e.valueEnum?t=u.valueEnumToArray(e.valueEnum):t=e.filters,t?.map(r=>({label:l.isString(r.text)?r.text:"",value:r.value}))}function _(e){if(e)return t=>e(t.value,t.row)}function V(e,t){return e?l.isNumber(e)?{tooltip:t,rows:e}:e===!0||e==="tooltip"?{tooltip:t,rows:1}:{tooltip:null,rows:1,htmlTitle:e==="title"?t:""}:!1}function O(e,t,r){if(q.noRenderAsFormItemValueList.includes(e.valueType))return r;if(e.copyable||e.ellipsis){const i=V(e.ellipsis,t),n=u.objectToString(t);return f.createVNode(A.default,{rawValue:n,copyable:e.copyable,ellipsis:i,content:r},null)}return r}function c(e,t,r){const i=l.pick(e,["width","minWidth","align"]);return i.field=y(e.dataIndex),i.fixed=b(e.fixed),i.slots={header:()=>u.getTableTitle(e,r,void 0,t)},i.headerAlign=e.align,i.showOverflow=!1,i.showFooterOverflow=!1,i}function g(e,t,r){if(r)return l.isString(r)?e[r]:r(e,t)}const v=({value:e,...t},r,i,n=!0)=>{const a=u.getTableRenderType(r),d=u.getTableRenderProps({...r,valueType:a},{value:e,...t}),s=u.getTableCellRenderNode(a,d,t.record,i),o=r.renderText?.({value:e,...t})||e,x=r.renderText?f.createVNode(f.Fragment,null,[r.renderText?.({value:e,...t})]):s;let h=n?O(r,o,x):x;if(r.customRender){const S=r._path||[],F=g(t.record,t.rowIndex,t.params?.rowKey);h=r.customRender({value:e,...t,column:r,originalNode:h,originalText:o,path:F&&[...S,String(F)]})}return f.createVNode(f.Fragment,null,[h])};function T(e,t,r,i){const n=l.pick(e,["width","minWidth","align","resizable","className","headerClassName","footerClassName","treeNode"]);n.field=y(e.dataIndex),n.fixed=b(e.fixed),n.headerAlign=e.align,n.footerAlign=e.align,n.showOverflow=!1,n.showFooterOverflow=!1,Object.assign(n,N(e.sorter)),n.filters=R(e),n.filterMultiple=e.filterMultiple,n.filterMethod=_(e.onFilter);const a=({row:d,rowIndex:s})=>v({value:p(d,e.dataIndex),text:p(d,e.dataIndex),record:d,index:s,renderIndex:s,column:e},e,i);return n.slots={header:()=>u.getTableTitle(e,r,void 0,t),default:a,footer:a},e.html&&(delete n.slots.default,delete n.slots.footer,n.type="html"),e.seq&&(n.type="seq",n.slots={}),n}function w(e,t,r,i){if(!e.children?.length)return T(e,t,r,i);function n(d){return d.map(s=>{if(s.children?.length){const o=c(s,t,r);return o.children=n(s.children),o}return T(s,t,r,i)})}const a=c(e,t,r);return a.children=n(e.children),a}exports.contentCustom=v;exports.dataIndexToField=y;exports.getValueByDataIndex=p;exports.transformCol=w;exports.transformFixed=b;exports.transformToColGroup=c;exports.transformToColumn=T;
|
package/lib/src/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "6.41.
|
|
1
|
+
declare const _default: "6.41.1";
|
|
2
2
|
export default _default;
|
package/lib/src/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="6.41.
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="6.41.1";exports.default=e;
|