asiaint-lowcode 3.0.40 → 3.0.42

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 +1 -1
  2. package/dist/asiaint-lowcode.umd.cjs +102 -102
  3. package/dist/index.d.ts +1 -0
  4. package/dist/lazy/{Card-CA_08riQ.js → Card-S2rqo_c1.js} +1 -1
  5. package/dist/lazy/{Cascader-YyqC92gQ.js → Cascader-B6o29F5o.js} +1 -1
  6. package/dist/lazy/Checkbox-DkV1ImsU.js +73 -0
  7. package/dist/lazy/{Collapse-DNv0HvCW.js → Collapse-BtnFY-rS.js} +1 -1
  8. package/dist/lazy/{Component-Dx_lHHnl.js → Component-Bec8N2fA.js} +1 -1
  9. package/dist/lazy/{Component-CSl1tuGt.js → Component-Bs3NxQX9.js} +1 -1
  10. package/dist/lazy/Component-Czzp1aIm.js +120 -0
  11. package/dist/lazy/{Component-DlHkxO96.js → Component-D1zd9pWu.js} +1 -1
  12. package/dist/lazy/{Component-dtCmd_35.js → Component-DL_1RCsk.js} +1 -1
  13. package/dist/lazy/{Component-C06SxmxT.js → Component-D_nNEscB.js} +1 -1
  14. package/dist/lazy/{CurdCard-CWg4r5hp.js → CurdCard-BtTbeVIr.js} +1 -1
  15. package/dist/lazy/{Custom-k7vvQzoi.js → Custom-DEeXXg0w.js} +1 -1
  16. package/dist/lazy/{FormList-D-P_JtvM.js → FormList-gRNISlkD.js} +1 -1
  17. package/dist/lazy/{Grid-BnQjnLAe.js → Grid-DrM36LeN.js} +1 -1
  18. package/dist/lazy/{Inline-zVzAJcSO.js → Inline-Db1FhCHc.js} +1 -1
  19. package/dist/lazy/{JsonEdit-BUu-39a6.js → JsonEdit-CXcrgpCE.js} +1 -1
  20. package/dist/lazy/{ObjGroup-6TaW4d2P.js → ObjGroup-DX5wa0mU.js} +1 -1
  21. package/dist/lazy/{OfferDetails-dzU50CFD.js → OfferDetails-Bhl0m0ui.js} +16 -15
  22. package/dist/lazy/Radio-BLsE0Zq8.js +81 -0
  23. package/dist/lazy/{SearchSelect-_LZMoBi7.js → SearchSelect-DY44BK9I.js} +2 -2
  24. package/dist/lazy/{Select-cTEFKHmS.js → Select-C9BLuT_m.js} +2 -2
  25. package/dist/lazy/Table-Cui8PTFW.js +327 -0
  26. package/dist/lazy/{Tabs-8W8G_tD-.js → Tabs-Csj6YLqB.js} +1 -1
  27. package/dist/lazy/{Wrapper-DAOR7DZM.js → Wrapper-B5YrhtF1.js} +1 -1
  28. package/dist/lazy/{index-odwMZo8k.js → index-Bf2453Vt.js} +3177 -3165
  29. package/dist/lazy/{useSelect-DE-MjuZO.js → useSelect-DqN6kHl2.js} +1 -1
  30. package/dist/style.css +2 -2
  31. package/package.json +1 -1
  32. package/dist/lazy/Checkbox-BtZupA-A.js +0 -79
  33. package/dist/lazy/Component-BFemJDyv.js +0 -109
  34. package/dist/lazy/Radio-Bj11lAt5.js +0 -86
  35. package/dist/lazy/Table-DExnYGQP.js +0 -321
@@ -0,0 +1,327 @@
1
+ import { defineComponent as ke, computed as V, inject as w, ref as v, useTemplateRef as we, readonly as be, toRefs as Se, onMounted as ze, nextTick as Re, onActivated as Be, onUnmounted as Pe, resolveComponent as R, openBlock as u, createElementBlock as g, normalizeClass as U, withDirectives as j, createElementVNode as f, createVNode as b, unref as B, withCtx as h, createBlock as S, createCommentVNode as m, Fragment as P, renderList as G, toDisplayString as _, withModifiers as _e, vShow as H, mergeProps as Ne } from "vue";
2
+ import { $ as Me, i as Te, _ as De, f as Fe, I as $e, C as Ae, b as Ee } from "./index-Bf2453Vt.js";
3
+ import { ElTable as Ve } from "element-plus";
4
+ const Ue = { class: "empty-content" }, je = ["title"], Ge = ["title", "onClick"], He = ["title"], Ke = { class: "row-btn-wrapper" }, Le = /* @__PURE__ */ ke({
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(K, { expose: L }) {
38
+ const n = K, z = V(() => n.displayType ? n.displayType : n.typeSwitch ? "card" : "table"), W = w("ruleModule", void 0), N = w("ruleMap", void 0), c = V(() => n.rulePath && N[n.rulePath] ? N[n.rulePath] : W), p = w("pageMethodMap", {}), q = w("getGlobalParams", () => {
39
+ }), M = w(Me), T = M ? M.translateFn : null, y = v(), I = (e, t, a) => {
40
+ i.value[e] && (i.value[e][t] = a);
41
+ }, J = (e, t) => {
42
+ const a = n.columns.find((l) => l.key === e);
43
+ a && (a.hidden = !t);
44
+ }, D = (e, t, a) => {
45
+ try {
46
+ c.value[e.onClick](p, t, a);
47
+ } catch (l) {
48
+ console.error(l);
49
+ }
50
+ }, O = (e) => {
51
+ if (n.rowClick)
52
+ try {
53
+ c.value[n.rowClick](p, e);
54
+ } catch (t) {
55
+ console.error(t);
56
+ }
57
+ }, Q = (e) => {
58
+ if (n.rowDbClick)
59
+ try {
60
+ c.value[n.rowDbClick](p, e);
61
+ } catch (t) {
62
+ console.error(t);
63
+ }
64
+ }, X = v([]), Y = (e) => {
65
+ X.value = e;
66
+ }, Z = () => {
67
+ var e;
68
+ (e = y.value) == null || e.clearSelection();
69
+ }, x = () => i.value, F = v(), ee = (e) => {
70
+ if (F.value = e, !!n.handleCurrentChange)
71
+ try {
72
+ c.value[n.handleCurrentChange](p, e);
73
+ } catch (t) {
74
+ console.error(t);
75
+ }
76
+ }, te = () => F.value, ne = () => {
77
+ var e;
78
+ return (e = y.value) == null ? void 0 : e.getSelectionRows();
79
+ }, ae = async () => !0, oe = (e, t) => {
80
+ var l;
81
+ const a = (l = n.topBtns) == null ? void 0 : l.find((k) => k.key === e);
82
+ a && (a.hidden = t);
83
+ }, le = (e, t) => {
84
+ var l;
85
+ const a = (l = n.rowBtns) == null ? void 0 : l.find((k) => k.key === e);
86
+ a && (a.condition = !t);
87
+ }, $ = v(0), re = (e) => {
88
+ $.value = e;
89
+ }, r = v({ pageNum: 1, pageSize: n.defaultPageSize || 5 }), ie = () => r.value, se = (e) => {
90
+ let t = !1;
91
+ 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 };
92
+ }, ue = (e) => {
93
+ if (r.value.pageNum = 1, r.value.pageSize = e, !!n.sizeChange)
94
+ try {
95
+ c.value[n.sizeChange](p, r.value);
96
+ } catch (t) {
97
+ console.error(t);
98
+ }
99
+ }, ce = (e) => {
100
+ if (r.value.pageNum = e, !!n.pageChange)
101
+ try {
102
+ c.value[n.pageChange](p, r.value);
103
+ } catch (t) {
104
+ console.error(t);
105
+ }
106
+ }, pe = (e) => {
107
+ var t;
108
+ (t = y.value) == null || t.setCurrentRow(e);
109
+ }, de = (e) => {
110
+ var t;
111
+ (t = y.value) == null || t.setCurrentRow(i.value[e]);
112
+ }, ge = (e, t, a) => {
113
+ n.columns.forEach((l) => {
114
+ l.key === e && l[t] && (l[t] = a);
115
+ });
116
+ }, i = v([]), he = (e) => {
117
+ i.value = e;
118
+ }, ve = (e = {}) => {
119
+ i.value.push(e);
120
+ }, fe = (e) => {
121
+ e >= 0 && e < i.value.length && i.value.splice(e, 1);
122
+ }, me = async () => {
123
+ i.value = [...i.value];
124
+ }, A = we("rootRef"), E = be({
125
+ ...Se(n),
126
+ setCellData: I,
127
+ clearSelection: Z,
128
+ getData: x,
129
+ getCurrentRow: te,
130
+ getSelectedRows: ne,
131
+ addRow: ve,
132
+ deleteRow: fe,
133
+ refresh: me,
134
+ validate: ae,
135
+ setData: he,
136
+ selectRow: pe,
137
+ selectRowNum: de,
138
+ setTotal: re,
139
+ getPagination: ie,
140
+ setPagination: se,
141
+ setTopBtnHidden: oe,
142
+ setColVisible: J,
143
+ setColumn: ge,
144
+ setRowsBtnHidden: le,
145
+ rootRef: A,
146
+ type: "table"
147
+ }), C = (e, t) => {
148
+ const a = T ? T(e.key, t) : t[e.key];
149
+ if (!e.encrypted || !a)
150
+ return a;
151
+ const l = `${a}`;
152
+ return l.length <= 4 ? "*".repeat(l.length) : l.slice(0, -4) + "****";
153
+ };
154
+ if (ze(async () => {
155
+ if (!n.onMounted || !c.value)
156
+ return;
157
+ await Re();
158
+ const e = n.onMounted;
159
+ try {
160
+ c.value[e](p);
161
+ } catch (t) {
162
+ console.error(t);
163
+ }
164
+ }), Be(() => {
165
+ if (!n.onActivated || !c.value)
166
+ return;
167
+ const e = n.onActivated;
168
+ try {
169
+ c.value[e](p);
170
+ } catch (t) {
171
+ console.error(t);
172
+ }
173
+ }), n.name) {
174
+ const e = Te(n.name, E);
175
+ Pe(() => {
176
+ e();
177
+ });
178
+ }
179
+ return L(E), (e, t) => {
180
+ const a = R("el-table-column"), l = R("el-tooltip"), k = R("el-button"), ye = R("el-pagination");
181
+ return e.hidden ? m("", !0) : (u(), g("div", {
182
+ key: 0,
183
+ class: U(["table-render", { tableBorder: z.value === "table" }]),
184
+ ref_key: "rootRef",
185
+ ref: A
186
+ }, [
187
+ j(f("div", null, [
188
+ b(B(Ve), {
189
+ ref_key: "tableRef",
190
+ ref: y,
191
+ data: i.value,
192
+ "highlight-current-row": "",
193
+ "row-key": e.rowKey,
194
+ stripe: e.stripe,
195
+ onRowClick: O,
196
+ onRowDblclick: Q,
197
+ onSelectionChange: Y,
198
+ onCurrentChange: ee,
199
+ height: e.height
200
+ }, {
201
+ empty: h(() => [
202
+ f("div", Ue, [
203
+ b(B(De), {
204
+ name: "tableEmpty",
205
+ style: { width: 56, height: 56 }
206
+ }),
207
+ t[2] || (t[2] = f("div", null, "No data available,please check", -1))
208
+ ])
209
+ ]),
210
+ default: h(() => [
211
+ e.multipleSelection ? (u(), S(a, {
212
+ key: 0,
213
+ type: "selection",
214
+ width: "55"
215
+ })) : m("", !0),
216
+ (u(!0), g(P, null, G(e.columns, (o) => (u(), g(P, {
217
+ key: o.key
218
+ }, [
219
+ o.hidden ? m("", !0) : (u(), S(a, {
220
+ key: 0,
221
+ prop: o.key,
222
+ "min-width": o.minWidth,
223
+ fixed: o.fixed || !1
224
+ }, {
225
+ header: h(() => [
226
+ f("div", {
227
+ class: "text-ellipsis",
228
+ title: o.label
229
+ }, _(o.label), 9, je)
230
+ ]),
231
+ default: h(({ row: d, $index: s }) => [
232
+ o.type === "link" ? (u(), g("div", {
233
+ key: 0,
234
+ class: "text-ellipsis link-style",
235
+ title: C(o, d),
236
+ onClick: (Ce) => D(o, d, s)
237
+ }, _(C(o, d)), 9, Ge)) : (u(), g("div", {
238
+ key: 1,
239
+ class: "text-ellipsis",
240
+ title: C(o, d)
241
+ }, _(C(o, d)), 9, He))
242
+ ]),
243
+ _: 2
244
+ }, 1032, ["prop", "min-width", "fixed"]))
245
+ ], 64))), 128)),
246
+ e.rowBtns && e.rowBtns.length > 0 ? (u(), S(a, {
247
+ key: 1,
248
+ label: "Action",
249
+ fixed: "right",
250
+ align: "left"
251
+ }, {
252
+ default: h(({ row: o, $index: d }) => [
253
+ f("div", Ke, [
254
+ (u(!0), g(P, null, G(e.rowBtns, (s) => (u(), g(P, {
255
+ key: s.key
256
+ }, [
257
+ s.condition === void 0 || s.condition === null || B(Fe)(s.condition, { $row: o, $globalParams: B(q)() }) ? (u(), S(k, {
258
+ key: 0,
259
+ disabled: s.disabled,
260
+ link: "",
261
+ size: "small",
262
+ type: s.type,
263
+ onClick: _e((Ce) => D(s, o, d), ["stop"])
264
+ }, {
265
+ default: h(() => [
266
+ b(l, {
267
+ class: "box-item",
268
+ effect: "dark",
269
+ content: s.label,
270
+ placement: "top",
271
+ "popper-class": "low-tsp",
272
+ "show-after": 300
273
+ }, {
274
+ default: h(() => [
275
+ s.icon ? (u(), S($e, {
276
+ key: 0,
277
+ name: s.icon.name,
278
+ color: s.icon.color
279
+ }, null, 8, ["name", "color"])) : m("", !0)
280
+ ]),
281
+ _: 2
282
+ }, 1032, ["content"])
283
+ ]),
284
+ _: 2
285
+ }, 1032, ["disabled", "type", "onClick"])) : m("", !0)
286
+ ], 64))), 128))
287
+ ])
288
+ ]),
289
+ _: 1
290
+ })) : m("", !0)
291
+ ]),
292
+ _: 1
293
+ }, 8, ["data", "row-key", "stripe", "height"])
294
+ ], 512), [
295
+ [H, z.value === "table"]
296
+ ]),
297
+ j(b(Ae, Ne({ data: i.value }, n, { getColText: C }), null, 16, ["data"]), [
298
+ [H, z.value === "card"]
299
+ ]),
300
+ f("div", {
301
+ class: U(["pagination-wrapper", {
302
+ hidePagination: (e.hiddenPagination || i.value.length === 0) && !e.height,
303
+ transparentPagination: (e.hiddenPagination || i.value.length === 0) && e.height,
304
+ cardlistPadding: z.value === "card"
305
+ }])
306
+ }, [
307
+ b(ye, {
308
+ layout: "total,sizes, prev, pager, next,jumper",
309
+ total: $.value,
310
+ "page-sizes": e.pageSizes || [5, 10, 20, 30, 40],
311
+ "default-page-size": e.defaultPageSize,
312
+ "current-page": r.value.pageNum,
313
+ "onUpdate:currentPage": t[0] || (t[0] = (o) => r.value.pageNum = o),
314
+ "page-size": r.value.pageSize,
315
+ "onUpdate:pageSize": t[1] || (t[1] = (o) => r.value.pageSize = o),
316
+ "pager-count": e.pagerCount,
317
+ onSizeChange: ue,
318
+ onCurrentChange: ce
319
+ }, null, 8, ["total", "page-sizes", "default-page-size", "current-page", "page-size", "pager-count"])
320
+ ], 2)
321
+ ], 2));
322
+ };
323
+ }
324
+ }), Je = /* @__PURE__ */ Ee(Le, [["__scopeId", "data-v-3dd76404"]]);
325
+ export {
326
+ Je as default
327
+ };
@@ -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-odwMZo8k.js";
2
+ import { a as V } from "./index-Bf2453Vt.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 t, resolveComponent as n, openBlock as r, createElementBlock as a, createVNode as l, withCtx as s, withDirectives as p, createElementVNode as i, normalizeStyle as c, normalizeClass as m, unref as _, vShow as d } from "vue";
2
- import { a as u, b as f } from "./index-odwMZo8k.js";
2
+ import { a as u, b as f } from "./index-Bf2453Vt.js";
3
3
  import "element-plus";
4
4
  const y = /* @__PURE__ */ t({
5
5
  __name: "Wrapper",