@farris/ui-vue 1.3.3 → 1.3.4
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.
- package/components/binding-selector/index.esm.js +15 -15
- package/components/binding-selector/index.umd.cjs +1 -1
- package/components/condition/index.esm.js +107 -106
- package/components/condition/index.umd.cjs +1 -1
- package/components/data-grid/index.esm.js +1078 -1077
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/data-view/index.esm.js +1272 -1272
- package/components/data-view/index.umd.cjs +1 -1
- package/components/designer-canvas/index.esm.js +4355 -3954
- package/components/designer-canvas/index.umd.cjs +1 -1
- package/components/dynamic-form/index.esm.js +601 -593
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/event-parameter/index.esm.js +161 -117
- package/components/event-parameter/index.umd.cjs +1 -1
- package/components/events-editor/index.css +1 -1
- package/components/events-editor/index.esm.js +594 -575
- package/components/events-editor/index.umd.cjs +1 -1
- package/components/external-container/index.esm.js +771 -771
- package/components/external-container/index.umd.cjs +1 -1
- package/components/field-selector/index.esm.js +1268 -1268
- package/components/field-selector/index.umd.cjs +1 -1
- package/components/filter-bar/index.css +1 -1
- package/components/filter-bar/index.esm.js +3768 -3700
- package/components/filter-bar/index.umd.cjs +1 -1
- package/components/flow-canvas/index.esm.js +4274 -3873
- package/components/flow-canvas/index.umd.cjs +1 -1
- package/components/list-view/index.esm.js +935 -935
- package/components/list-view/index.umd.cjs +1 -1
- package/components/lookup/index.esm.js +1672 -1671
- package/components/lookup/index.umd.cjs +1 -1
- package/components/mapping-editor/index.esm.js +1107 -1106
- package/components/mapping-editor/index.umd.cjs +1 -1
- package/components/property-panel/index.css +1 -1
- package/components/query-solution/index.css +1 -1
- package/components/query-solution/index.esm.js +5721 -5490
- package/components/query-solution/index.umd.cjs +6 -6
- package/components/schema-selector/index.esm.js +974 -972
- package/components/schema-selector/index.umd.cjs +2 -2
- package/components/section/index.esm.js +2107 -417
- package/components/section/index.umd.cjs +1 -1
- package/components/tabs/index.esm.js +577 -575
- package/components/tabs/index.umd.cjs +1 -1
- package/components/textarea/index.esm.js +84 -79
- package/components/textarea/index.umd.cjs +1 -1
- package/components/tree-grid/index.esm.js +1554 -1554
- package/components/tree-grid/index.umd.cjs +1 -1
- package/components/tree-view/index.esm.js +1269 -1269
- package/components/tree-view/index.umd.cjs +1 -1
- package/farris.all.esm.js +17526 -17071
- package/farris.all.umd.cjs +13 -13
- package/index.css +1 -1
- package/package.json +1 -1
- package/types/dynamic-form/src/designer/form-group-use-designer-rules.d.ts +1 -2
- package/types/entity-binding-selector/composition/use-entity-tree.d.ts +14 -3
- package/types/entity-binding-selector/composition/use-field-tree.d.ts +28 -0
- package/types/event-parameter/src/composition/use-general-editor.d.ts +26 -0
- package/types/event-parameter/src/event-parameter.props.d.ts +4 -4
- package/types/events-editor/src/composition/types.d.ts +1 -1
- package/types/query-solution/src/composition/types.d.ts +55 -0
- package/types/query-solution/src/composition/use-condition.d.ts +19 -0
- package/types/query-solution/src/designer/query-solution-config/composition/types.d.ts +3 -2
- package/types/query-solution/src/designer/query-solution-config/converter/query-solution-config-property.converter.d.ts +4 -0
- package/types/section/index.d.ts +15 -0
- package/types/section/src/designer/section-header.design.component.d.ts +4 -0
- package/types/section/src/designer/section-toolbar-item.props.d.ts +19 -0
- package/types/section/src/designer/section-toolbar.design.component.d.ts +3 -0
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import { FDynamicFormGroup as
|
|
3
|
-
import { F_MODAL_SERVICE_TOKEN as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
1
|
+
import { ref as r, computed as V, reactive as B, defineComponent as _, inject as $, watch as H, createVNode as p, Fragment as U, isVNode as G } from "vue";
|
|
2
|
+
import { FDynamicFormGroup as z } from "../dynamic-form/index.esm.js";
|
|
3
|
+
import { F_MODAL_SERVICE_TOKEN as K } from "../modal/index.esm.js";
|
|
4
|
+
import q, { FTabPage as J } from "../tabs/index.esm.js";
|
|
5
|
+
import Q from "../tree-view/index.esm.js";
|
|
6
|
+
import W from "../textarea/index.esm.js";
|
|
7
|
+
import X, { FLayoutPane as P } from "../layout/index.esm.js";
|
|
8
8
|
var c = /* @__PURE__ */ ((e) => (e.Default = "Default", e.Textbox = "Textbox", e.Numberbox = "Numberbox", e.Combolist = "Combolist", e.Select = "Select", e.Checkbox = "Checkbox", e.Switch = "Switch", e.Tags = "Tags", e.SortEditor = "SortEditor", e.FilterEditor = "FilterEditor", e.DataEditor = "DataEditor", e.MenuIdSelector = "MenuIdSelector", e.AppIdSelector = "AppIdSelector", e.ComboLookup = "ComboLookup", e.ConfigurationParameterEditor = "ConfigurationParameterEditor", e.FieldMappingEditor = "FieldMappingEditor", e))(c || {});
|
|
9
|
-
const
|
|
9
|
+
const h = {}, Y = {
|
|
10
10
|
/** 编辑器类型 */
|
|
11
11
|
data: { type: Object, default: [] },
|
|
12
12
|
/** 复选框组件id */
|
|
@@ -29,12 +29,18 @@ const C = {}, X = {
|
|
|
29
29
|
// 只读
|
|
30
30
|
readonly: { type: Boolean, default: !1 },
|
|
31
31
|
// 必填
|
|
32
|
-
disabled: { type: Boolean, default: !1 }
|
|
32
|
+
disabled: { type: Boolean, default: !1 },
|
|
33
|
+
// 通用参数编辑器字段数据
|
|
34
|
+
fieldData: { type: Object, default: [] },
|
|
35
|
+
// 通用参数编辑器变量数据
|
|
36
|
+
varData: { type: Object, default: [] },
|
|
37
|
+
// 通用参数编辑器表单数据
|
|
38
|
+
formData: { type: Object, default: [] }
|
|
33
39
|
};
|
|
34
|
-
function
|
|
35
|
-
const o =
|
|
40
|
+
function Z(e) {
|
|
41
|
+
const o = r(e.editorType);
|
|
36
42
|
function s() {
|
|
37
|
-
|
|
43
|
+
h[o.value] = {
|
|
38
44
|
type: "combo-list",
|
|
39
45
|
componentProps: {
|
|
40
46
|
data: e.data,
|
|
@@ -44,38 +50,38 @@ function Y(e) {
|
|
|
44
50
|
}
|
|
45
51
|
};
|
|
46
52
|
}
|
|
47
|
-
function
|
|
53
|
+
function a(u) {
|
|
48
54
|
}
|
|
49
|
-
return { createEditorProps: s, onValueChange:
|
|
55
|
+
return { createEditorProps: s, onValueChange: a };
|
|
50
56
|
}
|
|
51
|
-
function
|
|
52
|
-
const o =
|
|
57
|
+
function ee(e) {
|
|
58
|
+
const o = r(e.editorType);
|
|
53
59
|
function s() {
|
|
54
|
-
|
|
60
|
+
h[o.value] = {
|
|
55
61
|
type: "switch",
|
|
56
62
|
componentProps: {}
|
|
57
63
|
};
|
|
58
64
|
}
|
|
59
|
-
function
|
|
65
|
+
function a() {
|
|
60
66
|
}
|
|
61
|
-
return { createEditorProps: s, onValueChange:
|
|
67
|
+
return { createEditorProps: s, onValueChange: a };
|
|
62
68
|
}
|
|
63
69
|
function k(e) {
|
|
64
|
-
const o =
|
|
65
|
-
function
|
|
66
|
-
|
|
70
|
+
const o = r(e.editorType), s = V(() => o.value === c.Default);
|
|
71
|
+
function a() {
|
|
72
|
+
h[o.value] = {
|
|
67
73
|
type: "input-group",
|
|
68
74
|
componentProps: {}
|
|
69
75
|
};
|
|
70
76
|
}
|
|
71
77
|
function u() {
|
|
72
78
|
}
|
|
73
|
-
return { createEditorProps:
|
|
79
|
+
return { createEditorProps: a, shouldRenderAppendButton: s, onValueChange: u };
|
|
74
80
|
}
|
|
75
|
-
function
|
|
76
|
-
const o =
|
|
77
|
-
function
|
|
78
|
-
|
|
81
|
+
function te(e) {
|
|
82
|
+
const o = r(e.editorType), s = V(() => o.value === c.Default);
|
|
83
|
+
function a() {
|
|
84
|
+
h[o.value] = {
|
|
79
85
|
type: "combo-tree",
|
|
80
86
|
componentProps: {
|
|
81
87
|
data: e.data,
|
|
@@ -94,13 +100,13 @@ function ee(e) {
|
|
|
94
100
|
}
|
|
95
101
|
function u() {
|
|
96
102
|
}
|
|
97
|
-
return { createEditorProps:
|
|
103
|
+
return { createEditorProps: a, shouldRenderAppendButton: s, onValueChange: u };
|
|
98
104
|
}
|
|
99
|
-
function
|
|
100
|
-
const o =
|
|
105
|
+
function oe(e) {
|
|
106
|
+
const o = r(e.editorType), s = Z(e), a = ee(e), u = k(e), C = te(e);
|
|
101
107
|
function b() {
|
|
102
|
-
const
|
|
103
|
-
return
|
|
108
|
+
const f = o.value;
|
|
109
|
+
return f === c.Combolist || f === c.Select ? s.createEditorProps() : f === c.Checkbox || f === c.FilterEditor || f === c.DataEditor || f === c.SortEditor || f === c.MenuIdSelector || f === c.AppIdSelector || (f === c.ComboLookup ? C.createEditorProps() : f === c.Numberbox || (f === c.Switch ? a.createEditorProps() : u.createEditorProps())), h[o.value];
|
|
104
110
|
}
|
|
105
111
|
function g() {
|
|
106
112
|
return "input-group";
|
|
@@ -110,138 +116,176 @@ function te(e) {
|
|
|
110
116
|
}
|
|
111
117
|
return { getEditorConfig: b, getEditorType: g, getEditorMap: F };
|
|
112
118
|
}
|
|
113
|
-
function
|
|
119
|
+
function ae(e) {
|
|
120
|
+
const o = B([
|
|
121
|
+
{
|
|
122
|
+
id: "tabField",
|
|
123
|
+
title: "字段",
|
|
124
|
+
treeConfigs: {
|
|
125
|
+
id: "tabFieldTree",
|
|
126
|
+
columns: [{ field: "name" }],
|
|
127
|
+
data: [],
|
|
128
|
+
onSelectNode: () => {
|
|
129
|
+
},
|
|
130
|
+
componentRef: r()
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
id: "tabVar",
|
|
135
|
+
title: "变量",
|
|
136
|
+
treeConfigs: {
|
|
137
|
+
id: "tabVarTree",
|
|
138
|
+
data: []
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
id: "tabForm",
|
|
143
|
+
title: "表单组件",
|
|
144
|
+
treeConfigs: {
|
|
145
|
+
id: "tabFormTree",
|
|
146
|
+
data: []
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
]);
|
|
150
|
+
return o[0].treeConfigs.data = e.fieldData, o[1].treeConfigs.data = e.varData, o[2].treeConfigs.data = e.formData, { tabs: o };
|
|
151
|
+
}
|
|
152
|
+
function ne(e) {
|
|
114
153
|
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !G(e);
|
|
115
154
|
}
|
|
116
|
-
const m = /* @__PURE__ */
|
|
155
|
+
const m = /* @__PURE__ */ _({
|
|
117
156
|
name: "FEventParameter",
|
|
118
|
-
props:
|
|
157
|
+
props: Y,
|
|
119
158
|
emits: ["valueChange", "onBlur", "applicationSelectionChange", "componentSelectionChange", "parameterChanged", "update:modelValue", "update:parameterValue", "confirm"],
|
|
120
159
|
setup(e, o) {
|
|
121
|
-
const s =
|
|
122
|
-
|
|
123
|
-
const
|
|
124
|
-
getEditorConfig:
|
|
125
|
-
} =
|
|
160
|
+
const s = r(e.id);
|
|
161
|
+
r(e.label), r(e.showLabel);
|
|
162
|
+
const a = r(e.modelValue), u = r(e.modelValue), {
|
|
163
|
+
getEditorConfig: C
|
|
164
|
+
} = oe(e);
|
|
126
165
|
k(e);
|
|
127
|
-
const b =
|
|
128
|
-
|
|
129
|
-
const g =
|
|
166
|
+
const b = C();
|
|
167
|
+
r();
|
|
168
|
+
const g = r();
|
|
169
|
+
r(e.paramData);
|
|
170
|
+
const F = $(K), f = r({
|
|
130
171
|
enable: !1
|
|
131
|
-
}),
|
|
172
|
+
}), x = r({
|
|
132
173
|
customRowStatus: (t) => ((!t.raw.parent || !t.raw.parentId) && (t.collapse = !0), t)
|
|
133
|
-
}),
|
|
174
|
+
}), w = V(() => ({
|
|
134
175
|
// 编辑器类型
|
|
135
176
|
type: b == null ? void 0 : b.type,
|
|
136
177
|
/** 根据不同编辑器 设置不同编辑器的属性 */
|
|
137
178
|
...b == null ? void 0 : b.componentProps
|
|
138
|
-
}))
|
|
139
|
-
|
|
179
|
+
})), {
|
|
180
|
+
tabs: D
|
|
181
|
+
} = ae(e);
|
|
182
|
+
function I(t) {
|
|
140
183
|
o.emit("update:modelValue", t), o.emit("valueChange", t);
|
|
141
184
|
}
|
|
142
|
-
function
|
|
143
|
-
const l =
|
|
144
|
-
selectionEnd:
|
|
145
|
-
} =
|
|
146
|
-
return
|
|
185
|
+
function S(t, n, d) {
|
|
186
|
+
const l = n.selectionStart || 0, {
|
|
187
|
+
selectionEnd: i
|
|
188
|
+
} = n, v = i - l, y = v > 0, E = d && d.split("") || [];
|
|
189
|
+
return y ? E.splice(l, v, t) : E.splice(l, 0, t), E.join("");
|
|
147
190
|
}
|
|
148
|
-
function
|
|
191
|
+
function T(t, n) {
|
|
149
192
|
const {
|
|
150
193
|
data: d
|
|
151
194
|
} = t;
|
|
152
|
-
let l,
|
|
153
|
-
label: v
|
|
154
|
-
bindTo: h
|
|
195
|
+
let l, i = t.parent, {
|
|
196
|
+
label: v
|
|
155
197
|
} = d;
|
|
156
|
-
for (;
|
|
157
|
-
if (
|
|
158
|
-
v =
|
|
198
|
+
for (; i; )
|
|
199
|
+
if (i.nodeType === "field")
|
|
200
|
+
v = i.data.label + "/" + v, i = i.parentNode;
|
|
159
201
|
else {
|
|
160
|
-
l =
|
|
202
|
+
l = i, l.includes("_") && (l = l.slice(l.indexOf("_") + 1));
|
|
161
203
|
break;
|
|
162
204
|
}
|
|
163
205
|
if (l)
|
|
164
|
-
return
|
|
206
|
+
return S(`{DATA~/${v}}`, n);
|
|
165
207
|
}
|
|
166
|
-
function
|
|
208
|
+
function O(t, n) {
|
|
167
209
|
const {
|
|
168
210
|
statePath: d
|
|
169
211
|
} = t;
|
|
170
|
-
let l =
|
|
212
|
+
let l = n.value;
|
|
171
213
|
if (d) {
|
|
172
|
-
const
|
|
173
|
-
if (l = d,
|
|
174
|
-
const
|
|
175
|
-
|
|
214
|
+
const i = d.split("/");
|
|
215
|
+
if (l = d, i.length === 3) {
|
|
216
|
+
const y = `#{${i[1]}}`;
|
|
217
|
+
i.splice(1, 1, y), l = i.join("/");
|
|
176
218
|
}
|
|
177
219
|
l = `{UISTATE~${l}}`;
|
|
178
220
|
}
|
|
179
|
-
return
|
|
221
|
+
return S(l, n);
|
|
180
222
|
}
|
|
181
|
-
function
|
|
223
|
+
function R(t, n, d) {
|
|
182
224
|
switch (t) {
|
|
183
225
|
case "tabForm":
|
|
184
|
-
u.value =
|
|
226
|
+
u.value = S(`#{${d.data.id}}`, g.value.elementRef.value, a.value);
|
|
185
227
|
break;
|
|
186
228
|
case "tabField":
|
|
187
|
-
u.value =
|
|
229
|
+
u.value = T(d, g.value.elementRef.value);
|
|
188
230
|
break;
|
|
189
231
|
case "tabVar":
|
|
190
|
-
u.value =
|
|
232
|
+
u.value = O(d.data, g.value.elementRef.value);
|
|
191
233
|
break;
|
|
192
234
|
}
|
|
193
235
|
o.emit("paramChanged", {
|
|
194
236
|
tabId: t,
|
|
195
|
-
index:
|
|
237
|
+
index: n,
|
|
196
238
|
raw: d,
|
|
197
|
-
value:
|
|
239
|
+
value: a.value
|
|
198
240
|
});
|
|
199
241
|
}
|
|
200
|
-
function
|
|
242
|
+
function M() {
|
|
201
243
|
return () => {
|
|
202
244
|
let t;
|
|
203
|
-
return
|
|
204
|
-
|
|
245
|
+
return p(X, {
|
|
246
|
+
style: "padding:0 10px"
|
|
247
|
+
}, {
|
|
248
|
+
default: () => [p(P, {
|
|
205
249
|
position: "left",
|
|
206
250
|
width: 300,
|
|
207
251
|
resizable: !1
|
|
208
252
|
}, {
|
|
209
|
-
default: () => [
|
|
210
|
-
key:
|
|
211
|
-
id:
|
|
212
|
-
title:
|
|
253
|
+
default: () => [p(q, null, ne(t = D.map((n) => p(J, {
|
|
254
|
+
key: n.id,
|
|
255
|
+
id: n.id,
|
|
256
|
+
title: n.title
|
|
213
257
|
}, {
|
|
214
|
-
default: () => [
|
|
215
|
-
rowNumber:
|
|
216
|
-
rowOption:
|
|
217
|
-
key:
|
|
218
|
-
|
|
219
|
-
columns: a.treeConfigs.columns,
|
|
220
|
-
data: a.treeConfigs.data,
|
|
258
|
+
default: () => [p(Q, {
|
|
259
|
+
rowNumber: f,
|
|
260
|
+
rowOption: x.value,
|
|
261
|
+
key: n.treeConfigs.id,
|
|
262
|
+
data: n.treeConfigs.data,
|
|
221
263
|
fit: !0,
|
|
222
264
|
height: 300,
|
|
223
|
-
onDoubleClickRow: function(l,
|
|
224
|
-
|
|
265
|
+
onDoubleClickRow: function(l, i) {
|
|
266
|
+
R(n.id, l, i);
|
|
225
267
|
}
|
|
226
268
|
}, null)]
|
|
227
269
|
}))) ? t : {
|
|
228
270
|
default: () => [t]
|
|
229
271
|
})]
|
|
230
|
-
}),
|
|
272
|
+
}), p(P, {
|
|
231
273
|
position: "center"
|
|
232
274
|
}, {
|
|
233
|
-
default: () => [
|
|
275
|
+
default: () => [p(W, {
|
|
234
276
|
ref: g,
|
|
235
277
|
modelValue: u.value,
|
|
236
|
-
"onUpdate:modelValue": (
|
|
278
|
+
"onUpdate:modelValue": (n) => u.value = n,
|
|
279
|
+
rows: 10,
|
|
280
|
+
autoHeight: !0
|
|
237
281
|
}, null)]
|
|
238
282
|
})]
|
|
239
283
|
});
|
|
240
284
|
};
|
|
241
285
|
}
|
|
242
|
-
function
|
|
243
|
-
u.value =
|
|
244
|
-
const t =
|
|
286
|
+
function A() {
|
|
287
|
+
u.value = a.value;
|
|
288
|
+
const t = F.open({
|
|
245
289
|
title: "参数编辑器",
|
|
246
290
|
width: 900,
|
|
247
291
|
height: 500,
|
|
@@ -249,7 +293,7 @@ const m = /* @__PURE__ */ j({
|
|
|
249
293
|
showHeader: !0,
|
|
250
294
|
showCloseButton: !0,
|
|
251
295
|
draggable: !0,
|
|
252
|
-
render:
|
|
296
|
+
render: M(),
|
|
253
297
|
buttons: [{
|
|
254
298
|
class: "btn btn-light",
|
|
255
299
|
text: "取消",
|
|
@@ -260,43 +304,43 @@ const m = /* @__PURE__ */ j({
|
|
|
260
304
|
class: "btn btn-primary",
|
|
261
305
|
text: "确定",
|
|
262
306
|
handle: () => {
|
|
263
|
-
|
|
307
|
+
a.value = u.value, o.emit("update:modelValue", a.value), o.emit("confirm", a.value), t.destroy();
|
|
264
308
|
}
|
|
265
309
|
}]
|
|
266
310
|
});
|
|
267
311
|
}
|
|
268
|
-
function
|
|
269
|
-
return
|
|
312
|
+
function N() {
|
|
313
|
+
return w.value.type === "input-group" ? p("span", {
|
|
270
314
|
class: "f-icon f-icon-lookup",
|
|
271
|
-
onClick:
|
|
315
|
+
onClick: A,
|
|
272
316
|
style: "margin-top: 2px;margin-right: 5px;color: rgba(0, 0, 0, .25)"
|
|
273
|
-
}, null) :
|
|
317
|
+
}, null) : p(U, null, null);
|
|
274
318
|
}
|
|
275
|
-
|
|
276
|
-
t !==
|
|
319
|
+
H(() => e.modelValue, (t, n) => {
|
|
320
|
+
t !== n && (a.value = t);
|
|
277
321
|
});
|
|
278
|
-
const
|
|
322
|
+
const j = () => {
|
|
279
323
|
o.emit("update:modelValue", "");
|
|
280
|
-
},
|
|
324
|
+
}, L = () => g.value.elementRef;
|
|
281
325
|
return o.expose({
|
|
282
|
-
getInputRef:
|
|
283
|
-
}), () =>
|
|
326
|
+
getInputRef: L
|
|
327
|
+
}), () => p(z, {
|
|
284
328
|
id: s.value,
|
|
285
|
-
editor:
|
|
286
|
-
modelValue:
|
|
287
|
-
"onUpdate:modelValue": (t) =>
|
|
329
|
+
editor: w.value,
|
|
330
|
+
modelValue: a.value,
|
|
331
|
+
"onUpdate:modelValue": (t) => a.value = t,
|
|
288
332
|
showLabel: !1,
|
|
289
|
-
onChange:
|
|
290
|
-
onClear:
|
|
333
|
+
onChange: I,
|
|
334
|
+
onClear: j
|
|
291
335
|
}, {
|
|
292
|
-
groupTextTemplate: () =>
|
|
336
|
+
groupTextTemplate: () => N()
|
|
293
337
|
});
|
|
294
338
|
}
|
|
295
339
|
});
|
|
296
340
|
m.install = (e) => {
|
|
297
341
|
e.component(m.name, m);
|
|
298
342
|
};
|
|
299
|
-
m.register = (e, o, s,
|
|
343
|
+
m.register = (e, o, s, a) => {
|
|
300
344
|
e["event-parameter"] = m, o["event-parameter"] = m;
|
|
301
345
|
};
|
|
302
346
|
m.registerDesigner = (e, o, s) => {
|
|
@@ -306,6 +350,6 @@ export {
|
|
|
306
350
|
c as EditorType,
|
|
307
351
|
m as FEventParameter,
|
|
308
352
|
m as default,
|
|
309
|
-
|
|
310
|
-
|
|
353
|
+
h as editorMap,
|
|
354
|
+
Y as eventParameterProps
|
|
311
355
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(l,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue"),require("../dynamic-form/index.umd.js"),require("../modal/index.umd.js"),require("../tabs/index.umd.js"),require("../tree-view/index.umd.js"),require("../textarea/index.umd.js"),require("../layout/index.umd.js")):typeof define=="function"&&define.amd?define(["exports","vue","../dynamic-form/index.umd.js","../modal/index.umd.js","../tabs/index.umd.js","../tree-view/index.umd.js","../textarea/index.umd.js","../layout/index.umd.js"],t):(l=typeof globalThis<"u"?globalThis:l||self,t(l["event-parameter"]={},l.Vue,l.dynamicForm,l.modal,l.FTabs,l.FTreeView,l.FTextarea,l.FLayout))})(this,function(l,t,N,k,P,D,T,y){"use strict";var d=(e=>(e.Default="Default",e.Textbox="Textbox",e.Numberbox="Numberbox",e.Combolist="Combolist",e.Select="Select",e.Checkbox="Checkbox",e.Switch="Switch",e.Tags="Tags",e.SortEditor="SortEditor",e.FilterEditor="FilterEditor",e.DataEditor="DataEditor",e.MenuIdSelector="MenuIdSelector",e.AppIdSelector="AppIdSelector",e.ComboLookup="ComboLookup",e.ConfigurationParameterEditor="ConfigurationParameterEditor",e.FieldMappingEditor="FieldMappingEditor",e))(d||{});const C={},v={data:{type:Object,default:[]},id:{type:String,default:""},editable:{type:Boolean,default:!0},editorType:{type:String,default:""},label:{type:String,default:""},modelValue:{type:[String,Boolean,Array,Number],default:""},paramData:{type:Object,default:[]},showLabel:{type:Boolean,default:!0},idField:{type:String,default:""},textField:{type:String,default:""},readonly:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},fieldData:{type:Object,default:[]},varData:{type:Object,default:[]},formData:{type:Object,default:[]}};function I(e){const o=t.ref(e.editorType);function f(){C[o.value]={type:"combo-list",componentProps:{data:e.data,editable:e.editable,idField:e.idField||"id",textField:e.textField||"label"}}}function n(c){}return{createEditorProps:f,onValueChange:n}}function M(e){const o=t.ref(e.editorType);function f(){C[o.value]={type:"switch",componentProps:{}}}function n(){}return{createEditorProps:f,onValueChange:n}}function j(e){const o=t.ref(e.editorType),f=t.computed(()=>o.value===d.Default);function n(){C[o.value]={type:"input-group",componentProps:{}}}function c(){}return{createEditorProps:n,shouldRenderAppendButton:f,onValueChange:c}}function O(e){const o=t.ref(e.editorType),f=t.computed(()=>o.value===d.Default);function n(){C[o.value]={type:"combo-tree",componentProps:{data:e.data,placeholder:"请选择",enableSearch:!1,enableClear:!0,editable:!0,readonly:!1,disabled:!1,idField:e.idField||"id",textField:e.textField||"name",mapFields:{id:"selectId"},multiSelect:!1}}}function c(){}return{createEditorProps:n,shouldRenderAppendButton:f,onValueChange:c}}function R(e){const o=t.ref(e.editorType),f=I(e),n=M(e),c=j(e),S=O(e);function b(){const m=o.value;return m===d.Combolist||m===d.Select?f.createEditorProps():m===d.Checkbox||m===d.FilterEditor||m===d.DataEditor||m===d.SortEditor||m===d.MenuIdSelector||m===d.AppIdSelector||(m===d.ComboLookup?S.createEditorProps():m===d.Numberbox||(m===d.Switch?n.createEditorProps():c.createEditorProps())),C[o.value]}function g(){return"input-group"}function F(){return{}}return{getEditorConfig:b,getEditorType:g,getEditorMap:F}}function A(e){const o=t.reactive([{id:"tabField",title:"字段",treeConfigs:{id:"tabFieldTree",columns:[{field:"name"}],data:[],onSelectNode:()=>{},componentRef:t.ref()}},{id:"tabVar",title:"变量",treeConfigs:{id:"tabVarTree",data:[]}},{id:"tabForm",title:"表单组件",treeConfigs:{id:"tabFormTree",data:[]}}]);return o[0].treeConfigs.data=e.fieldData,o[1].treeConfigs.data=e.varData,o[2].treeConfigs.data=e.formData,{tabs:o}}function B(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!t.isVNode(e)}const p=t.defineComponent({name:"FEventParameter",props:v,emits:["valueChange","onBlur","applicationSelectionChange","componentSelectionChange","parameterChanged","update:modelValue","update:parameterValue","confirm"],setup(e,o){const f=t.ref(e.id);t.ref(e.label),t.ref(e.showLabel);const n=t.ref(e.modelValue),c=t.ref(e.modelValue),{getEditorConfig:S}=R(e);j(e);const b=S();t.ref();const g=t.ref();t.ref(e.paramData);const F=t.inject(k.F_MODAL_SERVICE_TOKEN),m=t.ref({enable:!1}),L=t.ref({customRowStatus:a=>((!a.raw.parent||!a.raw.parentId)&&(a.collapse=!0),a)}),w=t.computed(()=>({type:b==null?void 0:b.type,...b==null?void 0:b.componentProps})),{tabs:_}=A(e);function q(a){o.emit("update:modelValue",a),o.emit("valueChange",a)}function V(a,r,s){const i=r.selectionStart||0,{selectionEnd:u}=r,h=u-i,x=h>0,E=s&&s.split("")||[];return x?E.splice(i,h,a):E.splice(i,0,a),E.join("")}function $(a,r){const{data:s}=a;let i,u=a.parent,{label:h}=s;for(;u;)if(u.nodeType==="field")h=u.data.label+"/"+h,u=u.parentNode;else{i=u,i.includes("_")&&(i=i.slice(i.indexOf("_")+1));break}if(i)return V(`{DATA~/${h}}`,r)}function H(a,r){const{statePath:s}=a;let i=r.value;if(s){const u=s.split("/");if(i=s,u.length===3){const x=`#{${u[1]}}`;u.splice(1,1,x),i=u.join("/")}i=`{UISTATE~${i}}`}return V(i,r)}function U(a,r,s){switch(a){case"tabForm":c.value=V(`#{${s.data.id}}`,g.value.elementRef.value,n.value);break;case"tabField":c.value=$(s,g.value.elementRef.value);break;case"tabVar":c.value=H(s.data,g.value.elementRef.value);break}o.emit("paramChanged",{tabId:a,index:r,raw:s,value:n.value})}function G(){return()=>{let a;return t.createVNode(y,{style:"padding:0 10px"},{default:()=>[t.createVNode(y.FLayoutPane,{position:"left",width:300,resizable:!1},{default:()=>[t.createVNode(P,null,B(a=_.map(r=>t.createVNode(P.FTabPage,{key:r.id,id:r.id,title:r.title},{default:()=>[t.createVNode(D,{rowNumber:m,rowOption:L.value,key:r.treeConfigs.id,data:r.treeConfigs.data,fit:!0,height:300,onDoubleClickRow:function(i,u){U(r.id,i,u)}},null)]})))?a:{default:()=>[a]})]}),t.createVNode(y.FLayoutPane,{position:"center"},{default:()=>[t.createVNode(T,{ref:g,modelValue:c.value,"onUpdate:modelValue":r=>c.value=r,rows:10,autoHeight:!0},null)]})]})}}function z(){c.value=n.value;const a=F.open({title:"参数编辑器",width:900,height:500,fitContent:!1,showHeader:!0,showCloseButton:!0,draggable:!0,render:G(),buttons:[{class:"btn btn-light",text:"取消",handle:()=>{a.destroy()}},{class:"btn btn-primary",text:"确定",handle:()=>{n.value=c.value,o.emit("update:modelValue",n.value),o.emit("confirm",n.value),a.destroy()}}]})}function K(){return w.value.type==="input-group"?t.createVNode("span",{class:"f-icon f-icon-lookup",onClick:z,style:"margin-top: 2px;margin-right: 5px;color: rgba(0, 0, 0, .25)"},null):t.createVNode(t.Fragment,null,null)}t.watch(()=>e.modelValue,(a,r)=>{a!==r&&(n.value=a)});const J=()=>{o.emit("update:modelValue","")},Q=()=>g.value.elementRef;return o.expose({getInputRef:Q}),()=>t.createVNode(N.FDynamicFormGroup,{id:f.value,editor:w.value,modelValue:n.value,"onUpdate:modelValue":a=>n.value=a,showLabel:!1,onChange:q,onClear:J},{groupTextTemplate:()=>K()})}});p.install=e=>{e.component(p.name,p)},p.register=(e,o,f,n)=>{e["event-parameter"]=p,o["event-parameter"]=p},p.registerDesigner=(e,o,f)=>{e["event-parameter"]=p,o["event-parameter"]=p},l.EditorType=d,l.FEventParameter=p,l.default=p,l.editorMap=C,l.eventParameterProps=v,Object.defineProperties(l,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.f-page-events-editor-command-source{background-color:#fff;z-index:2001;width:100%;border:2px solid #e7eced;box-shadow:0 1px 18px #e8ebf3;min-width:220px;border-radius:10px;position:relative;height:
|
|
1
|
+
.f-page-events-editor-command-source{background-color:#fff;z-index:2001;width:100%;border:2px solid #e7eced;box-shadow:0 1px 18px #e8ebf3;min-width:220px;border-radius:10px;position:relative;height:410px;padding:10px 10px 0;display:flex;flex-direction:column}.f-page-events-editor-command-source:before{content:"";width:0;height:0;position:absolute;right:54px;bottom:447px;border-width:7px;border-style:solid;border-color:transparent transparent #e2e5e6}.f-page-events-editor-command-source:after{content:"";width:0;height:0;position:absolute;right:54px;bottom:445px;border-width:7px;border-style:solid dashed dashed;border-color:transparent transparent #ffffff}.f-page-command-source-choice{overflow-x:hidden;overflow-y:scroll;padding:5px 0;border-radius:3px;min-width:200px;flex:2 2 0}.f-page-events-editor-switch{background:#eff5ff;border-radius:10px;margin:10px;min-width:200px;height:32px;display:flex;text-align:center}.namelist{font-family:PingFangSC-Regular;font-size:14px;color:#446a9fd9;line-height:16px;margin:8px 13px;flex-grow:1;cursor:pointer}.namelist-focus{opacity:.6;font-family:PingFangSC-Regular;font-size:14px;line-height:16px;color:#226eff;height:32px;padding:8px 16px;flex-grow:1;background:#ffffffe6;box-shadow:0 4px 18px #024bc133;border-radius:10px;cursor:pointer}.f-page-internals-new-command{margin:0 2px 0 13px}.f-page-internals-new-command-func1,.f-page-internals-new-command-func2,.f-page-internals-new-command-func3{display:flex;margin:4px 1px}.f-function-class{margin:0 0 0 5px;font-family:PingFangSC-Regular;color:#4f6b9d;cursor:pointer;width:65px;font-size:13px;color:#308aff;line-height:26px;font-weight:400;flex:10}.f-page-internals-close{font-family:PingFangSC-Regular;font-size:13px;margin:7.75px 10px;color:#6d7278;cursor:pointer;display:block;color:#425159;font-weight:400;text-align:center}.f-command-breakline{color:#b4bccc;margin:2px;overflow:hidden;white-space:nowrap;text-overflow:clip;height:10px}.f-page-internals-controller{padding-right:16px}.f-page-internals-controller-name{padding-left:15px;font-family:PingFangSC-Regular;font-size:13px;color:#b4bccc;height:20px;overflow:hidden;text-overflow:clip;white-space:nowrap}.f-page-internals-command{padding-left:16px;border-radius:6px}.f-page-internals-command:hover{background-color:#348eff;cursor:pointer}.f-page-internals-command-name{font-family:PingFangSC-Regular;font-size:13px;color:#425159;line-height:24px}.f-page-internals-command-name:hover{color:#fff}.f-page-parameter-editor{background:#fff;border-radius:4px}.f-page-parameter-editor-group{margin:0 12px;background:#fff;border-radius:4px;width:95%}.f-parameter-tooltip-class{background-color:#878d99;width:100px}.f-page-parameter-editor-first-row{padding:5px 5px 0;width:100%;display:flex;background-color:#fff;justify-content:space-between}.f-page-parameter-editor-command-name{font-family:PingFangSC-Regular;font-size:13px;color:#878d99;display:inline-block;margin:7px 0 7px 12px;max-width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1}.f-page-parameter-editor-first-row-icon{margin-left:5px;margin-right:5px;height:25px;background-color:#fff;float:right;margin-top:8px}.f-page-parameter-editor-parameter-name{font-family:PingFangSC-Regular;font-size:13px;color:#878d99;padding:8px 0 4px 9px}.f-page-parameter-editor-row2{padding:0 8px 8px}.f-page-parameter-editor-input{border:1px solid rgb(224,223,223)}.f-page-parameter-editor-row3{margin:5px}.f-page-parameter-editor-row3-cancel{margin-left:5px;height:25px}.f-page-parameter-editor-row3-save{margin-left:35px;height:25px}.f-icon.f-icon-yxs_delete:hover{color:#2a75ee}.f-icon.f-icon-yxs_delete{color:#a7b0bb}.f-icon.f-icon-edit-button:hover{color:#2a75ee;cursor:pointer}.f-icon.f-icon-edit-button{color:#a7b0bb}.f-page-parameter-editor-btn{height:35px;width:100%}.btn-finish{height:25px;margin-right:10px;float:right;width:40px;padding:3px 5px;border:1px solid #e5e7e9;font-size:12px;color:#5a8cff;box-shadow:0 2px 3px #1f23290f;border-radius:3px;margin-top:5px;text-align:center}.btn-finish:hover{cursor:pointer;border:1px solid #5a8cff}.f-page-parameter-editor-targetComponent{font-family:PingFangSC-Regular;font-size:13px;color:#878d99;margin:0 0 2px 8px}.f-page-parameter-editor-targetComponent-topic{padding:3px 0}.f-page-parameter-editor-targetComponent-dropdown{padding:0 8px 0 0}.f-page-events-editor{display:-webkit-box;position:relative}.f-page-events-popover{position:absolute;top:0;width:100%;z-index:2000;background-color:#0000;opacity:0;height:calc(100vh - 50px)}.f-page-events-editor-content{width:100%;min-width:200px;background-color:#fff}.f-page-events-editor-events{width:98%;max-height:136px;background:#fff;box-shadow:0 2px 10px #00000026;border-color:#6ca0f5;border-radius:4px;margin-left:2px;padding:8px 0 2px;overflow:scroll;text-overflow:ellipsis;white-space:nowrap}:host ::ng-deep button:focus{outline:unset}.f-page-events-editor-top-button{background-color:#fff}.f-page-events-editor-top-button:focus{background-color:#f3f7ff}.f-page-events-editor-first-bound-event{height:24px;font-family:PingFangSC-Regular;font-size:13px;color:#425159;line-height:24px;font-weight:400;padding-left:5px;margin-left:10px}.f-page-events-editor-first-bound-event:hover{background-color:#348eff}.f-page-events-editor-bound-event{border:1px solid #e8ebf3;width:100%;height:28px;background:#fff;margin-top:10px}.f-page-events-editor-first-bound-event-name{font-family:PingFangSC-Regular;font-size:13px;color:#425159;line-height:24px}.f-page-events-editor-first-bound-event-name:hover{color:#fff}.f-page-events-editor-button{margin:5px 0 0;padding:0;width:100%;border:#fff;height:26px;cursor:pointer;background-image:linear-gradient(-51deg,#328bff,#2a87ff);box-shadow:0 4px 10px #4590ff40;border-radius:6px}.f-page-events-editor-button:focus{outline:none}.f-page-events-editor-text{font-family:PingFangSC-Regular;font-size:13px;color:#fff;text-align:center}.f-page-events-editor-bound-event-name{margin:5px 5px 5px 12px}.f-page-events-editor-bound-event-name{margin:5px 5px 5px 12px;display:inline-block;font-family:PingFangSC-Regular;font-size:13px;color:#6ca1ff}:host ::ng-deep .mb-3{margin-bottom:0!important}.f-icon.f-icon-arrow-chevron-down:hover,.f-icon.f-icon-arrow-chevron-left:hover,.f-icon.f-icon-yxs_delete:hover,.f-icon.f-icon-home-add:hover{color:#2a75ee;cursor:pointer}.f-icon.f-icon-yxs_delete,.f-icon.f-icon-home-add{color:#a7b0bb}.f-page-events-editor-save-all{width:240px;height:40px}.f-page-events-editor-save-all-button{margin:10px 10px 3px 178px;background:#6ca0f5;border-radius:4px;width:50px;border:1px transparent}
|