@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,24 +1,24 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var C = (o, e, t) =>
|
|
4
|
-
import { defineComponent as $, toRefs as j, ref as
|
|
1
|
+
var q = Object.defineProperty;
|
|
2
|
+
var _ = (o, e, t) => e in o ? q(o, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[e] = t;
|
|
3
|
+
var C = (o, e, t) => _(o, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
import { defineComponent as $, toRefs as j, ref as T, computed as k, watch as U, createVNode as b, inject as z, onMounted as X } from "vue";
|
|
5
5
|
import { cloneDeep as Y } from "lodash-es";
|
|
6
|
-
const
|
|
7
|
-
function
|
|
8
|
-
const { properties: e, title: t } = o, n = Object.keys(e).reduce((i, c) => (i[c] = e[c].type === "object" && e[c].properties ?
|
|
6
|
+
const x = {}, H = {};
|
|
7
|
+
function A(o) {
|
|
8
|
+
const { properties: e, title: t } = o, n = Object.keys(e).reduce((i, c) => (i[c] = e[c].type === "object" && e[c].properties ? A(e[c]) : Y(e[c].default), i), {});
|
|
9
9
|
return n.id = `${t}-${Date.now()}`, n;
|
|
10
10
|
}
|
|
11
|
-
function
|
|
12
|
-
const t =
|
|
11
|
+
function V(o, e = {}) {
|
|
12
|
+
const t = x[o];
|
|
13
13
|
if (t) {
|
|
14
|
-
let n =
|
|
15
|
-
const i =
|
|
16
|
-
return n = i ? i({ getSchemaByType:
|
|
14
|
+
let n = A(t);
|
|
15
|
+
const i = H[o];
|
|
16
|
+
return n = i ? i({ getSchemaByType: V }, n, e) : n, n;
|
|
17
17
|
}
|
|
18
18
|
return null;
|
|
19
19
|
}
|
|
20
20
|
function Z(o, e) {
|
|
21
|
-
const t =
|
|
21
|
+
const t = A(e);
|
|
22
22
|
return Object.keys(o).reduce((n, i) => (n[i] = o[i], n), t), t;
|
|
23
23
|
}
|
|
24
24
|
function J(o, e) {
|
|
@@ -28,8 +28,8 @@ function J(o, e) {
|
|
|
28
28
|
if (typeof c == "string")
|
|
29
29
|
n[c] = o[i];
|
|
30
30
|
else {
|
|
31
|
-
const
|
|
32
|
-
Object.assign(n,
|
|
31
|
+
const m = c(i, o[i], o);
|
|
32
|
+
Object.assign(n, m);
|
|
33
33
|
}
|
|
34
34
|
} else
|
|
35
35
|
n[i] = o[i];
|
|
@@ -41,22 +41,22 @@ 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
|
|
49
|
-
if (
|
|
50
|
-
return Number(
|
|
51
|
-
if (
|
|
52
|
-
return Number(
|
|
53
|
-
if (
|
|
54
|
-
return Number(
|
|
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], f = p[g];
|
|
49
|
+
if (g === "not")
|
|
50
|
+
return Number(s[a].length) !== Number(f);
|
|
51
|
+
if (g === "moreThan")
|
|
52
|
+
return Number(s[a].length) >= Number(f);
|
|
53
|
+
if (g === "lessThan")
|
|
54
|
+
return Number(s[a].length) <= Number(f);
|
|
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],
|
|
@@ -64,35 +64,35 @@ function K(o = {}) {
|
|
|
64
64
|
]);
|
|
65
65
|
Object.keys(o).reduce((a, l) => (a.set(l, o[l]), a), n);
|
|
66
66
|
function i(a, l) {
|
|
67
|
-
const
|
|
68
|
-
return typeof l == "number" ? [{ target:
|
|
69
|
-
if (
|
|
70
|
-
return { target:
|
|
71
|
-
const
|
|
72
|
-
return { target:
|
|
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, f = l[s];
|
|
72
|
+
return { target: p, operator: "getProperty", param: g, value: f };
|
|
73
73
|
}) : [];
|
|
74
74
|
}
|
|
75
75
|
function c(a) {
|
|
76
|
-
return Object.keys(a).reduce((
|
|
77
|
-
const
|
|
78
|
-
return
|
|
76
|
+
return Object.keys(a).reduce((p, s) => {
|
|
77
|
+
const g = i(s, a[s]);
|
|
78
|
+
return p.push(...g), p;
|
|
79
79
|
}, []);
|
|
80
80
|
}
|
|
81
|
-
function
|
|
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((
|
|
89
|
+
return c(a).reduce((g, f) => g && m(f, l), !0);
|
|
90
90
|
}
|
|
91
|
-
function
|
|
92
|
-
const
|
|
93
|
-
return
|
|
91
|
+
function y(a, l) {
|
|
92
|
+
const p = Object.keys(a), s = p.includes("allOf"), g = p.includes("anyOf"), f = s || g, S = (f ? a[f ? s ? "allOf" : "anyOf" : "allOf"] : [a]).map((D) => u(D, l));
|
|
93
|
+
return s ? !S.includes(!1) : S.includes(!0);
|
|
94
94
|
}
|
|
95
|
-
return { parseValueSchema:
|
|
95
|
+
return { parseValueSchema: y };
|
|
96
96
|
}
|
|
97
97
|
const r = {
|
|
98
98
|
Button: { type: "Button", name: "按钮", icon: "Button" },
|
|
@@ -207,10 +207,10 @@ const r = {
|
|
|
207
207
|
/** 审批类 end */
|
|
208
208
|
}, ee = {}, te = {};
|
|
209
209
|
K();
|
|
210
|
-
function ne(o, e, t = /* @__PURE__ */ new Map(), n = (
|
|
211
|
-
return
|
|
212
|
-
const u = R(
|
|
213
|
-
return Object.assign(
|
|
210
|
+
function ne(o, e, t = /* @__PURE__ */ new Map(), n = (m, u, y) => u, i = {}, c = (m) => m) {
|
|
211
|
+
return x[e.title] = e, H[e.title] = n, ee[e.title] = i, te[e.title] = c, (m = {}) => {
|
|
212
|
+
const u = R(m, e, t), y = Object.keys(o).reduce((a, l) => (a[l] = o[l].default, a), {});
|
|
213
|
+
return Object.assign(y, u);
|
|
214
214
|
};
|
|
215
215
|
}
|
|
216
216
|
function oe(o, e) {
|
|
@@ -218,7 +218,7 @@ function oe(o, e) {
|
|
|
218
218
|
}
|
|
219
219
|
const ie = /* @__PURE__ */ new Map([
|
|
220
220
|
["appearance", oe]
|
|
221
|
-
]), re = "https://json-schema.org/draft/2020-12/schema", ae = "https://farris-design.gitee.io/switch.schema.json", le = "switch", ce = "A Farris Component",
|
|
221
|
+
]), re = "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"
|
|
@@ -298,14 +298,14 @@ const ie = /* @__PURE__ */ new Map([
|
|
|
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) {
|
|
306
306
|
return e;
|
|
307
307
|
}
|
|
308
|
-
const
|
|
308
|
+
const E = {
|
|
309
309
|
/** 组件值*/
|
|
310
310
|
modelValue: { type: Boolean, default: !1 },
|
|
311
311
|
/** 禁用 */
|
|
@@ -321,9 +321,9 @@ const L = {
|
|
|
321
321
|
/** 开关值变化事件 */
|
|
322
322
|
onModelValueChanged: { type: Function, default: () => {
|
|
323
323
|
} }
|
|
324
|
-
}, W = ne(
|
|
324
|
+
}, W = ne(E, de, ie, me), P = /* @__PURE__ */ $({
|
|
325
325
|
name: "FSwitch",
|
|
326
|
-
props:
|
|
326
|
+
props: E,
|
|
327
327
|
emits: ["update:modelValue", "modelValueChanged"],
|
|
328
328
|
setup(o, e) {
|
|
329
329
|
const {
|
|
@@ -331,11 +331,11 @@ const L = {
|
|
|
331
331
|
size: n,
|
|
332
332
|
onLabel: i,
|
|
333
333
|
offLabel: c,
|
|
334
|
-
onBackground:
|
|
334
|
+
onBackground: m,
|
|
335
335
|
offBackground: u,
|
|
336
|
-
onColor:
|
|
336
|
+
onColor: y,
|
|
337
337
|
offColor: a
|
|
338
|
-
} = j(o), l =
|
|
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,28 +343,30 @@ const L = {
|
|
|
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
|
-
background:
|
|
348
|
+
background: m.value
|
|
349
349
|
} : {
|
|
350
350
|
outline: "none",
|
|
351
351
|
backgroundColor: u.value
|
|
352
|
-
}),
|
|
353
|
-
background:
|
|
352
|
+
}), g = k(() => l.value ? {
|
|
353
|
+
background: y.value
|
|
354
354
|
} : {
|
|
355
355
|
backgroundColor: a.value
|
|
356
|
-
}), f =
|
|
357
|
-
function
|
|
356
|
+
}), f = k(() => (i == null ? void 0 : i.value) || (c == null ? void 0 : c.value));
|
|
357
|
+
function F() {
|
|
358
358
|
t.value || (l.value = !l.value, e.emit("update:modelValue", l.value));
|
|
359
359
|
}
|
|
360
|
-
return
|
|
361
|
-
|
|
360
|
+
return U(l, (w, S) => {
|
|
361
|
+
w !== S && e.emit("modelValueChanged", w);
|
|
362
|
+
}), U(() => o.modelValue, (w, S) => {
|
|
363
|
+
w !== S && (l.value = w);
|
|
362
364
|
}), () => b("span", {
|
|
363
365
|
tabindex: "0",
|
|
364
366
|
role: "button",
|
|
365
|
-
class:
|
|
366
|
-
style:
|
|
367
|
-
onClick:
|
|
367
|
+
class: p.value,
|
|
368
|
+
style: s.value,
|
|
369
|
+
onClick: F
|
|
368
370
|
}, [f.value && b("span", {
|
|
369
371
|
class: "switch-pane"
|
|
370
372
|
}, [b("span", {
|
|
@@ -372,21 +374,21 @@ const L = {
|
|
|
372
374
|
}, [i == null ? void 0 : i.value]), b("span", {
|
|
373
375
|
class: "switch-label-unchecked"
|
|
374
376
|
}, [c == null ? void 0 : c.value])]), b("small", {
|
|
375
|
-
style:
|
|
377
|
+
style: g.value
|
|
376
378
|
}, [e.slots.default && e.slots.default()])]);
|
|
377
379
|
}
|
|
378
380
|
});
|
|
379
381
|
function ye(o, e, t) {
|
|
380
|
-
var
|
|
382
|
+
var N;
|
|
381
383
|
function n() {
|
|
382
384
|
t != null && t.resolveComponentContext && t.resolveComponentContext();
|
|
383
385
|
}
|
|
384
386
|
n();
|
|
385
|
-
const i = t && t.getStyles && t.getStyles() || "", c = t && t.getDesignerClass && t.getDesignerClass() || "",
|
|
387
|
+
const i = t && t.getStyles && t.getStyles() || "", c = t && t.getDesignerClass && t.getDesignerClass() || "", m = T();
|
|
386
388
|
function u() {
|
|
387
389
|
return (e == null ? void 0 : e.schema.componentType) === "frame" ? !1 : t && t.checkCanMoveComponent ? t.checkCanMoveComponent() : !0;
|
|
388
390
|
}
|
|
389
|
-
function
|
|
391
|
+
function y() {
|
|
390
392
|
return !1;
|
|
391
393
|
}
|
|
392
394
|
function a() {
|
|
@@ -395,75 +397,75 @@ function ye(o, e, t) {
|
|
|
395
397
|
function l() {
|
|
396
398
|
return (e == null ? void 0 : e.schema.componentType) === "frame" ? !0 : t && t.hideNestedPaddingInDesginerView ? t.hideNestedPaddingInDesginerView() : !1;
|
|
397
399
|
}
|
|
398
|
-
function
|
|
399
|
-
if (!
|
|
400
|
+
function p(d) {
|
|
401
|
+
if (!d || !d.value)
|
|
400
402
|
return null;
|
|
401
|
-
if (
|
|
402
|
-
return
|
|
403
|
-
const v =
|
|
403
|
+
if (d.value.schema && d.value.schema.type === "component")
|
|
404
|
+
return d.value;
|
|
405
|
+
const v = T(d == null ? void 0 : d.value.parent), h = p(v);
|
|
404
406
|
return h || null;
|
|
405
407
|
}
|
|
406
|
-
function
|
|
407
|
-
const { componentInstance: v, designerItemElementRef: h } =
|
|
408
|
-
return !v || !v.value ? null : v.value.canMove ? h :
|
|
408
|
+
function s(d = e) {
|
|
409
|
+
const { componentInstance: v, designerItemElementRef: h } = d;
|
|
410
|
+
return !v || !v.value ? null : v.value.canMove ? h : s(d.parent);
|
|
409
411
|
}
|
|
410
|
-
function
|
|
411
|
-
return !!t && t.canAccepts(
|
|
412
|
+
function g(d) {
|
|
413
|
+
return !!t && t.canAccepts(d);
|
|
412
414
|
}
|
|
413
415
|
function f() {
|
|
414
416
|
return (e == null ? void 0 : e.schema.label) || (e == null ? void 0 : e.schema.title) || (e == null ? void 0 : e.schema.name);
|
|
415
417
|
}
|
|
416
|
-
function
|
|
418
|
+
function F() {
|
|
417
419
|
}
|
|
418
|
-
function
|
|
420
|
+
function w(d, v) {
|
|
419
421
|
v && t != null && t.onAcceptMovedChildElement && t.onAcceptMovedChildElement(v);
|
|
420
422
|
}
|
|
421
|
-
function S(
|
|
422
|
-
const { componentType: v } =
|
|
423
|
-
let h =
|
|
424
|
-
t && t.onResolveNewComponentSchema && (h = t.onResolveNewComponentSchema(
|
|
425
|
-
const
|
|
426
|
-
return h && !h.id && h.type === v && (h.id = `${
|
|
423
|
+
function S(d) {
|
|
424
|
+
const { componentType: v } = d;
|
|
425
|
+
let h = V(v, d);
|
|
426
|
+
t && t.onResolveNewComponentSchema && (h = t.onResolveNewComponentSchema(d, h));
|
|
427
|
+
const B = v.toLowerCase().replace("-", "_");
|
|
428
|
+
return h && !h.id && h.type === v && (h.id = `${B}_${Math.random().toString().slice(2, 6)}`), h;
|
|
427
429
|
}
|
|
428
|
-
function
|
|
429
|
-
const h = String(
|
|
430
|
-
|
|
431
|
-
let
|
|
432
|
-
t && t.onAcceptNewChildElement && (
|
|
433
|
-
const
|
|
434
|
-
return
|
|
430
|
+
function O(d, v) {
|
|
431
|
+
const h = String(d.getAttribute("data-controltype")), B = d.getAttribute("data-feature"), L = B ? JSON.parse(B) : {};
|
|
432
|
+
L.parentComponentInstance = m.value;
|
|
433
|
+
let M = V(h, L);
|
|
434
|
+
t && t.onAcceptNewChildElement && (M = t.onAcceptNewChildElement(d, v, M));
|
|
435
|
+
const Q = h.toLowerCase().replace("-", "_");
|
|
436
|
+
return M && !M.id && M.type === h && (M.id = `${Q}_${Math.random().toString().slice(2, 6)}`), M;
|
|
435
437
|
}
|
|
436
|
-
function
|
|
438
|
+
function D(d) {
|
|
437
439
|
}
|
|
438
|
-
function
|
|
440
|
+
function I(...d) {
|
|
439
441
|
if (t && t.getPropsConfig)
|
|
440
|
-
return t.getPropsConfig(...
|
|
442
|
+
return t.getPropsConfig(...d);
|
|
441
443
|
}
|
|
442
|
-
return
|
|
444
|
+
return m.value = {
|
|
443
445
|
canMove: u(),
|
|
444
|
-
canSelectParent:
|
|
446
|
+
canSelectParent: y(),
|
|
445
447
|
canDelete: a(),
|
|
446
448
|
canNested: !l(),
|
|
447
449
|
contents: e == null ? void 0 : e.schema.contents,
|
|
448
450
|
elementRef: o,
|
|
449
|
-
parent: (
|
|
451
|
+
parent: (N = e == null ? void 0 : e.parent) == null ? void 0 : N.componentInstance,
|
|
450
452
|
schema: e == null ? void 0 : e.schema,
|
|
451
453
|
styles: i,
|
|
452
454
|
designerClass: c,
|
|
453
|
-
canAccepts:
|
|
454
|
-
getBelongedComponentInstance:
|
|
455
|
-
getDraggableDesignItemElement:
|
|
455
|
+
canAccepts: g,
|
|
456
|
+
getBelongedComponentInstance: p,
|
|
457
|
+
getDraggableDesignItemElement: s,
|
|
456
458
|
getDraggingDisplayText: f,
|
|
457
|
-
getPropConfig:
|
|
458
|
-
getDragScopeElement:
|
|
459
|
-
onAcceptMovedChildElement:
|
|
460
|
-
onAcceptNewChildElement:
|
|
461
|
-
onChildElementMovedOut:
|
|
459
|
+
getPropConfig: I,
|
|
460
|
+
getDragScopeElement: F,
|
|
461
|
+
onAcceptMovedChildElement: w,
|
|
462
|
+
onAcceptNewChildElement: O,
|
|
463
|
+
onChildElementMovedOut: D,
|
|
462
464
|
addNewChildComponentSchema: S,
|
|
463
465
|
updateDragAndDropRules: n,
|
|
464
|
-
triggerBelongedComponentToMoveWhenMoved: !!t && t.triggerBelongedComponentToMoveWhenMoved ||
|
|
465
|
-
triggerBelongedComponentToDeleteWhenDeleted: !!t && t.triggerBelongedComponentToDeleteWhenDeleted ||
|
|
466
|
-
},
|
|
466
|
+
triggerBelongedComponentToMoveWhenMoved: !!t && t.triggerBelongedComponentToMoveWhenMoved || T(!1),
|
|
467
|
+
triggerBelongedComponentToDeleteWhenDeleted: !!t && t.triggerBelongedComponentToDeleteWhenDeleted || T(!1)
|
|
468
|
+
}, m;
|
|
467
469
|
}
|
|
468
470
|
class G {
|
|
469
471
|
static getEditorTypesByMDataType(e) {
|
|
@@ -607,13 +609,13 @@ class ge {
|
|
|
607
609
|
* @param newControlType 新控件类型
|
|
608
610
|
*/
|
|
609
611
|
changeControlType(e, t) {
|
|
610
|
-
var a, l,
|
|
612
|
+
var a, l, p, s, g;
|
|
611
613
|
const n = t.propertyValue, i = this.formSchemaUtils.getComponentById(this.componentId);
|
|
612
614
|
let c = this.getControlParentContainer(e.id, i);
|
|
613
615
|
if (!c)
|
|
614
616
|
return;
|
|
615
|
-
const
|
|
616
|
-
let
|
|
617
|
+
const m = c.contents.findIndex((f) => f.id === e.id), u = c.contents[m];
|
|
618
|
+
let y;
|
|
617
619
|
this.designViewModelField && (this.designViewModelUtils.getDgViewModel(this.viewModelId).changeField(this.designViewModelField.id, {
|
|
618
620
|
editor: {
|
|
619
621
|
$type: n
|
|
@@ -621,20 +623,20 @@ class ge {
|
|
|
621
623
|
name: this.designViewModelField.name,
|
|
622
624
|
require: this.designViewModelField.require,
|
|
623
625
|
readonly: this.designViewModelField.readonly
|
|
624
|
-
}, !1),
|
|
626
|
+
}, !1), y = this.controlCreatorUtils.setFormFieldProperty("Form", this.designViewModelField, null, n)), Object.assign(y, {
|
|
625
627
|
id: u.id,
|
|
626
628
|
appearance: u.appearance,
|
|
627
629
|
size: u.size,
|
|
628
630
|
label: u.label
|
|
629
|
-
}), Object.assign(
|
|
630
|
-
isTextArea:
|
|
631
|
+
}), Object.assign(y.editor, {
|
|
632
|
+
isTextArea: y.isTextArea && u.isTextArea,
|
|
631
633
|
type: n || "",
|
|
632
634
|
placeHolder: (a = u.editor) == null ? void 0 : a.placeHolder,
|
|
633
635
|
holdPlace: (l = u.editor) == null ? void 0 : l.holdPlace,
|
|
634
|
-
readonly: (
|
|
635
|
-
require: (
|
|
636
|
-
visible: (
|
|
637
|
-
}), c.contents.splice(
|
|
636
|
+
readonly: (p = u.editor) == null ? void 0 : p.readonly,
|
|
637
|
+
require: (s = u.editor) == null ? void 0 : s.require,
|
|
638
|
+
visible: (g = u.editor) == null ? void 0 : g.visible
|
|
639
|
+
}), c.contents.splice(m, 1, y);
|
|
638
640
|
}
|
|
639
641
|
getAppearanceConfig(e = null) {
|
|
640
642
|
return {
|
|
@@ -831,32 +833,32 @@ class he extends fe {
|
|
|
831
833
|
}
|
|
832
834
|
function ve(o, e) {
|
|
833
835
|
o.schema;
|
|
834
|
-
const t =
|
|
835
|
-
function i(
|
|
836
|
+
const t = T(!0), n = T(!0);
|
|
837
|
+
function i(p) {
|
|
836
838
|
return !1;
|
|
837
839
|
}
|
|
838
840
|
function c() {
|
|
839
841
|
return !1;
|
|
840
842
|
}
|
|
841
|
-
function
|
|
843
|
+
function m() {
|
|
842
844
|
return !1;
|
|
843
845
|
}
|
|
844
846
|
function u() {
|
|
845
847
|
return !0;
|
|
846
848
|
}
|
|
847
|
-
function
|
|
849
|
+
function y(p) {
|
|
848
850
|
}
|
|
849
851
|
function a() {
|
|
850
852
|
}
|
|
851
|
-
function l(
|
|
853
|
+
function l(p) {
|
|
852
854
|
return null;
|
|
853
855
|
}
|
|
854
856
|
return {
|
|
855
857
|
canAccepts: i,
|
|
856
858
|
checkCanDeleteComponent: c,
|
|
857
|
-
checkCanMoveComponent:
|
|
859
|
+
checkCanMoveComponent: m,
|
|
858
860
|
hideNestedPaddingInDesginerView: u,
|
|
859
|
-
onAcceptMovedChildElement:
|
|
861
|
+
onAcceptMovedChildElement: y,
|
|
860
862
|
resolveComponentContext: a,
|
|
861
863
|
triggerBelongedComponentToMoveWhenMoved: t,
|
|
862
864
|
triggerBelongedComponentToDeleteWhenDeleted: n,
|
|
@@ -869,86 +871,57 @@ function Ce(o, e) {
|
|
|
869
871
|
checkCanDeleteComponent: n,
|
|
870
872
|
checkCanMoveComponent: i,
|
|
871
873
|
hideNestedPaddingInDesginerView: c,
|
|
872
|
-
onAcceptMovedChildElement:
|
|
874
|
+
onAcceptMovedChildElement: m,
|
|
873
875
|
resolveComponentContext: u,
|
|
874
|
-
triggerBelongedComponentToMoveWhenMoved:
|
|
876
|
+
triggerBelongedComponentToMoveWhenMoved: y,
|
|
875
877
|
triggerBelongedComponentToDeleteWhenDeleted: a
|
|
876
878
|
} = ve(o), l = o.schema;
|
|
877
|
-
function s
|
|
878
|
-
return new he(
|
|
879
|
+
function p(s) {
|
|
880
|
+
return new he(s, e).getPropertyConfig(l);
|
|
879
881
|
}
|
|
880
882
|
return {
|
|
881
883
|
canAccepts: t,
|
|
882
884
|
checkCanDeleteComponent: n,
|
|
883
885
|
checkCanMoveComponent: i,
|
|
884
886
|
hideNestedPaddingInDesginerView: c,
|
|
885
|
-
onAcceptMovedChildElement:
|
|
887
|
+
onAcceptMovedChildElement: m,
|
|
886
888
|
resolveComponentContext: u,
|
|
887
|
-
triggerBelongedComponentToMoveWhenMoved:
|
|
889
|
+
triggerBelongedComponentToMoveWhenMoved: y,
|
|
888
890
|
triggerBelongedComponentToDeleteWhenDeleted: a,
|
|
889
|
-
getPropsConfig:
|
|
891
|
+
getPropsConfig: p
|
|
890
892
|
};
|
|
891
893
|
}
|
|
892
894
|
const be = /* @__PURE__ */ $({
|
|
893
895
|
name: "FSwitchDesign",
|
|
894
|
-
props:
|
|
896
|
+
props: E,
|
|
895
897
|
emits: ["update:modelValue"],
|
|
896
898
|
setup(o, e) {
|
|
897
899
|
const {
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
} = j(o), d = w(o.modelValue), u = w(), g = z("designer-host-service"), a = z("design-item-context"), l = Ce(a, g), s = ye(u, a, l);
|
|
900
|
+
size: t,
|
|
901
|
+
onLabel: n,
|
|
902
|
+
offLabel: i
|
|
903
|
+
} = j(o), c = T(), m = z("designer-host-service"), u = z("design-item-context"), y = Ce(u, m), a = ye(c, u, y);
|
|
903
904
|
X(() => {
|
|
904
|
-
|
|
905
|
-
}), e.expose(
|
|
906
|
-
|
|
907
|
-
return "";
|
|
908
|
-
}
|
|
909
|
-
function y() {
|
|
910
|
-
return "";
|
|
911
|
-
}
|
|
912
|
-
function f() {
|
|
913
|
-
return "";
|
|
914
|
-
}
|
|
915
|
-
const k = T(() => ({
|
|
905
|
+
c.value.componentInstance = a;
|
|
906
|
+
}), e.expose(a.value);
|
|
907
|
+
const l = k(() => ({
|
|
916
908
|
switch: !0,
|
|
917
909
|
"f-cmp-switch": !0,
|
|
918
|
-
checked:
|
|
919
|
-
|
|
920
|
-
"switch-
|
|
921
|
-
"switch-
|
|
922
|
-
|
|
923
|
-
})), M = T(() => ({
|
|
924
|
-
outline: "none",
|
|
925
|
-
"backgroud-color": p(),
|
|
926
|
-
"border-color": y()
|
|
927
|
-
})), S = T(() => ({
|
|
928
|
-
background: f()
|
|
929
|
-
})), P = T(() => (i == null ? void 0 : i.value) || (c == null ? void 0 : c.value));
|
|
930
|
-
function B(D, m = !0) {
|
|
931
|
-
t.value || (d.value = !d.value, e.emit("update:modelValue", d.value));
|
|
932
|
-
}
|
|
933
|
-
function E(D) {
|
|
934
|
-
B();
|
|
935
|
-
}
|
|
910
|
+
checked: !1,
|
|
911
|
+
"switch-large": t.value === "large",
|
|
912
|
+
"switch-medium": t.value === "medium",
|
|
913
|
+
"switch-small": t.value === "small"
|
|
914
|
+
})), p = k(() => (n == null ? void 0 : n.value) || (i == null ? void 0 : i.value));
|
|
936
915
|
return () => b("span", {
|
|
937
|
-
ref:
|
|
916
|
+
ref: c,
|
|
938
917
|
tabindex: "0",
|
|
939
918
|
role: "button",
|
|
940
|
-
class:
|
|
941
|
-
|
|
942
|
-
onClick: E
|
|
943
|
-
}, [P.value && b("span", {
|
|
919
|
+
class: l.value
|
|
920
|
+
}, [p.value && b("span", {
|
|
944
921
|
class: "switch-pane"
|
|
945
922
|
}, [b("span", {
|
|
946
|
-
class: "switch-label-checked"
|
|
947
|
-
}, [i == null ? void 0 : i.value]), b("span", {
|
|
948
923
|
class: "switch-label-unchecked"
|
|
949
|
-
}, [
|
|
950
|
-
style: S.value
|
|
951
|
-
}, [e.slots.default && e.slots.default()])]);
|
|
924
|
+
}, [i == null ? void 0 : i.value])]), b("small", null, [e.slots.default && e.slots.default()])]);
|
|
952
925
|
}
|
|
953
926
|
}), we = (o) => {
|
|
954
927
|
const e = o;
|
|
@@ -956,16 +929,16 @@ const be = /* @__PURE__ */ $({
|
|
|
956
929
|
t.component(e.name, o);
|
|
957
930
|
}, o;
|
|
958
931
|
};
|
|
959
|
-
|
|
960
|
-
o.switch =
|
|
932
|
+
P.register = (o, e, t, n) => {
|
|
933
|
+
o.switch = P, e.switch = W;
|
|
961
934
|
};
|
|
962
|
-
|
|
935
|
+
P.registerDesigner = (o, e, t) => {
|
|
963
936
|
o.switch = be, e.switch = W;
|
|
964
937
|
};
|
|
965
|
-
const
|
|
938
|
+
const ke = we(P);
|
|
966
939
|
export {
|
|
967
|
-
|
|
968
|
-
|
|
940
|
+
P as FSwitch,
|
|
941
|
+
ke as default,
|
|
969
942
|
W as propsResolver,
|
|
970
|
-
|
|
943
|
+
E as switchProps
|
|
971
944
|
};
|