@aplus-frontend/ui 6.12.0 → 6.13.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-descriptions/interface.d.ts +1 -1
- package/es/src/ap-form/ap-form.vue2.mjs +118 -108
- package/es/src/ap-form/items/number/index.vue.d.ts +2 -2
- package/es/src/ap-form/items/select/index.vue.d.ts +2 -2
- package/es/src/ap-form/items/text/index.vue.d.ts +2 -2
- package/es/src/ap-form/items/text/password.vue.d.ts +2 -2
- package/es/src/ap-form/items/tree-select/index.vue.d.ts +2 -2
- package/es/src/ap-form/search-form/hooks/use-collapse-input-count.d.ts +8 -1
- package/es/src/ap-form/search-form/hooks/use-collapse-input-count.mjs +23 -18
- package/es/src/ap-form/search-form/hooks/use-sorter.mjs +31 -30
- package/es/src/ap-form/search-form/index.vue.mjs +42 -41
- package/es/src/ap-grid/index.vue.mjs +221 -225
- package/es/src/ap-modal/interface.d.ts +8 -0
- package/es/src/ap-modal/utils/createModalStream.mjs +69 -66
- package/es/src/ap-table/ap-table.vue2.mjs +107 -111
- package/es/src/ap-table/constants.d.ts +5 -5
- package/es/src/ap-table/context.d.ts +1 -0
- package/es/src/ap-table/context.mjs +6 -5
- package/es/src/ap-table/utils.d.ts +5 -3247
- package/es/src/ap-table/utils.mjs +107 -121
- package/es/src/business/ap-view/ap-view.vue2.mjs +76 -74
- package/es/src/business/ap-view/interface.d.ts +1 -0
- package/es/src/business/batch-input-group/index.vue.d.ts +2 -1
- package/es/src/business/batch-input-group/index.vue.mjs +56 -52
- package/es/src/business/batch-input-group/interface.d.ts +5 -0
- package/es/src/business/batch-input-group/popover-input/index.vue2.mjs +36 -32
- package/es/src/business/batch-input-group/utils.d.ts +8 -0
- package/es/src/business/batch-input-group/utils.mjs +10 -0
- package/es/src/version.d.ts +1 -1
- package/es/src/version.mjs +1 -1
- package/lib/src/ap-descriptions/interface.d.ts +1 -1
- package/lib/src/ap-form/ap-form.vue2.js +1 -1
- package/lib/src/ap-form/items/number/index.vue.d.ts +2 -2
- package/lib/src/ap-form/items/select/index.vue.d.ts +2 -2
- package/lib/src/ap-form/items/text/index.vue.d.ts +2 -2
- package/lib/src/ap-form/items/text/password.vue.d.ts +2 -2
- package/lib/src/ap-form/items/tree-select/index.vue.d.ts +2 -2
- package/lib/src/ap-form/search-form/hooks/use-collapse-input-count.d.ts +8 -1
- package/lib/src/ap-form/search-form/hooks/use-collapse-input-count.js +1 -1
- package/lib/src/ap-form/search-form/hooks/use-sorter.js +1 -1
- package/lib/src/ap-form/search-form/index.vue.js +1 -1
- package/lib/src/ap-grid/index.vue.js +1 -1
- package/lib/src/ap-modal/interface.d.ts +8 -0
- package/lib/src/ap-modal/utils/createModalStream.js +1 -1
- package/lib/src/ap-table/ap-table.vue2.js +1 -1
- package/lib/src/ap-table/constants.d.ts +5 -5
- package/lib/src/ap-table/context.d.ts +1 -0
- package/lib/src/ap-table/context.js +1 -1
- package/lib/src/ap-table/utils.d.ts +5 -3247
- package/lib/src/ap-table/utils.js +1 -1
- package/lib/src/business/ap-view/ap-view.vue2.js +1 -1
- package/lib/src/business/ap-view/interface.d.ts +1 -0
- package/lib/src/business/batch-input-group/index.vue.d.ts +2 -1
- package/lib/src/business/batch-input-group/index.vue.js +2 -2
- package/lib/src/business/batch-input-group/interface.d.ts +5 -0
- package/lib/src/business/batch-input-group/popover-input/index.vue2.js +3 -2
- package/lib/src/business/batch-input-group/utils.d.ts +8 -0
- package/lib/src/business/batch-input-group/utils.js +1 -0
- package/lib/src/version.d.ts +1 -1
- package/lib/src/version.js +1 -1
- package/package.json +1 -1
- package/theme/ap-grid/index.css +3 -0
- package/theme/ap-grid/index.less +3 -4
- package/theme/index.css +3 -0
- package/es/src/ap-table/components/dynamic-component/index.vue.d.ts +0 -4
- package/es/src/ap-table/components/dynamic-component/index.vue.mjs +0 -4
- package/es/src/ap-table/components/dynamic-component/index.vue2.mjs +0 -15
- package/lib/src/ap-table/components/dynamic-component/index.vue.d.ts +0 -4
- package/lib/src/ap-table/components/dynamic-component/index.vue.js +0 -1
- package/lib/src/ap-table/components/dynamic-component/index.vue2.js +0 -1
|
@@ -1,26 +1,27 @@
|
|
|
1
|
-
import { isVNode as
|
|
2
|
-
import { Col as w, Flex as
|
|
1
|
+
import { isVNode as ne, defineComponent as le, useSlots as re, ref as D, shallowRef as U, computed as S, unref as n, watch as W, createVNode as o, Fragment as _, createBlock as x, openBlock as d, mergeProps as se, withCtx as A, resolveDynamicComponent as B, createElementBlock as ie, renderList as ue } from "vue";
|
|
2
|
+
import { Col as w, Flex as I, Button as M, Row as ce } from "@aplus-frontend/antdv";
|
|
3
3
|
import "../ap-form.vue.mjs";
|
|
4
4
|
import "../item/index.vue2.mjs";
|
|
5
5
|
import { genRealChildren as z } from "../item-group/helper.mjs";
|
|
6
6
|
import "../../config-provider/index.mjs";
|
|
7
|
-
import { isArray as
|
|
7
|
+
import { isArray as pe, isBoolean as de, omit as me } from "lodash-unified";
|
|
8
8
|
import { isDef as q } from "../../utils/index.mjs";
|
|
9
|
-
import { execFunc as H, diffFormItem as
|
|
9
|
+
import { execFunc as H, diffFormItem as fe } from "./utils.mjs";
|
|
10
10
|
import "./components/popover-filter.vue.mjs";
|
|
11
|
-
import { useCountPerRow as
|
|
11
|
+
import { useCountPerRow as he } from "./hooks/use-count-per-row.mjs";
|
|
12
12
|
import "./components/popover-sorter/index.vue.mjs";
|
|
13
13
|
import { useSorter as ge } from "./hooks/use-sorter.mjs";
|
|
14
|
+
import { getTargetNode as xe } from "./hooks/use-collapse-input-count.mjs";
|
|
14
15
|
import { useNamespace as ye } from "../../config-provider/hooks/use-namespace.mjs";
|
|
15
16
|
import { useLocale as ve } from "../../config-provider/hooks/use-locale.mjs";
|
|
16
17
|
import G from "../item/index.vue.mjs";
|
|
17
18
|
import Ce from "./components/popover-filter.vue2.mjs";
|
|
18
19
|
import Se from "./components/popover-sorter/index.vue2.mjs";
|
|
19
20
|
import _e from "../ap-form.vue2.mjs";
|
|
20
|
-
function we(
|
|
21
|
-
return typeof
|
|
21
|
+
function we(m) {
|
|
22
|
+
return typeof m == "function" || Object.prototype.toString.call(m) === "[object Object]" && !ne(m);
|
|
22
23
|
}
|
|
23
|
-
const s = 24,
|
|
24
|
+
const s = 24, He = /* @__PURE__ */ le({
|
|
24
25
|
name: "ApFormSearchForm",
|
|
25
26
|
__name: "index",
|
|
26
27
|
props: {
|
|
@@ -115,15 +116,15 @@ const s = 24, ze = /* @__PURE__ */ re({
|
|
|
115
116
|
default: 300
|
|
116
117
|
}
|
|
117
118
|
},
|
|
118
|
-
setup(
|
|
119
|
+
setup(m, {
|
|
119
120
|
expose: J
|
|
120
121
|
}) {
|
|
121
122
|
var L;
|
|
122
|
-
const i =
|
|
123
|
-
b:
|
|
123
|
+
const i = re(), t = m, {
|
|
124
|
+
b: f
|
|
124
125
|
} = ye("ap-form-search-form"), {
|
|
125
126
|
t: k
|
|
126
|
-
} = ve(), K =
|
|
127
|
+
} = ve(), K = he(t), y = D(), Q = D();
|
|
127
128
|
function T() {
|
|
128
129
|
var a;
|
|
129
130
|
const e = (a = y.value) == null ? void 0 : a.getFieldsValueTransformed(!0);
|
|
@@ -133,7 +134,7 @@ const s = 24, ze = /* @__PURE__ */ re({
|
|
|
133
134
|
var e, a;
|
|
134
135
|
t.customReset || (a = (e = y.value) == null ? void 0 : e.resetFields) == null || a.call(e), H(t.onReset);
|
|
135
136
|
}
|
|
136
|
-
const Y = (e) => q(e) ? (
|
|
137
|
+
const Y = (e) => q(e) ? (pe(e) ? e : [e]).join("") : Date.now();
|
|
137
138
|
let E = [];
|
|
138
139
|
const h = U(z(i.default())), c = U((L = i.extra) == null ? void 0 : L.call(i)), P = S(() => Math.floor(s / n(K))), {
|
|
139
140
|
items: R,
|
|
@@ -141,7 +142,7 @@ const s = 24, ze = /* @__PURE__ */ re({
|
|
|
141
142
|
handleClickConfirm: b
|
|
142
143
|
} = ge(h);
|
|
143
144
|
W(() => i.default(), (e) => {
|
|
144
|
-
E = h.value, h.value =
|
|
145
|
+
E = h.value, h.value = fe(E, z(e)), O.value = !1;
|
|
145
146
|
}), W(() => {
|
|
146
147
|
var e;
|
|
147
148
|
return (e = i.extra) == null ? void 0 : e.call(i);
|
|
@@ -149,27 +150,27 @@ const s = 24, ze = /* @__PURE__ */ re({
|
|
|
149
150
|
c.value = e;
|
|
150
151
|
});
|
|
151
152
|
const l = S(() => {
|
|
152
|
-
const e = h.value, a = [], r = [],
|
|
153
|
+
const e = h.value, a = [], r = [], g = [], u = n(P);
|
|
153
154
|
let v = 0, F = 0;
|
|
154
155
|
const te = s * t.maxRows - u * (n(c) && !t.extraInAction ? 2 : 1);
|
|
155
|
-
e.forEach((
|
|
156
|
-
const p =
|
|
157
|
-
if (
|
|
158
|
-
a.push(
|
|
156
|
+
e.forEach((N) => {
|
|
157
|
+
const p = xe(N).props;
|
|
158
|
+
if (de(p.hidden) ? !!p.hidden : q(p.hidden))
|
|
159
|
+
a.push(N);
|
|
159
160
|
else {
|
|
160
161
|
let C = p.span || u;
|
|
161
|
-
const
|
|
162
|
-
node:
|
|
162
|
+
const V = {
|
|
163
|
+
node: N,
|
|
163
164
|
span: C,
|
|
164
|
-
key: `ApFormSearchFormItem-${
|
|
165
|
-
},
|
|
166
|
-
|
|
165
|
+
key: `ApFormSearchFormItem-${Y(p.name)}-${p._signal}`
|
|
166
|
+
}, $ = s - v % s;
|
|
167
|
+
$ < C && (C += $), v += C, v > te ? r.push(V) : (F = v, g.push(V));
|
|
167
168
|
}
|
|
168
169
|
});
|
|
169
|
-
const
|
|
170
|
+
const j = s - (F + u) % s, oe = F % s < u, ae = j < u ? s : j;
|
|
170
171
|
return {
|
|
171
172
|
hideNode: o(_, null, [a]),
|
|
172
|
-
nodes:
|
|
173
|
+
nodes: g,
|
|
173
174
|
collapseNodes: r,
|
|
174
175
|
extraSpan: ae,
|
|
175
176
|
lastRowOnlyIncludeActionAndExtra: oe
|
|
@@ -181,16 +182,16 @@ const s = 24, ze = /* @__PURE__ */ re({
|
|
|
181
182
|
key: "actionWrapper"
|
|
182
183
|
}, {
|
|
183
184
|
default: () => [o(G, null, {
|
|
184
|
-
default: () => [o(
|
|
185
|
+
default: () => [o(I, {
|
|
185
186
|
wrap: "wrap",
|
|
186
187
|
justify: l.value.lastRowOnlyIncludeActionAndExtra && !(n(c) && t.extraInAction) ? "flex-end" : "space-between"
|
|
187
188
|
}, {
|
|
188
|
-
default: () => [o(
|
|
189
|
+
default: () => [o(I, {
|
|
189
190
|
gap: 8,
|
|
190
191
|
wrap: "wrap"
|
|
191
192
|
}, {
|
|
192
193
|
default: () => [a ? o("div", {
|
|
193
|
-
class:
|
|
194
|
+
class: f("column-setting-trigger-wrapper")
|
|
194
195
|
}, [l.value.collapseNodes.length ? o(Ce, {
|
|
195
196
|
onSubmit: T,
|
|
196
197
|
config: l.value.collapseNodes,
|
|
@@ -207,25 +208,25 @@ const s = 24, ze = /* @__PURE__ */ re({
|
|
|
207
208
|
delay: t.loadingDelay
|
|
208
209
|
} : !1,
|
|
209
210
|
htmlType: "submit",
|
|
210
|
-
class:
|
|
211
|
+
class: f("action-btn")
|
|
211
212
|
}, {
|
|
212
213
|
default: () => [t.searchText || k("ap.apForm.search.search")]
|
|
213
214
|
}), o(M, {
|
|
214
215
|
onClick: X,
|
|
215
216
|
type: "text",
|
|
216
|
-
class: [
|
|
217
|
+
class: [f("action-btn"), f("action-btn-reset")]
|
|
217
218
|
}, {
|
|
218
219
|
default: () => [t.resetText || k("ap.apForm.search.reset")]
|
|
219
220
|
})]
|
|
220
221
|
}), t.extraInAction ? n(c) : null]
|
|
221
222
|
})]
|
|
222
223
|
})]
|
|
223
|
-
}),
|
|
224
|
+
}), g = !t.extraInAction && n(c) ? o(w, {
|
|
224
225
|
span: l.value.extraSpan,
|
|
225
226
|
key: "extraNode"
|
|
226
227
|
}, {
|
|
227
228
|
default: () => [o(G, null, {
|
|
228
|
-
default: () => [o(
|
|
229
|
+
default: () => [o(I, {
|
|
229
230
|
justify: l.value.extraSpan === s || l.value.lastRowOnlyIncludeActionAndExtra ? "start" : "flex-end"
|
|
230
231
|
}, we(e = n(c)) ? e : {
|
|
231
232
|
default: () => [e]
|
|
@@ -234,7 +235,7 @@ const s = 24, ze = /* @__PURE__ */ re({
|
|
|
234
235
|
}) : null, u = o(w, {
|
|
235
236
|
span: l.value.extraSpan
|
|
236
237
|
}, null);
|
|
237
|
-
return l.value.lastRowOnlyIncludeActionAndExtra ? o(_, null, [
|
|
238
|
+
return l.value.lastRowOnlyIncludeActionAndExtra ? o(_, null, [g || u, r]) : o(_, null, [r, g]);
|
|
238
239
|
});
|
|
239
240
|
function ee() {
|
|
240
241
|
var a;
|
|
@@ -246,21 +247,21 @@ const s = 24, ze = /* @__PURE__ */ re({
|
|
|
246
247
|
getSorterItems: () => R.value,
|
|
247
248
|
setSorterItems: b,
|
|
248
249
|
resetSorterItems: ee
|
|
249
|
-
}), (e, a) => (d(),
|
|
250
|
+
}), (e, a) => (d(), x(_e, se({
|
|
250
251
|
ref_key: "apForm",
|
|
251
252
|
ref: y,
|
|
252
|
-
class: n(
|
|
253
|
+
class: n(f)()
|
|
253
254
|
}, n(me)(t, ["collapse", "defaultCollapse", "onUpdate:collapse", "searchText", "resetText", "onSubmit", "onReset", "extraInAction", "forceExpand", "countPerRow"])), {
|
|
254
|
-
default:
|
|
255
|
+
default: A(() => [(d(), x(B(l.value.hideNode))), o(n(ce), {
|
|
255
256
|
gutter: 8
|
|
256
257
|
}, {
|
|
257
|
-
default:
|
|
258
|
+
default: A(() => [(d(!0), ie(_, null, ue(l.value.nodes, (r) => (d(), x(n(w), {
|
|
258
259
|
key: r.key,
|
|
259
260
|
span: r.span
|
|
260
261
|
}, {
|
|
261
|
-
default:
|
|
262
|
+
default: A(() => [(d(), x(B(r.node)))]),
|
|
262
263
|
_: 2
|
|
263
|
-
}, 1032, ["span"]))), 128)), (d(),
|
|
264
|
+
}, 1032, ["span"]))), 128)), (d(), x(B(Z.value)))]),
|
|
264
265
|
_: 1
|
|
265
266
|
})]),
|
|
266
267
|
_: 1
|
|
@@ -268,5 +269,5 @@ const s = 24, ze = /* @__PURE__ */ re({
|
|
|
268
269
|
}
|
|
269
270
|
});
|
|
270
271
|
export {
|
|
271
|
-
|
|
272
|
+
He as default
|
|
272
273
|
};
|