@farris/ui-vue 1.3.4 → 1.3.6
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/accordion/index.esm.js +16 -16
- package/components/accordion/index.umd.cjs +1 -1
- package/components/avatar/index.esm.js +65 -65
- package/components/avatar/index.umd.cjs +1 -1
- package/components/button-edit/index.esm.js +13 -13
- package/components/button-edit/index.umd.cjs +1 -1
- package/components/calendar/index.esm.js +504 -490
- package/components/calendar/index.umd.cjs +1 -1
- package/components/capsule/index.esm.js +247 -233
- package/components/capsule/index.umd.cjs +1 -1
- package/components/checkbox/index.esm.js +356 -344
- package/components/checkbox/index.umd.cjs +1 -1
- package/components/color-picker/index.esm.js +159 -145
- package/components/color-picker/index.umd.cjs +2 -2
- package/components/combo-list/index.esm.js +127 -128
- package/components/combo-list/index.umd.cjs +1 -1
- package/components/combo-tree/index.esm.js +15 -15
- package/components/combo-tree/index.umd.cjs +1 -1
- package/components/component/index.esm.js +101 -87
- package/components/component/index.umd.cjs +1 -1
- package/components/condition/index.esm.js +9 -7
- package/components/condition/index.umd.cjs +1 -1
- package/components/content-container/index.esm.js +181 -167
- package/components/content-container/index.umd.cjs +1 -1
- package/components/data-grid/index.esm.js +746 -730
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/data-view/index.esm.js +9 -7
- package/components/data-view/index.umd.cjs +1 -1
- package/components/date-picker/index.esm.js +789 -777
- package/components/date-picker/index.umd.cjs +1 -1
- package/components/designer-canvas/index.esm.js +3096 -3069
- package/components/designer-canvas/index.umd.cjs +1 -1
- package/components/dropdown/index.esm.js +257 -243
- package/components/dropdown/index.umd.cjs +2 -2
- package/components/dynamic-form/index.esm.js +322 -306
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/dynamic-resolver/index.esm.js +177 -163
- package/components/dynamic-resolver/index.umd.cjs +1 -1
- package/components/event-parameter/index.esm.js +78 -82
- package/components/event-parameter/index.umd.cjs +1 -1
- package/components/events-editor/index.esm.js +501 -487
- package/components/events-editor/index.umd.cjs +1 -1
- package/components/expression-editor/index.esm.js +37 -37
- package/components/expression-editor/index.umd.cjs +1 -1
- package/components/external-container/index.esm.js +487 -472
- package/components/external-container/index.umd.cjs +1 -1
- package/components/field-selector/index.esm.js +440 -433
- package/components/field-selector/index.umd.cjs +1 -1
- package/components/filter-bar/index.esm.js +594 -587
- package/components/filter-bar/index.umd.cjs +1 -1
- package/components/flow-canvas/index.esm.js +2766 -2739
- package/components/flow-canvas/index.umd.cjs +1 -1
- package/components/image-cropper/index.esm.js +402 -388
- package/components/image-cropper/index.umd.cjs +1 -1
- package/components/input-group/index.esm.js +201 -202
- package/components/input-group/index.umd.cjs +1 -1
- package/components/layout/index.esm.js +264 -245
- package/components/layout/index.umd.cjs +1 -1
- package/components/list-nav/index.esm.js +157 -143
- package/components/list-nav/index.umd.cjs +1 -1
- package/components/list-view/index.esm.js +314 -298
- package/components/list-view/index.umd.cjs +1 -1
- package/components/lookup/index.esm.js +862 -843
- package/components/lookup/index.umd.cjs +1 -1
- package/components/mapping-editor/index.esm.js +1031 -1015
- package/components/mapping-editor/index.umd.cjs +1 -1
- package/components/nav/index.esm.js +169 -155
- package/components/nav/index.umd.cjs +2 -2
- package/components/number-range/index.esm.js +150 -137
- package/components/number-range/index.umd.cjs +1 -1
- package/components/number-spinner/index.esm.js +207 -194
- package/components/number-spinner/index.umd.cjs +1 -1
- package/components/order/index.esm.js +427 -414
- package/components/order/index.umd.cjs +1 -1
- package/components/page-footer/index.esm.js +22 -22
- package/components/page-footer/index.umd.cjs +1 -1
- package/components/page-header/index.esm.js +510 -492
- package/components/page-header/index.umd.cjs +1 -1
- package/components/pagination/index.esm.js +192 -178
- package/components/pagination/index.umd.cjs +1 -1
- package/components/progress/index.esm.js +234 -220
- package/components/progress/index.umd.cjs +3 -3
- package/components/property-editor/index.esm.js +288 -277
- package/components/property-editor/index.umd.cjs +2 -2
- package/components/property-panel/index.esm.js +62 -61
- package/components/property-panel/index.umd.cjs +1 -1
- package/components/query-solution/index.esm.js +776 -770
- package/components/query-solution/index.umd.cjs +6 -6
- package/components/radio-button/index.esm.js +64 -64
- package/components/radio-button/index.umd.cjs +1 -1
- package/components/radio-group/index.esm.js +296 -283
- package/components/radio-group/index.umd.cjs +1 -1
- package/components/rate/index.esm.js +222 -208
- package/components/rate/index.umd.cjs +1 -1
- package/components/response-layout/index.esm.js +187 -173
- package/components/response-layout/index.umd.cjs +1 -1
- package/components/response-layout-editor/index.esm.js +554 -542
- package/components/response-layout-editor/index.umd.cjs +1 -1
- package/components/response-toolbar/index.esm.js +483 -469
- package/components/response-toolbar/index.umd.cjs +1 -1
- package/components/schema-selector/index.esm.js +634 -619
- package/components/schema-selector/index.umd.cjs +2 -2
- package/components/search-box/index.esm.js +228 -214
- package/components/search-box/index.umd.cjs +1 -1
- package/components/section/index.esm.js +419 -406
- package/components/section/index.umd.cjs +1 -1
- package/components/smoke-detector/index.esm.js +162 -148
- package/components/smoke-detector/index.umd.cjs +1 -1
- package/components/splitter/index.esm.js +308 -284
- package/components/splitter/index.umd.cjs +1 -1
- package/components/step/index.esm.js +279 -265
- package/components/step/index.umd.cjs +1 -1
- package/components/switch/index.esm.js +183 -170
- package/components/switch/index.umd.cjs +1 -1
- package/components/tabs/index.esm.js +307 -294
- package/components/tabs/index.umd.cjs +1 -1
- package/components/tags/index.esm.js +320 -306
- package/components/tags/index.umd.cjs +1 -1
- package/components/text/index.esm.js +245 -231
- package/components/text/index.umd.cjs +1 -1
- package/components/textarea/index.esm.js +260 -247
- package/components/textarea/index.umd.cjs +1 -1
- package/components/time-picker/index.esm.js +409 -396
- package/components/time-picker/index.umd.cjs +1 -1
- package/components/transfer/index.esm.js +424 -410
- package/components/transfer/index.umd.cjs +1 -1
- package/components/tree-grid/index.esm.js +383 -376
- package/components/tree-grid/index.umd.cjs +1 -1
- package/components/tree-view/index.esm.js +595 -575
- package/components/tree-view/index.umd.cjs +1 -1
- package/components/uploader/index.esm.js +325 -311
- package/components/uploader/index.umd.cjs +2 -2
- package/components/verify-detail/index.esm.js +304 -290
- package/components/verify-detail/index.umd.cjs +1 -1
- package/components/video/index.esm.js +99 -85
- package/components/video/index.umd.cjs +1 -1
- package/components/weather/index.esm.js +947 -933
- package/components/weather/index.umd.cjs +4 -4
- package/farris.all.esm.js +5492 -5470
- package/farris.all.umd.cjs +13 -13
- package/index.css +1 -1
- package/package.json +1 -1
- package/types/condition/src/composition/condition-value/input-group-value.d.ts +1 -1
- package/types/entity-binding-selector/composition/use-entity-tree.d.ts +3 -0
- package/types/entity-binding-selector/composition/use-field-tree.d.ts +1 -0
|
@@ -4,9 +4,9 @@ import { F_MODAL_SERVICE_TOKEN as K } from "../modal/index.esm.js";
|
|
|
4
4
|
import q, { FTabPage as J } from "../tabs/index.esm.js";
|
|
5
5
|
import Q from "../tree-view/index.esm.js";
|
|
6
6
|
import W from "../textarea/index.esm.js";
|
|
7
|
-
import X, { FLayoutPane as
|
|
8
|
-
var
|
|
9
|
-
const
|
|
7
|
+
import X, { FLayoutPane as w } from "../layout/index.esm.js";
|
|
8
|
+
var d = /* @__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))(d || {});
|
|
9
|
+
const v = {}, Y = {
|
|
10
10
|
/** 编辑器类型 */
|
|
11
11
|
data: { type: Object, default: [] },
|
|
12
12
|
/** 复选框组件id */
|
|
@@ -39,8 +39,8 @@ const h = {}, Y = {
|
|
|
39
39
|
};
|
|
40
40
|
function Z(e) {
|
|
41
41
|
const o = r(e.editorType);
|
|
42
|
-
function
|
|
43
|
-
|
|
42
|
+
function c() {
|
|
43
|
+
v[o.value] = {
|
|
44
44
|
type: "combo-list",
|
|
45
45
|
componentProps: {
|
|
46
46
|
data: e.data,
|
|
@@ -50,38 +50,38 @@ function Z(e) {
|
|
|
50
50
|
}
|
|
51
51
|
};
|
|
52
52
|
}
|
|
53
|
-
function a(
|
|
53
|
+
function a(i) {
|
|
54
54
|
}
|
|
55
|
-
return { createEditorProps:
|
|
55
|
+
return { createEditorProps: c, onValueChange: a };
|
|
56
56
|
}
|
|
57
57
|
function ee(e) {
|
|
58
58
|
const o = r(e.editorType);
|
|
59
|
-
function
|
|
60
|
-
|
|
59
|
+
function c() {
|
|
60
|
+
v[o.value] = {
|
|
61
61
|
type: "switch",
|
|
62
62
|
componentProps: {}
|
|
63
63
|
};
|
|
64
64
|
}
|
|
65
65
|
function a() {
|
|
66
66
|
}
|
|
67
|
-
return { createEditorProps:
|
|
67
|
+
return { createEditorProps: c, onValueChange: a };
|
|
68
68
|
}
|
|
69
69
|
function k(e) {
|
|
70
|
-
const o = r(e.editorType),
|
|
70
|
+
const o = r(e.editorType), c = V(() => o.value === d.Default);
|
|
71
71
|
function a() {
|
|
72
|
-
|
|
72
|
+
v[o.value] = {
|
|
73
73
|
type: "input-group",
|
|
74
74
|
componentProps: {}
|
|
75
75
|
};
|
|
76
76
|
}
|
|
77
|
-
function
|
|
77
|
+
function i() {
|
|
78
78
|
}
|
|
79
|
-
return { createEditorProps: a, shouldRenderAppendButton:
|
|
79
|
+
return { createEditorProps: a, shouldRenderAppendButton: c, onValueChange: i };
|
|
80
80
|
}
|
|
81
81
|
function te(e) {
|
|
82
|
-
const o = r(e.editorType),
|
|
82
|
+
const o = r(e.editorType), c = V(() => o.value === d.Default);
|
|
83
83
|
function a() {
|
|
84
|
-
|
|
84
|
+
v[o.value] = {
|
|
85
85
|
type: "combo-tree",
|
|
86
86
|
componentProps: {
|
|
87
87
|
data: e.data,
|
|
@@ -98,23 +98,23 @@ function te(e) {
|
|
|
98
98
|
}
|
|
99
99
|
};
|
|
100
100
|
}
|
|
101
|
-
function
|
|
101
|
+
function i() {
|
|
102
102
|
}
|
|
103
|
-
return { createEditorProps: a, shouldRenderAppendButton:
|
|
103
|
+
return { createEditorProps: a, shouldRenderAppendButton: c, onValueChange: i };
|
|
104
104
|
}
|
|
105
105
|
function oe(e) {
|
|
106
|
-
const o = r(e.editorType),
|
|
106
|
+
const o = r(e.editorType), c = Z(e), a = ee(e), i = k(e), h = te(e);
|
|
107
107
|
function b() {
|
|
108
|
-
const
|
|
109
|
-
return
|
|
108
|
+
const s = o.value;
|
|
109
|
+
return s === d.Combolist || s === d.Select ? c.createEditorProps() : s === d.Checkbox || s === d.FilterEditor || s === d.DataEditor || s === d.SortEditor || s === d.MenuIdSelector || s === d.AppIdSelector || (s === d.ComboLookup ? h.createEditorProps() : s === d.Numberbox || (s === d.Switch ? a.createEditorProps() : i.createEditorProps())), v[o.value];
|
|
110
110
|
}
|
|
111
111
|
function g() {
|
|
112
112
|
return "input-group";
|
|
113
113
|
}
|
|
114
|
-
function
|
|
114
|
+
function C() {
|
|
115
115
|
return {};
|
|
116
116
|
}
|
|
117
|
-
return { getEditorConfig: b, getEditorType: g, getEditorMap:
|
|
117
|
+
return { getEditorConfig: b, getEditorType: g, getEditorMap: C };
|
|
118
118
|
}
|
|
119
119
|
function ae(e) {
|
|
120
120
|
const o = B([
|
|
@@ -157,21 +157,21 @@ const m = /* @__PURE__ */ _({
|
|
|
157
157
|
props: Y,
|
|
158
158
|
emits: ["valueChange", "onBlur", "applicationSelectionChange", "componentSelectionChange", "parameterChanged", "update:modelValue", "update:parameterValue", "confirm"],
|
|
159
159
|
setup(e, o) {
|
|
160
|
-
const
|
|
160
|
+
const c = r(e.id);
|
|
161
161
|
r(e.label), r(e.showLabel);
|
|
162
|
-
const a = r(e.modelValue),
|
|
163
|
-
getEditorConfig:
|
|
162
|
+
const a = r(e.modelValue), i = r(e.modelValue), {
|
|
163
|
+
getEditorConfig: h
|
|
164
164
|
} = oe(e);
|
|
165
165
|
k(e);
|
|
166
|
-
const b =
|
|
166
|
+
const b = h();
|
|
167
167
|
r();
|
|
168
168
|
const g = r();
|
|
169
169
|
r(e.paramData);
|
|
170
|
-
const
|
|
170
|
+
const C = $(K), s = r({
|
|
171
171
|
enable: !1
|
|
172
172
|
}), x = r({
|
|
173
173
|
customRowStatus: (t) => ((!t.raw.parent || !t.raw.parentId) && (t.collapse = !0), t)
|
|
174
|
-
}),
|
|
174
|
+
}), P = V(() => ({
|
|
175
175
|
// 编辑器类型
|
|
176
176
|
type: b == null ? void 0 : b.type,
|
|
177
177
|
/** 根据不同编辑器 设置不同编辑器的属性 */
|
|
@@ -182,70 +182,66 @@ const m = /* @__PURE__ */ _({
|
|
|
182
182
|
function I(t) {
|
|
183
183
|
o.emit("update:modelValue", t), o.emit("valueChange", t);
|
|
184
184
|
}
|
|
185
|
-
function
|
|
185
|
+
function F(t, n, u) {
|
|
186
186
|
const l = n.selectionStart || 0, {
|
|
187
|
-
selectionEnd:
|
|
188
|
-
} = n,
|
|
189
|
-
return y ? E.splice(l,
|
|
187
|
+
selectionEnd: f
|
|
188
|
+
} = n, S = f - l, y = S > 0, E = u && u.split("") || [];
|
|
189
|
+
return y ? E.splice(l, S, t) : E.splice(l, 0, t), E.join("");
|
|
190
190
|
}
|
|
191
191
|
function T(t, n) {
|
|
192
|
+
if (!t.data)
|
|
193
|
+
return;
|
|
192
194
|
const {
|
|
193
|
-
data:
|
|
195
|
+
data: u
|
|
194
196
|
} = t;
|
|
195
|
-
let l
|
|
196
|
-
label:
|
|
197
|
-
} =
|
|
198
|
-
for (;
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
else {
|
|
202
|
-
l = i, l.includes("_") && (l = l.slice(l.indexOf("_") + 1));
|
|
203
|
-
break;
|
|
204
|
-
}
|
|
205
|
-
if (l)
|
|
206
|
-
return S(`{DATA~/${v}}`, n);
|
|
197
|
+
let l = t.parentNode, {
|
|
198
|
+
label: f
|
|
199
|
+
} = u;
|
|
200
|
+
for (; l && l.parentNode; )
|
|
201
|
+
l.data && (f = l.data.label + "/" + f), l = l.parentNode;
|
|
202
|
+
return F(`{DATA~/${f}}`, n);
|
|
207
203
|
}
|
|
208
|
-
function
|
|
204
|
+
function R(t, n) {
|
|
209
205
|
const {
|
|
210
|
-
statePath:
|
|
206
|
+
statePath: u
|
|
211
207
|
} = t;
|
|
212
208
|
let l = n.value;
|
|
213
|
-
if (
|
|
214
|
-
const
|
|
215
|
-
if (l =
|
|
216
|
-
const y = `#{${
|
|
217
|
-
|
|
209
|
+
if (u) {
|
|
210
|
+
const f = u.split("/");
|
|
211
|
+
if (l = u, f.length === 3) {
|
|
212
|
+
const y = `#{${f[1]}}`;
|
|
213
|
+
f.splice(1, 1, y), l = f.join("/");
|
|
218
214
|
}
|
|
219
215
|
l = `{UISTATE~${l}}`;
|
|
220
216
|
}
|
|
221
|
-
return
|
|
217
|
+
return F(l, n);
|
|
222
218
|
}
|
|
223
|
-
function
|
|
219
|
+
function M(t, n, u) {
|
|
224
220
|
switch (t) {
|
|
225
221
|
case "tabForm":
|
|
226
|
-
|
|
222
|
+
i.value = F(`#{${u.data.id}}`, g.value.elementRef.value, a.value);
|
|
227
223
|
break;
|
|
228
224
|
case "tabField":
|
|
229
|
-
|
|
225
|
+
i.value = T(u, g.value.elementRef.value);
|
|
230
226
|
break;
|
|
231
227
|
case "tabVar":
|
|
232
|
-
|
|
228
|
+
i.value = R(u.data, g.value.elementRef.value);
|
|
233
229
|
break;
|
|
234
230
|
}
|
|
235
231
|
o.emit("paramChanged", {
|
|
236
232
|
tabId: t,
|
|
237
233
|
index: n,
|
|
238
|
-
raw:
|
|
234
|
+
raw: u,
|
|
239
235
|
value: a.value
|
|
240
236
|
});
|
|
241
237
|
}
|
|
242
|
-
function
|
|
238
|
+
function N() {
|
|
243
239
|
return () => {
|
|
244
240
|
let t;
|
|
245
241
|
return p(X, {
|
|
246
242
|
style: "padding:0 10px"
|
|
247
243
|
}, {
|
|
248
|
-
default: () => [p(
|
|
244
|
+
default: () => [p(w, {
|
|
249
245
|
position: "left",
|
|
250
246
|
width: 300,
|
|
251
247
|
resizable: !1
|
|
@@ -256,26 +252,26 @@ const m = /* @__PURE__ */ _({
|
|
|
256
252
|
title: n.title
|
|
257
253
|
}, {
|
|
258
254
|
default: () => [p(Q, {
|
|
259
|
-
rowNumber:
|
|
255
|
+
rowNumber: s,
|
|
260
256
|
rowOption: x.value,
|
|
261
257
|
key: n.treeConfigs.id,
|
|
262
258
|
data: n.treeConfigs.data,
|
|
263
259
|
fit: !0,
|
|
264
260
|
height: 300,
|
|
265
|
-
onDoubleClickRow: function(l,
|
|
266
|
-
|
|
261
|
+
onDoubleClickRow: function(l, f) {
|
|
262
|
+
M(n.id, l, f);
|
|
267
263
|
}
|
|
268
264
|
}, null)]
|
|
269
265
|
}))) ? t : {
|
|
270
266
|
default: () => [t]
|
|
271
267
|
})]
|
|
272
|
-
}), p(
|
|
268
|
+
}), p(w, {
|
|
273
269
|
position: "center"
|
|
274
270
|
}, {
|
|
275
271
|
default: () => [p(W, {
|
|
276
272
|
ref: g,
|
|
277
|
-
modelValue:
|
|
278
|
-
"onUpdate:modelValue": (n) =>
|
|
273
|
+
modelValue: i.value,
|
|
274
|
+
"onUpdate:modelValue": (n) => i.value = n,
|
|
279
275
|
rows: 10,
|
|
280
276
|
autoHeight: !0
|
|
281
277
|
}, null)]
|
|
@@ -283,9 +279,9 @@ const m = /* @__PURE__ */ _({
|
|
|
283
279
|
});
|
|
284
280
|
};
|
|
285
281
|
}
|
|
286
|
-
function
|
|
287
|
-
|
|
288
|
-
const t =
|
|
282
|
+
function O() {
|
|
283
|
+
i.value = a.value;
|
|
284
|
+
const t = C.open({
|
|
289
285
|
title: "参数编辑器",
|
|
290
286
|
width: 900,
|
|
291
287
|
height: 500,
|
|
@@ -293,7 +289,7 @@ const m = /* @__PURE__ */ _({
|
|
|
293
289
|
showHeader: !0,
|
|
294
290
|
showCloseButton: !0,
|
|
295
291
|
draggable: !0,
|
|
296
|
-
render:
|
|
292
|
+
render: N(),
|
|
297
293
|
buttons: [{
|
|
298
294
|
class: "btn btn-light",
|
|
299
295
|
text: "取消",
|
|
@@ -304,15 +300,15 @@ const m = /* @__PURE__ */ _({
|
|
|
304
300
|
class: "btn btn-primary",
|
|
305
301
|
text: "确定",
|
|
306
302
|
handle: () => {
|
|
307
|
-
a.value =
|
|
303
|
+
a.value = i.value, o.emit("update:modelValue", a.value), o.emit("confirm", a.value), t.destroy();
|
|
308
304
|
}
|
|
309
305
|
}]
|
|
310
306
|
});
|
|
311
307
|
}
|
|
312
|
-
function
|
|
313
|
-
return
|
|
308
|
+
function A() {
|
|
309
|
+
return P.value.type === "input-group" ? p("span", {
|
|
314
310
|
class: "f-icon f-icon-lookup",
|
|
315
|
-
onClick:
|
|
311
|
+
onClick: O,
|
|
316
312
|
style: "margin-top: 2px;margin-right: 5px;color: rgba(0, 0, 0, .25)"
|
|
317
313
|
}, null) : p(U, null, null);
|
|
318
314
|
}
|
|
@@ -325,31 +321,31 @@ const m = /* @__PURE__ */ _({
|
|
|
325
321
|
return o.expose({
|
|
326
322
|
getInputRef: L
|
|
327
323
|
}), () => p(z, {
|
|
328
|
-
id:
|
|
329
|
-
editor:
|
|
324
|
+
id: c.value,
|
|
325
|
+
editor: P.value,
|
|
330
326
|
modelValue: a.value,
|
|
331
327
|
"onUpdate:modelValue": (t) => a.value = t,
|
|
332
328
|
showLabel: !1,
|
|
333
329
|
onChange: I,
|
|
334
330
|
onClear: j
|
|
335
331
|
}, {
|
|
336
|
-
groupTextTemplate: () =>
|
|
332
|
+
groupTextTemplate: () => A()
|
|
337
333
|
});
|
|
338
334
|
}
|
|
339
335
|
});
|
|
340
336
|
m.install = (e) => {
|
|
341
337
|
e.component(m.name, m);
|
|
342
338
|
};
|
|
343
|
-
m.register = (e, o,
|
|
339
|
+
m.register = (e, o, c, a) => {
|
|
344
340
|
e["event-parameter"] = m, o["event-parameter"] = m;
|
|
345
341
|
};
|
|
346
|
-
m.registerDesigner = (e, o,
|
|
342
|
+
m.registerDesigner = (e, o, c) => {
|
|
347
343
|
e["event-parameter"] = m, o["event-parameter"] = m;
|
|
348
344
|
};
|
|
349
345
|
export {
|
|
350
|
-
|
|
346
|
+
d as EditorType,
|
|
351
347
|
m as FEventParameter,
|
|
352
348
|
m as default,
|
|
353
|
-
|
|
349
|
+
v as editorMap,
|
|
354
350
|
Y as eventParameterProps
|
|
355
351
|
};
|
|
@@ -1 +1 @@
|
|
|
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,
|
|
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,C){"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 h={},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 s(){h[o.value]={type:"combo-list",componentProps:{data:e.data,editable:e.editable,idField:e.idField||"id",textField:e.textField||"label"}}}function n(u){}return{createEditorProps:s,onValueChange:n}}function M(e){const o=t.ref(e.editorType);function s(){h[o.value]={type:"switch",componentProps:{}}}function n(){}return{createEditorProps:s,onValueChange:n}}function j(e){const o=t.ref(e.editorType),s=t.computed(()=>o.value===d.Default);function n(){h[o.value]={type:"input-group",componentProps:{}}}function u(){}return{createEditorProps:n,shouldRenderAppendButton:s,onValueChange:u}}function O(e){const o=t.ref(e.editorType),s=t.computed(()=>o.value===d.Default);function n(){h[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 u(){}return{createEditorProps:n,shouldRenderAppendButton:s,onValueChange:u}}function R(e){const o=t.ref(e.editorType),s=I(e),n=M(e),u=j(e),y=O(e);function b(){const f=o.value;return f===d.Combolist||f===d.Select?s.createEditorProps():f===d.Checkbox||f===d.FilterEditor||f===d.DataEditor||f===d.SortEditor||f===d.MenuIdSelector||f===d.AppIdSelector||(f===d.ComboLookup?y.createEditorProps():f===d.Numberbox||(f===d.Switch?n.createEditorProps():u.createEditorProps())),h[o.value]}function g(){return"input-group"}function S(){return{}}return{getEditorConfig:b,getEditorType:g,getEditorMap:S}}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 s=t.ref(e.id);t.ref(e.label),t.ref(e.showLabel);const n=t.ref(e.modelValue),u=t.ref(e.modelValue),{getEditorConfig:y}=R(e);j(e);const b=y();t.ref();const g=t.ref();t.ref(e.paramData);const S=t.inject(k.F_MODAL_SERVICE_TOKEN),f=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:q}=A(e);function _(a){o.emit("update:modelValue",a),o.emit("valueChange",a)}function F(a,r,c){const i=r.selectionStart||0,{selectionEnd:m}=r,V=m-i,E=V>0,x=c&&c.split("")||[];return E?x.splice(i,V,a):x.splice(i,0,a),x.join("")}function $(a,r){if(!a.data)return;const{data:c}=a;let i=a.parentNode,{label:m}=c;for(;i&&i.parentNode;)i.data&&(m=i.data.label+"/"+m),i=i.parentNode;return F(`{DATA~/${m}}`,r)}function H(a,r){const{statePath:c}=a;let i=r.value;if(c){const m=c.split("/");if(i=c,m.length===3){const E=`#{${m[1]}}`;m.splice(1,1,E),i=m.join("/")}i=`{UISTATE~${i}}`}return F(i,r)}function U(a,r,c){switch(a){case"tabForm":u.value=F(`#{${c.data.id}}`,g.value.elementRef.value,n.value);break;case"tabField":u.value=$(c,g.value.elementRef.value);break;case"tabVar":u.value=H(c.data,g.value.elementRef.value);break}o.emit("paramChanged",{tabId:a,index:r,raw:c,value:n.value})}function G(){return()=>{let a;return t.createVNode(C,{style:"padding:0 10px"},{default:()=>[t.createVNode(C.FLayoutPane,{position:"left",width:300,resizable:!1},{default:()=>[t.createVNode(P,null,B(a=q.map(r=>t.createVNode(P.FTabPage,{key:r.id,id:r.id,title:r.title},{default:()=>[t.createVNode(D,{rowNumber:f,rowOption:L.value,key:r.treeConfigs.id,data:r.treeConfigs.data,fit:!0,height:300,onDoubleClickRow:function(i,m){U(r.id,i,m)}},null)]})))?a:{default:()=>[a]})]}),t.createVNode(C.FLayoutPane,{position:"center"},{default:()=>[t.createVNode(T,{ref:g,modelValue:u.value,"onUpdate:modelValue":r=>u.value=r,rows:10,autoHeight:!0},null)]})]})}}function z(){u.value=n.value;const a=S.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=u.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:s.value,editor:w.value,modelValue:n.value,"onUpdate:modelValue":a=>n.value=a,showLabel:!1,onChange:_,onClear:J},{groupTextTemplate:()=>K()})}});p.install=e=>{e.component(p.name,p)},p.register=(e,o,s,n)=>{e["event-parameter"]=p,o["event-parameter"]=p},p.registerDesigner=(e,o,s)=>{e["event-parameter"]=p,o["event-parameter"]=p},l.EditorType=d,l.FEventParameter=p,l.default=p,l.editorMap=h,l.eventParameterProps=v,Object.defineProperties(l,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|