@farris/ui-vue 1.2.6 → 1.2.7
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 +147 -139
- package/components/accordion/index.umd.cjs +1 -1
- package/components/avatar/index.esm.js +11 -28
- package/components/avatar/index.umd.cjs +1 -1
- package/components/checkbox/index.esm.js +33 -50
- package/components/checkbox/index.umd.cjs +1 -1
- package/components/combo-list/index.esm.js +183 -171
- package/components/combo-list/index.umd.cjs +1 -1
- package/components/condition/index.esm.js +236 -235
- package/components/condition/index.umd.cjs +1 -1
- package/components/data-grid/index.esm.js +1531 -1560
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/data-view/index.esm.js +1299 -1300
- package/components/data-view/index.umd.cjs +1 -1
- package/components/date-picker/index.esm.js +235 -252
- package/components/date-picker/index.umd.cjs +1 -1
- package/components/dynamic-form/index.esm.js +127 -143
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/dynamic-view/index.esm.js +206 -201
- package/components/dynamic-view/index.umd.cjs +1 -1
- package/components/external-container/index.esm.js +650 -647
- package/components/external-container/index.umd.cjs +1 -1
- package/components/field-selector/index.esm.js +1101 -1131
- package/components/field-selector/index.umd.cjs +1 -1
- package/components/filter-bar/index.esm.js +335 -332
- package/components/filter-bar/index.umd.cjs +1 -1
- package/components/input-group/index.esm.js +128 -145
- package/components/input-group/index.umd.cjs +1 -1
- package/components/list-view/index.esm.js +306 -303
- package/components/list-view/index.umd.cjs +1 -1
- package/components/lookup/index.esm.js +2470 -2469
- package/components/lookup/index.umd.cjs +1 -1
- package/components/mapping-editor/index.esm.js +1928 -1958
- package/components/mapping-editor/index.umd.cjs +1 -1
- package/components/order/index.esm.js +802 -788
- package/components/order/index.umd.cjs +1 -1
- package/components/page-header/index.esm.js +116 -137
- package/components/page-header/index.umd.cjs +1 -1
- package/components/property-editor/index.esm.js +533 -521
- package/components/property-editor/index.umd.cjs +2 -2
- package/components/property-panel/index.esm.js +178 -177
- package/components/property-panel/index.umd.cjs +1 -1
- package/components/radio-group/index.esm.js +56 -73
- package/components/radio-group/index.umd.cjs +1 -1
- package/components/response-layout-editor/index.esm.js +547 -518
- package/components/response-layout-editor/index.umd.cjs +1 -1
- package/components/response-toolbar/index.esm.js +260 -281
- package/components/response-toolbar/index.umd.cjs +1 -1
- package/components/schema-selector/index.esm.js +598 -617
- package/components/schema-selector/index.umd.cjs +2 -2
- package/components/switch/index.esm.js +137 -154
- package/components/switch/index.umd.cjs +1 -1
- package/components/tabs/index.esm.js +109 -130
- package/components/tabs/index.umd.cjs +1 -1
- package/components/textarea/index.esm.js +103 -120
- package/components/textarea/index.umd.cjs +1 -1
- package/components/time-picker/index.esm.js +172 -189
- package/components/time-picker/index.umd.cjs +1 -1
- package/components/transfer/index.esm.js +124 -122
- package/components/transfer/index.umd.cjs +1 -1
- package/components/tree-grid/index.esm.js +1600 -1630
- package/components/tree-grid/index.umd.cjs +1 -1
- package/components/tree-view/index.esm.js +245 -246
- package/components/tree-view/index.umd.cjs +1 -1
- package/farris.all.esm.js +4123 -4112
- package/farris.all.umd.cjs +8 -8
- package/package.json +1 -1
- package/types/combo-list/src/components/list-container.component.d.ts +6 -0
- package/types/combo-list/src/components/list-container.props.d.ts +9 -1
- package/types/data-grid/src/data-grid.props.d.ts +1 -0
- package/types/lookup/src/property-config/converters/lookup-property.converter.d.ts +0 -4
- package/types/lookup/src/property-config/lookup.property-config.d.ts +2 -2
- package/types/property-panel/src/composition/entity/base-property.d.ts +0 -16
- package/types/property-panel/src/composition/entity/input-base-property.d.ts +21 -0
|
@@ -5,34 +5,34 @@ import { defineComponent as $, toRefs as j, ref as T, computed as k, watch as U,
|
|
|
5
5
|
import { cloneDeep as Y } from "lodash-es";
|
|
6
6
|
const x = {}, W = {};
|
|
7
7
|
function A(o) {
|
|
8
|
-
const { properties: e, title: t } = o, n = Object.keys(e).reduce((
|
|
8
|
+
const { properties: e, title: t } = o, n = Object.keys(e).reduce((r, c) => (r[c] = e[c].type === "object" && e[c].properties ? A(e[c]) : Y(e[c].default), r), {});
|
|
9
9
|
return n.id = `${t}-${Date.now()}`, n;
|
|
10
10
|
}
|
|
11
11
|
function V(o, e = {}) {
|
|
12
12
|
const t = x[o];
|
|
13
13
|
if (t) {
|
|
14
14
|
let n = A(t);
|
|
15
|
-
const
|
|
16
|
-
return n =
|
|
15
|
+
const r = W[o];
|
|
16
|
+
return n = r ? r({ getSchemaByType: V }, n, e) : n, n;
|
|
17
17
|
}
|
|
18
18
|
return null;
|
|
19
19
|
}
|
|
20
20
|
function Z(o, e) {
|
|
21
21
|
const t = A(e);
|
|
22
|
-
return Object.keys(o).reduce((n,
|
|
22
|
+
return Object.keys(o).reduce((n, r) => (n[r] = o[r], n), t), t;
|
|
23
23
|
}
|
|
24
24
|
function J(o, e) {
|
|
25
|
-
return Object.keys(o).filter((n) => o[n] != null).reduce((n,
|
|
26
|
-
if (e.has(
|
|
27
|
-
const c = e.get(
|
|
25
|
+
return Object.keys(o).filter((n) => o[n] != null).reduce((n, r) => {
|
|
26
|
+
if (e.has(r)) {
|
|
27
|
+
const c = e.get(r);
|
|
28
28
|
if (typeof c == "string")
|
|
29
|
-
n[c] = o[
|
|
29
|
+
n[c] = o[r];
|
|
30
30
|
else {
|
|
31
|
-
const m = c(
|
|
31
|
+
const m = c(r, o[r], o);
|
|
32
32
|
Object.assign(n, m);
|
|
33
33
|
}
|
|
34
34
|
} else
|
|
35
|
-
n[
|
|
35
|
+
n[r] = o[r];
|
|
36
36
|
return n;
|
|
37
37
|
}, {});
|
|
38
38
|
}
|
|
@@ -41,60 +41,60 @@ function R(o, e, t = /* @__PURE__ */ new Map()) {
|
|
|
41
41
|
return J(n, t);
|
|
42
42
|
}
|
|
43
43
|
function K(o = {}) {
|
|
44
|
-
function e(a, l,
|
|
45
|
-
if (typeof
|
|
46
|
-
return
|
|
47
|
-
if (typeof
|
|
48
|
-
const g = Object.keys(
|
|
44
|
+
function e(a, l, p, s) {
|
|
45
|
+
if (typeof p == "number")
|
|
46
|
+
return s[a].length === p;
|
|
47
|
+
if (typeof p == "object") {
|
|
48
|
+
const g = Object.keys(p)[0], h = p[g];
|
|
49
49
|
if (g === "not")
|
|
50
|
-
return Number(
|
|
50
|
+
return Number(s[a].length) !== Number(h);
|
|
51
51
|
if (g === "moreThan")
|
|
52
|
-
return Number(
|
|
52
|
+
return Number(s[a].length) >= Number(h);
|
|
53
53
|
if (g === "lessThan")
|
|
54
|
-
return Number(
|
|
54
|
+
return Number(s[a].length) <= Number(h);
|
|
55
55
|
}
|
|
56
56
|
return !1;
|
|
57
57
|
}
|
|
58
|
-
function t(a, l,
|
|
59
|
-
return
|
|
58
|
+
function t(a, l, p, s) {
|
|
59
|
+
return s[a] && s[a].propertyValue && String(s[a].propertyValue.value) === String(p);
|
|
60
60
|
}
|
|
61
61
|
const n = /* @__PURE__ */ new Map([
|
|
62
62
|
["length", e],
|
|
63
63
|
["getProperty", t]
|
|
64
64
|
]);
|
|
65
65
|
Object.keys(o).reduce((a, l) => (a.set(l, o[l]), a), n);
|
|
66
|
-
function
|
|
67
|
-
const
|
|
68
|
-
return typeof l == "number" ? [{ target:
|
|
69
|
-
if (
|
|
70
|
-
return { target:
|
|
71
|
-
const g =
|
|
72
|
-
return { target:
|
|
66
|
+
function r(a, l) {
|
|
67
|
+
const p = a;
|
|
68
|
+
return typeof l == "number" ? [{ target: p, operator: "length", param: null, value: Number(l) }] : typeof l == "boolean" ? [{ target: p, operator: "getProperty", param: a, value: !!l }] : typeof l == "object" ? Object.keys(l).map((s) => {
|
|
69
|
+
if (s === "length")
|
|
70
|
+
return { target: p, operator: "length", param: null, value: l[s] };
|
|
71
|
+
const g = s, h = l[s];
|
|
72
|
+
return { target: p, operator: "getProperty", param: g, value: h };
|
|
73
73
|
}) : [];
|
|
74
74
|
}
|
|
75
75
|
function c(a) {
|
|
76
|
-
return Object.keys(a).reduce((
|
|
77
|
-
const g =
|
|
78
|
-
return
|
|
76
|
+
return Object.keys(a).reduce((p, s) => {
|
|
77
|
+
const g = r(s, a[s]);
|
|
78
|
+
return p.push(...g), p;
|
|
79
79
|
}, []);
|
|
80
80
|
}
|
|
81
81
|
function m(a, l) {
|
|
82
82
|
if (n.has(a.operator)) {
|
|
83
|
-
const
|
|
84
|
-
return
|
|
83
|
+
const p = n.get(a.operator);
|
|
84
|
+
return p && p(a.target, a.param, a.value, l) || !1;
|
|
85
85
|
}
|
|
86
86
|
return !1;
|
|
87
87
|
}
|
|
88
88
|
function u(a, l) {
|
|
89
|
-
return c(a).reduce((g,
|
|
89
|
+
return c(a).reduce((g, h) => g && m(h, l), !0);
|
|
90
90
|
}
|
|
91
91
|
function y(a, l) {
|
|
92
|
-
const
|
|
93
|
-
return
|
|
92
|
+
const p = Object.keys(a), s = p.includes("allOf"), g = p.includes("anyOf"), h = s || g, S = (h ? a[h ? s ? "allOf" : "anyOf" : "allOf"] : [a]).map((D) => u(D, l));
|
|
93
|
+
return s ? !S.includes(!1) : S.includes(!0);
|
|
94
94
|
}
|
|
95
95
|
return { parseValueSchema: y };
|
|
96
96
|
}
|
|
97
|
-
const
|
|
97
|
+
const i = {
|
|
98
98
|
Button: { type: "Button", name: "按钮", icon: "Button" },
|
|
99
99
|
ButtonGroup: { type: "ButtonGroup", name: "按钮组", icon: "ButtonGroup" },
|
|
100
100
|
"response-toolbar": { type: "response-toolbar", name: "工具栏", icon: "ButtonGroup" },
|
|
@@ -207,8 +207,8 @@ const r = {
|
|
|
207
207
|
/** 审批类 end */
|
|
208
208
|
}, ee = {}, te = {};
|
|
209
209
|
K();
|
|
210
|
-
function ne(o, e, t = /* @__PURE__ */ new Map(), n = (m, u, y) => u,
|
|
211
|
-
return x[e.title] = e, W[e.title] = n, ee[e.title] =
|
|
210
|
+
function ne(o, e, t = /* @__PURE__ */ new Map(), n = (m, u, y) => u, r = {}, c = (m) => m) {
|
|
211
|
+
return x[e.title] = e, W[e.title] = n, ee[e.title] = r, te[e.title] = c, (m = {}) => {
|
|
212
212
|
const u = R(m, e, t), y = Object.keys(o).reduce((a, l) => (a[l] = o[l].default, a), {});
|
|
213
213
|
return Object.assign(y, u);
|
|
214
214
|
};
|
|
@@ -216,9 +216,9 @@ function ne(o, e, t = /* @__PURE__ */ new Map(), n = (m, u, y) => u, i = {}, c =
|
|
|
216
216
|
function oe(o, e) {
|
|
217
217
|
return { customClass: e.class, customStyle: e.style };
|
|
218
218
|
}
|
|
219
|
-
const
|
|
219
|
+
const re = /* @__PURE__ */ new Map([
|
|
220
220
|
["appearance", oe]
|
|
221
|
-
]),
|
|
221
|
+
]), ie = "https://json-schema.org/draft/2020-12/schema", ae = "https://farris-design.gitee.io/switch.schema.json", le = "switch", ce = "A Farris Component", pe = "object", se = {
|
|
222
222
|
id: {
|
|
223
223
|
description: "The unique identifier for a switch",
|
|
224
224
|
type: "string"
|
|
@@ -294,12 +294,12 @@ const ie = /* @__PURE__ */ new Map([
|
|
|
294
294
|
"id",
|
|
295
295
|
"type"
|
|
296
296
|
], de = {
|
|
297
|
-
$schema:
|
|
297
|
+
$schema: ie,
|
|
298
298
|
$id: ae,
|
|
299
299
|
title: le,
|
|
300
300
|
description: ce,
|
|
301
|
-
type:
|
|
302
|
-
properties:
|
|
301
|
+
type: pe,
|
|
302
|
+
properties: se,
|
|
303
303
|
required: ue
|
|
304
304
|
};
|
|
305
305
|
function me(o, e, t) {
|
|
@@ -321,7 +321,7 @@ const E = {
|
|
|
321
321
|
/** 开关值变化事件 */
|
|
322
322
|
onModelValueChanged: { type: Function, default: () => {
|
|
323
323
|
} }
|
|
324
|
-
},
|
|
324
|
+
}, G = ne(E, de, re, me), P = /* @__PURE__ */ $({
|
|
325
325
|
name: "FSwitch",
|
|
326
326
|
props: E,
|
|
327
327
|
emits: ["update:modelValue", "modelValueChanged"],
|
|
@@ -329,13 +329,13 @@ const E = {
|
|
|
329
329
|
const {
|
|
330
330
|
disabled: t,
|
|
331
331
|
size: n,
|
|
332
|
-
onLabel:
|
|
332
|
+
onLabel: r,
|
|
333
333
|
offLabel: c,
|
|
334
334
|
onBackground: m,
|
|
335
335
|
offBackground: u,
|
|
336
336
|
onColor: y,
|
|
337
337
|
offColor: a
|
|
338
|
-
} = j(o), l = T(o.modelValue),
|
|
338
|
+
} = j(o), l = T(o.modelValue), p = k(() => ({
|
|
339
339
|
switch: !0,
|
|
340
340
|
"f-cmp-switch": !0,
|
|
341
341
|
checked: l.value,
|
|
@@ -343,7 +343,7 @@ const E = {
|
|
|
343
343
|
"switch-large": n.value === "large",
|
|
344
344
|
"switch-medium": n.value === "medium",
|
|
345
345
|
"switch-small": n.value === "small"
|
|
346
|
-
})),
|
|
346
|
+
})), s = k(() => l.value ? {
|
|
347
347
|
outline: "none",
|
|
348
348
|
background: m.value
|
|
349
349
|
} : {
|
|
@@ -353,7 +353,7 @@ const E = {
|
|
|
353
353
|
background: y.value
|
|
354
354
|
} : {
|
|
355
355
|
backgroundColor: a.value
|
|
356
|
-
}),
|
|
356
|
+
}), h = k(() => (r == null ? void 0 : r.value) || (c == null ? void 0 : c.value));
|
|
357
357
|
function F() {
|
|
358
358
|
t.value || (l.value = !l.value, e.emit("update:modelValue", l.value));
|
|
359
359
|
}
|
|
@@ -364,14 +364,14 @@ const E = {
|
|
|
364
364
|
}), () => b("span", {
|
|
365
365
|
tabindex: "0",
|
|
366
366
|
role: "button",
|
|
367
|
-
class:
|
|
368
|
-
style:
|
|
367
|
+
class: p.value,
|
|
368
|
+
style: s.value,
|
|
369
369
|
onClick: F
|
|
370
|
-
}, [
|
|
370
|
+
}, [h.value && b("span", {
|
|
371
371
|
class: "switch-pane"
|
|
372
372
|
}, [b("span", {
|
|
373
373
|
class: "switch-label-checked"
|
|
374
|
-
}, [
|
|
374
|
+
}, [r == null ? void 0 : r.value]), b("span", {
|
|
375
375
|
class: "switch-label-unchecked"
|
|
376
376
|
}, [c == null ? void 0 : c.value])]), b("small", {
|
|
377
377
|
style: g.value
|
|
@@ -384,7 +384,7 @@ function ye(o, e, t) {
|
|
|
384
384
|
t != null && t.resolveComponentContext && t.resolveComponentContext();
|
|
385
385
|
}
|
|
386
386
|
n();
|
|
387
|
-
const
|
|
387
|
+
const r = t && t.getStyles && t.getStyles() || "", c = t && t.getDesignerClass && t.getDesignerClass() || "", m = T();
|
|
388
388
|
function u() {
|
|
389
389
|
return (e == null ? void 0 : e.schema.componentType) === "frame" ? !1 : t && t.checkCanMoveComponent ? t.checkCanMoveComponent() : !0;
|
|
390
390
|
}
|
|
@@ -397,22 +397,22 @@ function ye(o, e, t) {
|
|
|
397
397
|
function l() {
|
|
398
398
|
return (e == null ? void 0 : e.schema.componentType) === "frame" ? !0 : t && t.hideNestedPaddingInDesginerView ? t.hideNestedPaddingInDesginerView() : !1;
|
|
399
399
|
}
|
|
400
|
-
function
|
|
400
|
+
function p(d) {
|
|
401
401
|
if (!d || !d.value)
|
|
402
402
|
return null;
|
|
403
403
|
if (d.value.schema && d.value.schema.type === "component")
|
|
404
404
|
return d.value;
|
|
405
|
-
const v = T(d == null ? void 0 : d.value.parent),
|
|
406
|
-
return
|
|
405
|
+
const v = T(d == null ? void 0 : d.value.parent), f = p(v);
|
|
406
|
+
return f || null;
|
|
407
407
|
}
|
|
408
|
-
function
|
|
409
|
-
const { componentInstance: v, designerItemElementRef:
|
|
410
|
-
return !v || !v.value ? null : v.value.canMove ?
|
|
408
|
+
function s(d = e) {
|
|
409
|
+
const { componentInstance: v, designerItemElementRef: f } = d;
|
|
410
|
+
return !v || !v.value ? null : v.value.canMove ? f : s(d.parent);
|
|
411
411
|
}
|
|
412
412
|
function g(d) {
|
|
413
413
|
return !!t && t.canAccepts(d);
|
|
414
414
|
}
|
|
415
|
-
function
|
|
415
|
+
function h() {
|
|
416
416
|
return (e == null ? void 0 : e.schema.label) || (e == null ? void 0 : e.schema.title) || (e == null ? void 0 : e.schema.name);
|
|
417
417
|
}
|
|
418
418
|
function F() {
|
|
@@ -422,22 +422,22 @@ function ye(o, e, t) {
|
|
|
422
422
|
}
|
|
423
423
|
function S(d) {
|
|
424
424
|
const { componentType: v } = d;
|
|
425
|
-
let
|
|
426
|
-
t && t.onResolveNewComponentSchema && (
|
|
425
|
+
let f = V(v, d);
|
|
426
|
+
t && t.onResolveNewComponentSchema && (f = t.onResolveNewComponentSchema(d, f));
|
|
427
427
|
const B = v.toLowerCase().replace("-", "_");
|
|
428
|
-
return
|
|
428
|
+
return f && !f.id && f.type === v && (f.id = `${B}_${Math.random().toString().slice(2, 6)}`), f;
|
|
429
429
|
}
|
|
430
430
|
function O(d, v) {
|
|
431
|
-
const
|
|
431
|
+
const f = String(d.getAttribute("data-controltype")), B = d.getAttribute("data-feature"), L = B ? JSON.parse(B) : {};
|
|
432
432
|
L.parentComponentInstance = m.value;
|
|
433
|
-
let M = V(
|
|
433
|
+
let M = V(f, L);
|
|
434
434
|
t && t.onAcceptNewChildElement && (M = t.onAcceptNewChildElement(d, v, M));
|
|
435
|
-
const
|
|
436
|
-
return M && !M.id && M.type ===
|
|
435
|
+
const I = f.toLowerCase().replace("-", "_");
|
|
436
|
+
return M && !M.id && M.type === f && (M.id = `${I}_${Math.random().toString().slice(2, 6)}`), M;
|
|
437
437
|
}
|
|
438
438
|
function D(d) {
|
|
439
439
|
}
|
|
440
|
-
function
|
|
440
|
+
function Q(...d) {
|
|
441
441
|
if (t && t.getPropsConfig)
|
|
442
442
|
return t.getPropsConfig(...d);
|
|
443
443
|
}
|
|
@@ -450,13 +450,13 @@ function ye(o, e, t) {
|
|
|
450
450
|
elementRef: o,
|
|
451
451
|
parent: (N = e == null ? void 0 : e.parent) == null ? void 0 : N.componentInstance,
|
|
452
452
|
schema: e == null ? void 0 : e.schema,
|
|
453
|
-
styles:
|
|
453
|
+
styles: r,
|
|
454
454
|
designerClass: c,
|
|
455
455
|
canAccepts: g,
|
|
456
|
-
getBelongedComponentInstance:
|
|
457
|
-
getDraggableDesignItemElement:
|
|
458
|
-
getDraggingDisplayText:
|
|
459
|
-
getPropConfig:
|
|
456
|
+
getBelongedComponentInstance: p,
|
|
457
|
+
getDraggableDesignItemElement: s,
|
|
458
|
+
getDraggingDisplayText: h,
|
|
459
|
+
getPropConfig: Q,
|
|
460
460
|
getDragScopeElement: F,
|
|
461
461
|
onAcceptMovedChildElement: w,
|
|
462
462
|
onAcceptNewChildElement: O,
|
|
@@ -467,7 +467,7 @@ function ye(o, e, t) {
|
|
|
467
467
|
triggerBelongedComponentToDeleteWhenDeleted: !!t && t.triggerBelongedComponentToDeleteWhenDeleted || T(!1)
|
|
468
468
|
}, m;
|
|
469
469
|
}
|
|
470
|
-
class
|
|
470
|
+
class H {
|
|
471
471
|
static getEditorTypesByMDataType(e) {
|
|
472
472
|
const t = this.fieldControlTypeMapping[e];
|
|
473
473
|
return t || [{ key: "", value: "" }];
|
|
@@ -476,59 +476,59 @@ class G {
|
|
|
476
476
|
/**
|
|
477
477
|
* <字段类型,可配置的控件类型列表>的映射
|
|
478
478
|
*/
|
|
479
|
-
C(
|
|
479
|
+
C(H, "fieldControlTypeMapping", {
|
|
480
480
|
String: [
|
|
481
|
-
{ key:
|
|
482
|
-
{ key:
|
|
483
|
-
{ key:
|
|
484
|
-
{ key:
|
|
485
|
-
{ key:
|
|
486
|
-
{ key:
|
|
487
|
-
{ key:
|
|
488
|
-
{ key:
|
|
481
|
+
{ key: i["input-group"].type, value: i["input-group"].name },
|
|
482
|
+
{ key: i.lookup.type, value: i.lookup.name },
|
|
483
|
+
{ key: i.Image.type, value: i.Image.name },
|
|
484
|
+
{ key: i["date-picker"].type, value: i["date-picker"].name },
|
|
485
|
+
{ key: i["check-box"].type, value: i["check-box"].name },
|
|
486
|
+
{ key: i["radio-group"].type, value: i["radio-group"].name },
|
|
487
|
+
{ key: i["combo-list"].type, value: i["combo-list"].name },
|
|
488
|
+
{ key: i.textarea.type, value: i.textarea.name }
|
|
489
489
|
// { key: DgControl.Tags.type, value: DgControl.Tags.name },
|
|
490
490
|
],
|
|
491
491
|
Text: [
|
|
492
|
-
{ key:
|
|
493
|
-
{ key:
|
|
494
|
-
{ key:
|
|
492
|
+
{ key: i.textarea.type, value: i.textarea.name },
|
|
493
|
+
{ key: i.avatar.type, value: i.avatar.name },
|
|
494
|
+
{ key: i.lookup.type, value: i.lookup.name }
|
|
495
495
|
],
|
|
496
496
|
Decimal: [
|
|
497
|
-
{ key:
|
|
497
|
+
{ key: i["number-spinner"].type, value: i["number-spinner"].name }
|
|
498
498
|
],
|
|
499
499
|
Integer: [
|
|
500
|
-
{ key:
|
|
500
|
+
{ key: i["number-spinner"].type, value: i["number-spinner"].name }
|
|
501
501
|
],
|
|
502
502
|
Number: [
|
|
503
|
-
{ key:
|
|
503
|
+
{ key: i["number-spinner"].type, value: i["number-spinner"].name }
|
|
504
504
|
],
|
|
505
505
|
BigNumber: [
|
|
506
|
-
{ key:
|
|
506
|
+
{ key: i["number-spinner"].type, value: i["number-spinner"].name }
|
|
507
507
|
],
|
|
508
508
|
Date: [
|
|
509
|
-
{ key:
|
|
509
|
+
{ key: i["date-picker"].type, value: i["date-picker"].name }
|
|
510
510
|
],
|
|
511
511
|
DateTime: [
|
|
512
|
-
{ key:
|
|
512
|
+
{ key: i["date-picker"].type, value: i["date-picker"].name }
|
|
513
513
|
],
|
|
514
514
|
Boolean: [
|
|
515
|
-
{ key:
|
|
516
|
-
{ key:
|
|
515
|
+
{ key: i.switch.type, value: i.switch.name },
|
|
516
|
+
{ key: i["check-box"].type, value: i["check-box"].name }
|
|
517
517
|
],
|
|
518
518
|
Enum: [
|
|
519
|
-
{ key:
|
|
520
|
-
{ key:
|
|
519
|
+
{ key: i["combo-list"].type, value: i["combo-list"].name },
|
|
520
|
+
{ key: i["radio-group"].type, value: i["radio-group"].name }
|
|
521
521
|
],
|
|
522
522
|
Object: [
|
|
523
|
-
{ key:
|
|
524
|
-
{ key:
|
|
525
|
-
{ key:
|
|
523
|
+
{ key: i.lookup.type, value: i.lookup.name },
|
|
524
|
+
{ key: i["combo-list"].type, value: i["combo-list"].name },
|
|
525
|
+
{ key: i["radio-group"].type, value: i["radio-group"].name }
|
|
526
526
|
],
|
|
527
527
|
EmployeeSelector: [
|
|
528
|
-
{ key:
|
|
528
|
+
{ key: i.EmployeeSelector.type, value: i.EmployeeSelector.name }
|
|
529
529
|
],
|
|
530
530
|
AdminOrganizationSelector: [
|
|
531
|
-
{ key:
|
|
531
|
+
{ key: i.AdminOrganizationSelector.type, value: i.AdminOrganizationSelector.name }
|
|
532
532
|
]
|
|
533
533
|
});
|
|
534
534
|
class ge {
|
|
@@ -560,7 +560,7 @@ class ge {
|
|
|
560
560
|
if (t) {
|
|
561
561
|
if (!this.designViewModelField) {
|
|
562
562
|
const n = this.designViewModelUtils.getDgViewModel(this.viewModelId);
|
|
563
|
-
this.designViewModelField = n.fields.find((
|
|
563
|
+
this.designViewModelField = n.fields.find((r) => r.id === t);
|
|
564
564
|
}
|
|
565
565
|
e.updateOn = this.designViewModelField.updateOn;
|
|
566
566
|
}
|
|
@@ -568,7 +568,7 @@ class ge {
|
|
|
568
568
|
changeFieldEditorType(e, t) {
|
|
569
569
|
}
|
|
570
570
|
getBasicPropConfig(e) {
|
|
571
|
-
var n,
|
|
571
|
+
var n, r;
|
|
572
572
|
var t = this;
|
|
573
573
|
return this.setDesignViewModelField(e), {
|
|
574
574
|
description: "Basic Information",
|
|
@@ -590,7 +590,7 @@ class ge {
|
|
|
590
590
|
type: "combo-list",
|
|
591
591
|
textField: "value",
|
|
592
592
|
valueField: "key",
|
|
593
|
-
data:
|
|
593
|
+
data: H.getEditorTypesByMDataType(((r = (n = t.designViewModelField) == null ? void 0 : n.type) == null ? void 0 : r.name) || ""),
|
|
594
594
|
editable: !1
|
|
595
595
|
}
|
|
596
596
|
},
|
|
@@ -617,12 +617,12 @@ class ge {
|
|
|
617
617
|
* @param newControlType 新控件类型
|
|
618
618
|
*/
|
|
619
619
|
changeControlType(e, t) {
|
|
620
|
-
var a, l,
|
|
621
|
-
const n = t.propertyValue,
|
|
622
|
-
let c = this.getControlParentContainer(e.id,
|
|
620
|
+
var a, l, p, s, g;
|
|
621
|
+
const n = t.propertyValue, r = this.formSchemaUtils.getComponentById(this.componentId);
|
|
622
|
+
let c = this.getControlParentContainer(e.id, r);
|
|
623
623
|
if (!c)
|
|
624
624
|
return;
|
|
625
|
-
const m = c.contents.findIndex((
|
|
625
|
+
const m = c.contents.findIndex((h) => h.id === e.id), u = c.contents[m];
|
|
626
626
|
let y;
|
|
627
627
|
this.designViewModelField && (this.designViewModelUtils.getDgViewModel(this.viewModelId).changeField(this.designViewModelField.id, {
|
|
628
628
|
editor: {
|
|
@@ -641,8 +641,8 @@ class ge {
|
|
|
641
641
|
type: n || "",
|
|
642
642
|
placeHolder: (a = u.editor) == null ? void 0 : a.placeHolder,
|
|
643
643
|
holdPlace: (l = u.editor) == null ? void 0 : l.holdPlace,
|
|
644
|
-
readonly: (
|
|
645
|
-
require: (
|
|
644
|
+
readonly: (p = u.editor) == null ? void 0 : p.readonly,
|
|
645
|
+
require: (s = u.editor) == null ? void 0 : s.require,
|
|
646
646
|
visible: (g = u.editor) == null ? void 0 : g.visible
|
|
647
647
|
}), c.contents.splice(m, 1, y);
|
|
648
648
|
}
|
|
@@ -685,36 +685,15 @@ class ge {
|
|
|
685
685
|
let n;
|
|
686
686
|
if (!t || !t.contents || t.contents.length === 0)
|
|
687
687
|
return null;
|
|
688
|
-
for (const
|
|
689
|
-
if (
|
|
688
|
+
for (const r of t.contents) {
|
|
689
|
+
if (r.id === e)
|
|
690
690
|
return n = t, t;
|
|
691
|
-
if (n = this.getControlParentContainer(e,
|
|
691
|
+
if (n = this.getControlParentContainer(e, r), n)
|
|
692
692
|
return n;
|
|
693
693
|
}
|
|
694
694
|
}
|
|
695
|
-
getBindingFieldEditorOptions(e) {
|
|
696
|
-
const t = this.formSchemaUtils.getFormMetadataBasicInfo();
|
|
697
|
-
return {
|
|
698
|
-
type: "field-selector",
|
|
699
|
-
bindingType: { enable: !1 },
|
|
700
|
-
editorParams: {
|
|
701
|
-
propertyData: e,
|
|
702
|
-
formBasicInfo: t
|
|
703
|
-
},
|
|
704
|
-
columns: [
|
|
705
|
-
{ field: "name", title: "字段名称" },
|
|
706
|
-
{ field: "bindingField", title: "绑定字段" },
|
|
707
|
-
{ field: "fieldType", title: "字段类型" }
|
|
708
|
-
],
|
|
709
|
-
beforeOpenDialog: (n) => {
|
|
710
|
-
const i = this.designViewModelUtils.getAllFields2TreeByVMId(this.viewModelId);
|
|
711
|
-
n.instance.loadData(i);
|
|
712
|
-
},
|
|
713
|
-
textField: "bindingField"
|
|
714
|
-
};
|
|
715
|
-
}
|
|
716
695
|
}
|
|
717
|
-
class
|
|
696
|
+
class he extends ge {
|
|
718
697
|
constructor(e, t) {
|
|
719
698
|
super(e, t);
|
|
720
699
|
}
|
|
@@ -749,12 +728,16 @@ class fe extends ge {
|
|
|
749
728
|
{ field: "bindingField", title: "绑定字段" },
|
|
750
729
|
{ field: "fieldType", title: "字段类型" }
|
|
751
730
|
],
|
|
731
|
+
textField: "bindingField",
|
|
752
732
|
data: n
|
|
753
733
|
}
|
|
754
734
|
};
|
|
755
735
|
}
|
|
736
|
+
getBindingOtions(e) {
|
|
737
|
+
return this.getFieldSelectorOptions(e);
|
|
738
|
+
}
|
|
756
739
|
getComponentConfig(e, t = {}, n = {}) {
|
|
757
|
-
const
|
|
740
|
+
const r = Object.assign({
|
|
758
741
|
description: "组件信息",
|
|
759
742
|
title: "组件信息",
|
|
760
743
|
type: "input-group",
|
|
@@ -781,10 +764,10 @@ class fe extends ge {
|
|
|
781
764
|
type: "string"
|
|
782
765
|
}
|
|
783
766
|
}, n);
|
|
784
|
-
return { ...
|
|
767
|
+
return { ...r, properties: { ...c } };
|
|
785
768
|
}
|
|
786
769
|
}
|
|
787
|
-
class
|
|
770
|
+
class fe extends he {
|
|
788
771
|
constructor(e, t) {
|
|
789
772
|
super(e, t);
|
|
790
773
|
}
|
|
@@ -842,7 +825,7 @@ class he extends fe {
|
|
|
842
825
|
function ve(o, e) {
|
|
843
826
|
o.schema;
|
|
844
827
|
const t = T(!0), n = T(!0);
|
|
845
|
-
function
|
|
828
|
+
function r(p) {
|
|
846
829
|
return !1;
|
|
847
830
|
}
|
|
848
831
|
function c() {
|
|
@@ -854,15 +837,15 @@ function ve(o, e) {
|
|
|
854
837
|
function u() {
|
|
855
838
|
return !0;
|
|
856
839
|
}
|
|
857
|
-
function y(
|
|
840
|
+
function y(p) {
|
|
858
841
|
}
|
|
859
842
|
function a() {
|
|
860
843
|
}
|
|
861
|
-
function l(
|
|
844
|
+
function l(p) {
|
|
862
845
|
return null;
|
|
863
846
|
}
|
|
864
847
|
return {
|
|
865
|
-
canAccepts:
|
|
848
|
+
canAccepts: r,
|
|
866
849
|
checkCanDeleteComponent: c,
|
|
867
850
|
checkCanMoveComponent: m,
|
|
868
851
|
hideNestedPaddingInDesginerView: u,
|
|
@@ -877,26 +860,26 @@ function Ce(o, e) {
|
|
|
877
860
|
const {
|
|
878
861
|
canAccepts: t,
|
|
879
862
|
checkCanDeleteComponent: n,
|
|
880
|
-
checkCanMoveComponent:
|
|
863
|
+
checkCanMoveComponent: r,
|
|
881
864
|
hideNestedPaddingInDesginerView: c,
|
|
882
865
|
onAcceptMovedChildElement: m,
|
|
883
866
|
resolveComponentContext: u,
|
|
884
867
|
triggerBelongedComponentToMoveWhenMoved: y,
|
|
885
868
|
triggerBelongedComponentToDeleteWhenDeleted: a
|
|
886
869
|
} = ve(o), l = o.schema;
|
|
887
|
-
function s
|
|
888
|
-
return new
|
|
870
|
+
function p(s) {
|
|
871
|
+
return new fe(s, e).getPropertyConfig(l);
|
|
889
872
|
}
|
|
890
873
|
return {
|
|
891
874
|
canAccepts: t,
|
|
892
875
|
checkCanDeleteComponent: n,
|
|
893
|
-
checkCanMoveComponent:
|
|
876
|
+
checkCanMoveComponent: r,
|
|
894
877
|
hideNestedPaddingInDesginerView: c,
|
|
895
878
|
onAcceptMovedChildElement: m,
|
|
896
879
|
resolveComponentContext: u,
|
|
897
880
|
triggerBelongedComponentToMoveWhenMoved: y,
|
|
898
881
|
triggerBelongedComponentToDeleteWhenDeleted: a,
|
|
899
|
-
getPropsConfig:
|
|
882
|
+
getPropsConfig: p
|
|
900
883
|
};
|
|
901
884
|
}
|
|
902
885
|
const be = /* @__PURE__ */ $({
|
|
@@ -907,7 +890,7 @@ const be = /* @__PURE__ */ $({
|
|
|
907
890
|
const {
|
|
908
891
|
size: t,
|
|
909
892
|
onLabel: n,
|
|
910
|
-
offLabel:
|
|
893
|
+
offLabel: r
|
|
911
894
|
} = j(o), c = T(), m = z("designer-host-service"), u = z("design-item-context"), y = Ce(u, m), a = ye(c, u, y);
|
|
912
895
|
X(() => {
|
|
913
896
|
c.value.componentInstance = a;
|
|
@@ -919,17 +902,17 @@ const be = /* @__PURE__ */ $({
|
|
|
919
902
|
"switch-large": t.value === "large",
|
|
920
903
|
"switch-medium": t.value === "medium",
|
|
921
904
|
"switch-small": t.value === "small"
|
|
922
|
-
})),
|
|
905
|
+
})), p = k(() => (n == null ? void 0 : n.value) || (r == null ? void 0 : r.value));
|
|
923
906
|
return () => b("span", {
|
|
924
907
|
ref: c,
|
|
925
908
|
tabindex: "0",
|
|
926
909
|
role: "button",
|
|
927
910
|
class: l.value
|
|
928
|
-
}, [
|
|
911
|
+
}, [p.value && b("span", {
|
|
929
912
|
class: "switch-pane"
|
|
930
913
|
}, [b("span", {
|
|
931
914
|
class: "switch-label-unchecked"
|
|
932
|
-
}, [
|
|
915
|
+
}, [r == null ? void 0 : r.value])]), b("small", null, [e.slots.default && e.slots.default()])]);
|
|
933
916
|
}
|
|
934
917
|
}), we = (o) => {
|
|
935
918
|
const e = o;
|
|
@@ -938,15 +921,15 @@ const be = /* @__PURE__ */ $({
|
|
|
938
921
|
}, o;
|
|
939
922
|
};
|
|
940
923
|
P.register = (o, e, t, n) => {
|
|
941
|
-
o.switch = P, e.switch =
|
|
924
|
+
o.switch = P, e.switch = G;
|
|
942
925
|
};
|
|
943
926
|
P.registerDesigner = (o, e, t) => {
|
|
944
|
-
o.switch = be, e.switch =
|
|
927
|
+
o.switch = be, e.switch = G;
|
|
945
928
|
};
|
|
946
929
|
const ke = we(P);
|
|
947
930
|
export {
|
|
948
931
|
P as FSwitch,
|
|
949
932
|
ke as default,
|
|
950
|
-
|
|
933
|
+
G as propsResolver,
|
|
951
934
|
E as switchProps
|
|
952
935
|
};
|