@aplus-frontend/ui 0.2.6 → 0.2.8
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/index.mjs +151 -147
- package/es/src/ap-field/interface.d.ts +2 -1
- package/es/src/ap-field/switch/index.vue.mjs +50 -49
- package/es/src/ap-form/drawer-form/index.vue.mjs +104 -99
- package/es/src/ap-table/constants.d.ts +7 -1189
- package/es/src/business/ap-group-search/ap-group-search.vue.d.ts +50 -0
- package/es/src/business/ap-group-search/ap-group-search.vue.mjs +4 -0
- package/es/src/business/ap-group-search/ap-group-search.vue2.mjs +184 -0
- package/es/src/business/ap-group-search/extension-select/index.vue.d.ts +355 -0
- package/es/src/business/ap-group-search/extension-select/index.vue.mjs +4 -0
- package/es/src/business/ap-group-search/extension-select/index.vue2.mjs +118 -0
- package/es/src/business/ap-group-search/images/icon-down.vue.d.ts +3 -0
- package/es/src/business/ap-group-search/images/icon-down.vue.mjs +28 -0
- package/es/src/business/ap-group-search/images/icon-line-select.vue.d.ts +3 -0
- package/es/src/business/ap-group-search/images/icon-line-select.vue.mjs +45 -0
- package/es/src/business/ap-group-search/index.d.ts +2823 -0
- package/es/src/business/ap-group-search/index.mjs +14 -0
- package/es/src/business/ap-group-search/interface.d.ts +11 -0
- package/es/src/business/ap-group-search/interface.mjs +1 -0
- package/es/src/business/ap-group-search/popover-select/index.vue.d.ts +357 -0
- package/es/src/business/ap-group-search/popover-select/index.vue.mjs +4 -0
- package/es/src/business/ap-group-search/popover-select/index.vue2.mjs +192 -0
- package/es/src/business/ap-group-search/popover-select/style/css.d.ts +0 -0
- package/es/src/business/ap-group-search/popover-select/style/css.js +1 -0
- package/es/src/business/ap-group-search/popover-select/style/index.d.ts +0 -0
- package/es/src/business/ap-group-search/popover-select/style/index.js +1 -0
- package/es/src/business/ap-group-search/style/css.d.ts +0 -0
- package/es/src/business/ap-group-search/style/css.js +1 -0
- package/es/src/business/ap-group-search/style/index.d.ts +0 -0
- package/es/src/business/ap-group-search/style/index.js +1 -0
- package/es/src/business/index.d.ts +1 -0
- package/es/src/business/index.mjs +30 -26
- package/es/src/check-card/index.vue2.mjs +43 -43
- package/es/src/index.mjs +33 -29
- package/es/src/locale/lang/en.mjs +8 -0
- package/es/src/locale/lang/zh-cn.mjs +8 -0
- package/es/src/path-map.mjs +3 -1
- package/lib/index.js +1 -1
- package/lib/src/ap-field/interface.d.ts +2 -1
- package/lib/src/ap-field/switch/index.vue.js +1 -1
- package/lib/src/ap-form/drawer-form/index.vue.js +1 -1
- package/lib/src/ap-table/constants.d.ts +7 -1189
- package/lib/src/business/ap-group-search/ap-group-search.vue.d.ts +50 -0
- package/lib/src/business/ap-group-search/ap-group-search.vue.js +1 -0
- package/lib/src/business/ap-group-search/ap-group-search.vue2.js +1 -0
- package/lib/src/business/ap-group-search/extension-select/index.vue.d.ts +355 -0
- package/lib/src/business/ap-group-search/extension-select/index.vue.js +1 -0
- package/lib/src/business/ap-group-search/extension-select/index.vue2.js +1 -0
- package/lib/src/business/ap-group-search/images/icon-down.vue.d.ts +3 -0
- package/lib/src/business/ap-group-search/images/icon-down.vue.js +1 -0
- package/lib/src/business/ap-group-search/images/icon-line-select.vue.d.ts +3 -0
- package/lib/src/business/ap-group-search/images/icon-line-select.vue.js +1 -0
- package/lib/src/business/ap-group-search/index.d.ts +2823 -0
- package/lib/src/business/ap-group-search/index.js +1 -0
- package/lib/src/business/ap-group-search/interface.d.ts +11 -0
- package/lib/src/business/ap-group-search/interface.js +1 -0
- package/lib/src/business/ap-group-search/popover-select/index.vue.d.ts +357 -0
- package/lib/src/business/ap-group-search/popover-select/index.vue.js +1 -0
- package/lib/src/business/ap-group-search/popover-select/index.vue2.js +2 -0
- package/lib/src/business/ap-group-search/popover-select/style/css.d.ts +0 -0
- package/lib/src/business/ap-group-search/popover-select/style/css.js +1 -0
- package/lib/src/business/ap-group-search/popover-select/style/index.d.ts +0 -0
- package/lib/src/business/ap-group-search/popover-select/style/index.js +1 -0
- package/lib/src/business/ap-group-search/style/css.d.ts +0 -0
- package/lib/src/business/ap-group-search/style/css.js +1 -0
- package/lib/src/business/ap-group-search/style/index.d.ts +0 -0
- package/lib/src/business/ap-group-search/style/index.js +1 -0
- package/lib/src/business/index.d.ts +1 -0
- package/lib/src/business/index.js +1 -1
- package/lib/src/check-card/index.vue2.js +1 -1
- package/lib/src/index.js +1 -1
- package/lib/src/locale/lang/en.js +1 -1
- package/lib/src/locale/lang/zh-cn.js +1 -1
- package/lib/src/path-map.js +1 -1
- package/package.json +21 -8
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { isVNode as
|
|
2
|
-
import { Button as V, Flex as
|
|
1
|
+
import { isVNode as K, defineComponent as Q, useSlots as Y, ref as v, computed as w, unref as l, watch as N, cloneVNode as Z, createVNode as d, mergeProps as b, openBlock as g, createElementBlock as P, Fragment as ee, withCtx as F, renderSlot as M, createTextVNode as te, toDisplayString as ie, createBlock as S, resolveDynamicComponent as _, normalizeClass as ne, withModifiers as oe, createCommentVNode as L } from "vue";
|
|
2
|
+
import { Button as V, Flex as le, Space as ae, Drawer as se } from "@aplus-frontend/antdv";
|
|
3
3
|
import "../ap-form.vue.mjs";
|
|
4
4
|
import "../../hooks/index.mjs";
|
|
5
|
-
import { getSingleVNode as
|
|
5
|
+
import { getSingleVNode as re } from "../../utils/slot.mjs";
|
|
6
6
|
import "../../config-provider/index.mjs";
|
|
7
|
-
import { isBoolean as
|
|
8
|
-
import { convertReactiveToRaw as
|
|
9
|
-
import { useControllableValue as
|
|
10
|
-
import { useLocale as
|
|
11
|
-
import { useNamespace as
|
|
12
|
-
import
|
|
13
|
-
function
|
|
14
|
-
return typeof c == "function" || Object.prototype.toString.call(c) === "[object Object]" && !
|
|
7
|
+
import { isBoolean as ue, isUndefined as de, omit as me } from "lodash-unified";
|
|
8
|
+
import { convertReactiveToRaw as ce } from "../../utils/index.mjs";
|
|
9
|
+
import { useControllableValue as fe } from "../../hooks/useControllableValue.mjs";
|
|
10
|
+
import { useLocale as pe } from "../../config-provider/hooks/use-locale.mjs";
|
|
11
|
+
import { useNamespace as he } from "../../config-provider/hooks/use-namespace.mjs";
|
|
12
|
+
import ve from "../ap-form.vue2.mjs";
|
|
13
|
+
function j(c) {
|
|
14
|
+
return typeof c == "function" || Object.prototype.toString.call(c) === "[object Object]" && !K(c);
|
|
15
15
|
}
|
|
16
|
-
const
|
|
16
|
+
const Ee = /* @__PURE__ */ Q({
|
|
17
17
|
__name: "index",
|
|
18
18
|
props: {
|
|
19
19
|
layout: {
|
|
@@ -89,17 +89,17 @@ const Le = /* @__PURE__ */ J({
|
|
|
89
89
|
},
|
|
90
90
|
emits: ["update:open"],
|
|
91
91
|
setup(c, {
|
|
92
|
-
expose:
|
|
93
|
-
emit:
|
|
92
|
+
expose: E,
|
|
93
|
+
emit: U
|
|
94
94
|
}) {
|
|
95
|
-
const n = c,
|
|
96
|
-
value:
|
|
97
|
-
updateValue:
|
|
98
|
-
} =
|
|
95
|
+
const n = c, y = Y(), D = U, a = v(), p = v(), u = v(!1), {
|
|
96
|
+
value: C,
|
|
97
|
+
updateValue: h
|
|
98
|
+
} = fe(n, D, {
|
|
99
99
|
valuePropName: "open",
|
|
100
100
|
defaultValue: !1
|
|
101
|
-
}),
|
|
102
|
-
var t, i,
|
|
101
|
+
}), m = w(() => {
|
|
102
|
+
var t, i, s, r;
|
|
103
103
|
const e = {
|
|
104
104
|
onResize: () => {
|
|
105
105
|
},
|
|
@@ -107,181 +107,186 @@ const Le = /* @__PURE__ */ J({
|
|
|
107
107
|
maxWidth: window.innerWidth * 0.8,
|
|
108
108
|
resizeOnOpen: !0
|
|
109
109
|
};
|
|
110
|
-
return
|
|
110
|
+
return ue(n.resize) ? n.resize ? e : {} : {
|
|
111
111
|
minWidth: ((t = n.resize) == null ? void 0 : t.minWidth) ?? e.minWidth,
|
|
112
112
|
maxWidth: ((i = n.resize) == null ? void 0 : i.maxWidth) ?? e.maxWidth,
|
|
113
|
-
onResize: ((
|
|
114
|
-
resizeOnOpen:
|
|
113
|
+
onResize: ((s = n.resize) == null ? void 0 : s.onResize) ?? e.onResize,
|
|
114
|
+
resizeOnOpen: de((r = n.resize) == null ? void 0 : r.resizeOnOpen) ? e.onResize : n.resize.resizeOnOpen
|
|
115
115
|
};
|
|
116
|
-
}),
|
|
117
|
-
t:
|
|
118
|
-
} =
|
|
119
|
-
e:
|
|
120
|
-
|
|
121
|
-
|
|
116
|
+
}), f = v(x()), {
|
|
117
|
+
t: z
|
|
118
|
+
} = pe(), {
|
|
119
|
+
e: $,
|
|
120
|
+
em: W
|
|
121
|
+
} = he("ap-form-drawer-form"), q = w(() => [$("resize-bar"), {
|
|
122
|
+
[W("resize-bar", "min-disabled")]: l(f) === l(m).minWidth
|
|
123
|
+
}, {
|
|
124
|
+
[W("resize-bar", "max-disabled")]: l(f) === l(m).maxWidth
|
|
125
|
+
}]);
|
|
126
|
+
N(() => a.value, (e) => {
|
|
122
127
|
var t;
|
|
123
|
-
e &&
|
|
124
|
-
}),
|
|
128
|
+
e && p.value && ((t = e.setFieldsValue) == null || t.call(e, p.value), p.value = void 0);
|
|
129
|
+
}), N(() => l(C), (e) => {
|
|
125
130
|
var t;
|
|
126
|
-
e && (t =
|
|
131
|
+
e && (t = l(m)) != null && t.resizeOnOpen && (f.value = x());
|
|
127
132
|
});
|
|
128
|
-
function
|
|
133
|
+
function x() {
|
|
129
134
|
var t;
|
|
130
|
-
const e = (t =
|
|
135
|
+
const e = (t = l(m)) == null ? void 0 : t.minWidth;
|
|
131
136
|
return !e || e && e < n.width ? n.width : e;
|
|
132
137
|
}
|
|
133
|
-
const
|
|
138
|
+
const B = re(y.trigger), k = B ? Z(B, {
|
|
134
139
|
onClick: () => {
|
|
135
|
-
|
|
140
|
+
h(!0);
|
|
136
141
|
}
|
|
137
|
-
}) : null,
|
|
138
|
-
var t, i,
|
|
142
|
+
}) : null, I = w(() => {
|
|
143
|
+
var t, i, s, r;
|
|
139
144
|
const e = [];
|
|
140
145
|
if (n.submitter === !1)
|
|
141
146
|
return null;
|
|
142
147
|
if (n.showCancel) {
|
|
143
148
|
let o;
|
|
144
149
|
e.push(d(V, {
|
|
145
|
-
onClick:
|
|
150
|
+
onClick: R,
|
|
146
151
|
disabled: u.value
|
|
147
|
-
},
|
|
152
|
+
}, j(o = z("ap.common.cancelText")) ? o : {
|
|
148
153
|
default: () => [o]
|
|
149
154
|
}));
|
|
150
155
|
}
|
|
151
|
-
return ((t = n.submitter) == null ? void 0 : t.resetButtonProps) !== !1 && e.push(d(V,
|
|
156
|
+
return ((t = n.submitter) == null ? void 0 : t.resetButtonProps) !== !1 && e.push(d(V, b(((i = n.submitter) == null ? void 0 : i.resetButtonProps) || {}, {
|
|
152
157
|
key: "submit",
|
|
153
158
|
disabled: u.value,
|
|
154
|
-
onClick:
|
|
159
|
+
onClick: X
|
|
155
160
|
}), {
|
|
156
161
|
default: () => {
|
|
157
162
|
var o;
|
|
158
|
-
return [((o = n.submitter) == null ? void 0 : o.resetText) ||
|
|
163
|
+
return [((o = n.submitter) == null ? void 0 : o.resetText) || z("ap.common.resetText")];
|
|
159
164
|
}
|
|
160
|
-
})), ((
|
|
165
|
+
})), ((s = n.submitter) == null ? void 0 : s.submitButtonProps) !== !1 && e.push(d(V, b({
|
|
161
166
|
type: "primary",
|
|
162
167
|
key: "submit"
|
|
163
168
|
}, ((r = n.submitter) == null ? void 0 : r.submitButtonProps) || {}, {
|
|
164
169
|
loading: u.value,
|
|
165
|
-
onClick:
|
|
170
|
+
onClick: G
|
|
166
171
|
}), {
|
|
167
172
|
default: () => {
|
|
168
173
|
var o;
|
|
169
|
-
return [((o = n.submitter) == null ? void 0 : o.submitText) ||
|
|
174
|
+
return [((o = n.submitter) == null ? void 0 : o.submitText) || z("ap.common.okText")];
|
|
170
175
|
}
|
|
171
|
-
})), d(
|
|
176
|
+
})), d(le, {
|
|
172
177
|
justify: "flex-end"
|
|
173
178
|
}, {
|
|
174
|
-
default: () => [
|
|
179
|
+
default: () => [y.submitter ? y.submitter(e) : d(ae, null, j(e) ? e : {
|
|
175
180
|
default: () => [e]
|
|
176
181
|
})]
|
|
177
182
|
});
|
|
178
183
|
});
|
|
179
|
-
function
|
|
184
|
+
function A() {
|
|
180
185
|
var e, t;
|
|
181
|
-
(t = (e =
|
|
186
|
+
(t = (e = m.value) == null ? void 0 : e.onResize) == null || t.call(e), document.addEventListener("mousemove", T), document.addEventListener("mouseup", O);
|
|
182
187
|
}
|
|
183
|
-
function
|
|
184
|
-
const t =
|
|
188
|
+
function T(e) {
|
|
189
|
+
const t = l(m), i = (document.body.offsetWidth || 1e3) - (e.clientX - document.body.offsetLeft), s = (t == null ? void 0 : t.minWidth) ?? (n.width || 800), r = (t == null ? void 0 : t.maxWidth) ?? window.innerWidth * 0.8;
|
|
185
190
|
let o = i;
|
|
186
|
-
i <
|
|
191
|
+
i < s && (o = s), i > r && (o = r), f.value = o;
|
|
187
192
|
}
|
|
188
|
-
function
|
|
189
|
-
document.removeEventListener("mousemove",
|
|
193
|
+
function O() {
|
|
194
|
+
document.removeEventListener("mousemove", T), document.removeEventListener("mouseup", O);
|
|
190
195
|
}
|
|
191
|
-
function
|
|
196
|
+
function X() {
|
|
192
197
|
var e, t, i;
|
|
193
|
-
n.submitter !== !1 && ((e =
|
|
198
|
+
n.submitter !== !1 && ((e = a.value) == null || e.resetFields(), (i = (t = n.submitter) == null ? void 0 : t.onReset) == null || i.call(t));
|
|
194
199
|
}
|
|
195
|
-
async function
|
|
196
|
-
var e, t, i,
|
|
200
|
+
async function G() {
|
|
201
|
+
var e, t, i, s;
|
|
197
202
|
if (n.submitter !== !1)
|
|
198
203
|
try {
|
|
199
|
-
const r = await ((e =
|
|
204
|
+
const r = await ((e = a.value) == null ? void 0 : e.validateFields());
|
|
200
205
|
(i = (t = n.submitter) == null ? void 0 : t.onSubmit) == null || i.call(t), u.value = !0;
|
|
201
|
-
const o = (
|
|
206
|
+
const o = (s = n.onFinish) == null ? void 0 : s.call(n, ce(r));
|
|
202
207
|
if (n.submitTimeout && o instanceof Promise) {
|
|
203
|
-
const
|
|
208
|
+
const J = setTimeout(() => u.value = !1, n.submitTimeout);
|
|
204
209
|
o.finally(() => {
|
|
205
|
-
clearTimeout(
|
|
210
|
+
clearTimeout(J), u.value = !1;
|
|
206
211
|
});
|
|
207
212
|
}
|
|
208
|
-
await o &&
|
|
213
|
+
await o && h(!1);
|
|
209
214
|
} finally {
|
|
210
215
|
u.value = !1;
|
|
211
216
|
}
|
|
212
217
|
}
|
|
213
|
-
function
|
|
214
|
-
|
|
218
|
+
function R() {
|
|
219
|
+
l(u) || h(!1);
|
|
215
220
|
}
|
|
216
|
-
function
|
|
217
|
-
!e &&
|
|
221
|
+
function H(e) {
|
|
222
|
+
!e && l(u) || h(e);
|
|
218
223
|
}
|
|
219
|
-
return
|
|
224
|
+
return E({
|
|
220
225
|
resetFields: () => {
|
|
221
226
|
var e;
|
|
222
|
-
(e =
|
|
227
|
+
(e = a.value) == null || e.resetFields();
|
|
223
228
|
},
|
|
224
229
|
clearValidate: (e) => {
|
|
225
230
|
var t;
|
|
226
|
-
(t =
|
|
231
|
+
(t = a.value) == null || t.clearValidate(e);
|
|
227
232
|
},
|
|
228
233
|
validateFields: (e, t) => {
|
|
229
234
|
var i;
|
|
230
|
-
return (i =
|
|
235
|
+
return (i = a.value) == null ? void 0 : i.validateFields(e, t);
|
|
231
236
|
},
|
|
232
237
|
getFieldsValue: (e) => {
|
|
233
238
|
var t;
|
|
234
|
-
return (t =
|
|
239
|
+
return (t = a.value) == null ? void 0 : t.getFieldsValue(e);
|
|
235
240
|
},
|
|
236
241
|
validate: (e, t) => {
|
|
237
242
|
var i;
|
|
238
|
-
return (i =
|
|
243
|
+
return (i = a.value) == null ? void 0 : i.validate(e, t);
|
|
239
244
|
},
|
|
240
245
|
scrollToField: (e, t = {}) => {
|
|
241
246
|
var i;
|
|
242
|
-
(i =
|
|
247
|
+
(i = a.value) == null || i.scrollToField(e, t);
|
|
243
248
|
},
|
|
244
249
|
setFieldValue: (e, t) => {
|
|
245
|
-
var i,
|
|
246
|
-
(
|
|
250
|
+
var i, s;
|
|
251
|
+
(s = (i = a.value) == null ? void 0 : i.setFieldValue) == null || s.call(i, e, t);
|
|
247
252
|
},
|
|
248
253
|
setFieldsValue: (e) => {
|
|
249
254
|
var t, i;
|
|
250
|
-
if (!
|
|
251
|
-
|
|
255
|
+
if (!a.value) {
|
|
256
|
+
p.value = e;
|
|
252
257
|
return;
|
|
253
258
|
}
|
|
254
|
-
(i = (t =
|
|
259
|
+
(i = (t = a.value) == null ? void 0 : t.setFieldsValue) == null || i.call(t, e);
|
|
255
260
|
},
|
|
256
261
|
getInternalInstance: (e) => {
|
|
257
262
|
var t;
|
|
258
|
-
return (t =
|
|
263
|
+
return (t = a.value) == null ? void 0 : t.getInternalInstance(e);
|
|
259
264
|
}
|
|
260
|
-
}), (e, t) => (
|
|
261
|
-
open:
|
|
262
|
-
"onUpdate:open":
|
|
263
|
-
onCancel:
|
|
264
|
-
width:
|
|
265
|
+
}), (e, t) => (g(), P(ee, null, [d(l(se), b(e.drawerProps, {
|
|
266
|
+
open: l(C),
|
|
267
|
+
"onUpdate:open": H,
|
|
268
|
+
onCancel: R,
|
|
269
|
+
width: f.value
|
|
265
270
|
}), {
|
|
266
|
-
title:
|
|
267
|
-
footer:
|
|
268
|
-
default:
|
|
271
|
+
title: F(() => [M(e.$slots, "title", {}, () => [te(ie(n.title), 1)])]),
|
|
272
|
+
footer: F(() => [(g(), S(_(I.value)))]),
|
|
273
|
+
default: F(() => [d(ve, b({
|
|
269
274
|
ref_key: "formRef",
|
|
270
|
-
ref:
|
|
271
|
-
},
|
|
272
|
-
default:
|
|
275
|
+
ref: a
|
|
276
|
+
}, l(me)(n, ["drawerProps", "open", "onUpdate:open", "title", "width", "onFinish", "submitter"])), {
|
|
277
|
+
default: F(() => [M(e.$slots, "default")]),
|
|
273
278
|
_: 3
|
|
274
|
-
}, 16), e.resize ? (
|
|
279
|
+
}, 16), e.resize ? (g(), P("div", {
|
|
275
280
|
key: 0,
|
|
276
|
-
class:
|
|
277
|
-
onMousedown:
|
|
278
|
-
}, null, 34)) :
|
|
281
|
+
class: ne(q.value),
|
|
282
|
+
onMousedown: oe(A, ["stop", "prevent"])
|
|
283
|
+
}, null, 34)) : L("", !0)]),
|
|
279
284
|
_: 3
|
|
280
|
-
}, 16, ["open", "width"]),
|
|
285
|
+
}, 16, ["open", "width"]), l(k) ? (g(), S(_(l(k)), {
|
|
281
286
|
key: 0
|
|
282
|
-
})) :
|
|
287
|
+
})) : L("", !0)], 64));
|
|
283
288
|
}
|
|
284
289
|
});
|
|
285
290
|
export {
|
|
286
|
-
|
|
291
|
+
Ee as default
|
|
287
292
|
};
|