asiaint-lowcode 3.0.18 → 3.0.20

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 (35) hide show
  1. package/dist/asiaint-lowcode.js +5 -5
  2. package/dist/asiaint-lowcode.umd.cjs +132 -132
  3. package/dist/index.d.ts +9 -81
  4. package/dist/lazy/{Card-BZBVb7aE.js → Card-Bne8hKf_.js} +1 -1
  5. package/dist/lazy/{Cascader-B4lz7iK6.js → Cascader-Dx2zWmTz.js} +1 -1
  6. package/dist/lazy/{Checkbox-Bynb0NT0.js → Checkbox-CA6KM4FC.js} +2 -2
  7. package/dist/lazy/{Collapse-G30hqmNm.js → Collapse-BJDKB5YO.js} +1 -1
  8. package/dist/lazy/{Component-CPdFFbsj.js → Component-CDr7HbSm.js} +1 -1
  9. package/dist/lazy/{Component-fNOhYdFv.js → Component-DqVp3K0h.js} +1 -1
  10. package/dist/lazy/{Component-B0hYH3vU.js → Component-DrhyApcI.js} +1 -1
  11. package/dist/lazy/{Component-CWNB0Jlu.js → Component-VTV1gteG.js} +1 -1
  12. package/dist/lazy/{Component-DPvjrsCR.js → Component-bLrPrFUd.js} +1 -1
  13. package/dist/lazy/{Component-BeSgMnB2.js → Component-eeXz6daT.js} +1 -1
  14. package/dist/lazy/CurdCard-C6gI7wmm.js +136 -0
  15. package/dist/lazy/{Custom-iAQ_31Jp.js → Custom-tlI13tso.js} +1 -1
  16. package/dist/lazy/{FormList-paORw3Fb.js → FormList-PEPeABIK.js} +1 -1
  17. package/dist/lazy/{Grid-CAcJjpEy.js → Grid-Dl1sitD5.js} +1 -1
  18. package/dist/lazy/{Inline-Dtx-csTe.js → Inline-5AXoh0Dy.js} +1 -1
  19. package/dist/lazy/{JsonEdit-CvdrWLHq.js → JsonEdit-CQhtFaMM.js} +1 -1
  20. package/dist/lazy/{ObjGroup-Cjz4SzvJ.js → ObjGroup-DHmVfpyI.js} +1 -1
  21. package/dist/lazy/{OfferDetails-BGoovbJm.js → OfferDetails-D27JKH31.js} +43 -43
  22. package/dist/lazy/{Radio-DKzZn31G.js → Radio-qZe3BPR2.js} +2 -2
  23. package/dist/lazy/{SearchSelect-B1YX-Ao2.js → SearchSelect-C1LoYowg.js} +2 -2
  24. package/dist/lazy/{Select-p4eyst_E.js → Select-DK8LYL5I.js} +2 -2
  25. package/dist/lazy/Table-C_05Yepo.js +294 -0
  26. package/dist/lazy/{Tabs-10OyFGmb.js → Tabs-C8RqJeA1.js} +1 -1
  27. package/dist/lazy/{Wrapper-DauMa47J.js → Wrapper-yuE53Dg_.js} +1 -1
  28. package/dist/lazy/{index-DMmaR_UH.js → index-GtzBrb0u.js} +6916 -6677
  29. package/dist/lazy/{useSelect-BsvU-jJC.js → useSelect-DHjiJUFb.js} +1 -1
  30. package/dist/style.css +2 -2
  31. package/package.json +1 -1
  32. package/dist/lazy/CardList-DwWiAo9-.js +0 -108
  33. package/dist/lazy/CardListItem-yhIgxbTe.js +0 -85
  34. package/dist/lazy/CurdCard-B7bGNxEj.js +0 -107
  35. package/dist/lazy/Table-CuJVitWt.js +0 -279
@@ -0,0 +1,294 @@
1
+ import { defineComponent as ge, inject as B, ref as f, useTemplateRef as he, readonly as fe, toRefs as ye, onUnmounted as me, resolveComponent as b, openBlock as c, createElementBlock as w, normalizeClass as _, withDirectives as V, createElementVNode as y, createVNode as m, unref as p, withCtx as u, createBlock as z, createCommentVNode as C, Fragment as R, renderList as $, toDisplayString as N, withModifiers as Ce, createTextVNode as ve, vShow as F, mergeProps as ke } from "vue";
2
+ import { $ as we, h as ze, _ as Se, f as be, I as Re, C as Be, b as _e } from "./index-GtzBrb0u.js";
3
+ import { ElTable as Ne } from "element-plus";
4
+ const Pe = { class: "empty-content" }, De = { class: "text-ellipsis" }, Te = { class: "text-ellipsis" }, Me = /* @__PURE__ */ ge({
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
+ defaultPageSize: {},
28
+ typeSwitch: { type: Boolean },
29
+ displayType: { default: "table" },
30
+ onMounted: {},
31
+ name: {}
32
+ },
33
+ setup(U, { expose: j }) {
34
+ const n = U, d = B("ruleModule", void 0), g = B("pageMethodMap", {}), P = B(we), S = P ? P.translateFn : null, v = f(), H = (e, t, a) => {
35
+ s.value[e] && (s.value[e][t] = a);
36
+ }, K = (e, t) => {
37
+ const a = n.columns.find((l) => l.key === e);
38
+ a && (a.hidden = !t);
39
+ }, L = (e, t, a) => {
40
+ try {
41
+ d[e.onClick](g, t, a);
42
+ } catch (l) {
43
+ console.error(l);
44
+ }
45
+ }, A = (e) => {
46
+ if (n.rowClick)
47
+ try {
48
+ d[n.rowClick](g, e);
49
+ } catch (t) {
50
+ console.error(t);
51
+ }
52
+ }, W = (e) => {
53
+ if (n.rowDbClick)
54
+ try {
55
+ d[n.rowDbClick](g, e);
56
+ } catch (t) {
57
+ console.error(t);
58
+ }
59
+ }, q = f([]), G = (e) => {
60
+ q.value = e;
61
+ }, I = () => {
62
+ var e;
63
+ (e = v.value) == null || e.clearSelection();
64
+ }, J = () => s.value, D = f(), O = (e) => {
65
+ if (D.value = e, !!n.handleCurrentChange)
66
+ try {
67
+ d[n.handleCurrentChange](g, e);
68
+ } catch (t) {
69
+ console.error(t);
70
+ }
71
+ }, Q = () => D.value, X = () => {
72
+ var e;
73
+ return (e = v.value) == null ? void 0 : e.getSelectionRows();
74
+ }, Y = async () => !0, Z = (e, t) => {
75
+ var l;
76
+ const a = (l = n.topBtns) == null ? void 0 : l.find((k) => k.key === e);
77
+ a && (a.hidden = t);
78
+ }, x = (e, t) => {
79
+ var l;
80
+ const a = (l = n.rowBtns) == null ? void 0 : l.find((k) => k.key === e);
81
+ a && (a.condition = !t);
82
+ }, T = f(0), ee = (e) => {
83
+ T.value = e;
84
+ }, r = f({ pageNum: 1, pageSize: n.defaultPageSize || 5 }), te = () => r.value, ne = (e) => {
85
+ let t = !1;
86
+ return e.pageNum > -1 && (r.value.pageNum !== e.pageNum && (t = !0), r.value.pageNum = e.pageNum), e.pageSize > -1 && (r.value.pageSize !== e.pageSize && (t = !0), r.value.pageSize = e.pageSize), { pagination: r.value, isChange: t };
87
+ }, ae = (e) => {
88
+ if (r.value.pageNum = 1, r.value.pageSize = e, !!n.sizeChange)
89
+ try {
90
+ d[n.sizeChange](g, r.value);
91
+ } catch (t) {
92
+ console.error(t);
93
+ }
94
+ }, oe = (e) => {
95
+ if (r.value.pageNum = e, !!n.pageChange)
96
+ try {
97
+ d[n.pageChange](g, r.value);
98
+ } catch (t) {
99
+ console.error(t);
100
+ }
101
+ }, le = (e) => {
102
+ var t;
103
+ (t = v.value) == null || t.setCurrentRow(e);
104
+ }, re = (e) => {
105
+ var t;
106
+ (t = v.value) == null || t.setCurrentRow(s.value[e]);
107
+ }, ie = (e, t, a) => {
108
+ n.columns.forEach((l) => {
109
+ l.key === e && l[t] && (l[t] = a);
110
+ });
111
+ }, s = f([]), se = (e) => {
112
+ s.value = e;
113
+ }, ce = (e = {}) => {
114
+ s.value.push(e);
115
+ }, ue = (e) => {
116
+ e >= 0 && e < s.value.length && s.value.splice(e, 1);
117
+ }, pe = async () => {
118
+ s.value = [...s.value];
119
+ }, M = he("rootRef"), E = fe({
120
+ ...ye(n),
121
+ setCellData: H,
122
+ clearSelection: I,
123
+ getData: J,
124
+ getCurrentRow: Q,
125
+ getSelectedRows: X,
126
+ addRow: ce,
127
+ deleteRow: ue,
128
+ refresh: pe,
129
+ validate: Y,
130
+ setData: se,
131
+ selectRow: le,
132
+ selectRowNum: re,
133
+ setTotal: ee,
134
+ getPagination: te,
135
+ setPagination: ne,
136
+ setTopBtnHidden: Z,
137
+ setColVisible: K,
138
+ setColumn: ie,
139
+ setRowsBtnHidden: x,
140
+ rootRef: M,
141
+ type: "table"
142
+ });
143
+ if (n.name) {
144
+ const e = ze(n.name, E);
145
+ me(() => {
146
+ e();
147
+ });
148
+ }
149
+ return j(E), (e, t) => {
150
+ const a = b("el-table-column"), l = b("el-tooltip"), k = b("el-button"), de = b("el-pagination");
151
+ return e.hidden ? C("", !0) : (c(), w("div", {
152
+ key: 0,
153
+ class: _(["table-render", { tableBorder: e.displayType === "table" }]),
154
+ ref_key: "rootRef",
155
+ ref: M
156
+ }, [
157
+ V(y("div", null, [
158
+ m(p(Ne), {
159
+ ref_key: "tableRef",
160
+ ref: v,
161
+ data: s.value,
162
+ "highlight-current-row": e.highlightCurrentRow,
163
+ "row-key": e.rowKey,
164
+ stripe: e.stripe,
165
+ onRowClick: A,
166
+ onRowDblclick: W,
167
+ onSelectionChange: G,
168
+ onCurrentChange: O,
169
+ height: 250
170
+ }, {
171
+ empty: u(() => [
172
+ y("div", Pe, [
173
+ m(p(Se), {
174
+ name: "tableEmpty",
175
+ style: { width: 56, height: 56 }
176
+ }),
177
+ t[2] || (t[2] = y("div", null, "No data available,please check", -1))
178
+ ])
179
+ ]),
180
+ default: u(() => [
181
+ e.multipleSelection ? (c(), z(a, {
182
+ key: 0,
183
+ type: "selection",
184
+ width: "55"
185
+ })) : C("", !0),
186
+ (c(!0), w(R, null, $(e.columns, (o) => (c(), w(R, {
187
+ key: o.key
188
+ }, [
189
+ o.hidden ? C("", !0) : (c(), z(a, {
190
+ key: 0,
191
+ prop: o.key,
192
+ "min-width": o.minWidth,
193
+ fixed: o.fixed || !1
194
+ }, {
195
+ header: u(() => [
196
+ m(l, {
197
+ class: "box-item",
198
+ effect: "dark",
199
+ content: o.label,
200
+ "show-after": 300,
201
+ placement: "top"
202
+ }, {
203
+ default: u(() => [
204
+ y("div", De, N(o.label), 1)
205
+ ]),
206
+ _: 2
207
+ }, 1032, ["content"])
208
+ ]),
209
+ default: u(({ row: h }) => [
210
+ m(l, {
211
+ class: "box-item",
212
+ effect: "dark",
213
+ content: p(S) ? p(S)(o.key, h) : h[o.key],
214
+ "show-after": 300,
215
+ placement: "top"
216
+ }, {
217
+ default: u(() => [
218
+ y("div", Te, N(p(S) ? p(S)(o.key, h) : h[o.key]), 1)
219
+ ]),
220
+ _: 2
221
+ }, 1032, ["content"])
222
+ ]),
223
+ _: 2
224
+ }, 1032, ["prop", "min-width", "fixed"]))
225
+ ], 64))), 128)),
226
+ e.rowBtns && e.rowBtns.length > 0 ? (c(), z(a, {
227
+ key: 1,
228
+ label: "Action",
229
+ fixed: "right",
230
+ align: "left"
231
+ }, {
232
+ default: u(({ row: o, $index: h }) => [
233
+ (c(!0), w(R, null, $(e.rowBtns, (i) => (c(), w(R, {
234
+ key: i.key
235
+ }, [
236
+ i.condition === void 0 || i.condition === null || p(be)(i.condition, { $row: o }) ? (c(), z(k, {
237
+ key: 0,
238
+ disabled: i.disabled,
239
+ link: "",
240
+ size: "small",
241
+ type: i.type,
242
+ onClick: Ce((Ee) => L(i, o, h), ["stop"])
243
+ }, {
244
+ default: u(() => [
245
+ i.icon ? (c(), z(Re, {
246
+ key: 0,
247
+ name: i.icon.name,
248
+ color: i.icon.color,
249
+ class: _({ "btn-icon": i.text || i.label })
250
+ }, null, 8, ["name", "color", "class"])) : C("", !0),
251
+ ve(" " + N(i.label), 1)
252
+ ]),
253
+ _: 2
254
+ }, 1032, ["disabled", "type", "onClick"])) : C("", !0)
255
+ ], 64))), 128))
256
+ ]),
257
+ _: 1
258
+ })) : C("", !0)
259
+ ]),
260
+ _: 1
261
+ }, 8, ["data", "highlight-current-row", "row-key", "stripe"])
262
+ ], 512), [
263
+ [F, e.displayType === "table"]
264
+ ]),
265
+ V(m(Be, ke({ data: s.value }, n), null, 16, ["data"]), [
266
+ [F, e.displayType === "card"]
267
+ ]),
268
+ y("div", {
269
+ class: _(["pagination-wrapper", {
270
+ hidePagination: e.hiddenPagination,
271
+ cardlistPadding: e.displayType === "card"
272
+ }])
273
+ }, [
274
+ m(de, {
275
+ background: "",
276
+ layout: "total,sizes, prev, pager, next,jumper",
277
+ total: T.value,
278
+ "page-sizes": e.pageSizes || [5, 10, 20, 30, 40],
279
+ "default-page-size": e.defaultPageSize,
280
+ "current-page": r.value.pageNum,
281
+ "onUpdate:currentPage": t[0] || (t[0] = (o) => r.value.pageNum = o),
282
+ "page-size": r.value.pageSize,
283
+ "onUpdate:pageSize": t[1] || (t[1] = (o) => r.value.pageSize = o),
284
+ onSizeChange: ae,
285
+ onCurrentChange: oe
286
+ }, null, 8, ["total", "page-sizes", "default-page-size", "current-page", "page-size"])
287
+ ], 2)
288
+ ], 2));
289
+ };
290
+ }
291
+ }), Ue = /* @__PURE__ */ _e(Me, [["__scopeId", "data-v-bed9d53a"]]);
292
+ export {
293
+ Ue as default
294
+ };
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as i, ref as m, watch as _, onMounted as h, resolveComponent as a, openBlock as l, createBlock as c, mergeProps as u, withCtx as d, createElementBlock as b, Fragment as v, renderList as y, createVNode as k, unref as K } from "vue";
2
- import { a as V } from "./index-DMmaR_UH.js";
2
+ import { a as V } from "./index-GtzBrb0u.js";
3
3
  import "element-plus";
4
4
  const w = /* @__PURE__ */ i({
5
5
  __name: "Tabs",
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as o, openBlock as r, createBlock as t, Transition as a, withCtx as l, withDirectives as n, createElementVNode as s, normalizeStyle as p, normalizeClass as i, createVNode as c, unref as m, vShow as f } from "vue";
2
- import { a as _, b as d } from "./index-DMmaR_UH.js";
2
+ import { a as _, b as d } from "./index-GtzBrb0u.js";
3
3
  import "element-plus";
4
4
  const y = /* @__PURE__ */ o({
5
5
  __name: "Wrapper",