@farris/ui-vue 1.2.4 → 1.2.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/accordion/index.esm.js +58 -58
- package/components/accordion/index.umd.cjs +1 -1
- package/components/capsule/index.esm.js +1 -1
- package/components/capsule/index.umd.cjs +1 -1
- package/components/common/index.esm.js +2 -2
- package/components/common/index.umd.cjs +1 -1
- package/components/condition/index.esm.js +137 -135
- package/components/condition/index.umd.cjs +1 -1
- package/components/data-grid/index.esm.js +2316 -2299
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/data-view/index.esm.js +1929 -1920
- package/components/data-view/index.umd.cjs +1 -1
- package/components/designer-canvas/index.esm.js +1 -1
- package/components/designer-canvas/index.umd.cjs +1 -1
- package/components/designer-canvas/style.css +1 -1
- package/components/designer-outline/index.esm.js +44 -42
- package/components/designer-outline/index.umd.cjs +1 -1
- package/components/designer-toolbox/index.esm.js +28 -467
- package/components/designer-toolbox/index.umd.cjs +1 -1
- package/components/dynamic-form/index.esm.js +836 -790
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/external-container/index.esm.js +382 -378
- package/components/external-container/index.umd.cjs +1 -1
- package/components/field-selector/index.esm.js +1167 -1150
- package/components/field-selector/index.umd.cjs +1 -1
- package/components/filter-bar/index.esm.js +131 -127
- package/components/filter-bar/index.umd.cjs +1 -1
- package/components/flow-canvas/index.esm.js +1 -1
- package/components/flow-canvas/index.umd.cjs +1 -1
- package/components/flow-canvas/style.css +1 -1
- package/components/list-view/index.esm.js +128 -124
- package/components/list-view/index.umd.cjs +1 -1
- package/components/lookup/index.esm.js +2156 -2139
- package/components/lookup/index.umd.cjs +1 -1
- package/components/mapping-editor/index.esm.js +3137 -3120
- package/components/mapping-editor/index.umd.cjs +1 -1
- package/components/nav/index.esm.js +511 -469
- package/components/nav/index.umd.cjs +2 -2
- package/components/order/index.esm.js +859 -815
- package/components/order/index.umd.cjs +1 -1
- package/components/pagination/index.esm.js +491 -449
- package/components/pagination/index.umd.cjs +1 -1
- package/components/property-panel/index.esm.js +75 -73
- package/components/property-panel/index.umd.cjs +1 -1
- package/components/response-layout-editor/index.esm.js +63 -61
- package/components/response-layout-editor/index.umd.cjs +1 -1
- package/components/schema-selector/index.esm.js +2002 -1956
- package/components/schema-selector/index.umd.cjs +1 -1
- package/components/switch/index.esm.js +165 -192
- package/components/switch/index.umd.cjs +1 -1
- package/components/tabs/index.esm.js +2 -2
- package/components/tabs/index.umd.cjs +1 -1
- package/components/transfer/index.esm.js +95 -93
- package/components/transfer/index.umd.cjs +1 -1
- package/components/tree-grid/index.esm.js +2316 -2299
- package/components/tree-grid/index.umd.cjs +1 -1
- package/components/tree-view/index.esm.js +296 -295
- package/components/tree-view/index.umd.cjs +1 -1
- package/farris.all.esm.js +2517 -2483
- package/farris.all.umd.cjs +7 -7
- package/package.json +1 -1
- package/style.css +1 -1
- package/types/condition/index.d.ts +60 -1
- package/types/data-view/components/column-setting/column-setting.component.d.ts +2 -1
- package/types/data-view/composition/types.d.ts +2 -0
- package/types/dynamic-form/src/designer/use-designer-rules.d.ts +3 -3
- package/types/list-view/src/composition/types.d.ts +1 -1
- package/types/message-box/index.d.ts +84 -1
- package/types/notify/index.d.ts +84 -1
- package/types/tree-grid/src/schema/column-resolver.d.ts +3 -0
|
@@ -1,93 +1,93 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { defineComponent as G, ref as f, computed as P, createVNode as
|
|
5
|
-
import { cloneDeep as
|
|
1
|
+
var Ae = Object.defineProperty;
|
|
2
|
+
var De = (e, t, n) => t in e ? Ae(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
+
var $ = (e, t, n) => De(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
+
import { defineComponent as G, ref as f, computed as P, createVNode as A, nextTick as te, inject as W, onMounted as U, watch as I, createTextVNode as Ee, reactive as Ve, withDirectives as Oe, resolveDirective as Le, Fragment as le, mergeProps as _ } from "vue";
|
|
5
|
+
import { cloneDeep as Ne } from "lodash-es";
|
|
6
6
|
import "bignumber.js";
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import
|
|
23
|
-
import
|
|
24
|
-
import
|
|
25
|
-
import
|
|
26
|
-
import
|
|
27
|
-
import
|
|
28
|
-
import
|
|
29
|
-
import
|
|
30
|
-
import
|
|
31
|
-
import
|
|
32
|
-
import
|
|
33
|
-
import
|
|
34
|
-
import
|
|
35
|
-
import
|
|
36
|
-
import
|
|
37
|
-
import
|
|
38
|
-
import
|
|
39
|
-
import
|
|
40
|
-
import
|
|
41
|
-
import
|
|
42
|
-
import
|
|
43
|
-
import
|
|
44
|
-
import
|
|
45
|
-
import
|
|
46
|
-
import
|
|
47
|
-
import
|
|
48
|
-
import
|
|
49
|
-
import
|
|
50
|
-
import
|
|
51
|
-
import
|
|
52
|
-
import
|
|
53
|
-
import
|
|
54
|
-
import
|
|
55
|
-
import
|
|
56
|
-
import
|
|
57
|
-
import
|
|
58
|
-
import
|
|
59
|
-
import
|
|
60
|
-
import
|
|
61
|
-
import
|
|
62
|
-
import
|
|
63
|
-
import
|
|
7
|
+
import Ie, { useNumber as $e, useFormat as Re, useSpinner as Ge, useTextBox as qe } from "@farris/ui-vue/components/number-spinner";
|
|
8
|
+
import Ue from "@farris/ui-vue/components/accordion";
|
|
9
|
+
import He from "@farris/ui-vue/components/avatar";
|
|
10
|
+
import We from "@farris/ui-vue/components/button-edit";
|
|
11
|
+
import ze from "@farris/ui-vue/components/button-group";
|
|
12
|
+
import Qe from "@farris/ui-vue/components/calendar";
|
|
13
|
+
import _e from "@farris/ui-vue/components/capsule";
|
|
14
|
+
import Ze from "@farris/ui-vue/components/checkbox";
|
|
15
|
+
import Xe from "@farris/ui-vue/components/combo-list";
|
|
16
|
+
import Ye from "@farris/ui-vue/components/component";
|
|
17
|
+
import Ke from "@farris/ui-vue/components/color-picker";
|
|
18
|
+
import Je from "@farris/ui-vue/components/content-container";
|
|
19
|
+
import et from "@farris/ui-vue/components/date-picker";
|
|
20
|
+
import tt from "@farris/ui-vue/components/data-grid";
|
|
21
|
+
import nt from "@farris/ui-vue/components/dropdown";
|
|
22
|
+
import ot from "@farris/ui-vue/components/dynamic-form";
|
|
23
|
+
import rt from "@farris/ui-vue/components/events-editor";
|
|
24
|
+
import at from "@farris/ui-vue/components/filter-bar";
|
|
25
|
+
import it from "@farris/ui-vue/components/field-selector";
|
|
26
|
+
import st from "@farris/ui-vue/components/image-cropper";
|
|
27
|
+
import lt from "@farris/ui-vue/components/input-group";
|
|
28
|
+
import ct from "@farris/ui-vue/components/layout";
|
|
29
|
+
import ut from "@farris/ui-vue/components/list-nav";
|
|
30
|
+
import pt from "@farris/ui-vue/components/list-view";
|
|
31
|
+
import dt from "@farris/ui-vue/components/lookup";
|
|
32
|
+
import mt from "@farris/ui-vue/components/mapping-editor";
|
|
33
|
+
import ft from "@farris/ui-vue/components/nav";
|
|
34
|
+
import yt from "@farris/ui-vue/components/number-range";
|
|
35
|
+
import gt from "@farris/ui-vue/components/order";
|
|
36
|
+
import bt from "@farris/ui-vue/components/page-header";
|
|
37
|
+
import ht from "@farris/ui-vue/components/page-footer";
|
|
38
|
+
import vt from "@farris/ui-vue/components/pagination";
|
|
39
|
+
import Ct from "@farris/ui-vue/components/progress";
|
|
40
|
+
import Tt from "@farris/ui-vue/components/query-solution";
|
|
41
|
+
import Ft from "@farris/ui-vue/components/radio-group";
|
|
42
|
+
import wt from "@farris/ui-vue/components/rate";
|
|
43
|
+
import Bt from "@farris/ui-vue/components/response-toolbar";
|
|
44
|
+
import St from "@farris/ui-vue/components/response-layout";
|
|
45
|
+
import Pt from "@farris/ui-vue/components/response-layout-editor";
|
|
46
|
+
import xt from "@farris/ui-vue/components/search-box";
|
|
47
|
+
import kt from "@farris/ui-vue/components/section";
|
|
48
|
+
import Mt from "@farris/ui-vue/components/smoke-detector";
|
|
49
|
+
import jt from "@farris/ui-vue/components/splitter";
|
|
50
|
+
import At from "@farris/ui-vue/components/step";
|
|
51
|
+
import Dt from "@farris/ui-vue/components/switch";
|
|
52
|
+
import Et from "@farris/ui-vue/components/tabs";
|
|
53
|
+
import Vt from "@farris/ui-vue/components/tags";
|
|
54
|
+
import Ot from "@farris/ui-vue/components/text";
|
|
55
|
+
import Lt from "@farris/ui-vue/components/time-picker";
|
|
56
|
+
import Nt from "@farris/ui-vue/components/transfer";
|
|
57
|
+
import It from "@farris/ui-vue/components/tree-view";
|
|
58
|
+
import $t from "@farris/ui-vue/components/uploader";
|
|
59
|
+
import Rt from "@farris/ui-vue/components/verify-detail";
|
|
60
|
+
import Gt from "@farris/ui-vue/components/weather";
|
|
61
|
+
import qt from "@farris/ui-vue/components/video";
|
|
62
|
+
import Ut from "@farris/ui-vue/components/textarea";
|
|
63
|
+
import Ht from "@farris/ui-vue/components/schema-selector";
|
|
64
64
|
import "@farris/ui-vue/components/external-container";
|
|
65
|
-
const
|
|
66
|
-
function
|
|
67
|
-
const { properties: t, title: n } = e, o = Object.keys(t).reduce((r,
|
|
65
|
+
const de = {}, me = {};
|
|
66
|
+
function ne(e) {
|
|
67
|
+
const { properties: t, title: n } = e, o = Object.keys(t).reduce((r, l) => (r[l] = t[l].type === "object" && t[l].properties ? ne(t[l]) : Ne(t[l].default), r), {});
|
|
68
68
|
return o.id = `${n}-${Date.now()}`, o;
|
|
69
69
|
}
|
|
70
|
-
function
|
|
71
|
-
const n =
|
|
70
|
+
function z(e, t = {}) {
|
|
71
|
+
const n = de[e];
|
|
72
72
|
if (n) {
|
|
73
|
-
let o =
|
|
74
|
-
const r =
|
|
75
|
-
return o = r ? r({ getSchemaByType:
|
|
73
|
+
let o = ne(n);
|
|
74
|
+
const r = me[e];
|
|
75
|
+
return o = r ? r({ getSchemaByType: z }, o, t) : o, o;
|
|
76
76
|
}
|
|
77
77
|
return null;
|
|
78
78
|
}
|
|
79
|
-
function
|
|
80
|
-
const n =
|
|
79
|
+
function Wt(e, t) {
|
|
80
|
+
const n = ne(t);
|
|
81
81
|
return Object.keys(e).reduce((o, r) => (o[r] = e[r], o), n), n;
|
|
82
82
|
}
|
|
83
|
-
function
|
|
83
|
+
function zt(e, t) {
|
|
84
84
|
return Object.keys(e).filter((o) => e[o] != null).reduce((o, r) => {
|
|
85
85
|
if (t.has(r)) {
|
|
86
|
-
const
|
|
87
|
-
if (typeof
|
|
88
|
-
o[
|
|
86
|
+
const l = t.get(r);
|
|
87
|
+
if (typeof l == "string")
|
|
88
|
+
o[l] = e[r];
|
|
89
89
|
else {
|
|
90
|
-
const s =
|
|
90
|
+
const s = l(r, e[r], e);
|
|
91
91
|
Object.assign(o, s);
|
|
92
92
|
}
|
|
93
93
|
} else
|
|
@@ -95,65 +95,65 @@ function Gt(e, t) {
|
|
|
95
95
|
return o;
|
|
96
96
|
}, {});
|
|
97
97
|
}
|
|
98
|
-
function
|
|
99
|
-
const o =
|
|
100
|
-
return
|
|
98
|
+
function Qt(e, t, n = /* @__PURE__ */ new Map()) {
|
|
99
|
+
const o = Wt(e, t);
|
|
100
|
+
return zt(o, n);
|
|
101
101
|
}
|
|
102
|
-
function
|
|
103
|
-
function t(a,
|
|
104
|
-
if (typeof
|
|
105
|
-
return y[a].length ===
|
|
106
|
-
if (typeof
|
|
107
|
-
const
|
|
108
|
-
if (
|
|
102
|
+
function _t(e = {}) {
|
|
103
|
+
function t(a, u, c, y) {
|
|
104
|
+
if (typeof c == "number")
|
|
105
|
+
return y[a].length === c;
|
|
106
|
+
if (typeof c == "object") {
|
|
107
|
+
const F = Object.keys(c)[0], i = c[F];
|
|
108
|
+
if (F === "not")
|
|
109
109
|
return Number(y[a].length) !== Number(i);
|
|
110
|
-
if (
|
|
110
|
+
if (F === "moreThan")
|
|
111
111
|
return Number(y[a].length) >= Number(i);
|
|
112
|
-
if (
|
|
112
|
+
if (F === "lessThan")
|
|
113
113
|
return Number(y[a].length) <= Number(i);
|
|
114
114
|
}
|
|
115
115
|
return !1;
|
|
116
116
|
}
|
|
117
|
-
function n(a,
|
|
118
|
-
return y[a] && y[a].propertyValue && String(y[a].propertyValue.value) === String(
|
|
117
|
+
function n(a, u, c, y) {
|
|
118
|
+
return y[a] && y[a].propertyValue && String(y[a].propertyValue.value) === String(c);
|
|
119
119
|
}
|
|
120
120
|
const o = /* @__PURE__ */ new Map([
|
|
121
121
|
["length", t],
|
|
122
122
|
["getProperty", n]
|
|
123
123
|
]);
|
|
124
|
-
Object.keys(e).reduce((a,
|
|
125
|
-
function r(a,
|
|
126
|
-
const
|
|
127
|
-
return typeof
|
|
124
|
+
Object.keys(e).reduce((a, u) => (a.set(u, e[u]), a), o);
|
|
125
|
+
function r(a, u) {
|
|
126
|
+
const c = a;
|
|
127
|
+
return typeof u == "number" ? [{ target: c, operator: "length", param: null, value: Number(u) }] : typeof u == "boolean" ? [{ target: c, operator: "getProperty", param: a, value: !!u }] : typeof u == "object" ? Object.keys(u).map((y) => {
|
|
128
128
|
if (y === "length")
|
|
129
|
-
return { target:
|
|
130
|
-
const
|
|
131
|
-
return { target:
|
|
129
|
+
return { target: c, operator: "length", param: null, value: u[y] };
|
|
130
|
+
const F = y, i = u[y];
|
|
131
|
+
return { target: c, operator: "getProperty", param: F, value: i };
|
|
132
132
|
}) : [];
|
|
133
133
|
}
|
|
134
|
-
function
|
|
135
|
-
return Object.keys(a).reduce((
|
|
136
|
-
const
|
|
137
|
-
return
|
|
134
|
+
function l(a) {
|
|
135
|
+
return Object.keys(a).reduce((c, y) => {
|
|
136
|
+
const F = r(y, a[y]);
|
|
137
|
+
return c.push(...F), c;
|
|
138
138
|
}, []);
|
|
139
139
|
}
|
|
140
|
-
function s(a,
|
|
140
|
+
function s(a, u) {
|
|
141
141
|
if (o.has(a.operator)) {
|
|
142
|
-
const
|
|
143
|
-
return
|
|
142
|
+
const c = o.get(a.operator);
|
|
143
|
+
return c && c(a.target, a.param, a.value, u) || !1;
|
|
144
144
|
}
|
|
145
145
|
return !1;
|
|
146
146
|
}
|
|
147
|
-
function
|
|
148
|
-
return
|
|
147
|
+
function d(a, u) {
|
|
148
|
+
return l(a).reduce((F, i) => F && s(i, u), !0);
|
|
149
149
|
}
|
|
150
|
-
function m(a,
|
|
151
|
-
const
|
|
152
|
-
return y ? !
|
|
150
|
+
function m(a, u) {
|
|
151
|
+
const c = Object.keys(a), y = c.includes("allOf"), F = c.includes("anyOf"), i = y || F, w = (i ? a[i ? y ? "allOf" : "anyOf" : "allOf"] : [a]).map((j) => d(j, u));
|
|
152
|
+
return y ? !w.includes(!1) : w.includes(!0);
|
|
153
153
|
}
|
|
154
154
|
return { parseValueSchema: m };
|
|
155
155
|
}
|
|
156
|
-
const
|
|
156
|
+
const T = {
|
|
157
157
|
Button: { type: "Button", name: "按钮", icon: "Button" },
|
|
158
158
|
ButtonGroup: { type: "ButtonGroup", name: "按钮组", icon: "ButtonGroup" },
|
|
159
159
|
ToolBar: { type: "ToolBar", name: "工具栏", icon: "ButtonGroup" },
|
|
@@ -264,18 +264,18 @@ const w = {
|
|
|
264
264
|
ApprovalLogs: { type: "ApprovalLogs", name: "审批记录", icon: "ApprovalLogs" },
|
|
265
265
|
ApprovalComments: { type: "ApprovalComments", name: "审批意见", icon: "shenpiyijian" }
|
|
266
266
|
/** 审批类 end */
|
|
267
|
-
},
|
|
268
|
-
|
|
269
|
-
function
|
|
270
|
-
return
|
|
271
|
-
const
|
|
272
|
-
return Object.assign(m,
|
|
267
|
+
}, fe = {}, Zt = {};
|
|
268
|
+
_t();
|
|
269
|
+
function Z(e, t, n = /* @__PURE__ */ new Map(), o = (s, d, m) => d, r = {}, l = (s) => s) {
|
|
270
|
+
return de[t.title] = t, me[t.title] = o, fe[t.title] = r, Zt[t.title] = l, (s = {}) => {
|
|
271
|
+
const d = Qt(s, t, n), m = Object.keys(e).reduce((a, u) => (a[u] = e[u].default, a), {});
|
|
272
|
+
return Object.assign(m, d);
|
|
273
273
|
};
|
|
274
274
|
}
|
|
275
|
-
function
|
|
275
|
+
function ye(e, t) {
|
|
276
276
|
return { customClass: t.class, customStyle: t.style };
|
|
277
277
|
}
|
|
278
|
-
function
|
|
278
|
+
function Xt() {
|
|
279
279
|
function e(t) {
|
|
280
280
|
return t.editor;
|
|
281
281
|
}
|
|
@@ -283,25 +283,25 @@ function Wt() {
|
|
|
283
283
|
resolve: e
|
|
284
284
|
};
|
|
285
285
|
}
|
|
286
|
-
const
|
|
287
|
-
["appearance",
|
|
286
|
+
const oe = /* @__PURE__ */ new Map([
|
|
287
|
+
["appearance", ye]
|
|
288
288
|
]);
|
|
289
|
-
function
|
|
289
|
+
function Yt(e, t, n, o) {
|
|
290
290
|
const r = e.getSchemaByType("section");
|
|
291
291
|
return r.id = `${o}-section`, r.appearance = { class: "f-section-form f-section-in-main" }, r.mainTitle = "标题", r.contents = [t], r;
|
|
292
292
|
}
|
|
293
|
-
function
|
|
293
|
+
function Kt(e, t, n, o) {
|
|
294
294
|
const r = e.getSchemaByType("component");
|
|
295
295
|
return r.id = `${o}-component`, r.componentType = "form-col-1", r.appearance = {
|
|
296
296
|
class: "f-struct-form f-struct-wrapper"
|
|
297
297
|
}, r.contents = [t], r;
|
|
298
298
|
}
|
|
299
|
-
function
|
|
299
|
+
function Jt(e, t, n) {
|
|
300
300
|
t.appearance = { class: "f-form-layout farris-form farris-form-controls-inline" };
|
|
301
|
-
const o =
|
|
302
|
-
return
|
|
301
|
+
const o = Yt(e, t, n, t.id);
|
|
302
|
+
return Kt(e, o, n, t.id);
|
|
303
303
|
}
|
|
304
|
-
const
|
|
304
|
+
const en = "https://json-schema.org/draft/2020-12/schema", tn = "https://farris-design.gitee.io/response-form.schema.json", nn = "response-form", on = "A Farris Data Collection Component", rn = "object", an = {
|
|
305
305
|
id: {
|
|
306
306
|
description: "The unique identifier for a form group",
|
|
307
307
|
type: "string"
|
|
@@ -329,18 +329,18 @@ const Zt = "https://json-schema.org/draft/2020-12/schema", Xt = "https://farris-
|
|
|
329
329
|
type: "array",
|
|
330
330
|
default: []
|
|
331
331
|
}
|
|
332
|
-
},
|
|
332
|
+
}, sn = [
|
|
333
333
|
"id",
|
|
334
334
|
"type"
|
|
335
|
-
],
|
|
336
|
-
$schema:
|
|
337
|
-
$id:
|
|
338
|
-
title:
|
|
339
|
-
description:
|
|
340
|
-
type:
|
|
341
|
-
properties:
|
|
342
|
-
required:
|
|
343
|
-
},
|
|
335
|
+
], ln = {
|
|
336
|
+
$schema: en,
|
|
337
|
+
$id: tn,
|
|
338
|
+
title: nn,
|
|
339
|
+
description: on,
|
|
340
|
+
type: rn,
|
|
341
|
+
properties: an,
|
|
342
|
+
required: sn
|
|
343
|
+
}, cn = "response-form", un = "A Farris Component", pn = "object", dn = {
|
|
344
344
|
basic: {
|
|
345
345
|
description: "Basic Infomation",
|
|
346
346
|
title: "基本信息",
|
|
@@ -362,30 +362,30 @@ const Zt = "https://json-schema.org/draft/2020-12/schema", Xt = "https://farris-
|
|
|
362
362
|
}
|
|
363
363
|
}
|
|
364
364
|
}
|
|
365
|
-
},
|
|
366
|
-
title:
|
|
367
|
-
description:
|
|
368
|
-
type:
|
|
369
|
-
categories:
|
|
370
|
-
},
|
|
365
|
+
}, mn = {
|
|
366
|
+
title: cn,
|
|
367
|
+
description: un,
|
|
368
|
+
type: pn,
|
|
369
|
+
categories: dn
|
|
370
|
+
}, ge = {
|
|
371
371
|
customClass: { type: String, default: "" }
|
|
372
|
-
},
|
|
372
|
+
}, ce = Z(ge, ln, oe, Jt, mn), K = /* @__PURE__ */ G({
|
|
373
373
|
name: "FResponseForm",
|
|
374
|
-
props:
|
|
374
|
+
props: ge,
|
|
375
375
|
emits: [],
|
|
376
376
|
setup(e, t) {
|
|
377
377
|
const n = f(), o = P(() => {
|
|
378
|
-
const r = e.customClass.split(" "),
|
|
378
|
+
const r = e.customClass.split(" "), l = {
|
|
379
379
|
"drag-container": !0
|
|
380
380
|
};
|
|
381
|
-
return r.reduce((s,
|
|
381
|
+
return r.reduce((s, d) => (s[d] = !0, s), l), l;
|
|
382
382
|
});
|
|
383
|
-
return () =>
|
|
383
|
+
return () => A("div", {
|
|
384
384
|
ref: n,
|
|
385
385
|
class: o.value
|
|
386
386
|
}, [t.slots.default && t.slots.default()]);
|
|
387
387
|
}
|
|
388
|
-
}),
|
|
388
|
+
}), fn = "https://json-schema.org/draft/2020-12/schema", yn = "https://farris-design.gitee.io/form-group.schema.json", gn = "form-group", bn = "A Farris Input Component", hn = "object", vn = {
|
|
389
389
|
id: {
|
|
390
390
|
description: "The unique identifier for a form group",
|
|
391
391
|
type: "string"
|
|
@@ -426,18 +426,18 @@ const Zt = "https://json-schema.org/draft/2020-12/schema", Xt = "https://farris-
|
|
|
426
426
|
description: "",
|
|
427
427
|
type: "number"
|
|
428
428
|
}
|
|
429
|
-
},
|
|
429
|
+
}, Cn = [
|
|
430
430
|
"id",
|
|
431
431
|
"type"
|
|
432
|
-
],
|
|
433
|
-
$schema:
|
|
434
|
-
$id:
|
|
435
|
-
title:
|
|
436
|
-
description:
|
|
437
|
-
type:
|
|
438
|
-
properties:
|
|
439
|
-
required:
|
|
440
|
-
},
|
|
432
|
+
], be = {
|
|
433
|
+
$schema: fn,
|
|
434
|
+
$id: yn,
|
|
435
|
+
title: gn,
|
|
436
|
+
description: bn,
|
|
437
|
+
type: hn,
|
|
438
|
+
properties: vn,
|
|
439
|
+
required: Cn
|
|
440
|
+
}, Q = {
|
|
441
441
|
id: { type: String, default: "" },
|
|
442
442
|
customClass: { type: String, default: "" },
|
|
443
443
|
/** 筛选组件配置器,具体配置项可查看各组件文档 */
|
|
@@ -450,20 +450,20 @@ const Zt = "https://json-schema.org/draft/2020-12/schema", Xt = "https://farris-
|
|
|
450
450
|
required: { type: Boolean, default: !1 },
|
|
451
451
|
showLabel: { type: Boolean, default: !0 },
|
|
452
452
|
type: { type: String, default: "input-group" }
|
|
453
|
-
},
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
453
|
+
}, ue = Z(
|
|
454
|
+
Q,
|
|
455
|
+
be,
|
|
456
|
+
oe,
|
|
457
457
|
void 0
|
|
458
|
-
),
|
|
459
|
-
function
|
|
460
|
-
var
|
|
458
|
+
), Tn = Xt();
|
|
459
|
+
function re(e, t, n) {
|
|
460
|
+
var L;
|
|
461
461
|
function o() {
|
|
462
462
|
n != null && n.resolveComponentContext && n.resolveComponentContext();
|
|
463
463
|
}
|
|
464
464
|
o();
|
|
465
|
-
const r = n && n.getStyles && n.getStyles() || "",
|
|
466
|
-
function
|
|
465
|
+
const r = n && n.getStyles && n.getStyles() || "", l = n && n.getDesignerClass && n.getDesignerClass() || "", s = f();
|
|
466
|
+
function d() {
|
|
467
467
|
return (t == null ? void 0 : t.schema.componentType) === "frame" ? !1 : n && n.checkCanMoveComponent ? n.checkCanMoveComponent() : !0;
|
|
468
468
|
}
|
|
469
469
|
function m() {
|
|
@@ -472,91 +472,91 @@ function oe(e, t, n) {
|
|
|
472
472
|
function a() {
|
|
473
473
|
return (t == null ? void 0 : t.schema.componentType) === "frame" ? !1 : n && n.checkCanDeleteComponent ? n.checkCanDeleteComponent() : !0;
|
|
474
474
|
}
|
|
475
|
-
function
|
|
475
|
+
function u() {
|
|
476
476
|
return (t == null ? void 0 : t.schema.componentType) === "frame" ? !0 : n && n.hideNestedPaddingInDesginerView ? n.hideNestedPaddingInDesginerView() : !1;
|
|
477
477
|
}
|
|
478
|
-
function
|
|
479
|
-
if (!
|
|
478
|
+
function c(S) {
|
|
479
|
+
if (!S || !S.value)
|
|
480
480
|
return null;
|
|
481
|
-
if (
|
|
482
|
-
return
|
|
483
|
-
const
|
|
484
|
-
return
|
|
481
|
+
if (S.value.schema && S.value.schema.type === "component")
|
|
482
|
+
return S.value;
|
|
483
|
+
const k = f(S == null ? void 0 : S.value.parent), B = c(k);
|
|
484
|
+
return B || null;
|
|
485
485
|
}
|
|
486
|
-
function y(
|
|
487
|
-
const { componentInstance:
|
|
488
|
-
return !
|
|
486
|
+
function y(S = t) {
|
|
487
|
+
const { componentInstance: k, designerItemElementRef: B } = S;
|
|
488
|
+
return !k || !k.value ? null : k.value.canMove ? B : y(S.parent);
|
|
489
489
|
}
|
|
490
|
-
function
|
|
491
|
-
return !!n && n.canAccepts(
|
|
490
|
+
function F(S) {
|
|
491
|
+
return !!n && n.canAccepts(S);
|
|
492
492
|
}
|
|
493
493
|
function i() {
|
|
494
494
|
return (t == null ? void 0 : t.schema.label) || (t == null ? void 0 : t.schema.title) || (t == null ? void 0 : t.schema.name);
|
|
495
495
|
}
|
|
496
|
-
function
|
|
496
|
+
function p() {
|
|
497
497
|
}
|
|
498
|
-
function g(
|
|
499
|
-
|
|
498
|
+
function g(S, k) {
|
|
499
|
+
k && n != null && n.onAcceptMovedChildElement && n.onAcceptMovedChildElement(k);
|
|
500
500
|
}
|
|
501
|
-
function S
|
|
502
|
-
const { componentType:
|
|
503
|
-
let
|
|
504
|
-
n && n.onResolveNewComponentSchema && (
|
|
505
|
-
const
|
|
506
|
-
return
|
|
501
|
+
function w(S) {
|
|
502
|
+
const { componentType: k } = S;
|
|
503
|
+
let B = z(k, S);
|
|
504
|
+
n && n.onResolveNewComponentSchema && (B = n.onResolveNewComponentSchema(S, B));
|
|
505
|
+
const E = k.toLowerCase().replace("-", "_");
|
|
506
|
+
return B && !B.id && B.type === k && (B.id = `${E}_${Math.random().toString().slice(2, 6)}`), B;
|
|
507
507
|
}
|
|
508
|
-
function
|
|
509
|
-
const
|
|
510
|
-
|
|
511
|
-
let O =
|
|
512
|
-
n && n.onAcceptNewChildElement && (O = n.onAcceptNewChildElement(
|
|
513
|
-
const R =
|
|
514
|
-
return O && !O.id && O.type ===
|
|
508
|
+
function D(S, k) {
|
|
509
|
+
const B = String(S.getAttribute("data-controltype")), E = S.getAttribute("data-feature"), N = E ? JSON.parse(E) : {};
|
|
510
|
+
N.parentComponentInstance = s.value;
|
|
511
|
+
let O = z(B, N);
|
|
512
|
+
n && n.onAcceptNewChildElement && (O = n.onAcceptNewChildElement(S, k, O));
|
|
513
|
+
const R = B.toLowerCase().replace("-", "_");
|
|
514
|
+
return O && !O.id && O.type === B && (O.id = `${R}_${Math.random().toString().slice(2, 6)}`), O;
|
|
515
515
|
}
|
|
516
|
-
function
|
|
516
|
+
function j(S) {
|
|
517
517
|
}
|
|
518
|
-
function
|
|
518
|
+
function M(...S) {
|
|
519
519
|
if (n && n.getPropsConfig)
|
|
520
|
-
return n.getPropsConfig(...
|
|
520
|
+
return n.getPropsConfig(...S);
|
|
521
521
|
}
|
|
522
522
|
return s.value = {
|
|
523
|
-
canMove:
|
|
523
|
+
canMove: d(),
|
|
524
524
|
canSelectParent: m(),
|
|
525
525
|
canDelete: a(),
|
|
526
|
-
canNested: !
|
|
526
|
+
canNested: !u(),
|
|
527
527
|
contents: t == null ? void 0 : t.schema.contents,
|
|
528
528
|
elementRef: e,
|
|
529
|
-
parent: (
|
|
529
|
+
parent: (L = t == null ? void 0 : t.parent) == null ? void 0 : L.componentInstance,
|
|
530
530
|
schema: t == null ? void 0 : t.schema,
|
|
531
531
|
styles: r,
|
|
532
|
-
designerClass:
|
|
533
|
-
canAccepts:
|
|
534
|
-
getBelongedComponentInstance:
|
|
532
|
+
designerClass: l,
|
|
533
|
+
canAccepts: F,
|
|
534
|
+
getBelongedComponentInstance: c,
|
|
535
535
|
getDraggableDesignItemElement: y,
|
|
536
536
|
getDraggingDisplayText: i,
|
|
537
|
-
getPropConfig:
|
|
538
|
-
getDragScopeElement:
|
|
537
|
+
getPropConfig: M,
|
|
538
|
+
getDragScopeElement: p,
|
|
539
539
|
onAcceptMovedChildElement: g,
|
|
540
|
-
onAcceptNewChildElement:
|
|
541
|
-
onChildElementMovedOut:
|
|
542
|
-
addNewChildComponentSchema:
|
|
540
|
+
onAcceptNewChildElement: D,
|
|
541
|
+
onChildElementMovedOut: j,
|
|
542
|
+
addNewChildComponentSchema: w,
|
|
543
543
|
updateDragAndDropRules: o,
|
|
544
544
|
triggerBelongedComponentToMoveWhenMoved: !!n && n.triggerBelongedComponentToMoveWhenMoved || f(!1),
|
|
545
545
|
triggerBelongedComponentToDeleteWhenDeleted: !!n && n.triggerBelongedComponentToDeleteWhenDeleted || f(!1)
|
|
546
546
|
}, s;
|
|
547
547
|
}
|
|
548
|
-
function
|
|
548
|
+
function Fn() {
|
|
549
549
|
function e(t) {
|
|
550
|
-
var r,
|
|
550
|
+
var r, l;
|
|
551
551
|
if (!t)
|
|
552
552
|
return !1;
|
|
553
553
|
const n = ((r = t.targetContainer) == null ? void 0 : r.componentInstance) && t.targetContainer.componentInstance.value;
|
|
554
554
|
if (!n)
|
|
555
555
|
return !1;
|
|
556
|
-
const o = (
|
|
556
|
+
const o = (l = n.schema.appearance) == null ? void 0 : l.class;
|
|
557
557
|
if (t.controlCategory === "input" || t.controlType === "form-group") {
|
|
558
|
-
const s = n.schema.type,
|
|
559
|
-
if (n.schema.type !== "response-layout-item" && !
|
|
558
|
+
const s = n.schema.type, d = (s === "response-form" || s === "content-container") && o && o.includes("farris-form");
|
|
559
|
+
if (n.schema.type !== "response-layout-item" && !d)
|
|
560
560
|
return !1;
|
|
561
561
|
}
|
|
562
562
|
return t.controlType !== "field-set";
|
|
@@ -565,7 +565,7 @@ function bn() {
|
|
|
565
565
|
basalDragulaRuleForContainer: e
|
|
566
566
|
};
|
|
567
567
|
}
|
|
568
|
-
const
|
|
568
|
+
const wn = "https://json-schema.org/draft/2020-12/schema", Bn = "https://farris-design.gitee.io/dragging-rules.schema.json", Sn = "Dragging Rules", Pn = "The rules of designer canvas", xn = "object", kn = {
|
|
569
569
|
"f-page": {
|
|
570
570
|
description: "The root class of page designed by farris.",
|
|
571
571
|
type: "object",
|
|
@@ -1129,39 +1129,39 @@ const hn = "https://json-schema.org/draft/2020-12/schema", vn = "https://farris-
|
|
|
1129
1129
|
description: "",
|
|
1130
1130
|
type: "object"
|
|
1131
1131
|
}
|
|
1132
|
-
},
|
|
1133
|
-
$schema:
|
|
1134
|
-
$id:
|
|
1135
|
-
title:
|
|
1136
|
-
description:
|
|
1137
|
-
type:
|
|
1138
|
-
properties:
|
|
1139
|
-
required:
|
|
1140
|
-
},
|
|
1141
|
-
function
|
|
1142
|
-
function e(i,
|
|
1143
|
-
var
|
|
1132
|
+
}, Mn = [], jn = {
|
|
1133
|
+
$schema: wn,
|
|
1134
|
+
$id: Bn,
|
|
1135
|
+
title: Sn,
|
|
1136
|
+
description: Pn,
|
|
1137
|
+
type: xn,
|
|
1138
|
+
properties: kn,
|
|
1139
|
+
required: Mn
|
|
1140
|
+
}, J = /* @__PURE__ */ new Map();
|
|
1141
|
+
function An() {
|
|
1142
|
+
function e(i, p, g, w) {
|
|
1143
|
+
var D;
|
|
1144
1144
|
if (typeof g == "number")
|
|
1145
|
-
return ((
|
|
1145
|
+
return ((D = w[i]) == null ? void 0 : D.length) === g;
|
|
1146
1146
|
if (typeof g == "object") {
|
|
1147
|
-
const
|
|
1148
|
-
if (
|
|
1149
|
-
return Number(
|
|
1150
|
-
if (
|
|
1151
|
-
return Number(
|
|
1152
|
-
if (
|
|
1153
|
-
return Number(
|
|
1147
|
+
const j = Object.keys(g)[0], M = g[j];
|
|
1148
|
+
if (j === "not")
|
|
1149
|
+
return Number(w[i].length) !== Number(M);
|
|
1150
|
+
if (j === "moreThan")
|
|
1151
|
+
return Number(w[i].length) >= Number(M);
|
|
1152
|
+
if (j === "lessThan")
|
|
1153
|
+
return Number(w[i].length) <= Number(M);
|
|
1154
1154
|
}
|
|
1155
1155
|
return !1;
|
|
1156
1156
|
}
|
|
1157
|
-
function t(i,
|
|
1158
|
-
return typeof g == "boolean" ?
|
|
1157
|
+
function t(i, p, g, w) {
|
|
1158
|
+
return typeof g == "boolean" ? w.childrenClassList.includes(p) === !!g : !1;
|
|
1159
1159
|
}
|
|
1160
|
-
function n(i,
|
|
1161
|
-
return typeof g == "boolean" ?
|
|
1160
|
+
function n(i, p, g, w) {
|
|
1161
|
+
return typeof g == "boolean" ? w.parentClassList.includes(p) === !!g : !1;
|
|
1162
1162
|
}
|
|
1163
|
-
function o(i,
|
|
1164
|
-
return typeof g == "boolean" ?
|
|
1163
|
+
function o(i, p, g, w) {
|
|
1164
|
+
return typeof g == "boolean" ? w.parentClassList.includes(p) === !!g : !1;
|
|
1165
1165
|
}
|
|
1166
1166
|
const r = /* @__PURE__ */ new Map([
|
|
1167
1167
|
["length", e],
|
|
@@ -1169,195 +1169,238 @@ function Pn() {
|
|
|
1169
1169
|
["hasSibling", o],
|
|
1170
1170
|
["hasParent", n]
|
|
1171
1171
|
]);
|
|
1172
|
-
function
|
|
1172
|
+
function l(i, p) {
|
|
1173
1173
|
const g = i;
|
|
1174
|
-
return typeof
|
|
1175
|
-
if (
|
|
1176
|
-
return { target: g, operator: "length", param: null, value:
|
|
1177
|
-
const
|
|
1178
|
-
return { target: g, operator: i === "children" ? "hasChildren" : i === "parent" ? "hasParent" : "hasSibling", param:
|
|
1174
|
+
return typeof p == "number" ? [{ target: g, operator: "length", param: null, value: Number(p) }] : typeof p == "object" ? Object.keys(p).map((w) => {
|
|
1175
|
+
if (w === "length")
|
|
1176
|
+
return { target: g, operator: "length", param: null, value: p[w] };
|
|
1177
|
+
const D = w, j = p[w];
|
|
1178
|
+
return { target: g, operator: i === "children" ? "hasChildren" : i === "parent" ? "hasParent" : "hasSibling", param: D, value: j };
|
|
1179
1179
|
}) : [];
|
|
1180
1180
|
}
|
|
1181
|
-
function s(i,
|
|
1181
|
+
function s(i, p) {
|
|
1182
1182
|
if (r.has(i.operator)) {
|
|
1183
1183
|
const g = r.get(i.operator);
|
|
1184
|
-
return g && g(i.target, i.param, i.value,
|
|
1184
|
+
return g && g(i.target, i.param, i.value, p) || !1;
|
|
1185
1185
|
}
|
|
1186
1186
|
return !1;
|
|
1187
1187
|
}
|
|
1188
|
-
function
|
|
1189
|
-
return Object.keys(i).reduce((
|
|
1190
|
-
const
|
|
1191
|
-
return
|
|
1192
|
-
}, []).reduce((
|
|
1188
|
+
function d(i, p) {
|
|
1189
|
+
return Object.keys(i).reduce((j, M) => {
|
|
1190
|
+
const L = l(M, i[M]);
|
|
1191
|
+
return j.push(...L), j;
|
|
1192
|
+
}, []).reduce((j, M) => j && s(M, p), !0);
|
|
1193
1193
|
}
|
|
1194
|
-
function m(i,
|
|
1195
|
-
const g = Object.keys(i),
|
|
1196
|
-
return
|
|
1194
|
+
function m(i, p) {
|
|
1195
|
+
const g = Object.keys(i), w = g.includes("allOf"), D = g.includes("anyOf"), j = w || D, S = (j ? i[j ? w ? "allOf" : "anyOf" : "allOf"] : [i]).map((B) => d(B, p));
|
|
1196
|
+
return w ? !S.includes(!1) : S.includes(!0);
|
|
1197
1197
|
}
|
|
1198
|
-
function a(i,
|
|
1198
|
+
function a(i, p) {
|
|
1199
1199
|
const g = i.const;
|
|
1200
|
-
return g ? typeof g == "boolean" ? g : typeof g == "object" ? m(g,
|
|
1200
|
+
return g ? typeof g == "boolean" ? g : typeof g == "object" ? m(g, p) : !1 : !1;
|
|
1201
1201
|
}
|
|
1202
|
-
function
|
|
1203
|
-
return (
|
|
1202
|
+
function u(i) {
|
|
1203
|
+
return (p) => {
|
|
1204
1204
|
const g = { canAccept: !0, fixed: !1, hidePadding: !1 };
|
|
1205
|
-
return i && i.properties && Object.keys(i.properties).reduce((
|
|
1206
|
-
const
|
|
1207
|
-
return
|
|
1205
|
+
return i && i.properties && Object.keys(i.properties).reduce((w, D) => {
|
|
1206
|
+
const j = i.properties[D];
|
|
1207
|
+
return w[D] = a(j, p), w;
|
|
1208
1208
|
}, g), g;
|
|
1209
1209
|
};
|
|
1210
1210
|
}
|
|
1211
|
-
function
|
|
1212
|
-
if (
|
|
1213
|
-
const { rules:
|
|
1214
|
-
g.set(i,
|
|
1215
|
-
(
|
|
1211
|
+
function c(i, p, g) {
|
|
1212
|
+
if (p.type === "object" && p.properties) {
|
|
1213
|
+
const { rules: w, contents: D } = p.properties;
|
|
1214
|
+
g.set(i, u(w)), D && Object.keys(D.properties).forEach(
|
|
1215
|
+
(j) => c(j, D.properties[j], g)
|
|
1216
1216
|
);
|
|
1217
1217
|
}
|
|
1218
1218
|
}
|
|
1219
1219
|
function y() {
|
|
1220
|
-
const { properties: i } =
|
|
1221
|
-
Object.keys(i).forEach((
|
|
1222
|
-
|
|
1220
|
+
const { properties: i } = jn;
|
|
1221
|
+
Object.keys(i).forEach((p) => {
|
|
1222
|
+
c(p, i[p], J);
|
|
1223
1223
|
});
|
|
1224
1224
|
}
|
|
1225
|
-
function
|
|
1225
|
+
function F(i, p) {
|
|
1226
1226
|
const g = { canAccept: !0, fixed: !1, hidePadding: !0 };
|
|
1227
|
-
return
|
|
1227
|
+
return J.has(i) ? J.get(i)(p) : g;
|
|
1228
1228
|
}
|
|
1229
|
-
return y(), { getRuleValue:
|
|
1229
|
+
return y(), { getRuleValue: F };
|
|
1230
1230
|
}
|
|
1231
|
-
function
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1231
|
+
function Dn(e, t) {
|
|
1232
|
+
var k;
|
|
1233
|
+
const n = e.schema, o = (k = e.parent) == null ? void 0 : k.schema, r = An(), l = f(!1), s = f(!1);
|
|
1234
|
+
let d = !0, m = !1, a, u = !1;
|
|
1235
|
+
function c(B) {
|
|
1236
|
+
return a && a.componentClassList && a.componentClassList.includes("f-form-layout") && a.componentClassList.includes("farris-form") ? B.sourceType === "control" && B.controlCategory === "input" || B.sourceType === "move" && B.controlType === "form-group" : !0;
|
|
1236
1237
|
}
|
|
1237
|
-
function
|
|
1238
|
-
return !(!
|
|
1238
|
+
function y(B) {
|
|
1239
|
+
return !(!Fn().basalDragulaRuleForContainer(B) || !d || !c(B));
|
|
1239
1240
|
}
|
|
1240
|
-
function
|
|
1241
|
-
|
|
1242
|
-
const
|
|
1243
|
-
const
|
|
1244
|
-
return
|
|
1245
|
-
}, []) : [],
|
|
1246
|
-
|
|
1247
|
-
componentClass:
|
|
1248
|
-
componentClassList:
|
|
1249
|
-
childContents:
|
|
1250
|
-
firstChildContent:
|
|
1251
|
-
firstChildClass:
|
|
1241
|
+
function F() {
|
|
1242
|
+
l.value = !1, s.value = !1;
|
|
1243
|
+
const B = n, E = B.appearance && B.appearance.class || "", N = E.split(" "), O = B.contents || [], R = O.length ? O[0] : null, x = R && R.appearance ? R.appearance.class : "", V = x ? x.split(" ") : [], q = O.length ? O.reduce((ie, Y) => {
|
|
1244
|
+
const se = Y && Y.appearance ? Y.appearance.class : "", je = se ? se.split(" ") : [];
|
|
1245
|
+
return ie.push(...je), ie;
|
|
1246
|
+
}, []) : [], H = o, X = H && H.appearance && H.appearance.class || "", Pe = X ? X.split(" ") : [];
|
|
1247
|
+
a = {
|
|
1248
|
+
componentClass: E,
|
|
1249
|
+
componentClassList: N,
|
|
1250
|
+
childContents: O,
|
|
1251
|
+
firstChildContent: R,
|
|
1252
|
+
firstChildClass: x,
|
|
1252
1253
|
firstChildClassList: V,
|
|
1253
|
-
parent:
|
|
1254
|
-
parentClass:
|
|
1255
|
-
parentClassList:
|
|
1256
|
-
children:
|
|
1257
|
-
childrenClassList:
|
|
1254
|
+
parent: H,
|
|
1255
|
+
parentClass: X,
|
|
1256
|
+
parentClassList: Pe,
|
|
1257
|
+
children: O,
|
|
1258
|
+
childrenClassList: q
|
|
1258
1259
|
};
|
|
1259
|
-
const { canAccept:
|
|
1260
|
-
return
|
|
1260
|
+
const { canAccept: xe, fixed: ke, hidePadding: Me } = r.getRuleValue(N[0], a);
|
|
1261
|
+
return d = xe, m = Me, u = ke, !0;
|
|
1262
|
+
}
|
|
1263
|
+
function i(B) {
|
|
1264
|
+
te();
|
|
1261
1265
|
}
|
|
1262
|
-
function
|
|
1263
|
-
|
|
1266
|
+
function p() {
|
|
1267
|
+
return n.componentType ? "display:inherit;flex-direction:inherit;margin-bottom:10px" : "";
|
|
1264
1268
|
}
|
|
1265
|
-
function B
|
|
1266
|
-
|
|
1269
|
+
function g(B, E) {
|
|
1270
|
+
const N = n;
|
|
1271
|
+
if ((N.appearance && N.appearance.class || "").split(" ").includes("f-form-layout")) {
|
|
1272
|
+
const { label: x } = B, V = z("form-group");
|
|
1273
|
+
return V.editor = E, V.label = x, w(V), delete V.editor.id, delete V.editor.binding, delete V.editor.appearance, delete V.editor.visible, V;
|
|
1274
|
+
}
|
|
1275
|
+
return E;
|
|
1267
1276
|
}
|
|
1268
|
-
function
|
|
1269
|
-
const E = e;
|
|
1270
|
-
if (
|
|
1271
|
-
const
|
|
1272
|
-
|
|
1277
|
+
function w(B) {
|
|
1278
|
+
const E = e.componentInstance.value.getBelongedComponentInstance(e.componentInstance);
|
|
1279
|
+
if (E && E.schema && E.schema.componentType) {
|
|
1280
|
+
const N = E.schema.componentType, O = D(N);
|
|
1281
|
+
B.appearance || (B.appearance = {}), B.appearance.class = O;
|
|
1273
1282
|
}
|
|
1274
|
-
return x;
|
|
1275
1283
|
}
|
|
1276
|
-
function
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1284
|
+
function D(B) {
|
|
1285
|
+
let E = "";
|
|
1286
|
+
switch (B) {
|
|
1287
|
+
case "form-col-1": {
|
|
1288
|
+
E = "col-12 col-md-12 col-xl-12 col-el-12";
|
|
1289
|
+
break;
|
|
1290
|
+
}
|
|
1291
|
+
case "form-col-12": {
|
|
1292
|
+
E = "col-12 col-md-12 col-xl-12 col-el-12";
|
|
1293
|
+
break;
|
|
1294
|
+
}
|
|
1295
|
+
case "form-col-2": {
|
|
1296
|
+
E = "col-12 col-md-6 col-xl-6 col-el-6";
|
|
1297
|
+
break;
|
|
1298
|
+
}
|
|
1299
|
+
case "form-col-3": {
|
|
1300
|
+
E = "col-12 col-md-6 col-xl-4 col-el-4";
|
|
1301
|
+
break;
|
|
1302
|
+
}
|
|
1303
|
+
case "form-col-4": {
|
|
1304
|
+
E = "col-12 col-md-6 col-xl-3 col-el-2";
|
|
1305
|
+
break;
|
|
1306
|
+
}
|
|
1307
|
+
case "form-col-6": {
|
|
1308
|
+
E = "col-12 col-md-6 col-xl-6 col-el-6";
|
|
1309
|
+
break;
|
|
1310
|
+
}
|
|
1311
|
+
case "frame": {
|
|
1312
|
+
E = "col-12";
|
|
1313
|
+
break;
|
|
1314
|
+
}
|
|
1281
1315
|
}
|
|
1282
1316
|
return E;
|
|
1283
1317
|
}
|
|
1284
|
-
function
|
|
1285
|
-
|
|
1318
|
+
function j(B, E, N) {
|
|
1319
|
+
const O = n;
|
|
1320
|
+
if ((O.appearance && O.appearance.class || "").split(" ").includes("f-form-layout")) {
|
|
1321
|
+
const V = String(B.innerText), q = z("form-group");
|
|
1322
|
+
return q.editor = N, q.label = V, q;
|
|
1323
|
+
}
|
|
1324
|
+
return N;
|
|
1286
1325
|
}
|
|
1287
|
-
function
|
|
1288
|
-
return !
|
|
1326
|
+
function M() {
|
|
1327
|
+
return !u;
|
|
1289
1328
|
}
|
|
1290
|
-
function
|
|
1291
|
-
return
|
|
1329
|
+
function L() {
|
|
1330
|
+
return !u;
|
|
1331
|
+
}
|
|
1332
|
+
function S() {
|
|
1333
|
+
return m;
|
|
1292
1334
|
}
|
|
1293
1335
|
return {
|
|
1294
|
-
canAccepts:
|
|
1295
|
-
checkCanDeleteComponent:
|
|
1296
|
-
checkCanMoveComponent:
|
|
1297
|
-
getStyles:
|
|
1298
|
-
hideNestedPaddingInDesginerView:
|
|
1299
|
-
onAcceptNewChildElement:
|
|
1300
|
-
onAcceptMovedChildElement:
|
|
1301
|
-
resolveComponentContext:
|
|
1302
|
-
onResolveNewComponentSchema:
|
|
1303
|
-
triggerBelongedComponentToMoveWhenMoved:
|
|
1304
|
-
triggerBelongedComponentToDeleteWhenDeleted:
|
|
1336
|
+
canAccepts: y,
|
|
1337
|
+
checkCanDeleteComponent: L,
|
|
1338
|
+
checkCanMoveComponent: M,
|
|
1339
|
+
getStyles: p,
|
|
1340
|
+
hideNestedPaddingInDesginerView: S,
|
|
1341
|
+
onAcceptNewChildElement: j,
|
|
1342
|
+
onAcceptMovedChildElement: i,
|
|
1343
|
+
resolveComponentContext: F,
|
|
1344
|
+
onResolveNewComponentSchema: g,
|
|
1345
|
+
triggerBelongedComponentToMoveWhenMoved: l,
|
|
1346
|
+
triggerBelongedComponentToDeleteWhenDeleted: s
|
|
1305
1347
|
};
|
|
1306
1348
|
}
|
|
1307
|
-
const
|
|
1349
|
+
const En = /* @__PURE__ */ G({
|
|
1308
1350
|
name: "FResponseFormDesign",
|
|
1309
|
-
props:
|
|
1351
|
+
props: Q,
|
|
1310
1352
|
emits: [],
|
|
1311
1353
|
setup(e, t) {
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1354
|
+
const n = f(), o = W("design-item-context");
|
|
1355
|
+
W("designer-host-service");
|
|
1356
|
+
const r = Dn(o), l = re(n, o, r);
|
|
1357
|
+
U(() => {
|
|
1358
|
+
n.value.componentInstance = l;
|
|
1359
|
+
}), t.expose(l.value);
|
|
1317
1360
|
const s = P(() => {
|
|
1318
|
-
const
|
|
1361
|
+
const d = e.customClass.split(" "), m = {
|
|
1319
1362
|
"drag-container": !0
|
|
1320
1363
|
};
|
|
1321
|
-
return
|
|
1364
|
+
return d.reduce((a, u) => (a[u] = !0, a), m), m;
|
|
1322
1365
|
});
|
|
1323
|
-
return () =>
|
|
1366
|
+
return () => A("div", {
|
|
1324
1367
|
ref: n,
|
|
1325
1368
|
class: s.value,
|
|
1326
1369
|
"data-dragref": `${o.schema.id}-container`,
|
|
1327
1370
|
"data-associate": `${o.schema.id}-component`
|
|
1328
1371
|
}, [t.slots.default && t.slots.default()]);
|
|
1329
1372
|
}
|
|
1330
|
-
}),
|
|
1373
|
+
}), Vn = {
|
|
1331
1374
|
id: { type: String },
|
|
1332
1375
|
required: { type: Boolean, default: !1 },
|
|
1333
1376
|
text: { type: String, default: "" },
|
|
1334
1377
|
title: { type: String }
|
|
1335
|
-
},
|
|
1378
|
+
}, he = /* @__PURE__ */ G({
|
|
1336
1379
|
name: "FDynamicFormLabel",
|
|
1337
|
-
props:
|
|
1380
|
+
props: Vn,
|
|
1338
1381
|
emits: [],
|
|
1339
1382
|
setup(e, t) {
|
|
1340
1383
|
const n = f(e.title || e.text), o = f(e.required), r = f(e.text);
|
|
1341
|
-
return
|
|
1384
|
+
return I(() => e.text, () => {
|
|
1342
1385
|
r.value = e.text;
|
|
1343
|
-
}),
|
|
1344
|
-
|
|
1345
|
-
}), () =>
|
|
1386
|
+
}), I(() => e.required, (l, s) => {
|
|
1387
|
+
l !== s && (o.value = l);
|
|
1388
|
+
}), () => A("label", {
|
|
1346
1389
|
class: "col-form-label",
|
|
1347
1390
|
title: n.value
|
|
1348
|
-
}, [o.value &&
|
|
1391
|
+
}, [o.value && A("span", {
|
|
1349
1392
|
class: "farris-label-info text-danger"
|
|
1350
|
-
}, [
|
|
1393
|
+
}, [Ee("*")]), A("span", {
|
|
1351
1394
|
class: "farris-label-text"
|
|
1352
1395
|
}, [r.value])]);
|
|
1353
1396
|
}
|
|
1354
|
-
}),
|
|
1355
|
-
["appearance",
|
|
1397
|
+
}), On = /* @__PURE__ */ new Map([
|
|
1398
|
+
["appearance", ye]
|
|
1356
1399
|
]);
|
|
1357
|
-
function
|
|
1400
|
+
function Ln(e, t, n) {
|
|
1358
1401
|
return t;
|
|
1359
1402
|
}
|
|
1360
|
-
const
|
|
1403
|
+
const Nn = "https://json-schema.org/draft/2020-12/schema", In = "https://farris-design.gitee.io/input-group.schema.json", $n = "input-group", Rn = "A Farris Input Component", Gn = "object", qn = {
|
|
1361
1404
|
id: {
|
|
1362
1405
|
description: "The unique identifier for a Input Group",
|
|
1363
1406
|
type: "string"
|
|
@@ -1559,18 +1602,18 @@ const Dn = "https://json-schema.org/draft/2020-12/schema", En = "https://farris-
|
|
|
1559
1602
|
type: "string",
|
|
1560
1603
|
default: ""
|
|
1561
1604
|
}
|
|
1562
|
-
},
|
|
1605
|
+
}, Un = [
|
|
1563
1606
|
"id",
|
|
1564
1607
|
"type"
|
|
1565
|
-
],
|
|
1566
|
-
$schema:
|
|
1567
|
-
$id:
|
|
1568
|
-
title:
|
|
1569
|
-
description:
|
|
1570
|
-
type:
|
|
1571
|
-
properties:
|
|
1572
|
-
required:
|
|
1573
|
-
},
|
|
1608
|
+
], Hn = {
|
|
1609
|
+
$schema: Nn,
|
|
1610
|
+
$id: In,
|
|
1611
|
+
title: $n,
|
|
1612
|
+
description: Rn,
|
|
1613
|
+
type: Gn,
|
|
1614
|
+
properties: qn,
|
|
1615
|
+
required: Un
|
|
1616
|
+
}, ae = {
|
|
1574
1617
|
/** 是否自动完成 */
|
|
1575
1618
|
autocomplete: { Type: String, default: "off" },
|
|
1576
1619
|
/** 自定义CLASS */
|
|
@@ -1637,94 +1680,94 @@ const Dn = "https://json-schema.org/draft/2020-12/schema", En = "https://farris-
|
|
|
1637
1680
|
*/
|
|
1638
1681
|
updateOn: { type: String, default: "blur" }
|
|
1639
1682
|
};
|
|
1640
|
-
|
|
1641
|
-
function
|
|
1642
|
-
const r = f(e.disabled),
|
|
1683
|
+
Z(ae, Hn, On, Ln);
|
|
1684
|
+
function Wn(e, t, n, o) {
|
|
1685
|
+
const r = f(e.disabled), l = f(!1), s = f("text"), d = f(e.showBorder), m = f(e.textAlign), a = f(e.updateOn), u = P(() => e.editable || !e.readonly), c = P(() => e.editable && !e.disabled && !e.readonly), y = P(() => !e.disabled && l.value), F = P(() => n.value === "" || n.value === null || n.value === void 0), i = P(() => (e.disabled || e.readonly) && !e.forcePlaceholder ? "" : e.placeholder), p = P(() => e.readonly || !e.editable), g = P(() => e.enableTitle ? n.value : ""), w = P(() => ({
|
|
1643
1686
|
"form-control": !0,
|
|
1644
1687
|
"f-utils-fill": !0,
|
|
1645
1688
|
"text-left": m.value === "left",
|
|
1646
1689
|
"text-center": m.value === "center",
|
|
1647
1690
|
"text-right": m.value === "right"
|
|
1648
|
-
})),
|
|
1649
|
-
const
|
|
1691
|
+
})), D = P(() => {
|
|
1692
|
+
const x = {
|
|
1650
1693
|
"f-cmp-inputgroup": !0,
|
|
1651
1694
|
"input-group": !0,
|
|
1652
1695
|
"f-state-disable": r.value,
|
|
1653
|
-
"f-state-editable":
|
|
1654
|
-
"f-state-readonly":
|
|
1696
|
+
"f-state-editable": c.value,
|
|
1697
|
+
"f-state-readonly": p.value,
|
|
1655
1698
|
"f-state-focus": y.value
|
|
1656
1699
|
};
|
|
1657
|
-
return (e.customClass || "").split(" ").reduce((
|
|
1658
|
-
}),
|
|
1659
|
-
function x
|
|
1660
|
-
n.value =
|
|
1700
|
+
return (e.customClass || "").split(" ").reduce((q, H) => (q[H] = !0, q), x), x;
|
|
1701
|
+
}), j = P(() => d.value ? "" : "border-width : 0 ");
|
|
1702
|
+
function M(x, V = !0) {
|
|
1703
|
+
n.value = x, o.value !== x && (o.value = x), V && t.emit("change", x), t.emit("update:modelValue", x), t.emit("update:value", x);
|
|
1661
1704
|
}
|
|
1662
|
-
|
|
1705
|
+
I(
|
|
1663
1706
|
() => e.modelValue,
|
|
1664
|
-
(
|
|
1665
|
-
|
|
1707
|
+
(x, V) => {
|
|
1708
|
+
x !== V && (n.value = x, o.value = x);
|
|
1666
1709
|
}
|
|
1667
|
-
),
|
|
1668
|
-
|
|
1710
|
+
), I(() => e.disabled, (x, V) => {
|
|
1711
|
+
x !== V && (r.value = x);
|
|
1669
1712
|
});
|
|
1670
|
-
function
|
|
1671
|
-
return
|
|
1713
|
+
function L(x) {
|
|
1714
|
+
return l.value = !1, t.emit("blur", x), x.stopPropagation(), !1;
|
|
1672
1715
|
}
|
|
1673
|
-
function
|
|
1674
|
-
t.emit("click",
|
|
1716
|
+
function S(x) {
|
|
1717
|
+
t.emit("click", x);
|
|
1675
1718
|
}
|
|
1676
|
-
function
|
|
1677
|
-
e.disabled || (
|
|
1719
|
+
function k(x) {
|
|
1720
|
+
e.disabled || (d.value && (l.value = !0), u.value && t.emit("focus", x));
|
|
1678
1721
|
}
|
|
1679
|
-
function
|
|
1680
|
-
t.emit("input",
|
|
1681
|
-
const
|
|
1682
|
-
o.value =
|
|
1722
|
+
function B(x) {
|
|
1723
|
+
t.emit("input", x.target.value);
|
|
1724
|
+
const V = x.target.value;
|
|
1725
|
+
o.value = V, a.value === "input" && (t.emit("update:modelValue", V), t.emit("update:value", V));
|
|
1683
1726
|
}
|
|
1684
|
-
function
|
|
1685
|
-
t.emit("keydown",
|
|
1727
|
+
function E(x) {
|
|
1728
|
+
t.emit("keydown", x);
|
|
1686
1729
|
}
|
|
1687
|
-
function
|
|
1688
|
-
t.emit("keyup",
|
|
1730
|
+
function N(x) {
|
|
1731
|
+
t.emit("keyup", x);
|
|
1689
1732
|
}
|
|
1690
|
-
function O(
|
|
1691
|
-
|
|
1733
|
+
function O(x) {
|
|
1734
|
+
x.target.tagName !== "INPUT" && x.preventDefault(), x.stopPropagation();
|
|
1692
1735
|
}
|
|
1693
|
-
function R(
|
|
1736
|
+
function R(x) {
|
|
1694
1737
|
if (a.value === "blur") {
|
|
1695
|
-
const
|
|
1696
|
-
|
|
1738
|
+
const V = x.target.value;
|
|
1739
|
+
x.stopPropagation(), M(V);
|
|
1697
1740
|
}
|
|
1698
1741
|
}
|
|
1699
1742
|
return {
|
|
1700
|
-
changeTextBoxValue:
|
|
1743
|
+
changeTextBoxValue: M,
|
|
1701
1744
|
disabled: r,
|
|
1702
1745
|
displayText: o,
|
|
1703
|
-
editable:
|
|
1746
|
+
editable: c,
|
|
1704
1747
|
hasFocused: y,
|
|
1705
|
-
inputGroupClass:
|
|
1748
|
+
inputGroupClass: D,
|
|
1706
1749
|
inputType: s,
|
|
1707
|
-
isEmpty:
|
|
1750
|
+
isEmpty: F,
|
|
1708
1751
|
modelValue: n,
|
|
1709
|
-
readonly:
|
|
1710
|
-
onBlur:
|
|
1711
|
-
onClick:
|
|
1712
|
-
onFocus:
|
|
1713
|
-
onInput:
|
|
1714
|
-
onKeydown:
|
|
1715
|
-
onKeyup:
|
|
1752
|
+
readonly: p,
|
|
1753
|
+
onBlur: L,
|
|
1754
|
+
onClick: S,
|
|
1755
|
+
onFocus: k,
|
|
1756
|
+
onInput: B,
|
|
1757
|
+
onKeydown: E,
|
|
1758
|
+
onKeyup: N,
|
|
1716
1759
|
onMousedown: O,
|
|
1717
1760
|
onTextBoxValueChange: R,
|
|
1718
1761
|
placeholder: i,
|
|
1719
|
-
textBoxClass:
|
|
1762
|
+
textBoxClass: w,
|
|
1720
1763
|
textBoxTitle: g,
|
|
1721
|
-
inputGroupStyle:
|
|
1764
|
+
inputGroupStyle: j
|
|
1722
1765
|
};
|
|
1723
1766
|
}
|
|
1724
|
-
function
|
|
1725
|
-
const r = f(e.disabled),
|
|
1767
|
+
function zn(e, t, n, o) {
|
|
1768
|
+
const r = f(e.disabled), l = f(!1), s = f("text"), d = f(e.showBorder), m = f(e.textAlign);
|
|
1726
1769
|
P(() => e.editable || !e.readonly);
|
|
1727
|
-
const a = P(() => e.editable && !e.disabled && !e.readonly),
|
|
1770
|
+
const a = P(() => e.editable && !e.disabled && !e.readonly), u = P(() => !e.disabled && l.value), c = P(() => n.value === "" || n.value === null || n.value === void 0), y = P(() => e.placeholder), F = P(() => e.readonly || !e.editable), i = P(() => e.enableTitle ? n.value : ""), p = P(() => ({
|
|
1728
1771
|
"form-control": !0,
|
|
1729
1772
|
// 'f-utils-fill': true,
|
|
1730
1773
|
"text-left": m.value === "left",
|
|
@@ -1737,18 +1780,18 @@ function Gn(e, t, n, o) {
|
|
|
1737
1780
|
"f-state-editable": !1,
|
|
1738
1781
|
"f-state-readonly": !0
|
|
1739
1782
|
// 'f-state-focus': hasFocused.value
|
|
1740
|
-
})),
|
|
1783
|
+
})), w = P(() => d.value ? "" : "border-width : 0 ");
|
|
1741
1784
|
return {
|
|
1742
1785
|
// changeTextBoxValue,
|
|
1743
1786
|
disabled: r,
|
|
1744
1787
|
displayText: o,
|
|
1745
1788
|
editable: a,
|
|
1746
|
-
hasFocused:
|
|
1789
|
+
hasFocused: u,
|
|
1747
1790
|
inputGroupClass: g,
|
|
1748
1791
|
inputType: s,
|
|
1749
|
-
isEmpty:
|
|
1792
|
+
isEmpty: c,
|
|
1750
1793
|
modelValue: n,
|
|
1751
|
-
readonly:
|
|
1794
|
+
readonly: F,
|
|
1752
1795
|
// onBlur,
|
|
1753
1796
|
// onClick,
|
|
1754
1797
|
// onFocus,
|
|
@@ -1758,39 +1801,39 @@ function Gn(e, t, n, o) {
|
|
|
1758
1801
|
// onMousedown,
|
|
1759
1802
|
// onTextBoxValueChange,
|
|
1760
1803
|
placeholder: y,
|
|
1761
|
-
textBoxClass:
|
|
1804
|
+
textBoxClass: p,
|
|
1762
1805
|
textBoxTitle: i,
|
|
1763
|
-
inputGroupStyle:
|
|
1806
|
+
inputGroupStyle: w
|
|
1764
1807
|
};
|
|
1765
1808
|
}
|
|
1766
|
-
function
|
|
1767
|
-
const o = f(!1), r = P(() => e.enableClear && !e.readonly && !e.disabled), { changeTextBoxValue:
|
|
1768
|
-
function a(
|
|
1769
|
-
o.value =
|
|
1809
|
+
function ve(e, t, n) {
|
|
1810
|
+
const o = f(!1), r = P(() => e.enableClear && !e.readonly && !e.disabled), { changeTextBoxValue: l, displayText: s, hasFocused: d, isEmpty: m } = n;
|
|
1811
|
+
function a(p) {
|
|
1812
|
+
o.value = p;
|
|
1770
1813
|
}
|
|
1771
|
-
|
|
1772
|
-
|
|
1814
|
+
I(s, () => {
|
|
1815
|
+
d != null && d.value ? a(!!(s != null && s.value)) : a(!1);
|
|
1773
1816
|
});
|
|
1774
|
-
const
|
|
1817
|
+
const u = P(() => ({
|
|
1775
1818
|
"input-group-text": !0,
|
|
1776
1819
|
"input-group-clear": !0
|
|
1777
|
-
})),
|
|
1820
|
+
})), c = P(() => ({
|
|
1778
1821
|
width: "24px",
|
|
1779
1822
|
display: o.value ? "flex" : "none"
|
|
1780
1823
|
}));
|
|
1781
|
-
function y(
|
|
1782
|
-
|
|
1824
|
+
function y(p) {
|
|
1825
|
+
p.stopPropagation(), r.value && (l("", !0), a(!o.value), t.emit("clear"));
|
|
1783
1826
|
}
|
|
1784
|
-
function
|
|
1827
|
+
function F(p) {
|
|
1785
1828
|
r.value && !m.value && a(!0);
|
|
1786
1829
|
}
|
|
1787
|
-
function i(
|
|
1830
|
+
function i(p) {
|
|
1788
1831
|
r.value && a(!1);
|
|
1789
1832
|
}
|
|
1790
|
-
return { clearButtonClass:
|
|
1833
|
+
return { clearButtonClass: u, clearButtonStyle: c, hasShownClearButton: o, onClearValue: y, onMouseEnter: F, onMouseLeave: i, shouldShowClearButton: r };
|
|
1791
1834
|
}
|
|
1792
|
-
const
|
|
1793
|
-
function
|
|
1835
|
+
const Qn = ["moz", "ms", "webkit"];
|
|
1836
|
+
function _n() {
|
|
1794
1837
|
let e = 0;
|
|
1795
1838
|
return (t) => {
|
|
1796
1839
|
const n = (/* @__PURE__ */ new Date()).getTime(), o = Math.max(0, 16 - (n - e)), r = setTimeout(() => {
|
|
@@ -1799,63 +1842,63 @@ function Un() {
|
|
|
1799
1842
|
return e = n + o, r;
|
|
1800
1843
|
};
|
|
1801
1844
|
}
|
|
1802
|
-
function
|
|
1845
|
+
function Zn() {
|
|
1803
1846
|
if (typeof window > "u")
|
|
1804
1847
|
return () => 0;
|
|
1805
1848
|
if (window.requestAnimationFrame)
|
|
1806
1849
|
return window.requestAnimationFrame.bind(window);
|
|
1807
|
-
const e =
|
|
1808
|
-
return e ? window[`${e}RequestAnimationFrame`] :
|
|
1850
|
+
const e = Qn.filter((t) => `${t}RequestAnimationFrame` in window)[0];
|
|
1851
|
+
return e ? window[`${e}RequestAnimationFrame`] : _n();
|
|
1809
1852
|
}
|
|
1810
|
-
|
|
1811
|
-
function
|
|
1853
|
+
Zn();
|
|
1854
|
+
function Ce(e, t) {
|
|
1812
1855
|
const n = f(e.groupText), o = P(() => e.showButtonWhenDisabled && (e.readonly || e.disabled)), r = P(() => e.enableClear || !!e.groupText);
|
|
1813
1856
|
return { appendedButtonClass: P(() => ({
|
|
1814
1857
|
"input-group-append": !0,
|
|
1815
1858
|
"append-force-show": o.value
|
|
1816
1859
|
})), appendedContent: n, shouldShowAppendedButton: r };
|
|
1817
1860
|
}
|
|
1818
|
-
function
|
|
1819
|
-
const { appendedContent: r } = o,
|
|
1820
|
-
|
|
1821
|
-
s.value && (n.value = y ||
|
|
1861
|
+
function Te(e, t, n, o) {
|
|
1862
|
+
const { appendedContent: r } = o, l = f(e.enableViewPassword), s = P(() => e.type === "password"), d = '<span class="f-icon f-icon-eye" style="color: rgb(56, 143, 255);"></span>', m = '<span class="f-icon f-icon-eye"></span>', a = f(!1);
|
|
1863
|
+
I(() => [e.readonly, e.disabled], ([y, F]) => {
|
|
1864
|
+
s.value && (n.value = y || F ? "password" : n.value, r.value = y || F ? m : r.value);
|
|
1822
1865
|
});
|
|
1823
|
-
function
|
|
1824
|
-
return a.value = !a.value, n.value = a.value ? "text" : "password", r.value = a.value ?
|
|
1866
|
+
function u() {
|
|
1867
|
+
return a.value = !a.value, n.value = a.value ? "text" : "password", r.value = a.value ? d : m, !1;
|
|
1825
1868
|
}
|
|
1826
|
-
function
|
|
1827
|
-
n.value = s.value ? "password" : "text", r.value = s.value ?
|
|
1869
|
+
function c() {
|
|
1870
|
+
n.value = s.value ? "password" : "text", r.value = s.value ? l.value ? m : "" : r.value;
|
|
1828
1871
|
}
|
|
1829
|
-
return
|
|
1872
|
+
return c(), { isPassword: s, onClickAppendedButton: u };
|
|
1830
1873
|
}
|
|
1831
|
-
function
|
|
1874
|
+
function Xn(e, t, n) {
|
|
1832
1875
|
const o = f(), {
|
|
1833
1876
|
onBlurTextBox: r,
|
|
1834
|
-
onFocusTextBox:
|
|
1877
|
+
onFocusTextBox: l,
|
|
1835
1878
|
onInput: s,
|
|
1836
|
-
onKeyDown:
|
|
1879
|
+
onKeyDown: d,
|
|
1837
1880
|
textBoxValue: m
|
|
1838
|
-
} = n, a = P(() => e.disabled || e.readonly || !e.editable ? "" : e.placeholder),
|
|
1881
|
+
} = n, a = P(() => e.disabled || e.readonly || !e.editable ? "" : e.placeholder), u = P(() => ({
|
|
1839
1882
|
"form-control": !0,
|
|
1840
1883
|
"f-utils-fill": !0
|
|
1841
|
-
})),
|
|
1884
|
+
})), c = P(() => ({
|
|
1842
1885
|
"text-align": e.textAlign
|
|
1843
1886
|
}));
|
|
1844
|
-
function y(
|
|
1845
|
-
|
|
1887
|
+
function y(p) {
|
|
1888
|
+
p.stopPropagation();
|
|
1846
1889
|
}
|
|
1847
|
-
function
|
|
1890
|
+
function F() {
|
|
1848
1891
|
e.selectOnCreated, e.focusOnCreated;
|
|
1849
1892
|
}
|
|
1850
|
-
async function i(
|
|
1851
|
-
|
|
1893
|
+
async function i(p) {
|
|
1894
|
+
l(p), await te, F();
|
|
1852
1895
|
}
|
|
1853
|
-
return
|
|
1854
|
-
await
|
|
1855
|
-
}), () =>
|
|
1896
|
+
return U(async () => {
|
|
1897
|
+
await te, F();
|
|
1898
|
+
}), () => A("input", {
|
|
1856
1899
|
ref: o,
|
|
1857
|
-
class:
|
|
1858
|
-
style:
|
|
1900
|
+
class: u.value,
|
|
1901
|
+
style: c.value,
|
|
1859
1902
|
type: "text",
|
|
1860
1903
|
value: m.value,
|
|
1861
1904
|
disabled: e.disabled,
|
|
@@ -1865,16 +1908,16 @@ function Wn(e, t, n) {
|
|
|
1865
1908
|
onChange: y,
|
|
1866
1909
|
onFocus: i,
|
|
1867
1910
|
onInput: s,
|
|
1868
|
-
onKeydown:
|
|
1911
|
+
onKeydown: d
|
|
1869
1912
|
}, null);
|
|
1870
1913
|
}
|
|
1871
|
-
function
|
|
1914
|
+
function Yn(e, t, n) {
|
|
1872
1915
|
const {
|
|
1873
1916
|
canDownward: o,
|
|
1874
1917
|
canUpward: r,
|
|
1875
|
-
onClickDownButton:
|
|
1918
|
+
onClickDownButton: l,
|
|
1876
1919
|
onClickUpButton: s
|
|
1877
|
-
} = n,
|
|
1920
|
+
} = n, d = P(() => ({
|
|
1878
1921
|
"input-group-append": !0,
|
|
1879
1922
|
"btn-group": !0,
|
|
1880
1923
|
"btn-group-number": !0
|
|
@@ -1885,217 +1928,219 @@ function zn(e, t, n) {
|
|
|
1885
1928
|
})), a = P(() => ({
|
|
1886
1929
|
cursor: r() ? "pointer" : "not-allowed",
|
|
1887
1930
|
"margin-left": 0
|
|
1888
|
-
})),
|
|
1931
|
+
})), u = P(() => ({
|
|
1889
1932
|
cursor: o() ? "pointer" : "not-allowed",
|
|
1890
1933
|
"margin-left": 0
|
|
1891
1934
|
}));
|
|
1892
|
-
return () =>
|
|
1893
|
-
class:
|
|
1894
|
-
}, [
|
|
1935
|
+
return () => A("div", {
|
|
1936
|
+
class: d.value
|
|
1937
|
+
}, [A("button", {
|
|
1895
1938
|
title: "upButton",
|
|
1896
1939
|
class: m.value,
|
|
1897
1940
|
style: a.value,
|
|
1898
1941
|
onClick: s,
|
|
1899
1942
|
disabled: !r()
|
|
1900
|
-
}, [
|
|
1943
|
+
}, [A("span", {
|
|
1901
1944
|
class: "f-icon f-icon-arrow-chevron-up number-arrow-chevron"
|
|
1902
|
-
}, null)]),
|
|
1945
|
+
}, null)]), A("button", {
|
|
1903
1946
|
title: "downButton",
|
|
1904
1947
|
class: m.value,
|
|
1905
|
-
style:
|
|
1906
|
-
onClick:
|
|
1948
|
+
style: u.value,
|
|
1949
|
+
onClick: l,
|
|
1907
1950
|
disabled: !o()
|
|
1908
|
-
}, [
|
|
1951
|
+
}, [A("span", {
|
|
1909
1952
|
class: "f-icon f-icon-arrow-chevron-down number-arrow-chevron"
|
|
1910
1953
|
}, null)])]);
|
|
1911
1954
|
}
|
|
1912
|
-
function
|
|
1913
|
-
const n =
|
|
1914
|
-
displayValue:
|
|
1955
|
+
function Kn(e, t) {
|
|
1956
|
+
const n = $e(e, t), o = Re(e, t, n), r = Ge(e, t, o, n), l = qe(e, t, o, n, r), s = Yn(e, t, r), {
|
|
1957
|
+
displayValue: d,
|
|
1915
1958
|
modelValue: m,
|
|
1916
1959
|
getRealValue: a
|
|
1917
|
-
} = n,
|
|
1918
|
-
format:
|
|
1960
|
+
} = n, u = Xn(e, t, l), {
|
|
1961
|
+
format: c
|
|
1919
1962
|
} = o, {
|
|
1920
1963
|
isFocus: y
|
|
1921
|
-
} =
|
|
1922
|
-
return
|
|
1964
|
+
} = l, F = P(() => !e.disabled && !e.readonly);
|
|
1965
|
+
return U(() => {
|
|
1923
1966
|
const i = a(e.modelValue);
|
|
1924
|
-
|
|
1925
|
-
}),
|
|
1926
|
-
const
|
|
1927
|
-
m.value =
|
|
1928
|
-
}),
|
|
1929
|
-
i !== m.value && (m.value = i, !y.value && (
|
|
1930
|
-
}),
|
|
1931
|
-
|
|
1932
|
-
}), () =>
|
|
1967
|
+
d.value = c(i);
|
|
1968
|
+
}), I(() => [e.value], ([i]) => {
|
|
1969
|
+
const p = a(i);
|
|
1970
|
+
m.value = p, d.value = c(p);
|
|
1971
|
+
}), I(() => [e.modelValue], ([i]) => {
|
|
1972
|
+
i !== m.value && (m.value = i, !y.value && (d.value = c(a(i))));
|
|
1973
|
+
}), I(() => [e.precision, e.useThousands, e.prefix, e.suffix, e.showZero], () => {
|
|
1974
|
+
d.value = c(m.value);
|
|
1975
|
+
}), () => A("div", {
|
|
1933
1976
|
class: "input-group f-state-hover flex-row f-cmp-number-spinner"
|
|
1934
|
-
}, [
|
|
1977
|
+
}, [u(), F.value && s()]);
|
|
1935
1978
|
}
|
|
1936
|
-
function
|
|
1937
|
-
const r = f(),
|
|
1938
|
-
isPassword:
|
|
1939
|
-
} = n, m = f(e.minLength), a = f(e.maxLength),
|
|
1940
|
-
disabled:
|
|
1979
|
+
function Jn(e, t, n, o) {
|
|
1980
|
+
const r = f(), l = f(e.autocomplete), s = f(e.enableTitle), {
|
|
1981
|
+
isPassword: d
|
|
1982
|
+
} = n, m = f(e.minLength), a = f(e.maxLength), u = f(e.tabIndex), {
|
|
1983
|
+
disabled: c,
|
|
1941
1984
|
displayText: y,
|
|
1942
|
-
inputType:
|
|
1985
|
+
inputType: F,
|
|
1943
1986
|
onBlur: i,
|
|
1944
|
-
onFocus:
|
|
1987
|
+
onFocus: p,
|
|
1945
1988
|
onInput: g,
|
|
1946
|
-
onClick:
|
|
1947
|
-
onKeydown:
|
|
1948
|
-
onKeyup:
|
|
1949
|
-
onMousedown:
|
|
1950
|
-
onTextBoxValueChange:
|
|
1951
|
-
readonly:
|
|
1952
|
-
placeholder:
|
|
1953
|
-
textBoxClass:
|
|
1954
|
-
textBoxTitle:
|
|
1989
|
+
onClick: w,
|
|
1990
|
+
onKeydown: D,
|
|
1991
|
+
onKeyup: j,
|
|
1992
|
+
onMousedown: M,
|
|
1993
|
+
onTextBoxValueChange: L,
|
|
1994
|
+
readonly: S,
|
|
1995
|
+
placeholder: k,
|
|
1996
|
+
textBoxClass: B,
|
|
1997
|
+
textBoxTitle: E
|
|
1955
1998
|
} = o;
|
|
1956
|
-
return
|
|
1999
|
+
return U(() => {
|
|
1957
2000
|
e.selectOnCreated, e.focusOnCreated;
|
|
1958
|
-
}), () =>
|
|
2001
|
+
}), () => A("input", {
|
|
1959
2002
|
ref: r,
|
|
1960
2003
|
name: "input-group-value",
|
|
1961
|
-
autocomplete:
|
|
1962
|
-
class:
|
|
1963
|
-
disabled:
|
|
2004
|
+
autocomplete: l.value,
|
|
2005
|
+
class: B.value,
|
|
2006
|
+
disabled: c == null ? void 0 : c.value,
|
|
1964
2007
|
maxlength: a.value,
|
|
1965
2008
|
minlength: m.value,
|
|
1966
|
-
placeholder:
|
|
1967
|
-
readonly:
|
|
1968
|
-
tabindex:
|
|
1969
|
-
title: s.value && !
|
|
1970
|
-
type:
|
|
2009
|
+
placeholder: k.value,
|
|
2010
|
+
readonly: S == null ? void 0 : S.value,
|
|
2011
|
+
tabindex: u.value,
|
|
2012
|
+
title: s.value && !d.value ? E.value : "",
|
|
2013
|
+
type: F.value,
|
|
1971
2014
|
value: y == null ? void 0 : y.value,
|
|
1972
2015
|
onBlur: i,
|
|
1973
|
-
onClick:
|
|
1974
|
-
onChange:
|
|
1975
|
-
onFocus:
|
|
2016
|
+
onClick: w,
|
|
2017
|
+
onChange: L,
|
|
2018
|
+
onFocus: p,
|
|
1976
2019
|
onInput: g,
|
|
1977
|
-
onKeydown:
|
|
1978
|
-
onKeyup:
|
|
1979
|
-
onMousedown:
|
|
2020
|
+
onKeydown: D,
|
|
2021
|
+
onKeyup: j,
|
|
2022
|
+
onMousedown: M
|
|
1980
2023
|
}, null);
|
|
1981
2024
|
}
|
|
1982
|
-
function
|
|
1983
|
-
const n = P(() => e.useExtendInfo && !!e.extendInfo), o =
|
|
2025
|
+
function eo(e, t) {
|
|
2026
|
+
const n = P(() => e.useExtendInfo && !!e.extendInfo), o = Ve({
|
|
1984
2027
|
content: e.extendInfo
|
|
1985
2028
|
});
|
|
1986
2029
|
function r() {
|
|
1987
2030
|
t.emit("updateExtendInfo");
|
|
1988
2031
|
}
|
|
1989
|
-
return () => n.value &&
|
|
2032
|
+
return () => n.value && Oe(A("span", {
|
|
1990
2033
|
class: "input-group-before-tips",
|
|
1991
2034
|
onMouseenter: r
|
|
1992
|
-
}, [
|
|
2035
|
+
}, [A("i", {
|
|
1993
2036
|
class: "f-icon f-icon-info-circle"
|
|
1994
|
-
}, null),
|
|
2037
|
+
}, null), A("b", {
|
|
1995
2038
|
class: "tips-arrow"
|
|
1996
|
-
}, null)]), [[
|
|
2039
|
+
}, null)]), [[Le("tooltip"), o]]);
|
|
1997
2040
|
}
|
|
1998
|
-
function
|
|
2041
|
+
function Fe(e, t, n, o, r) {
|
|
1999
2042
|
const {
|
|
2000
|
-
appendedButtonClass:
|
|
2043
|
+
appendedButtonClass: l,
|
|
2001
2044
|
appendedContent: s
|
|
2002
|
-
} = n,
|
|
2003
|
-
clearButtonClass:
|
|
2004
|
-
clearButtonStyle:
|
|
2045
|
+
} = n, d = P(() => e.showButtonWhenDisabled && (!e.editable || !e.readonly) && !e.disabled), m = P(() => s.value && !t.slots.groupTextTemplate), a = P(() => !!t.slots.groupTextTemplate), {
|
|
2046
|
+
clearButtonClass: u,
|
|
2047
|
+
clearButtonStyle: c,
|
|
2005
2048
|
onClearValue: y,
|
|
2006
|
-
shouldShowClearButton:
|
|
2049
|
+
shouldShowClearButton: F
|
|
2007
2050
|
} = o;
|
|
2008
2051
|
function i() {
|
|
2009
|
-
return
|
|
2052
|
+
return A("span", {
|
|
2010
2053
|
id: "clearIcon",
|
|
2011
|
-
class:
|
|
2012
|
-
style:
|
|
2013
|
-
onClick: (
|
|
2014
|
-
}, [
|
|
2054
|
+
class: u.value,
|
|
2055
|
+
style: c.value,
|
|
2056
|
+
onClick: (k) => y(k)
|
|
2057
|
+
}, [A("i", {
|
|
2015
2058
|
class: "f-icon modal_close"
|
|
2016
2059
|
}, null)]);
|
|
2017
2060
|
}
|
|
2018
|
-
function
|
|
2019
|
-
t.emit("iconMouseEnter",
|
|
2061
|
+
function p(k) {
|
|
2062
|
+
t.emit("iconMouseEnter", k);
|
|
2020
2063
|
}
|
|
2021
|
-
function g(
|
|
2022
|
-
t.emit("iconMouseLeave",
|
|
2064
|
+
function g(k) {
|
|
2065
|
+
t.emit("iconMouseLeave", k);
|
|
2023
2066
|
}
|
|
2024
|
-
function
|
|
2025
|
-
|
|
2026
|
-
originalEvent:
|
|
2027
|
-
}),
|
|
2067
|
+
function w(k) {
|
|
2068
|
+
d.value && t.emit("clickHandle", {
|
|
2069
|
+
originalEvent: k
|
|
2070
|
+
}), k.stopPropagation();
|
|
2028
2071
|
}
|
|
2029
|
-
const
|
|
2030
|
-
function
|
|
2031
|
-
return
|
|
2072
|
+
const D = e.type === "password" ? r.onClickAppendedButton : w;
|
|
2073
|
+
function j() {
|
|
2074
|
+
return A("span", {
|
|
2032
2075
|
class: "input-group-text",
|
|
2033
|
-
onMouseenter: (
|
|
2034
|
-
onMouseleave: (
|
|
2076
|
+
onMouseenter: (k) => p(k),
|
|
2077
|
+
onMouseleave: (k) => g(k),
|
|
2035
2078
|
innerHTML: s.value,
|
|
2036
|
-
onClick: (
|
|
2079
|
+
onClick: (k) => D(k)
|
|
2037
2080
|
}, null);
|
|
2038
2081
|
}
|
|
2039
|
-
function
|
|
2082
|
+
function M() {
|
|
2040
2083
|
return t.slots.groupTextTemplate && t.slots.groupTextTemplate();
|
|
2041
2084
|
}
|
|
2042
|
-
function
|
|
2043
|
-
return m.value ?
|
|
2085
|
+
function L() {
|
|
2086
|
+
return m.value ? j : a.value ? M : "";
|
|
2044
2087
|
}
|
|
2045
|
-
const
|
|
2046
|
-
return () =>
|
|
2047
|
-
class:
|
|
2048
|
-
}, [
|
|
2088
|
+
const S = L();
|
|
2089
|
+
return () => A("div", {
|
|
2090
|
+
class: l.value
|
|
2091
|
+
}, [F.value && i(), S && S()]);
|
|
2049
2092
|
}
|
|
2050
|
-
const
|
|
2093
|
+
const to = /* @__PURE__ */ G({
|
|
2051
2094
|
name: "FInputGroup",
|
|
2052
|
-
props:
|
|
2095
|
+
props: ae,
|
|
2053
2096
|
emits: ["clear", "change", "blur", "click", "clickHandle", "focus", "input", "keydown", "keyup", "iconMouseEnter", "iconMouseLeave", "update:modelValue", "update:value", "updateExtendInfo", "valueChange"],
|
|
2054
2097
|
setup(e, t) {
|
|
2055
|
-
const n = f(e.modelValue), o = f(e.modelValue), r =
|
|
2056
|
-
inputGroupClass:
|
|
2098
|
+
const n = f(e.modelValue), o = f(e.modelValue), r = Wn(e, t, n, o), {
|
|
2099
|
+
inputGroupClass: l,
|
|
2057
2100
|
inputType: s,
|
|
2058
|
-
inputGroupStyle:
|
|
2059
|
-
} = r, m =
|
|
2101
|
+
inputGroupStyle: d
|
|
2102
|
+
} = r, m = Ce(e), {
|
|
2060
2103
|
shouldShowAppendedButton: a
|
|
2061
|
-
} = m,
|
|
2062
|
-
onMouseEnter:
|
|
2104
|
+
} = m, u = ve(e, t, r), {
|
|
2105
|
+
onMouseEnter: c,
|
|
2063
2106
|
onMouseLeave: y
|
|
2064
|
-
} =
|
|
2065
|
-
|
|
2066
|
-
n.value =
|
|
2067
|
-
}),
|
|
2068
|
-
n.value =
|
|
2069
|
-
}),
|
|
2107
|
+
} = u, F = Te(e, t, s, m), i = Kn(e, t), p = Jn(e, t, F, r), g = Fe(e, t, m, u, F), w = eo(e, t), D = P(() => e.type === "number");
|
|
2108
|
+
I(() => [e.value], ([M]) => {
|
|
2109
|
+
n.value = M, o.value = M;
|
|
2110
|
+
}), I(() => [e.modelValue], ([M]) => {
|
|
2111
|
+
n.value = M, o.value = M;
|
|
2112
|
+
}), U(() => {
|
|
2070
2113
|
e.value && (n.value = e.value, o.value = e.value);
|
|
2071
2114
|
});
|
|
2072
|
-
const
|
|
2115
|
+
const j = () => A(le, null, [A("div", {
|
|
2073
2116
|
id: "inputGroup",
|
|
2074
|
-
class:
|
|
2075
|
-
style:
|
|
2076
|
-
onMouseenter:
|
|
2117
|
+
class: l.value,
|
|
2118
|
+
style: d.value,
|
|
2119
|
+
onMouseenter: c,
|
|
2077
2120
|
onMouseleave: y
|
|
2078
|
-
}, [
|
|
2079
|
-
return () =>
|
|
2121
|
+
}, [D.value ? i() : A(le, null, [w(), p(), a.value && g()])])]);
|
|
2122
|
+
return () => j();
|
|
2080
2123
|
}
|
|
2081
|
-
}), b = {}, h = {}, v = {},
|
|
2082
|
-
let
|
|
2083
|
-
function
|
|
2084
|
-
|
|
2124
|
+
}), b = {}, h = {}, v = {}, C = {};
|
|
2125
|
+
let pe = !1;
|
|
2126
|
+
function no() {
|
|
2127
|
+
pe || (pe = !0, He.register(b, h, v, C), Ue.register(b, h, v, C), We.register(b, h, v, C), ze.register(b, h, v, C), Qe.register(b, h, v, C), _e.register(b, h, v, C), Ze.register(b, h, v, C), Xe.register(b, h, v, C), Ye.register(b, h, v, C), Je.register(b, h, v, C), Ke.register(b, h, v, C), et.register(b, h, v, C), tt.register(b, h, v, C), nt.register(b, h, v, C), ot.register(b, h, v, C), rt.register(b, h, v, C), at.register(b, h, v, C), it.register(b, h, v, C), st.register(b, h, v, C), lt.register(b, h, v, C), ct.register(b, h, v, C), pt.register(b, h, v, C), ut.register(b, h, v, C), dt.register(b, h, v, C), mt.register(b, h, v, C), ft.register(b, h, v, C), yt.register(b, h, v, C), Ie.register(b, h, v, C), gt.register(b, h, v, C), bt.register(b, h, v, C), ht.register(b, h, v, C), vt.register(b, h, v, C), Ct.register(b, h, v, C), Tt.register(b, h, v, C), Ft.register(b, h, v, C), wt.register(b, h, v, C), St.register(b, h, v, C), Pt.register(b, h, v, C), Bt.register(b, h, v, C), Ht.register(b, h, v), xt.register(b, h, v, C), kt.register(b, h, v, C), Mt.register(b, h, v, C), jt.register(b, h, v, C), At.register(b, h, v, C), Dt.register(b, h, v, C), Et.register(b, h, v, C), Vt.register(b, h, v, C), Ot.register(b, h, v, C), Lt.register(b, h, v, C), Nt.register(b, h, v, C), It.register(b, h, v, C), Rt.register(b, h, v, C), $t.register(b, h, v, C), Gt.register(b, h, v, C), qt.register(b, h, v, C), Ut.register(b, h, v, C));
|
|
2085
2128
|
}
|
|
2086
|
-
function
|
|
2087
|
-
|
|
2088
|
-
function e(r,
|
|
2129
|
+
function we() {
|
|
2130
|
+
no();
|
|
2131
|
+
function e(r, l) {
|
|
2089
2132
|
const s = h[r];
|
|
2090
|
-
return s ? s(
|
|
2133
|
+
return s ? s(l) : {};
|
|
2091
2134
|
}
|
|
2092
2135
|
function t(r) {
|
|
2093
|
-
return b[r] ||
|
|
2136
|
+
return b[r] || to;
|
|
2094
2137
|
}
|
|
2095
2138
|
function n(r) {
|
|
2096
2139
|
switch (r) {
|
|
2097
2140
|
case "check-box":
|
|
2098
2141
|
return "onChangeValue";
|
|
2142
|
+
case "switch":
|
|
2143
|
+
return "onModelValueChanged";
|
|
2099
2144
|
case "check-group":
|
|
2100
2145
|
return "onChangeValue";
|
|
2101
2146
|
case "combo-list":
|
|
@@ -2153,95 +2198,95 @@ function Fe() {
|
|
|
2153
2198
|
}
|
|
2154
2199
|
return { resolveEditorProps: e, resolveEditorType: t, getChangeFunctionName: n, getClearFunctionName: o };
|
|
2155
2200
|
}
|
|
2156
|
-
const
|
|
2201
|
+
const ee = /* @__PURE__ */ G({
|
|
2157
2202
|
name: "FDynamicFormGroup",
|
|
2158
|
-
props:
|
|
2203
|
+
props: Q,
|
|
2159
2204
|
emits: ["change", "update:modelValue"],
|
|
2160
2205
|
setup(e, t) {
|
|
2161
|
-
const n = f(e.id), o = f(e.customClass), r = f(e.editor),
|
|
2206
|
+
const n = f(e.id), o = f(e.customClass), r = f(e.editor), l = f(e.label), s = f(e.modelValue), d = f(e.readonly), m = f(e.required), a = f(e.showLabel), u = f(e.visible);
|
|
2162
2207
|
f(e.type);
|
|
2163
|
-
const
|
|
2208
|
+
const c = f(), {
|
|
2164
2209
|
resolveEditorProps: y,
|
|
2165
|
-
resolveEditorType:
|
|
2210
|
+
resolveEditorType: F,
|
|
2166
2211
|
getChangeFunctionName: i,
|
|
2167
|
-
getClearFunctionName:
|
|
2168
|
-
} =
|
|
2212
|
+
getClearFunctionName: p
|
|
2213
|
+
} = we(), g = P(() => ({
|
|
2169
2214
|
"form-group": !0,
|
|
2170
2215
|
"farris-form-group": !0,
|
|
2171
2216
|
"common-group": !0,
|
|
2172
|
-
"q-state-readonly":
|
|
2217
|
+
"q-state-readonly": d.value
|
|
2173
2218
|
}));
|
|
2174
|
-
function
|
|
2175
|
-
s.value =
|
|
2219
|
+
function w(M, L) {
|
|
2220
|
+
s.value = L !== void 0 ? L : M, t.emit("update:modelValue", s.value), t.emit("change", s.value);
|
|
2176
2221
|
}
|
|
2177
|
-
function
|
|
2222
|
+
function D() {
|
|
2178
2223
|
t.emit("update:modelValue", "");
|
|
2179
2224
|
}
|
|
2180
|
-
const
|
|
2181
|
-
const
|
|
2182
|
-
return
|
|
2183
|
-
ref:
|
|
2184
|
-
},
|
|
2225
|
+
const j = P(() => {
|
|
2226
|
+
const M = r.value.type || "input-group", L = F(M), S = y(M, r.value), k = i(M), B = p(r.value.type);
|
|
2227
|
+
return S[k] = w, S[B] = D, () => A(L, _({
|
|
2228
|
+
ref: c
|
|
2229
|
+
}, S, {
|
|
2185
2230
|
modelValue: s.value,
|
|
2186
|
-
"onUpdate:modelValue": (
|
|
2231
|
+
"onUpdate:modelValue": (E) => s.value = E
|
|
2187
2232
|
}), null);
|
|
2188
2233
|
});
|
|
2189
|
-
return
|
|
2190
|
-
n.value =
|
|
2234
|
+
return I([() => e.id, () => e.customClass, () => e.editor, () => e.label, () => e.modelValue, () => e.readonly, () => e.required, () => e.showLabel, () => e.visible], ([M, L, S, k, B, E, N, O, R]) => {
|
|
2235
|
+
n.value = M, o.value = L, r.value = S, l.value = k, s.value = B, d.value = E, m.value = N, a.value = O, u.value = R;
|
|
2191
2236
|
}), t.expose({
|
|
2192
|
-
editorRef:
|
|
2193
|
-
}), () =>
|
|
2237
|
+
editorRef: c
|
|
2238
|
+
}), () => u.value && A("div", {
|
|
2194
2239
|
id: `${n.value}-input-group`,
|
|
2195
2240
|
class: o.value
|
|
2196
|
-
}, [
|
|
2241
|
+
}, [A("div", {
|
|
2197
2242
|
class: "farris-group-wrap"
|
|
2198
|
-
}, [
|
|
2243
|
+
}, [A("div", {
|
|
2199
2244
|
class: g.value
|
|
2200
|
-
}, [a.value &&
|
|
2245
|
+
}, [a.value && A(he, {
|
|
2201
2246
|
id: `${n.value}-lable`,
|
|
2202
2247
|
required: m.value,
|
|
2203
|
-
text:
|
|
2204
|
-
title:
|
|
2205
|
-
}, null),
|
|
2248
|
+
text: l.value,
|
|
2249
|
+
title: l.value
|
|
2250
|
+
}, null), A("div", {
|
|
2206
2251
|
class: "farris-input-wrap"
|
|
2207
|
-
}, [
|
|
2252
|
+
}, [j.value()])])])]);
|
|
2208
2253
|
}
|
|
2209
|
-
}),
|
|
2210
|
-
function
|
|
2254
|
+
}), oo = {}, ro = {};
|
|
2255
|
+
function ao(e, t) {
|
|
2211
2256
|
e.schema;
|
|
2212
2257
|
const n = f(!0), o = f(!0);
|
|
2213
|
-
function r(
|
|
2258
|
+
function r(c) {
|
|
2214
2259
|
return !1;
|
|
2215
2260
|
}
|
|
2216
|
-
function
|
|
2261
|
+
function l() {
|
|
2217
2262
|
return !1;
|
|
2218
2263
|
}
|
|
2219
2264
|
function s() {
|
|
2220
2265
|
return !1;
|
|
2221
2266
|
}
|
|
2222
|
-
function
|
|
2267
|
+
function d() {
|
|
2223
2268
|
return !0;
|
|
2224
2269
|
}
|
|
2225
|
-
function m(
|
|
2270
|
+
function m(c) {
|
|
2226
2271
|
}
|
|
2227
2272
|
function a() {
|
|
2228
2273
|
}
|
|
2229
|
-
function
|
|
2274
|
+
function u(c) {
|
|
2230
2275
|
return null;
|
|
2231
2276
|
}
|
|
2232
2277
|
return {
|
|
2233
2278
|
canAccepts: r,
|
|
2234
|
-
checkCanDeleteComponent:
|
|
2279
|
+
checkCanDeleteComponent: l,
|
|
2235
2280
|
checkCanMoveComponent: s,
|
|
2236
|
-
hideNestedPaddingInDesginerView:
|
|
2281
|
+
hideNestedPaddingInDesginerView: d,
|
|
2237
2282
|
onAcceptMovedChildElement: m,
|
|
2238
2283
|
resolveComponentContext: a,
|
|
2239
2284
|
triggerBelongedComponentToMoveWhenMoved: n,
|
|
2240
2285
|
triggerBelongedComponentToDeleteWhenDeleted: o,
|
|
2241
|
-
getPropsConfig:
|
|
2286
|
+
getPropsConfig: u
|
|
2242
2287
|
};
|
|
2243
2288
|
}
|
|
2244
|
-
class
|
|
2289
|
+
class Be {
|
|
2245
2290
|
static getEditorTypesByMDataType(t) {
|
|
2246
2291
|
return this.fieldControlTypeMapping[t];
|
|
2247
2292
|
}
|
|
@@ -2249,74 +2294,74 @@ class we {
|
|
|
2249
2294
|
/**
|
|
2250
2295
|
* <字段类型,可配置的控件类型列表>的映射
|
|
2251
2296
|
*/
|
|
2252
|
-
|
|
2297
|
+
$(Be, "fieldControlTypeMapping", {
|
|
2253
2298
|
String: [
|
|
2254
|
-
{ key:
|
|
2255
|
-
{ key:
|
|
2256
|
-
{ key:
|
|
2257
|
-
{ key:
|
|
2258
|
-
{ key:
|
|
2259
|
-
{ key:
|
|
2260
|
-
{ key:
|
|
2261
|
-
{ key:
|
|
2299
|
+
{ key: T["input-group"].type, value: T["input-group"].name },
|
|
2300
|
+
{ key: T.lookup.type, value: T.lookup.name },
|
|
2301
|
+
{ key: T.Image.type, value: T.Image.name },
|
|
2302
|
+
{ key: T["date-picker"].type, value: T["date-picker"].name },
|
|
2303
|
+
{ key: T["check-box"].type, value: T["check-box"].name },
|
|
2304
|
+
{ key: T["radio-group"].type, value: T["radio-group"].name },
|
|
2305
|
+
{ key: T["combo-list"].type, value: T["combo-list"].name },
|
|
2306
|
+
{ key: T.textarea.type, value: T.textarea.name }
|
|
2262
2307
|
// { key: DgControl.Tags.type, value: DgControl.Tags.name },
|
|
2263
2308
|
],
|
|
2264
2309
|
Text: [
|
|
2265
|
-
{ key:
|
|
2266
|
-
{ key:
|
|
2267
|
-
{ key:
|
|
2310
|
+
{ key: T.textarea.type, value: T.textarea.name },
|
|
2311
|
+
{ key: T.avatar.type, value: T.avatar.name },
|
|
2312
|
+
{ key: T.lookup.type, value: T.lookup.name }
|
|
2268
2313
|
],
|
|
2269
2314
|
Decimal: [
|
|
2270
|
-
{ key:
|
|
2315
|
+
{ key: T["number-spinner"].type, value: T["number-spinner"].name }
|
|
2271
2316
|
],
|
|
2272
2317
|
Integer: [
|
|
2273
|
-
{ key:
|
|
2318
|
+
{ key: T["number-spinner"].type, value: T["number-spinner"].name }
|
|
2274
2319
|
],
|
|
2275
2320
|
Number: [
|
|
2276
|
-
{ key:
|
|
2321
|
+
{ key: T["number-spinner"].type, value: T["number-spinner"].name }
|
|
2277
2322
|
],
|
|
2278
2323
|
BigNumber: [
|
|
2279
|
-
{ key:
|
|
2324
|
+
{ key: T["number-spinner"].type, value: T["number-spinner"].name }
|
|
2280
2325
|
],
|
|
2281
2326
|
Date: [
|
|
2282
|
-
{ key:
|
|
2327
|
+
{ key: T["date-picker"].type, value: T["date-picker"].name }
|
|
2283
2328
|
],
|
|
2284
2329
|
DateTime: [
|
|
2285
|
-
{ key:
|
|
2330
|
+
{ key: T["date-picker"].type, value: T["date-picker"].name }
|
|
2286
2331
|
],
|
|
2287
2332
|
Boolean: [
|
|
2288
|
-
{ key:
|
|
2289
|
-
{ key:
|
|
2333
|
+
{ key: T.switch.type, value: T.switch.name },
|
|
2334
|
+
{ key: T["check-box"].type, value: T["check-box"].name }
|
|
2290
2335
|
],
|
|
2291
2336
|
Enum: [
|
|
2292
|
-
{ key:
|
|
2293
|
-
{ key:
|
|
2337
|
+
{ key: T["combo-list"].type, value: T["combo-list"].name },
|
|
2338
|
+
{ key: T["radio-group"].type, value: T["radio-group"].name }
|
|
2294
2339
|
],
|
|
2295
2340
|
Object: [
|
|
2296
|
-
{ key:
|
|
2297
|
-
{ key:
|
|
2298
|
-
{ key:
|
|
2341
|
+
{ key: T.lookup.type, value: T.lookup.name },
|
|
2342
|
+
{ key: T["combo-list"].type, value: T["combo-list"].name },
|
|
2343
|
+
{ key: T["radio-group"].type, value: T["radio-group"].name }
|
|
2299
2344
|
],
|
|
2300
2345
|
EmployeeSelector: [
|
|
2301
|
-
{ key:
|
|
2346
|
+
{ key: T.EmployeeSelector.type, value: T.EmployeeSelector.name }
|
|
2302
2347
|
],
|
|
2303
2348
|
AdminOrganizationSelector: [
|
|
2304
|
-
{ key:
|
|
2349
|
+
{ key: T.AdminOrganizationSelector.type, value: T.AdminOrganizationSelector.name }
|
|
2305
2350
|
]
|
|
2306
2351
|
});
|
|
2307
|
-
class
|
|
2352
|
+
class io {
|
|
2308
2353
|
constructor(t, n) {
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
|
|
2354
|
+
$(this, "componentId");
|
|
2355
|
+
$(this, "viewModelId");
|
|
2356
|
+
$(this, "eventsEditorUtils");
|
|
2357
|
+
$(this, "formSchemaUtils");
|
|
2358
|
+
$(this, "formMetadataConverter");
|
|
2359
|
+
$(this, "designViewModelUtils");
|
|
2360
|
+
$(this, "designViewModelField");
|
|
2361
|
+
$(this, "controlCreatorUtils");
|
|
2362
|
+
$(this, "designerHostService");
|
|
2363
|
+
$(this, "metadataService", null);
|
|
2364
|
+
$(this, "propertyConfig", {
|
|
2320
2365
|
type: "object",
|
|
2321
2366
|
categories: {}
|
|
2322
2367
|
});
|
|
@@ -2357,7 +2402,7 @@ class to {
|
|
|
2357
2402
|
type: "combo-list",
|
|
2358
2403
|
textField: "value",
|
|
2359
2404
|
valueField: "key",
|
|
2360
|
-
data:
|
|
2405
|
+
data: Be.getEditorTypesByMDataType(n.designViewModelField.type.name)
|
|
2361
2406
|
}
|
|
2362
2407
|
},
|
|
2363
2408
|
label: {
|
|
@@ -2383,12 +2428,12 @@ class to {
|
|
|
2383
2428
|
* @param newControlType 新控件类型
|
|
2384
2429
|
*/
|
|
2385
2430
|
changeControlType(t, n) {
|
|
2386
|
-
var a,
|
|
2431
|
+
var a, u, c, y, F;
|
|
2387
2432
|
const o = n.propertyValue, r = this.formSchemaUtils.getComponentById(this.componentId);
|
|
2388
|
-
let
|
|
2389
|
-
if (!
|
|
2433
|
+
let l = this.getControlParentContainer(t.id, r);
|
|
2434
|
+
if (!l)
|
|
2390
2435
|
return;
|
|
2391
|
-
const s =
|
|
2436
|
+
const s = l.contents.findIndex((i) => i.id === t.id), d = l.contents[s];
|
|
2392
2437
|
let m;
|
|
2393
2438
|
this.designViewModelField && (this.designViewModelUtils.getDgViewModel(this.viewModelId).changeField(this.designViewModelField.id, {
|
|
2394
2439
|
editor: {
|
|
@@ -2398,19 +2443,19 @@ class to {
|
|
|
2398
2443
|
require: this.designViewModelField.require,
|
|
2399
2444
|
readonly: this.designViewModelField.readonly
|
|
2400
2445
|
}, !1), m = this.controlCreatorUtils.setFormFieldProperty("Form", this.designViewModelField, null, o)), Object.assign(m, {
|
|
2401
|
-
id:
|
|
2402
|
-
appearance:
|
|
2403
|
-
size:
|
|
2404
|
-
label:
|
|
2446
|
+
id: d.id,
|
|
2447
|
+
appearance: d.appearance,
|
|
2448
|
+
size: d.size,
|
|
2449
|
+
label: d.label
|
|
2405
2450
|
}), Object.assign(m.editor, {
|
|
2406
|
-
isTextArea: m.isTextArea &&
|
|
2451
|
+
isTextArea: m.isTextArea && d.isTextArea,
|
|
2407
2452
|
type: o || "",
|
|
2408
|
-
placeHolder: (a =
|
|
2409
|
-
holdPlace: (
|
|
2410
|
-
readonly: (
|
|
2411
|
-
require: (y =
|
|
2412
|
-
visible: (
|
|
2413
|
-
}),
|
|
2453
|
+
placeHolder: (a = d.editor) == null ? void 0 : a.placeHolder,
|
|
2454
|
+
holdPlace: (u = d.editor) == null ? void 0 : u.holdPlace,
|
|
2455
|
+
readonly: (c = d.editor) == null ? void 0 : c.readonly,
|
|
2456
|
+
require: (y = d.editor) == null ? void 0 : y.require,
|
|
2457
|
+
visible: (F = d.editor) == null ? void 0 : F.visible
|
|
2458
|
+
}), l.contents.splice(s, 1, m);
|
|
2414
2459
|
}
|
|
2415
2460
|
getAppearanceConfig(t = null) {
|
|
2416
2461
|
return {
|
|
@@ -2480,7 +2525,7 @@ class to {
|
|
|
2480
2525
|
};
|
|
2481
2526
|
}
|
|
2482
2527
|
}
|
|
2483
|
-
class
|
|
2528
|
+
class so extends io {
|
|
2484
2529
|
constructor(t, n) {
|
|
2485
2530
|
super(t, n);
|
|
2486
2531
|
}
|
|
@@ -2525,7 +2570,7 @@ class no extends to {
|
|
|
2525
2570
|
title: "组件信息",
|
|
2526
2571
|
type: "input-group",
|
|
2527
2572
|
$converter: "/converter/property-editor.converter"
|
|
2528
|
-
}, n),
|
|
2573
|
+
}, n), l = Object.assign({
|
|
2529
2574
|
readonly: {
|
|
2530
2575
|
description: "",
|
|
2531
2576
|
title: "只读",
|
|
@@ -2547,146 +2592,147 @@ class no extends to {
|
|
|
2547
2592
|
type: "string"
|
|
2548
2593
|
}
|
|
2549
2594
|
}, o);
|
|
2550
|
-
return { ...r, properties: { ...
|
|
2595
|
+
return { ...r, properties: { ...l } };
|
|
2551
2596
|
}
|
|
2552
2597
|
}
|
|
2553
|
-
class
|
|
2598
|
+
class lo extends so {
|
|
2554
2599
|
constructor(t, n) {
|
|
2555
2600
|
super(t, n);
|
|
2556
2601
|
}
|
|
2557
2602
|
}
|
|
2558
|
-
function
|
|
2603
|
+
function co(e, t) {
|
|
2559
2604
|
const {
|
|
2560
2605
|
canAccepts: n,
|
|
2561
2606
|
checkCanDeleteComponent: o,
|
|
2562
2607
|
checkCanMoveComponent: r,
|
|
2563
|
-
hideNestedPaddingInDesginerView:
|
|
2608
|
+
hideNestedPaddingInDesginerView: l,
|
|
2564
2609
|
onAcceptMovedChildElement: s,
|
|
2565
|
-
resolveComponentContext:
|
|
2610
|
+
resolveComponentContext: d,
|
|
2566
2611
|
triggerBelongedComponentToMoveWhenMoved: m,
|
|
2567
2612
|
triggerBelongedComponentToDeleteWhenDeleted: a
|
|
2568
|
-
} =
|
|
2569
|
-
function
|
|
2570
|
-
return new
|
|
2613
|
+
} = ao(e), u = e.schema;
|
|
2614
|
+
function c(y) {
|
|
2615
|
+
return new lo(y, t).getPropertyConfig(u);
|
|
2571
2616
|
}
|
|
2572
2617
|
return {
|
|
2573
2618
|
canAccepts: n,
|
|
2574
2619
|
checkCanDeleteComponent: o,
|
|
2575
2620
|
checkCanMoveComponent: r,
|
|
2576
|
-
hideNestedPaddingInDesginerView:
|
|
2621
|
+
hideNestedPaddingInDesginerView: l,
|
|
2577
2622
|
onAcceptMovedChildElement: s,
|
|
2578
|
-
resolveComponentContext:
|
|
2623
|
+
resolveComponentContext: d,
|
|
2579
2624
|
triggerBelongedComponentToMoveWhenMoved: m,
|
|
2580
2625
|
triggerBelongedComponentToDeleteWhenDeleted: a,
|
|
2581
|
-
getPropsConfig:
|
|
2626
|
+
getPropsConfig: c
|
|
2582
2627
|
};
|
|
2583
2628
|
}
|
|
2584
|
-
const
|
|
2629
|
+
const uo = /* @__PURE__ */ G({
|
|
2585
2630
|
name: "FInputGroupDesign",
|
|
2586
|
-
props:
|
|
2631
|
+
props: ae,
|
|
2587
2632
|
emits: ["updateExtendInfo", "clear", "valueChange", "clickHandle", "blurHandle", "focusHandle", "enterHandle", "iconMouseEnter", "iconMouseLeave", "keyupHandle", "keydownHandle", "inputClick"],
|
|
2588
2633
|
setup(e, t) {
|
|
2589
|
-
const n = f(e.modelValue), o = f(e.modelValue), r =
|
|
2590
|
-
inputGroupClass:
|
|
2634
|
+
const n = f(e.modelValue), o = f(e.modelValue), r = zn(e, t, n, o), {
|
|
2635
|
+
inputGroupClass: l,
|
|
2591
2636
|
inputType: s,
|
|
2592
|
-
inputGroupStyle:
|
|
2593
|
-
} = r, m =
|
|
2637
|
+
inputGroupStyle: d
|
|
2638
|
+
} = r, m = Ce(e), {
|
|
2594
2639
|
shouldShowAppendedButton: a
|
|
2595
|
-
} = m,
|
|
2596
|
-
onMouseEnter:
|
|
2640
|
+
} = m, u = ve(e, t, r), {
|
|
2641
|
+
onMouseEnter: c,
|
|
2597
2642
|
onMouseLeave: y
|
|
2598
|
-
} =
|
|
2599
|
-
|
|
2600
|
-
i.value.componentInstance =
|
|
2601
|
-
}), t.expose(
|
|
2602
|
-
const
|
|
2603
|
-
return () =>
|
|
2643
|
+
} = u, F = Te(e, t, s, m), i = f(), p = W("designer-host-service"), g = W("design-item-context"), w = co(g, p), D = re(i, g, w);
|
|
2644
|
+
U(() => {
|
|
2645
|
+
i.value.componentInstance = D;
|
|
2646
|
+
}), t.expose(D.value);
|
|
2647
|
+
const j = Fe(e, t, m, u, F), M = f();
|
|
2648
|
+
return () => A("div", {
|
|
2604
2649
|
id: "inputGroup",
|
|
2605
2650
|
ref: i,
|
|
2606
|
-
class:
|
|
2607
|
-
style:
|
|
2608
|
-
onMouseenter:
|
|
2651
|
+
class: l.value,
|
|
2652
|
+
style: d.value,
|
|
2653
|
+
onMouseenter: c,
|
|
2609
2654
|
onMouseleave: y
|
|
2610
|
-
}, [
|
|
2611
|
-
ref:
|
|
2655
|
+
}, [A("input", {
|
|
2656
|
+
ref: M,
|
|
2612
2657
|
class: "form-control",
|
|
2613
2658
|
readonly: !0,
|
|
2614
2659
|
placeholder: e.placeholder
|
|
2615
|
-
}, null), a.value &&
|
|
2660
|
+
}, null), a.value && j()]);
|
|
2616
2661
|
}
|
|
2617
2662
|
});
|
|
2618
|
-
function
|
|
2663
|
+
function po() {
|
|
2619
2664
|
function e(n, o) {
|
|
2620
|
-
const r =
|
|
2665
|
+
const r = ro[n];
|
|
2621
2666
|
return r ? r(o) : {};
|
|
2622
2667
|
}
|
|
2623
2668
|
function t(n) {
|
|
2624
|
-
return
|
|
2669
|
+
return oo[n] || uo;
|
|
2625
2670
|
}
|
|
2626
2671
|
return { resolveEditorProps: e, resolveEditorType: t };
|
|
2627
2672
|
}
|
|
2628
|
-
const
|
|
2673
|
+
const mo = /* @__PURE__ */ G({
|
|
2629
2674
|
name: "FDynamicFormGroupDesign",
|
|
2630
|
-
props:
|
|
2675
|
+
props: Q,
|
|
2631
2676
|
emits: ["change", "update:modelValue"],
|
|
2632
2677
|
setup(e, t) {
|
|
2633
|
-
const n = f(e.id), o = f(e.customClass), r = f(e.editor),
|
|
2678
|
+
const n = f(e.id), o = f(e.customClass), r = f(e.editor), l = f(e.label), s = f(e.modelValue), d = f(!0), m = f(e.required), a = f(e.showLabel);
|
|
2634
2679
|
f(e.type);
|
|
2635
|
-
const
|
|
2636
|
-
resolveEditorProps:
|
|
2680
|
+
const u = f(), {
|
|
2681
|
+
resolveEditorProps: c,
|
|
2637
2682
|
resolveEditorType: y
|
|
2638
|
-
} =
|
|
2683
|
+
} = po(), F = P(() => ({
|
|
2639
2684
|
"form-group": !0,
|
|
2640
2685
|
"farris-form-group": !0,
|
|
2641
2686
|
"common-group": !0,
|
|
2642
|
-
"q-state-readonly":
|
|
2687
|
+
"q-state-readonly": d.value,
|
|
2688
|
+
"form-group-in-canvas": !0
|
|
2643
2689
|
})), i = P(() => {
|
|
2644
|
-
const
|
|
2645
|
-
return () =>
|
|
2646
|
-
ref:
|
|
2647
|
-
},
|
|
2690
|
+
const p = r.value.type || "input-group", g = y(p), w = c(p, r.value);
|
|
2691
|
+
return () => A(g, _({
|
|
2692
|
+
ref: u
|
|
2693
|
+
}, w, {
|
|
2648
2694
|
modelValue: s.value,
|
|
2649
|
-
"onUpdate:modelValue": (
|
|
2695
|
+
"onUpdate:modelValue": (D) => s.value = D
|
|
2650
2696
|
}), null);
|
|
2651
2697
|
});
|
|
2652
|
-
return
|
|
2653
|
-
n.value =
|
|
2698
|
+
return I([() => e.id, () => e.customClass, () => e.editor, () => e.label, () => e.modelValue, () => e.readonly, () => e.required, () => e.showLabel], ([p, g, w, D, j, M, L, S]) => {
|
|
2699
|
+
n.value = p, o.value = g, r.value = w, l.value = D, s.value = j, d.value = M, m.value = L, a.value = S;
|
|
2654
2700
|
}), t.expose({
|
|
2655
|
-
editorRef:
|
|
2656
|
-
}), () =>
|
|
2701
|
+
editorRef: u
|
|
2702
|
+
}), () => A("div", {
|
|
2657
2703
|
id: `${n.value}-input-group`,
|
|
2658
2704
|
class: o.value,
|
|
2659
2705
|
design_test: !0
|
|
2660
|
-
}, [
|
|
2706
|
+
}, [A("div", {
|
|
2661
2707
|
class: "farris-group-wrap"
|
|
2662
|
-
}, [
|
|
2663
|
-
class:
|
|
2664
|
-
}, [a.value &&
|
|
2708
|
+
}, [A("div", {
|
|
2709
|
+
class: F.value
|
|
2710
|
+
}, [a.value && A(he, {
|
|
2665
2711
|
id: `${n.value}-lable`,
|
|
2666
2712
|
required: m.value,
|
|
2667
|
-
text:
|
|
2668
|
-
title:
|
|
2669
|
-
}, null),
|
|
2713
|
+
text: l.value,
|
|
2714
|
+
title: l.value
|
|
2715
|
+
}, null), A("div", {
|
|
2670
2716
|
class: "farris-input-wrap"
|
|
2671
2717
|
}, [i.value()])])])]);
|
|
2672
2718
|
}
|
|
2673
|
-
}),
|
|
2719
|
+
}), fo = /* @__PURE__ */ G({
|
|
2674
2720
|
name: "FFormGroupDesign",
|
|
2675
|
-
props:
|
|
2721
|
+
props: Q,
|
|
2676
2722
|
emits: [],
|
|
2677
2723
|
setup(e, t) {
|
|
2678
|
-
const n = f(), o =
|
|
2679
|
-
return r.value.canNested = !1, r.value.canMove = !0, r.value.canDelete = !0,
|
|
2680
|
-
n.value.componentInstance = r, r.value.getPropConfig = (...
|
|
2681
|
-
var
|
|
2682
|
-
let s =
|
|
2683
|
-
return s && Object.keys(s).length === 0 && ((
|
|
2724
|
+
const n = f(), o = W("design-item-context"), r = re(n, o);
|
|
2725
|
+
return r.value.canNested = !1, r.value.canMove = !0, r.value.canDelete = !0, U(() => {
|
|
2726
|
+
n.value.componentInstance = r, r.value.getPropConfig = (...l) => {
|
|
2727
|
+
var d, m, a;
|
|
2728
|
+
let s = fe[e.editor.type];
|
|
2729
|
+
return s && Object.keys(s).length === 0 && ((d = n.value) != null && d.editorRef) && ((a = (m = n.value) == null ? void 0 : m.editorRef) != null && a.getPropConfig) && (s = n.value.editorRef.getPropConfig(...l)), s;
|
|
2684
2730
|
};
|
|
2685
|
-
}), t.expose(r.value), () =>
|
|
2731
|
+
}), t.expose(r.value), () => A(mo, _(e, {
|
|
2686
2732
|
ref: n
|
|
2687
2733
|
}), null);
|
|
2688
2734
|
}
|
|
2689
|
-
}),
|
|
2735
|
+
}), Se = {
|
|
2690
2736
|
id: { type: String, default: "" },
|
|
2691
2737
|
/** 筛选组件配置器,具体配置项可查看各组件文档 */
|
|
2692
2738
|
editor: { type: Object, default: {} },
|
|
@@ -2700,55 +2746,55 @@ const so = /* @__PURE__ */ G({
|
|
|
2700
2746
|
* 作为内嵌编辑器被创建后默认选中文本
|
|
2701
2747
|
*/
|
|
2702
2748
|
selectOnCreated: { type: Boolean, default: !1 }
|
|
2703
|
-
},
|
|
2704
|
-
|
|
2705
|
-
|
|
2706
|
-
|
|
2749
|
+
}, yo = Z(
|
|
2750
|
+
Se,
|
|
2751
|
+
be,
|
|
2752
|
+
oe,
|
|
2707
2753
|
void 0
|
|
2708
|
-
),
|
|
2754
|
+
), go = /* @__PURE__ */ G({
|
|
2709
2755
|
name: "FDynamicFormInput",
|
|
2710
|
-
props:
|
|
2756
|
+
props: Se,
|
|
2711
2757
|
emits: ["change", "update:modelValue"],
|
|
2712
2758
|
setup(e, t) {
|
|
2713
2759
|
const n = f(e.id), o = f(e.editor), r = f(e.modelValue), {
|
|
2714
|
-
resolveEditorProps:
|
|
2760
|
+
resolveEditorProps: l,
|
|
2715
2761
|
resolveEditorType: s,
|
|
2716
|
-
getChangeFunctionName:
|
|
2717
|
-
} =
|
|
2718
|
-
function m(
|
|
2719
|
-
r.value =
|
|
2762
|
+
getChangeFunctionName: d
|
|
2763
|
+
} = we();
|
|
2764
|
+
function m(u, c) {
|
|
2765
|
+
r.value = c !== void 0 ? c : u, t.emit("update:modelValue", r.value), t.emit("change", r.value);
|
|
2720
2766
|
}
|
|
2721
2767
|
const a = P(() => {
|
|
2722
|
-
const
|
|
2723
|
-
|
|
2724
|
-
const y =
|
|
2725
|
-
return
|
|
2768
|
+
const u = s(o.value.type), c = l(o.value.type, o.value);
|
|
2769
|
+
c.focusOnCreated = e.focusOnCreated, c.selectOnCreated = e.selectOnCreated;
|
|
2770
|
+
const y = d(o.value.type);
|
|
2771
|
+
return c[y] = m, () => A(u, _(c, {
|
|
2726
2772
|
modelValue: r.value,
|
|
2727
|
-
"onUpdate:modelValue": (
|
|
2773
|
+
"onUpdate:modelValue": (F) => r.value = F
|
|
2728
2774
|
}), null);
|
|
2729
2775
|
});
|
|
2730
|
-
return
|
|
2731
|
-
n.value =
|
|
2776
|
+
return I([() => e.id, () => e.editor, () => e.modelValue], ([u, c, y]) => {
|
|
2777
|
+
n.value = u, o.value = c, r.value = y;
|
|
2732
2778
|
}), () => a.value();
|
|
2733
2779
|
}
|
|
2734
|
-
}),
|
|
2780
|
+
}), Sr = {
|
|
2735
2781
|
install(e) {
|
|
2736
|
-
e.component(
|
|
2782
|
+
e.component(K.name, K).component(ee.name, ee);
|
|
2737
2783
|
},
|
|
2738
2784
|
register(e, t, n, o) {
|
|
2739
|
-
e["form-group"] =
|
|
2785
|
+
e["form-group"] = ee, t["form-group"] = ue, e["response-form"] = K, t["response-form"] = ce, e["form-input"] = go, t["form-input"] = yo, o["form-group"] = { editorResolver: Tn };
|
|
2740
2786
|
},
|
|
2741
2787
|
registerDesigner(e, t, n) {
|
|
2742
|
-
e["form-group"] =
|
|
2788
|
+
e["form-group"] = fo, t["form-group"] = ue, e["response-form"] = En, t["response-form"] = ce;
|
|
2743
2789
|
}
|
|
2744
2790
|
};
|
|
2745
2791
|
export {
|
|
2746
|
-
|
|
2747
|
-
|
|
2748
|
-
|
|
2749
|
-
|
|
2750
|
-
|
|
2751
|
-
|
|
2752
|
-
|
|
2753
|
-
|
|
2792
|
+
ee as FDynamicFormGroup,
|
|
2793
|
+
K as FResponseForm,
|
|
2794
|
+
Sr as default,
|
|
2795
|
+
Q as dynamicFormGroupProps,
|
|
2796
|
+
Tn as editorResolver,
|
|
2797
|
+
ue as formGroupPropsResolver,
|
|
2798
|
+
ce as formPropsResolver,
|
|
2799
|
+
ge as responseFormProps
|
|
2754
2800
|
};
|