@aplus-frontend/ui 6.28.0 → 6.28.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.
- package/es/src/ag-grid/hooks/use-columns-def.mjs +28 -24
- package/es/src/ag-grid/hooks/use-pinned-row.mjs +12 -7
- package/es/src/ag-grid/hooks/use-selection-col-def.mjs +12 -11
- package/es/src/ag-grid/interface.d.ts +1 -1
- package/es/src/ag-grid/renderer/select.d.ts +4 -1
- package/es/src/ag-grid/renderer/select.mjs +11 -7
- package/es/src/ag-grid/theme.mjs +11 -9
- package/es/src/ap-field/tree-select/index.vue.d.ts +20 -0
- package/es/src/ap-field/tree-select/index.vue.mjs +15 -14
- package/es/src/ap-field/tree-select/read.vue2.mjs +1 -0
- package/es/src/ap-form/items/tree-select/index.vue.d.ts +22 -0
- package/es/src/ap-table/constants.d.ts +11 -0
- package/es/src/ap-table/utils.mjs +51 -42
- package/es/src/business/ap-summary/interface.d.ts +3 -1
- package/es/src/business/ap-summary/utils.mjs +14 -11
- package/es/src/version.d.ts +1 -1
- package/es/src/version.mjs +1 -1
- package/lib/src/ag-grid/hooks/use-columns-def.js +1 -1
- package/lib/src/ag-grid/hooks/use-pinned-row.js +1 -1
- package/lib/src/ag-grid/hooks/use-selection-col-def.js +1 -1
- package/lib/src/ag-grid/interface.d.ts +1 -1
- package/lib/src/ag-grid/renderer/select.d.ts +4 -1
- package/lib/src/ag-grid/renderer/select.js +1 -1
- package/lib/src/ag-grid/theme.js +1 -1
- package/lib/src/ap-field/tree-select/index.vue.d.ts +20 -0
- package/lib/src/ap-field/tree-select/index.vue.js +1 -1
- package/lib/src/ap-field/tree-select/read.vue2.js +1 -1
- package/lib/src/ap-form/items/tree-select/index.vue.d.ts +22 -0
- package/lib/src/ap-table/constants.d.ts +11 -0
- package/lib/src/ap-table/utils.js +1 -1
- package/lib/src/business/ap-summary/interface.d.ts +3 -1
- package/lib/src/business/ap-summary/utils.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/index.css +3 -0
- package/theme/ap-form/ap-form-item.css +3 -0
- package/theme/ap-form/ap-form-item.less +3 -0
- package/theme/ap-form/index.css +3 -0
- package/theme/ap-form/search-form.css +3 -0
- package/theme/ap-grid/index.css +3 -0
- package/theme/ap-table/ap-table.css +3 -0
- package/theme/ap-table-modal/index.css +3 -0
- package/theme/ap-value-select-card/index.css +3 -0
- package/theme/ap-value-select-card/index.less +3 -0
- package/theme/editable-table/index.css +3 -0
- package/theme/index.css +6 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { isVNode as T, createVNode as
|
|
1
|
+
import { isVNode as T, createVNode as i, mergeProps as a, cloneVNode as h, Fragment as C } from "vue";
|
|
2
2
|
import { isObject as d, isArray as u, isUndefined as j, isFunction as g, omit as E, isBoolean as O, isString as v, isEqual as x, sortBy as m, isPlainObject as y, every as N, isEmpty as F } from "lodash-unified";
|
|
3
3
|
import { apTableRenderItemMap as P, apTableFormItemMap as R } from "./constants.mjs";
|
|
4
4
|
import { isType as S } from "@fruits-chain/utils";
|
|
@@ -14,7 +14,7 @@ const M = (e, t, n) => {
|
|
|
14
14
|
return d(e) ? Object.keys(e).forEach((r) => {
|
|
15
15
|
d(e[r]) ? o[r] = M(e[r], t[r], n) : o[r] = n(e[r], t);
|
|
16
16
|
}) : o = n(e, t), o;
|
|
17
|
-
},
|
|
17
|
+
}, k = (e, t) => {
|
|
18
18
|
switch (e) {
|
|
19
19
|
case "dayjs":
|
|
20
20
|
return t.valueOf();
|
|
@@ -35,49 +35,58 @@ const M = (e, t, n) => {
|
|
|
35
35
|
return t;
|
|
36
36
|
}
|
|
37
37
|
};
|
|
38
|
-
function
|
|
38
|
+
function z(e) {
|
|
39
39
|
return u(e) ? e.join(".") : e;
|
|
40
40
|
}
|
|
41
41
|
function _(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 q = (e) =>
|
|
45
|
+
const q = (e) => {
|
|
46
|
+
if (_(e) === "map")
|
|
47
|
+
return e;
|
|
48
|
+
const t = /* @__PURE__ */ new Map();
|
|
49
|
+
for (const [n, o] of Object.entries(e || {})) {
|
|
50
|
+
let r = n;
|
|
51
|
+
n === "true" ? r = !0 : n === "false" && (r = !1), t.set(r, o);
|
|
52
|
+
}
|
|
53
|
+
return t;
|
|
54
|
+
}, b = (e) => {
|
|
46
55
|
const t = [], n = q(e);
|
|
47
56
|
return n.forEach((o, r) => {
|
|
48
|
-
const
|
|
49
|
-
if (
|
|
50
|
-
if (typeof
|
|
57
|
+
const s = n.get(r) || n.get(`${r}`);
|
|
58
|
+
if (s) {
|
|
59
|
+
if (typeof s == "object" && s?.text) {
|
|
51
60
|
t.push({
|
|
52
|
-
text:
|
|
61
|
+
text: s?.text,
|
|
53
62
|
value: r,
|
|
54
|
-
label:
|
|
55
|
-
disabled:
|
|
63
|
+
label: s?.text,
|
|
64
|
+
disabled: s.disabled
|
|
56
65
|
});
|
|
57
66
|
return;
|
|
58
67
|
}
|
|
59
68
|
t.push({
|
|
60
|
-
text:
|
|
61
|
-
label:
|
|
69
|
+
text: s,
|
|
70
|
+
label: s,
|
|
62
71
|
value: r
|
|
63
72
|
});
|
|
64
73
|
}
|
|
65
74
|
}), t;
|
|
66
|
-
},
|
|
75
|
+
}, G = (e) => j(e) || e < 0 ? 0 : e;
|
|
67
76
|
function W(e, t) {
|
|
68
77
|
return !e || !g(e) ? e : e(t);
|
|
69
78
|
}
|
|
70
|
-
function
|
|
79
|
+
function X(e) {
|
|
71
80
|
let t = e.valueType || "text";
|
|
72
81
|
return e.valueEnum && (t = "status"), t;
|
|
73
82
|
}
|
|
74
|
-
function
|
|
83
|
+
function Y(e, t, n, o) {
|
|
75
84
|
const r = P[e];
|
|
76
|
-
return r ?
|
|
85
|
+
return r ? i(r, a(t, {
|
|
77
86
|
mode: "read"
|
|
78
87
|
}), null) : o?.[e]?.render?.(t.value, n, t) || t.value;
|
|
79
88
|
}
|
|
80
|
-
function
|
|
89
|
+
function Z(e, t) {
|
|
81
90
|
if (e.customRenderFormItem)
|
|
82
91
|
return () => {
|
|
83
92
|
const r = e.customRenderFormItem(e);
|
|
@@ -89,13 +98,13 @@ function k(e, t) {
|
|
|
89
98
|
};
|
|
90
99
|
const n = R[e.valueType];
|
|
91
100
|
if (n)
|
|
92
|
-
return () =>
|
|
101
|
+
return () => i(n, a(e.fieldProps, {
|
|
93
102
|
span: e.span
|
|
94
103
|
}), null);
|
|
95
104
|
const o = t?.[e.valueType];
|
|
96
105
|
return () => {
|
|
97
106
|
const r = o?.renderFormItem?.(e.fieldProps.field);
|
|
98
|
-
return r ?
|
|
107
|
+
return r ? i(A, a(e.fieldProps, {
|
|
99
108
|
span: e.span
|
|
100
109
|
}), V(r) ? r : {
|
|
101
110
|
default: () => [r]
|
|
@@ -103,14 +112,14 @@ function k(e, t) {
|
|
|
103
112
|
};
|
|
104
113
|
}
|
|
105
114
|
function ee(e, t) {
|
|
106
|
-
const n = W(e.fieldProps, t), o = n?.field || n || {}, r = e.valueType === "switch",
|
|
115
|
+
const n = W(e.fieldProps, t), o = n?.field || n || {}, r = e.valueType === "switch", s = e.valueType === "index", f = r ? {
|
|
107
116
|
checked: t.value
|
|
108
117
|
} : {
|
|
109
|
-
value:
|
|
118
|
+
value: s ? t.index + 1 : t.value
|
|
110
119
|
};
|
|
111
120
|
return e.valueEnum && (o.valueEnum = e.valueEnum), {
|
|
112
121
|
...E(o, ["request"]),
|
|
113
|
-
...
|
|
122
|
+
...f
|
|
114
123
|
};
|
|
115
124
|
}
|
|
116
125
|
function te(e) {
|
|
@@ -139,42 +148,42 @@ function oe(e, t, n, o) {
|
|
|
139
148
|
const r = n?.({
|
|
140
149
|
title: e.title,
|
|
141
150
|
column: e
|
|
142
|
-
}),
|
|
143
|
-
if (r &&
|
|
151
|
+
}), s = r?.filter((l) => l.type !== Symbol.for("v-cmt")) || [];
|
|
152
|
+
if (r && s.length > 0)
|
|
144
153
|
return r;
|
|
145
|
-
const
|
|
154
|
+
const c = v(e.title) ? i("span", {
|
|
146
155
|
class: t,
|
|
147
156
|
title: e.title
|
|
148
|
-
}, [e.title]) : e.title, p = e.tooltip ? g(e.tooltip) ? e.tooltip(e) :
|
|
149
|
-
return p ?
|
|
157
|
+
}, [e.title]) : e.title, p = e.tooltip ? g(e.tooltip) ? e.tooltip(e) : i(C, null, [e.tooltip]) : null;
|
|
158
|
+
return p ? i("span", {
|
|
150
159
|
style: {
|
|
151
160
|
display: "inline-flex",
|
|
152
161
|
alignItems: "center",
|
|
153
162
|
maxWidth: "100%"
|
|
154
163
|
}
|
|
155
|
-
}, [
|
|
164
|
+
}, [c, i(I, {
|
|
156
165
|
title: p,
|
|
157
166
|
placement: "bottom",
|
|
158
167
|
getPopupContainer: (l) => l.closest(".ant-table") || l.closest(".ant-modal") || l.closest(".vxe-table") || document.body
|
|
159
168
|
}, {
|
|
160
|
-
default: () => [
|
|
169
|
+
default: () => [i(w, {
|
|
161
170
|
style: {
|
|
162
171
|
paddingInline: "4px",
|
|
163
172
|
color: o,
|
|
164
173
|
verticalAlign: "middle"
|
|
165
174
|
}
|
|
166
175
|
}, null)]
|
|
167
|
-
})]) :
|
|
176
|
+
})]) : c;
|
|
168
177
|
}
|
|
169
|
-
function
|
|
178
|
+
function se(e, t) {
|
|
170
179
|
const n = [];
|
|
171
180
|
function o(r) {
|
|
172
|
-
for (const
|
|
173
|
-
|
|
181
|
+
for (const s of r)
|
|
182
|
+
s.children?.length ? o(s.children) : n.push(t(s));
|
|
174
183
|
}
|
|
175
184
|
return o(e), n;
|
|
176
185
|
}
|
|
177
|
-
function
|
|
186
|
+
function ie(e, t) {
|
|
178
187
|
if (u(e) && u(t))
|
|
179
188
|
return x(m(e), m(t));
|
|
180
189
|
if (y(e) && y(t)) {
|
|
@@ -189,21 +198,21 @@ function le(e) {
|
|
|
189
198
|
}
|
|
190
199
|
export {
|
|
191
200
|
te as apColumnToColumn,
|
|
192
|
-
|
|
201
|
+
z as dataIndexToStr,
|
|
193
202
|
le as falseToUndefined,
|
|
194
203
|
M as formatParamsValueType,
|
|
195
|
-
|
|
204
|
+
G as getColumnOrder,
|
|
196
205
|
W as getFieldProps,
|
|
197
|
-
|
|
198
|
-
|
|
206
|
+
Z as getSearchFormItemRenderNode,
|
|
207
|
+
Y as getTableCellRenderNode,
|
|
199
208
|
ee as getTableRenderProps,
|
|
200
|
-
|
|
209
|
+
X as getTableRenderType,
|
|
201
210
|
oe as getTableTitle,
|
|
202
|
-
|
|
211
|
+
ie as isEqualCustom,
|
|
203
212
|
q as objectToMap,
|
|
204
213
|
re as objectToString,
|
|
205
|
-
|
|
206
|
-
|
|
214
|
+
k as parseFieldValue,
|
|
215
|
+
se as recursionApColumns,
|
|
207
216
|
ne as updateFormProps,
|
|
208
217
|
b as valueEnumToArray
|
|
209
218
|
};
|
|
@@ -2,7 +2,8 @@ import { ColumnsType } from '@aplus-frontend/antdv/es/table';
|
|
|
2
2
|
import { AlignType, DataIndex, Key } from '@aplus-frontend/antdv/es/vc-table/interface';
|
|
3
3
|
import { ApColumnType } from '../../ap-table';
|
|
4
4
|
import { ApGridColumnType } from '../../ap-grid';
|
|
5
|
-
|
|
5
|
+
import { AgGridColumnType } from '../../ag-grid';
|
|
6
|
+
export type SummaryColumnType = ApColumnType[] | ApGridColumnType[] | AgGridColumnType[] | ColumnsType | any[];
|
|
6
7
|
export type ValueType = {
|
|
7
8
|
[key in string]: any;
|
|
8
9
|
};
|
|
@@ -40,4 +41,5 @@ export interface ComputedRecordParams<T> {
|
|
|
40
41
|
* 排出 在 columns 和 configList中相同key 的配置项
|
|
41
42
|
*/
|
|
42
43
|
exclude?: Key[];
|
|
44
|
+
valueTypeExtension?: string[];
|
|
43
45
|
}
|
|
@@ -1,30 +1,33 @@
|
|
|
1
|
-
import { flatten as f, uniqBy as
|
|
2
|
-
import { toThousand as
|
|
1
|
+
import { flatten as f, uniqBy as x, isNil as b, get as s, set as C } from "lodash-unified";
|
|
2
|
+
import { toThousand as L, toFixed as N, addNumber as T } from "@aplus-frontend/utils";
|
|
3
3
|
const m = (t) => t?.children && t?.children?.length > 0 ? f(t.children?.map((e) => m(e))) : [t], j = (t) => f(
|
|
4
4
|
t?.map((e) => m(e))
|
|
5
|
-
), l = (t) => Object.prototype.toString.call(t) === "[object Array]" ? t.map((e) => String(e)).join(".") : t ?? "",
|
|
5
|
+
), l = (t) => Object.prototype.toString.call(t) === "[object Array]" ? t.map((e) => String(e)).join(".") : t ?? "", S = (t, e, u) => u ? L(t, e) : N(t, e);
|
|
6
6
|
function q(t) {
|
|
7
|
-
const { records: e, columns:
|
|
7
|
+
const { records: e, columns: u, configList: c, exclude: a, valueTypeExtension: y } = t;
|
|
8
8
|
if (!e || e?.length === 0)
|
|
9
9
|
return {};
|
|
10
|
-
let r = j(
|
|
10
|
+
let r = j(u)?.filter(
|
|
11
|
+
(n) => n.valueType === "number" || // 兼容自定义valueType的情况
|
|
12
|
+
y?.includes(n.valueType)
|
|
13
|
+
)?.map((n) => ({
|
|
11
14
|
key: n.key || "",
|
|
12
15
|
dataIndex: n.dataIndex
|
|
13
16
|
}));
|
|
14
|
-
|
|
17
|
+
c && c?.length > 0 && (r = x(r?.concat(c), "key")), a && a.length > 0 && (r = r.filter(
|
|
15
18
|
(n) => !a.includes(n.key)
|
|
16
19
|
));
|
|
17
|
-
const
|
|
20
|
+
const p = {};
|
|
18
21
|
return e?.reduce((n, d) => (r.forEach((o) => {
|
|
19
22
|
if (!b(s(d, l(o.dataIndex || o.key)))) {
|
|
20
|
-
const i = o.dataIndex || o.key, g = s(n, l(i)) || 0, h = s(d, l(i)) || 0,
|
|
21
|
-
|
|
23
|
+
const i = o.dataIndex || o.key, g = s(n, l(i)) || 0, h = s(d, l(i)) || 0, k = T(g, h)?.toNumber();
|
|
24
|
+
C(n, i, +k);
|
|
22
25
|
}
|
|
23
|
-
}), n),
|
|
26
|
+
}), n), p);
|
|
24
27
|
}
|
|
25
28
|
export {
|
|
26
29
|
q as computedRecords,
|
|
27
30
|
j as flattenColumns,
|
|
28
31
|
l as formatDataIndex,
|
|
29
|
-
|
|
32
|
+
S as formatNumber
|
|
30
33
|
};
|
package/es/src/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "6.28.
|
|
1
|
+
declare const _default: "6.28.2";
|
|
2
2
|
export default _default;
|
package/es/src/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("../../ap-table/utils.js"),C=require("../renderer/index.js"),n=require("lodash-unified"),p=require("vue");require("../components/body-cell/index.vue.js");require("../components/header-cell/index.vue.js");require("../../config-provider/index.js");const _=require("../../ap-grid/utils/col.js"),q=require("../../utils/index.js"),w=require("../../config-provider/hooks/use-global-config.js"),P=require("../../config-provider/hooks/use-namespace.js"),R=require("../components/body-cell/index.vue2.js"),T=require("../components/header-cell/index.vue2.js");function S(t,s){if(s.bodyCellTooltip)return n.isFunction(s.bodyCellTooltip)?s.bodyCellTooltip(t.value,t.data):s.bodyCellTooltip;if(s.renderText)return s.renderText({value:t.value,record:t.data,column:s,text:t.value});const d=s.valueType||"text",o=C.rendererMap[d];if(o){const f=v.getTableRenderProps({...s,valueType:d},{value:t.value,text:t.value,record:t.data,column:t.column,rowIndex:t.node?.rowIndex,pinned:t.node?.rowPinned});return o(f)}return v.objectToString(t.value)}const D=(t,s,d)=>{const o=w.useGlobalConfig("valueTypeMap"),{em:c}=P.useNamespace("ag-grid"),f=p.computed(()=>{const y=p.unref(t),g=a=>{const e={cellRenderer:R.default,cellRendererParams:{column:a,extraValueType:p.unref(o)}};if(a.customRender)return e;if(a.renderText)return{valueFormatter:r=>a.renderText({value:r.value,record:r.data,column:a,text:r.value})};const u=a.valueType||"text",i=C.rendererMap[u];return i?{valueFormatter:r=>{const l=v.getTableRenderProps({...a,valueType:u},{value:r.value,text:r.value,record:r.data,column:r.column,rowIndex:r.node?.rowIndex,pinned:r.node?.rowPinned});return i(l)}}:e};function x(a){return a.map(e=>{const u=e.bodyCellTooltip||!e.customRender&&(e.ellipsis===!0||e.ellipsis==="tooltip"||n.isNumber(e.ellipsis)),i={field:_.dataIndexToField(e.dataIndex),colId:q.isDef(e.key)?String(e.key):void 0,sortable:!!e.sorter,comparator:e.sorter===!0?()=>0:e.sorter,headerComponentParams:{column:e},resizable:e.resizable,width:e.width,minWidth:e.minWidth,maxWidth:e.maxWidth,flex:e.width?void 0:1,pinned:e.fixed||null,colSpan:e.colSpan,cellClass:d(r=>{const l=e.cellClass||"",h=n.isFunction(l)?l(r.data,r.node):l;return[`${c("cell",e.align||"left")}`,h].flat().filter(Boolean)}),cellStyle:{"--ag-grid-line-clamp":n.isNumber(e.ellipsis)?e.ellipsis:1},wrapText:!e.ellipsis||n.isNumber(e.ellipsis)&&e.ellipsis>=2,autoHeight:!0,tooltipValueGetter:u?r=>S(r,e):void 0,...g(e)};return e.children?.length?{...i,headerGroupComponent:T.default,headerGroupComponentParams:{column:e},children:x(e.children)}:i})}return x(y)}),b=p.computed(()=>({headerComponent:T.default,resizable:s.columnResizable,suppressMovable:!0,cellDataType:!1}));return{columnDefs:f,defaultColDef:b}};exports.useColumnsDef=D;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("vue"),l=require("lodash-unified"),w=i=>{const u=c.computed(()=>{const o=i.value;if(!o)return{};const{rowClassName:e,top:t,bottom:n}=o;return{pinnedTopRowData:t,pinnedBottomRowData:n,getRowClass({node:r,data:
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("vue"),l=require("lodash-unified"),w=i=>{const u=c.computed(()=>{const o=i.value;if(!o)return{};const{rowClassName:e,top:t,bottom:n}=o;return{pinnedTopRowData:t,pinnedBottomRowData:n,getRowClass({node:r,data:d,rowIndex:s}){if(!(!r.rowPinned||!e))return l.isFunction(e)?e(d,s,r.rowPinned):e}}});return{getRowPinnedCellClass:o=>e=>{let t;const{cellClassName:n}=i.value||{};return!e.node.rowPinned||!n?t=[o(e)]:t=[o(e),l.isFunction(n)?n(e.data,e.colDef,e.node.rowPinned,e.rowIndex):n],t.flat().filter(Boolean)},rowPinnedGridConfig:u}};exports.usePinnedRow=w;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const f=require("vue"),d=require("lodash-unified");require("../../ap-grid/index.js");const a=require("../../ap-grid/constants.js");function m(e){return e?.bottom?.length||e?.top?.length}const S=(e,l)=>f.computed(()=>{if(!e.rowSelection)return;const o=e.rowSelection===!0?{}:e.rowSelection,n={sortable:!1,resizable:!1,width:o.columnWidth||60};let i=o.fixed;if(i===void 0&&(i=l.value.some(t=>t.fixed==="left"||t.fixed===!0)?"left":void 0),n.pinned=i,m(e.summary)){const{cellClassName:t}=e.summary;n.cellClass=({node:r,data:u,colDef:c,rowIndex:s})=>{if(!(!r.rowPinned||!t))return d.isFunction(t)?t(u,c,r.rowPinned,s):t},n.cellRenderer=({data:r})=>r?.[a.ROW_SELECTION_FIELD]}return n});exports.default=S;
|
|
@@ -114,7 +114,7 @@ export type AgGridVirtualConfig = {
|
|
|
114
114
|
export type AgGridSummaryType<RecordType = any> = {
|
|
115
115
|
top?: RecordType[];
|
|
116
116
|
bottom?: RecordType[];
|
|
117
|
-
cellClassName?: string | string[] | ((data: RecordType, column: ColDef<RecordType>, pinned: RowPinnedType) => string | string[]);
|
|
117
|
+
cellClassName?: string | string[] | ((data: RecordType, column: ColDef<RecordType>, pinned: RowPinnedType, rowIndex: number) => string | string[]);
|
|
118
118
|
rowClassName?: string | string[] | ((data: RecordType, rowIndex: number, pinned: RowPinnedType) => string | string[]);
|
|
119
119
|
};
|
|
120
120
|
export type AgGridProps<RecordType = any, ParamsType = any> = Omit<TableProps<RecordType>, 'columns' | 'pagination' | 'dataSource' | 'size' | 'rowSelection' | 'rowClassName' | 'footer' | 'loading' | 'sticky'> & {
|
|
@@ -1,2 +1,5 @@
|
|
|
1
1
|
import { ApFieldSelectProps } from '../../ap-field';
|
|
2
|
-
|
|
2
|
+
import { ValueEnum } from '../../ap-table';
|
|
3
|
+
export declare function selectRenderer(props: ApFieldSelectProps & {
|
|
4
|
+
valueEnum?: ValueEnum;
|
|
5
|
+
}): any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("lodash-unified"),r=require("../../ap-table/utils.js");function c(e){r.valueEnumToArray;const l=e.valueEnum?r.valueEnumToArray(e.valueEnum):e.options||[];console.log("options",l,e.value);const t=e.value,n=e.emptyText||"--";if(o.isNil(t))return n;const i=e.fieldNames?.label||"label",u=e.fieldNames?.value||"value";return o.isArray(t)?t.map(a=>l.find(s=>s[u]===a)?.[i]).filter(Boolean).join("、")||n:l.find(a=>a[u]===t)?.[i]||n}exports.selectRenderer=c;
|
package/lib/src/ag-grid/theme.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("@aplus-frontend/antdv/es/theme/internal"),c=require("ag-grid-community"),d=require("vue"),l=(o,r)=>{const[,a]=n.useToken();return d.computed(()=>{const t=o.value==="mini",e=a.value;return c.themeQuartz.withParams({headerHeight:"36px",headerFontSize:"12px",dataFontSize:"12px",rowHeight:r.value,spacing:t?"5px":"6.5px",foregroundColor:e.colorTextBase,wrapperBorder:!1,rowBorder:{color:e.colorBorderSecondary},headerRowBorder:{color:e.colorBorderSecondary},selectedRowBackgroundColor:e.controlItemBgActive,checkboxCheckedBackgroundColor:e.colorPrimary,rowHoverColor:"var(--ap-color-bg-2)",headerBackgroundColor:"var(--ap-table-header-bg)",headerColumnResizeHandleHeight:"50%",headerColumnResizeHandleWidth:"1px"})})};exports.useTheme=l;
|
|
@@ -84,6 +84,10 @@ declare function __VLS_template(): {
|
|
|
84
84
|
type: PropType<(value: string) => void>;
|
|
85
85
|
default: (value: string) => void;
|
|
86
86
|
};
|
|
87
|
+
variant: {
|
|
88
|
+
type: PropType<"filled" | "outlined" | "borderless" | "underlined">;
|
|
89
|
+
default: "filled" | "outlined" | "borderless" | "underlined";
|
|
90
|
+
};
|
|
87
91
|
value: {
|
|
88
92
|
type: PropType<any>;
|
|
89
93
|
};
|
|
@@ -278,6 +282,7 @@ declare function __VLS_template(): {
|
|
|
278
282
|
virtual: boolean;
|
|
279
283
|
dropdownMatchSelectWidth: number | boolean;
|
|
280
284
|
loading: boolean;
|
|
285
|
+
variant: "filled" | "outlined" | "borderless" | "underlined";
|
|
281
286
|
bordered: boolean;
|
|
282
287
|
status: "" | "error" | "warning";
|
|
283
288
|
allowClear: boolean;
|
|
@@ -363,6 +368,10 @@ declare function __VLS_template(): {
|
|
|
363
368
|
type: PropType<(value: string) => void>;
|
|
364
369
|
default: (value: string) => void;
|
|
365
370
|
};
|
|
371
|
+
variant: {
|
|
372
|
+
type: PropType<"filled" | "outlined" | "borderless" | "underlined">;
|
|
373
|
+
default: "filled" | "outlined" | "borderless" | "underlined";
|
|
374
|
+
};
|
|
366
375
|
value: {
|
|
367
376
|
type: PropType<any>;
|
|
368
377
|
};
|
|
@@ -557,6 +566,7 @@ declare function __VLS_template(): {
|
|
|
557
566
|
virtual: boolean;
|
|
558
567
|
dropdownMatchSelectWidth: number | boolean;
|
|
559
568
|
loading: boolean;
|
|
569
|
+
variant: "filled" | "outlined" | "borderless" | "underlined";
|
|
560
570
|
bordered: boolean;
|
|
561
571
|
status: "" | "error" | "warning";
|
|
562
572
|
allowClear: boolean;
|
|
@@ -657,6 +667,10 @@ declare const __VLS_component: DefineComponent<ApFieldTreeSelectProps, {
|
|
|
657
667
|
type: PropType<(value: string) => void>;
|
|
658
668
|
default: (value: string) => void;
|
|
659
669
|
};
|
|
670
|
+
variant: {
|
|
671
|
+
type: PropType<"filled" | "outlined" | "borderless" | "underlined">;
|
|
672
|
+
default: "filled" | "outlined" | "borderless" | "underlined";
|
|
673
|
+
};
|
|
660
674
|
value: {
|
|
661
675
|
type: PropType<any>;
|
|
662
676
|
};
|
|
@@ -851,6 +865,7 @@ declare const __VLS_component: DefineComponent<ApFieldTreeSelectProps, {
|
|
|
851
865
|
virtual: boolean;
|
|
852
866
|
dropdownMatchSelectWidth: number | boolean;
|
|
853
867
|
loading: boolean;
|
|
868
|
+
variant: "filled" | "outlined" | "borderless" | "underlined";
|
|
854
869
|
bordered: boolean;
|
|
855
870
|
status: "" | "error" | "warning";
|
|
856
871
|
allowClear: boolean;
|
|
@@ -936,6 +951,10 @@ declare const __VLS_component: DefineComponent<ApFieldTreeSelectProps, {
|
|
|
936
951
|
type: PropType<(value: string) => void>;
|
|
937
952
|
default: (value: string) => void;
|
|
938
953
|
};
|
|
954
|
+
variant: {
|
|
955
|
+
type: PropType<"filled" | "outlined" | "borderless" | "underlined">;
|
|
956
|
+
default: "filled" | "outlined" | "borderless" | "underlined";
|
|
957
|
+
};
|
|
939
958
|
value: {
|
|
940
959
|
type: PropType<any>;
|
|
941
960
|
};
|
|
@@ -1130,6 +1149,7 @@ declare const __VLS_component: DefineComponent<ApFieldTreeSelectProps, {
|
|
|
1130
1149
|
virtual: boolean;
|
|
1131
1150
|
dropdownMatchSelectWidth: number | boolean;
|
|
1132
1151
|
loading: boolean;
|
|
1152
|
+
variant: "filled" | "outlined" | "borderless" | "underlined";
|
|
1133
1153
|
bordered: boolean;
|
|
1134
1154
|
status: "" | "error" | "warning";
|
|
1135
1155
|
allowClear: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),i=require("@aplus-frontend/antdv");require("../../hooks/index.js");const g=require("lodash-unified"),q=require("./use-request.js"),P=require("../../hooks/useControllableValue.js");function v(r){return typeof r=="function"||Object.prototype.toString.call(r)==="[object Object]"&&!e.isVNode(r)}const _=e.defineComponent({name:"ApFieldTreeSelect",__name:"index",props:{mode:{default:"edit"},class:{},style:{},suffixIcon:{},size:{},bordered:{type:Boolean,default:void 0},treeLine:{},replaceFields:{},placement:{},status:{},popupClassName:{},dropdownClassName:{},"onUpdate:value":{},"onUpdate:treeExpandedKeys":{},"onUpdate:searchValue":{},value:{},children:{},listHeight:{},onMouseenter:{},onMouseleave:{},tabindex:{},onClick:{},onFocus:{},onBlur:{},onChange:{},onKeydown:{},onKeyup:{},onMousedown:{},onSelect:{},open:{type:Boolean,default:void 0},animation:{},direction:{},multiple:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0},prefixCls:{},getPopupContainer:{},virtual:{type:Boolean,default:!0},dropdownMatchSelectWidth:{default:!0},loading:{type:Boolean,default:void 0},defaultValue:{},showAction:{},transitionName:{},dropdownAlign:{},placeholder:{},allowClear:{type:Boolean,default:void 0},autofocus:{type:Boolean,default:void 0},defaultOpen:{type:Boolean,default:void 0},id:{},clearIcon:{},notFoundContent:{},maxCount:{},onDeselect:{},prefix:{},onSearch:{},fieldNames:{},dropdownStyle:{},dropdownRender:{},switcherIcon:{},filterTreeNode:{},treeData:{},treeCheckable:{type:Boolean,default:void 0},showSearch:{type:Boolean,default:void 0},searchValue:{},onInputKeyDown:{},removeIcon:{},maxTagCount:{},maxTagTextLength:{},maxTagPlaceholder:{},tokenSeparators:{},tagRender:{},choiceTransitionName:{},optionLabelRender:{},onClear:{},onDropdownVisibleChange:{},getRawInputElement:{},onPopupScroll:{},listItemHeight:{},inputValue:{},autoClearSearchValue:{type:Boolean,default:void 0},labelInValue:{type:Boolean,default:void 0},showArrow:{type:Boolean,default:void 0},showCheckedStrategy:{},treeExpandAction:{},treeDefaultExpandAll:{type:Boolean,default:void 0},treeIcon:{},treeLoadedKeys:{},onTreeLoad:{},treeNodeFilterProp:{},treeNodeLabelProp:{},treeCheckStrictly:{type:Boolean,default:void 0},treeDataSimpleMode:{},treeExpandedKeys:{},treeDefaultExpandedKeys:{},onTreeExpand:{},dropdownPopupAlign:{},emptyText:{default:"--"},request:{},lazy:{type:Boolean},params:{},loadData:{type:Boolean}},emits:["update:value"],setup(r,{expose:S,emit:B}){const o=r,C=e.useSlots(),N=B,s=e.ref(),{value:p,updateValue:w}=P.useControllableValue(o,N),{treeData:f,loading:m,request:y}=q.useRequest(o),x=e.computed(()=>{let t;const d=e.unref(p),u=g.isArray(d)?d:[d].filter(Boolean);if(!u.length)return e.createVNode(e.Fragment,null,[o.emptyText]);const n=[],c=o.fieldNames?.label||"label",k=o.fieldNames?.value||"value";function h(a){for(const l of a){if(u.find(D=>D===l[k])&&n.push(l[c]),n.length===u.length)return;l.children?.length&&h(l.children)}}return h(e.unref(f)),n.length?n.length===1?e.createVNode("span",null,[n[0]]):e.createVNode(i.Space,{size:4},v(t=n.map((a,l)=>e.createVNode(i.Tag,{style:"margin-right: 0px",key:`${a}-${l}`},v(a)?a:{default:()=>[a]})))?t:{default:()=>[t]}):e.createVNode(e.Fragment,null,[o.emptyText])});function V(){s.value?.focus?.()}function b(){s.value?.blur?.()}function T(t){return y(t)}return S({request:y,focus:V,blur:b}),(t,d)=>t.mode==="read"?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(x.value),{key:0})):(e.openBlock(),e.createBlock(e.unref(i.TreeSelect),e.mergeProps({key:1},e.unref(g.omit)(o,["onUpdate:value","value","treeData","loadData"]),{ref_key:"treeSelectRef",ref:s,value:e.unref(p),"tree-data":e.unref(f),loading:e.unref(m),"load-data":t.loadData?T:void 0,"onUpdate:value":e.unref(w)}),e.createSlots({_:2},[e.renderList(C,(u,n)=>({name:n,fn:e.withCtx(c=>[e.renderSlot(t.$slots,n,e.normalizeProps(e.guardReactiveProps(c||{})))])})),e.unref(m)?{name:"notFoundContent",fn:e.withCtx(()=>[e.createVNode(e.unref(i.Spin),{size:"small"})]),key:"0"}:void 0]),1040,["value","tree-data","loading","load-data","onUpdate:value"]))}});exports.default=_;
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),i=require("@aplus-frontend/antdv");require("../../hooks/index.js");const g=require("lodash-unified"),q=require("./use-request.js"),P=require("../../hooks/useControllableValue.js");function v(r){return typeof r=="function"||Object.prototype.toString.call(r)==="[object Object]"&&!e.isVNode(r)}const _=e.defineComponent({name:"ApFieldTreeSelect",__name:"index",props:{mode:{default:"edit"},class:{},style:{},suffixIcon:{},size:{},bordered:{type:Boolean,default:void 0},treeLine:{},replaceFields:{},placement:{},status:{},popupClassName:{},dropdownClassName:{},"onUpdate:value":{},"onUpdate:treeExpandedKeys":{},"onUpdate:searchValue":{},variant:{},value:{},children:{},listHeight:{},onMouseenter:{},onMouseleave:{},tabindex:{},onClick:{},onFocus:{},onBlur:{},onChange:{},onKeydown:{},onKeyup:{},onMousedown:{},onSelect:{},open:{type:Boolean,default:void 0},animation:{},direction:{},multiple:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0},prefixCls:{},getPopupContainer:{},virtual:{type:Boolean,default:!0},dropdownMatchSelectWidth:{default:!0},loading:{type:Boolean,default:void 0},defaultValue:{},showAction:{},transitionName:{},dropdownAlign:{},placeholder:{},allowClear:{type:Boolean,default:void 0},autofocus:{type:Boolean,default:void 0},defaultOpen:{type:Boolean,default:void 0},id:{},clearIcon:{},notFoundContent:{},maxCount:{},onDeselect:{},prefix:{},onSearch:{},fieldNames:{},dropdownStyle:{},dropdownRender:{},switcherIcon:{},filterTreeNode:{},treeData:{},treeCheckable:{type:Boolean,default:void 0},showSearch:{type:Boolean,default:void 0},searchValue:{},onInputKeyDown:{},removeIcon:{},maxTagCount:{},maxTagTextLength:{},maxTagPlaceholder:{},tokenSeparators:{},tagRender:{},choiceTransitionName:{},optionLabelRender:{},onClear:{},onDropdownVisibleChange:{},getRawInputElement:{},onPopupScroll:{},listItemHeight:{},inputValue:{},autoClearSearchValue:{type:Boolean,default:void 0},labelInValue:{type:Boolean,default:void 0},showArrow:{type:Boolean,default:void 0},showCheckedStrategy:{},treeExpandAction:{},treeDefaultExpandAll:{type:Boolean,default:void 0},treeIcon:{},treeLoadedKeys:{},onTreeLoad:{},treeNodeFilterProp:{},treeNodeLabelProp:{},treeCheckStrictly:{type:Boolean,default:void 0},treeDataSimpleMode:{},treeExpandedKeys:{},treeDefaultExpandedKeys:{},onTreeExpand:{},dropdownPopupAlign:{},emptyText:{default:"--"},request:{},lazy:{type:Boolean},params:{},loadData:{type:Boolean}},emits:["update:value"],setup(r,{expose:S,emit:B}){const o=r,C=e.useSlots(),N=B,s=e.ref(),{value:p,updateValue:w}=P.useControllableValue(o,N),{treeData:f,loading:m,request:y}=q.useRequest(o),x=e.computed(()=>{let t;const d=e.unref(p),u=g.isArray(d)?d:[d].filter(Boolean);if(!u.length)return e.createVNode(e.Fragment,null,[o.emptyText]);const n=[],c=o.fieldNames?.label||"label",k=o.fieldNames?.value||"value";function h(a){for(const l of a){if(u.find(D=>D===l[k])&&n.push(l[c]),n.length===u.length)return;l.children?.length&&h(l.children)}}return h(e.unref(f)),n.length?n.length===1?e.createVNode("span",null,[n[0]]):e.createVNode(i.Space,{size:4},v(t=n.map((a,l)=>e.createVNode(i.Tag,{style:"margin-right: 0px",key:`${a}-${l}`},v(a)?a:{default:()=>[a]})))?t:{default:()=>[t]}):e.createVNode(e.Fragment,null,[o.emptyText])});function V(){s.value?.focus?.()}function b(){s.value?.blur?.()}function T(t){return y(t)}return S({request:y,focus:V,blur:b}),(t,d)=>t.mode==="read"?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(x.value),{key:0})):(e.openBlock(),e.createBlock(e.unref(i.TreeSelect),e.mergeProps({key:1},e.unref(g.omit)(o,["onUpdate:value","value","treeData","loadData"]),{ref_key:"treeSelectRef",ref:s,value:e.unref(p),"tree-data":e.unref(f),loading:e.unref(m),"load-data":t.loadData?T:void 0,"onUpdate:value":e.unref(w)}),e.createSlots({_:2},[e.renderList(C,(u,n)=>({name:n,fn:e.withCtx(c=>[e.renderSlot(t.$slots,n,e.normalizeProps(e.guardReactiveProps(c||{})))])})),e.unref(m)?{name:"notFoundContent",fn:e.withCtx(()=>[e.createVNode(e.unref(i.Spin),{size:"small"})]),key:"0"}:void 0]),1040,["value","tree-data","loading","load-data","onUpdate:value"]))}});exports.default=_;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),h=require("lodash-unified"),c=require("@aplus-frontend/antdv");function s(l){return typeof l=="function"||Object.prototype.toString.call(l)==="[object Object]"&&!e.isVNode(l)}const g=e.defineComponent({name:"ApFieldTreeSelectRead",__name:"read",props:{mode:{default:"edit"},class:{},style:{},suffixIcon:{},size:{},bordered:{type:Boolean},treeLine:{},replaceFields:{},placement:{},status:{},popupClassName:{},dropdownClassName:{},"onUpdate:value":{},"onUpdate:treeExpandedKeys":{},"onUpdate:searchValue":{},value:{},children:{},listHeight:{},onMouseenter:{},onMouseleave:{},tabindex:{},onClick:{},onFocus:{},onBlur:{},onChange:{},onKeydown:{},onKeyup:{},onMousedown:{},onSelect:{},open:{type:Boolean},animation:{},direction:{},multiple:{type:Boolean},disabled:{type:Boolean},prefixCls:{},getPopupContainer:{},virtual:{type:Boolean},dropdownMatchSelectWidth:{},loading:{type:Boolean},defaultValue:{},showAction:{},transitionName:{},dropdownAlign:{},placeholder:{},allowClear:{type:Boolean},autofocus:{type:Boolean},defaultOpen:{type:Boolean},id:{},clearIcon:{},notFoundContent:{},maxCount:{},onDeselect:{},prefix:{},onSearch:{},fieldNames:{},dropdownStyle:{},dropdownRender:{},switcherIcon:{},filterTreeNode:{},treeData:{},treeCheckable:{type:Boolean},showSearch:{type:Boolean},searchValue:{},onInputKeyDown:{},removeIcon:{},maxTagCount:{},maxTagTextLength:{},maxTagPlaceholder:{},tokenSeparators:{},tagRender:{},choiceTransitionName:{},optionLabelRender:{},onClear:{},onDropdownVisibleChange:{},getRawInputElement:{},onPopupScroll:{},listItemHeight:{},inputValue:{},autoClearSearchValue:{type:Boolean},labelInValue:{type:Boolean},showArrow:{type:Boolean},showCheckedStrategy:{},treeExpandAction:{},treeDefaultExpandAll:{type:Boolean},treeIcon:{},treeLoadedKeys:{},onTreeLoad:{},treeNodeFilterProp:{},treeNodeLabelProp:{},treeCheckStrictly:{type:Boolean},treeDataSimpleMode:{},treeExpandedKeys:{},treeDefaultExpandedKeys:{},onTreeExpand:{},dropdownPopupAlign:{},emptyText:{default:"--"},request:{},lazy:{type:Boolean},params:{},loadData:{type:Boolean}},setup(l){const o=l,u=e.computed(()=>{let r;const d=o.value,p=h.isArray(d)?d:[d].filter(Boolean);if(!p.length)return e.createVNode(e.Fragment,null,[o.emptyText]);const t=[],y=o.fieldNames?.label||"label",m=o.fieldNames?.value||"value";function i(
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),h=require("lodash-unified"),c=require("@aplus-frontend/antdv");function s(l){return typeof l=="function"||Object.prototype.toString.call(l)==="[object Object]"&&!e.isVNode(l)}const g=e.defineComponent({name:"ApFieldTreeSelectRead",__name:"read",props:{mode:{default:"edit"},class:{},style:{},suffixIcon:{},size:{},bordered:{type:Boolean},treeLine:{},replaceFields:{},placement:{},status:{},popupClassName:{},dropdownClassName:{},"onUpdate:value":{},"onUpdate:treeExpandedKeys":{},"onUpdate:searchValue":{},variant:{},value:{},children:{},listHeight:{},onMouseenter:{},onMouseleave:{},tabindex:{},onClick:{},onFocus:{},onBlur:{},onChange:{},onKeydown:{},onKeyup:{},onMousedown:{},onSelect:{},open:{type:Boolean},animation:{},direction:{},multiple:{type:Boolean},disabled:{type:Boolean},prefixCls:{},getPopupContainer:{},virtual:{type:Boolean},dropdownMatchSelectWidth:{},loading:{type:Boolean},defaultValue:{},showAction:{},transitionName:{},dropdownAlign:{},placeholder:{},allowClear:{type:Boolean},autofocus:{type:Boolean},defaultOpen:{type:Boolean},id:{},clearIcon:{},notFoundContent:{},maxCount:{},onDeselect:{},prefix:{},onSearch:{},fieldNames:{},dropdownStyle:{},dropdownRender:{},switcherIcon:{},filterTreeNode:{},treeData:{},treeCheckable:{type:Boolean},showSearch:{type:Boolean},searchValue:{},onInputKeyDown:{},removeIcon:{},maxTagCount:{},maxTagTextLength:{},maxTagPlaceholder:{},tokenSeparators:{},tagRender:{},choiceTransitionName:{},optionLabelRender:{},onClear:{},onDropdownVisibleChange:{},getRawInputElement:{},onPopupScroll:{},listItemHeight:{},inputValue:{},autoClearSearchValue:{type:Boolean},labelInValue:{type:Boolean},showArrow:{type:Boolean},showCheckedStrategy:{},treeExpandAction:{},treeDefaultExpandAll:{type:Boolean},treeIcon:{},treeLoadedKeys:{},onTreeLoad:{},treeNodeFilterProp:{},treeNodeLabelProp:{},treeCheckStrictly:{type:Boolean},treeDataSimpleMode:{},treeExpandedKeys:{},treeDefaultExpandedKeys:{},onTreeExpand:{},dropdownPopupAlign:{},emptyText:{default:"--"},request:{},lazy:{type:Boolean},params:{},loadData:{type:Boolean}},setup(l){const o=l,u=e.computed(()=>{let r;const d=o.value,p=h.isArray(d)?d:[d].filter(Boolean);if(!p.length)return e.createVNode(e.Fragment,null,[o.emptyText]);const t=[],y=o.fieldNames?.label||"label",m=o.fieldNames?.value||"value";function i(a){for(const n of a){if(p.find(f=>f===n[m])&&t.push(n[y]),t.length===p.length)return;n.children?.length&&i(n.children)}}return i(o.treeData),t.length?t.length===1?e.createVNode("span",null,[t[0]]):e.createVNode(c.Space,{size:4},s(r=t.map((a,n)=>e.createVNode(c.Tag,{style:"margin-right: 0px",key:`${a}-${n}`},s(a)?a:{default:()=>[a]})))?r:{default:()=>[r]}):e.createVNode(e.Fragment,null,[o.emptyText])});return(r,d)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(u.value)))}});exports.default=g;
|
|
@@ -71,6 +71,7 @@ declare function __VLS_template(): {
|
|
|
71
71
|
readonly animation?: string | undefined;
|
|
72
72
|
readonly children?: VueNode[] | undefined;
|
|
73
73
|
readonly prefixCls?: string | undefined;
|
|
74
|
+
readonly variant?: "filled" | "outlined" | "borderless" | "underlined" | undefined;
|
|
74
75
|
readonly loading?: boolean | undefined;
|
|
75
76
|
readonly transitionName?: string | undefined;
|
|
76
77
|
readonly autofocus?: boolean | undefined;
|
|
@@ -201,6 +202,10 @@ declare function __VLS_template(): {
|
|
|
201
202
|
type: PropType<(value: string) => void>;
|
|
202
203
|
default: (value: string) => void;
|
|
203
204
|
};
|
|
205
|
+
variant: {
|
|
206
|
+
type: PropType<"filled" | "outlined" | "borderless" | "underlined">;
|
|
207
|
+
default: "filled" | "outlined" | "borderless" | "underlined";
|
|
208
|
+
};
|
|
204
209
|
value: {
|
|
205
210
|
type: PropType<any>;
|
|
206
211
|
};
|
|
@@ -395,6 +400,7 @@ declare function __VLS_template(): {
|
|
|
395
400
|
virtual: boolean;
|
|
396
401
|
dropdownMatchSelectWidth: number | boolean;
|
|
397
402
|
loading: boolean;
|
|
403
|
+
variant: "filled" | "outlined" | "borderless" | "underlined";
|
|
398
404
|
bordered: boolean;
|
|
399
405
|
status: "" | "error" | "warning";
|
|
400
406
|
allowClear: boolean;
|
|
@@ -480,6 +486,10 @@ declare function __VLS_template(): {
|
|
|
480
486
|
type: PropType<(value: string) => void>;
|
|
481
487
|
default: (value: string) => void;
|
|
482
488
|
};
|
|
489
|
+
variant: {
|
|
490
|
+
type: PropType<"filled" | "outlined" | "borderless" | "underlined">;
|
|
491
|
+
default: "filled" | "outlined" | "borderless" | "underlined";
|
|
492
|
+
};
|
|
483
493
|
value: {
|
|
484
494
|
type: PropType<any>;
|
|
485
495
|
};
|
|
@@ -674,6 +684,7 @@ declare function __VLS_template(): {
|
|
|
674
684
|
virtual: boolean;
|
|
675
685
|
dropdownMatchSelectWidth: number | boolean;
|
|
676
686
|
loading: boolean;
|
|
687
|
+
variant: "filled" | "outlined" | "borderless" | "underlined";
|
|
677
688
|
bordered: boolean;
|
|
678
689
|
status: "" | "error" | "warning";
|
|
679
690
|
allowClear: boolean;
|
|
@@ -851,6 +862,7 @@ declare const __VLS_component: DefineComponent<ApFormItemTreeSelectProps, {
|
|
|
851
862
|
readonly animation?: string | undefined;
|
|
852
863
|
readonly children?: VueNode[] | undefined;
|
|
853
864
|
readonly prefixCls?: string | undefined;
|
|
865
|
+
readonly variant?: "filled" | "outlined" | "borderless" | "underlined" | undefined;
|
|
854
866
|
readonly loading?: boolean | undefined;
|
|
855
867
|
readonly transitionName?: string | undefined;
|
|
856
868
|
readonly autofocus?: boolean | undefined;
|
|
@@ -981,6 +993,10 @@ declare const __VLS_component: DefineComponent<ApFormItemTreeSelectProps, {
|
|
|
981
993
|
type: PropType<(value: string) => void>;
|
|
982
994
|
default: (value: string) => void;
|
|
983
995
|
};
|
|
996
|
+
variant: {
|
|
997
|
+
type: PropType<"filled" | "outlined" | "borderless" | "underlined">;
|
|
998
|
+
default: "filled" | "outlined" | "borderless" | "underlined";
|
|
999
|
+
};
|
|
984
1000
|
value: {
|
|
985
1001
|
type: PropType<any>;
|
|
986
1002
|
};
|
|
@@ -1175,6 +1191,7 @@ declare const __VLS_component: DefineComponent<ApFormItemTreeSelectProps, {
|
|
|
1175
1191
|
virtual: boolean;
|
|
1176
1192
|
dropdownMatchSelectWidth: number | boolean;
|
|
1177
1193
|
loading: boolean;
|
|
1194
|
+
variant: "filled" | "outlined" | "borderless" | "underlined";
|
|
1178
1195
|
bordered: boolean;
|
|
1179
1196
|
status: "" | "error" | "warning";
|
|
1180
1197
|
allowClear: boolean;
|
|
@@ -1260,6 +1277,10 @@ declare const __VLS_component: DefineComponent<ApFormItemTreeSelectProps, {
|
|
|
1260
1277
|
type: PropType<(value: string) => void>;
|
|
1261
1278
|
default: (value: string) => void;
|
|
1262
1279
|
};
|
|
1280
|
+
variant: {
|
|
1281
|
+
type: PropType<"filled" | "outlined" | "borderless" | "underlined">;
|
|
1282
|
+
default: "filled" | "outlined" | "borderless" | "underlined";
|
|
1283
|
+
};
|
|
1263
1284
|
value: {
|
|
1264
1285
|
type: PropType<any>;
|
|
1265
1286
|
};
|
|
@@ -1454,6 +1475,7 @@ declare const __VLS_component: DefineComponent<ApFormItemTreeSelectProps, {
|
|
|
1454
1475
|
virtual: boolean;
|
|
1455
1476
|
dropdownMatchSelectWidth: number | boolean;
|
|
1456
1477
|
loading: boolean;
|
|
1478
|
+
variant: "filled" | "outlined" | "borderless" | "underlined";
|
|
1457
1479
|
bordered: boolean;
|
|
1458
1480
|
status: "" | "error" | "warning";
|
|
1459
1481
|
allowClear: boolean;
|
|
@@ -2478,6 +2478,7 @@ export declare const apTableFormItemMap: {
|
|
|
2478
2478
|
readonly animation?: string | undefined;
|
|
2479
2479
|
readonly children?: VueNode[] | undefined;
|
|
2480
2480
|
readonly prefixCls?: string | undefined;
|
|
2481
|
+
readonly variant?: "filled" | "outlined" | "borderless" | "underlined" | undefined;
|
|
2481
2482
|
readonly loading?: boolean | undefined;
|
|
2482
2483
|
readonly transitionName?: string | undefined;
|
|
2483
2484
|
readonly autofocus?: boolean | undefined;
|
|
@@ -2608,6 +2609,10 @@ export declare const apTableFormItemMap: {
|
|
|
2608
2609
|
type: PropType<(value: string) => void>;
|
|
2609
2610
|
default: (value: string) => void;
|
|
2610
2611
|
};
|
|
2612
|
+
variant: {
|
|
2613
|
+
type: PropType<"filled" | "outlined" | "borderless" | "underlined">;
|
|
2614
|
+
default: "filled" | "outlined" | "borderless" | "underlined";
|
|
2615
|
+
};
|
|
2611
2616
|
value: {
|
|
2612
2617
|
type: PropType<any>;
|
|
2613
2618
|
};
|
|
@@ -2802,6 +2807,7 @@ export declare const apTableFormItemMap: {
|
|
|
2802
2807
|
virtual: boolean;
|
|
2803
2808
|
dropdownMatchSelectWidth: number | boolean;
|
|
2804
2809
|
loading: boolean;
|
|
2810
|
+
variant: "filled" | "outlined" | "borderless" | "underlined";
|
|
2805
2811
|
bordered: boolean;
|
|
2806
2812
|
status: "" | "error" | "warning";
|
|
2807
2813
|
allowClear: boolean;
|
|
@@ -2887,6 +2893,10 @@ export declare const apTableFormItemMap: {
|
|
|
2887
2893
|
type: PropType<(value: string) => void>;
|
|
2888
2894
|
default: (value: string) => void;
|
|
2889
2895
|
};
|
|
2896
|
+
variant: {
|
|
2897
|
+
type: PropType<"filled" | "outlined" | "borderless" | "underlined">;
|
|
2898
|
+
default: "filled" | "outlined" | "borderless" | "underlined";
|
|
2899
|
+
};
|
|
2890
2900
|
value: {
|
|
2891
2901
|
type: PropType<any>;
|
|
2892
2902
|
};
|
|
@@ -3081,6 +3091,7 @@ export declare const apTableFormItemMap: {
|
|
|
3081
3091
|
virtual: boolean;
|
|
3082
3092
|
dropdownMatchSelectWidth: number | boolean;
|
|
3083
3093
|
loading: boolean;
|
|
3094
|
+
variant: "filled" | "outlined" | "borderless" | "underlined";
|
|
3084
3095
|
bordered: boolean;
|
|
3085
3096
|
status: "" | "error" | "warning";
|
|
3086
3097
|
allowClear: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("vue"),s=require("lodash-unified"),p=require("./constants.js"),T=require("@fruits-chain/utils");require("../ap-form/index.js");const b=require("@aplus-frontend/antdv"),C=require("@ant-design/icons-vue"),j=require("../ap-form/item/index.vue.js");function v(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!l.isVNode(e)}const g=(e,t,n)=>{let o={};return s.isObject(e)?Object.keys(e).forEach(r=>{s.isObject(e[r])?o[r]=g(e[r],t[r],n):o[r]=n(e[r],t)}):o=n(e,t),o},N=(e,t)=>{switch(e){case"dayjs":return t.valueOf();case"dayjsRange":return t.map(n=>n.valueOf());case"dayjsDayRange":{const[n,o]=t;return[n.startOf("day").valueOf(),o.endOf("day").valueOf()]}case"multiple":case"multipleNumber":return s.isArray(t)?t:[t];case"boolean":return t;case"object":return t;default:return t}};function O(e){return s.isArray(e)?e.join("."):e}function h(e){const t=Object.prototype.toString.call(e).match(/^\[object (.*)\]$/)[1].toLowerCase();return t==="string"&&typeof e=="object"?"object":e===null?"null":e===void 0?"undefined":t}const y=e=>{if(h(e)==="map")return e;const t=new Map;for(const[n,o]of Object.entries(e||{})){let r=n;n==="true"?r=!0:n==="false"&&(r=!1),t.set(r,o)}return t},a=e=>{const t=[],n=y(e);return n.forEach((o,r)=>{const i=n.get(r)||n.get(`${r}`);if(i){if(typeof i=="object"&&i?.text){t.push({text:i?.text,value:r,label:i?.text,disabled:i.disabled});return}t.push({text:i,label:i,value:r})}}),t},E=e=>s.isUndefined(e)||e<0?0:e;function m(e,t){return!e||!s.isFunction(e)?e:e(t)}function P(e){let t=e.valueType||"text";return e.valueEnum&&(t="status"),t}function F(e,t,n,o){const r=p.apTableRenderItemMap[e];return r?l.createVNode(r,l.mergeProps(t,{mode:"read"}),null):o?.[e]?.render?.(t.value,n,t)||t.value}function S(e,t){if(e.customRenderFormItem)return()=>{const r=e.customRenderFormItem(e);return l.cloneVNode(r,{...e.fieldProps,span:e.span,...r.props||{}})};const n=p.apTableFormItemMap[e.valueType];if(n)return()=>l.createVNode(n,l.mergeProps(e.fieldProps,{span:e.span}),null);const o=t?.[e.valueType];return()=>{const r=o?.renderFormItem?.(e.fieldProps.field);return r?l.createVNode(j.default,l.mergeProps(e.fieldProps,{span:e.span}),v(r)?r:{default:()=>[r]}):null}}function x(e,t){const n=m(e.fieldProps,t),o=n?.field||n||{},r=e.valueType==="switch",i=e.valueType==="index",c=r?{checked:t.value}:{value:i?t.index+1:t.value};return e.valueEnum&&(o.valueEnum=e.valueEnum),{...s.omit(o,["request"]),...c}}function R(e){const t={...e};return s.isBoolean(e.filters)&&e.filters&&e.valueEnum&&(t.filters=a(e.valueEnum)),t}function V(e,t){const n=t||{};return e.valueEnum&&!n.field?.options&&(n.field={...n.field,options:a(e.valueEnum)}),n}function q(e){if(!T.isType("Object")(e))return e;try{return JSON.stringify(e)}catch{return e}}function I(e,t,n,o){const r=n?.({title:e.title,column:e}),i=r?.filter(u=>u.type!==Symbol.for("v-cmt"))||[];if(r&&i.length>0)return r;const d=s.isString(e.title)?l.createVNode("span",{class:t,title:e.title},[e.title]):e.title,f=e.tooltip?s.isFunction(e.tooltip)?e.tooltip(e):l.createVNode(l.Fragment,null,[e.tooltip]):null;return f?l.createVNode("span",{style:{display:"inline-flex",alignItems:"center",maxWidth:"100%"}},[d,l.createVNode(b.Tooltip,{title:f,placement:"bottom",getPopupContainer:u=>u.closest(".ant-table")||u.closest(".ant-modal")||u.closest(".vxe-table")||document.body},{default:()=>[l.createVNode(C.QuestionCircleOutlined,{style:{paddingInline:"4px",color:o,verticalAlign:"middle"}},null)]})]):d}function A(e,t){const n=[];function o(r){for(const i of r)i.children?.length?o(i.children):n.push(t(i))}return o(e),n}function _(e,t){if(s.isArray(e)&&s.isArray(t))return s.isEqual(s.sortBy(e),s.sortBy(t));if(s.isPlainObject(e)&&s.isPlainObject(t)){const n=o=>s.every(o,r=>r==null)||s.isEmpty(o);if(n(e)&&n(t))return!0}}function M(e){if(e!==!1)return e}exports.apColumnToColumn=R;exports.dataIndexToStr=O;exports.falseToUndefined=M;exports.formatParamsValueType=g;exports.getColumnOrder=E;exports.getFieldProps=m;exports.getSearchFormItemRenderNode=S;exports.getTableCellRenderNode=F;exports.getTableRenderProps=x;exports.getTableRenderType=P;exports.getTableTitle=I;exports.isEqualCustom=_;exports.objectToMap=y;exports.objectToString=q;exports.parseFieldValue=N;exports.recursionApColumns=A;exports.updateFormProps=V;exports.valueEnumToArray=a;
|