asiaint-lowcode 3.0.23 → 3.0.25

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