@farris/ui-vue 1.3.5 → 1.3.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/accordion/index.esm.js +16 -16
- package/components/accordion/index.umd.cjs +1 -1
- package/components/avatar/index.esm.js +65 -65
- package/components/avatar/index.umd.cjs +1 -1
- package/components/button-edit/index.esm.js +13 -13
- package/components/button-edit/index.umd.cjs +1 -1
- package/components/calendar/index.esm.js +504 -490
- package/components/calendar/index.umd.cjs +1 -1
- package/components/capsule/index.esm.js +247 -233
- package/components/capsule/index.umd.cjs +1 -1
- package/components/checkbox/index.esm.js +356 -344
- package/components/checkbox/index.umd.cjs +1 -1
- package/components/color-picker/index.esm.js +159 -145
- package/components/color-picker/index.umd.cjs +2 -2
- package/components/combo-list/index.esm.js +127 -128
- package/components/combo-list/index.umd.cjs +1 -1
- package/components/combo-tree/index.esm.js +15 -15
- package/components/combo-tree/index.umd.cjs +1 -1
- package/components/component/index.esm.js +101 -87
- package/components/component/index.umd.cjs +1 -1
- package/components/condition/index.esm.js +7 -5
- package/components/condition/index.umd.cjs +1 -1
- package/components/content-container/index.esm.js +181 -167
- package/components/content-container/index.umd.cjs +1 -1
- package/components/data-grid/index.esm.js +4057 -4304
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/data-view/index.esm.js +2450 -2467
- package/components/data-view/index.umd.cjs +1 -1
- package/components/date-picker/index.esm.js +789 -777
- package/components/date-picker/index.umd.cjs +1 -1
- package/components/designer-canvas/index.esm.js +3593 -3585
- package/components/designer-canvas/index.umd.cjs +1 -1
- package/components/dropdown/index.esm.js +257 -243
- package/components/dropdown/index.umd.cjs +2 -2
- package/components/dynamic-form/index.esm.js +322 -306
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/dynamic-resolver/index.esm.js +177 -163
- package/components/dynamic-resolver/index.umd.cjs +1 -1
- package/components/event-parameter/index.esm.js +163 -2643
- package/components/event-parameter/index.umd.cjs +1 -1
- package/components/events-editor/index.esm.js +500 -486
- package/components/events-editor/index.umd.cjs +1 -1
- package/components/expression-editor/index.esm.js +37 -37
- package/components/expression-editor/index.umd.cjs +1 -1
- package/components/external-container/index.esm.js +485 -470
- package/components/external-container/index.umd.cjs +1 -1
- package/components/field-selector/index.esm.js +2611 -2623
- package/components/field-selector/index.umd.cjs +1 -1
- package/components/filter-bar/index.esm.js +3825 -3837
- package/components/filter-bar/index.umd.cjs +1 -1
- package/components/flow-canvas/index.esm.js +3720 -3712
- package/components/flow-canvas/index.umd.cjs +1 -1
- package/components/image-cropper/index.esm.js +402 -388
- package/components/image-cropper/index.umd.cjs +1 -1
- package/components/input-group/index.esm.js +201 -202
- package/components/input-group/index.umd.cjs +1 -1
- package/components/layout/index.esm.js +264 -245
- package/components/layout/index.umd.cjs +1 -1
- package/components/list-nav/index.esm.js +157 -143
- package/components/list-nav/index.umd.cjs +1 -1
- package/components/list-view/index.esm.js +312 -296
- package/components/list-view/index.umd.cjs +1 -1
- package/components/lookup/index.esm.js +4748 -4992
- package/components/lookup/index.umd.cjs +1 -1
- package/components/mapping-editor/index.esm.js +4215 -4462
- package/components/mapping-editor/index.umd.cjs +1 -1
- package/components/nav/index.esm.js +169 -155
- package/components/nav/index.umd.cjs +2 -2
- package/components/number-range/index.esm.js +150 -137
- package/components/number-range/index.umd.cjs +1 -1
- package/components/number-spinner/index.esm.js +207 -194
- package/components/number-spinner/index.umd.cjs +1 -1
- package/components/order/index.esm.js +427 -414
- package/components/order/index.umd.cjs +1 -1
- package/components/page-footer/index.esm.js +22 -22
- package/components/page-footer/index.umd.cjs +1 -1
- package/components/page-header/index.esm.js +510 -492
- package/components/page-header/index.umd.cjs +1 -1
- package/components/pagination/index.esm.js +192 -178
- package/components/pagination/index.umd.cjs +1 -1
- package/components/progress/index.esm.js +234 -220
- package/components/progress/index.umd.cjs +3 -3
- package/components/property-editor/index.esm.js +288 -277
- package/components/property-editor/index.umd.cjs +2 -2
- package/components/property-panel/index.esm.js +62 -61
- package/components/property-panel/index.umd.cjs +1 -1
- package/components/query-solution/index.esm.js +3015 -3027
- package/components/query-solution/index.umd.cjs +5 -5
- package/components/radio-button/index.esm.js +64 -64
- package/components/radio-button/index.umd.cjs +1 -1
- package/components/radio-group/index.esm.js +293 -280
- package/components/radio-group/index.umd.cjs +1 -1
- package/components/rate/index.esm.js +222 -208
- package/components/rate/index.umd.cjs +1 -1
- package/components/response-layout/index.esm.js +187 -173
- package/components/response-layout/index.umd.cjs +1 -1
- package/components/response-layout-editor/index.esm.js +554 -542
- package/components/response-layout-editor/index.umd.cjs +1 -1
- package/components/response-toolbar/index.esm.js +483 -469
- package/components/response-toolbar/index.umd.cjs +1 -1
- package/components/schema-selector/index.esm.js +632 -617
- package/components/schema-selector/index.umd.cjs +2 -2
- package/components/search-box/index.esm.js +228 -214
- package/components/search-box/index.umd.cjs +1 -1
- package/components/section/index.esm.js +419 -406
- package/components/section/index.umd.cjs +1 -1
- package/components/smoke-detector/index.esm.js +162 -148
- package/components/smoke-detector/index.umd.cjs +1 -1
- package/components/splitter/index.esm.js +308 -284
- package/components/splitter/index.umd.cjs +1 -1
- package/components/step/index.esm.js +279 -265
- package/components/step/index.umd.cjs +1 -1
- package/components/switch/index.esm.js +183 -170
- package/components/switch/index.umd.cjs +1 -1
- package/components/tabs/index.esm.js +307 -294
- package/components/tabs/index.umd.cjs +1 -1
- package/components/tags/index.esm.js +320 -306
- package/components/tags/index.umd.cjs +1 -1
- package/components/text/index.esm.js +245 -231
- package/components/text/index.umd.cjs +1 -1
- package/components/textarea/index.esm.js +260 -247
- package/components/textarea/index.umd.cjs +1 -1
- package/components/time-picker/index.esm.js +409 -396
- package/components/time-picker/index.umd.cjs +1 -1
- package/components/transfer/index.esm.js +424 -410
- package/components/transfer/index.umd.cjs +1 -1
- package/components/tree-grid/index.esm.js +2994 -3006
- package/components/tree-grid/index.umd.cjs +1 -1
- package/components/tree-view/index.esm.js +749 -733
- package/components/tree-view/index.umd.cjs +1 -1
- package/components/uploader/index.esm.js +325 -311
- package/components/uploader/index.umd.cjs +2 -2
- package/components/verify-detail/index.esm.js +304 -290
- package/components/verify-detail/index.umd.cjs +1 -1
- package/components/video/index.esm.js +99 -85
- package/components/video/index.umd.cjs +1 -1
- package/components/weather/index.esm.js +947 -933
- package/components/weather/index.umd.cjs +4 -4
- package/farris.all.esm.js +7750 -7990
- package/farris.all.umd.cjs +12 -12
- package/package.json +1 -1
- package/types/data-view/composition/types.d.ts +0 -1
- package/types/entity-binding-selector/composition/use-entity-tree.d.ts +3 -0
- package/types/entity-binding-selector/composition/use-field-tree.d.ts +1 -0
- package/components/event-parameter/index.css +0 -1
- package/types/data-grid/src/components/data/data-grid-area.component.d.ts +0 -8
- package/types/data-grid/src/components/data/data-grid-area.props.d.ts +0 -3
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
var Y = Object.defineProperty;
|
|
2
2
|
var _ = (e, n, t) => n in e ? Y(e, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[n] = t;
|
|
3
3
|
var h = (e, n, t) => _(e, typeof n != "symbol" ? n + "" : n, t);
|
|
4
|
-
import { ref as B, computed as T, watch as F, onMounted as L, nextTick as N, createVNode as w, reactive as K, withDirectives as ee, resolveDirective as te, defineComponent as W, Fragment as D, inject as
|
|
5
|
-
import { isPlainObject as
|
|
4
|
+
import { ref as B, computed as T, watch as F, onMounted as L, nextTick as N, createVNode as w, reactive as K, withDirectives as ee, resolveDirective as te, defineComponent as W, Fragment as D, inject as j } from "vue";
|
|
5
|
+
import { isPlainObject as U, cloneDeep as q } from "lodash-es";
|
|
6
6
|
import { useTextBox as ne, useClear as R, useTextBoxDesign as oe, withInstall as ie } from "../common/index.esm.js";
|
|
7
7
|
import { useNumber as se, useFormat as le, useSpinner as re, useTextBox as ae } from "../number-spinner/index.esm.js";
|
|
8
8
|
import { DgControl as $, useDesignerComponent as ue } from "../designer-canvas/index.esm.js";
|
|
9
9
|
const ce = {}, de = {};
|
|
10
10
|
function H(e) {
|
|
11
|
-
const { properties: n, title: t, ignore: s } = e,
|
|
12
|
-
if (t && (!
|
|
11
|
+
const { properties: n, title: t, ignore: s } = e, o = s && Array.isArray(s), a = Object.keys(n).reduce((r, y) => ((!o || !s.find((p) => p === y)) && (r[y] = n[y].type === "object" && n[y].properties ? H(n[y]) : q(n[y].default)), r), {});
|
|
12
|
+
if (t && (!o || !s.find((r) => r === "id"))) {
|
|
13
13
|
const r = t.toLowerCase().replace(/-/g, "_");
|
|
14
14
|
a.id = `${r}_${Math.random().toString().slice(2, 6)}`;
|
|
15
15
|
}
|
|
@@ -17,33 +17,33 @@ function H(e) {
|
|
|
17
17
|
}
|
|
18
18
|
function pe(e, n) {
|
|
19
19
|
const t = H(n);
|
|
20
|
-
return Object.keys(t).reduce((s,
|
|
20
|
+
return Object.keys(t).reduce((s, o) => (Object.prototype.hasOwnProperty.call(e, o) && (s[o] && U(s[o]) && U(e[o] || !e[o]) ? Object.assign(s[o], e[o] || {}) : s[o] = e[o]), s), t), t;
|
|
21
21
|
}
|
|
22
22
|
function me(e, n) {
|
|
23
|
-
return Object.keys(e).filter((s) => e[s] != null).reduce((s,
|
|
24
|
-
if (n.has(
|
|
25
|
-
const a = n.get(
|
|
23
|
+
return Object.keys(e).filter((s) => e[s] != null).reduce((s, o) => {
|
|
24
|
+
if (n.has(o)) {
|
|
25
|
+
const a = n.get(o);
|
|
26
26
|
if (typeof a == "string")
|
|
27
|
-
s[a] = e[
|
|
27
|
+
s[a] = e[o];
|
|
28
28
|
else {
|
|
29
|
-
const r = a(
|
|
29
|
+
const r = a(o, e[o], e);
|
|
30
30
|
Object.assign(s, r);
|
|
31
31
|
}
|
|
32
32
|
} else
|
|
33
|
-
s[
|
|
33
|
+
s[o] = e[o];
|
|
34
34
|
return s;
|
|
35
35
|
}, {});
|
|
36
36
|
}
|
|
37
|
-
function
|
|
37
|
+
function ye(e, n, t = /* @__PURE__ */ new Map()) {
|
|
38
38
|
const s = pe(e, n);
|
|
39
39
|
return me(s, t);
|
|
40
40
|
}
|
|
41
|
-
function
|
|
42
|
-
function n(l, c,
|
|
43
|
-
if (typeof
|
|
44
|
-
return d[l].length ===
|
|
45
|
-
if (typeof
|
|
46
|
-
const m = Object.keys(
|
|
41
|
+
function fe(e = {}) {
|
|
42
|
+
function n(l, c, i, d) {
|
|
43
|
+
if (typeof i == "number")
|
|
44
|
+
return d[l].length === i;
|
|
45
|
+
if (typeof i == "object") {
|
|
46
|
+
const m = Object.keys(i)[0], u = i[m];
|
|
47
47
|
if (m === "not")
|
|
48
48
|
return Number(d[l].length) !== Number(u);
|
|
49
49
|
if (m === "moreThan")
|
|
@@ -53,46 +53,46 @@ function ye(e = {}) {
|
|
|
53
53
|
}
|
|
54
54
|
return !1;
|
|
55
55
|
}
|
|
56
|
-
function t(l, c,
|
|
57
|
-
return d[l] && d[l].propertyValue && String(d[l].propertyValue.value) === String(
|
|
56
|
+
function t(l, c, i, d) {
|
|
57
|
+
return d[l] && d[l].propertyValue && String(d[l].propertyValue.value) === String(i);
|
|
58
58
|
}
|
|
59
59
|
const s = /* @__PURE__ */ new Map([
|
|
60
60
|
["length", n],
|
|
61
61
|
["getProperty", t]
|
|
62
62
|
]);
|
|
63
63
|
Object.keys(e).reduce((l, c) => (l.set(c, e[c]), l), s);
|
|
64
|
-
function
|
|
65
|
-
const
|
|
66
|
-
return typeof c == "number" ? [{ target:
|
|
64
|
+
function o(l, c) {
|
|
65
|
+
const i = l;
|
|
66
|
+
return typeof c == "number" ? [{ target: i, operator: "length", param: null, value: Number(c) }] : typeof c == "boolean" ? [{ target: i, operator: "getProperty", param: l, value: !!c }] : typeof c == "object" ? Object.keys(c).map((d) => {
|
|
67
67
|
if (d === "length")
|
|
68
|
-
return { target:
|
|
68
|
+
return { target: i, operator: "length", param: null, value: c[d] };
|
|
69
69
|
const m = d, u = c[d];
|
|
70
|
-
return { target:
|
|
70
|
+
return { target: i, operator: "getProperty", param: m, value: u };
|
|
71
71
|
}) : [];
|
|
72
72
|
}
|
|
73
73
|
function a(l) {
|
|
74
|
-
return Object.keys(l).reduce((
|
|
75
|
-
const m =
|
|
76
|
-
return
|
|
74
|
+
return Object.keys(l).reduce((i, d) => {
|
|
75
|
+
const m = o(d, l[d]);
|
|
76
|
+
return i.push(...m), i;
|
|
77
77
|
}, []);
|
|
78
78
|
}
|
|
79
79
|
function r(l, c) {
|
|
80
80
|
if (s.has(l.operator)) {
|
|
81
|
-
const
|
|
82
|
-
return
|
|
81
|
+
const i = s.get(l.operator);
|
|
82
|
+
return i && i(l.target, l.param, l.value, c) || !1;
|
|
83
83
|
}
|
|
84
84
|
return !1;
|
|
85
85
|
}
|
|
86
|
-
function
|
|
86
|
+
function y(l, c) {
|
|
87
87
|
return a(l).reduce((m, u) => m && r(u, c), !0);
|
|
88
88
|
}
|
|
89
89
|
function p(l, c) {
|
|
90
|
-
const
|
|
90
|
+
const i = Object.keys(l), d = i.includes("allOf"), m = i.includes("anyOf"), u = d || m, b = (u ? l[u ? d ? "allOf" : "anyOf" : "allOf"] : [l]).map((M) => y(M, c));
|
|
91
91
|
return d ? !b.includes(!1) : b.includes(!0);
|
|
92
92
|
}
|
|
93
93
|
return { parseValueSchema: p };
|
|
94
94
|
}
|
|
95
|
-
const
|
|
95
|
+
const f = {
|
|
96
96
|
button: { type: "button", name: "按钮", icon: "Button" },
|
|
97
97
|
"response-toolbar": { type: "response-toolbar", name: "工具栏", icon: "ButtonGroup" },
|
|
98
98
|
"response-toolbar-item": { type: "response-toolbar-item", name: "按钮", icon: "Button" },
|
|
@@ -133,11 +133,11 @@ const y = {
|
|
|
133
133
|
fieldset: { type: "fieldset", name: "分组", icon: "fieldset" },
|
|
134
134
|
"query-solution": { type: "query-solution", name: "筛选方案", icon: "QueryScheme" }
|
|
135
135
|
}, ge = {}, he = {};
|
|
136
|
-
|
|
137
|
-
function be(e, n, t = /* @__PURE__ */ new Map(), s = (r,
|
|
138
|
-
return ce[n.title] = n, de[n.title] = s, ge[n.title] =
|
|
139
|
-
const
|
|
140
|
-
return Object.assign(p,
|
|
136
|
+
fe();
|
|
137
|
+
function be(e, n, t = /* @__PURE__ */ new Map(), s = (r, y, p, l) => y, o = {}, a = (r) => r) {
|
|
138
|
+
return ce[n.title] = n, de[n.title] = s, ge[n.title] = o, he[n.title] = a, (r = {}) => {
|
|
139
|
+
const y = ye(r, n, t), p = Object.keys(e).reduce((l, c) => (l[c] = e[c].default, l), {});
|
|
140
|
+
return Object.assign(p, y);
|
|
141
141
|
};
|
|
142
142
|
}
|
|
143
143
|
function ve(e, n) {
|
|
@@ -149,7 +149,7 @@ const Ce = /* @__PURE__ */ new Map([
|
|
|
149
149
|
function we(e, n, t) {
|
|
150
150
|
return n;
|
|
151
151
|
}
|
|
152
|
-
const Ie = "https://json-schema.org/draft/2020-12/schema", Be = "https://farris-design.gitee.io/input-group.schema.json", Te = "input-group",
|
|
152
|
+
const Ie = "https://json-schema.org/draft/2020-12/schema", Be = "https://farris-design.gitee.io/input-group.schema.json", Te = "input-group", ke = "A Farris Input Component", Me = "object", xe = {
|
|
153
153
|
id: {
|
|
154
154
|
description: "The unique identifier for a Input Group",
|
|
155
155
|
type: "string"
|
|
@@ -347,7 +347,6 @@ const Ie = "https://json-schema.org/draft/2020-12/schema", Be = "https://farris-
|
|
|
347
347
|
default: ""
|
|
348
348
|
}
|
|
349
349
|
}, Se = [
|
|
350
|
-
"id",
|
|
351
350
|
"type"
|
|
352
351
|
], Ee = [
|
|
353
352
|
"id",
|
|
@@ -358,8 +357,8 @@ const Ie = "https://json-schema.org/draft/2020-12/schema", Be = "https://farris-
|
|
|
358
357
|
$schema: Ie,
|
|
359
358
|
$id: Be,
|
|
360
359
|
title: Te,
|
|
361
|
-
description:
|
|
362
|
-
type:
|
|
360
|
+
description: ke,
|
|
361
|
+
type: Me,
|
|
363
362
|
properties: xe,
|
|
364
363
|
required: Se,
|
|
365
364
|
ignore: Ee
|
|
@@ -432,36 +431,36 @@ const Ie = "https://json-schema.org/draft/2020-12/schema", Be = "https://farris-
|
|
|
432
431
|
updateOn: { type: String, default: "blur" }
|
|
433
432
|
}, z = be(G, Fe, Ce, we);
|
|
434
433
|
function X(e, n) {
|
|
435
|
-
const t = B(e.groupText), s = T(() => e.showButtonWhenDisabled && (e.readonly || e.disabled)),
|
|
434
|
+
const t = B(e.groupText), s = T(() => e.showButtonWhenDisabled && (e.readonly || e.disabled)), o = T(() => e.enableClear || !!e.groupText);
|
|
436
435
|
return { appendedButtonClass: T(() => ({
|
|
437
436
|
"input-group-append": !0,
|
|
438
437
|
"append-force-show": s.value
|
|
439
|
-
})), appendedContent: t, shouldShowAppendedButton:
|
|
438
|
+
})), appendedContent: t, shouldShowAppendedButton: o };
|
|
440
439
|
}
|
|
441
440
|
function Q(e, n, t, s) {
|
|
442
|
-
const { appendedContent:
|
|
441
|
+
const { appendedContent: o } = s, a = B(e.enableViewPassword), r = T(() => e.type === "password"), y = '<span class="f-icon f-icon-eye" style="color: rgb(56, 143, 255);"></span>', p = '<span class="f-icon f-icon-eye"></span>', l = B(!1);
|
|
443
442
|
F(() => [e.readonly, e.disabled], ([d, m]) => {
|
|
444
|
-
r.value && (t.value = d || m ? "password" : t.value,
|
|
443
|
+
r.value && (t.value = d || m ? "password" : t.value, o.value = d || m ? p : o.value);
|
|
445
444
|
});
|
|
446
445
|
function c() {
|
|
447
|
-
return l.value = !l.value, t.value = l.value ? "text" : "password",
|
|
446
|
+
return l.value = !l.value, t.value = l.value ? "text" : "password", o.value = l.value ? y : p, !1;
|
|
448
447
|
}
|
|
449
|
-
function
|
|
450
|
-
t.value = r.value ? "password" : "text",
|
|
448
|
+
function i() {
|
|
449
|
+
t.value = r.value ? "password" : "text", o.value = r.value ? a.value ? p : "" : o.value;
|
|
451
450
|
}
|
|
452
|
-
return
|
|
451
|
+
return i(), { isPassword: r, onClickAppendedButton: c };
|
|
453
452
|
}
|
|
454
453
|
function Le(e, n, t) {
|
|
455
454
|
const s = B(), {
|
|
456
|
-
onBlurTextBox:
|
|
455
|
+
onBlurTextBox: o,
|
|
457
456
|
onFocusTextBox: a,
|
|
458
457
|
onInput: r,
|
|
459
|
-
onKeyDown:
|
|
458
|
+
onKeyDown: y,
|
|
460
459
|
textBoxValue: p
|
|
461
460
|
} = t, l = T(() => e.disabled || e.readonly || !e.editable ? "" : e.placeholder), c = T(() => ({
|
|
462
461
|
"form-control": !0,
|
|
463
462
|
"f-utils-fill": !0
|
|
464
|
-
})),
|
|
463
|
+
})), i = T(() => ({
|
|
465
464
|
"text-align": e.textAlign
|
|
466
465
|
}));
|
|
467
466
|
function d(g) {
|
|
@@ -478,26 +477,26 @@ function Le(e, n, t) {
|
|
|
478
477
|
}), () => w("input", {
|
|
479
478
|
ref: s,
|
|
480
479
|
class: c.value,
|
|
481
|
-
style:
|
|
480
|
+
style: i.value,
|
|
482
481
|
type: "text",
|
|
483
482
|
value: p.value,
|
|
484
483
|
disabled: e.disabled,
|
|
485
484
|
readonly: e.readonly || !e.editable,
|
|
486
485
|
placeholder: l.value,
|
|
487
|
-
onBlur:
|
|
486
|
+
onBlur: o,
|
|
488
487
|
onChange: d,
|
|
489
488
|
onFocus: u,
|
|
490
489
|
onInput: r,
|
|
491
|
-
onKeydown:
|
|
490
|
+
onKeydown: y
|
|
492
491
|
}, null);
|
|
493
492
|
}
|
|
494
493
|
function Pe(e, n, t) {
|
|
495
494
|
const {
|
|
496
495
|
canDownward: s,
|
|
497
|
-
canUpward:
|
|
496
|
+
canUpward: o,
|
|
498
497
|
onClickDownButton: a,
|
|
499
498
|
onClickUpButton: r
|
|
500
|
-
} = t,
|
|
499
|
+
} = t, y = T(() => ({
|
|
501
500
|
"input-group-append": !0,
|
|
502
501
|
"btn-group": !0,
|
|
503
502
|
"btn-group-number": !0
|
|
@@ -506,20 +505,20 @@ function Pe(e, n, t) {
|
|
|
506
505
|
"btn-secondary": !0,
|
|
507
506
|
"btn-number-flag": !0
|
|
508
507
|
})), l = T(() => ({
|
|
509
|
-
cursor:
|
|
508
|
+
cursor: o() ? "pointer" : "not-allowed",
|
|
510
509
|
"margin-left": 0
|
|
511
510
|
})), c = T(() => ({
|
|
512
511
|
cursor: s() ? "pointer" : "not-allowed",
|
|
513
512
|
"margin-left": 0
|
|
514
513
|
}));
|
|
515
514
|
return () => w("div", {
|
|
516
|
-
class:
|
|
515
|
+
class: y.value
|
|
517
516
|
}, [w("button", {
|
|
518
517
|
title: "upButton",
|
|
519
518
|
class: p.value,
|
|
520
519
|
style: l.value,
|
|
521
520
|
onClick: r,
|
|
522
|
-
disabled: !
|
|
521
|
+
disabled: !o()
|
|
523
522
|
}, [w("span", {
|
|
524
523
|
class: "f-icon f-icon-arrow-chevron-up number-arrow-chevron"
|
|
525
524
|
}, null)]), w("button", {
|
|
@@ -533,34 +532,34 @@ function Pe(e, n, t) {
|
|
|
533
532
|
}, null)])]);
|
|
534
533
|
}
|
|
535
534
|
function Ae(e, n) {
|
|
536
|
-
const t = se(e, n), s = le(e, n, t),
|
|
537
|
-
displayValue:
|
|
535
|
+
const t = se(e, n), s = le(e, n, t), o = re(e, n, s, t), a = ae(e, n, s, t, o), r = Pe(e, n, o), {
|
|
536
|
+
displayValue: y,
|
|
538
537
|
modelValue: p,
|
|
539
538
|
getRealValue: l
|
|
540
539
|
} = t, c = Le(e, n, a), {
|
|
541
|
-
format:
|
|
540
|
+
format: i
|
|
542
541
|
} = s, {
|
|
543
542
|
isFocus: d
|
|
544
543
|
} = a, m = T(() => !e.disabled && !e.readonly);
|
|
545
544
|
return L(() => {
|
|
546
545
|
const u = l(e.modelValue);
|
|
547
|
-
|
|
546
|
+
y.value = i(u);
|
|
548
547
|
}), F(() => [e.value], ([u]) => {
|
|
549
548
|
const g = l(u);
|
|
550
|
-
p.value = g,
|
|
549
|
+
p.value = g, y.value = i(g);
|
|
551
550
|
}), F(() => [e.modelValue], ([u]) => {
|
|
552
|
-
u !== p.value && (p.value = u, !d.value && (
|
|
551
|
+
u !== p.value && (p.value = u, !d.value && (y.value = i(l(u))));
|
|
553
552
|
}), F(() => [e.precision, e.useThousands, e.prefix, e.suffix, e.showZero], () => {
|
|
554
|
-
|
|
553
|
+
y.value = i(p.value);
|
|
555
554
|
}), () => w("div", {
|
|
556
555
|
class: "input-group f-state-hover flex-row f-cmp-number-spinner"
|
|
557
556
|
}, [c(), m.value && r()]);
|
|
558
557
|
}
|
|
559
558
|
function Ve(e, n, t, s) {
|
|
560
|
-
const
|
|
561
|
-
isPassword:
|
|
559
|
+
const o = B(), a = B(e.autocomplete), r = B(e.enableTitle), {
|
|
560
|
+
isPassword: y
|
|
562
561
|
} = t, p = B(e.minLength), l = B(e.maxLength), c = B(e.tabIndex), {
|
|
563
|
-
disabled:
|
|
562
|
+
disabled: i,
|
|
564
563
|
displayText: d,
|
|
565
564
|
inputType: m,
|
|
566
565
|
onBlur: u,
|
|
@@ -568,8 +567,8 @@ function Ve(e, n, t, s) {
|
|
|
568
567
|
onInput: v,
|
|
569
568
|
onClick: b,
|
|
570
569
|
onKeydown: C,
|
|
571
|
-
onKeyup:
|
|
572
|
-
onMousedown:
|
|
570
|
+
onKeyup: M,
|
|
571
|
+
onMousedown: k,
|
|
573
572
|
onTextBoxValueChange: x,
|
|
574
573
|
readonly: S,
|
|
575
574
|
placeholder: I,
|
|
@@ -579,17 +578,17 @@ function Ve(e, n, t, s) {
|
|
|
579
578
|
return L(() => {
|
|
580
579
|
e.selectOnCreated, e.focusOnCreated;
|
|
581
580
|
}), () => w("input", {
|
|
582
|
-
ref:
|
|
581
|
+
ref: o,
|
|
583
582
|
name: "input-group-value",
|
|
584
583
|
autocomplete: a.value,
|
|
585
584
|
class: V.value,
|
|
586
|
-
disabled:
|
|
585
|
+
disabled: i == null ? void 0 : i.value,
|
|
587
586
|
maxlength: l.value,
|
|
588
587
|
minlength: p.value,
|
|
589
588
|
placeholder: I.value,
|
|
590
589
|
readonly: S == null ? void 0 : S.value,
|
|
591
590
|
tabindex: c.value,
|
|
592
|
-
title: r.value && !
|
|
591
|
+
title: r.value && !y.value ? O.value : "",
|
|
593
592
|
type: m.value,
|
|
594
593
|
value: d == null ? void 0 : d.value,
|
|
595
594
|
onBlur: u,
|
|
@@ -598,33 +597,33 @@ function Ve(e, n, t, s) {
|
|
|
598
597
|
onFocus: g,
|
|
599
598
|
onInput: v,
|
|
600
599
|
onKeydown: C,
|
|
601
|
-
onKeyup:
|
|
602
|
-
onMousedown:
|
|
600
|
+
onKeyup: M,
|
|
601
|
+
onMousedown: k
|
|
603
602
|
}, null);
|
|
604
603
|
}
|
|
605
604
|
function Oe(e, n) {
|
|
606
605
|
const t = T(() => e.useExtendInfo && !!e.extendInfo), s = K({
|
|
607
606
|
content: e.extendInfo
|
|
608
607
|
});
|
|
609
|
-
function
|
|
608
|
+
function o() {
|
|
610
609
|
n.emit("updateExtendInfo");
|
|
611
610
|
}
|
|
612
611
|
return () => t.value && ee(w("span", {
|
|
613
612
|
class: "input-group-before-tips",
|
|
614
|
-
onMouseenter:
|
|
613
|
+
onMouseenter: o
|
|
615
614
|
}, [w("i", {
|
|
616
615
|
class: "f-icon f-icon-info-circle"
|
|
617
616
|
}, null), w("b", {
|
|
618
617
|
class: "tips-arrow"
|
|
619
618
|
}, null)]), [[te("tooltip"), s]]);
|
|
620
619
|
}
|
|
621
|
-
function Z(e, n, t, s,
|
|
620
|
+
function Z(e, n, t, s, o) {
|
|
622
621
|
const {
|
|
623
622
|
appendedButtonClass: a,
|
|
624
623
|
appendedContent: r
|
|
625
|
-
} = t,
|
|
624
|
+
} = t, y = T(() => e.showButtonWhenDisabled && (!e.editable || !e.readonly) && !e.disabled), p = T(() => r.value && !n.slots.groupTextTemplate), l = T(() => !!n.slots.groupTextTemplate), {
|
|
626
625
|
clearButtonClass: c,
|
|
627
|
-
clearButtonStyle:
|
|
626
|
+
clearButtonStyle: i,
|
|
628
627
|
onClearValue: d,
|
|
629
628
|
shouldShowClearButton: m
|
|
630
629
|
} = s;
|
|
@@ -632,7 +631,7 @@ function Z(e, n, t, s, i) {
|
|
|
632
631
|
return w("span", {
|
|
633
632
|
id: "clearIcon",
|
|
634
633
|
class: c.value,
|
|
635
|
-
style:
|
|
634
|
+
style: i.value,
|
|
636
635
|
onClick: (I) => d(I)
|
|
637
636
|
}, [w("i", {
|
|
638
637
|
class: "f-icon modal_close"
|
|
@@ -645,12 +644,12 @@ function Z(e, n, t, s, i) {
|
|
|
645
644
|
n.emit("iconMouseLeave", I);
|
|
646
645
|
}
|
|
647
646
|
function b(I) {
|
|
648
|
-
|
|
647
|
+
y.value && n.emit("clickHandle", {
|
|
649
648
|
originalEvent: I
|
|
650
649
|
}), I.stopPropagation();
|
|
651
650
|
}
|
|
652
|
-
const C = e.type === "password" ?
|
|
653
|
-
function
|
|
651
|
+
const C = e.type === "password" ? o.onClickAppendedButton : b;
|
|
652
|
+
function M() {
|
|
654
653
|
return w("span", {
|
|
655
654
|
class: "input-group-text",
|
|
656
655
|
onMouseenter: (I) => g(I),
|
|
@@ -659,11 +658,11 @@ function Z(e, n, t, s, i) {
|
|
|
659
658
|
onClick: (I) => C(I)
|
|
660
659
|
}, null);
|
|
661
660
|
}
|
|
662
|
-
function
|
|
661
|
+
function k() {
|
|
663
662
|
return n.slots.groupTextTemplate && n.slots.groupTextTemplate();
|
|
664
663
|
}
|
|
665
664
|
function x() {
|
|
666
|
-
return p.value ?
|
|
665
|
+
return p.value ? M : l.value ? k : "";
|
|
667
666
|
}
|
|
668
667
|
const S = x();
|
|
669
668
|
return () => w("div", {
|
|
@@ -675,31 +674,31 @@ const P = /* @__PURE__ */ W({
|
|
|
675
674
|
props: G,
|
|
676
675
|
emits: ["clear", "change", "blur", "click", "clickHandle", "focus", "input", "keydown", "keyup", "iconMouseEnter", "iconMouseLeave", "update:modelValue", "update:value", "updateExtendInfo", "valueChange"],
|
|
677
676
|
setup(e, n) {
|
|
678
|
-
const t = B(e.modelValue), s = B(e.modelValue),
|
|
677
|
+
const t = B(e.modelValue), s = B(e.modelValue), o = ne(e, n, t, s), {
|
|
679
678
|
inputGroupClass: a,
|
|
680
679
|
inputType: r,
|
|
681
|
-
inputGroupStyle:
|
|
682
|
-
} =
|
|
680
|
+
inputGroupStyle: y
|
|
681
|
+
} = o, p = X(e), {
|
|
683
682
|
shouldShowAppendedButton: l
|
|
684
|
-
} = p, c = R(e, n,
|
|
685
|
-
onMouseEnter:
|
|
683
|
+
} = p, c = R(e, n, o), {
|
|
684
|
+
onMouseEnter: i,
|
|
686
685
|
onMouseLeave: d
|
|
687
|
-
} = c, m = Q(e, n, r, p), u = Ae(e, n), g = Ve(e, n, m,
|
|
688
|
-
F(() => [e.value], ([
|
|
689
|
-
t.value =
|
|
690
|
-
}), F(() => [e.modelValue], ([
|
|
691
|
-
t.value =
|
|
686
|
+
} = c, m = Q(e, n, r, p), u = Ae(e, n), g = Ve(e, n, m, o), v = Z(e, n, p, c, m), b = Oe(e, n), C = T(() => e.type === "number");
|
|
687
|
+
F(() => [e.value], ([k]) => {
|
|
688
|
+
t.value = k, s.value = k;
|
|
689
|
+
}), F(() => [e.modelValue], ([k]) => {
|
|
690
|
+
t.value = k, s.value = k;
|
|
692
691
|
}), L(() => {
|
|
693
692
|
e.value && (t.value = e.value, s.value = e.value);
|
|
694
693
|
});
|
|
695
|
-
const
|
|
694
|
+
const M = () => w(D, null, [w("div", {
|
|
696
695
|
id: e.id,
|
|
697
696
|
class: a.value,
|
|
698
|
-
style:
|
|
699
|
-
onMouseenter:
|
|
697
|
+
style: y.value,
|
|
698
|
+
onMouseenter: i,
|
|
700
699
|
onMouseleave: d
|
|
701
700
|
}, [C.value ? u() : w(D, null, [b(), g(), l.value && v()])])]);
|
|
702
|
-
return () =>
|
|
701
|
+
return () => M();
|
|
703
702
|
}
|
|
704
703
|
});
|
|
705
704
|
class Ge {
|
|
@@ -731,8 +730,8 @@ class Ge {
|
|
|
731
730
|
const t = n.binding && n.binding.type === "Form" && n.binding.field;
|
|
732
731
|
if (t) {
|
|
733
732
|
if (!this.designViewModelField) {
|
|
734
|
-
const
|
|
735
|
-
this.designViewModelField =
|
|
733
|
+
const o = this.designViewModelUtils.getDgViewModel(this.viewModelId);
|
|
734
|
+
this.designViewModelField = o.fields.find((a) => a.id === t);
|
|
736
735
|
}
|
|
737
736
|
n.updateOn = (s = this.designViewModelField) == null ? void 0 : s.updateOn;
|
|
738
737
|
}
|
|
@@ -758,7 +757,7 @@ class Ge {
|
|
|
758
757
|
type: "combo-list",
|
|
759
758
|
textField: "name",
|
|
760
759
|
valueField: "value",
|
|
761
|
-
data: [{ value: n.type, name:
|
|
760
|
+
data: [{ value: n.type, name: f[n.type].name }]
|
|
762
761
|
}
|
|
763
762
|
}
|
|
764
763
|
}
|
|
@@ -794,8 +793,8 @@ class Ge {
|
|
|
794
793
|
const s = t && t.parent && t.parent.schema;
|
|
795
794
|
if (!s)
|
|
796
795
|
return;
|
|
797
|
-
const
|
|
798
|
-
s.contents.splice(
|
|
796
|
+
const o = s.contents.findIndex((r) => r.id === n), a = q(s.contents[o]);
|
|
797
|
+
s.contents.splice(o, 1), s.contents.splice(o, 0, a);
|
|
799
798
|
}
|
|
800
799
|
}
|
|
801
800
|
const E = class E {
|
|
@@ -813,7 +812,7 @@ const E = class E {
|
|
|
813
812
|
const n = [];
|
|
814
813
|
for (const t in E.fieldControlTypeMapping)
|
|
815
814
|
E.fieldControlTypeMapping[t].forEach((s) => {
|
|
816
|
-
n.find((
|
|
815
|
+
n.find((o) => o.key === s.key && o.value === s.value) || n.push({ key: s.key, value: s.value });
|
|
817
816
|
});
|
|
818
817
|
return n;
|
|
819
818
|
}
|
|
@@ -823,49 +822,49 @@ const E = class E {
|
|
|
823
822
|
*/
|
|
824
823
|
h(E, "fieldControlTypeMapping", {
|
|
825
824
|
String: [
|
|
826
|
-
{ key:
|
|
827
|
-
{ key:
|
|
828
|
-
{ key:
|
|
829
|
-
{ key:
|
|
830
|
-
{ key:
|
|
831
|
-
{ key:
|
|
832
|
-
{ key:
|
|
833
|
-
{ key:
|
|
825
|
+
{ key: f["input-group"].type, value: f["input-group"].name },
|
|
826
|
+
{ key: f.lookup.type, value: f.lookup.name },
|
|
827
|
+
{ key: f["date-picker"].type, value: f["date-picker"].name },
|
|
828
|
+
{ key: f["check-box"].type, value: f["check-box"].name },
|
|
829
|
+
{ key: f["check-group"].type, value: f["check-group"].name },
|
|
830
|
+
{ key: f["radio-group"].type, value: f["radio-group"].name },
|
|
831
|
+
{ key: f["combo-list"].type, value: f["combo-list"].name },
|
|
832
|
+
{ key: f.textarea.type, value: f.textarea.name }
|
|
834
833
|
],
|
|
835
834
|
Text: [
|
|
836
|
-
{ key:
|
|
837
|
-
{ key:
|
|
835
|
+
{ key: f.textarea.type, value: f.textarea.name },
|
|
836
|
+
{ key: f.lookup.type, value: f.lookup.name }
|
|
838
837
|
],
|
|
839
838
|
Decimal: [
|
|
840
|
-
{ key:
|
|
839
|
+
{ key: f["number-spinner"].type, value: f["number-spinner"].name }
|
|
841
840
|
],
|
|
842
841
|
Integer: [
|
|
843
|
-
{ key:
|
|
842
|
+
{ key: f["number-spinner"].type, value: f["number-spinner"].name }
|
|
844
843
|
],
|
|
845
844
|
Number: [
|
|
846
|
-
{ key:
|
|
845
|
+
{ key: f["number-spinner"].type, value: f["number-spinner"].name }
|
|
847
846
|
],
|
|
848
847
|
BigNumber: [
|
|
849
|
-
{ key:
|
|
848
|
+
{ key: f["number-spinner"].type, value: f["number-spinner"].name }
|
|
850
849
|
],
|
|
851
850
|
Date: [
|
|
852
|
-
{ key:
|
|
851
|
+
{ key: f["date-picker"].type, value: f["date-picker"].name }
|
|
853
852
|
],
|
|
854
853
|
DateTime: [
|
|
855
|
-
{ key:
|
|
854
|
+
{ key: f["date-picker"].type, value: f["date-picker"].name }
|
|
856
855
|
],
|
|
857
856
|
Boolean: [
|
|
858
|
-
{ key:
|
|
859
|
-
{ key:
|
|
857
|
+
{ key: f.switch.type, value: f.switch.name },
|
|
858
|
+
{ key: f["check-box"].type, value: f["check-box"].name }
|
|
860
859
|
],
|
|
861
860
|
Enum: [
|
|
862
|
-
{ key:
|
|
863
|
-
{ key:
|
|
861
|
+
{ key: f["combo-list"].type, value: f["combo-list"].name },
|
|
862
|
+
{ key: f["radio-group"].type, value: f["radio-group"].name }
|
|
864
863
|
],
|
|
865
864
|
Object: [
|
|
866
|
-
{ key:
|
|
867
|
-
{ key:
|
|
868
|
-
{ key:
|
|
865
|
+
{ key: f.lookup.type, value: f.lookup.name },
|
|
866
|
+
{ key: f["combo-list"].type, value: f["combo-list"].name },
|
|
867
|
+
{ key: f["radio-group"].type, value: f["radio-group"].name }
|
|
869
868
|
]
|
|
870
869
|
});
|
|
871
870
|
let A = E;
|
|
@@ -900,58 +899,58 @@ class De {
|
|
|
900
899
|
h(this, "fieldSetId", "");
|
|
901
900
|
}
|
|
902
901
|
}
|
|
903
|
-
function
|
|
902
|
+
function je(e) {
|
|
904
903
|
let n, t;
|
|
905
904
|
const s = /* @__PURE__ */ new Map();
|
|
906
|
-
let
|
|
907
|
-
function a(c,
|
|
905
|
+
let o = [];
|
|
906
|
+
function a(c, i) {
|
|
908
907
|
const m = c.split(" ").filter((C) => C.startsWith("col-"));
|
|
909
908
|
if (m.length === 0) {
|
|
910
|
-
|
|
909
|
+
i.isSupportedClass = !1;
|
|
911
910
|
return;
|
|
912
911
|
}
|
|
913
912
|
let u = m.find((C) => /^col-([1-9]|10|11|12)$/.test(C)), g = m.find((C) => /^col-md-([1-9]|10|11|12)$/.test(C)), v = m.find((C) => /^col-xl-([1-9]|10|11|12)$/.test(C)), b = m.find((C) => /^col-el-([1-9]|10|11|12)$/.test(C));
|
|
914
|
-
u = u || "col-12",
|
|
913
|
+
u = u || "col-12", i.columnInSM = parseInt(u.replace("col-", ""), 10), i.displayWidthInSM = i.columnInSM / 12, i.displayWidthInSM !== 1 && (i.isSupportedClass = !1), g = g || "col-md-" + i.columnInSM, i.columnInMD = parseInt(g.replace("col-md-", ""), 10), i.displayWidthInMD = i.columnInMD / 6, [1, 2].includes(i.displayWidthInMD) || (i.isSupportedClass = !1), v = v || "col-xl-" + i.columnInMD, i.columnInLG = parseInt(v.replace("col-xl-", ""), 10), i.displayWidthInLG = i.columnInLG / 3, [1, 2, 3, 4].includes(i.displayWidthInLG) || (i.isSupportedClass = !1), b = b || "col-el-" + i.columnInLG, i.columnInEL = parseInt(b.replace("col-el-", ""), 10), i.displayWidthInEL = i.columnInEL / 2, [1, 2, 3, 4, 5, 6].includes(i.displayWidthInEL) || (i.isSupportedClass = !1);
|
|
915
914
|
}
|
|
916
|
-
function r(c,
|
|
915
|
+
function r(c, i, d, m = !1) {
|
|
917
916
|
let u = !1;
|
|
918
917
|
c.contents.forEach((g) => {
|
|
919
918
|
if (g.type === "fieldset") {
|
|
920
|
-
d += 1, r(g,
|
|
919
|
+
d += 1, r(g, i, d, !0), u = !0;
|
|
921
920
|
return;
|
|
922
921
|
}
|
|
923
922
|
u && (d += 1, u = !1);
|
|
924
923
|
const v = g.appearance && g.appearance.class, b = new De();
|
|
925
|
-
v ? a(v, b) : b.isSupportedClass = !1, b.label = g.label || g.id, b.id = g.id, b.group = d, m && (b.fieldSetId = c.id), t === g.id && (n = d), s.set(g.id, g),
|
|
924
|
+
v ? a(v, b) : b.isSupportedClass = !1, b.label = g.label || g.id, b.id = g.id, b.group = d, m && (b.fieldSetId = c.id), t === g.id && (n = d), s.set(g.id, g), i.push(b);
|
|
926
925
|
});
|
|
927
926
|
}
|
|
928
|
-
function
|
|
929
|
-
const
|
|
930
|
-
if (!
|
|
927
|
+
function y(c) {
|
|
928
|
+
const i = e.getComponentById(c);
|
|
929
|
+
if (!i || !i.componentType || !i.componentType.startsWith("form"))
|
|
931
930
|
return { result: !1, message: "只可以在响应式表单组件中调整响应式布局配置" };
|
|
932
|
-
const d = e.selectNode(
|
|
931
|
+
const d = e.selectNode(i, (m) => m.type === $["response-form"].type);
|
|
933
932
|
return !d || !d.contents || d.contents.length === 0 ? { result: !1, message: "Form区域内没有控件,请先添加控件" } : { result: !0, message: "", formNode: d };
|
|
934
933
|
}
|
|
935
|
-
function p(c,
|
|
936
|
-
|
|
937
|
-
const { result: d, message: m, formNode: u } =
|
|
934
|
+
function p(c, i) {
|
|
935
|
+
i = i || c.id;
|
|
936
|
+
const { result: d, message: m, formNode: u } = y(i);
|
|
938
937
|
if (!d)
|
|
939
938
|
return { result: d, message: m };
|
|
940
|
-
t = c.id,
|
|
939
|
+
t = c.id, o = [], s.clear();
|
|
941
940
|
const g = u.contents[0].type === $.fieldset.type ? 0 : 1;
|
|
942
|
-
r(u,
|
|
943
|
-
const v =
|
|
941
|
+
r(u, o, g);
|
|
942
|
+
const v = o.find((C) => !C.isSupportedClass);
|
|
944
943
|
return {
|
|
945
944
|
defaultState: {
|
|
946
945
|
defaultGroupNumber: n || 1,
|
|
947
946
|
model: v ? "customize" : "standard"
|
|
948
947
|
},
|
|
949
|
-
importData:
|
|
948
|
+
importData: o
|
|
950
949
|
};
|
|
951
950
|
}
|
|
952
|
-
function l(c,
|
|
953
|
-
|
|
954
|
-
const { result: d, formNode: m } =
|
|
951
|
+
function l(c, i) {
|
|
952
|
+
i = i;
|
|
953
|
+
const { result: d, formNode: m } = y(i);
|
|
955
954
|
if (!d)
|
|
956
955
|
return "";
|
|
957
956
|
const u = [];
|
|
@@ -959,36 +958,36 @@ function Ue(e) {
|
|
|
959
958
|
var C;
|
|
960
959
|
const v = s.get(g.id), b = v.appearance && v.appearance.class;
|
|
961
960
|
if (b) {
|
|
962
|
-
const
|
|
961
|
+
const k = b.split(" ").filter((J) => !J.startsWith("col-")), x = "col-" + g.columnInSM, S = "col-md-" + g.columnInMD, I = "col-xl-" + g.columnInLG, V = "col-el-" + g.columnInEL, O = [x, S, I, V].concat(k);
|
|
963
962
|
v.appearance.class = O.join(" ");
|
|
964
963
|
}
|
|
965
964
|
if (g.fieldSetId) {
|
|
966
|
-
const
|
|
967
|
-
|
|
965
|
+
const M = m.contents.find((x) => x.id === g.fieldSetId), k = u.find((x) => x.id === g.fieldSetId);
|
|
966
|
+
k ? (C = k.contents) == null || C.push(v) : (u.push(M), M.contents = [v]);
|
|
968
967
|
} else
|
|
969
968
|
u.push(v);
|
|
970
969
|
}), m.contents = u, m.id;
|
|
971
970
|
}
|
|
972
971
|
return {
|
|
973
|
-
checkCanFindFormNode:
|
|
972
|
+
checkCanFindFormNode: y,
|
|
974
973
|
checkCanOpenLayoutEditor: p,
|
|
975
974
|
changeFormControlsByResponseLayoutConfig: l,
|
|
976
975
|
getResonseFormLayoutConfig: r
|
|
977
976
|
};
|
|
978
977
|
}
|
|
979
|
-
class
|
|
978
|
+
class Ue extends Ge {
|
|
980
979
|
constructor(t, s) {
|
|
981
980
|
super(t, s);
|
|
982
981
|
h(this, "responseLayoutEditorFunction");
|
|
983
|
-
this.responseLayoutEditorFunction =
|
|
982
|
+
this.responseLayoutEditorFunction = je(this.formSchemaUtils);
|
|
984
983
|
}
|
|
985
984
|
getPropertyConfig(t, s) {
|
|
986
985
|
return this.propertyConfig.categories.basic = this.getBasicProperties(t, s), this.propertyConfig.categories.appearance = this.getAppearanceProperties(t, s), this.propertyConfig.categories.editor = this.getEditorProperties(t), this.propertyConfig;
|
|
987
986
|
}
|
|
988
987
|
getBasicProperties(t, s) {
|
|
989
988
|
var a;
|
|
990
|
-
const
|
|
991
|
-
return this.setDesignViewModelField(t),
|
|
989
|
+
const o = this;
|
|
990
|
+
return this.setDesignViewModelField(t), {
|
|
992
991
|
description: "Basic Information",
|
|
993
992
|
title: "基本信息",
|
|
994
993
|
properties: {
|
|
@@ -1009,7 +1008,7 @@ class je extends Ge {
|
|
|
1009
1008
|
textField: "value",
|
|
1010
1009
|
valueField: "key",
|
|
1011
1010
|
editable: !1,
|
|
1012
|
-
data:
|
|
1011
|
+
data: o.designViewModelField ? A.getEditorTypesByMDataType((a = o.designViewModelField.type) == null ? void 0 : a.name) : A.getAllInputTypes()
|
|
1013
1012
|
}
|
|
1014
1013
|
},
|
|
1015
1014
|
label: {
|
|
@@ -1034,11 +1033,11 @@ class je extends Ge {
|
|
|
1034
1033
|
}
|
|
1035
1034
|
}
|
|
1036
1035
|
},
|
|
1037
|
-
setPropertyRelates(r,
|
|
1036
|
+
setPropertyRelates(r, y) {
|
|
1038
1037
|
if (r)
|
|
1039
1038
|
switch (r && r.propertyID) {
|
|
1040
1039
|
case "type": {
|
|
1041
|
-
|
|
1040
|
+
o.changeControlType(t, r, s);
|
|
1042
1041
|
break;
|
|
1043
1042
|
}
|
|
1044
1043
|
case "label": {
|
|
@@ -1050,7 +1049,7 @@ class je extends Ge {
|
|
|
1050
1049
|
};
|
|
1051
1050
|
}
|
|
1052
1051
|
getAppearanceProperties(t, s) {
|
|
1053
|
-
const
|
|
1052
|
+
const o = this;
|
|
1054
1053
|
return {
|
|
1055
1054
|
title: "样式",
|
|
1056
1055
|
description: "Appearance",
|
|
@@ -1076,7 +1075,7 @@ class je extends Ge {
|
|
|
1076
1075
|
refreshPanelAfterChanged: !0,
|
|
1077
1076
|
editor: {
|
|
1078
1077
|
type: "response-layout-editor-setting",
|
|
1079
|
-
initialState:
|
|
1078
|
+
initialState: o.responseLayoutEditorFunction.checkCanOpenLayoutEditor(t, o.componentId)
|
|
1080
1079
|
}
|
|
1081
1080
|
}
|
|
1082
1081
|
},
|
|
@@ -1084,10 +1083,10 @@ class je extends Ge {
|
|
|
1084
1083
|
if (a)
|
|
1085
1084
|
switch (a && a.propertyID) {
|
|
1086
1085
|
case "responseLayout":
|
|
1087
|
-
|
|
1086
|
+
o.responseLayoutEditorFunction.changeFormControlsByResponseLayoutConfig(a.propertyValue, o.componentId || t.id), o.updateUnifiedLayoutAfterResponseLayoutChanged(o.componentId), o.updateElementByParentContainer(t.id, s), delete t.responseLayout;
|
|
1088
1087
|
break;
|
|
1089
1088
|
case "class":
|
|
1090
|
-
|
|
1089
|
+
o.updateUnifiedLayoutAfterControlChanged(a.propertyValue, t.id, this.componentId), o.updateElementByParentContainer(t.id, s);
|
|
1091
1090
|
break;
|
|
1092
1091
|
}
|
|
1093
1092
|
}
|
|
@@ -1101,12 +1100,12 @@ class je extends Ge {
|
|
|
1101
1100
|
* @param propertyData 控件DOM属性
|
|
1102
1101
|
* @param newControlType 新控件类型
|
|
1103
1102
|
*/
|
|
1104
|
-
changeControlType(t, s,
|
|
1105
|
-
var c,
|
|
1106
|
-
const a = s.propertyValue, r =
|
|
1103
|
+
changeControlType(t, s, o) {
|
|
1104
|
+
var c, i, d, m;
|
|
1105
|
+
const a = s.propertyValue, r = o && o.parent && o.parent.schema;
|
|
1107
1106
|
if (!r)
|
|
1108
1107
|
return;
|
|
1109
|
-
const
|
|
1108
|
+
const y = r.contents.findIndex((u) => u.id === t.id), p = r.contents[y];
|
|
1110
1109
|
let l;
|
|
1111
1110
|
this.designViewModelField && (this.designViewModelUtils.getDgViewModel(this.viewModelId).changeField(this.designViewModelField.id, {
|
|
1112
1111
|
editor: {
|
|
@@ -1125,14 +1124,14 @@ class je extends Ge {
|
|
|
1125
1124
|
}), Object.assign(l.editor, {
|
|
1126
1125
|
isTextArea: l.isTextArea && p.isTextArea,
|
|
1127
1126
|
placeholder: (c = p.editor) == null ? void 0 : c.placeholder,
|
|
1128
|
-
holdPlace: (
|
|
1127
|
+
holdPlace: (i = p.editor) == null ? void 0 : i.holdPlace,
|
|
1129
1128
|
readonly: (d = p.editor) == null ? void 0 : d.readonly,
|
|
1130
1129
|
require: (m = p.editor) == null ? void 0 : m.require
|
|
1131
|
-
}), r.contents.splice(
|
|
1130
|
+
}), r.contents.splice(y, 1), r.contents.splice(y, 0, l), o.schema = Object.assign(p, l), Array.from(document.getElementsByClassName("dgComponentSelected")).forEach(
|
|
1132
1131
|
(u) => u.classList.remove("dgComponentSelected")
|
|
1133
1132
|
), Ne.value++;
|
|
1134
1133
|
}
|
|
1135
|
-
getComponentConfig(t, s = {},
|
|
1134
|
+
getComponentConfig(t, s = {}, o = {}) {
|
|
1136
1135
|
const a = Object.assign({
|
|
1137
1136
|
description: "编辑器",
|
|
1138
1137
|
title: "编辑器",
|
|
@@ -1159,7 +1158,7 @@ class je extends Ge {
|
|
|
1159
1158
|
title: "提示文本",
|
|
1160
1159
|
type: "string"
|
|
1161
1160
|
}
|
|
1162
|
-
},
|
|
1161
|
+
}, o);
|
|
1163
1162
|
return { ...a, properties: { ...r } };
|
|
1164
1163
|
}
|
|
1165
1164
|
/**
|
|
@@ -1168,18 +1167,18 @@ class je extends Ge {
|
|
|
1168
1167
|
* @param controlId 控件Id
|
|
1169
1168
|
* @param componentId 控件所在组件id
|
|
1170
1169
|
*/
|
|
1171
|
-
updateUnifiedLayoutAfterControlChanged(t, s,
|
|
1170
|
+
updateUnifiedLayoutAfterControlChanged(t, s, o) {
|
|
1172
1171
|
const a = t.split(" ");
|
|
1173
|
-
let r = a.find((
|
|
1174
|
-
r = r || "col-12",
|
|
1172
|
+
let r = a.find((i) => /^col-([1-9]|10|11|12)$/.test(i)), y = a.find((i) => /^col-md-([1-9]|10|11|12)$/.test(i)), p = a.find((i) => /^col-xl-([1-9]|10|11|12)$/.test(i)), l = a.find((i) => /^col-el-([1-9]|10|11|12)$/.test(i));
|
|
1173
|
+
r = r || "col-12", y = y || "col-md-" + r.replace("col-", ""), p = p || "col-xl-" + y.replace("col-md-", ""), l = l || "col-el-" + p.replace("col-xl-", "");
|
|
1175
1174
|
const c = {
|
|
1176
1175
|
id: s,
|
|
1177
1176
|
columnInSM: parseInt(r.replace("col-", ""), 10),
|
|
1178
|
-
columnInMD: parseInt(
|
|
1177
|
+
columnInMD: parseInt(y.replace("col-md-", ""), 10),
|
|
1179
1178
|
columnInLG: parseInt(p.replace("col-xl-", ""), 10),
|
|
1180
1179
|
columnInEL: parseInt(l.replace("col-el-", ""), 10)
|
|
1181
1180
|
};
|
|
1182
|
-
this.updateUnifiedLayoutAfterResponseLayoutChanged(
|
|
1181
|
+
this.updateUnifiedLayoutAfterResponseLayoutChanged(o, c);
|
|
1183
1182
|
}
|
|
1184
1183
|
/**
|
|
1185
1184
|
* 修改控件布局配置后更新Form统一布局配置
|
|
@@ -1187,18 +1186,18 @@ class je extends Ge {
|
|
|
1187
1186
|
* @param controlLayoutConfig 某单独变动的控件配置项,FormResponseLayoutContext类型
|
|
1188
1187
|
*/
|
|
1189
1188
|
updateUnifiedLayoutAfterResponseLayoutChanged(t, s) {
|
|
1190
|
-
const { formNode:
|
|
1191
|
-
if (!
|
|
1189
|
+
const { formNode: o } = this.responseLayoutEditorFunction.checkCanFindFormNode(t);
|
|
1190
|
+
if (!o || !o.unifiedLayout)
|
|
1192
1191
|
return;
|
|
1193
1192
|
const a = [];
|
|
1194
|
-
if (this.responseLayoutEditorFunction.getResonseFormLayoutConfig(
|
|
1193
|
+
if (this.responseLayoutEditorFunction.getResonseFormLayoutConfig(o, a, 1), s) {
|
|
1195
1194
|
const u = a.find((g) => g.id === s.id);
|
|
1196
1195
|
Object.assign(u || {}, s);
|
|
1197
1196
|
}
|
|
1198
|
-
const r = a.map((u) => u.columnInSM),
|
|
1199
|
-
Object.assign(
|
|
1197
|
+
const r = a.map((u) => u.columnInSM), y = a.map((u) => u.columnInMD), p = a.map((u) => u.columnInLG), l = a.map((u) => u.columnInEL), c = this.checkIsUniqueColumn(r) ? r[0] : null, i = this.checkIsUniqueColumn(y) ? y[0] : null, d = this.checkIsUniqueColumn(p) ? p[0] : null, m = this.checkIsUniqueColumn(l) ? l[0] : null;
|
|
1198
|
+
Object.assign(o.unifiedLayout, {
|
|
1200
1199
|
uniqueColClassInSM: c,
|
|
1201
|
-
uniqueColClassInMD:
|
|
1200
|
+
uniqueColClassInMD: i,
|
|
1202
1201
|
uniqueColClassInLG: d,
|
|
1203
1202
|
uniqueColClassInEL: m
|
|
1204
1203
|
});
|
|
@@ -1211,15 +1210,15 @@ class je extends Ge {
|
|
|
1211
1210
|
return Array.from(s).length === 1;
|
|
1212
1211
|
}
|
|
1213
1212
|
}
|
|
1214
|
-
class $e extends
|
|
1213
|
+
class $e extends Ue {
|
|
1215
1214
|
constructor(n, t) {
|
|
1216
1215
|
super(n, t);
|
|
1217
1216
|
}
|
|
1218
1217
|
}
|
|
1219
1218
|
function We(e, n) {
|
|
1220
1219
|
const t = e.schema;
|
|
1221
|
-
function s(
|
|
1222
|
-
return new $e(
|
|
1220
|
+
function s(o, a) {
|
|
1221
|
+
return new $e(o, n).getPropertyConfig(t, a);
|
|
1223
1222
|
}
|
|
1224
1223
|
return { getPropsConfig: s };
|
|
1225
1224
|
}
|
|
@@ -1228,33 +1227,33 @@ const qe = /* @__PURE__ */ W({
|
|
|
1228
1227
|
props: G,
|
|
1229
1228
|
emits: ["updateExtendInfo", "clear", "valueChange", "clickHandle", "blurHandle", "focusHandle", "enterHandle", "iconMouseEnter", "iconMouseLeave", "keyupHandle", "keydownHandle", "inputClick"],
|
|
1230
1229
|
setup(e, n) {
|
|
1231
|
-
const t = B(e.modelValue), s = B(e.modelValue),
|
|
1230
|
+
const t = B(e.modelValue), s = B(e.modelValue), o = oe(e, n, t, s), {
|
|
1232
1231
|
inputGroupClass: a,
|
|
1233
1232
|
inputType: r,
|
|
1234
|
-
inputGroupStyle:
|
|
1235
|
-
} =
|
|
1233
|
+
inputGroupStyle: y
|
|
1234
|
+
} = o, p = X(e), {
|
|
1236
1235
|
shouldShowAppendedButton: l
|
|
1237
|
-
} = p, c = R(e, n,
|
|
1238
|
-
onMouseEnter:
|
|
1236
|
+
} = p, c = R(e, n, o), {
|
|
1237
|
+
onMouseEnter: i,
|
|
1239
1238
|
onMouseLeave: d
|
|
1240
|
-
} = c, m = Q(e, n, r, p), u = B(), g =
|
|
1239
|
+
} = c, m = Q(e, n, r, p), u = B(), g = j("designer-host-service"), v = j("design-item-context"), b = We(v, g), C = ue(u, v, b);
|
|
1241
1240
|
L(() => {
|
|
1242
1241
|
u.value.componentInstance = C;
|
|
1243
1242
|
}), n.expose(C.value);
|
|
1244
|
-
const
|
|
1243
|
+
const M = Z(e, n, p, c, m), k = B();
|
|
1245
1244
|
return () => w("div", {
|
|
1246
1245
|
id: "inputGroup",
|
|
1247
1246
|
ref: u,
|
|
1248
1247
|
class: a.value,
|
|
1249
|
-
style:
|
|
1250
|
-
onMouseenter:
|
|
1248
|
+
style: y.value,
|
|
1249
|
+
onMouseenter: i,
|
|
1251
1250
|
onMouseleave: d
|
|
1252
1251
|
}, [w("input", {
|
|
1253
|
-
ref:
|
|
1252
|
+
ref: k,
|
|
1254
1253
|
class: "form-control",
|
|
1255
1254
|
readonly: !0,
|
|
1256
1255
|
placeholder: e.placeholder
|
|
1257
|
-
}, null), l.value &&
|
|
1256
|
+
}, null), l.value && M()]);
|
|
1258
1257
|
}
|
|
1259
1258
|
});
|
|
1260
1259
|
P.register = (e, n, t, s) => {
|