hlrender 0.0.120 → 0.0.122

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,135 @@
1
+ import { D as B, B as a } from "./baseImp-26b9c04a.js";
2
+ import { c as l } from "./enum-type-bb2bfafa.js";
3
+ import { f as D, n as G, o as J } from "./index-a7d766e7.js";
4
+ import { l as h } from "./expression-490b4335.js";
5
+ import { f as k, c as b } from "./enum-type-4a798b1a.js";
6
+ import "./icon-a0e0cdb0.js";
7
+ import "vue";
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 d = (F, _) => {
15
+ const O = (m, c) => {
16
+ const o = [], s = (n) => !!n.dynamicItemFlag;
17
+ G(m, o, !1, s);
18
+ var y = o == null ? void 0 : o.filter((n) => (n == null ? void 0 : n.formItemFlag) && (n == null ? void 0 : n.type) !== l.cache);
19
+ return y == null || y.forEach((n) => {
20
+ if (!(n != null && n.dynamicItemFlag))
21
+ c.push({ widget: v(n) });
22
+ else {
23
+ const g = [];
24
+ J(n, g, !1, s);
25
+ const x = [];
26
+ O(g, x), c.push({ widget: v(n), children: x });
27
+ }
28
+ }), c;
29
+ }, p = (m) => a.getOptions(m, "name"), I = () => {
30
+ const m = [];
31
+ var c = _ ? D(F, (o) => p(o) === (_ == null ? void 0 : _.fName) || (o == null ? void 0 : o.type) == (_ == null ? void 0 : _.wdt), !1) : F;
32
+ return O(c, m);
33
+ }, v = (m) => {
34
+ var T;
35
+ const c = {}, o = (t, r) => {
36
+ c[t] = r;
37
+ }, s = (t) => {
38
+ const r = a.getOptions(t, "content"), e = a.getOptions(t, "label"), i = a.getOptions(t, "name");
39
+ return e || r || i;
40
+ }, y = "|", n = ";", g = (t, r) => {
41
+ var i;
42
+ if (!r)
43
+ return t;
44
+ var e = k(t);
45
+ return Array.isArray(e) ? (i = b(e)) == null ? void 0 : i.join(n) : t;
46
+ }, x = (t, r) => {
47
+ var i, u;
48
+ var e = k(t);
49
+ return r ? (u = e == null ? void 0 : e.map((f) => {
50
+ var $;
51
+ return ($ = b(f)) == null ? void 0 : $.join(y);
52
+ })) == null ? void 0 : u.join(n) : (i = b(e)) == null ? void 0 : i.join(y);
53
+ }, V = (t) => ({
54
+ type: t.type,
55
+ label: s(t),
56
+ key: p(t),
57
+ options: {
58
+ valueFormat: (r) => r
59
+ }
60
+ }), j = (t) => {
61
+ let r = a.getOptions(t, "textName"), e = a.getOptions(t, "multiple");
62
+ const i = r || `${p(t)}${h.optionText}`;
63
+ return {
64
+ type: t.type,
65
+ label: s(t),
66
+ key: `${i}`,
67
+ options: {
68
+ valueFormat: (u) => g(u, e)
69
+ }
70
+ };
71
+ }, E = (t) => {
72
+ const e = a.getOptions(t, "textName") || `${p(t)}${h.optionText}`;
73
+ return {
74
+ type: t.type,
75
+ label: s(t),
76
+ key: `${e}`,
77
+ options: {
78
+ valueFormat: (i) => g(i, !0)
79
+ }
80
+ };
81
+ }, W = (t) => {
82
+ const e = a.getOptions(t, "textName") || `${p(t)}${h.optionText}`;
83
+ return {
84
+ type: t.type,
85
+ label: s(t),
86
+ key: `${e}`,
87
+ options: {
88
+ valueFormat: (i) => g(i, !1)
89
+ }
90
+ };
91
+ }, A = (t) => {
92
+ let r = a.getOptions(t, "textName"), e = a.getOptions(t, "multiple");
93
+ const i = r || `${p(t)}${h.optionText}`;
94
+ return {
95
+ type: t.type,
96
+ label: s(t),
97
+ key: `${i}`,
98
+ options: {
99
+ valueFormat: (u) => x(u, e)
100
+ }
101
+ };
102
+ }, C = (t) => {
103
+ const r = a.getOptions(t, "activeValue"), e = a.getOptions(t, "inactiveValue"), i = a.getOptions(t, "activeText"), u = a.getOptions(t, "inactiveText");
104
+ return {
105
+ type: t.type,
106
+ label: s(t),
107
+ key: p(t),
108
+ options: {
109
+ valueFormat: (f) => f === r ? i : f === e ? u : f
110
+ }
111
+ };
112
+ }, N = (t) => ({
113
+ type: t.type,
114
+ label: s(t),
115
+ key: p(t)
116
+ });
117
+ return (() => {
118
+ B(l).forEach((t) => {
119
+ o(t.label, V);
120
+ }), [
121
+ l.select,
122
+ l.treeSelect,
123
+ l.autoComplete
124
+ ].forEach((t) => {
125
+ o(t, j);
126
+ }), o(l.multirow, N), o(l.checkbox, E), o(l.radio, W), o(l.cascader, A), o(l.switch, C);
127
+ })(), (T = c[m.type]) == null ? void 0 : T.call(c, m);
128
+ };
129
+ return {
130
+ filterFieldItems: I
131
+ };
132
+ };
133
+ export {
134
+ d as useGenFieldItemList
135
+ };
@@ -1,135 +0,0 @@
1
- import { D, B as s } from "./baseImp-26b9c04a.js";
2
- import { c as l } from "./enum-type-bb2bfafa.js";
3
- import { f as G, n as J, o as M } from "./index-a7d766e7.js";
4
- import { l as k } from "./expression-490b4335.js";
5
- import { f as $, c as b } from "./enum-type-4a798b1a.js";
6
- import "./icon-a0e0cdb0.js";
7
- import "vue";
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 d = (h, _) => {
15
- const F = (m, a) => {
16
- const r = [], c = (o) => !!o.dynamicItemFlag;
17
- J(m, r, !1, c);
18
- var y = r == null ? void 0 : r.filter((o) => o == null ? void 0 : o.formItemFlag);
19
- return y == null || y.forEach((o) => {
20
- if (!(o != null && o.dynamicItemFlag))
21
- a.push({ widget: v(o) });
22
- else {
23
- const g = [];
24
- M(o, g, !1, c);
25
- const x = [];
26
- F(g, x), a.push({ widget: v(o), children: x });
27
- }
28
- }), a;
29
- }, p = (m) => s.getOptions(m, "name"), I = () => {
30
- const m = [];
31
- var a = _ ? G(h, (r) => p(r) === (_ == null ? void 0 : _.fName) || (r == null ? void 0 : r.type) == (_ == null ? void 0 : _.wdt), !1) : h;
32
- return F(a, m);
33
- }, v = (m) => {
34
- var O;
35
- const a = {}, r = (t, e) => {
36
- a[t] = e;
37
- }, c = (t) => {
38
- const e = s.getOptions(t, "content"), n = s.getOptions(t, "label"), i = s.getOptions(t, "name");
39
- return n || e || i;
40
- }, y = "|", o = ";", g = (t, e) => {
41
- var i;
42
- if (!e)
43
- return t;
44
- var n = $(t);
45
- return Array.isArray(n) ? (i = b(n)) == null ? void 0 : i.join(o) : t;
46
- }, x = (t, e) => {
47
- var i, u;
48
- var n = $(t);
49
- return e ? (u = n == null ? void 0 : n.map((f) => {
50
- var T;
51
- return (T = b(f)) == null ? void 0 : T.join(y);
52
- })) == null ? void 0 : u.join(o) : (i = b(n)) == null ? void 0 : i.join(y);
53
- }, V = (t) => ({
54
- type: t.type,
55
- label: c(t),
56
- key: p(t),
57
- options: {
58
- valueFormat: (e) => e
59
- }
60
- }), j = (t) => {
61
- let e = s.getOptions(t, "textName"), n = s.getOptions(t, "multiple");
62
- const i = e || `${p(t)}${k.optionText}`;
63
- return {
64
- type: t.type,
65
- label: c(t),
66
- key: `${i}`,
67
- options: {
68
- valueFormat: (u) => g(u, n)
69
- }
70
- };
71
- }, E = (t) => {
72
- const e = p(t);
73
- return {
74
- type: t.type,
75
- label: c(t),
76
- key: `${e}`,
77
- options: {
78
- valueFormat: (n) => g(n, !0)
79
- }
80
- };
81
- }, W = (t) => {
82
- const e = p(t);
83
- return {
84
- type: t.type,
85
- label: c(t),
86
- key: `${e}`,
87
- options: {
88
- valueFormat: (n) => n
89
- }
90
- };
91
- }, A = (t) => {
92
- let e = s.getOptions(t, "textName"), n = s.getOptions(t, "multiple");
93
- const i = e || `${p(t)}${k.optionText}`;
94
- return {
95
- type: t.type,
96
- label: c(t),
97
- key: `${i}`,
98
- options: {
99
- valueFormat: (u) => x(u, n)
100
- }
101
- };
102
- }, C = (t) => {
103
- const e = s.getOptions(t, "activeValue"), n = s.getOptions(t, "inactiveValue"), i = s.getOptions(t, "activeText"), u = s.getOptions(t, "inactiveText");
104
- return {
105
- type: t.type,
106
- label: c(t),
107
- key: p(t),
108
- options: {
109
- valueFormat: (f) => f === e ? i : f === n ? u : f
110
- }
111
- };
112
- }, B = (t) => ({
113
- type: t.type,
114
- label: c(t),
115
- key: p(t)
116
- });
117
- return (() => {
118
- D(l).forEach((t) => {
119
- r(t.label, V);
120
- }), [
121
- l.select,
122
- l.treeSelect,
123
- l.autoComplete
124
- ].forEach((t) => {
125
- r(t, j);
126
- }), r(l.multirow, B), r(l.checkbox, E), r(l.radio, W), r(l.cascader, A), r(l.switch, C);
127
- })(), (O = a[m.type]) == null ? void 0 : O.call(a, m);
128
- };
129
- return {
130
- filterFieldItems: I
131
- };
132
- };
133
- export {
134
- d as useGenFieldItemList
135
- };