@farris/ui-vue 1.3.4 → 1.3.5
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/condition/index.esm.js +2 -2
- package/components/condition/index.umd.cjs +1 -1
- package/components/data-grid/index.esm.js +4458 -4195
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/data-view/index.esm.js +2464 -2445
- package/components/data-view/index.umd.cjs +1 -1
- package/components/designer-canvas/index.esm.js +2606 -2587
- package/components/designer-canvas/index.umd.cjs +1 -1
- package/components/event-parameter/index.css +1 -0
- package/components/event-parameter/index.esm.js +2640 -164
- package/components/event-parameter/index.umd.cjs +1 -1
- package/components/events-editor/index.esm.js +1 -1
- package/components/events-editor/index.umd.cjs +1 -1
- package/components/external-container/index.esm.js +2 -2
- package/components/external-container/index.umd.cjs +1 -1
- package/components/field-selector/index.esm.js +2267 -2248
- package/components/field-selector/index.umd.cjs +1 -1
- package/components/filter-bar/index.esm.js +3320 -3301
- package/components/filter-bar/index.umd.cjs +1 -1
- package/components/flow-canvas/index.esm.js +2843 -2824
- package/components/flow-canvas/index.umd.cjs +1 -1
- package/components/list-view/index.esm.js +2 -2
- package/components/list-view/index.umd.cjs +1 -1
- package/components/lookup/index.esm.js +5275 -5012
- package/components/lookup/index.umd.cjs +1 -1
- package/components/mapping-editor/index.esm.js +4572 -4309
- package/components/mapping-editor/index.umd.cjs +1 -1
- package/components/query-solution/index.esm.js +3142 -3124
- package/components/query-solution/index.umd.cjs +6 -6
- package/components/radio-group/index.esm.js +6 -6
- package/components/radio-group/index.umd.cjs +1 -1
- package/components/schema-selector/index.esm.js +2 -2
- package/components/schema-selector/index.umd.cjs +1 -1
- package/components/tree-grid/index.esm.js +2672 -2653
- package/components/tree-grid/index.umd.cjs +1 -1
- package/components/tree-view/index.esm.js +533 -529
- package/components/tree-view/index.umd.cjs +1 -1
- package/farris.all.esm.js +8836 -8574
- 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/data-grid/src/components/data/data-grid-area.component.d.ts +8 -0
- package/types/data-grid/src/components/data/data-grid-area.props.d.ts +3 -0
- package/types/data-view/composition/types.d.ts +1 -0
|
@@ -1,12 +1,2492 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
var ot = Object.defineProperty;
|
|
2
|
+
var at = (e, t, n) => t in e ? ot(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
+
var X = (e, t, n) => at(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
+
import { defineComponent as ne, ref as r, watch as U, createVNode as p, createTextVNode as Be, computed as B, onMounted as oe, nextTick as ve, reactive as Y, withDirectives as lt, resolveDirective as rt, Fragment as te, mergeProps as he, onUnmounted as Se, Teleport as st, Transition as it, shallowRef as ut, createApp as ct, render as fe, h as dt, cloneVNode as pt, inject as mt, isVNode as ft } from "vue";
|
|
5
|
+
import { isPlainObject as we, cloneDeep as Fe } from "lodash-es";
|
|
6
|
+
import "../designer-canvas/index.esm.js";
|
|
7
|
+
import { useTextBox as vt, useClear as gt } from "../common/index.esm.js";
|
|
8
|
+
import ht, { useNumber as yt, useFormat as bt, useSpinner as Ct, useTextBox as wt } from "../number-spinner/index.esm.js";
|
|
9
|
+
import xt from "../accordion/index.esm.js";
|
|
10
|
+
import Tt from "../avatar/index.esm.js";
|
|
11
|
+
import kt from "../button-edit/index.esm.js";
|
|
12
|
+
import Bt from "../button-group/index.esm.js";
|
|
13
|
+
import St from "../calendar/index.esm.js";
|
|
14
|
+
import Ft from "../capsule/index.esm.js";
|
|
15
|
+
import Mt from "../checkbox/index.esm.js";
|
|
16
|
+
import Et from "../combo-list/index.esm.js";
|
|
17
|
+
import Rt from "../combo-tree/index.esm.js";
|
|
18
|
+
import Ot from "../component/index.esm.js";
|
|
19
|
+
import It from "../color-picker/index.esm.js";
|
|
20
|
+
import jt from "../content-container/index.esm.js";
|
|
21
|
+
import Pt from "../date-picker/index.esm.js";
|
|
22
|
+
import Vt from "../data-grid/index.esm.js";
|
|
23
|
+
import Nt from "../dropdown/index.esm.js";
|
|
24
|
+
import Lt from "../dynamic-form/index.esm.js";
|
|
25
|
+
import Dt from "../events-editor/index.esm.js";
|
|
26
|
+
import $t from "../filter-bar/index.esm.js";
|
|
27
|
+
import zt from "../field-selector/index.esm.js";
|
|
28
|
+
import Ht from "../binding-selector/index.esm.js";
|
|
29
|
+
import At from "../image-cropper/index.esm.js";
|
|
30
|
+
import qt from "../input-group/index.esm.js";
|
|
31
|
+
import Me, { FLayoutPane as xe } from "../layout/index.esm.js";
|
|
32
|
+
import Ut from "../list-nav/index.esm.js";
|
|
33
|
+
import Gt from "../list-view/index.esm.js";
|
|
34
|
+
import Wt from "../lookup/index.esm.js";
|
|
35
|
+
import Xt from "../mapping-editor/index.esm.js";
|
|
36
|
+
import Yt from "../nav/index.esm.js";
|
|
37
|
+
import Jt from "../number-range/index.esm.js";
|
|
38
|
+
import Qt from "../order/index.esm.js";
|
|
39
|
+
import Zt from "../page-header/index.esm.js";
|
|
40
|
+
import _t from "../page-footer/index.esm.js";
|
|
41
|
+
import Kt from "../pagination/index.esm.js";
|
|
42
|
+
import en from "../progress/index.esm.js";
|
|
43
|
+
import tn from "../query-solution/index.esm.js";
|
|
44
|
+
import nn from "../radio-group/index.esm.js";
|
|
45
|
+
import on from "../rate/index.esm.js";
|
|
46
|
+
import an from "../response-toolbar/index.esm.js";
|
|
47
|
+
import ln from "../response-layout/index.esm.js";
|
|
48
|
+
import rn from "../response-layout-editor/index.esm.js";
|
|
49
|
+
import sn from "../search-box/index.esm.js";
|
|
50
|
+
import un from "../section/index.esm.js";
|
|
51
|
+
import cn from "../smoke-detector/index.esm.js";
|
|
52
|
+
import dn from "../splitter/index.esm.js";
|
|
53
|
+
import pn from "../step/index.esm.js";
|
|
54
|
+
import mn from "../switch/index.esm.js";
|
|
55
|
+
import Ee, { FTabPage as fn } from "../tabs/index.esm.js";
|
|
56
|
+
import vn from "../tags/index.esm.js";
|
|
57
|
+
import gn from "../text/index.esm.js";
|
|
58
|
+
import hn from "../time-picker/index.esm.js";
|
|
59
|
+
import yn from "../transfer/index.esm.js";
|
|
60
|
+
import Re from "../tree-view/index.esm.js";
|
|
61
|
+
import bn from "../uploader/index.esm.js";
|
|
62
|
+
import Cn from "../verify-detail/index.esm.js";
|
|
63
|
+
import wn from "../weather/index.esm.js";
|
|
64
|
+
import xn from "../video/index.esm.js";
|
|
65
|
+
import Oe from "../textarea/index.esm.js";
|
|
66
|
+
import Tn from "../schema-selector/index.esm.js";
|
|
67
|
+
import kn from "../tree-grid/index.esm.js";
|
|
68
|
+
import Bn from "../event-parameter/index.esm.js";
|
|
69
|
+
import "../external-container/index.esm.js";
|
|
70
|
+
import { createPropsResolver as Sn } from "../dynamic-resolver/index.esm.js";
|
|
71
|
+
import { F_MODAL_SERVICE_TOKEN as Fn } from "../modal/index.esm.js";
|
|
72
|
+
const Mn = {}, En = {};
|
|
73
|
+
function Ie(e) {
|
|
74
|
+
const { properties: t, title: n, ignore: o } = e, a = o && Array.isArray(o), i = Object.keys(t).reduce((s, u) => ((!a || !o.find((c) => c === u)) && (s[u] = t[u].type === "object" && t[u].properties ? Ie(t[u]) : Fe(t[u].default)), s), {});
|
|
75
|
+
if (n && (!a || !o.find((s) => s === "id"))) {
|
|
76
|
+
const s = n.toLowerCase().replace(/-/g, "_");
|
|
77
|
+
i.id = `${s}_${Math.random().toString().slice(2, 6)}`;
|
|
78
|
+
}
|
|
79
|
+
return i;
|
|
80
|
+
}
|
|
81
|
+
function Rn(e, t) {
|
|
82
|
+
const n = Ie(t);
|
|
83
|
+
return Object.keys(n).reduce((o, a) => (o[a] && we(o[a]) && we(e[a] || !e[a]) ? Object.assign(o[a], e[a] || {}) : o[a] = e[a], o), n), n;
|
|
84
|
+
}
|
|
85
|
+
function On(e, t) {
|
|
86
|
+
return Object.keys(e).filter((o) => e[o] != null).reduce((o, a) => {
|
|
87
|
+
if (t.has(a)) {
|
|
88
|
+
const i = t.get(a);
|
|
89
|
+
if (typeof i == "string")
|
|
90
|
+
o[i] = e[a];
|
|
91
|
+
else {
|
|
92
|
+
const s = i(a, e[a], e);
|
|
93
|
+
Object.assign(o, s);
|
|
94
|
+
}
|
|
95
|
+
} else
|
|
96
|
+
o[a] = e[a];
|
|
97
|
+
return o;
|
|
98
|
+
}, {});
|
|
99
|
+
}
|
|
100
|
+
function In(e, t, n = /* @__PURE__ */ new Map()) {
|
|
101
|
+
const o = Rn(e, t);
|
|
102
|
+
return On(o, n);
|
|
103
|
+
}
|
|
104
|
+
function jn(e = {}) {
|
|
105
|
+
function t(l, f, m, v) {
|
|
106
|
+
if (typeof m == "number")
|
|
107
|
+
return v[l].length === m;
|
|
108
|
+
if (typeof m == "object") {
|
|
109
|
+
const x = Object.keys(m)[0], S = m[x];
|
|
110
|
+
if (x === "not")
|
|
111
|
+
return Number(v[l].length) !== Number(S);
|
|
112
|
+
if (x === "moreThan")
|
|
113
|
+
return Number(v[l].length) >= Number(S);
|
|
114
|
+
if (x === "lessThan")
|
|
115
|
+
return Number(v[l].length) <= Number(S);
|
|
116
|
+
}
|
|
117
|
+
return !1;
|
|
118
|
+
}
|
|
119
|
+
function n(l, f, m, v) {
|
|
120
|
+
return v[l] && v[l].propertyValue && String(v[l].propertyValue.value) === String(m);
|
|
121
|
+
}
|
|
122
|
+
const o = /* @__PURE__ */ new Map([
|
|
123
|
+
["length", t],
|
|
124
|
+
["getProperty", n]
|
|
125
|
+
]);
|
|
126
|
+
Object.keys(e).reduce((l, f) => (l.set(f, e[f]), l), o);
|
|
127
|
+
function a(l, f) {
|
|
128
|
+
const m = l;
|
|
129
|
+
return typeof f == "number" ? [{ target: m, operator: "length", param: null, value: Number(f) }] : typeof f == "boolean" ? [{ target: m, operator: "getProperty", param: l, value: !!f }] : typeof f == "object" ? Object.keys(f).map((v) => {
|
|
130
|
+
if (v === "length")
|
|
131
|
+
return { target: m, operator: "length", param: null, value: f[v] };
|
|
132
|
+
const x = v, S = f[v];
|
|
133
|
+
return { target: m, operator: "getProperty", param: x, value: S };
|
|
134
|
+
}) : [];
|
|
135
|
+
}
|
|
136
|
+
function i(l) {
|
|
137
|
+
return Object.keys(l).reduce((m, v) => {
|
|
138
|
+
const x = a(v, l[v]);
|
|
139
|
+
return m.push(...x), m;
|
|
140
|
+
}, []);
|
|
141
|
+
}
|
|
142
|
+
function s(l, f) {
|
|
143
|
+
if (o.has(l.operator)) {
|
|
144
|
+
const m = o.get(l.operator);
|
|
145
|
+
return m && m(l.target, l.param, l.value, f) || !1;
|
|
146
|
+
}
|
|
147
|
+
return !1;
|
|
148
|
+
}
|
|
149
|
+
function u(l, f) {
|
|
150
|
+
return i(l).reduce((x, S) => x && s(S, f), !0);
|
|
151
|
+
}
|
|
152
|
+
function c(l, f) {
|
|
153
|
+
const m = Object.keys(l), v = m.includes("allOf"), x = m.includes("anyOf"), S = v || x, F = (S ? l[S ? v ? "allOf" : "anyOf" : "allOf"] : [l]).map((P) => u(P, f));
|
|
154
|
+
return v ? !F.includes(!1) : F.includes(!0);
|
|
155
|
+
}
|
|
156
|
+
return { parseValueSchema: c };
|
|
157
|
+
}
|
|
158
|
+
const M = {
|
|
159
|
+
button: { type: "button", name: "按钮", icon: "Button" },
|
|
160
|
+
"response-toolbar": { type: "response-toolbar", name: "工具栏", icon: "ButtonGroup" },
|
|
161
|
+
"response-toolbar-item": { type: "response-toolbar-item", name: "按钮", icon: "Button" },
|
|
162
|
+
"content-container": { type: "content-container", name: "容器", icon: "ContentContainer" },
|
|
163
|
+
"input-group": { type: "input-group", name: "文本", icon: "TextBox" },
|
|
164
|
+
textarea: { type: "textarea", name: "多行文本", icon: "MultiTextBox" },
|
|
165
|
+
lookup: { type: "lookup", name: "帮助", icon: "LookupEdit" },
|
|
166
|
+
"number-spinner": { type: "number-spinner", name: "数值", icon: "NumericBox" },
|
|
167
|
+
"date-picker": { type: "date-picker", name: "日期", icon: "DateBox" },
|
|
168
|
+
switch: { type: "switch", name: "开关", icon: "SwitchField" },
|
|
169
|
+
"radio-group": { type: "radio-group", name: "单选组", icon: "RadioGroup" },
|
|
170
|
+
"check-box": { type: "check-box", name: "复选框", icon: "CheckBox" },
|
|
171
|
+
"check-group": { type: "check-group", name: "复选框组", icon: "CheckGroup" },
|
|
172
|
+
"combo-list": { type: "combo-list", name: "下拉列表", icon: "EnumField" },
|
|
173
|
+
"response-form": { type: "response-form", name: "卡片面板", icon: "Form" },
|
|
174
|
+
"response-layout": { type: "response-layout", name: "布局容器", icon: "ResponseLayout3" },
|
|
175
|
+
"response-layout-item": { type: "response-layout-item", name: "布局", icon: "ResponseLayout1" },
|
|
176
|
+
"tree-grid": { type: "tree-grid", name: "树表格", icon: "TreeGrid" },
|
|
177
|
+
"tree-grid-column": { type: "tree-grid-column", name: "树表格列" },
|
|
178
|
+
"data-grid": { type: "data-grid", name: "表格", icon: "DataGrid" },
|
|
179
|
+
"data-grid-column": { type: "data-grid-column", name: "表格列" },
|
|
180
|
+
module: { type: "Module", name: "模块", icon: "Module" },
|
|
181
|
+
component: { type: "component", name: "组件", icon: "Component" },
|
|
182
|
+
tabs: { type: "tabs", name: "标签页", icon: "Tab" },
|
|
183
|
+
"tab-page": { type: "tab-page", name: "标签页项", dependentParentControl: "Tab" },
|
|
184
|
+
"tab-toolbar-item": { type: "tab-toolbar-item", name: "标签页工具栏按钮", icon: "Button" },
|
|
185
|
+
"time-picker": { type: "time-picker", name: "时间选择", icon: "TimePicker" },
|
|
186
|
+
section: { type: "section", name: "分组面板", icon: "Section" },
|
|
187
|
+
"section-toolbar": { type: "section-toolbar", name: "分组面板工具栏" },
|
|
188
|
+
"section-toolbar-item": { type: "section-toolbar-item", name: "分组面板按钮" },
|
|
189
|
+
splitter: { type: "splitter", name: "分栏面板", icon: "Splitter" },
|
|
190
|
+
"splitter-pane": { type: "splitter-pane", name: "分栏面板项", dependentParentControl: "Splitter" },
|
|
191
|
+
"component-ref": { type: "component-ref", name: "组件引用节点" },
|
|
192
|
+
uploader: { type: "uploader", name: "附件上传", icon: "FileUpload" },
|
|
193
|
+
"page-header": { type: "page-header", name: "页头", icon: "Header" },
|
|
194
|
+
"page-footer": { type: "page-footer", name: "页脚", icon: "ModalFooter" },
|
|
195
|
+
"tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" },
|
|
196
|
+
fieldset: { type: "fieldset", name: "分组", icon: "fieldset" },
|
|
197
|
+
"query-solution": { type: "query-solution", name: "筛选方案", icon: "QueryScheme" }
|
|
198
|
+
}, Pn = {}, Vn = {};
|
|
199
|
+
jn();
|
|
200
|
+
function ue(e, t, n = /* @__PURE__ */ new Map(), o = (s, u, c, l) => u, a = {}, i = (s) => s) {
|
|
201
|
+
return Mn[t.title] = t, En[t.title] = o, Pn[t.title] = a, Vn[t.title] = i, (s = {}) => {
|
|
202
|
+
const u = In(s, t, n), c = Object.keys(e).reduce((l, f) => (l[f] = e[f].default, l), {});
|
|
203
|
+
return Object.assign(c, u);
|
|
204
|
+
};
|
|
205
|
+
}
|
|
206
|
+
function je(e, t) {
|
|
207
|
+
return { customClass: t.class, customStyle: t.style };
|
|
208
|
+
}
|
|
209
|
+
const ye = /* @__PURE__ */ new Map([
|
|
210
|
+
["appearance", je]
|
|
211
|
+
]), Nn = /* @__PURE__ */ new Map([]);
|
|
212
|
+
var ge = /* @__PURE__ */ ((e) => (e.String = "String", e.DateTime = "DateTime", e.Date = "Date", e.Enum = "Enum", e.Boolean = "Boolean", e.Number = "Number", e.Text = "Text", e.BigNumber = "BigNumber", e))(ge || {});
|
|
213
|
+
const Ln = "root-viewmodel";
|
|
214
|
+
class Dn {
|
|
215
|
+
constructor(t, n) {
|
|
216
|
+
X(this, "formSchemaUtils");
|
|
217
|
+
X(this, "controlCreatorUtils");
|
|
218
|
+
X(this, "designViewModelUtils");
|
|
219
|
+
this.resolver = t, this.designerHostService = n, this.formSchemaUtils = this.designerHostService.formSchemaUtils, this.controlCreatorUtils = this.designerHostService.controlCreatorUtils, this.designViewModelUtils = this.designerHostService.designViewModelUtils;
|
|
220
|
+
}
|
|
221
|
+
createComponent(t) {
|
|
222
|
+
const n = this.createComponentRefNode(t), o = this.createComponentNode(t), a = this.createViewModeNode(t), i = this.formSchemaUtils.getFormSchema();
|
|
223
|
+
return i.module.viewmodels.push(a), i.module.components.push(o), this.designViewModelUtils.assembleDesignViewModel(), n;
|
|
224
|
+
}
|
|
225
|
+
createComponentRefNode(t) {
|
|
226
|
+
const n = this.resolver.getSchemaByType("component-ref");
|
|
227
|
+
return Object.assign(n, {
|
|
228
|
+
id: `${t.componentId}-component-ref`,
|
|
229
|
+
component: `${t.componentId}-component`
|
|
230
|
+
}), n;
|
|
231
|
+
}
|
|
232
|
+
createComponentNode(t) {
|
|
233
|
+
const n = this.resolver.getSchemaByType("component"), o = this.createFormComponentContents(t);
|
|
234
|
+
return Object.assign(n, {
|
|
235
|
+
id: `${t.componentId}-component`,
|
|
236
|
+
viewModel: `${t.componentId}-component-viewmodel`,
|
|
237
|
+
componentType: t.componentType,
|
|
238
|
+
appearance: {
|
|
239
|
+
class: this.getFormComponentClass()
|
|
240
|
+
},
|
|
241
|
+
formColumns: t.formColumns,
|
|
242
|
+
contents: o
|
|
243
|
+
}), n;
|
|
244
|
+
}
|
|
245
|
+
/**
|
|
246
|
+
* 获取卡片组件层级的class样式
|
|
247
|
+
*/
|
|
248
|
+
getFormComponentClass() {
|
|
249
|
+
const { templateId: t } = this.formSchemaUtils.getFormSchema().module;
|
|
250
|
+
return t === "double-list-in-tab-template" ? "f-struct-wrapper f-utils-fill-flex-column" : "f-struct-wrapper";
|
|
251
|
+
}
|
|
252
|
+
createFormComponentContents(t) {
|
|
253
|
+
const n = this.resolver.getSchemaByType("section");
|
|
254
|
+
Object.assign(n, {
|
|
255
|
+
id: t.componentId + "-form-section",
|
|
256
|
+
appearance: {
|
|
257
|
+
class: "f-section-form f-section-in-mainsubcard"
|
|
258
|
+
},
|
|
259
|
+
mainTitle: t.componentName
|
|
260
|
+
});
|
|
261
|
+
const o = this.resolver.getSchemaByType("response-form"), a = [];
|
|
262
|
+
Object.assign(o, {
|
|
263
|
+
id: t.componentId + "-form",
|
|
264
|
+
appearance: {
|
|
265
|
+
class: "f-form-layout farris-form farris-form-controls-inline"
|
|
266
|
+
},
|
|
267
|
+
contents: a
|
|
268
|
+
}), n.contents = [o];
|
|
269
|
+
const { selectedFields: i } = t;
|
|
270
|
+
i == null || i.forEach((u) => {
|
|
271
|
+
const c = Fe(u), l = this.resolveControlClassByFormColumns(t), f = this.controlCreatorUtils.setFormFieldProperty(c, "", l);
|
|
272
|
+
f && a.push(f);
|
|
273
|
+
});
|
|
274
|
+
const { templateId: s } = this.formSchemaUtils.getFormSchema().module;
|
|
275
|
+
return s === "double-list-in-tab-template" && (n.appearance.class = "f-section-grid f-section-in-main px-0 pt-0", n.fill = !0), [n];
|
|
276
|
+
}
|
|
277
|
+
resolveControlClassByFormColumns(t) {
|
|
278
|
+
let n = "";
|
|
279
|
+
switch (t.formColumns) {
|
|
280
|
+
case 1: {
|
|
281
|
+
n = "col-12";
|
|
282
|
+
break;
|
|
283
|
+
}
|
|
284
|
+
case 2: {
|
|
285
|
+
n = "col-12 col-md-6 col-xl-6 col-el-6";
|
|
286
|
+
break;
|
|
287
|
+
}
|
|
288
|
+
case 3: {
|
|
289
|
+
n = "col-12 col-md-6 col-xl-4 col-el-4";
|
|
290
|
+
break;
|
|
291
|
+
}
|
|
292
|
+
case 4: {
|
|
293
|
+
n = "col-12 col-md-6 col-xl-3 col-el-2";
|
|
294
|
+
break;
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
return n;
|
|
298
|
+
}
|
|
299
|
+
/**
|
|
300
|
+
* 添加viewModel节点
|
|
301
|
+
*/
|
|
302
|
+
createViewModeNode(t) {
|
|
303
|
+
return {
|
|
304
|
+
id: `${t.componentId}-component-viewmodel`,
|
|
305
|
+
code: `${t.componentId}-component-viewmodel`,
|
|
306
|
+
name: t.componentName,
|
|
307
|
+
bindTo: t.bindTo,
|
|
308
|
+
parent: Ln,
|
|
309
|
+
fields: this.assembleViewModelFields(t),
|
|
310
|
+
commands: [],
|
|
311
|
+
states: [],
|
|
312
|
+
enableValidation: !0
|
|
313
|
+
};
|
|
314
|
+
}
|
|
315
|
+
/**
|
|
316
|
+
* 组装viewModel fields 节点
|
|
317
|
+
*/
|
|
318
|
+
assembleViewModelFields(t) {
|
|
319
|
+
const n = [], { selectedFields: o } = t;
|
|
320
|
+
return o == null || o.forEach((a) => {
|
|
321
|
+
let i = "blur";
|
|
322
|
+
const s = a.type.name;
|
|
323
|
+
(s === ge.Enum || s === ge.Boolean) && (i = "change"), n.push({
|
|
324
|
+
type: "Form",
|
|
325
|
+
id: a.id,
|
|
326
|
+
fieldName: a.bindingField,
|
|
327
|
+
groupId: null,
|
|
328
|
+
groupName: null,
|
|
329
|
+
updateOn: i,
|
|
330
|
+
fieldSchema: {}
|
|
331
|
+
});
|
|
332
|
+
}), n;
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
function $n(e, t, n, o) {
|
|
336
|
+
var i, s, u, c, l;
|
|
337
|
+
const a = n.parentComponentInstance;
|
|
338
|
+
if (a && o) {
|
|
339
|
+
const f = (i = a.schema) == null ? void 0 : i.type, v = {
|
|
340
|
+
componentId: `form-${Math.random().toString(36).slice(2, 6)}`,
|
|
341
|
+
componentName: ((u = (s = n.bindingSourceContext) == null ? void 0 : s.bindingEntity) == null ? void 0 : u.name) || "标题",
|
|
342
|
+
componentType: "form",
|
|
343
|
+
formColumns: f === "splitter-pane" ? 1 : 4,
|
|
344
|
+
parentContainerId: a.schema.id,
|
|
345
|
+
bindTo: ((c = n.bindingSourceContext) == null ? void 0 : c.bindTo) || "/",
|
|
346
|
+
selectedFields: (l = n.bindingSourceContext) == null ? void 0 : l.bindingEntityFields
|
|
347
|
+
};
|
|
348
|
+
return new Dn(e, o).createComponent(v);
|
|
349
|
+
} else
|
|
350
|
+
return t;
|
|
351
|
+
}
|
|
352
|
+
function zn(e, t, n) {
|
|
353
|
+
return t;
|
|
354
|
+
}
|
|
355
|
+
const Hn = "https://json-schema.org/draft/2020-12/schema", An = "https://farris-design.gitee.io/response-form.schema.json", qn = "response-form", Un = "A Farris Data Collection Component", Gn = "object", Wn = {
|
|
356
|
+
id: {
|
|
357
|
+
description: "The unique identifier for a form group",
|
|
358
|
+
type: "string"
|
|
359
|
+
},
|
|
360
|
+
type: {
|
|
361
|
+
description: "The type string of form group component",
|
|
362
|
+
type: "string",
|
|
363
|
+
default: "response-form"
|
|
364
|
+
},
|
|
365
|
+
appearance: {
|
|
366
|
+
description: "",
|
|
367
|
+
type: "object",
|
|
368
|
+
properties: {
|
|
369
|
+
class: {
|
|
370
|
+
type: "string"
|
|
371
|
+
},
|
|
372
|
+
style: {
|
|
373
|
+
type: "string"
|
|
374
|
+
}
|
|
375
|
+
},
|
|
376
|
+
default: {}
|
|
377
|
+
},
|
|
378
|
+
contents: {
|
|
379
|
+
description: "",
|
|
380
|
+
type: "array",
|
|
381
|
+
default: []
|
|
382
|
+
}
|
|
383
|
+
}, Xn = [
|
|
384
|
+
"id",
|
|
385
|
+
"type"
|
|
386
|
+
], Yn = {
|
|
387
|
+
$schema: Hn,
|
|
388
|
+
$id: An,
|
|
389
|
+
title: qn,
|
|
390
|
+
description: Un,
|
|
391
|
+
type: Gn,
|
|
392
|
+
properties: Wn,
|
|
393
|
+
required: Xn
|
|
394
|
+
}, Jn = {
|
|
395
|
+
customClass: { type: String, default: "" },
|
|
396
|
+
customStyle: { type: String, defaut: "" }
|
|
397
|
+
};
|
|
398
|
+
ue(Jn, Yn, ye, $n);
|
|
399
|
+
const Qn = "https://json-schema.org/draft/2020-12/schema", Zn = "https://farris-design.gitee.io/form-group.schema.json", _n = "form-group", Kn = "A Farris Input Component", eo = "object", to = {
|
|
400
|
+
id: {
|
|
401
|
+
description: "The unique identifier for a form group",
|
|
402
|
+
type: "string"
|
|
403
|
+
},
|
|
404
|
+
type: {
|
|
405
|
+
description: "The type string of form group component",
|
|
406
|
+
type: "string",
|
|
407
|
+
default: "form-group"
|
|
408
|
+
},
|
|
409
|
+
appearance: {
|
|
410
|
+
description: "",
|
|
411
|
+
type: "object",
|
|
412
|
+
properties: {
|
|
413
|
+
class: {
|
|
414
|
+
type: "string"
|
|
415
|
+
},
|
|
416
|
+
style: {
|
|
417
|
+
type: "string"
|
|
418
|
+
}
|
|
419
|
+
},
|
|
420
|
+
default: {}
|
|
421
|
+
},
|
|
422
|
+
enableLinkLabel: {
|
|
423
|
+
description: "",
|
|
424
|
+
type: "boolean",
|
|
425
|
+
default: !1
|
|
426
|
+
},
|
|
427
|
+
editor: {
|
|
428
|
+
description: "",
|
|
429
|
+
type: "obejct"
|
|
430
|
+
},
|
|
431
|
+
label: {
|
|
432
|
+
description: "",
|
|
433
|
+
type: "string",
|
|
434
|
+
default: ""
|
|
435
|
+
},
|
|
436
|
+
lableWidth: {
|
|
437
|
+
description: "",
|
|
438
|
+
type: "number"
|
|
439
|
+
},
|
|
440
|
+
binding: {
|
|
441
|
+
description: "",
|
|
442
|
+
type: "object",
|
|
443
|
+
default: {}
|
|
444
|
+
}
|
|
445
|
+
}, no = [
|
|
446
|
+
"id",
|
|
447
|
+
"type"
|
|
448
|
+
], Pe = {
|
|
449
|
+
$schema: Qn,
|
|
450
|
+
$id: Zn,
|
|
451
|
+
title: _n,
|
|
452
|
+
description: Kn,
|
|
453
|
+
type: eo,
|
|
454
|
+
properties: to,
|
|
455
|
+
required: no
|
|
456
|
+
}, Ve = {
|
|
457
|
+
id: { type: String, default: "" },
|
|
458
|
+
customClass: { type: String, default: "" },
|
|
459
|
+
customStyle: { type: String, default: "" },
|
|
460
|
+
/** 筛选组件配置器,具体配置项可查看各组件文档 */
|
|
461
|
+
editor: { type: Object, default: {} },
|
|
462
|
+
label: { type: String, default: "" },
|
|
463
|
+
/** 组件值 */
|
|
464
|
+
modelValue: { type: [String, Boolean, Array, Number], default: "" },
|
|
465
|
+
// readonly: { type: Boolean, default: false },
|
|
466
|
+
visible: { type: Boolean, default: !0 },
|
|
467
|
+
required: { type: Boolean, default: !1 },
|
|
468
|
+
showLabel: { type: Boolean, default: !0 },
|
|
469
|
+
type: { type: String, default: "input-group" }
|
|
470
|
+
};
|
|
471
|
+
ue(
|
|
472
|
+
Ve,
|
|
473
|
+
Pe,
|
|
474
|
+
ye,
|
|
475
|
+
void 0
|
|
476
|
+
);
|
|
477
|
+
const oo = {
|
|
478
|
+
id: { type: String },
|
|
479
|
+
required: { type: Boolean, default: !1 },
|
|
480
|
+
text: { type: String, default: "" },
|
|
481
|
+
title: { type: String }
|
|
482
|
+
}, ao = /* @__PURE__ */ ne({
|
|
483
|
+
name: "FDynamicFormLabel",
|
|
484
|
+
props: oo,
|
|
485
|
+
emits: [],
|
|
486
|
+
setup(e, t) {
|
|
487
|
+
const n = r(e.title || e.text), o = r(e.required), a = r(e.text);
|
|
488
|
+
return U(() => e.text, () => {
|
|
489
|
+
a.value = e.text;
|
|
490
|
+
}), U(() => e.required, (i, s) => {
|
|
491
|
+
i !== s && (o.value = i);
|
|
492
|
+
}), () => a.value && p("label", {
|
|
493
|
+
class: "col-form-label",
|
|
494
|
+
title: n.value
|
|
495
|
+
}, [o.value && p("span", {
|
|
496
|
+
class: "farris-label-info text-danger"
|
|
497
|
+
}, [Be("*")]), p("span", {
|
|
498
|
+
class: "farris-label-text"
|
|
499
|
+
}, [a.value])]);
|
|
500
|
+
}
|
|
501
|
+
}), lo = /* @__PURE__ */ new Map([
|
|
502
|
+
["appearance", je]
|
|
503
|
+
]);
|
|
504
|
+
function ro(e, t, n) {
|
|
505
|
+
return t;
|
|
506
|
+
}
|
|
507
|
+
const so = "https://json-schema.org/draft/2020-12/schema", io = "https://farris-design.gitee.io/input-group.schema.json", uo = "input-group", co = "A Farris Input Component", po = "object", mo = {
|
|
508
|
+
id: {
|
|
509
|
+
description: "The unique identifier for a Input Group",
|
|
510
|
+
type: "string"
|
|
511
|
+
},
|
|
512
|
+
type: {
|
|
513
|
+
description: "The type string of Input Group component",
|
|
514
|
+
type: "string",
|
|
515
|
+
default: "input-group"
|
|
516
|
+
},
|
|
517
|
+
appearance: {
|
|
518
|
+
description: "",
|
|
519
|
+
type: "object",
|
|
520
|
+
properties: {
|
|
521
|
+
class: {
|
|
522
|
+
type: "string"
|
|
523
|
+
},
|
|
524
|
+
style: {
|
|
525
|
+
type: "string"
|
|
526
|
+
}
|
|
527
|
+
},
|
|
528
|
+
default: {}
|
|
529
|
+
},
|
|
530
|
+
binding: {
|
|
531
|
+
description: "",
|
|
532
|
+
type: "object",
|
|
533
|
+
default: {}
|
|
534
|
+
},
|
|
535
|
+
editable: {
|
|
536
|
+
description: "",
|
|
537
|
+
type: "boolean",
|
|
538
|
+
default: !0
|
|
539
|
+
},
|
|
540
|
+
enableLinkLabel: {
|
|
541
|
+
description: "",
|
|
542
|
+
type: "boolean",
|
|
543
|
+
default: !1
|
|
544
|
+
},
|
|
545
|
+
label: {
|
|
546
|
+
description: "",
|
|
547
|
+
type: "string",
|
|
548
|
+
default: ""
|
|
549
|
+
},
|
|
550
|
+
labelWidth: {
|
|
551
|
+
description: "",
|
|
552
|
+
type: "number"
|
|
553
|
+
},
|
|
554
|
+
placeholder: {
|
|
555
|
+
description: "",
|
|
556
|
+
type: "string",
|
|
557
|
+
default: ""
|
|
558
|
+
},
|
|
559
|
+
readonly: {
|
|
560
|
+
description: "",
|
|
561
|
+
type: "boolean",
|
|
562
|
+
default: !1
|
|
563
|
+
},
|
|
564
|
+
disabled: {
|
|
565
|
+
description: "",
|
|
566
|
+
type: "boolean",
|
|
567
|
+
default: !1
|
|
568
|
+
},
|
|
569
|
+
tabIndex: {
|
|
570
|
+
description: "",
|
|
571
|
+
type: "number",
|
|
572
|
+
default: -1
|
|
573
|
+
},
|
|
574
|
+
textAlign: {
|
|
575
|
+
description: "",
|
|
576
|
+
type: "enum",
|
|
577
|
+
enum: [
|
|
578
|
+
"left",
|
|
579
|
+
"middle",
|
|
580
|
+
"right"
|
|
581
|
+
],
|
|
582
|
+
default: "left"
|
|
583
|
+
},
|
|
584
|
+
visible: {
|
|
585
|
+
description: "",
|
|
586
|
+
type: "boolean",
|
|
587
|
+
default: !0
|
|
588
|
+
},
|
|
589
|
+
onBlur: {
|
|
590
|
+
description: "",
|
|
591
|
+
type: "string",
|
|
592
|
+
default: ""
|
|
593
|
+
},
|
|
594
|
+
onClickLinkLabel: {
|
|
595
|
+
description: "",
|
|
596
|
+
type: "sting",
|
|
597
|
+
default: ""
|
|
598
|
+
},
|
|
599
|
+
addonDisabled: {
|
|
600
|
+
description: "",
|
|
601
|
+
type: "boolean",
|
|
602
|
+
default: !1
|
|
603
|
+
},
|
|
604
|
+
addonContent: {
|
|
605
|
+
description: "",
|
|
606
|
+
type: "string",
|
|
607
|
+
default: ""
|
|
608
|
+
},
|
|
609
|
+
autoHeight: {
|
|
610
|
+
description: "",
|
|
611
|
+
type: "boolean",
|
|
612
|
+
default: !1
|
|
613
|
+
},
|
|
614
|
+
enableAddon: {
|
|
615
|
+
description: "",
|
|
616
|
+
type: "boolean",
|
|
617
|
+
default: !1
|
|
618
|
+
},
|
|
619
|
+
addonType: {
|
|
620
|
+
description: "",
|
|
621
|
+
type: "string",
|
|
622
|
+
enum: [
|
|
623
|
+
"button",
|
|
624
|
+
"static"
|
|
625
|
+
],
|
|
626
|
+
default: "button"
|
|
627
|
+
},
|
|
628
|
+
enableClear: {
|
|
629
|
+
description: "",
|
|
630
|
+
type: "boolean",
|
|
631
|
+
default: !0
|
|
632
|
+
},
|
|
633
|
+
enableViewPassword: {
|
|
634
|
+
description: "",
|
|
635
|
+
type: "boolean",
|
|
636
|
+
default: !1
|
|
637
|
+
},
|
|
638
|
+
inputType: {
|
|
639
|
+
description: "",
|
|
640
|
+
type: "string",
|
|
641
|
+
enum: [
|
|
642
|
+
"input",
|
|
643
|
+
"password",
|
|
644
|
+
"text"
|
|
645
|
+
],
|
|
646
|
+
default: "input"
|
|
647
|
+
},
|
|
648
|
+
maxHeight: {
|
|
649
|
+
description: "",
|
|
650
|
+
type: "number",
|
|
651
|
+
default: 500
|
|
652
|
+
},
|
|
653
|
+
popUp: {
|
|
654
|
+
description: "",
|
|
655
|
+
type: "object",
|
|
656
|
+
properties: {
|
|
657
|
+
footerButtons: {
|
|
658
|
+
type: "array",
|
|
659
|
+
default: []
|
|
660
|
+
},
|
|
661
|
+
height: {
|
|
662
|
+
type: "number",
|
|
663
|
+
default: 600
|
|
664
|
+
},
|
|
665
|
+
dataMapping: {
|
|
666
|
+
type: "object"
|
|
667
|
+
},
|
|
668
|
+
contents: {
|
|
669
|
+
type: "array",
|
|
670
|
+
default: []
|
|
671
|
+
},
|
|
672
|
+
showMaxButton: {
|
|
673
|
+
type: "boolean",
|
|
674
|
+
default: !0
|
|
675
|
+
},
|
|
676
|
+
showCloseButton: {
|
|
677
|
+
type: "boolean",
|
|
678
|
+
default: !0
|
|
679
|
+
},
|
|
680
|
+
showFooter: {
|
|
681
|
+
type: "boolean",
|
|
682
|
+
default: !0
|
|
683
|
+
},
|
|
684
|
+
title: {
|
|
685
|
+
type: "string",
|
|
686
|
+
default: ""
|
|
687
|
+
},
|
|
688
|
+
width: {
|
|
689
|
+
type: "number",
|
|
690
|
+
default: 800
|
|
691
|
+
}
|
|
692
|
+
}
|
|
693
|
+
},
|
|
694
|
+
showButtonWhenDisabled: {
|
|
695
|
+
description: "",
|
|
696
|
+
type: "boolean",
|
|
697
|
+
default: !1
|
|
698
|
+
},
|
|
699
|
+
onClear: {
|
|
700
|
+
description: "",
|
|
701
|
+
type: "string",
|
|
702
|
+
default: ""
|
|
703
|
+
}
|
|
704
|
+
}, fo = [
|
|
705
|
+
"id",
|
|
706
|
+
"type"
|
|
707
|
+
], vo = [
|
|
708
|
+
"id",
|
|
709
|
+
"appearance",
|
|
710
|
+
"binding",
|
|
711
|
+
"visible"
|
|
712
|
+
], go = {
|
|
713
|
+
$schema: so,
|
|
714
|
+
$id: io,
|
|
715
|
+
title: uo,
|
|
716
|
+
description: co,
|
|
717
|
+
type: po,
|
|
718
|
+
properties: mo,
|
|
719
|
+
required: fo,
|
|
720
|
+
ignore: vo
|
|
721
|
+
}, Ne = {
|
|
722
|
+
id: { Type: String, default: "" },
|
|
723
|
+
/** 是否自动完成 */
|
|
724
|
+
autocomplete: { Type: String, default: "off" },
|
|
725
|
+
/** 自定义CLASS */
|
|
726
|
+
customClass: { Type: String, default: "" },
|
|
727
|
+
/** 禁用 */
|
|
728
|
+
disabled: { Type: Boolean, default: !1 },
|
|
729
|
+
/** 允许编辑 */
|
|
730
|
+
editable: { Type: Boolean, default: !0 },
|
|
731
|
+
/** 启用清除按钮 */
|
|
732
|
+
enableClear: { Type: Boolean, default: !0 },
|
|
733
|
+
/** 启用提示文本 */
|
|
734
|
+
enableTitle: { Type: Boolean, default: !0 },
|
|
735
|
+
/** 启用密码 */
|
|
736
|
+
enableViewPassword: { Type: Boolean, default: !0 },
|
|
737
|
+
/** 始终显示占位符文本 */
|
|
738
|
+
forcePlaceholder: { Type: Boolean, default: !1 },
|
|
739
|
+
/** 扩展按钮 */
|
|
740
|
+
groupText: { Type: String, default: "" },
|
|
741
|
+
/** 密码模式 */
|
|
742
|
+
type: { Type: String, default: "text" },
|
|
743
|
+
/** 最大值 */
|
|
744
|
+
max: { type: [Number, String] },
|
|
745
|
+
/** 最小值 */
|
|
746
|
+
min: { type: [Number, String] },
|
|
747
|
+
/** 最大长度 */
|
|
748
|
+
maxLength: { Type: Number || void 0, default: void 0 },
|
|
749
|
+
/** 最小长度 */
|
|
750
|
+
minLength: { Type: Number || void 0, default: void 0 },
|
|
751
|
+
/** 组件值 */
|
|
752
|
+
modelValue: { Type: String || Boolean, default: "" },
|
|
753
|
+
/** 隐藏边线 */
|
|
754
|
+
showBorder: { Type: Boolean, default: !0 },
|
|
755
|
+
/** 步长 */
|
|
756
|
+
step: { Type: Number, default: 1 },
|
|
757
|
+
/** 启用提示信息 */
|
|
758
|
+
placeholder: { Type: String, default: "" },
|
|
759
|
+
precision: { Type: Number, default: 0 },
|
|
760
|
+
/** 只读 */
|
|
761
|
+
readonly: { Type: Boolean, default: !1 },
|
|
762
|
+
/** 当组件禁用或只读时显示后边的按钮 */
|
|
763
|
+
showButtonWhenDisabled: { Type: Boolean, default: !1 },
|
|
764
|
+
/** tab索引 */
|
|
765
|
+
tabIndex: { Type: Number || void 0, default: void 0 },
|
|
766
|
+
/** 文本在输入框中的对齐方式 */
|
|
767
|
+
textAlign: { Type: String, default: "left" },
|
|
768
|
+
/** 是否启用前置扩展信息;在输入框前面 显示 ① 图标鼠标滑过后显示 */
|
|
769
|
+
useExtendInfo: { Type: Boolean, default: !1 },
|
|
770
|
+
/** 前置扩展信息 */
|
|
771
|
+
extendInfo: { Type: String, default: "" },
|
|
772
|
+
/** 输入值 */
|
|
773
|
+
value: { Type: String, default: "" },
|
|
774
|
+
/**
|
|
775
|
+
* 作为内嵌编辑器被创建后默认获得焦点
|
|
776
|
+
*/
|
|
777
|
+
focusOnCreated: { type: Boolean, default: !1 },
|
|
778
|
+
/**
|
|
779
|
+
* 作为内嵌编辑器被创建后默认选中文本
|
|
780
|
+
*/
|
|
781
|
+
selectOnCreated: { type: Boolean, default: !1 },
|
|
782
|
+
/**
|
|
783
|
+
* modelValue 更新时机, 默认 blur; 可选值:blur | input
|
|
784
|
+
* - blur: 离开焦点时更新
|
|
785
|
+
* - input: 输入时更新
|
|
786
|
+
*/
|
|
787
|
+
updateOn: { type: String, default: "blur" }
|
|
788
|
+
};
|
|
789
|
+
ue(Ne, go, lo, ro);
|
|
790
|
+
function ho(e, t) {
|
|
791
|
+
const n = r(e.groupText), o = B(() => e.showButtonWhenDisabled && (e.readonly || e.disabled)), a = B(() => e.enableClear || !!e.groupText);
|
|
792
|
+
return { appendedButtonClass: B(() => ({
|
|
793
|
+
"input-group-append": !0,
|
|
794
|
+
"append-force-show": o.value
|
|
795
|
+
})), appendedContent: n, shouldShowAppendedButton: a };
|
|
796
|
+
}
|
|
797
|
+
function yo(e, t, n, o) {
|
|
798
|
+
const { appendedContent: a } = o, i = r(e.enableViewPassword), s = B(() => e.type === "password"), u = '<span class="f-icon f-icon-eye" style="color: rgb(56, 143, 255);"></span>', c = '<span class="f-icon f-icon-eye"></span>', l = r(!1);
|
|
799
|
+
U(() => [e.readonly, e.disabled], ([v, x]) => {
|
|
800
|
+
s.value && (n.value = v || x ? "password" : n.value, a.value = v || x ? c : a.value);
|
|
801
|
+
});
|
|
802
|
+
function f() {
|
|
803
|
+
return l.value = !l.value, n.value = l.value ? "text" : "password", a.value = l.value ? u : c, !1;
|
|
804
|
+
}
|
|
805
|
+
function m() {
|
|
806
|
+
n.value = s.value ? "password" : "text", a.value = s.value ? i.value ? c : "" : a.value;
|
|
807
|
+
}
|
|
808
|
+
return m(), { isPassword: s, onClickAppendedButton: f };
|
|
809
|
+
}
|
|
810
|
+
function bo(e, t, n) {
|
|
811
|
+
const o = r(), {
|
|
812
|
+
onBlurTextBox: a,
|
|
813
|
+
onFocusTextBox: i,
|
|
814
|
+
onInput: s,
|
|
815
|
+
onKeyDown: u,
|
|
816
|
+
textBoxValue: c
|
|
817
|
+
} = n, l = B(() => e.disabled || e.readonly || !e.editable ? "" : e.placeholder), f = B(() => ({
|
|
818
|
+
"form-control": !0,
|
|
819
|
+
"f-utils-fill": !0
|
|
820
|
+
})), m = B(() => ({
|
|
821
|
+
"text-align": e.textAlign
|
|
822
|
+
}));
|
|
823
|
+
function v(I) {
|
|
824
|
+
I.stopPropagation();
|
|
825
|
+
}
|
|
826
|
+
function x() {
|
|
827
|
+
e.selectOnCreated, e.focusOnCreated;
|
|
828
|
+
}
|
|
829
|
+
async function S(I) {
|
|
830
|
+
i(I), await ve, x();
|
|
831
|
+
}
|
|
832
|
+
return oe(async () => {
|
|
833
|
+
await ve, x();
|
|
834
|
+
}), () => p("input", {
|
|
835
|
+
ref: o,
|
|
836
|
+
class: f.value,
|
|
837
|
+
style: m.value,
|
|
838
|
+
type: "text",
|
|
839
|
+
value: c.value,
|
|
840
|
+
disabled: e.disabled,
|
|
841
|
+
readonly: e.readonly || !e.editable,
|
|
842
|
+
placeholder: l.value,
|
|
843
|
+
onBlur: a,
|
|
844
|
+
onChange: v,
|
|
845
|
+
onFocus: S,
|
|
846
|
+
onInput: s,
|
|
847
|
+
onKeydown: u
|
|
848
|
+
}, null);
|
|
849
|
+
}
|
|
850
|
+
function Co(e, t, n) {
|
|
851
|
+
const {
|
|
852
|
+
canDownward: o,
|
|
853
|
+
canUpward: a,
|
|
854
|
+
onClickDownButton: i,
|
|
855
|
+
onClickUpButton: s
|
|
856
|
+
} = n, u = B(() => ({
|
|
857
|
+
"input-group-append": !0,
|
|
858
|
+
"btn-group": !0,
|
|
859
|
+
"btn-group-number": !0
|
|
860
|
+
})), c = B(() => ({
|
|
861
|
+
btn: !0,
|
|
862
|
+
"btn-secondary": !0,
|
|
863
|
+
"btn-number-flag": !0
|
|
864
|
+
})), l = B(() => ({
|
|
865
|
+
cursor: a() ? "pointer" : "not-allowed",
|
|
866
|
+
"margin-left": 0
|
|
867
|
+
})), f = B(() => ({
|
|
868
|
+
cursor: o() ? "pointer" : "not-allowed",
|
|
869
|
+
"margin-left": 0
|
|
870
|
+
}));
|
|
871
|
+
return () => p("div", {
|
|
872
|
+
class: u.value
|
|
873
|
+
}, [p("button", {
|
|
874
|
+
title: "upButton",
|
|
875
|
+
class: c.value,
|
|
876
|
+
style: l.value,
|
|
877
|
+
onClick: s,
|
|
878
|
+
disabled: !a()
|
|
879
|
+
}, [p("span", {
|
|
880
|
+
class: "f-icon f-icon-arrow-chevron-up number-arrow-chevron"
|
|
881
|
+
}, null)]), p("button", {
|
|
882
|
+
title: "downButton",
|
|
883
|
+
class: c.value,
|
|
884
|
+
style: f.value,
|
|
885
|
+
onClick: i,
|
|
886
|
+
disabled: !o()
|
|
887
|
+
}, [p("span", {
|
|
888
|
+
class: "f-icon f-icon-arrow-chevron-down number-arrow-chevron"
|
|
889
|
+
}, null)])]);
|
|
890
|
+
}
|
|
891
|
+
function wo(e, t) {
|
|
892
|
+
const n = yt(e, t), o = bt(e, t, n), a = Ct(e, t, o, n), i = wt(e, t, o, n, a), s = Co(e, t, a), {
|
|
893
|
+
displayValue: u,
|
|
894
|
+
modelValue: c,
|
|
895
|
+
getRealValue: l
|
|
896
|
+
} = n, f = bo(e, t, i), {
|
|
897
|
+
format: m
|
|
898
|
+
} = o, {
|
|
899
|
+
isFocus: v
|
|
900
|
+
} = i, x = B(() => !e.disabled && !e.readonly);
|
|
901
|
+
return oe(() => {
|
|
902
|
+
const S = l(e.modelValue);
|
|
903
|
+
u.value = m(S);
|
|
904
|
+
}), U(() => [e.value], ([S]) => {
|
|
905
|
+
const I = l(S);
|
|
906
|
+
c.value = I, u.value = m(I);
|
|
907
|
+
}), U(() => [e.modelValue], ([S]) => {
|
|
908
|
+
S !== c.value && (c.value = S, !v.value && (u.value = m(l(S))));
|
|
909
|
+
}), U(() => [e.precision, e.useThousands, e.prefix, e.suffix, e.showZero], () => {
|
|
910
|
+
u.value = m(c.value);
|
|
911
|
+
}), () => p("div", {
|
|
912
|
+
class: "input-group f-state-hover flex-row f-cmp-number-spinner"
|
|
913
|
+
}, [f(), x.value && s()]);
|
|
914
|
+
}
|
|
915
|
+
function xo(e, t, n, o) {
|
|
916
|
+
const a = r(), i = r(e.autocomplete), s = r(e.enableTitle), {
|
|
917
|
+
isPassword: u
|
|
918
|
+
} = n, c = r(e.minLength), l = r(e.maxLength), f = r(e.tabIndex), {
|
|
919
|
+
disabled: m,
|
|
920
|
+
displayText: v,
|
|
921
|
+
inputType: x,
|
|
922
|
+
onBlur: S,
|
|
923
|
+
onFocus: I,
|
|
924
|
+
onInput: E,
|
|
925
|
+
onClick: F,
|
|
926
|
+
onKeydown: R,
|
|
927
|
+
onKeyup: P,
|
|
928
|
+
onMousedown: N,
|
|
929
|
+
onTextBoxValueChange: H,
|
|
930
|
+
readonly: z,
|
|
931
|
+
placeholder: d,
|
|
932
|
+
textBoxClass: T,
|
|
933
|
+
textBoxTitle: j
|
|
934
|
+
} = o;
|
|
935
|
+
return oe(() => {
|
|
936
|
+
e.selectOnCreated, e.focusOnCreated;
|
|
937
|
+
}), () => p("input", {
|
|
938
|
+
ref: a,
|
|
939
|
+
name: "input-group-value",
|
|
940
|
+
autocomplete: i.value,
|
|
941
|
+
class: T.value,
|
|
942
|
+
disabled: m == null ? void 0 : m.value,
|
|
943
|
+
maxlength: l.value,
|
|
944
|
+
minlength: c.value,
|
|
945
|
+
placeholder: d.value,
|
|
946
|
+
readonly: z == null ? void 0 : z.value,
|
|
947
|
+
tabindex: f.value,
|
|
948
|
+
title: s.value && !u.value ? j.value : "",
|
|
949
|
+
type: x.value,
|
|
950
|
+
value: v == null ? void 0 : v.value,
|
|
951
|
+
onBlur: S,
|
|
952
|
+
onClick: F,
|
|
953
|
+
onChange: H,
|
|
954
|
+
onFocus: I,
|
|
955
|
+
onInput: E,
|
|
956
|
+
onKeydown: R,
|
|
957
|
+
onKeyup: P,
|
|
958
|
+
onMousedown: N
|
|
959
|
+
}, null);
|
|
960
|
+
}
|
|
961
|
+
function To(e, t) {
|
|
962
|
+
const n = B(() => e.useExtendInfo && !!e.extendInfo), o = Y({
|
|
963
|
+
content: e.extendInfo
|
|
964
|
+
});
|
|
965
|
+
function a() {
|
|
966
|
+
t.emit("updateExtendInfo");
|
|
967
|
+
}
|
|
968
|
+
return () => n.value && lt(p("span", {
|
|
969
|
+
class: "input-group-before-tips",
|
|
970
|
+
onMouseenter: a
|
|
971
|
+
}, [p("i", {
|
|
972
|
+
class: "f-icon f-icon-info-circle"
|
|
973
|
+
}, null), p("b", {
|
|
974
|
+
class: "tips-arrow"
|
|
975
|
+
}, null)]), [[rt("tooltip"), o]]);
|
|
976
|
+
}
|
|
977
|
+
function ko(e, t, n, o, a) {
|
|
978
|
+
const {
|
|
979
|
+
appendedButtonClass: i,
|
|
980
|
+
appendedContent: s
|
|
981
|
+
} = n, u = B(() => e.showButtonWhenDisabled && (!e.editable || !e.readonly) && !e.disabled), c = B(() => s.value && !t.slots.groupTextTemplate), l = B(() => !!t.slots.groupTextTemplate), {
|
|
982
|
+
clearButtonClass: f,
|
|
983
|
+
clearButtonStyle: m,
|
|
984
|
+
onClearValue: v,
|
|
985
|
+
shouldShowClearButton: x
|
|
986
|
+
} = o;
|
|
987
|
+
function S() {
|
|
988
|
+
return p("span", {
|
|
989
|
+
id: "clearIcon",
|
|
990
|
+
class: f.value,
|
|
991
|
+
style: m.value,
|
|
992
|
+
onClick: (d) => v(d)
|
|
993
|
+
}, [p("i", {
|
|
994
|
+
class: "f-icon modal_close"
|
|
995
|
+
}, null)]);
|
|
996
|
+
}
|
|
997
|
+
function I(d) {
|
|
998
|
+
t.emit("iconMouseEnter", d);
|
|
999
|
+
}
|
|
1000
|
+
function E(d) {
|
|
1001
|
+
t.emit("iconMouseLeave", d);
|
|
1002
|
+
}
|
|
1003
|
+
function F(d) {
|
|
1004
|
+
u.value && t.emit("clickHandle", {
|
|
1005
|
+
originalEvent: d
|
|
1006
|
+
}), d.stopPropagation();
|
|
1007
|
+
}
|
|
1008
|
+
const R = e.type === "password" ? a.onClickAppendedButton : F;
|
|
1009
|
+
function P() {
|
|
1010
|
+
return p("span", {
|
|
1011
|
+
class: "input-group-text",
|
|
1012
|
+
onMouseenter: (d) => I(d),
|
|
1013
|
+
onMouseleave: (d) => E(d),
|
|
1014
|
+
innerHTML: s.value,
|
|
1015
|
+
onClick: (d) => R(d)
|
|
1016
|
+
}, null);
|
|
1017
|
+
}
|
|
1018
|
+
function N() {
|
|
1019
|
+
return t.slots.groupTextTemplate && t.slots.groupTextTemplate();
|
|
1020
|
+
}
|
|
1021
|
+
function H() {
|
|
1022
|
+
return c.value ? P : l.value ? N : "";
|
|
1023
|
+
}
|
|
1024
|
+
const z = H();
|
|
1025
|
+
return () => p("div", {
|
|
1026
|
+
class: i.value
|
|
1027
|
+
}, [x.value && S(), z && z()]);
|
|
1028
|
+
}
|
|
1029
|
+
const Bo = /* @__PURE__ */ ne({
|
|
1030
|
+
name: "FInputGroup",
|
|
1031
|
+
props: Ne,
|
|
1032
|
+
emits: ["clear", "change", "blur", "click", "clickHandle", "focus", "input", "keydown", "keyup", "iconMouseEnter", "iconMouseLeave", "update:modelValue", "update:value", "updateExtendInfo", "valueChange"],
|
|
1033
|
+
setup(e, t) {
|
|
1034
|
+
const n = r(e.modelValue), o = r(e.modelValue), a = vt(e, t, n, o), {
|
|
1035
|
+
inputGroupClass: i,
|
|
1036
|
+
inputType: s,
|
|
1037
|
+
inputGroupStyle: u
|
|
1038
|
+
} = a, c = ho(e), {
|
|
1039
|
+
shouldShowAppendedButton: l
|
|
1040
|
+
} = c, f = gt(e, t, a), {
|
|
1041
|
+
onMouseEnter: m,
|
|
1042
|
+
onMouseLeave: v
|
|
1043
|
+
} = f, x = yo(e, t, s, c), S = wo(e, t), I = xo(e, t, x, a), E = ko(e, t, c, f, x), F = To(e, t), R = B(() => e.type === "number");
|
|
1044
|
+
U(() => [e.value], ([N]) => {
|
|
1045
|
+
n.value = N, o.value = N;
|
|
1046
|
+
}), U(() => [e.modelValue], ([N]) => {
|
|
1047
|
+
n.value = N, o.value = N;
|
|
1048
|
+
}), oe(() => {
|
|
1049
|
+
e.value && (n.value = e.value, o.value = e.value);
|
|
1050
|
+
});
|
|
1051
|
+
const P = () => p(te, null, [p("div", {
|
|
1052
|
+
id: e.id,
|
|
1053
|
+
class: i.value,
|
|
1054
|
+
style: u.value,
|
|
1055
|
+
onMouseenter: m,
|
|
1056
|
+
onMouseleave: v
|
|
1057
|
+
}, [R.value ? S() : p(te, null, [F(), I(), l.value && E()])])]);
|
|
1058
|
+
return () => P();
|
|
1059
|
+
}
|
|
1060
|
+
}), h = {}, y = {}, b = {}, w = {};
|
|
1061
|
+
let Te = !1;
|
|
1062
|
+
function So() {
|
|
1063
|
+
Te || (Te = !0, Tt.register(h, y, b, w), xt.register(h, y, b, w), kt.register(h, y, b, w), Bt.register(h, y, b, w), St.register(h, y, b, w), Ft.register(h, y, b, w), Mt.register(h, y, b, w), Et.register(h, y, b, w), Rt.register(h, y, b, w), Ot.register(h, y, b, w), jt.register(h, y, b, w), It.register(h, y, b, w), Pt.register(h, y, b, w), Vt.register(h, y, b, w), Nt.register(h, y, b, w), Lt.register(h, y, b, w), Dt.register(h, y, b, w), $t.register(h, y, b, w), zt.register(h, y, b, w), At.register(h, y, b, w), qt.register(h, y, b, w), Me.register(h, y, b, w), Gt.register(h, y, b, w), Ut.register(h, y, b, w), Wt.register(h, y, b, w), Xt.register(h, y, b, w), Yt.register(h, y, b, w), Jt.register(h, y, b, w), ht.register(h, y, b, w), Qt.register(h, y, b, w), Zt.register(h, y, b, w), _t.register(h, y, b, w), Kt.register(h, y, b, w), en.register(h, y, b, w), tn.register(h, y, b, w), nn.register(h, y, b, w), on.register(h, y, b, w), ln.register(h, y, b, w), rn.register(h, y, b, w), an.register(h, y, b, w), Tn.register(h, y, b), sn.register(h, y, b, w), un.register(h, y, b, w), cn.register(h, y, b, w), dn.register(h, y, b, w), pn.register(h, y, b, w), mn.register(h, y, b, w), Ee.register(h, y, b, w), vn.register(h, y, b, w), gn.register(h, y, b, w), hn.register(h, y, b, w), yn.register(h, y, b, w), Re.register(h, y, b, w), Cn.register(h, y, b, w), bn.register(h, y, b, w), wn.register(h, y, b, w), xn.register(h, y, b, w), Oe.register(h, y, b, w), kn.register(h, y, b, w), Ht.register(h, y, b, w), Bn.register(h, y, b, w));
|
|
1064
|
+
}
|
|
1065
|
+
function Fo() {
|
|
1066
|
+
So();
|
|
1067
|
+
function e(a) {
|
|
1068
|
+
return h[a] || Bo;
|
|
1069
|
+
}
|
|
1070
|
+
function t(a, i) {
|
|
1071
|
+
const s = y[a];
|
|
1072
|
+
return s ? s(i) : {};
|
|
1073
|
+
}
|
|
1074
|
+
function n(a) {
|
|
1075
|
+
switch (a) {
|
|
1076
|
+
case "check-box":
|
|
1077
|
+
return "onChangeValue";
|
|
1078
|
+
case "switch":
|
|
1079
|
+
return "onModelValueChanged";
|
|
1080
|
+
case "check-group":
|
|
1081
|
+
return "onChangeValue";
|
|
1082
|
+
case "combo-list":
|
|
1083
|
+
case "combo-tree":
|
|
1084
|
+
return "onChange";
|
|
1085
|
+
case "combo-lookup":
|
|
1086
|
+
return "";
|
|
1087
|
+
case "date-picker":
|
|
1088
|
+
return "onDatePicked";
|
|
1089
|
+
case "date-range":
|
|
1090
|
+
return "";
|
|
1091
|
+
case "datetime-picker":
|
|
1092
|
+
return "";
|
|
1093
|
+
case "datetime-range":
|
|
1094
|
+
return "";
|
|
1095
|
+
case "month-picker":
|
|
1096
|
+
return "";
|
|
1097
|
+
case "month-range":
|
|
1098
|
+
return "";
|
|
1099
|
+
case "year-picker":
|
|
1100
|
+
return "";
|
|
1101
|
+
case "year-range":
|
|
1102
|
+
return "";
|
|
1103
|
+
case "input-group":
|
|
1104
|
+
return "onChange";
|
|
1105
|
+
case "lookup":
|
|
1106
|
+
return "onUpdate:modelValue";
|
|
1107
|
+
case "number-range":
|
|
1108
|
+
return "onValueChange";
|
|
1109
|
+
case "number-spinner":
|
|
1110
|
+
return "onValueChange";
|
|
1111
|
+
case "radio-group":
|
|
1112
|
+
return "onChangeValue";
|
|
1113
|
+
case "text":
|
|
1114
|
+
return "";
|
|
1115
|
+
case "response-layout-editor-setting":
|
|
1116
|
+
return "onChange";
|
|
1117
|
+
case "events-editor":
|
|
1118
|
+
return "onSavedCommandListChanged";
|
|
1119
|
+
case "grid-field-editor":
|
|
1120
|
+
return "onChange";
|
|
1121
|
+
case "item-collection-editor":
|
|
1122
|
+
return "onChange";
|
|
1123
|
+
case "response-form-layout-setting":
|
|
1124
|
+
return "onChange";
|
|
1125
|
+
case "field-selector":
|
|
1126
|
+
case "binding-selector":
|
|
1127
|
+
return "onFieldSelected";
|
|
1128
|
+
case "schema-selector":
|
|
1129
|
+
return "onSchemaSelected";
|
|
1130
|
+
case "mapping-editor":
|
|
1131
|
+
return "onMappingFieldsChanged";
|
|
1132
|
+
case "textarea":
|
|
1133
|
+
return "onValueChange";
|
|
1134
|
+
case "query-solution-config":
|
|
1135
|
+
return "onFieldsChanged";
|
|
1136
|
+
}
|
|
1137
|
+
}
|
|
1138
|
+
function o(a) {
|
|
1139
|
+
switch (a) {
|
|
1140
|
+
case "combo-list":
|
|
1141
|
+
case "input-group":
|
|
1142
|
+
case "textarea":
|
|
1143
|
+
return "onClear";
|
|
1144
|
+
}
|
|
1145
|
+
}
|
|
1146
|
+
return { resolveEditorProps: t, resolveEditorType: e, getChangeFunctionName: n, getClearFunctionName: o };
|
|
1147
|
+
}
|
|
1148
|
+
const Mo = /* @__PURE__ */ ne({
|
|
1149
|
+
name: "FDynamicFormGroup",
|
|
1150
|
+
props: Ve,
|
|
1151
|
+
emits: ["change", "update:modelValue"],
|
|
1152
|
+
setup(e, t) {
|
|
1153
|
+
const n = r(e.id), o = r(e.customClass), a = r(e.editor), i = r(e.label), s = r(e.modelValue), u = r(e.readonly), c = r(e.required), l = r(e.showLabel), f = r(e.visible);
|
|
1154
|
+
r(e.type);
|
|
1155
|
+
const m = r(), {
|
|
1156
|
+
resolveEditorProps: v,
|
|
1157
|
+
resolveEditorType: x,
|
|
1158
|
+
getChangeFunctionName: S,
|
|
1159
|
+
getClearFunctionName: I
|
|
1160
|
+
} = Fo(), E = B(() => ({
|
|
1161
|
+
"form-group": !0,
|
|
1162
|
+
"farris-form-group": !0,
|
|
1163
|
+
"common-group": !0,
|
|
1164
|
+
"q-state-readonly": u.value
|
|
1165
|
+
}));
|
|
1166
|
+
function F(N, H) {
|
|
1167
|
+
s.value = H !== void 0 ? H : N, t.emit("update:modelValue", s.value), t.emit("change", s.value);
|
|
1168
|
+
}
|
|
1169
|
+
function R() {
|
|
1170
|
+
t.emit("update:modelValue", "");
|
|
1171
|
+
}
|
|
1172
|
+
const P = B(() => {
|
|
1173
|
+
const N = a.value.type || "input-group", H = x(N), z = v(N, a.value), d = S(N), T = I(a.value.type);
|
|
1174
|
+
return T && (z[T] = R), z[d] = F, (z.id == null || z.id === "") && (z.id = n.value), () => p(H, he({
|
|
1175
|
+
ref: m
|
|
1176
|
+
}, z, {
|
|
1177
|
+
modelValue: s.value,
|
|
1178
|
+
"onUpdate:modelValue": (j) => s.value = j
|
|
1179
|
+
}), t.slots);
|
|
1180
|
+
});
|
|
1181
|
+
return U([() => e.id, () => e.customClass, () => e.editor, () => e.label, () => e.modelValue, () => e.readonly, () => e.required, () => e.showLabel, () => e.visible], ([N, H, z, d, T, j, O, D, W]) => {
|
|
1182
|
+
n.value = N, o.value = H, a.value = z, i.value = d, s.value = T, u.value = j, c.value = O, l.value = D, f.value = W;
|
|
1183
|
+
}), t.expose({
|
|
1184
|
+
editorRef: m
|
|
1185
|
+
}), () => f.value && p("div", {
|
|
1186
|
+
id: `${n.value}-input-group`,
|
|
1187
|
+
class: o.value,
|
|
1188
|
+
style: e.customStyle
|
|
1189
|
+
}, [p("div", {
|
|
1190
|
+
class: "farris-group-wrap"
|
|
1191
|
+
}, [p("div", {
|
|
1192
|
+
class: E.value
|
|
1193
|
+
}, [l.value && p(ao, {
|
|
1194
|
+
id: `${n.value}-lable`,
|
|
1195
|
+
required: c.value,
|
|
1196
|
+
text: i.value,
|
|
1197
|
+
title: i.value
|
|
1198
|
+
}, null), p("div", {
|
|
1199
|
+
class: "farris-input-wrap"
|
|
1200
|
+
}, [P.value()])])])]);
|
|
1201
|
+
}
|
|
1202
|
+
}), ee = class ee {
|
|
1203
|
+
/**
|
|
1204
|
+
* 根据绑定字段类型获取可用的输入类控件
|
|
1205
|
+
*/
|
|
1206
|
+
static getEditorTypesByMDataType(t) {
|
|
1207
|
+
const n = ee.fieldControlTypeMapping[t];
|
|
1208
|
+
return n || [{ key: "", value: "" }];
|
|
1209
|
+
}
|
|
1210
|
+
/**
|
|
1211
|
+
* 获取所有输入类控件
|
|
1212
|
+
*/
|
|
1213
|
+
static getAllInputTypes() {
|
|
1214
|
+
const t = [];
|
|
1215
|
+
for (const n in ee.fieldControlTypeMapping)
|
|
1216
|
+
ee.fieldControlTypeMapping[n].forEach((o) => {
|
|
1217
|
+
t.find((a) => a.key === o.key && a.value === o.value) || t.push({ key: o.key, value: o.value });
|
|
1218
|
+
});
|
|
1219
|
+
return t;
|
|
1220
|
+
}
|
|
1221
|
+
};
|
|
1222
|
+
/**
|
|
1223
|
+
* <字段类型,可配置的控件类型列表>的映射
|
|
1224
|
+
*/
|
|
1225
|
+
X(ee, "fieldControlTypeMapping", {
|
|
1226
|
+
String: [
|
|
1227
|
+
{ key: M["input-group"].type, value: M["input-group"].name },
|
|
1228
|
+
{ key: M.lookup.type, value: M.lookup.name },
|
|
1229
|
+
{ key: M["date-picker"].type, value: M["date-picker"].name },
|
|
1230
|
+
{ key: M["check-box"].type, value: M["check-box"].name },
|
|
1231
|
+
{ key: M["check-group"].type, value: M["check-group"].name },
|
|
1232
|
+
{ key: M["radio-group"].type, value: M["radio-group"].name },
|
|
1233
|
+
{ key: M["combo-list"].type, value: M["combo-list"].name },
|
|
1234
|
+
{ key: M.textarea.type, value: M.textarea.name }
|
|
1235
|
+
],
|
|
1236
|
+
Text: [
|
|
1237
|
+
{ key: M.textarea.type, value: M.textarea.name },
|
|
1238
|
+
{ key: M.lookup.type, value: M.lookup.name }
|
|
1239
|
+
],
|
|
1240
|
+
Decimal: [
|
|
1241
|
+
{ key: M["number-spinner"].type, value: M["number-spinner"].name }
|
|
1242
|
+
],
|
|
1243
|
+
Integer: [
|
|
1244
|
+
{ key: M["number-spinner"].type, value: M["number-spinner"].name }
|
|
1245
|
+
],
|
|
1246
|
+
Number: [
|
|
1247
|
+
{ key: M["number-spinner"].type, value: M["number-spinner"].name }
|
|
1248
|
+
],
|
|
1249
|
+
BigNumber: [
|
|
1250
|
+
{ key: M["number-spinner"].type, value: M["number-spinner"].name }
|
|
1251
|
+
],
|
|
1252
|
+
Date: [
|
|
1253
|
+
{ key: M["date-picker"].type, value: M["date-picker"].name }
|
|
1254
|
+
],
|
|
1255
|
+
DateTime: [
|
|
1256
|
+
{ key: M["date-picker"].type, value: M["date-picker"].name }
|
|
1257
|
+
],
|
|
1258
|
+
Boolean: [
|
|
1259
|
+
{ key: M.switch.type, value: M.switch.name },
|
|
1260
|
+
{ key: M["check-box"].type, value: M["check-box"].name }
|
|
1261
|
+
],
|
|
1262
|
+
Enum: [
|
|
1263
|
+
{ key: M["combo-list"].type, value: M["combo-list"].name },
|
|
1264
|
+
{ key: M["radio-group"].type, value: M["radio-group"].name }
|
|
1265
|
+
],
|
|
1266
|
+
Object: [
|
|
1267
|
+
{ key: M.lookup.type, value: M.lookup.name },
|
|
1268
|
+
{ key: M["combo-list"].type, value: M["combo-list"].name },
|
|
1269
|
+
{ key: M["radio-group"].type, value: M["radio-group"].name }
|
|
1270
|
+
]
|
|
1271
|
+
});
|
|
1272
|
+
let ke = ee;
|
|
1273
|
+
r(0);
|
|
1274
|
+
const Eo = {
|
|
1275
|
+
id: { type: String, default: "" },
|
|
1276
|
+
/** 筛选组件配置器,具体配置项可查看各组件文档 */
|
|
1277
|
+
editor: { type: Object, default: {} },
|
|
1278
|
+
/** 组件值 */
|
|
1279
|
+
modelValue: { type: [String, Boolean, Array, Number], default: "" },
|
|
1280
|
+
/**
|
|
1281
|
+
* 作为内嵌编辑器被创建后默认获得焦点
|
|
1282
|
+
*/
|
|
1283
|
+
focusOnCreated: { type: Boolean, default: !1 },
|
|
1284
|
+
/**
|
|
1285
|
+
* 作为内嵌编辑器被创建后默认选中文本
|
|
1286
|
+
*/
|
|
1287
|
+
selectOnCreated: { type: Boolean, default: !1 }
|
|
1288
|
+
};
|
|
1289
|
+
ue(
|
|
1290
|
+
Eo,
|
|
1291
|
+
Pe,
|
|
1292
|
+
ye,
|
|
1293
|
+
void 0
|
|
1294
|
+
);
|
|
1295
|
+
const Ro = "https://json-schema.org/draft/2020-12/schema", Oo = "https://farris-design.gitee.io/grid-field-editor.schema.json", Io = "response-form-layout-setting", jo = "A Farris Data Grid Component", Po = "object", Vo = {
|
|
1296
|
+
id: {
|
|
1297
|
+
description: "The unique identifier for a Input Group",
|
|
1298
|
+
type: "string"
|
|
1299
|
+
},
|
|
1300
|
+
type: {
|
|
1301
|
+
description: "The type string of Input Group component",
|
|
1302
|
+
type: "string",
|
|
1303
|
+
default: "response-form-layout-setting"
|
|
1304
|
+
},
|
|
1305
|
+
viewModelId: {
|
|
1306
|
+
description: "",
|
|
1307
|
+
type: "string",
|
|
1308
|
+
default: ""
|
|
1309
|
+
},
|
|
1310
|
+
gridData: {
|
|
1311
|
+
description: "",
|
|
1312
|
+
type: "Object",
|
|
1313
|
+
default: null
|
|
1314
|
+
}
|
|
1315
|
+
}, No = [
|
|
1316
|
+
"id",
|
|
1317
|
+
"type"
|
|
1318
|
+
], Lo = {
|
|
1319
|
+
$schema: Ro,
|
|
1320
|
+
$id: Oo,
|
|
1321
|
+
title: Io,
|
|
1322
|
+
description: jo,
|
|
1323
|
+
type: Po,
|
|
1324
|
+
properties: Vo,
|
|
1325
|
+
required: No
|
|
1326
|
+
}, Do = {
|
|
1327
|
+
initialState: {
|
|
1328
|
+
type: Object,
|
|
1329
|
+
default: {
|
|
1330
|
+
uniqueColClassInSM: 12,
|
|
1331
|
+
uniqueColClassInMD: 6,
|
|
1332
|
+
uniqueColClassInLG: 3,
|
|
1333
|
+
uniqueColClassInEL: 2
|
|
1334
|
+
}
|
|
1335
|
+
}
|
|
1336
|
+
};
|
|
1337
|
+
Sn(Do, Lo, Nn, zn);
|
|
1338
|
+
const $o = {
|
|
1339
|
+
width: { Type: Number, default: 400 },
|
|
1340
|
+
type: { Type: String, default: "info" },
|
|
1341
|
+
title: { Type: String, default: "" },
|
|
1342
|
+
detail: { Type: String, default: "" },
|
|
1343
|
+
okButtonText: { Type: String, default: "确定" },
|
|
1344
|
+
cancelButtonText: { Type: String, default: "取消" },
|
|
1345
|
+
exceptionInfo: { Type: Object, default: null },
|
|
1346
|
+
promptEditorType: { Type: String, default: "text-area" }
|
|
1347
|
+
};
|
|
1348
|
+
function be() {
|
|
1349
|
+
return new DOMException("The request is not allowed", "NotAllowedError");
|
|
1350
|
+
}
|
|
1351
|
+
async function zo(e) {
|
|
1352
|
+
if (!navigator.clipboard)
|
|
1353
|
+
throw be();
|
|
1354
|
+
return navigator.clipboard.writeText(e);
|
|
1355
|
+
}
|
|
1356
|
+
async function Ho(e) {
|
|
1357
|
+
const t = document.createElement("span");
|
|
1358
|
+
t.textContent = e, t.style.whiteSpace = "pre", t.style.webkitUserSelect = "auto", t.style.userSelect = "all", document.body.appendChild(t);
|
|
1359
|
+
const n = window.getSelection(), o = window.document.createRange();
|
|
1360
|
+
n == null || n.removeAllRanges(), o.selectNode(t), n == null || n.addRange(o);
|
|
1361
|
+
let a = !1;
|
|
1362
|
+
try {
|
|
1363
|
+
a = window.document.execCommand("copy");
|
|
1364
|
+
} finally {
|
|
1365
|
+
n == null || n.removeAllRanges(), window.document.body.removeChild(t);
|
|
1366
|
+
}
|
|
1367
|
+
if (!a)
|
|
1368
|
+
throw be();
|
|
1369
|
+
}
|
|
1370
|
+
async function Ao(e) {
|
|
1371
|
+
try {
|
|
1372
|
+
await zo(e);
|
|
1373
|
+
} catch (t) {
|
|
1374
|
+
try {
|
|
1375
|
+
await Ho(e);
|
|
1376
|
+
} catch (n) {
|
|
1377
|
+
throw n || t || be();
|
|
1378
|
+
}
|
|
1379
|
+
}
|
|
1380
|
+
}
|
|
1381
|
+
function qo() {
|
|
1382
|
+
async function e(t) {
|
|
1383
|
+
await Ao(t);
|
|
1384
|
+
}
|
|
1385
|
+
return { onCopy: e };
|
|
1386
|
+
}
|
|
1387
|
+
function Uo(e, t, n, o) {
|
|
1388
|
+
const a = r(14), i = r(140), s = r(""), u = r(o.value.length), c = B(() => o.value), l = B(() => ({
|
|
1389
|
+
"font-size": `${a.value}px`,
|
|
1390
|
+
height: "100%"
|
|
1391
|
+
}));
|
|
1392
|
+
function f(m) {
|
|
1393
|
+
if (m.currentTarget) {
|
|
1394
|
+
const v = m.currentTarget.value || "";
|
|
1395
|
+
u.value = v.length;
|
|
1396
|
+
}
|
|
1397
|
+
}
|
|
1398
|
+
return () => p(te, null, [p("textarea", {
|
|
1399
|
+
title: "promptMessage",
|
|
1400
|
+
name: "promptMessage",
|
|
1401
|
+
class: "form-control",
|
|
1402
|
+
style: l.value,
|
|
1403
|
+
rows: "4",
|
|
1404
|
+
maxlength: i.value,
|
|
1405
|
+
onInput: (m) => f(m)
|
|
1406
|
+
}, [c.value]), p("span", {
|
|
1407
|
+
class: "textarea-wordcount",
|
|
1408
|
+
title: s.value,
|
|
1409
|
+
style: "position: absolute; bottom: 76px; right: 32px; cursor: pointer; text-align: right;"
|
|
1410
|
+
}, [u.value + " / " + i.value])]);
|
|
1411
|
+
}
|
|
1412
|
+
function Go(e, t, n, o) {
|
|
1413
|
+
const a = Uo(e, t, n, o), i = /* @__PURE__ */ new Map([["text-area", a]]);
|
|
1414
|
+
function s(u) {
|
|
1415
|
+
return i.get(u) || null;
|
|
1416
|
+
}
|
|
1417
|
+
return { getEditorRender: s };
|
|
1418
|
+
}
|
|
1419
|
+
function Wo() {
|
|
1420
|
+
const e = r(!1), t = r("复制成功");
|
|
1421
|
+
return {
|
|
1422
|
+
feedbackStyle: B(() => {
|
|
1423
|
+
const o = {
|
|
1424
|
+
position: "absolute",
|
|
1425
|
+
left: "50%",
|
|
1426
|
+
top: "50%",
|
|
1427
|
+
width: "100px",
|
|
1428
|
+
height: "40px",
|
|
1429
|
+
background: "#303C53",
|
|
1430
|
+
"line-height": "40px",
|
|
1431
|
+
"text-align": "center",
|
|
1432
|
+
"margin-left": "-30px",
|
|
1433
|
+
"margin-top": "-50px",
|
|
1434
|
+
"border-radius": "10px",
|
|
1435
|
+
"box-shadow": "0px 2px 8px 0px",
|
|
1436
|
+
color: "#fff",
|
|
1437
|
+
transition: "all .3s ease"
|
|
1438
|
+
};
|
|
1439
|
+
return o.opacity = e.value ? "0.8" : "0", o.display = e.value ? "" : "none", o;
|
|
1440
|
+
}),
|
|
1441
|
+
feedbackMessage: t,
|
|
1442
|
+
toShowFeedback: e
|
|
1443
|
+
};
|
|
1444
|
+
}
|
|
1445
|
+
function Xo(e, t) {
|
|
1446
|
+
const n = t.getEditorRender(e.promptEditorType);
|
|
1447
|
+
return () => n && n();
|
|
1448
|
+
}
|
|
1449
|
+
function Yo(e) {
|
|
1450
|
+
const t = r(3), n = r(480), o = B(() => !!e.value && !!e.value.date), a = B(() => `发生时间 : ${e.value && e.value.date || ""}`), i = B(() => !!e.value && !!e.value.detail), s = B(() => {
|
|
1451
|
+
const E = `${n.value}px`;
|
|
1452
|
+
return {
|
|
1453
|
+
overflow: "hidden",
|
|
1454
|
+
"text-overflow": "ellipsis",
|
|
1455
|
+
display: "-webkit-box",
|
|
1456
|
+
"-webkit-box-orient": "vertical",
|
|
1457
|
+
"-webkit-line-clamp": t.value,
|
|
1458
|
+
"max-height": E
|
|
1459
|
+
};
|
|
1460
|
+
}), u = B(() => e.value && e.value.detail || ""), c = B(() => !0), l = r(!1), f = r("展开"), m = r("收起"), v = B(() => {
|
|
1461
|
+
const E = {
|
|
1462
|
+
display: "block",
|
|
1463
|
+
color: "#2A87FF"
|
|
1464
|
+
};
|
|
1465
|
+
return E["text-align"] = l.value ? "" : "right", E;
|
|
1466
|
+
});
|
|
1467
|
+
function x(E, F) {
|
|
1468
|
+
l.value = !l.value, t.value = l.value ? 20 : 3;
|
|
1469
|
+
}
|
|
1470
|
+
function S(E) {
|
|
1471
|
+
return x();
|
|
1472
|
+
}
|
|
1473
|
+
function I(E) {
|
|
1474
|
+
return x();
|
|
1475
|
+
}
|
|
1476
|
+
return () => p("div", {
|
|
1477
|
+
class: "toast-msg-detail"
|
|
1478
|
+
}, [o.value && p("div", null, [a.value]), i.value && p("div", {
|
|
1479
|
+
id: "exception_error_msg",
|
|
1480
|
+
ref: "exceptionMessageRef",
|
|
1481
|
+
style: s.value
|
|
1482
|
+
}, [Be("详细信息 : "), p("span", {
|
|
1483
|
+
innerHTML: u.value
|
|
1484
|
+
}, null)]), c.value && p("span", {
|
|
1485
|
+
style: v.value
|
|
1486
|
+
}, [l.value && p("span", {
|
|
1487
|
+
onClick: S,
|
|
1488
|
+
style: "cursor: pointer;"
|
|
1489
|
+
}, [m.value]), !l.value && p("span", {
|
|
1490
|
+
onClick: I,
|
|
1491
|
+
style: "cursor: pointer;"
|
|
1492
|
+
}, [f.value])])]);
|
|
1493
|
+
}
|
|
1494
|
+
function Jo(e) {
|
|
1495
|
+
return () => p("p", {
|
|
1496
|
+
class: "toast-msg-detail",
|
|
1497
|
+
innerHTML: e.value
|
|
1498
|
+
}, null);
|
|
1499
|
+
}
|
|
1500
|
+
function Qo(e, t, n, o) {
|
|
1501
|
+
const a = r(e.exceptionInfo), i = B(() => {
|
|
1502
|
+
const v = {
|
|
1503
|
+
"f-icon": !0
|
|
1504
|
+
}, x = `f-icon-${t.value}`;
|
|
1505
|
+
return v[x] = !0, v;
|
|
1506
|
+
}), s = B(() => n.value || a.value && a.value.message), u = B(() => o.value), c = B(() => !!o.value), l = B(() => !!a.value);
|
|
1507
|
+
function f() {
|
|
1508
|
+
return l.value ? Yo(a) : c.value ? Jo(u) : () => null;
|
|
1509
|
+
}
|
|
1510
|
+
const m = f();
|
|
1511
|
+
return () => p(te, null, [p("div", {
|
|
1512
|
+
class: "float-left modal-tips-iconwrap"
|
|
1513
|
+
}, [p("span", {
|
|
1514
|
+
class: i.value
|
|
1515
|
+
}, null)]), p("div", {
|
|
1516
|
+
class: "modal-tips-content"
|
|
1517
|
+
}, [p("p", {
|
|
1518
|
+
class: "toast-msg-title",
|
|
1519
|
+
innerHTML: s.value
|
|
1520
|
+
}, null), m()])]);
|
|
1521
|
+
}
|
|
1522
|
+
function Zo(e, t, n) {
|
|
1523
|
+
const {
|
|
1524
|
+
onCopy: o
|
|
1525
|
+
} = t, {
|
|
1526
|
+
toShowFeedback: a
|
|
1527
|
+
} = n, i = r("复制成功"), s = r("复制详细信息"), u = r(e.exceptionInfo || {
|
|
1528
|
+
date: "",
|
|
1529
|
+
message: "",
|
|
1530
|
+
detail: ""
|
|
1531
|
+
}), c = B(() => u.value && u.value.detail || "");
|
|
1532
|
+
function l(f) {
|
|
1533
|
+
o(c.value).catch((m) => {
|
|
1534
|
+
i.value = "复制失败";
|
|
1535
|
+
}).finally(() => {
|
|
1536
|
+
a.value = !0, setTimeout(() => {
|
|
1537
|
+
a.value = !1;
|
|
1538
|
+
}, 700);
|
|
1539
|
+
});
|
|
1540
|
+
}
|
|
1541
|
+
return () => p("span", {
|
|
1542
|
+
style: "width: 100%;color: #2A87FF;padding-left: 37px;"
|
|
1543
|
+
}, [p("span", {
|
|
1544
|
+
onClick: l,
|
|
1545
|
+
style: "cursor: pointer;"
|
|
1546
|
+
}, [s.value])]);
|
|
1547
|
+
}
|
|
1548
|
+
function _o(e, t, n, o) {
|
|
1549
|
+
const a = r(e.type), i = r([]), s = r(e.exceptionInfo), u = r(e.okButtonText), c = r(e.cancelButtonText), l = r(!0), f = r(!0), m = B(() => !!(i.value && i.value.length)), v = B(() => s.value && s.value.date && s.value.message && s.value.detail), x = B(() => !(i.value && i.value.length) && (u.value || c.value)), S = B(() => f.value && u.value), I = B(() => l.value && c.value), E = Zo(e, n, o);
|
|
1550
|
+
function F(P) {
|
|
1551
|
+
a.value === "question" && t.emit("reject"), t.emit("close");
|
|
1552
|
+
}
|
|
1553
|
+
function R(P) {
|
|
1554
|
+
a.value === "question" && t.emit("accept"), t.emit("close");
|
|
1555
|
+
}
|
|
1556
|
+
return () => p("div", {
|
|
1557
|
+
class: "modal-footer"
|
|
1558
|
+
}, [v.value && E(), x.value && I.value && p("button", {
|
|
1559
|
+
type: "button",
|
|
1560
|
+
class: "btn btn-secondary btn-lg",
|
|
1561
|
+
onClick: F
|
|
1562
|
+
}, [c.value]), x.value && S.value && p("button", {
|
|
1563
|
+
type: "button",
|
|
1564
|
+
class: "btn btn-primary btn-lg",
|
|
1565
|
+
onClick: R
|
|
1566
|
+
}, [u.value]), m.value && i.value.length && i.value.map((P) => p("button", {
|
|
1567
|
+
type: "button",
|
|
1568
|
+
onClick: P.handle,
|
|
1569
|
+
class: P.class
|
|
1570
|
+
}, [P.iconClass && p("span", {
|
|
1571
|
+
class: P.iconClass
|
|
1572
|
+
}, null), P.text]))]);
|
|
1573
|
+
}
|
|
1574
|
+
const ie = /* @__PURE__ */ ne({
|
|
1575
|
+
name: "FMessageBox",
|
|
1576
|
+
props: $o,
|
|
1577
|
+
emits: ["accept", "reject", "close"],
|
|
1578
|
+
setup(e, t) {
|
|
1579
|
+
const n = r(e.type), o = r(e.title), a = r(e.detail), i = B(() => {
|
|
1580
|
+
const E = {
|
|
1581
|
+
"modal-tips": !0,
|
|
1582
|
+
"d-flex": !0,
|
|
1583
|
+
"flex-row": !0
|
|
1584
|
+
}, F = `messager-type-${n.value}`;
|
|
1585
|
+
return E[F] = !0, E;
|
|
1586
|
+
}), s = B(() => {
|
|
1587
|
+
const E = {};
|
|
1588
|
+
return n.value === "prompt" ? E.padding = "0.5rem 0.5rem 1rem 1.5rem" : n.value === "error" && (E.padding = "0.5rem 1.5rem 1rem 1.5rem"), E;
|
|
1589
|
+
}), u = qo(), c = Go(e, n, o, a), l = Wo(), {
|
|
1590
|
+
feedbackStyle: f,
|
|
1591
|
+
feedbackMessage: m
|
|
1592
|
+
} = l;
|
|
1593
|
+
function v() {
|
|
1594
|
+
return p("div", {
|
|
1595
|
+
style: f.value
|
|
1596
|
+
}, [m.value]);
|
|
1597
|
+
}
|
|
1598
|
+
function x() {
|
|
1599
|
+
switch (n.value) {
|
|
1600
|
+
case "prompt":
|
|
1601
|
+
return Xo(e, c);
|
|
1602
|
+
default:
|
|
1603
|
+
return Qo(e, n, o, a);
|
|
1604
|
+
}
|
|
1605
|
+
}
|
|
1606
|
+
const S = x(), I = _o(e, t, u, l);
|
|
1607
|
+
return () => p("div", {
|
|
1608
|
+
class: "farris-messager"
|
|
1609
|
+
}, [p("section", {
|
|
1610
|
+
class: i.value,
|
|
1611
|
+
style: s.value
|
|
1612
|
+
}, [S()]), I(), v()]);
|
|
1613
|
+
}
|
|
1614
|
+
}), Ko = {
|
|
1615
|
+
/**
|
|
1616
|
+
* 自定义类
|
|
1617
|
+
*/
|
|
1618
|
+
class: { type: String, default: "" },
|
|
1619
|
+
/**
|
|
1620
|
+
* 模态框标题
|
|
1621
|
+
*/
|
|
1622
|
+
title: { type: String, default: "" },
|
|
1623
|
+
/**
|
|
1624
|
+
* 模态框宽度
|
|
1625
|
+
*/
|
|
1626
|
+
width: { type: Number, default: 500 },
|
|
1627
|
+
/**
|
|
1628
|
+
* 模态框高度
|
|
1629
|
+
*/
|
|
1630
|
+
height: { type: Number, default: 320 },
|
|
1631
|
+
/**
|
|
1632
|
+
* 自定义按钮列表
|
|
1633
|
+
*/
|
|
1634
|
+
buttons: {
|
|
1635
|
+
type: Array,
|
|
1636
|
+
default: []
|
|
1637
|
+
},
|
|
1638
|
+
/**
|
|
1639
|
+
* 是否展示模态框
|
|
1640
|
+
*/
|
|
1641
|
+
modelValue: { type: Boolean, default: !1 },
|
|
1642
|
+
/**
|
|
1643
|
+
* 是否展示头部
|
|
1644
|
+
*/
|
|
1645
|
+
showHeader: { type: Boolean, default: !0 },
|
|
1646
|
+
/**
|
|
1647
|
+
* 是否展示默认按钮
|
|
1648
|
+
*/
|
|
1649
|
+
showButtons: { type: Boolean, default: !0 },
|
|
1650
|
+
/**
|
|
1651
|
+
* 是否启用自适应样式
|
|
1652
|
+
*/
|
|
1653
|
+
fitContent: { type: Boolean, default: !0 },
|
|
1654
|
+
/**
|
|
1655
|
+
* 是否展示右上角按钮
|
|
1656
|
+
*/
|
|
1657
|
+
showCloseButton: { type: Boolean, default: !0 },
|
|
1658
|
+
showMaxButton: { type: Boolean, default: !1 },
|
|
1659
|
+
minHeight: { type: Number },
|
|
1660
|
+
maxHeight: { type: Number },
|
|
1661
|
+
minWidth: { type: Number },
|
|
1662
|
+
maxWidth: { type: Number },
|
|
1663
|
+
containment: { type: Object, default: null },
|
|
1664
|
+
reiszeable: { type: Boolean, default: !1 },
|
|
1665
|
+
draggable: { type: Boolean, default: !1 },
|
|
1666
|
+
dragHandle: { type: Object, default: null },
|
|
1667
|
+
closedCallback: { type: Function, default: null },
|
|
1668
|
+
resizeHandle: { type: Function, default: null },
|
|
1669
|
+
render: { type: Function, default: null },
|
|
1670
|
+
acceptCallback: { type: Function, default: null },
|
|
1671
|
+
rejectCallback: { type: Function, default: null },
|
|
1672
|
+
enableEsc: { type: Boolean, default: !0 },
|
|
1673
|
+
enableEnter: { type: Boolean, default: !1 }
|
|
1674
|
+
};
|
|
1675
|
+
class A {
|
|
1676
|
+
constructor(t, n) {
|
|
1677
|
+
this.x = t, this.y = n;
|
|
1678
|
+
}
|
|
1679
|
+
static getTransformInfo(t) {
|
|
1680
|
+
const o = window.getComputedStyle(t).getPropertyValue("transform").replace(/[^-\d,]/g, "").split(",");
|
|
1681
|
+
if (o.length >= 6) {
|
|
1682
|
+
const a = parseInt(o[4], 10), i = parseInt(o[5], 10);
|
|
1683
|
+
return { x: a, y: i };
|
|
1684
|
+
}
|
|
1685
|
+
return { x: 0, y: 0 };
|
|
1686
|
+
}
|
|
1687
|
+
static fromEvent(t, n = null) {
|
|
1688
|
+
if (this.isMouseEvent(t))
|
|
1689
|
+
return new A(t.clientX, t.clientY);
|
|
1690
|
+
if (n === null || t.changedTouches.length === 1)
|
|
1691
|
+
return new A(t.changedTouches[0].clientX, t.changedTouches[0].clientY);
|
|
1692
|
+
for (let o = 0; o < t.changedTouches.length; o++)
|
|
1693
|
+
if (t.changedTouches[o].target === n)
|
|
1694
|
+
return new A(t.changedTouches[o].clientX, t.changedTouches[o].clientY);
|
|
1695
|
+
}
|
|
1696
|
+
static isMouseEvent(t) {
|
|
1697
|
+
return Object.prototype.toString.apply(t).indexOf("MouseEvent") === 8;
|
|
1698
|
+
}
|
|
1699
|
+
static isIPosition(t) {
|
|
1700
|
+
return !!t && "x" in t && "y" in t;
|
|
1701
|
+
}
|
|
1702
|
+
static getCurrent(t) {
|
|
1703
|
+
const n = new A(0, 0);
|
|
1704
|
+
if (window) {
|
|
1705
|
+
const o = window.getComputedStyle(t);
|
|
1706
|
+
if (o) {
|
|
1707
|
+
const a = parseInt(o.getPropertyValue("left"), 10), i = parseInt(o.getPropertyValue("top"), 10);
|
|
1708
|
+
n.x = isNaN(a) ? 0 : a, n.y = isNaN(i) ? 0 : i;
|
|
1709
|
+
}
|
|
1710
|
+
return n;
|
|
1711
|
+
}
|
|
1712
|
+
return null;
|
|
1713
|
+
}
|
|
1714
|
+
static copy(t) {
|
|
1715
|
+
return new A(0, 0).set(t);
|
|
1716
|
+
}
|
|
1717
|
+
get value() {
|
|
1718
|
+
return { x: this.x, y: this.y };
|
|
1719
|
+
}
|
|
1720
|
+
add(t) {
|
|
1721
|
+
return this.x += t.x, this.y += t.y, this;
|
|
1722
|
+
}
|
|
1723
|
+
subtract(t) {
|
|
1724
|
+
return this.x -= t.x, this.y -= t.y, this;
|
|
1725
|
+
}
|
|
1726
|
+
multiply(t) {
|
|
1727
|
+
this.x *= t, this.y *= t;
|
|
1728
|
+
}
|
|
1729
|
+
divide(t) {
|
|
1730
|
+
this.x /= t, this.y /= t;
|
|
1731
|
+
}
|
|
1732
|
+
reset() {
|
|
1733
|
+
return this.x = 0, this.y = 0, this;
|
|
1734
|
+
}
|
|
1735
|
+
set(t) {
|
|
1736
|
+
return this.x = t.x, this.y = t.y, this;
|
|
1737
|
+
}
|
|
1738
|
+
}
|
|
1739
|
+
class K {
|
|
1740
|
+
constructor(t, n) {
|
|
1741
|
+
this.width = t, this.height = n;
|
|
1742
|
+
}
|
|
1743
|
+
static getCurrent(t) {
|
|
1744
|
+
const n = new K(0, 0);
|
|
1745
|
+
if (window) {
|
|
1746
|
+
const o = window.getComputedStyle(t);
|
|
1747
|
+
return o && (n.width = parseInt(o.getPropertyValue("width"), 10), n.height = parseInt(o.getPropertyValue("height"), 10)), n;
|
|
1748
|
+
}
|
|
1749
|
+
return null;
|
|
1750
|
+
}
|
|
1751
|
+
static copy(t) {
|
|
1752
|
+
return new K(0, 0).set(t);
|
|
1753
|
+
}
|
|
1754
|
+
set(t) {
|
|
1755
|
+
return this.width = t.width, this.height = t.height, this;
|
|
1756
|
+
}
|
|
1757
|
+
}
|
|
1758
|
+
function ea(e, t) {
|
|
1759
|
+
const n = r(), o = r(), a = r(), i = r(), s = r(), u = r(), c = r(), l = r(), f = r(), m = r(), v = r(), x = r(), S = r(e.draggable), I = r(!1);
|
|
1760
|
+
function E() {
|
|
1761
|
+
const C = o.value || document.body, k = window.getComputedStyle(C);
|
|
1762
|
+
if (!k || !n.value)
|
|
1763
|
+
return;
|
|
1764
|
+
const L = A.getTransformInfo(n.value), V = {};
|
|
1765
|
+
c.value && (V.deltaL = n.value.offsetLeft - c.value.x, V.deltaT = n.value.offsetTop - c.value.y);
|
|
1766
|
+
const q = k.getPropertyValue("position");
|
|
1767
|
+
V.width = C.clientWidth, V.height = C.clientHeight, V.pr = parseInt(k.getPropertyValue("padding-right"), 10), V.pb = parseInt(k.getPropertyValue("padding-bottom"), 10), V.position = k.getPropertyValue("position"), q === "static" && (C.style.position = "relative"), V.translateX = L.x, V.translateY = L.y, m.value = V;
|
|
1768
|
+
}
|
|
1769
|
+
function F(C) {
|
|
1770
|
+
if (n.value) {
|
|
1771
|
+
i.value = K.getCurrent(n.value), s.value = A.getCurrent(n.value), u.value = i.value ? K.copy(i.value) : null, c.value = s.value ? A.copy(s.value) : null, E();
|
|
1772
|
+
const k = C.target.getAttribute("type") || "";
|
|
1773
|
+
l.value = {
|
|
1774
|
+
n: !!k.match(/n/),
|
|
1775
|
+
s: !!k.match(/s/),
|
|
1776
|
+
w: !!k.match(/w/),
|
|
1777
|
+
e: !!k.match(/e/)
|
|
1778
|
+
};
|
|
1779
|
+
}
|
|
1780
|
+
}
|
|
1781
|
+
function R() {
|
|
1782
|
+
var C, k, L, V;
|
|
1783
|
+
if (n.value) {
|
|
1784
|
+
const q = n.value;
|
|
1785
|
+
l.value && ((l.value.n || l.value.s) && ((C = u.value) != null && C.height) && (q.style.height = u.value.height + "px"), (l.value.w || l.value.e) && ((k = u.value) != null && k.width) && (q.style.width = u.value.width + "px"), c.value && ((L = c.value) != null && L.x && (q.style.left = c.value.x + "px"), (V = c.value) != null && V.y && (q.style.top = c.value.y + "px")));
|
|
1786
|
+
}
|
|
1787
|
+
}
|
|
1788
|
+
function P() {
|
|
1789
|
+
const C = e.minHeight ? e.minHeight : 1, k = e.minWidth ? e.minWidth : 1;
|
|
1790
|
+
u.value && c.value && l.value && i.value && (u.value.height < C && (u.value.height = C, l.value.n && s.value && (c.value.y = s.value.y + (i.value.height - C))), u.value.width < k && (u.value.width = k, l.value.w && s.value && (c.value.x = s.value.x + (i.value.width - k))), e.maxHeight && u.value.height > e.maxHeight && (u.value.height = e.maxHeight, s.value && l.value.n && (c.value.y = s.value.y + (i.value.height - e.maxHeight))), e.maxWidth && u.value.width > e.maxWidth && (u.value.width = e.maxWidth, l.value.w && s.value && (c.value.x = s.value.x + (i.value.width - e.maxWidth))));
|
|
1791
|
+
}
|
|
1792
|
+
function N() {
|
|
1793
|
+
if (o.value) {
|
|
1794
|
+
const C = m.value;
|
|
1795
|
+
if (c.value && u.value && l.value && i.value) {
|
|
1796
|
+
const k = C.width - C.pr - C.deltaL - C.translateX - c.value.x, L = C.height - C.pb - C.deltaT - C.translateY - c.value.y;
|
|
1797
|
+
l.value.n && c.value.y + C.translateY < 0 && s.value && (c.value.y = -C.translateY, u.value.height = i.value.height + s.value.y + C.translateY), l.value.w && c.value.x + C.translateX < 0 && s.value && (c.value.x = -C.translateX, u.value.width = i.value.width + s.value.x + C.translateX), u.value.width > k && (u.value.width = k), u.value.height > L && (u.value.height = L);
|
|
1798
|
+
}
|
|
1799
|
+
}
|
|
1800
|
+
}
|
|
1801
|
+
function H(C) {
|
|
1802
|
+
if (!a.value || !i.value || !s.value || !l.value)
|
|
1803
|
+
return;
|
|
1804
|
+
C.subtract(a.value);
|
|
1805
|
+
const k = C.x, L = C.y;
|
|
1806
|
+
l.value.n ? (c.value.y = s.value.y + L, u.value.height = i.value.height - L) : l.value.s && (u.value.height = i.value.height + L), l.value.e ? u.value.width = i.value.width + k : l.value.w && (u.value.width = i.value.width - k, c.value.x = s.value.x + k), N(), P(), R();
|
|
1807
|
+
}
|
|
1808
|
+
function z(C) {
|
|
1809
|
+
if (!f.value)
|
|
1810
|
+
return;
|
|
1811
|
+
const k = A.fromEvent(C);
|
|
1812
|
+
k && H(k);
|
|
1813
|
+
}
|
|
1814
|
+
function d() {
|
|
1815
|
+
if (n.value) {
|
|
1816
|
+
const {
|
|
1817
|
+
width: C,
|
|
1818
|
+
height: k,
|
|
1819
|
+
x: L,
|
|
1820
|
+
y: V
|
|
1821
|
+
} = n.value.getBoundingClientRect(), q = A.getTransformInfo(n.value);
|
|
1822
|
+
return {
|
|
1823
|
+
size: {
|
|
1824
|
+
width: C,
|
|
1825
|
+
height: k
|
|
1826
|
+
},
|
|
1827
|
+
position: {
|
|
1828
|
+
x: L - q.x,
|
|
1829
|
+
y: V - q.y
|
|
1830
|
+
}
|
|
1831
|
+
};
|
|
1832
|
+
}
|
|
1833
|
+
return null;
|
|
1834
|
+
}
|
|
1835
|
+
function T(C) {
|
|
1836
|
+
if (n.value) {
|
|
1837
|
+
const k = d();
|
|
1838
|
+
v.value = k;
|
|
1839
|
+
}
|
|
1840
|
+
a.value = void 0, i.value = null, s.value = null, u.value = null, c.value = null, l.value = null, f.value = null, document.removeEventListener("mousemove", z), document.removeEventListener("mouseup", T);
|
|
1841
|
+
}
|
|
1842
|
+
function j() {
|
|
1843
|
+
document.addEventListener("mousemove", z), document.addEventListener("mouseup", T);
|
|
1844
|
+
}
|
|
1845
|
+
function O(C) {
|
|
1846
|
+
C instanceof MouseEvent && C.button === 2 || S.value && (C.stopPropagation(), C.preventDefault(), a.value = A.fromEvent(C), f.value = C.target, F(C), j());
|
|
1847
|
+
}
|
|
1848
|
+
function D(C) {
|
|
1849
|
+
return n.value = C, p(te, null, [p("div", {
|
|
1850
|
+
class: "fv-resizable-handle fv-resizable-n",
|
|
1851
|
+
type: "n",
|
|
1852
|
+
onMousedown: (k) => O(k)
|
|
1853
|
+
}, null), p("div", {
|
|
1854
|
+
class: "fv-resizable-handle fv-resizable-e",
|
|
1855
|
+
type: "e",
|
|
1856
|
+
onMousedown: (k) => O(k)
|
|
1857
|
+
}, null), p("div", {
|
|
1858
|
+
class: "fv-resizable-handle fv-resizable-s",
|
|
1859
|
+
type: "s",
|
|
1860
|
+
onMousedown: (k) => O(k)
|
|
1861
|
+
}, null), p("div", {
|
|
1862
|
+
class: "fv-resizable-handle fv-resizable-w",
|
|
1863
|
+
type: "w",
|
|
1864
|
+
onMousedown: (k) => O(k)
|
|
1865
|
+
}, null), p("div", {
|
|
1866
|
+
class: "fv-resizable-handle fv-resizable-ne",
|
|
1867
|
+
type: "ne",
|
|
1868
|
+
onMousedown: (k) => O(k)
|
|
1869
|
+
}, null), p("div", {
|
|
1870
|
+
class: "fv-resizable-handle fv-resizable-se fv-resizable-diagonal",
|
|
1871
|
+
type: "se",
|
|
1872
|
+
onMousedown: (k) => O(k)
|
|
1873
|
+
}, null), p("div", {
|
|
1874
|
+
class: "fv-resizable-handle fv-resizable-sw",
|
|
1875
|
+
type: "sw",
|
|
1876
|
+
onMousedown: (k) => O(k)
|
|
1877
|
+
}, null), p("div", {
|
|
1878
|
+
class: "fv-resizable-handle fv-resizable-nw",
|
|
1879
|
+
type: "nw",
|
|
1880
|
+
onMousedown: (k) => O(k)
|
|
1881
|
+
}, null)]);
|
|
1882
|
+
}
|
|
1883
|
+
function W(C = !0) {
|
|
1884
|
+
const k = o.value || document.body, L = K.getCurrent(k), V = n.value;
|
|
1885
|
+
C && (x.value = d(), x.value.transform = V.style.transform), L && V && (u.value = L, V.style.height = u.value.height - 14 + "px", V.style.width = u.value.width - 14 + "px", V.style.left = "7px", V.style.top = "7px", V.style.transform = "", v.value = {
|
|
1886
|
+
size: u.value,
|
|
1887
|
+
position: {
|
|
1888
|
+
x: 0,
|
|
1889
|
+
y: 0
|
|
1890
|
+
}
|
|
1891
|
+
}, S.value = !1, I.value = !0);
|
|
1892
|
+
}
|
|
1893
|
+
function Z() {
|
|
1894
|
+
var C, k;
|
|
1895
|
+
if (x.value) {
|
|
1896
|
+
const L = {
|
|
1897
|
+
width: x.value.size.width || 0,
|
|
1898
|
+
height: x.value.size.height || 0
|
|
1899
|
+
}, V = {
|
|
1900
|
+
x: (window.innerWidth - L.width) / 2,
|
|
1901
|
+
y: (window.innerHeight - L.height) / 2
|
|
1902
|
+
};
|
|
1903
|
+
(C = u.value) == null || C.set(L), (k = c.value) == null || k.set(V);
|
|
1904
|
+
const q = n.value;
|
|
1905
|
+
q.style.height = L.height + "px", q.style.width = L.width + "px", q.style.left = `${V.x}px`, q.style.top = `${V.y}px`, q.style.transform = "", v.value = {
|
|
1906
|
+
size: L,
|
|
1907
|
+
position: V
|
|
1908
|
+
}, S.value = e.draggable, I.value = !1;
|
|
1909
|
+
}
|
|
1910
|
+
}
|
|
1911
|
+
function _() {
|
|
1912
|
+
if (n.value) {
|
|
1913
|
+
const C = K.getCurrent(n.value);
|
|
1914
|
+
if (C) {
|
|
1915
|
+
const {
|
|
1916
|
+
width: k,
|
|
1917
|
+
height: L
|
|
1918
|
+
} = C;
|
|
1919
|
+
n.value.style.left = `${(window.innerWidth - k) / 2}px`, n.value.style.top = `${(window.innerHeight - L) / 2}px`, n.value.style.transform = "";
|
|
1920
|
+
}
|
|
1921
|
+
}
|
|
1922
|
+
}
|
|
1923
|
+
function ce() {
|
|
1924
|
+
const C = () => {
|
|
1925
|
+
I.value ? W(!1) : _();
|
|
1926
|
+
};
|
|
1927
|
+
return window.addEventListener("resize", C), () => {
|
|
1928
|
+
window.removeEventListener("resize", C);
|
|
1929
|
+
};
|
|
1930
|
+
}
|
|
1931
|
+
const re = ce();
|
|
1932
|
+
return {
|
|
1933
|
+
renderResizeBar: D,
|
|
1934
|
+
boundingElement: o,
|
|
1935
|
+
resizedEventParam: v,
|
|
1936
|
+
maximize: W,
|
|
1937
|
+
restore: Z,
|
|
1938
|
+
allowDrag: S,
|
|
1939
|
+
isMaximized: I,
|
|
1940
|
+
unWindowResizeHandle: re
|
|
1941
|
+
};
|
|
1942
|
+
}
|
|
1943
|
+
function ta(e, t, n) {
|
|
1944
|
+
const o = r(), a = r(e.draggable), i = r(e.lockAxis), s = r(), u = r(), c = r(!1), l = r(new A(0, 0)), f = r(new A(0, 0)), m = r(new A(0, 0)), v = r(new A(0, 0));
|
|
1945
|
+
U(() => n.value, (d) => {
|
|
1946
|
+
s.value.style.cursor = d ? "move" : "default";
|
|
1947
|
+
});
|
|
1948
|
+
function x(d, T) {
|
|
1949
|
+
if (T.tagName === "BUTTON")
|
|
1950
|
+
return !1;
|
|
1951
|
+
if (T === d)
|
|
1952
|
+
return !0;
|
|
1953
|
+
for (const j in T.children)
|
|
1954
|
+
if (Object.prototype.hasOwnProperty.call(T.children, j) && x(d, T.children[j]))
|
|
1955
|
+
return !0;
|
|
1956
|
+
return !1;
|
|
1957
|
+
}
|
|
1958
|
+
function S() {
|
|
1959
|
+
var O, D;
|
|
1960
|
+
let d = m.value.x + f.value.x, T = m.value.y + f.value.y;
|
|
1961
|
+
i.value === "x" ? (d = ((O = l.value) == null ? void 0 : O.x) || 0, m.value.x = 0) : i.value === "y" && (T = ((D = l.value) == null ? void 0 : D.y) || 0, m.value.y = 0);
|
|
1962
|
+
const j = `translate3d(${Math.round(d)}px, ${Math.round(T)}px, 0px)`;
|
|
1963
|
+
o.value && (o.value.style.transform = j), v.value.x = d, v.value.y = T;
|
|
1964
|
+
}
|
|
1965
|
+
function I() {
|
|
1966
|
+
if (!u.value || !o.value)
|
|
1967
|
+
return null;
|
|
1968
|
+
const d = u.value.getBoundingClientRect(), T = o.value.getBoundingClientRect(), j = {
|
|
1969
|
+
top: d.top < T.top,
|
|
1970
|
+
right: d.right > T.right,
|
|
1971
|
+
bottom: d.bottom > T.bottom,
|
|
1972
|
+
left: d.left < T.left
|
|
1973
|
+
};
|
|
1974
|
+
return j.top || (m.value.y -= T.top - d.top), j.bottom || (m.value.y -= T.bottom - d.bottom), j.right || (m.value.x -= T.right - d.right), j.left || (m.value.x -= T.left - d.left), S(), j;
|
|
1975
|
+
}
|
|
1976
|
+
function E(d) {
|
|
1977
|
+
d && (l.value && d.subtract(l.value), m.value.set(d), S(), I());
|
|
1978
|
+
}
|
|
1979
|
+
function F(d) {
|
|
1980
|
+
c.value && a.value && (d.stopPropagation(), d.preventDefault(), E(A.fromEvent(d, s.value)));
|
|
1981
|
+
}
|
|
1982
|
+
function R() {
|
|
1983
|
+
var d;
|
|
1984
|
+
c.value && (c.value = !1, f.value.add(m.value), m.value.reset(), (d = o.value) == null || d.classList.remove("ng-dragging"), document.removeEventListener("mousemove", F), document.removeEventListener("mouseup", R));
|
|
1985
|
+
}
|
|
1986
|
+
function P() {
|
|
1987
|
+
!c.value && s.value && (c.value = !0, s.value.classList.add("ng-dragging"), document.addEventListener("mousemove", F), document.addEventListener("mouseup", R));
|
|
1988
|
+
}
|
|
1989
|
+
function N() {
|
|
1990
|
+
if (o.value) {
|
|
1991
|
+
const d = A.getTransformInfo(o.value);
|
|
1992
|
+
f.value.set(d);
|
|
1993
|
+
return;
|
|
1994
|
+
}
|
|
1995
|
+
f.value.reset();
|
|
1996
|
+
}
|
|
1997
|
+
function H(d) {
|
|
1998
|
+
if (!n.value || d instanceof MouseEvent && d.button === 2)
|
|
1999
|
+
return;
|
|
2000
|
+
const T = d.target || d.srcElement;
|
|
2001
|
+
s.value !== void 0 && T && !x(T, s.value) || a.value !== !1 && (document.body.click(), d.stopPropagation(), d.preventDefault(), l.value = A.fromEvent(d, o.value), N(), P());
|
|
2002
|
+
}
|
|
2003
|
+
function z(d, T, j) {
|
|
2004
|
+
if (a.value && T) {
|
|
2005
|
+
if (d)
|
|
2006
|
+
s.value = d;
|
|
2007
|
+
else if (e.dragHandle) {
|
|
2008
|
+
if (e.dragHandle instanceof HTMLElement)
|
|
2009
|
+
s.value = e.dragHandle;
|
|
2010
|
+
else if (typeof e.dragHandle == "string") {
|
|
2011
|
+
const O = T.querySelector(e.dragHandle);
|
|
2012
|
+
O && (s.value = O);
|
|
2013
|
+
}
|
|
2014
|
+
}
|
|
2015
|
+
o.value = T, u.value = j, s.value.classList.add("ng-draggable"), s.value.addEventListener("mousedown", H);
|
|
2016
|
+
}
|
|
2017
|
+
}
|
|
2018
|
+
return {
|
|
2019
|
+
registerDraggle: z,
|
|
2020
|
+
resetTranslate: N
|
|
2021
|
+
};
|
|
2022
|
+
}
|
|
2023
|
+
function Le(e, t) {
|
|
2024
|
+
if (e) {
|
|
2025
|
+
const n = (o) => {
|
|
2026
|
+
o.key.toLowerCase() === e.toLowerCase() && t({ event: o, key: e });
|
|
2027
|
+
};
|
|
2028
|
+
return document.addEventListener("keydown", n), () => {
|
|
2029
|
+
document.removeEventListener("keydown", n);
|
|
2030
|
+
};
|
|
2031
|
+
}
|
|
2032
|
+
}
|
|
2033
|
+
function na(e, t) {
|
|
2034
|
+
const n = r(e.enableEsc);
|
|
2035
|
+
let o = null;
|
|
2036
|
+
return n.value ? (o = Le("Escape", (a) => {
|
|
2037
|
+
t.emit("esc", { event: a.event, type: "esc" });
|
|
2038
|
+
}), {
|
|
2039
|
+
remove: o
|
|
2040
|
+
}) : null;
|
|
2041
|
+
}
|
|
2042
|
+
function oa(e, t) {
|
|
2043
|
+
const n = r(e.enableEnter);
|
|
2044
|
+
let o = null;
|
|
2045
|
+
return n.value ? (o = Le("Enter", (a) => {
|
|
2046
|
+
t.emit("enter", { event: a.event, type: "enter" });
|
|
2047
|
+
}), {
|
|
2048
|
+
remove: o
|
|
2049
|
+
}) : null;
|
|
2050
|
+
}
|
|
2051
|
+
const De = /* @__PURE__ */ ne({
|
|
2052
|
+
name: "FModal",
|
|
2053
|
+
props: Ko,
|
|
2054
|
+
emits: ["update:modelValue", "accept", "cancel", "closed", "resize", "esc", "enter"],
|
|
2055
|
+
setup(e, t) {
|
|
2056
|
+
const n = r(e.width || 300), o = r(e.height || 200), a = r(e.modelValue), i = r(""), s = r(e.class), u = r(e.fitContent), c = r(e.showHeader), l = r(""), f = r(e.showCloseButton), m = r(e.showMaxButton), v = r(!1), x = r(""), S = r(""), I = r(""), E = r(e.showButtons), F = r(e.title), R = r(e.reiszeable), P = r(e.containment || null), N = r();
|
|
2057
|
+
function H(g, $) {
|
|
2058
|
+
a.value = !1, t.emit("update:modelValue", !1), $ != null && t.emit($ ? "accept" : "cancel"), t.emit("closed", g);
|
|
2059
|
+
}
|
|
2060
|
+
const z = [{
|
|
2061
|
+
name: "cancel",
|
|
2062
|
+
text: "取消",
|
|
2063
|
+
class: "btn btn-secondary",
|
|
2064
|
+
handle: (g) => {
|
|
2065
|
+
H(g, !1);
|
|
2066
|
+
}
|
|
2067
|
+
}, {
|
|
2068
|
+
name: "accept",
|
|
2069
|
+
text: "确定",
|
|
2070
|
+
class: "btn btn-primary",
|
|
2071
|
+
handle: (g) => {
|
|
2072
|
+
H(g, !0);
|
|
2073
|
+
}
|
|
2074
|
+
}], d = r(e.buttons && e.buttons.length ? e.buttons : z), T = B(() => !!l.value), j = B(() => !!E.value && !!d.value), O = r(), D = r(), W = r(!1), {
|
|
2075
|
+
renderResizeBar: Z,
|
|
2076
|
+
maximize: _,
|
|
2077
|
+
restore: ce,
|
|
2078
|
+
boundingElement: re,
|
|
2079
|
+
resizedEventParam: C,
|
|
2080
|
+
allowDrag: k,
|
|
2081
|
+
unWindowResizeHandle: L
|
|
2082
|
+
} = ea(e), {
|
|
2083
|
+
registerDraggle: V
|
|
2084
|
+
} = ta(e, t, k);
|
|
2085
|
+
U(() => e.title, (g, $) => {
|
|
2086
|
+
g !== $ && (F.value = g);
|
|
2087
|
+
}), U(() => e.modelValue, (g, $) => {
|
|
2088
|
+
g !== $ && (a.value = g);
|
|
2089
|
+
}), U(() => e.showHeader, (g, $) => {
|
|
2090
|
+
g !== $ && (c.value = g);
|
|
2091
|
+
}), U(() => e.showButtons, (g, $) => {
|
|
2092
|
+
g !== $ && (E.value = g);
|
|
2093
|
+
}), U(() => C.value, (g, $) => {
|
|
2094
|
+
const ae = g || {}, se = $ || {};
|
|
2095
|
+
JSON.stringify(ae) !== JSON.stringify(se) && t.emit("resize", {
|
|
2096
|
+
newSize: g,
|
|
2097
|
+
oldSize: $
|
|
2098
|
+
});
|
|
2099
|
+
});
|
|
2100
|
+
function q() {
|
|
2101
|
+
const g = document.querySelectorAll(".farris-modal").length;
|
|
2102
|
+
(!g || g - 1 <= 0) && document.body.classList.remove("modal-open"), N.value && N.value.classList.remove("show");
|
|
2103
|
+
}
|
|
2104
|
+
const de = B(() => (a.value ? document.body.classList.add("modal-open") : q(), a.value)), He = B(() => {
|
|
2105
|
+
const g = {
|
|
2106
|
+
modal: !0,
|
|
2107
|
+
"farris-modal": !0,
|
|
2108
|
+
fade: !0
|
|
2109
|
+
};
|
|
2110
|
+
return g["f-modal-fitContent"] = !!u.value, g.show = !!de.value, g;
|
|
2111
|
+
}), Ae = B(() => {
|
|
2112
|
+
var ae;
|
|
2113
|
+
const g = {
|
|
2114
|
+
"modal-dialog": !0
|
|
2115
|
+
}, $ = (ae = s.value) == null ? void 0 : ae.split(" ");
|
|
2116
|
+
return $ == null || $.reduce((se, nt) => (se[nt] = !0, se), g), g;
|
|
2117
|
+
}), qe = B(() => ({
|
|
2118
|
+
position: "absolute",
|
|
2119
|
+
top: `${(window.innerHeight - o.value) / 2}px`,
|
|
2120
|
+
left: `${(window.innerWidth - n.value) / 2}px`,
|
|
2121
|
+
width: `${n.value}px`,
|
|
2122
|
+
height: u.value ? "auto" : `${o.value}px`
|
|
2123
|
+
})), Ue = B(() => ({
|
|
2124
|
+
"modal-content": !0,
|
|
2125
|
+
"modal-content-has-header": c.value
|
|
2126
|
+
})), Ge = B(() => {
|
|
2127
|
+
const g = {
|
|
2128
|
+
display: c.value ? "" : "none"
|
|
2129
|
+
};
|
|
2130
|
+
return g["pointer-events"] = k.value ? "auto" : "none", g;
|
|
2131
|
+
}), We = B(() => ({
|
|
2132
|
+
"f-icon": !0,
|
|
2133
|
+
modal_maximize: !0,
|
|
2134
|
+
modalrevert: W.value
|
|
2135
|
+
})), Xe = B(() => ({
|
|
2136
|
+
"modal-body": !0,
|
|
2137
|
+
"f-utils-flex-column": x.value === "iframe"
|
|
2138
|
+
}));
|
|
2139
|
+
function Ye() {
|
|
2140
|
+
return {};
|
|
2141
|
+
}
|
|
2142
|
+
const Je = B(() => {
|
|
2143
|
+
const g = {
|
|
2144
|
+
textAlgin: I.value
|
|
2145
|
+
}, $ = Ye();
|
|
2146
|
+
return Object.assign(g, $);
|
|
2147
|
+
});
|
|
2148
|
+
function Ce(g) {
|
|
2149
|
+
if (g.stopPropagation(), W.value) {
|
|
2150
|
+
W.value = !1, ce();
|
|
2151
|
+
return;
|
|
2152
|
+
}
|
|
2153
|
+
_(), W.value = !0;
|
|
2154
|
+
}
|
|
2155
|
+
async function Qe(g, $) {
|
|
2156
|
+
g.handle && await g.handle($, g) && t.emit("closed", $);
|
|
2157
|
+
}
|
|
2158
|
+
function Ze(g) {
|
|
2159
|
+
g.width && (n.value = g.width), g.height && (o.value = g.height), g.buttons && (d.value = g.buttons), g.title && (F.value = g.title);
|
|
2160
|
+
}
|
|
2161
|
+
let pe = null, me = null;
|
|
2162
|
+
oe(() => {
|
|
2163
|
+
D.value && !P.value && (P.value = D.value.parentElement, re.value = P.value, V(O.value, D.value, re.value)), de.value && document.body.classList.add("modal-open"), pe = na(e, t), me = oa(e, t);
|
|
2164
|
+
}), Se(() => {
|
|
2165
|
+
q(), L && L(), pe && pe.remove(), me && me.remove();
|
|
2166
|
+
}), t.expose({
|
|
2167
|
+
modalElementRef: D,
|
|
2168
|
+
updateModalOptions: Ze,
|
|
2169
|
+
close: H,
|
|
2170
|
+
maxDialog: Ce
|
|
2171
|
+
});
|
|
2172
|
+
function _e() {
|
|
2173
|
+
return p("ul", null, [v.value && p("li", {
|
|
2174
|
+
class: "f-btn-icon f-bare"
|
|
2175
|
+
}, [p("span", {
|
|
2176
|
+
class: "f-icon modal_minimize"
|
|
2177
|
+
}, null)]), m.value && p("li", {
|
|
2178
|
+
onClick: Ce,
|
|
2179
|
+
class: "f-btn-icon f-bare",
|
|
2180
|
+
style: "pointer-events: auto;"
|
|
2181
|
+
}, [p("span", {
|
|
2182
|
+
class: We.value
|
|
2183
|
+
}, null)]), f.value && p("li", {
|
|
2184
|
+
class: "f-btn-icon f-bare",
|
|
2185
|
+
onClick: (g) => H(g, !1),
|
|
2186
|
+
style: "pointer-events: auto;"
|
|
2187
|
+
}, [p("span", {
|
|
2188
|
+
class: "f-icon modal_close"
|
|
2189
|
+
}, null)])]);
|
|
2190
|
+
}
|
|
2191
|
+
function Ke() {
|
|
2192
|
+
return p("div", {
|
|
2193
|
+
class: "modal-footer",
|
|
2194
|
+
style: Je.value
|
|
2195
|
+
}, [d.value && d.value.map((g) => p("button", {
|
|
2196
|
+
name: g.name,
|
|
2197
|
+
type: "button",
|
|
2198
|
+
class: g.class + (g.iconClass ? " btn-icontext" : ""),
|
|
2199
|
+
onClick: ($) => {
|
|
2200
|
+
Qe(g, $);
|
|
2201
|
+
}
|
|
2202
|
+
}, [!!g.iconClass && p("i", {
|
|
2203
|
+
class: g.iconClass
|
|
2204
|
+
}, null), g.text]))]);
|
|
2205
|
+
}
|
|
2206
|
+
function et() {
|
|
2207
|
+
return p("div", {
|
|
2208
|
+
ref: O,
|
|
2209
|
+
class: "modal-header",
|
|
2210
|
+
style: Ge.value
|
|
2211
|
+
}, [p("div", {
|
|
2212
|
+
class: "modal-title"
|
|
2213
|
+
}, [T.value && p("span", {
|
|
2214
|
+
class: l.value,
|
|
2215
|
+
style: "margin-right: 8px"
|
|
2216
|
+
}, null), p("span", {
|
|
2217
|
+
class: "modal-title-label"
|
|
2218
|
+
}, [F.value])]), p("div", {
|
|
2219
|
+
class: "actions"
|
|
2220
|
+
}, [_e()])]);
|
|
2221
|
+
}
|
|
2222
|
+
function tt(g) {
|
|
2223
|
+
g.stopPropagation();
|
|
2224
|
+
}
|
|
2225
|
+
return () => p(st, {
|
|
2226
|
+
to: "body"
|
|
2227
|
+
}, {
|
|
2228
|
+
default: () => [de.value && p(it, {
|
|
2229
|
+
name: "fade",
|
|
2230
|
+
appear: !0
|
|
2231
|
+
}, {
|
|
2232
|
+
default: () => {
|
|
2233
|
+
var g, $;
|
|
2234
|
+
return [p("div", {
|
|
2235
|
+
class: He.value,
|
|
2236
|
+
style: "display: block",
|
|
2237
|
+
ref: N,
|
|
2238
|
+
onClick: tt
|
|
2239
|
+
}, [p("div", {
|
|
2240
|
+
id: i.value,
|
|
2241
|
+
class: Ae.value,
|
|
2242
|
+
style: qe.value,
|
|
2243
|
+
ref: D
|
|
2244
|
+
}, [p("div", {
|
|
2245
|
+
class: Ue.value
|
|
2246
|
+
}, [c.value && et(), p("div", {
|
|
2247
|
+
class: Xe.value
|
|
2248
|
+
}, [($ = (g = t.slots).default) == null ? void 0 : $.call(g), x.value === "iframe" && p("iframe", {
|
|
2249
|
+
title: i.value,
|
|
2250
|
+
class: "f-utils-fill",
|
|
2251
|
+
width: "100%",
|
|
2252
|
+
frameborder: "0",
|
|
2253
|
+
src: S.value
|
|
2254
|
+
}, null)]), j.value && Ke()]), !u.value && R.value && D.value && Z(D.value)])])];
|
|
2255
|
+
}
|
|
2256
|
+
})]
|
|
2257
|
+
});
|
|
2258
|
+
}
|
|
2259
|
+
});
|
|
2260
|
+
function $e(e) {
|
|
2261
|
+
if (e.content && e.content.render)
|
|
2262
|
+
return e.content.render;
|
|
2263
|
+
if (e.render && typeof e.render == "function")
|
|
2264
|
+
return e.render;
|
|
2265
|
+
}
|
|
2266
|
+
function aa(e) {
|
|
2267
|
+
const t = document.createElement("div");
|
|
2268
|
+
t.style.display = "contents";
|
|
2269
|
+
const n = ct({
|
|
2270
|
+
setup(o, a) {
|
|
2271
|
+
Se(() => {
|
|
2272
|
+
document.body.removeChild(t);
|
|
2273
|
+
});
|
|
2274
|
+
const i = r(), s = r(e.class || ""), u = r(!!e.showButtons), c = r(!!e.showHeader), l = r(e.showCloseButton == null ? !0 : e.showCloseButton), f = r(!0), m = r(e.title || ""), v = e.acceptCallback || (() => {
|
|
2275
|
+
}), x = e.rejectCallback || (() => {
|
|
2276
|
+
}), S = e.closedCallback || ((R) => {
|
|
2277
|
+
}), I = e.resizeHandle || ((R) => {
|
|
2278
|
+
}), E = $e(e), F = (R) => {
|
|
2279
|
+
f.value = !1, n.unmount(), S(R);
|
|
2280
|
+
};
|
|
2281
|
+
return oe(() => {
|
|
2282
|
+
}), a.expose({
|
|
2283
|
+
modalRef: i
|
|
2284
|
+
}), () => p(De, {
|
|
2285
|
+
ref: i,
|
|
2286
|
+
class: s.value,
|
|
2287
|
+
modelValue: f.value,
|
|
2288
|
+
"onUpdate:modelValue": (R) => f.value = R,
|
|
2289
|
+
title: m.value,
|
|
2290
|
+
width: e.width,
|
|
2291
|
+
height: e.height,
|
|
2292
|
+
buttons: e.buttons,
|
|
2293
|
+
"show-header": c.value,
|
|
2294
|
+
"show-buttons": u.value,
|
|
2295
|
+
"show-close-button": l.value,
|
|
2296
|
+
"show-max-button": !1,
|
|
2297
|
+
onAccept: v,
|
|
2298
|
+
onCancel: x,
|
|
2299
|
+
fitContent: e.fitContent == null ? !0 : e.fitContent,
|
|
2300
|
+
onClosed: F,
|
|
2301
|
+
onResize: I
|
|
2302
|
+
}, {
|
|
2303
|
+
default: () => [E && E(n)]
|
|
2304
|
+
});
|
|
2305
|
+
}
|
|
2306
|
+
});
|
|
2307
|
+
return document.body.appendChild(t), n.mount(t), n;
|
|
2308
|
+
}
|
|
2309
|
+
class la {
|
|
2310
|
+
constructor(t) {
|
|
2311
|
+
X(this, "appContext", null);
|
|
2312
|
+
X(this, "modalRef", r());
|
|
2313
|
+
X(this, "activeModalIndex", r(0));
|
|
2314
|
+
X(this, "modalRefs", {});
|
|
2315
|
+
X(this, "isUseEscCloseModal", r(!1));
|
|
2316
|
+
X(this, "activeModalInstance", B(() => this.modalRefs[this.activeModalIndex.value]));
|
|
2317
|
+
this.app = t, this.appContext = t ? t._context : null;
|
|
2318
|
+
}
|
|
2319
|
+
getCurrentModal() {
|
|
2320
|
+
return this.activeModalInstance.value;
|
|
2321
|
+
}
|
|
2322
|
+
static show(t) {
|
|
2323
|
+
const n = Object.assign({
|
|
2324
|
+
title: "",
|
|
2325
|
+
showButtons: !0,
|
|
2326
|
+
showHeader: !0
|
|
2327
|
+
}, t);
|
|
2328
|
+
return aa(n);
|
|
2329
|
+
}
|
|
2330
|
+
open(t) {
|
|
2331
|
+
const n = document.createDocumentFragment();
|
|
2332
|
+
t.showMaxButton && t.fitContent && (t.showMaxButton = !1);
|
|
2333
|
+
const o = ut(Object.assign({
|
|
2334
|
+
title: "",
|
|
2335
|
+
showButtons: !0,
|
|
2336
|
+
showHeader: !0
|
|
2337
|
+
}, t)), a = r(!0), i = o.value.acceptCallback || (() => {
|
|
2338
|
+
}), s = o.value.rejectCallback || (() => {
|
|
2339
|
+
}), u = o.value.closedCallback || ((F, R) => {
|
|
2340
|
+
}), c = o.value.resizeHandle || ((F) => {
|
|
2341
|
+
});
|
|
2342
|
+
let l;
|
|
2343
|
+
const f = $e(o.value), m = (F) => {
|
|
2344
|
+
var P;
|
|
2345
|
+
a.value = !1;
|
|
2346
|
+
const R = (P = F == null ? void 0 : F.target) == null ? void 0 : P.classList.contains("modal_close");
|
|
2347
|
+
u(F, this.isUseEscCloseModal.value ? "esc" : R ? "icon" : "button");
|
|
2348
|
+
}, v = (F) => {
|
|
2349
|
+
m(F), l && ve(() => {
|
|
2350
|
+
if (this.modalRefs[this.activeModalIndex.value] && delete this.modalRefs[this.activeModalIndex.value], fe(null, n), l = null, this.modalRef.value = null, this.modalRefs) {
|
|
2351
|
+
const R = Object.keys(this.modalRefs).map((P) => Number(P));
|
|
2352
|
+
R.length > 0 ? this.activeModalIndex.value = Math.max(...R) : this.activeModalIndex.value = 0;
|
|
2353
|
+
}
|
|
2354
|
+
this.isUseEscCloseModal.value = !1;
|
|
2355
|
+
});
|
|
2356
|
+
}, x = (F) => {
|
|
2357
|
+
var R;
|
|
2358
|
+
this.isUseEscCloseModal.value = !0, this.activeModalInstance && ((R = this.activeModalInstance.value) == null || R.close(F == null ? void 0 : F.event));
|
|
2359
|
+
}, S = () => p(De, he({
|
|
2360
|
+
ref: this.modalRef,
|
|
2361
|
+
modelValue: a.value,
|
|
2362
|
+
"onUpdate:modelValue": (F) => a.value = F
|
|
2363
|
+
}, o.value, {
|
|
2364
|
+
onAccept: i,
|
|
2365
|
+
onCancel: s,
|
|
2366
|
+
onClosed: v,
|
|
2367
|
+
onResize: c,
|
|
2368
|
+
onEsc: x
|
|
2369
|
+
}), {
|
|
2370
|
+
default: () => [f && f(this.app)]
|
|
2371
|
+
});
|
|
2372
|
+
return l = ((F) => {
|
|
2373
|
+
const R = dt(S, F);
|
|
2374
|
+
return R.appContext = this.appContext, fe(R, n), R;
|
|
2375
|
+
})({
|
|
2376
|
+
...o.value
|
|
2377
|
+
// 'onUpdate:modelValue': onUpdateModelValue,
|
|
2378
|
+
}), this.activeModalIndex.value++, this.modalRefs[this.activeModalIndex.value] = this.modalRef.value, {
|
|
2379
|
+
update: (F) => {
|
|
2380
|
+
o.value = {
|
|
2381
|
+
...o.value,
|
|
2382
|
+
...F
|
|
2383
|
+
}, l && fe(pt(l, {
|
|
2384
|
+
...o
|
|
2385
|
+
}), n);
|
|
2386
|
+
},
|
|
2387
|
+
destroy: v,
|
|
2388
|
+
modalRef: this.activeModalInstance
|
|
2389
|
+
};
|
|
2390
|
+
}
|
|
2391
|
+
}
|
|
2392
|
+
class Q {
|
|
2393
|
+
static show(t) {
|
|
2394
|
+
const n = Y({
|
|
2395
|
+
...t
|
|
2396
|
+
}), o = !1, a = n.type === "error" || n.type === "prompt", i = n.type === "error" ? "错误提示" : n.type === "prompt" && n.title || "", s = n.acceptCallback || (() => {
|
|
2397
|
+
}), u = n.rejectCallback || (() => {
|
|
2398
|
+
});
|
|
2399
|
+
let c = null, l = new la(c);
|
|
2400
|
+
const f = () => {
|
|
2401
|
+
c && (c == null || c.destroy(), l = null);
|
|
2402
|
+
};
|
|
2403
|
+
c = l == null ? void 0 : l.open({
|
|
2404
|
+
class: "modal-message modal-message-type-info",
|
|
2405
|
+
title: i,
|
|
2406
|
+
showButtons: o,
|
|
2407
|
+
showHeader: a,
|
|
2408
|
+
width: n.width || 400,
|
|
2409
|
+
fitContent: !0,
|
|
2410
|
+
showMaxButton: !1,
|
|
2411
|
+
render: () => p(ie, he(n, {
|
|
2412
|
+
onAccept: s,
|
|
2413
|
+
onReject: u,
|
|
2414
|
+
onClose: f
|
|
2415
|
+
}), null)
|
|
2416
|
+
});
|
|
2417
|
+
}
|
|
2418
|
+
static info(t, n) {
|
|
2419
|
+
const o = Y({
|
|
2420
|
+
type: "info",
|
|
2421
|
+
title: t,
|
|
2422
|
+
detail: n,
|
|
2423
|
+
okButtonText: "知道了",
|
|
2424
|
+
cancelButtonText: ""
|
|
2425
|
+
});
|
|
2426
|
+
Q.show(o);
|
|
2427
|
+
}
|
|
2428
|
+
static warning(t, n) {
|
|
2429
|
+
const o = Y({
|
|
2430
|
+
type: "warning",
|
|
2431
|
+
title: t,
|
|
2432
|
+
detail: n,
|
|
2433
|
+
okButtonText: "知道了",
|
|
2434
|
+
cancelButtonText: ""
|
|
2435
|
+
});
|
|
2436
|
+
Q.show(o);
|
|
2437
|
+
}
|
|
2438
|
+
static success(t, n) {
|
|
2439
|
+
const o = Y({
|
|
2440
|
+
type: "success",
|
|
2441
|
+
title: t,
|
|
2442
|
+
detail: n,
|
|
2443
|
+
okButtonText: "关闭",
|
|
2444
|
+
cancelButtonText: ""
|
|
2445
|
+
});
|
|
2446
|
+
Q.show(o);
|
|
2447
|
+
}
|
|
2448
|
+
static error(t, n, o) {
|
|
2449
|
+
const a = Y({
|
|
2450
|
+
width: 500,
|
|
2451
|
+
type: "error",
|
|
2452
|
+
okButtonText: "关闭",
|
|
2453
|
+
cancelButtonText: "",
|
|
2454
|
+
exceptionInfo: {
|
|
2455
|
+
date: o,
|
|
2456
|
+
message: t,
|
|
2457
|
+
detail: n
|
|
2458
|
+
}
|
|
2459
|
+
});
|
|
2460
|
+
Q.show(a);
|
|
2461
|
+
}
|
|
2462
|
+
static prompt(t, n) {
|
|
2463
|
+
const o = Y({
|
|
2464
|
+
type: "prompt",
|
|
2465
|
+
title: t,
|
|
2466
|
+
detail: n,
|
|
2467
|
+
okButtonText: "确定",
|
|
2468
|
+
cancelButtonText: "取消"
|
|
2469
|
+
});
|
|
2470
|
+
Q.show(o);
|
|
2471
|
+
}
|
|
2472
|
+
static question(t, n, o, a) {
|
|
2473
|
+
const i = Y({
|
|
2474
|
+
type: "question",
|
|
2475
|
+
title: t,
|
|
2476
|
+
detail: n,
|
|
2477
|
+
okButtonText: "确定",
|
|
2478
|
+
cancelButtonText: "取消",
|
|
2479
|
+
acceptCallback: o,
|
|
2480
|
+
rejectCallback: a
|
|
2481
|
+
});
|
|
2482
|
+
Q.show(i);
|
|
2483
|
+
}
|
|
2484
|
+
}
|
|
2485
|
+
ie.install = (e) => {
|
|
2486
|
+
e.component(ie.name, ie), e.provide("FMessageBoxService", Q);
|
|
2487
|
+
};
|
|
2488
|
+
var G = /* @__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))(G || {});
|
|
2489
|
+
const le = {}, ra = {
|
|
10
2490
|
/** 编辑器类型 */
|
|
11
2491
|
data: { type: Object, default: [] },
|
|
12
2492
|
/** 复选框组件id */
|
|
@@ -37,10 +2517,10 @@ const h = {}, Y = {
|
|
|
37
2517
|
// 通用参数编辑器表单数据
|
|
38
2518
|
formData: { type: Object, default: [] }
|
|
39
2519
|
};
|
|
40
|
-
function
|
|
41
|
-
const
|
|
42
|
-
function
|
|
43
|
-
|
|
2520
|
+
function sa(e) {
|
|
2521
|
+
const t = r(e.editorType);
|
|
2522
|
+
function n() {
|
|
2523
|
+
le[t.value] = {
|
|
44
2524
|
type: "combo-list",
|
|
45
2525
|
componentProps: {
|
|
46
2526
|
data: e.data,
|
|
@@ -50,38 +2530,38 @@ function Z(e) {
|
|
|
50
2530
|
}
|
|
51
2531
|
};
|
|
52
2532
|
}
|
|
53
|
-
function a
|
|
2533
|
+
function o(a) {
|
|
54
2534
|
}
|
|
55
|
-
return { createEditorProps:
|
|
2535
|
+
return { createEditorProps: n, onValueChange: o };
|
|
56
2536
|
}
|
|
57
|
-
function
|
|
58
|
-
const
|
|
59
|
-
function
|
|
60
|
-
|
|
2537
|
+
function ia(e) {
|
|
2538
|
+
const t = r(e.editorType);
|
|
2539
|
+
function n() {
|
|
2540
|
+
le[t.value] = {
|
|
61
2541
|
type: "switch",
|
|
62
2542
|
componentProps: {}
|
|
63
2543
|
};
|
|
64
2544
|
}
|
|
65
|
-
function
|
|
2545
|
+
function o() {
|
|
66
2546
|
}
|
|
67
|
-
return { createEditorProps:
|
|
2547
|
+
return { createEditorProps: n, onValueChange: o };
|
|
68
2548
|
}
|
|
69
|
-
function
|
|
70
|
-
const
|
|
71
|
-
function
|
|
72
|
-
|
|
2549
|
+
function ze(e) {
|
|
2550
|
+
const t = r(e.editorType), n = B(() => t.value === G.Default);
|
|
2551
|
+
function o() {
|
|
2552
|
+
le[t.value] = {
|
|
73
2553
|
type: "input-group",
|
|
74
2554
|
componentProps: {}
|
|
75
2555
|
};
|
|
76
2556
|
}
|
|
77
|
-
function
|
|
2557
|
+
function a() {
|
|
78
2558
|
}
|
|
79
|
-
return { createEditorProps:
|
|
2559
|
+
return { createEditorProps: o, shouldRenderAppendButton: n, onValueChange: a };
|
|
80
2560
|
}
|
|
81
|
-
function
|
|
82
|
-
const
|
|
83
|
-
function
|
|
84
|
-
|
|
2561
|
+
function ua(e) {
|
|
2562
|
+
const t = r(e.editorType), n = B(() => t.value === G.Default);
|
|
2563
|
+
function o() {
|
|
2564
|
+
le[t.value] = {
|
|
85
2565
|
type: "combo-tree",
|
|
86
2566
|
componentProps: {
|
|
87
2567
|
data: e.data,
|
|
@@ -98,26 +2578,26 @@ function te(e) {
|
|
|
98
2578
|
}
|
|
99
2579
|
};
|
|
100
2580
|
}
|
|
101
|
-
function
|
|
2581
|
+
function a() {
|
|
102
2582
|
}
|
|
103
|
-
return { createEditorProps:
|
|
2583
|
+
return { createEditorProps: o, shouldRenderAppendButton: n, onValueChange: a };
|
|
104
2584
|
}
|
|
105
|
-
function
|
|
106
|
-
const
|
|
107
|
-
function
|
|
108
|
-
const
|
|
109
|
-
return
|
|
2585
|
+
function ca(e) {
|
|
2586
|
+
const t = r(e.editorType), n = sa(e), o = ia(e), a = ze(e), i = ua(e);
|
|
2587
|
+
function s() {
|
|
2588
|
+
const l = t.value;
|
|
2589
|
+
return l === G.Combolist || l === G.Select ? n.createEditorProps() : l === G.Checkbox || l === G.FilterEditor || l === G.DataEditor || l === G.SortEditor || l === G.MenuIdSelector || l === G.AppIdSelector || (l === G.ComboLookup ? i.createEditorProps() : l === G.Numberbox || (l === G.Switch ? o.createEditorProps() : a.createEditorProps())), le[t.value];
|
|
110
2590
|
}
|
|
111
|
-
function
|
|
2591
|
+
function u() {
|
|
112
2592
|
return "input-group";
|
|
113
2593
|
}
|
|
114
|
-
function
|
|
2594
|
+
function c() {
|
|
115
2595
|
return {};
|
|
116
2596
|
}
|
|
117
|
-
return { getEditorConfig:
|
|
2597
|
+
return { getEditorConfig: s, getEditorType: u, getEditorMap: c };
|
|
118
2598
|
}
|
|
119
|
-
function
|
|
120
|
-
const
|
|
2599
|
+
function da(e) {
|
|
2600
|
+
const t = Y([
|
|
121
2601
|
{
|
|
122
2602
|
id: "tabField",
|
|
123
2603
|
title: "字段",
|
|
@@ -147,135 +2627,131 @@ function ae(e) {
|
|
|
147
2627
|
}
|
|
148
2628
|
}
|
|
149
2629
|
]);
|
|
150
|
-
return
|
|
2630
|
+
return t[0].treeConfigs.data = e.fieldData, t[1].treeConfigs.data = e.varData, t[2].treeConfigs.data = e.formData, { tabs: t };
|
|
151
2631
|
}
|
|
152
|
-
function
|
|
153
|
-
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !
|
|
2632
|
+
function pa(e) {
|
|
2633
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !ft(e);
|
|
154
2634
|
}
|
|
155
|
-
const
|
|
2635
|
+
const J = /* @__PURE__ */ ne({
|
|
156
2636
|
name: "FEventParameter",
|
|
157
|
-
props:
|
|
2637
|
+
props: ra,
|
|
158
2638
|
emits: ["valueChange", "onBlur", "applicationSelectionChange", "componentSelectionChange", "parameterChanged", "update:modelValue", "update:parameterValue", "confirm"],
|
|
159
|
-
setup(e,
|
|
160
|
-
const
|
|
2639
|
+
setup(e, t) {
|
|
2640
|
+
const n = r(e.id);
|
|
161
2641
|
r(e.label), r(e.showLabel);
|
|
162
|
-
const
|
|
163
|
-
getEditorConfig:
|
|
164
|
-
} =
|
|
165
|
-
|
|
166
|
-
const
|
|
2642
|
+
const o = r(e.modelValue), a = r(e.modelValue), {
|
|
2643
|
+
getEditorConfig: i
|
|
2644
|
+
} = ca(e);
|
|
2645
|
+
ze(e);
|
|
2646
|
+
const s = i();
|
|
167
2647
|
r();
|
|
168
|
-
const
|
|
2648
|
+
const u = r();
|
|
169
2649
|
r(e.paramData);
|
|
170
|
-
const
|
|
2650
|
+
const c = mt(Fn), l = r({
|
|
171
2651
|
enable: !1
|
|
172
|
-
}),
|
|
173
|
-
customRowStatus: (
|
|
174
|
-
}),
|
|
2652
|
+
}), f = r({
|
|
2653
|
+
customRowStatus: (d) => ((!d.raw.parent || !d.raw.parentId) && (d.collapse = !0), d)
|
|
2654
|
+
}), m = B(() => ({
|
|
175
2655
|
// 编辑器类型
|
|
176
|
-
type:
|
|
2656
|
+
type: s == null ? void 0 : s.type,
|
|
177
2657
|
/** 根据不同编辑器 设置不同编辑器的属性 */
|
|
178
|
-
...
|
|
2658
|
+
...s == null ? void 0 : s.componentProps
|
|
179
2659
|
})), {
|
|
180
|
-
tabs:
|
|
181
|
-
} =
|
|
182
|
-
function
|
|
183
|
-
|
|
184
|
-
}
|
|
185
|
-
function S(
|
|
186
|
-
const
|
|
187
|
-
selectionEnd:
|
|
188
|
-
} =
|
|
189
|
-
return
|
|
190
|
-
}
|
|
191
|
-
function
|
|
2660
|
+
tabs: v
|
|
2661
|
+
} = da(e);
|
|
2662
|
+
function x(d) {
|
|
2663
|
+
t.emit("update:modelValue", d), t.emit("valueChange", d);
|
|
2664
|
+
}
|
|
2665
|
+
function S(d, T, j) {
|
|
2666
|
+
const O = T.selectionStart || 0, {
|
|
2667
|
+
selectionEnd: D
|
|
2668
|
+
} = T, W = D - O, Z = W > 0, _ = j && j.split("") || [];
|
|
2669
|
+
return Z ? _.splice(O, W, d) : _.splice(O, 0, d), _.join("");
|
|
2670
|
+
}
|
|
2671
|
+
function I(d, T) {
|
|
2672
|
+
if (!d.data)
|
|
2673
|
+
return;
|
|
192
2674
|
const {
|
|
193
|
-
data:
|
|
194
|
-
} = t;
|
|
195
|
-
let l, i = t.parent, {
|
|
196
|
-
label: v
|
|
2675
|
+
data: j
|
|
197
2676
|
} = d;
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
}
|
|
205
|
-
if (l)
|
|
206
|
-
return S(`{DATA~/${v}}`, n);
|
|
2677
|
+
let O = d.parentNode, {
|
|
2678
|
+
label: D
|
|
2679
|
+
} = j;
|
|
2680
|
+
for (; O && O.parentNode; )
|
|
2681
|
+
O.data && (D = O.data.label + "/" + D), O = O.parentNode;
|
|
2682
|
+
return S(`{DATA~/${D}}`, T);
|
|
207
2683
|
}
|
|
208
|
-
function
|
|
2684
|
+
function E(d, T) {
|
|
209
2685
|
const {
|
|
210
|
-
statePath:
|
|
211
|
-
} =
|
|
212
|
-
let
|
|
213
|
-
if (
|
|
214
|
-
const
|
|
215
|
-
if (
|
|
216
|
-
const
|
|
217
|
-
|
|
2686
|
+
statePath: j
|
|
2687
|
+
} = d;
|
|
2688
|
+
let O = T.value;
|
|
2689
|
+
if (j) {
|
|
2690
|
+
const D = j.split("/");
|
|
2691
|
+
if (O = j, D.length === 3) {
|
|
2692
|
+
const Z = `#{${D[1]}}`;
|
|
2693
|
+
D.splice(1, 1, Z), O = D.join("/");
|
|
218
2694
|
}
|
|
219
|
-
|
|
2695
|
+
O = `{UISTATE~${O}}`;
|
|
220
2696
|
}
|
|
221
|
-
return S(
|
|
2697
|
+
return S(O, T);
|
|
222
2698
|
}
|
|
223
|
-
function
|
|
224
|
-
switch (
|
|
2699
|
+
function F(d, T, j) {
|
|
2700
|
+
switch (d) {
|
|
225
2701
|
case "tabForm":
|
|
226
|
-
|
|
2702
|
+
a.value = S(`#{${j.data.id}}`, u.value.elementRef.value, o.value);
|
|
227
2703
|
break;
|
|
228
2704
|
case "tabField":
|
|
229
|
-
|
|
2705
|
+
a.value = I(j, u.value.elementRef.value);
|
|
230
2706
|
break;
|
|
231
2707
|
case "tabVar":
|
|
232
|
-
|
|
2708
|
+
a.value = E(j.data, u.value.elementRef.value);
|
|
233
2709
|
break;
|
|
234
2710
|
}
|
|
235
|
-
|
|
236
|
-
tabId:
|
|
237
|
-
index:
|
|
238
|
-
raw:
|
|
239
|
-
value:
|
|
2711
|
+
t.emit("paramChanged", {
|
|
2712
|
+
tabId: d,
|
|
2713
|
+
index: T,
|
|
2714
|
+
raw: j,
|
|
2715
|
+
value: o.value
|
|
240
2716
|
});
|
|
241
2717
|
}
|
|
242
|
-
function
|
|
2718
|
+
function R() {
|
|
243
2719
|
return () => {
|
|
244
|
-
let
|
|
245
|
-
return p(
|
|
2720
|
+
let d;
|
|
2721
|
+
return p(Me, {
|
|
246
2722
|
style: "padding:0 10px"
|
|
247
2723
|
}, {
|
|
248
|
-
default: () => [p(
|
|
2724
|
+
default: () => [p(xe, {
|
|
249
2725
|
position: "left",
|
|
250
2726
|
width: 300,
|
|
251
2727
|
resizable: !1
|
|
252
2728
|
}, {
|
|
253
|
-
default: () => [p(
|
|
254
|
-
key:
|
|
255
|
-
id:
|
|
256
|
-
title:
|
|
2729
|
+
default: () => [p(Ee, null, pa(d = v.map((T) => p(fn, {
|
|
2730
|
+
key: T.id,
|
|
2731
|
+
id: T.id,
|
|
2732
|
+
title: T.title
|
|
257
2733
|
}, {
|
|
258
|
-
default: () => [p(
|
|
259
|
-
rowNumber:
|
|
260
|
-
rowOption:
|
|
261
|
-
key:
|
|
262
|
-
data:
|
|
2734
|
+
default: () => [p(Re, {
|
|
2735
|
+
rowNumber: l,
|
|
2736
|
+
rowOption: f.value,
|
|
2737
|
+
key: T.treeConfigs.id,
|
|
2738
|
+
data: T.treeConfigs.data,
|
|
263
2739
|
fit: !0,
|
|
264
2740
|
height: 300,
|
|
265
|
-
onDoubleClickRow: function(
|
|
266
|
-
|
|
2741
|
+
onDoubleClickRow: function(O, D) {
|
|
2742
|
+
F(T.id, O, D);
|
|
267
2743
|
}
|
|
268
2744
|
}, null)]
|
|
269
|
-
}))) ?
|
|
270
|
-
default: () => [
|
|
2745
|
+
}))) ? d : {
|
|
2746
|
+
default: () => [d]
|
|
271
2747
|
})]
|
|
272
|
-
}), p(
|
|
2748
|
+
}), p(xe, {
|
|
273
2749
|
position: "center"
|
|
274
2750
|
}, {
|
|
275
|
-
default: () => [p(
|
|
276
|
-
ref:
|
|
277
|
-
modelValue:
|
|
278
|
-
"onUpdate:modelValue": (
|
|
2751
|
+
default: () => [p(Oe, {
|
|
2752
|
+
ref: u,
|
|
2753
|
+
modelValue: a.value,
|
|
2754
|
+
"onUpdate:modelValue": (T) => a.value = T,
|
|
279
2755
|
rows: 10,
|
|
280
2756
|
autoHeight: !0
|
|
281
2757
|
}, null)]
|
|
@@ -283,9 +2759,9 @@ const m = /* @__PURE__ */ _({
|
|
|
283
2759
|
});
|
|
284
2760
|
};
|
|
285
2761
|
}
|
|
286
|
-
function
|
|
287
|
-
|
|
288
|
-
const
|
|
2762
|
+
function P() {
|
|
2763
|
+
a.value = o.value;
|
|
2764
|
+
const d = c.open({
|
|
289
2765
|
title: "参数编辑器",
|
|
290
2766
|
width: 900,
|
|
291
2767
|
height: 500,
|
|
@@ -293,63 +2769,63 @@ const m = /* @__PURE__ */ _({
|
|
|
293
2769
|
showHeader: !0,
|
|
294
2770
|
showCloseButton: !0,
|
|
295
2771
|
draggable: !0,
|
|
296
|
-
render:
|
|
2772
|
+
render: R(),
|
|
297
2773
|
buttons: [{
|
|
298
2774
|
class: "btn btn-light",
|
|
299
2775
|
text: "取消",
|
|
300
2776
|
handle: () => {
|
|
301
|
-
|
|
2777
|
+
d.destroy();
|
|
302
2778
|
}
|
|
303
2779
|
}, {
|
|
304
2780
|
class: "btn btn-primary",
|
|
305
2781
|
text: "确定",
|
|
306
2782
|
handle: () => {
|
|
307
|
-
|
|
2783
|
+
o.value = a.value, t.emit("update:modelValue", o.value), t.emit("confirm", o.value), d.destroy();
|
|
308
2784
|
}
|
|
309
2785
|
}]
|
|
310
2786
|
});
|
|
311
2787
|
}
|
|
312
2788
|
function N() {
|
|
313
|
-
return
|
|
2789
|
+
return m.value.type === "input-group" ? p("span", {
|
|
314
2790
|
class: "f-icon f-icon-lookup",
|
|
315
|
-
onClick:
|
|
2791
|
+
onClick: P,
|
|
316
2792
|
style: "margin-top: 2px;margin-right: 5px;color: rgba(0, 0, 0, .25)"
|
|
317
|
-
}, null) : p(
|
|
2793
|
+
}, null) : p(te, null, null);
|
|
318
2794
|
}
|
|
319
|
-
|
|
320
|
-
|
|
2795
|
+
U(() => e.modelValue, (d, T) => {
|
|
2796
|
+
d !== T && (o.value = d);
|
|
321
2797
|
});
|
|
322
|
-
const
|
|
323
|
-
|
|
324
|
-
},
|
|
325
|
-
return
|
|
326
|
-
getInputRef:
|
|
327
|
-
}), () => p(
|
|
328
|
-
id:
|
|
329
|
-
editor:
|
|
330
|
-
modelValue:
|
|
331
|
-
"onUpdate:modelValue": (
|
|
2798
|
+
const H = () => {
|
|
2799
|
+
t.emit("update:modelValue", "");
|
|
2800
|
+
}, z = () => u.value.elementRef;
|
|
2801
|
+
return t.expose({
|
|
2802
|
+
getInputRef: z
|
|
2803
|
+
}), () => p(Mo, {
|
|
2804
|
+
id: n.value,
|
|
2805
|
+
editor: m.value,
|
|
2806
|
+
modelValue: o.value,
|
|
2807
|
+
"onUpdate:modelValue": (d) => o.value = d,
|
|
332
2808
|
showLabel: !1,
|
|
333
|
-
onChange:
|
|
334
|
-
onClear:
|
|
2809
|
+
onChange: x,
|
|
2810
|
+
onClear: H
|
|
335
2811
|
}, {
|
|
336
2812
|
groupTextTemplate: () => N()
|
|
337
2813
|
});
|
|
338
2814
|
}
|
|
339
2815
|
});
|
|
340
|
-
|
|
341
|
-
e.component(
|
|
2816
|
+
J.install = (e) => {
|
|
2817
|
+
e.component(J.name, J);
|
|
342
2818
|
};
|
|
343
|
-
|
|
344
|
-
e["event-parameter"] =
|
|
2819
|
+
J.register = (e, t, n, o) => {
|
|
2820
|
+
e["event-parameter"] = J, t["event-parameter"] = J;
|
|
345
2821
|
};
|
|
346
|
-
|
|
347
|
-
e["event-parameter"] =
|
|
2822
|
+
J.registerDesigner = (e, t, n) => {
|
|
2823
|
+
e["event-parameter"] = J, t["event-parameter"] = J;
|
|
348
2824
|
};
|
|
349
2825
|
export {
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
2826
|
+
G as EditorType,
|
|
2827
|
+
J as FEventParameter,
|
|
2828
|
+
J as default,
|
|
2829
|
+
le as editorMap,
|
|
2830
|
+
ra as eventParameterProps
|
|
355
2831
|
};
|