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