asiaint-lowcode 3.1.8 → 3.1.9

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 (38) hide show
  1. package/dist/asiaint-lowcode.js +3 -3
  2. package/dist/asiaint-lowcode.umd.cjs +112 -112
  3. package/dist/index.d.ts +2 -0
  4. package/dist/lazy/{Card-6PZmYtNq.js → Card-DzmW0wYT.js} +1 -1
  5. package/dist/lazy/{Cascader-N-sfkAb7.js → Cascader-DZiqLZku.js} +1 -1
  6. package/dist/lazy/Checkbox-Q8TyjC-h.js +84 -0
  7. package/dist/lazy/{Collapse-BwDUA9I8.js → Collapse-DVmuLiix.js} +1 -1
  8. package/dist/lazy/{Component-CQFTAcKS.js → Component-Bc1pPZSB.js} +1 -1
  9. package/dist/lazy/{Component-BZYH1Qg5.js → Component-CLiVojJV.js} +1 -1
  10. package/dist/lazy/{Component-C6kjM2Nq.js → Component-DUe2_DhQ.js} +9 -9
  11. package/dist/lazy/{Component-DQcxhU9o.js → Component-DroX6CLJ.js} +1 -1
  12. package/dist/lazy/{Component-rx0uCN0v.js → Component-TJlzkjGJ.js} +1 -1
  13. package/dist/lazy/{Component-TW6VSMXG.js → Component-iAKx8DBf.js} +1 -1
  14. package/dist/lazy/{CurdCard-pUfsfVL3.js → CurdCard-CXijoWLe.js} +1 -1
  15. package/dist/lazy/{Custom-BvLfuMzj.js → Custom-Cn7fsoE-.js} +1 -1
  16. package/dist/lazy/{DatePicker-Dbp6CJ8Z.js → DatePicker-DReZTCjv.js} +1 -1
  17. package/dist/lazy/{DragList-BJZtHPww.js → DragList-CI76iwCA.js} +1 -1
  18. package/dist/lazy/{FormList-Dwvhoedo.js → FormList-BmpI_Ujx.js} +1 -1
  19. package/dist/lazy/{Grid-BFSvkMBW.js → Grid-lfCS0c4e.js} +1 -1
  20. package/dist/lazy/{Inline-EBtbFYWn.js → Inline-vcjUrNMZ.js} +1 -1
  21. package/dist/lazy/{JsonEdit-4SgUwVju.js → JsonEdit-DPPQqN3H.js} +1 -1
  22. package/dist/lazy/{LogList-4H55fiHU.js → LogList-Dc_tgPzL.js} +1 -1
  23. package/dist/lazy/{ObjGroup-DWtjlZTi.js → ObjGroup-tyEbJtP4.js} +3 -3
  24. package/dist/lazy/{OfferDetails-B0qSqVXF.js → OfferDetails-BtlBASO3.js} +1 -1
  25. package/dist/lazy/{Pagination-CdH4EStJ.js → Pagination-B3xQ42vO.js} +1 -1
  26. package/dist/lazy/{Progress-C-Gxh682.js → Progress-Btm8MMce.js} +1 -1
  27. package/dist/lazy/{Radio-OlWL4SQk.js → Radio-CM1-ngPn.js} +2 -2
  28. package/dist/lazy/{SearchSelect-C9rumlyn.js → SearchSelect-BhfaBesN.js} +2 -2
  29. package/dist/lazy/{Select-CwU7uxeN.js → Select-jfFzbbGc.js} +2 -2
  30. package/dist/lazy/Table-DiJiVpIU.js +514 -0
  31. package/dist/lazy/{Tabs-Dfqvt1sF.js → Tabs-BrH3kSJh.js} +1 -1
  32. package/dist/lazy/{Wrapper-B0vhgFVI.js → Wrapper-CXUjnljU.js} +5 -5
  33. package/dist/lazy/{index-i51Ps93p.js → index-9URyfoWb.js} +2736 -2731
  34. package/dist/lazy/{useSelect-BNh54VEo.js → useSelect-CrEV4QGa.js} +15 -15
  35. package/dist/style.css +1 -1
  36. package/package.json +1 -1
  37. package/dist/lazy/Checkbox-CcKRx3xE.js +0 -77
  38. package/dist/lazy/Table-DV138e4a.js +0 -471
@@ -1,471 +0,0 @@
1
- import { defineComponent as xe, computed as L, inject as _, ref as S, useTemplateRef as Le, readonly as Fe, toRefs as Ee, onMounted as Ie, nextTick as Ae, onActivated as Ve, onUnmounted as Ue, resolveComponent as R, openBlock as i, createElementBlock as h, normalizeClass as F, withDirectives as J, createElementVNode as k, createVNode as w, unref as y, withCtx as m, createBlock as f, createCommentVNode as d, Fragment as T, renderList as O, toDisplayString as z, normalizeStyle as E, withModifiers as Q, vShow as X, mergeProps as We } from "vue";
2
- import { $ as je, f as N, i as Ge, _ as He, I as D, a as Ke, C as qe, b as Je } from "./index-i51Ps93p.js";
3
- import { ElTable as Oe, ElLoading as Y } from "element-plus";
4
- const Qe = ["id"], Xe = { class: "empty-content" }, Ye = ["title"], Ze = ["title", "onClick"], et = {
5
- key: 1,
6
- class: "icon-text-wrapper"
7
- }, tt = ["title"], nt = ["title"], ot = { class: "row-btn-wrapper" }, at = /* @__PURE__ */ xe({
8
- __name: "Table",
9
- props: {
10
- title: {},
11
- key: {},
12
- rulePath: {},
13
- rowKey: {},
14
- showDynamicSearch: { type: Boolean },
15
- multipleSelection: { type: Boolean },
16
- highlightCurrentRow: { type: Boolean },
17
- "highlight-current-row": { type: Boolean },
18
- stripe: { type: Boolean },
19
- rowClick: {},
20
- rowDbClick: {},
21
- sizeChange: {},
22
- pageChange: {},
23
- topBtns: {},
24
- rowBtns: {},
25
- rowBtnsLabel: {},
26
- rowBtnsWidth: {},
27
- columns: {},
28
- hidden: { type: Boolean },
29
- hiddenPagination: { type: Boolean },
30
- handleCurrentChange: {},
31
- selectable: {},
32
- pageSizes: {},
33
- pagerCount: {},
34
- paginationLayout: {},
35
- defaultPageSize: {},
36
- typeSwitch: { type: Boolean },
37
- displayType: { default: "table" },
38
- onMounted: {},
39
- onActivated: {},
40
- height: {},
41
- collapsible: { type: Boolean },
42
- name: {},
43
- gridColumns: {}
44
- },
45
- setup(Z, { expose: ee }) {
46
- const n = Z, $ = L(() => n.displayType ? n.displayType : n.typeSwitch ? "card" : "table"), te = _("ruleModule", void 0), I = _("ruleMap", void 0), u = L(() => n.rulePath && I[n.rulePath] ? I[n.rulePath] : te), g = _("pageMethodMap", {}), B = _("getGlobalParams", () => {
47
- }), A = _(je), V = A ? A.translateFn : null, P = S(), ne = (e, t, o) => {
48
- s.value[e] && (s.value[e][t] = o);
49
- }, oe = (e, t) => {
50
- const o = n.columns.find((r) => r.key === e);
51
- o && (o.hidden = !t);
52
- }, x = (e, t, o, r) => {
53
- try {
54
- u.value[e.onClick](g, t, o, r), r == null || r.stopPropagation();
55
- } catch (v) {
56
- console.error(v);
57
- }
58
- }, ae = (e) => {
59
- if (n.rowClick)
60
- try {
61
- u.value[n.rowClick](g, e);
62
- } catch (t) {
63
- console.error(t);
64
- }
65
- }, le = (e) => {
66
- if (n.rowDbClick)
67
- try {
68
- u.value[n.rowDbClick](g, e);
69
- } catch (t) {
70
- console.error(t);
71
- }
72
- }, re = S([]), ie = (e) => {
73
- re.value = e;
74
- }, se = (e, t) => {
75
- if (!n.selectable)
76
- return !0;
77
- try {
78
- return u.value[n.selectable](g, e, t);
79
- } catch (o) {
80
- console.error(o);
81
- }
82
- return !0;
83
- }, ue = () => {
84
- var e;
85
- (e = P.value) == null || e.clearSelection();
86
- }, ce = () => s.value, U = S(), pe = (e) => {
87
- if (U.value = e, !!n.handleCurrentChange)
88
- try {
89
- u.value[n.handleCurrentChange](g, e);
90
- } catch (t) {
91
- console.error(t);
92
- }
93
- }, de = () => U.value, ge = () => {
94
- var e;
95
- return (e = P.value) == null ? void 0 : e.getSelectionRows();
96
- }, he = async () => !0, ye = (e, t) => {
97
- var r;
98
- const o = (r = n.topBtns) == null ? void 0 : r.find((v) => v.key === e);
99
- o && (o.hidden = t);
100
- }, me = (e, t) => {
101
- var r;
102
- const o = (r = n.rowBtns) == null ? void 0 : r.find((v) => v.key === e);
103
- o && (o.condition = !t);
104
- }, W = S(0), fe = (e) => {
105
- W.value = e;
106
- }, c = S({ pageNum: 1, pageSize: n.defaultPageSize || 5 }), ve = () => c.value, ke = (e) => {
107
- let t = !1;
108
- return e.pageNum !== void 0 && e.pageNum > -1 && (c.value.pageNum !== e.pageNum && (t = !0), c.value.pageNum = e.pageNum), e.pageSize !== void 0 && e.pageSize > -1 && (c.value.pageSize !== e.pageSize && (t = !0), c.value.pageSize = e.pageSize), { pagination: c.value, isChange: t };
109
- }, Ce = async (e) => {
110
- if (c.value.pageNum = 1, c.value.pageSize = e, !n.sizeChange)
111
- return;
112
- const t = Y.service({
113
- target: `#${n.name}`,
114
- text: "Loading...",
115
- body: !0
116
- });
117
- try {
118
- await u.value[n.sizeChange](g, c.value);
119
- } catch (o) {
120
- console.error(o);
121
- } finally {
122
- t.close();
123
- }
124
- }, we = async (e) => {
125
- if (c.value.pageNum = e, !n.pageChange)
126
- return;
127
- const t = Y.service({
128
- target: `#${n.name}`,
129
- text: "Loading...",
130
- body: !0
131
- });
132
- try {
133
- await u.value[n.pageChange](g, c.value);
134
- } catch (o) {
135
- console.error(o);
136
- } finally {
137
- t.close();
138
- }
139
- }, be = (e) => {
140
- var t;
141
- (t = P.value) == null || t.setCurrentRow(e);
142
- }, Se = (e) => {
143
- var t;
144
- (t = P.value) == null || t.setCurrentRow(s.value[e]);
145
- }, ze = (e, t, o) => {
146
- n.columns.forEach((r) => {
147
- r.key === e && r[t] && (r[t] = o);
148
- });
149
- }, s = S([]), Be = (e) => {
150
- s.value = e;
151
- }, Pe = (e = {}) => {
152
- s.value.push(e);
153
- }, _e = (e) => {
154
- e >= 0 && e < s.value.length && s.value.splice(e, 1);
155
- }, Re = async () => {
156
- s.value = [...s.value];
157
- }, j = Le("rootRef"), G = Fe({
158
- ...Ee(n),
159
- setCellData: ne,
160
- clearSelection: ue,
161
- getData: ce,
162
- getCurrentRow: de,
163
- getSelectedRows: ge,
164
- addRow: Pe,
165
- deleteRow: _e,
166
- refresh: Re,
167
- validate: he,
168
- setData: Be,
169
- selectRow: be,
170
- selectRowNum: Se,
171
- setTotal: fe,
172
- getPagination: ve,
173
- setPagination: ke,
174
- setTopBtnHidden: ye,
175
- setColVisible: oe,
176
- setColumn: ze,
177
- setRowsBtnHidden: me,
178
- rootRef: j,
179
- type: "table"
180
- }), C = (e, t) => {
181
- const o = V ? V(e.key, t) : t[e.key];
182
- if (!e.encrypted || !o)
183
- return o;
184
- const r = `${o}`;
185
- return r.length <= 4 ? "*".repeat(r.length) : r.slice(0, -4) + "****";
186
- }, Te = (e, t) => {
187
- if (!e.getTextStyle || !u.value)
188
- return {};
189
- try {
190
- return u.value[e.getTextStyle](g, t, e);
191
- } catch (o) {
192
- console.error(o);
193
- }
194
- }, M = (e, t) => {
195
- if (!(!e.getIconInfo || !u.value))
196
- try {
197
- return u.value[e.getIconInfo](g, t, e);
198
- } catch (o) {
199
- console.error(o);
200
- }
201
- }, Ne = L(() => !n.rowBtns || n.rowBtns.length === 0 || !s.value || s.value.length === 0 ? !1 : s.value.some(
202
- (e) => {
203
- var t;
204
- return (t = n.rowBtns) == null ? void 0 : t.some((o) => o.condition === void 0 || o.condition === null ? !0 : N(o.condition, {
205
- $row: e,
206
- $globalParams: B()
207
- }));
208
- }
209
- ));
210
- if (Ie(async () => {
211
- if (!n.onMounted || !u.value)
212
- return;
213
- await Ae();
214
- const e = n.onMounted;
215
- try {
216
- u.value[e](g);
217
- } catch (t) {
218
- console.error(t);
219
- }
220
- }), Ve(() => {
221
- if (!n.onActivated || !u.value)
222
- return;
223
- const e = n.onActivated;
224
- try {
225
- u.value[e](g);
226
- } catch (t) {
227
- console.error(t);
228
- }
229
- }), n.name) {
230
- const e = Ge(n.name, G);
231
- Ue(() => {
232
- e();
233
- });
234
- }
235
- return ee(G), (e, t) => {
236
- const o = R("el-table-column"), r = R("el-tooltip"), v = R("el-button"), $e = R("el-popover"), Me = R("el-pagination");
237
- return e.hidden ? d("", !0) : (i(), h("div", {
238
- key: 0,
239
- class: F(["table-render", { tableBorder: $.value === "table" }]),
240
- ref_key: "rootRef",
241
- ref: j,
242
- id: e.name
243
- }, [
244
- J(k("div", null, [
245
- w(y(Oe), {
246
- ref_key: "tableRef",
247
- ref: P,
248
- data: s.value,
249
- "highlight-current-row": "",
250
- "row-key": e.rowKey,
251
- stripe: e.stripe,
252
- onRowClick: ae,
253
- onRowDblclick: le,
254
- onSelectionChange: ie,
255
- onCurrentChange: pe,
256
- height: e.height
257
- }, {
258
- empty: m(() => [
259
- k("div", Xe, [
260
- w(y(He), {
261
- name: "tableEmpty",
262
- style: { width: 56, height: 56 }
263
- }),
264
- t[2] || (t[2] = k("div", null, "No data available,please check", -1))
265
- ])
266
- ]),
267
- default: m(() => [
268
- e.multipleSelection ? (i(), f(o, {
269
- key: 0,
270
- type: "selection",
271
- width: "55",
272
- selectable: se
273
- })) : d("", !0),
274
- (i(!0), h(T, null, O(e.columns, (a) => (i(), h(T, {
275
- key: a.key
276
- }, [
277
- a.hidden ? d("", !0) : (i(), f(o, {
278
- key: 0,
279
- prop: a.key,
280
- "min-width": a.minWidth,
281
- fixed: a.fixed || !1
282
- }, {
283
- header: m(() => [
284
- k("div", {
285
- class: "text-ellipsis",
286
- title: a.label
287
- }, z(a.label), 9, Ye)
288
- ]),
289
- default: m(({ row: p, $index: l }) => {
290
- var b, H, K, q;
291
- return [
292
- a.type === "link" ? (i(), h("div", {
293
- key: 0,
294
- class: F(["text-ellipsis link-style", { "click-style": a.onClick }]),
295
- title: C(a, p),
296
- onClick: (De) => x(a, p, l, De)
297
- }, z(C(a, p)), 11, Ze)) : a.type === "iconText" ? (i(), h("div", et, [
298
- a.iconPosition === "left" ? (i(), f(D, {
299
- key: 0,
300
- name: (b = M(a, p)) == null ? void 0 : b.name,
301
- color: (H = M(a, p)) == null ? void 0 : H.color
302
- }, null, 8, ["name", "color"])) : d("", !0),
303
- k("span", {
304
- class: "text-ellipsis",
305
- title: C(a, p)
306
- }, z(C(a, p)), 9, tt),
307
- a.iconPosition === "right" ? (i(), f(D, {
308
- key: 1,
309
- name: (K = M(a, p)) == null ? void 0 : K.name,
310
- color: (q = M(a, p)) == null ? void 0 : q.color
311
- }, null, 8, ["name", "color"])) : d("", !0)
312
- ])) : (i(), h("div", {
313
- key: 2,
314
- class: "text-ellipsis",
315
- title: C(a, p),
316
- style: E(Te(a, p))
317
- }, z(C(a, p)), 13, nt))
318
- ];
319
- }),
320
- _: 2
321
- }, 1032, ["prop", "min-width", "fixed"]))
322
- ], 64))), 128)),
323
- Ne.value && e.rowBtns && e.rowBtns.length > 0 ? (i(), f(o, {
324
- key: 1,
325
- label: e.rowBtnsLabel || "Action",
326
- fixed: "right",
327
- align: "left",
328
- width: e.rowBtnsWidth || (e.rowBtns.length * 34 + 12 > 100 ? e.rowBtns.length * 34 + 12 : 100)
329
- }, {
330
- default: m(({ row: a, $index: p }) => [
331
- k("div", ot, [
332
- (i(!0), h(T, null, O(e.rowBtns, (l) => (i(), h(T, {
333
- key: l.key
334
- }, [
335
- l.component === "Popover" ? (i(), f($e, {
336
- key: 0,
337
- title: l.label,
338
- trigger: "click",
339
- "popper-class": "btn-popover",
340
- width: "400"
341
- }, {
342
- reference: m(() => [
343
- l.condition === void 0 || l.condition === null || y(N)(l.condition, {
344
- $row: a,
345
- $globalParams: y(B)()
346
- }) ? (i(), f(v, {
347
- key: 0,
348
- disabled: l.disabled,
349
- link: "",
350
- size: "small",
351
- type: l.type,
352
- onClick: Q((b) => x(l, a, p, b), ["stop"])
353
- }, {
354
- default: m(() => [
355
- w(r, {
356
- class: "box-item",
357
- effect: "dark",
358
- content: l.label,
359
- placement: "top",
360
- "popper-class": "low-tsp"
361
- }, {
362
- default: m(() => [
363
- l.icon ? (i(), f(D, {
364
- key: 0,
365
- name: l.icon.name,
366
- color: l.icon.color
367
- }, null, 8, ["name", "color"])) : d("", !0)
368
- ]),
369
- _: 2
370
- }, 1032, ["content"]),
371
- l.buttonText ? (i(), h("span", {
372
- key: 0,
373
- style: E({ color: l.buttonText.color, fontSize: "14px" })
374
- }, z(y(N)(l.buttonText.text, {
375
- $row: a,
376
- $globalParams: y(B)()
377
- })), 5)) : d("", !0)
378
- ]),
379
- _: 2
380
- }, 1032, ["disabled", "type", "onClick"])) : d("", !0)
381
- ]),
382
- default: m(() => [
383
- k("div", null, [
384
- w(y(Ke), {
385
- list: l.children
386
- }, null, 8, ["list"])
387
- ])
388
- ]),
389
- _: 2
390
- }, 1032, ["title"])) : (i(), h(T, { key: 1 }, [
391
- l.condition === void 0 || l.condition === null || y(N)(l.condition, {
392
- $row: a,
393
- $globalParams: y(B)()
394
- }) ? (i(), f(v, {
395
- key: 0,
396
- disabled: l.disabled,
397
- link: "",
398
- size: "small",
399
- type: l.type,
400
- onClick: Q((b) => x(l, a, p, b), ["stop"])
401
- }, {
402
- default: m(() => [
403
- w(r, {
404
- class: "box-item",
405
- effect: "dark",
406
- content: l.label,
407
- placement: "top",
408
- "popper-class": "low-tsp"
409
- }, {
410
- default: m(() => [
411
- l.icon ? (i(), f(D, {
412
- key: 0,
413
- name: l.icon.name,
414
- color: l.icon.color
415
- }, null, 8, ["name", "color"])) : d("", !0)
416
- ]),
417
- _: 2
418
- }, 1032, ["content"]),
419
- l.buttonText ? (i(), h("span", {
420
- key: 0,
421
- style: E({ color: l.buttonText.color, fontSize: "14px" })
422
- }, z(y(N)(l.buttonText.text, {
423
- $row: a,
424
- $globalParams: y(B)()
425
- })), 5)) : d("", !0)
426
- ]),
427
- _: 2
428
- }, 1032, ["disabled", "type", "onClick"])) : d("", !0)
429
- ], 64))
430
- ], 64))), 128))
431
- ])
432
- ]),
433
- _: 1
434
- }, 8, ["label", "width"])) : d("", !0)
435
- ]),
436
- _: 1
437
- }, 8, ["data", "row-key", "stripe", "height"])
438
- ], 512), [
439
- [X, $.value === "table"]
440
- ]),
441
- J(w(qe, We({ data: s.value }, n, { getColText: C }), null, 16, ["data"]), [
442
- [X, $.value === "card"]
443
- ]),
444
- k("div", {
445
- class: F(["pagination-wrapper", {
446
- hidePagination: (e.hiddenPagination || s.value.length === 0) && !e.height,
447
- transparentPagination: (e.hiddenPagination || s.value.length === 0) && e.height,
448
- cardlistPadding: $.value === "card"
449
- }])
450
- }, [
451
- w(Me, {
452
- layout: e.paginationLayout || "total,sizes, prev, pager, next,jumper",
453
- total: W.value,
454
- "page-sizes": e.pageSizes || [5, 10, 20, 30, 40],
455
- "default-page-size": e.defaultPageSize,
456
- "current-page": c.value.pageNum,
457
- "onUpdate:currentPage": t[0] || (t[0] = (a) => c.value.pageNum = a),
458
- "page-size": c.value.pageSize,
459
- "onUpdate:pageSize": t[1] || (t[1] = (a) => c.value.pageSize = a),
460
- "pager-count": Number(e.pagerCount) || 5,
461
- onSizeChange: Ce,
462
- onCurrentChange: we
463
- }, null, 8, ["layout", "total", "page-sizes", "default-page-size", "current-page", "page-size", "pager-count"])
464
- ], 2)
465
- ], 10, Qe));
466
- };
467
- }
468
- }), st = /* @__PURE__ */ Je(at, [["__scopeId", "data-v-00c31229"]]);
469
- export {
470
- st as default
471
- };