asiaint-lowcode 3.0.75 → 3.1.0

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.
Files changed (37) hide show
  1. package/dist/asiaint-lowcode.js +3 -3
  2. package/dist/asiaint-lowcode.umd.cjs +141 -141
  3. package/dist/index.d.ts +139 -22
  4. package/dist/lazy/{Card-BL132uF0.js → Card-6y3b8xK9.js} +1 -1
  5. package/dist/lazy/{Cascader-BNajnGXt.js → Cascader-1XEBAirk.js} +2 -1
  6. package/dist/lazy/{Checkbox-CB78q85K.js → Checkbox-DY7Ufmrz.js} +8 -7
  7. package/dist/lazy/{Collapse-BT3Z_TeL.js → Collapse-BT7RNNg6.js} +1 -1
  8. package/dist/lazy/{Component-CVbGsSj6.js → Component-AYxGCLAH.js} +10 -10
  9. package/dist/lazy/{Component-OAYlB5bp.js → Component-BYlYtzWb.js} +1 -1
  10. package/dist/lazy/{Component-Cwe8AZcy.js → Component-CF4m_685.js} +1 -1
  11. package/dist/lazy/{Component-Dl3PXGm5.js → Component-CkSnYtMh.js} +1 -1
  12. package/dist/lazy/{Component-DdZRdqp7.js → Component-DITfSg2v.js} +1 -1
  13. package/dist/lazy/{Component-BNOSHXwG.js → Component-DZMCcrpa.js} +1 -1
  14. package/dist/lazy/{CurdCard-BrBulKvO.js → CurdCard-BXOxRtCA.js} +50 -44
  15. package/dist/lazy/{Custom-BliwSKbp.js → Custom-Df5H1QJV.js} +1 -1
  16. package/dist/lazy/{DragList-Buw-1bQc.js → DragList-BH1VY62B.js} +35 -34
  17. package/dist/lazy/{FormList-DTdAAtrD.js → FormList-BMk_lCx8.js} +1 -1
  18. package/dist/lazy/{Grid-DUAIHsOo.js → Grid-SVpxXRzO.js} +1 -1
  19. package/dist/lazy/{Inline-BkAIXUU0.js → Inline-CE2A9Of4.js} +1 -1
  20. package/dist/lazy/{JsonEdit-Bx4jK-K8.js → JsonEdit-C_CUvw5t.js} +1 -1
  21. package/dist/lazy/{LogList-DHk7eKeC.js → LogList-COeBYixP.js} +1 -1
  22. package/dist/lazy/{ObjGroup-DXJerzS2.js → ObjGroup-BB2eQigf.js} +1 -1
  23. package/dist/lazy/{OfferDetails-Fs5y40J0.js → OfferDetails-BEyNKQsf.js} +29 -28
  24. package/dist/lazy/{Progress-pRaKkFkw.js → Progress-CYBbCXFh.js} +1 -1
  25. package/dist/lazy/{Radio-C9Z-5npS.js → Radio-qI1r_rWj.js} +8 -7
  26. package/dist/lazy/{SearchSelect-BU-_DOLr.js → SearchSelect-ZmOPM_QH.js} +15 -14
  27. package/dist/lazy/{Select-DJ6Ky5mO.js → Select-CxtVmfLu.js} +10 -9
  28. package/dist/lazy/Table-YeT82lnr.js +438 -0
  29. package/dist/lazy/{Tabs-meM_0XCE.js → Tabs-DFvfP_nb.js} +1 -1
  30. package/dist/lazy/Wrapper-DAFSrkAr.js +87 -0
  31. package/dist/lazy/{index-2Lph8ou3.js → index-DQ889qV3.js} +9667 -9397
  32. package/dist/lazy/useSelect-EfaZqc6a.js +77 -0
  33. package/dist/style.css +2 -2
  34. package/package.json +1 -1
  35. package/dist/lazy/Table-BlBWSnrv.js +0 -351
  36. package/dist/lazy/Wrapper-DlG2aZRe.js +0 -36
  37. package/dist/lazy/useSelect-CmUZu1rN.js +0 -76
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "asiaint-lowcode",
3
- "version": "3.0.75",
3
+ "version": "3.1.0",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "scripts": {
@@ -1,351 +0,0 @@
1
- import { defineComponent as Se, computed as _, inject as k, ref as v, useTemplateRef as ze, readonly as Be, toRefs as Re, onMounted as Pe, nextTick as _e, onActivated as Ne, onUnmounted as Me, resolveComponent as B, openBlock as u, createElementBlock as g, normalizeClass as N, withDirectives as j, createElementVNode as f, createVNode as b, unref as R, withCtx as h, createBlock as S, createCommentVNode as m, Fragment as P, renderList as G, toDisplayString as M, withModifiers as Te, vShow as H, mergeProps as De } from "vue";
2
- import { $ as $e, f as K, i as Fe, _ as Ee, I as Ae, C as Le, b as Ve } from "./index-2Lph8ou3.js";
3
- import { ElTable as Ue, ElLoading as W } from "element-plus";
4
- const je = ["id"], Ge = { class: "empty-content" }, He = ["title"], Ke = ["title", "onClick"], We = ["title"], qe = { class: "row-btn-wrapper" }, Ie = /* @__PURE__ */ Se({
5
- __name: "Table",
6
- props: {
7
- title: {},
8
- key: {},
9
- rulePath: {},
10
- rowKey: {},
11
- showDynamicSearch: { type: Boolean },
12
- multipleSelection: { type: Boolean },
13
- highlightCurrentRow: { type: Boolean },
14
- "highlight-current-row": { type: Boolean },
15
- stripe: { type: Boolean },
16
- rowClick: {},
17
- rowDbClick: {},
18
- sizeChange: {},
19
- pageChange: {},
20
- topBtns: {},
21
- rowBtns: {},
22
- columns: {},
23
- hidden: { type: Boolean },
24
- hiddenPagination: { type: Boolean },
25
- handleCurrentChange: {},
26
- pageSizes: {},
27
- pagerCount: {},
28
- defaultPageSize: {},
29
- typeSwitch: { type: Boolean },
30
- displayType: { default: "table" },
31
- onMounted: {},
32
- onActivated: {},
33
- height: {},
34
- collapsible: { type: Boolean },
35
- name: {}
36
- },
37
- setup(q, { expose: I }) {
38
- const n = q, z = _(() => n.displayType ? n.displayType : n.typeSwitch ? "card" : "table"), J = k("ruleModule", void 0), T = k("ruleMap", void 0), c = _(() => n.rulePath && T[n.rulePath] ? T[n.rulePath] : J), d = k("pageMethodMap", {}), D = k("getGlobalParams", () => {
39
- }), $ = k($e), F = $ ? $.translateFn : null, y = v(), O = (e, t, a) => {
40
- i.value[e] && (i.value[e][t] = a);
41
- }, Q = (e, t) => {
42
- const a = n.columns.find((l) => l.key === e);
43
- a && (a.hidden = !t);
44
- }, E = (e, t, a) => {
45
- try {
46
- c.value[e.onClick](d, t, a);
47
- } catch (l) {
48
- console.error(l);
49
- }
50
- }, X = (e) => {
51
- if (n.rowClick)
52
- try {
53
- c.value[n.rowClick](d, e);
54
- } catch (t) {
55
- console.error(t);
56
- }
57
- }, Y = (e) => {
58
- if (n.rowDbClick)
59
- try {
60
- c.value[n.rowDbClick](d, e);
61
- } catch (t) {
62
- console.error(t);
63
- }
64
- }, Z = v([]), x = (e) => {
65
- Z.value = e;
66
- }, ee = () => {
67
- var e;
68
- (e = y.value) == null || e.clearSelection();
69
- }, te = () => i.value, A = v(), ne = (e) => {
70
- if (A.value = e, !!n.handleCurrentChange)
71
- try {
72
- c.value[n.handleCurrentChange](d, e);
73
- } catch (t) {
74
- console.error(t);
75
- }
76
- }, ae = () => A.value, oe = () => {
77
- var e;
78
- return (e = y.value) == null ? void 0 : e.getSelectionRows();
79
- }, le = async () => !0, ie = (e, t) => {
80
- var l;
81
- const a = (l = n.topBtns) == null ? void 0 : l.find((w) => w.key === e);
82
- a && (a.hidden = t);
83
- }, re = (e, t) => {
84
- var l;
85
- const a = (l = n.rowBtns) == null ? void 0 : l.find((w) => w.key === e);
86
- a && (a.condition = !t);
87
- }, L = v(0), se = (e) => {
88
- L.value = e;
89
- }, r = v({ pageNum: 1, pageSize: n.defaultPageSize || 5 }), ue = () => r.value, ce = (e) => {
90
- let t = !1;
91
- return e.pageNum !== void 0 && e.pageNum > -1 && (r.value.pageNum !== e.pageNum && (t = !0), r.value.pageNum = e.pageNum), e.pageSize !== void 0 && e.pageSize > -1 && (r.value.pageSize !== e.pageSize && (t = !0), r.value.pageSize = e.pageSize), { pagination: r.value, isChange: t };
92
- }, de = async (e) => {
93
- if (r.value.pageNum = 1, r.value.pageSize = e, !n.sizeChange)
94
- return;
95
- const t = W.service({
96
- target: `#${n.name}`,
97
- text: "Loading..."
98
- });
99
- try {
100
- await c.value[n.sizeChange](d, r.value);
101
- } catch (a) {
102
- console.error(a);
103
- } finally {
104
- t.close();
105
- }
106
- }, pe = async (e) => {
107
- if (r.value.pageNum = e, !n.pageChange)
108
- return;
109
- const t = W.service({
110
- target: `#${n.name}`,
111
- text: "Loading..."
112
- });
113
- try {
114
- await c.value[n.pageChange](d, r.value);
115
- } catch (a) {
116
- console.error(a);
117
- } finally {
118
- t.close();
119
- }
120
- }, ge = (e) => {
121
- var t;
122
- (t = y.value) == null || t.setCurrentRow(e);
123
- }, he = (e) => {
124
- var t;
125
- (t = y.value) == null || t.setCurrentRow(i.value[e]);
126
- }, ve = (e, t, a) => {
127
- n.columns.forEach((l) => {
128
- l.key === e && l[t] && (l[t] = a);
129
- });
130
- }, i = v([]), fe = (e) => {
131
- i.value = e;
132
- }, me = (e = {}) => {
133
- i.value.push(e);
134
- }, ye = (e) => {
135
- e >= 0 && e < i.value.length && i.value.splice(e, 1);
136
- }, Ce = async () => {
137
- i.value = [...i.value];
138
- }, V = ze("rootRef"), U = Be({
139
- ...Re(n),
140
- setCellData: O,
141
- clearSelection: ee,
142
- getData: te,
143
- getCurrentRow: ae,
144
- getSelectedRows: oe,
145
- addRow: me,
146
- deleteRow: ye,
147
- refresh: Ce,
148
- validate: le,
149
- setData: fe,
150
- selectRow: ge,
151
- selectRowNum: he,
152
- setTotal: se,
153
- getPagination: ue,
154
- setPagination: ce,
155
- setTopBtnHidden: ie,
156
- setColVisible: Q,
157
- setColumn: ve,
158
- setRowsBtnHidden: re,
159
- rootRef: V,
160
- type: "table"
161
- }), C = (e, t) => {
162
- const a = F ? F(e.key, t) : t[e.key];
163
- if (!e.encrypted || !a)
164
- return a;
165
- const l = `${a}`;
166
- return l.length <= 4 ? "*".repeat(l.length) : l.slice(0, -4) + "****";
167
- }, we = _(() => !n.rowBtns || n.rowBtns.length === 0 || !i.value || i.value.length === 0 ? !1 : i.value.some(
168
- (e) => {
169
- var t;
170
- return (t = n.rowBtns) == null ? void 0 : t.some((a) => a.condition === void 0 || a.condition === null ? !0 : K(a.condition, {
171
- $row: e,
172
- $globalParams: D()
173
- }));
174
- }
175
- ));
176
- if (Pe(async () => {
177
- if (!n.onMounted || !c.value)
178
- return;
179
- await _e();
180
- const e = n.onMounted;
181
- try {
182
- c.value[e](d);
183
- } catch (t) {
184
- console.error(t);
185
- }
186
- }), Ne(() => {
187
- if (!n.onActivated || !c.value)
188
- return;
189
- const e = n.onActivated;
190
- try {
191
- c.value[e](d);
192
- } catch (t) {
193
- console.error(t);
194
- }
195
- }), n.name) {
196
- const e = Fe(n.name, U);
197
- Me(() => {
198
- e();
199
- });
200
- }
201
- return I(U), (e, t) => {
202
- const a = B("el-table-column"), l = B("el-tooltip"), w = B("el-button"), ke = B("el-pagination");
203
- return e.hidden ? m("", !0) : (u(), g("div", {
204
- key: 0,
205
- class: N(["table-render", { tableBorder: z.value === "table" }]),
206
- ref_key: "rootRef",
207
- ref: V,
208
- id: e.name
209
- }, [
210
- j(f("div", null, [
211
- b(R(Ue), {
212
- ref_key: "tableRef",
213
- ref: y,
214
- data: i.value,
215
- "highlight-current-row": "",
216
- "row-key": e.rowKey,
217
- stripe: e.stripe,
218
- "show-overflow-tooltip": "",
219
- onRowClick: X,
220
- onRowDblclick: Y,
221
- onSelectionChange: x,
222
- onCurrentChange: ne,
223
- height: e.height
224
- }, {
225
- empty: h(() => [
226
- f("div", Ge, [
227
- b(R(Ee), {
228
- name: "tableEmpty",
229
- style: { width: 56, height: 56 }
230
- }),
231
- t[2] || (t[2] = f("div", null, "No data available,please check", -1))
232
- ])
233
- ]),
234
- default: h(() => [
235
- e.multipleSelection ? (u(), S(a, {
236
- key: 0,
237
- type: "selection",
238
- width: "55"
239
- })) : m("", !0),
240
- (u(!0), g(P, null, G(e.columns, (o) => (u(), g(P, {
241
- key: o.key
242
- }, [
243
- o.hidden ? m("", !0) : (u(), S(a, {
244
- key: 0,
245
- prop: o.key,
246
- "min-width": o.minWidth,
247
- fixed: o.fixed || !1
248
- }, {
249
- header: h(() => [
250
- f("div", {
251
- class: "text-ellipsis",
252
- title: o.label
253
- }, M(o.label), 9, He)
254
- ]),
255
- default: h(({ row: p, $index: s }) => [
256
- o.type === "link" ? (u(), g("div", {
257
- key: 0,
258
- class: N(["text-ellipsis link-style", { "click-style": o.onClick }]),
259
- title: C(o, p),
260
- onClick: (be) => E(o, p, s)
261
- }, M(C(o, p)), 11, Ke)) : (u(), g("div", {
262
- key: 1,
263
- class: "text-ellipsis",
264
- title: C(o, p)
265
- }, M(C(o, p)), 9, We))
266
- ]),
267
- _: 2
268
- }, 1032, ["prop", "min-width", "fixed"]))
269
- ], 64))), 128)),
270
- we.value && e.rowBtns && e.rowBtns.length > 0 ? (u(), S(a, {
271
- key: 1,
272
- label: "Action",
273
- fixed: "right",
274
- align: "left",
275
- width: e.rowBtns.length * 34 + 12 > 100 ? e.rowBtns.length * 34 + 12 : 100
276
- }, {
277
- default: h(({ row: o, $index: p }) => [
278
- f("div", qe, [
279
- (u(!0), g(P, null, G(e.rowBtns, (s) => (u(), g(P, {
280
- key: s.key
281
- }, [
282
- s.condition === void 0 || s.condition === null || R(K)(s.condition, { $row: o, $globalParams: R(D)() }) ? (u(), S(w, {
283
- key: 0,
284
- disabled: s.disabled,
285
- link: "",
286
- size: "small",
287
- type: s.type,
288
- onClick: Te((be) => E(s, o, p), ["stop"])
289
- }, {
290
- default: h(() => [
291
- b(l, {
292
- class: "box-item",
293
- effect: "dark",
294
- content: s.label,
295
- placement: "top",
296
- "popper-class": "low-tsp"
297
- }, {
298
- default: h(() => [
299
- s.icon ? (u(), S(Ae, {
300
- key: 0,
301
- name: s.icon.name,
302
- color: s.icon.color
303
- }, null, 8, ["name", "color"])) : m("", !0)
304
- ]),
305
- _: 2
306
- }, 1032, ["content"])
307
- ]),
308
- _: 2
309
- }, 1032, ["disabled", "type", "onClick"])) : m("", !0)
310
- ], 64))), 128))
311
- ])
312
- ]),
313
- _: 1
314
- }, 8, ["width"])) : m("", !0)
315
- ]),
316
- _: 1
317
- }, 8, ["data", "row-key", "stripe", "height"])
318
- ], 512), [
319
- [H, z.value === "table"]
320
- ]),
321
- j(b(Le, De({ data: i.value }, n, { getColText: C }), null, 16, ["data"]), [
322
- [H, z.value === "card"]
323
- ]),
324
- f("div", {
325
- class: N(["pagination-wrapper", {
326
- hidePagination: (e.hiddenPagination || i.value.length === 0) && !e.height,
327
- transparentPagination: (e.hiddenPagination || i.value.length === 0) && e.height,
328
- cardlistPadding: z.value === "card"
329
- }])
330
- }, [
331
- b(ke, {
332
- layout: "total,sizes, prev, pager, next,jumper",
333
- total: L.value,
334
- "page-sizes": e.pageSizes || [5, 10, 20, 30, 40],
335
- "default-page-size": e.defaultPageSize,
336
- "current-page": r.value.pageNum,
337
- "onUpdate:currentPage": t[0] || (t[0] = (o) => r.value.pageNum = o),
338
- "page-size": r.value.pageSize,
339
- "onUpdate:pageSize": t[1] || (t[1] = (o) => r.value.pageSize = o),
340
- "pager-count": e.pagerCount,
341
- onSizeChange: de,
342
- onCurrentChange: pe
343
- }, null, 8, ["total", "page-sizes", "default-page-size", "current-page", "page-size", "pager-count"])
344
- ], 2)
345
- ], 10, je));
346
- };
347
- }
348
- }), Xe = /* @__PURE__ */ Ve(Ie, [["__scopeId", "data-v-937016b7"]]);
349
- export {
350
- Xe as default
351
- };
@@ -1,36 +0,0 @@
1
- import { defineComponent as t, resolveComponent as n, openBlock as a, createElementBlock as r, normalizeStyle as s, createVNode as l, withCtx as p, withDirectives as i, createElementVNode as c, normalizeClass as m, unref as _, vShow as d } from "vue";
2
- import { a as y, b as f } from "./index-2Lph8ou3.js";
3
- import "element-plus";
4
- const u = /* @__PURE__ */ t({
5
- __name: "Wrapper",
6
- props: {
7
- children: {},
8
- style: { type: [Boolean, null, String, Object, Array] },
9
- type: {},
10
- collapse: { type: Boolean }
11
- },
12
- setup(h) {
13
- return (e, v) => {
14
- const o = n("el-collapse-transition");
15
- return a(), r("div", {
16
- style: s(e.style)
17
- }, [
18
- l(o, null, {
19
- default: p(() => [
20
- i(c("div", {
21
- class: m({ normal: e.type === "normal", onlytable: e.type === "onlytable" })
22
- }, [
23
- l(_(y), { list: e.children }, null, 8, ["list"])
24
- ], 2), [
25
- [d, !e.collapse]
26
- ])
27
- ]),
28
- _: 1
29
- })
30
- ], 4);
31
- };
32
- }
33
- }), w = /* @__PURE__ */ f(u, [["__scopeId", "data-v-cde87480"]]);
34
- export {
35
- w as default
36
- };
@@ -1,76 +0,0 @@
1
- import { inject as I, ref as h, toRaw as y, onMounted as S, watch as r } from "vue";
2
- import { $ as D, u as P, l as F, h as g } from "./index-2Lph8ou3.js";
3
- import "element-plus";
4
- const q = () => {
5
- const { fetchOptionsFn: e } = I(D);
6
- return e;
7
- }, $ = (e) => {
8
- const s = P(), c = q(), a = h([]), u = h(!1);
9
- let m = 0;
10
- const l = F.debounce(async () => {
11
- if (!c || !e.apiParams || Object.values(e.apiParams).some((n) => n === void 0))
12
- return;
13
- u.value = !0;
14
- const t = ++m;
15
- try {
16
- const n = await c({
17
- formItemProps: y(e),
18
- formSchema: y(s.schema)
19
- });
20
- if (t !== m)
21
- return;
22
- if (a.value = [...n], e.filters && (a.value = a.value.filter((i) => Array.isArray(e.filters) ? !e.filters.includes(i[e.valueKey || "value"]) : !0)), e.name) {
23
- const i = g(s.schema.items, e.name);
24
- i && i.props && (i.props.options = a.value);
25
- }
26
- if (e.refreshFlag && a.value.length >= 1) {
27
- s.updateFormValues(
28
- {
29
- [`${e.name}`]: a.value[0][e.valueKey || "value"]
30
- },
31
- !0
32
- );
33
- const i = g(s.schema.items, e.name);
34
- i && i.props && (i.props.refreshFlag = !1);
35
- }
36
- } finally {
37
- u.value = !1;
38
- }
39
- }, 300);
40
- S(() => {
41
- const { mode: t, options: n = [] } = e;
42
- t === "static" && (a.value = n), t === "remote" && l();
43
- }), r(
44
- () => e.apiParams,
45
- (t, n) => {
46
- F.isEqual(t, n) || (a.value = [], l());
47
- }
48
- ), r(
49
- () => e.options,
50
- (t = []) => {
51
- e.mode === "static" && (a.value = t);
52
- }
53
- ), r(
54
- () => e.mode,
55
- (t) => {
56
- t === "static" && (a.value = e.options || []), t === "remote" && (a.value = [], l());
57
- }
58
- );
59
- const { mode: A, dependentFields: d } = e;
60
- if (A === "remote" && Array.isArray(d))
61
- for (const t of d)
62
- r(
63
- () => s.formValues[t],
64
- (n, i) => {
65
- l();
66
- }
67
- );
68
- return { selectChange: (t) => {
69
- const { valueKey: n = "value", multiple: i, name: v } = e;
70
- let f = {};
71
- i && Array.isArray(t) ? f = a.value.filter((o) => t.includes(o[n])) : f = a.value.find((o) => o[n] === t) || {}, s.selectData && v && s.updateSelectData(v, f);
72
- }, currentOptions: a, loading: u, fetchData: l };
73
- };
74
- export {
75
- $ as u
76
- };