hlrender 0.0.107 → 0.0.109

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.
@@ -0,0 +1,65 @@
1
+ import { D as d, B as s } from "./baseImp-26b9c04a.js";
2
+ import { c as l } from "./enum-type-bb2bfafa.js";
3
+ import { f as O, n as k, o as E } from "./index-a7d766e7.js";
4
+ import { l as W } from "./expression-490b4335.js";
5
+ import "./enum-type-4a798b1a.js";
6
+ import "vue";
7
+ import "./icon-a0e0cdb0.js";
8
+ import "./dialog-c4706078.js";
9
+ import "./_commonjsHelpers-e7ea1525.js";
10
+ import "./uuid-4999945f.js";
11
+ import "element-plus";
12
+ import "./source-map-b04aec4a.js";
13
+ import "./esprima-e8d15055.js";
14
+ const z = (h, i) => {
15
+ const b = (m, n) => {
16
+ const r = [], o = (e) => !!e.dynamicItemFlag;
17
+ k(m, r, !1, o);
18
+ var c = r == null ? void 0 : r.filter((e) => e == null ? void 0 : e.formItemFlag);
19
+ return c == null || c.forEach((e) => {
20
+ if (!(e != null && e.dynamicItemFlag))
21
+ n.push({ widget: y(e) });
22
+ else {
23
+ const u = [];
24
+ E(e, u, !1, o);
25
+ const _ = [];
26
+ b(u, _), n.push({ widget: y(e), children: _, multirow: !0 });
27
+ }
28
+ }), n;
29
+ }, p = (m) => s.getOptions(m, "name"), F = () => {
30
+ const m = [];
31
+ var n = i ? O(h, (o) => p(o) === (i == null ? void 0 : i.fName) || (o == null ? void 0 : o.type) == (i == null ? void 0 : i.wdt), !1) : h;
32
+ return b(n, m);
33
+ }, y = (m) => {
34
+ var I;
35
+ const n = {}, r = (t, a) => {
36
+ n[t] = a;
37
+ }, o = (t) => {
38
+ const a = s.getOptions(t, "content"), f = s.getOptions(t, "label"), g = s.getOptions(t, "name");
39
+ return f || a || g;
40
+ }, c = (t) => ({ label: o(t), key: p(t) }), e = (t) => {
41
+ let a = s.getOptions(t, "textName"), f = s.getOptions(t, "multiple");
42
+ const g = a || `${p(t)}${W.optionText}`;
43
+ return { label: o(t), key: `${g}`, multiple: f };
44
+ }, u = (t) => ({ label: o(t), key: p(t) });
45
+ return (() => {
46
+ d(l).forEach((t) => {
47
+ r(t.label, c);
48
+ }), [
49
+ l.select,
50
+ l.radio,
51
+ l.checkbox,
52
+ l.cascader,
53
+ l.autoComplete
54
+ ].forEach((t) => {
55
+ r(t, e);
56
+ }), r(l.multirow, u);
57
+ })(), (I = n[m.type]) == null ? void 0 : I.call(n, m);
58
+ };
59
+ return {
60
+ filterFieldItems: F
61
+ };
62
+ };
63
+ export {
64
+ z as useGenFieldItemList
65
+ };
@@ -1,94 +0,0 @@
1
- import { D as S, B as d } from "./baseImp-26b9c04a.js";
2
- import { T, h as w, e as $, j as F } from "./enum-type-4a798b1a.js";
3
- import { c as h } from "./enum-type-bb2bfafa.js";
4
- import { n as j, o as I } from "./index-a7d766e7.js";
5
- import { g as O } from "./uuid-4999945f.js";
6
- import "./expression-490b4335.js";
7
- import "./source-map-b04aec4a.js";
8
- import "./_commonjsHelpers-e7ea1525.js";
9
- import "./esprima-e8d15055.js";
10
- import "./icon-a0e0cdb0.js";
11
- import "vue";
12
- import "./dialog-c4706078.js";
13
- import "element-plus";
14
- const Q = (e, o = {}) => `
15
- ${E(e)}
16
- ${C(o)}
17
- ${J()}
18
- `, E = (e) => {
19
- const { buildTmpl: o } = k(), n = W(e);
20
- var c = n == null ? void 0 : n.map((a) => o(a, v));
21
- return `<template>
22
- ${((a) => {
23
- var i;
24
- var u = (i = a == null ? void 0 : a.map((t) => t ? `
25
- <tr>
26
- <td class="label">${t.label}</td>
27
- <td class="content">${t.content}</td>
28
- </tr>
29
- ` : "")) == null ? void 0 : i.join(`
30
- `);
31
- return `
32
- <table class="hl-view-table">
33
- <tr>
34
- <th class="title">${$.i18nt("designer.hint.title")}</th>
35
- <th class="title">${$.i18nt("designer.hint.value")}</th>
36
- </tr>
37
- ${u}
38
- </table>
39
- `;
40
- })(c)}
41
- </template>`;
42
- }, v = "formData", C = (e = {}) => `<script>
43
- ${`export default {
44
- ${[T(e) ? void 0 : `
45
- data() {
46
- return ${w({ [v]: e })};
47
- }`].filter((c) => !F(c)).join(",")}
48
- }`}
49
- <\/script>`, J = () => `<style scoped>
50
- .hl-view-table{width:100%;color:gray;}
51
- .hl-view-table th.title{background-color:#e2e2e2;}
52
- .hl-view-table td.label{background-color:#eeeeee;}
53
- .hl-view-table td,.hl-view-table th{border:1px solid #cccccc;border-collapse:collapse;padding:5px;}
54
- .hl-view-table .hl-row{border:1px solid #eeeeee;}
55
- </style>`, W = (e) => {
56
- const o = [];
57
- return j(e, o, !1, (n) => !!n.dynamicItemFlag), o == null ? void 0 : o.filter((n) => n == null ? void 0 : n.formItemFlag);
58
- };
59
- function k() {
60
- const e = {}, o = (t, r) => {
61
- e[t] = r;
62
- }, n = (t) => {
63
- const r = d.getOptions(t, "content"), l = d.getOptions(t, "label"), m = d.getOptions(t, "name");
64
- return l || r || m;
65
- }, c = (t) => d.getOptions(t, "name"), _ = (t, r) => {
66
- const l = n(t), m = c(t);
67
- return { label: l, content: `{{${r ? r + "." : ""}${m}}}` };
68
- }, a = (t, r) => {
69
- const l = n(t), m = c(t), p = [];
70
- I(t, p);
71
- const g = `item_${O()}`, f = `${r ? r + "." : ""}${m}`;
72
- var b = p == null ? void 0 : p.map((s) => i(s, g));
73
- const y = `
74
- <div v-for="${g} in ${f}" class="hl-row">
75
- ${b == null ? void 0 : b.map((s) => `<div>${s == null ? void 0 : s.label}:${s == null ? void 0 : s.content}</div>`).join(`
76
- `)}
77
- </div>
78
- `;
79
- return { label: l, content: y };
80
- }, u = () => {
81
- S(h).forEach((t) => {
82
- o(t.label, _);
83
- }), o(h.multirow, a);
84
- }, i = (t, r) => {
85
- var l;
86
- return (l = e[t.type]) == null ? void 0 : l.call(e, t, r);
87
- };
88
- return u(), {
89
- buildTmpl: i
90
- };
91
- }
92
- export {
93
- Q as genSFCView
94
- };