@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
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var F = (r, e, n) =>
|
|
4
|
-
import { computed as
|
|
1
|
+
var ke = Object.defineProperty;
|
|
2
|
+
var Pe = (r, e, n) => e in r ? ke(r, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : r[e] = n;
|
|
3
|
+
var F = (r, e, n) => Pe(r, typeof e != "symbol" ? e + "" : e, n);
|
|
4
|
+
import { computed as z, getCurrentInstance as de, createVNode as w, ref as j, defineComponent as Y, onMounted as H, onUnmounted as ne, watch as Q, inject as $, createTextVNode as ue, provide as Re, onBeforeUnmount as Ee, withModifiers as je } from "vue";
|
|
5
5
|
import { cloneDeep as Be } from "lodash-es";
|
|
6
6
|
import { useDesignerInnerComponent as fe } from "@farris/ui-vue/components/designer-canvas/src/composition/function/use-designer-inner-component";
|
|
7
7
|
import { withInstall as Ae } from "@farris/ui-vue/components/common";
|
|
@@ -50,13 +50,13 @@ class me {
|
|
|
50
50
|
"tipsText",
|
|
51
51
|
"onClick"
|
|
52
52
|
];
|
|
53
|
-
Object.keys(e).filter((
|
|
54
|
-
this[
|
|
53
|
+
Object.keys(e).filter((c) => n.indexOf(c) > -1).forEach((c) => {
|
|
54
|
+
this[c] = e[c];
|
|
55
55
|
});
|
|
56
56
|
}
|
|
57
57
|
/** 是否可用 */
|
|
58
58
|
get enable() {
|
|
59
|
-
return Object.keys(this.options).indexOf("enable") > -1 ? this.options.enable :
|
|
59
|
+
return Object.keys(this.options).indexOf("enable") > -1 ? this.options.enable : z(() => !0);
|
|
60
60
|
}
|
|
61
61
|
/** 设置宽度 */
|
|
62
62
|
setWidth(e) {
|
|
@@ -75,7 +75,7 @@ class Fe extends me {
|
|
|
75
75
|
function ge() {
|
|
76
76
|
function r(e) {
|
|
77
77
|
const n = [];
|
|
78
|
-
return e.reduce((
|
|
78
|
+
return e.reduce((c, u) => (u.children && u.children.length > 0 ? c.push(new G(u)) : c.push(new Fe(u)), c), n), n;
|
|
79
79
|
}
|
|
80
80
|
return { buildResponseToolbarItems: r };
|
|
81
81
|
}
|
|
@@ -93,8 +93,8 @@ class G extends me {
|
|
|
93
93
|
F(this, "split", !1);
|
|
94
94
|
F(this, "children", []);
|
|
95
95
|
F(this, "expanded", !1);
|
|
96
|
-
const
|
|
97
|
-
Object.keys(n).filter((u) =>
|
|
96
|
+
const c = ["isDP", "class", "dropdownClass", "menuClass", "placement", "split", "expanded"];
|
|
97
|
+
Object.keys(n).filter((u) => c.indexOf(u) > -1).forEach((u) => {
|
|
98
98
|
this[u] = n[u];
|
|
99
99
|
}), n.children && n.children.length && (this.children = Oe(n.children));
|
|
100
100
|
}
|
|
@@ -146,82 +146,82 @@ class Nt {
|
|
|
146
146
|
}
|
|
147
147
|
const oe = {}, ye = {};
|
|
148
148
|
function re(r) {
|
|
149
|
-
const { properties: e, title: n } = r,
|
|
150
|
-
return
|
|
149
|
+
const { properties: e, title: n } = r, c = Object.keys(e).reduce((u, m) => (u[m] = e[m].type === "object" && e[m].properties ? re(e[m]) : Be(e[m].default), u), {});
|
|
150
|
+
return c.id = `${n}-${Date.now()}`, c;
|
|
151
151
|
}
|
|
152
152
|
function q(r, e = {}) {
|
|
153
153
|
const n = oe[r];
|
|
154
154
|
if (n) {
|
|
155
|
-
let
|
|
155
|
+
let c = re(n);
|
|
156
156
|
const u = ye[r];
|
|
157
|
-
return
|
|
157
|
+
return c = u ? u({ getSchemaByType: q }, c, e) : c, c;
|
|
158
158
|
}
|
|
159
159
|
return null;
|
|
160
160
|
}
|
|
161
161
|
function Le(r, e) {
|
|
162
162
|
const n = re(e);
|
|
163
|
-
return Object.keys(r).reduce((
|
|
163
|
+
return Object.keys(r).reduce((c, u) => (c[u] = r[u], c), n), n;
|
|
164
164
|
}
|
|
165
165
|
function Ne(r, e) {
|
|
166
|
-
return Object.keys(r).filter((
|
|
166
|
+
return Object.keys(r).filter((c) => r[c] != null).reduce((c, u) => {
|
|
167
167
|
if (e.has(u)) {
|
|
168
168
|
const m = e.get(u);
|
|
169
169
|
if (typeof m == "string")
|
|
170
|
-
|
|
170
|
+
c[m] = r[u];
|
|
171
171
|
else {
|
|
172
172
|
const v = m(u, r[u], r);
|
|
173
|
-
Object.assign(
|
|
173
|
+
Object.assign(c, v);
|
|
174
174
|
}
|
|
175
175
|
} else
|
|
176
|
-
|
|
177
|
-
return
|
|
176
|
+
c[u] = r[u];
|
|
177
|
+
return c;
|
|
178
178
|
}, {});
|
|
179
179
|
}
|
|
180
180
|
function Ve(r, e, n = /* @__PURE__ */ new Map()) {
|
|
181
|
-
const
|
|
182
|
-
return Ne(
|
|
181
|
+
const c = Le(r, e);
|
|
182
|
+
return Ne(c, n);
|
|
183
183
|
}
|
|
184
184
|
function _e(r = {}) {
|
|
185
|
-
function e(g, C, p,
|
|
185
|
+
function e(g, C, p, a) {
|
|
186
186
|
if (typeof p == "number")
|
|
187
|
-
return
|
|
187
|
+
return a[g].length === p;
|
|
188
188
|
if (typeof p == "object") {
|
|
189
189
|
const d = Object.keys(p)[0], s = p[d];
|
|
190
190
|
if (d === "not")
|
|
191
|
-
return Number(
|
|
191
|
+
return Number(a[g].length) !== Number(s);
|
|
192
192
|
if (d === "moreThan")
|
|
193
|
-
return Number(
|
|
193
|
+
return Number(a[g].length) >= Number(s);
|
|
194
194
|
if (d === "lessThan")
|
|
195
|
-
return Number(
|
|
195
|
+
return Number(a[g].length) <= Number(s);
|
|
196
196
|
}
|
|
197
197
|
return !1;
|
|
198
198
|
}
|
|
199
|
-
function n(g, C, p,
|
|
200
|
-
return
|
|
199
|
+
function n(g, C, p, a) {
|
|
200
|
+
return a[g] && a[g].propertyValue && String(a[g].propertyValue.value) === String(p);
|
|
201
201
|
}
|
|
202
|
-
const
|
|
202
|
+
const c = /* @__PURE__ */ new Map([
|
|
203
203
|
["length", e],
|
|
204
204
|
["getProperty", n]
|
|
205
205
|
]);
|
|
206
|
-
Object.keys(r).reduce((g, C) => (g.set(C, r[C]), g),
|
|
206
|
+
Object.keys(r).reduce((g, C) => (g.set(C, r[C]), g), c);
|
|
207
207
|
function u(g, C) {
|
|
208
208
|
const p = g;
|
|
209
|
-
return typeof C == "number" ? [{ target: p, operator: "length", param: null, value: Number(C) }] : typeof C == "boolean" ? [{ target: p, operator: "getProperty", param: g, value: !!C }] : typeof C == "object" ? Object.keys(C).map((
|
|
210
|
-
if (
|
|
211
|
-
return { target: p, operator: "length", param: null, value: C[
|
|
212
|
-
const d =
|
|
209
|
+
return typeof C == "number" ? [{ target: p, operator: "length", param: null, value: Number(C) }] : typeof C == "boolean" ? [{ target: p, operator: "getProperty", param: g, value: !!C }] : typeof C == "object" ? Object.keys(C).map((a) => {
|
|
210
|
+
if (a === "length")
|
|
211
|
+
return { target: p, operator: "length", param: null, value: C[a] };
|
|
212
|
+
const d = a, s = C[a];
|
|
213
213
|
return { target: p, operator: "getProperty", param: d, value: s };
|
|
214
214
|
}) : [];
|
|
215
215
|
}
|
|
216
216
|
function m(g) {
|
|
217
|
-
return Object.keys(g).reduce((p,
|
|
218
|
-
const d = u(
|
|
217
|
+
return Object.keys(g).reduce((p, a) => {
|
|
218
|
+
const d = u(a, g[a]);
|
|
219
219
|
return p.push(...d), p;
|
|
220
220
|
}, []);
|
|
221
221
|
}
|
|
222
222
|
function v(g, C) {
|
|
223
|
-
if (
|
|
224
|
-
const p =
|
|
223
|
+
if (c.has(g.operator)) {
|
|
224
|
+
const p = c.get(g.operator);
|
|
225
225
|
return p && p(g.target, g.param, g.value, C) || !1;
|
|
226
226
|
}
|
|
227
227
|
return !1;
|
|
@@ -230,8 +230,8 @@ function _e(r = {}) {
|
|
|
230
230
|
return m(g).reduce((d, s) => d && v(s, C), !0);
|
|
231
231
|
}
|
|
232
232
|
function S(g, C) {
|
|
233
|
-
const p = Object.keys(g),
|
|
234
|
-
return
|
|
233
|
+
const p = Object.keys(g), a = p.includes("allOf"), d = p.includes("anyOf"), s = a || d, x = (s ? g[s ? a ? "allOf" : "anyOf" : "allOf"] : [g]).map((P) => M(P, C));
|
|
234
|
+
return a ? !x.includes(!1) : x.includes(!0);
|
|
235
235
|
}
|
|
236
236
|
return { parseValueSchema: S };
|
|
237
237
|
}
|
|
@@ -348,8 +348,8 @@ const I = {
|
|
|
348
348
|
/** 审批类 end */
|
|
349
349
|
}, he = {}, $e = {};
|
|
350
350
|
_e();
|
|
351
|
-
function be(r, e, n = /* @__PURE__ */ new Map(),
|
|
352
|
-
return oe[e.title] = e, ye[e.title] =
|
|
351
|
+
function be(r, e, n = /* @__PURE__ */ new Map(), c = (v, M, S) => M, u = {}, m = (v) => v) {
|
|
352
|
+
return oe[e.title] = e, ye[e.title] = c, he[e.title] = u, $e[e.title] = m, (v = {}) => {
|
|
353
353
|
const M = Ve(v, e, n), S = Object.keys(r).reduce((g, C) => (g[C] = r[C].default, g), {});
|
|
354
354
|
return Object.assign(S, M);
|
|
355
355
|
};
|
|
@@ -360,7 +360,7 @@ const ve = /* @__PURE__ */ new Map([
|
|
|
360
360
|
function Ce(r, e, n) {
|
|
361
361
|
return e;
|
|
362
362
|
}
|
|
363
|
-
const
|
|
363
|
+
const We = "https://json-schema.org/draft/2020-12/schema", ze = "https://farris-design.gitee.io/response-toolbar.schema.json", Ue = "response-toolbar", qe = "A Farris Toolbar Component", He = "object", Ge = {
|
|
364
364
|
id: {
|
|
365
365
|
description: "The unique identifier for a Response Toolbar",
|
|
366
366
|
type: "string"
|
|
@@ -398,9 +398,9 @@ const Ue = "https://json-schema.org/draft/2020-12/schema", We = "https://farris-
|
|
|
398
398
|
"type",
|
|
399
399
|
"buttons"
|
|
400
400
|
], Xe = {
|
|
401
|
-
$schema:
|
|
402
|
-
$id:
|
|
403
|
-
title:
|
|
401
|
+
$schema: We,
|
|
402
|
+
$id: ze,
|
|
403
|
+
title: Ue,
|
|
404
404
|
description: qe,
|
|
405
405
|
type: He,
|
|
406
406
|
properties: Ge,
|
|
@@ -526,14 +526,14 @@ const at = Object.assign({}, se, {
|
|
|
526
526
|
);
|
|
527
527
|
function Te() {
|
|
528
528
|
function r(n) {
|
|
529
|
-
const
|
|
529
|
+
const c = {
|
|
530
530
|
"f-icon": !0
|
|
531
531
|
};
|
|
532
532
|
if (n.icon) {
|
|
533
533
|
const u = n.icon.trim().split(" ");
|
|
534
|
-
u && u.length && u.reduce((m, v) => (m[v] = !0, m),
|
|
534
|
+
u && u.length && u.reduce((m, v) => (m[v] = !0, m), c);
|
|
535
535
|
}
|
|
536
|
-
return
|
|
536
|
+
return c;
|
|
537
537
|
}
|
|
538
538
|
function e(n) {
|
|
539
539
|
return !!(n.icon && n.icon.trim());
|
|
@@ -542,103 +542,103 @@ function Te() {
|
|
|
542
542
|
}
|
|
543
543
|
function lt(r) {
|
|
544
544
|
function e(p) {
|
|
545
|
-
const
|
|
545
|
+
const a = {
|
|
546
546
|
"dropdown-menu": !0
|
|
547
547
|
};
|
|
548
548
|
if (p.class) {
|
|
549
549
|
const d = p.menuClass.split(" ");
|
|
550
|
-
d && d.length && d.reduce((s, y) => (s[y] = !0, s),
|
|
550
|
+
d && d.length && d.reduce((s, y) => (s[y] = !0, s), a);
|
|
551
551
|
}
|
|
552
|
-
return
|
|
552
|
+
return a;
|
|
553
553
|
}
|
|
554
554
|
function n(p) {
|
|
555
|
-
const
|
|
555
|
+
const a = {
|
|
556
556
|
disabled: !p.enable,
|
|
557
557
|
"dropdown-submenu": !0,
|
|
558
558
|
"f-rt-dropdown": !0
|
|
559
559
|
}, d = p.dropdownClass.split(" ");
|
|
560
|
-
return d && d.length && d.reduce((s, y) => (s[y] = !0, s),
|
|
560
|
+
return d && d.length && d.reduce((s, y) => (s[y] = !0, s), a), a;
|
|
561
561
|
}
|
|
562
|
-
function
|
|
563
|
-
const
|
|
562
|
+
function c(p) {
|
|
563
|
+
const a = {
|
|
564
564
|
disabled: !p.enable,
|
|
565
565
|
"dropdown-item": !0,
|
|
566
566
|
"f-rt-btn": !0
|
|
567
567
|
}, d = p.class.split(" ");
|
|
568
|
-
return d && d.length && d.reduce((s, y) => (s[y] = !0, s),
|
|
568
|
+
return d && d.length && d.reduce((s, y) => (s[y] = !0, s), a), a;
|
|
569
569
|
}
|
|
570
570
|
let u;
|
|
571
571
|
const m = /* @__PURE__ */ new Map();
|
|
572
|
-
function v(p,
|
|
572
|
+
function v(p, a, d) {
|
|
573
573
|
var y;
|
|
574
|
-
((y = p.target) == null ? void 0 : y.id) ===
|
|
574
|
+
((y = p.target) == null ? void 0 : y.id) === a.id && p.stopPropagation();
|
|
575
575
|
const s = d ? d.id : "__top_item__";
|
|
576
|
-
if (
|
|
576
|
+
if (a.children && a.children.length && (a.expanded = !a.expanded, a.expanded ? m.set(s, a) : m.delete(s)), m.has(s) && m.get(s) !== a) {
|
|
577
577
|
const h = m.get(s);
|
|
578
578
|
h && (h.expanded = !1);
|
|
579
579
|
}
|
|
580
580
|
}
|
|
581
|
-
function M(p,
|
|
582
|
-
document.body.click(),
|
|
581
|
+
function M(p, a) {
|
|
582
|
+
document.body.click(), a.enable && a.onClick(p, a.id);
|
|
583
583
|
}
|
|
584
584
|
function S(p) {
|
|
585
|
-
return p.children.map((
|
|
586
|
-
class: n(
|
|
587
|
-
id:
|
|
588
|
-
onClick: (d) =>
|
|
585
|
+
return p.children.map((a) => a.children && a.children.length ? w("li", {
|
|
586
|
+
class: n(a),
|
|
587
|
+
id: a.id,
|
|
588
|
+
onClick: (d) => a.enable && v(d, a, p)
|
|
589
589
|
}, [w("span", {
|
|
590
|
-
id:
|
|
591
|
-
class: a
|
|
592
|
-
onMouseover: (d) =>
|
|
593
|
-
}, [
|
|
590
|
+
id: a.id,
|
|
591
|
+
class: c(a),
|
|
592
|
+
onMouseover: (d) => a.enable && v(d, a, p)
|
|
593
|
+
}, [a.text, w("i", {
|
|
594
594
|
class: "f-icon f-icon-arrow-chevron-right",
|
|
595
595
|
style: "display: inline-block;float: right;line-height: 1.25rem;"
|
|
596
|
-
}, null)]), u(
|
|
597
|
-
class: a
|
|
598
|
-
id:
|
|
599
|
-
onClick: (d) => M(d,
|
|
600
|
-
onMouseover: (d) =>
|
|
601
|
-
}, [r.shouldShowIcon(
|
|
602
|
-
class: r.iconClass(
|
|
603
|
-
}, null),
|
|
604
|
-
}
|
|
605
|
-
function g(p,
|
|
596
|
+
}, null)]), u(a, a)]) : w("li", {
|
|
597
|
+
class: c(a),
|
|
598
|
+
id: a.id,
|
|
599
|
+
onClick: (d) => M(d, a),
|
|
600
|
+
onMouseover: (d) => a.enable && v(d, a, p)
|
|
601
|
+
}, [r.shouldShowIcon(a) && w("i", {
|
|
602
|
+
class: r.iconClass(a)
|
|
603
|
+
}, null), a.text]));
|
|
604
|
+
}
|
|
605
|
+
function g(p, a, d) {
|
|
606
606
|
const s = {
|
|
607
607
|
display: p.expanded ? "block" : "none",
|
|
608
608
|
position: "fixed",
|
|
609
609
|
maxWidth: "300px",
|
|
610
610
|
width: "auto",
|
|
611
611
|
minWidth: "120px"
|
|
612
|
-
}, y = document.getElementsByTagName("body")[0].getClientRects()[0].width, h =
|
|
612
|
+
}, y = document.getElementsByTagName("body")[0].getClientRects()[0].width, h = a, x = h == null ? void 0 : h.getClientRects();
|
|
613
613
|
if (h && x && x.length) {
|
|
614
614
|
const {
|
|
615
615
|
top: O,
|
|
616
|
-
width:
|
|
616
|
+
width: P,
|
|
617
617
|
left: A,
|
|
618
618
|
right: N,
|
|
619
619
|
height: D
|
|
620
620
|
} = x[0], b = Math.ceil(D + O);
|
|
621
621
|
s.top = `${b}px`, s.left = `${A}px`;
|
|
622
|
-
const
|
|
622
|
+
const k = p.id + "_menu", E = a ? a.querySelector("#" + k) : null;
|
|
623
623
|
if (E) {
|
|
624
624
|
s.display === "block" && (E.style.display = "block");
|
|
625
625
|
const l = E.getBoundingClientRect();
|
|
626
626
|
if (d) {
|
|
627
627
|
s.top = `${O - 6}px`;
|
|
628
|
-
const o = Math.ceil(
|
|
628
|
+
const o = Math.ceil(P + A);
|
|
629
629
|
s.left = `${o}px`;
|
|
630
630
|
}
|
|
631
|
-
y - A -
|
|
631
|
+
y - A - P < l.width && (s.left = `${(d ? A : N) - l.width}px`);
|
|
632
632
|
}
|
|
633
633
|
}
|
|
634
634
|
return s;
|
|
635
635
|
}
|
|
636
|
-
u = function(p,
|
|
636
|
+
u = function(p, a) {
|
|
637
637
|
var h, x;
|
|
638
|
-
const d = de(), s =
|
|
638
|
+
const d = de(), s = a ? a.id : p.id, y = (x = (h = d == null ? void 0 : d.exposed) == null ? void 0 : h.elementRef.value) == null ? void 0 : x.querySelector("#" + s);
|
|
639
639
|
return w("ul", {
|
|
640
640
|
class: e(p),
|
|
641
|
-
style: g(p, y,
|
|
641
|
+
style: g(p, y, a),
|
|
642
642
|
id: p.id + "_menu"
|
|
643
643
|
}, [S(p)]);
|
|
644
644
|
};
|
|
@@ -654,7 +654,7 @@ function lt(r) {
|
|
|
654
654
|
}
|
|
655
655
|
function pt(r, e) {
|
|
656
656
|
const n = j(r.alignment), {
|
|
657
|
-
renderDropdownMenu:
|
|
657
|
+
renderDropdownMenu: c,
|
|
658
658
|
clearAllDropDownMenu: u
|
|
659
659
|
} = lt(e);
|
|
660
660
|
function m(C) {
|
|
@@ -663,8 +663,8 @@ function pt(r, e) {
|
|
|
663
663
|
"f-rt-dropdown": !0,
|
|
664
664
|
"f-btn-ml": n.value === "right",
|
|
665
665
|
"f-btn-mr": n.value === "left"
|
|
666
|
-
},
|
|
667
|
-
return
|
|
666
|
+
}, a = C.dropdownClass.split(" ");
|
|
667
|
+
return a && a.length && a.reduce((d, s) => (d[s] = !0, d), p), p;
|
|
668
668
|
}
|
|
669
669
|
function v(C) {
|
|
670
670
|
const p = {
|
|
@@ -674,15 +674,15 @@ function pt(r, e) {
|
|
|
674
674
|
"btn-icontext": !!(C.icon && C.icon.trim())
|
|
675
675
|
};
|
|
676
676
|
if (C.class) {
|
|
677
|
-
const
|
|
678
|
-
|
|
677
|
+
const a = C.class.split(" ");
|
|
678
|
+
a && a.length && a.reduce((d, s) => (d[s] = !0, d), p);
|
|
679
679
|
}
|
|
680
680
|
return p;
|
|
681
681
|
}
|
|
682
682
|
function M(C, p) {
|
|
683
683
|
C.stopPropagation();
|
|
684
|
-
const
|
|
685
|
-
document.body.click(), p.expanded = !
|
|
684
|
+
const a = p.expanded;
|
|
685
|
+
document.body.click(), p.expanded = !a;
|
|
686
686
|
}
|
|
687
687
|
function S(C) {
|
|
688
688
|
return w("div", {
|
|
@@ -697,7 +697,7 @@ function pt(r, e) {
|
|
|
697
697
|
}, null), w("span", null, [C.text]), w("i", {
|
|
698
698
|
class: "f-icon f-icon-arrow-chevron-down",
|
|
699
699
|
style: "display: inline-block;float: right;line-height: 1.25rem;margin-left: .25rem;margin-right: .25rem;"
|
|
700
|
-
}, null)]),
|
|
700
|
+
}, null)]), c(C)]);
|
|
701
701
|
}
|
|
702
702
|
function g() {
|
|
703
703
|
u();
|
|
@@ -714,21 +714,21 @@ const {
|
|
|
714
714
|
props: se,
|
|
715
715
|
emits: ["click"],
|
|
716
716
|
setup(r, e) {
|
|
717
|
-
const n = j(pe(r.items)),
|
|
717
|
+
const n = j(pe(r.items)), c = j(), u = j(), m = j(), v = j(r.alignment), M = {
|
|
718
718
|
id: "__more_buttons__",
|
|
719
719
|
text: "更多"
|
|
720
|
-
}, S = j(new G(M)), g = Te(), C =
|
|
720
|
+
}, S = j(new G(M)), g = Te(), C = z(() => S.value.children.length > 0), p = z(() => {
|
|
721
721
|
const b = {
|
|
722
722
|
"f-toolbar": !0,
|
|
723
723
|
"f-response-toolbar": !0,
|
|
724
724
|
"position-relative": !0
|
|
725
725
|
};
|
|
726
726
|
if (r.customClass) {
|
|
727
|
-
const
|
|
728
|
-
|
|
727
|
+
const k = r.customClass.split(" ");
|
|
728
|
+
k && k.length && k.reduce((E, l) => (E[l] = !0, E), b);
|
|
729
729
|
}
|
|
730
730
|
return b;
|
|
731
|
-
}),
|
|
731
|
+
}), a = z(() => ({
|
|
732
732
|
"d-flex": !0,
|
|
733
733
|
"flex-nowrap": !0,
|
|
734
734
|
"justify-content-end": v.value === "right",
|
|
@@ -743,7 +743,7 @@ const {
|
|
|
743
743
|
}), S.value.expanded = !1, s();
|
|
744
744
|
}
|
|
745
745
|
function h(b) {
|
|
746
|
-
const
|
|
746
|
+
const k = {
|
|
747
747
|
btn: !0,
|
|
748
748
|
"f-rt-btn": !0,
|
|
749
749
|
"f-btn-ml": v.value === "right",
|
|
@@ -752,12 +752,12 @@ const {
|
|
|
752
752
|
};
|
|
753
753
|
if (b.class) {
|
|
754
754
|
const E = b.class.split(" ");
|
|
755
|
-
E && E.length && E.reduce((l, o) => (l[o] = !0, l),
|
|
755
|
+
E && E.length && E.reduce((l, o) => (l[o] = !0, l), k);
|
|
756
756
|
}
|
|
757
|
-
return
|
|
757
|
+
return k;
|
|
758
758
|
}
|
|
759
|
-
function x(b,
|
|
760
|
-
document.body.click(),
|
|
759
|
+
function x(b, k) {
|
|
760
|
+
document.body.click(), k.onClick(b, k.id), e.emit("click", b, k.id);
|
|
761
761
|
}
|
|
762
762
|
function O(b) {
|
|
763
763
|
return w("button", {
|
|
@@ -765,16 +765,16 @@ const {
|
|
|
765
765
|
class: h(b),
|
|
766
766
|
id: b.id,
|
|
767
767
|
disabled: !b.enable,
|
|
768
|
-
onClick: (
|
|
768
|
+
onClick: (k) => x(k, b)
|
|
769
769
|
}, [g.shouldShowIcon(b) && w("i", {
|
|
770
770
|
class: g.iconClass(b)
|
|
771
771
|
}, null), b.text]);
|
|
772
772
|
}
|
|
773
|
-
const
|
|
773
|
+
const P = /* @__PURE__ */ new Map(), A = [];
|
|
774
774
|
function N(b) {
|
|
775
|
-
const
|
|
775
|
+
const k = m.value;
|
|
776
776
|
let E = b;
|
|
777
|
-
const l = Array.from(
|
|
777
|
+
const l = Array.from(k.children), o = l[l.length - 1].id === "__more_buttons__" ? l[l.length - 1] : null;
|
|
778
778
|
if (o) {
|
|
779
779
|
const T = o.computedStyleMap().get("margin-left"), B = o.computedStyleMap().get("margin-right"), _ = (T ? T.value : 0) + o.getBoundingClientRect().width + (B ? B.value : 0);
|
|
780
780
|
E -= _;
|
|
@@ -782,7 +782,7 @@ const {
|
|
|
782
782
|
const t = l.filter((T) => T.id !== "__more_buttons__");
|
|
783
783
|
for (const T of t) {
|
|
784
784
|
const B = T.computedStyleMap().get("margin-left"), _ = T.computedStyleMap().get("margin-right"), L = (B ? B.value : 0) + T.getBoundingClientRect().width + (_ ? _.value : 0);
|
|
785
|
-
E < L ? (
|
|
785
|
+
E < L ? (P.set(T.id, !0), A.push({
|
|
786
786
|
id: T.id,
|
|
787
787
|
width: L
|
|
788
788
|
})) : E -= L;
|
|
@@ -791,13 +791,13 @@ const {
|
|
|
791
791
|
for (let T = A.length - 1; T >= 0; T--) {
|
|
792
792
|
const B = A[T].width;
|
|
793
793
|
if (E >= B)
|
|
794
|
-
E -= B,
|
|
794
|
+
E -= B, P.delete(A[T].id), A.pop();
|
|
795
795
|
else
|
|
796
796
|
break;
|
|
797
797
|
}
|
|
798
798
|
const i = Object.assign({}, S.value);
|
|
799
799
|
i.children = [];
|
|
800
|
-
const f = new G(i), R = n.value.reduce((T, B) => (
|
|
800
|
+
const f = new G(i), R = n.value.reduce((T, B) => (P.has(B.id) && f.children.push(B), B.visible = !P.has(B.id), T.push(B), T), []);
|
|
801
801
|
S.value = f, n.value = R;
|
|
802
802
|
}
|
|
803
803
|
const D = new ResizeObserver((b) => {
|
|
@@ -816,13 +816,13 @@ const {
|
|
|
816
816
|
}, {
|
|
817
817
|
deep: !0
|
|
818
818
|
}), e.expose({
|
|
819
|
-
elementRef:
|
|
819
|
+
elementRef: c
|
|
820
820
|
}), () => w("div", {
|
|
821
821
|
class: p.value,
|
|
822
|
-
ref:
|
|
822
|
+
ref: c
|
|
823
823
|
}, [w("div", {
|
|
824
824
|
ref: u,
|
|
825
|
-
class:
|
|
825
|
+
class: a.value
|
|
826
826
|
}, [w("div", {
|
|
827
827
|
ref: m,
|
|
828
828
|
class: "d-inline-block f-response-content",
|
|
@@ -831,10 +831,10 @@ const {
|
|
|
831
831
|
}
|
|
832
832
|
});
|
|
833
833
|
function dt(r, e) {
|
|
834
|
-
const n = $("design-item-context"),
|
|
834
|
+
const n = $("design-item-context"), c = $("toolbar-item-handler", () => {
|
|
835
835
|
});
|
|
836
836
|
function u() {
|
|
837
|
-
|
|
837
|
+
c && c();
|
|
838
838
|
}
|
|
839
839
|
function m(o) {
|
|
840
840
|
const t = {
|
|
@@ -878,7 +878,7 @@ function dt(r, e) {
|
|
|
878
878
|
function p(o) {
|
|
879
879
|
o && (o.stopPropagation(), o.preventDefault());
|
|
880
880
|
}
|
|
881
|
-
function
|
|
881
|
+
function a() {
|
|
882
882
|
Array.from(document.getElementsByClassName("dgComponentFocused")).forEach((t) => t.classList.remove("dgComponentFocused"));
|
|
883
883
|
const o = document.getElementsByClassName("dgComponentSelected");
|
|
884
884
|
Array.from(o).forEach((t) => t.classList.remove("dgComponentSelected"));
|
|
@@ -931,8 +931,8 @@ function dt(r, e) {
|
|
|
931
931
|
};
|
|
932
932
|
return x(o);
|
|
933
933
|
};
|
|
934
|
-
function
|
|
935
|
-
p(o),
|
|
934
|
+
function P(o, t) {
|
|
935
|
+
p(o), a(), d(o), h(t.id);
|
|
936
936
|
}
|
|
937
937
|
function A(o, t, i) {
|
|
938
938
|
p(o);
|
|
@@ -1019,7 +1019,7 @@ function dt(r, e) {
|
|
|
1019
1019
|
style: "font-size:13px;margin:auto"
|
|
1020
1020
|
}, [ue("新增同级")])])])]);
|
|
1021
1021
|
}
|
|
1022
|
-
function
|
|
1022
|
+
function k(o) {
|
|
1023
1023
|
return o.children.map((t) => t.children && t.children.length ? w("li", {
|
|
1024
1024
|
class: v(t),
|
|
1025
1025
|
id: t.id,
|
|
@@ -1034,7 +1034,7 @@ function dt(r, e) {
|
|
|
1034
1034
|
}, null)]), S(t, t)]) : w("li", {
|
|
1035
1035
|
class: M(t),
|
|
1036
1036
|
id: t.id,
|
|
1037
|
-
onClick: (i) =>
|
|
1037
|
+
onClick: (i) => P(i, t)
|
|
1038
1038
|
}, [b(t, o), r.shouldShowIcon(t) && w("i", {
|
|
1039
1039
|
class: r.iconClass(t)
|
|
1040
1040
|
}, null), t.text]));
|
|
@@ -1052,9 +1052,9 @@ function dt(r, e) {
|
|
|
1052
1052
|
top: _,
|
|
1053
1053
|
width: L,
|
|
1054
1054
|
left: V,
|
|
1055
|
-
right:
|
|
1056
|
-
height:
|
|
1057
|
-
} = B[0], Z = Math.ceil(
|
|
1055
|
+
right: W,
|
|
1056
|
+
height: U
|
|
1057
|
+
} = B[0], Z = Math.ceil(U + _);
|
|
1058
1058
|
f.top = `${Z}px`, f.left = `${V}px`;
|
|
1059
1059
|
const Ie = o.id + "_menu", K = t ? t.querySelector("#" + Ie) : null;
|
|
1060
1060
|
if (K) {
|
|
@@ -1065,7 +1065,7 @@ function dt(r, e) {
|
|
|
1065
1065
|
const Me = Math.ceil(L + V);
|
|
1066
1066
|
f.left = `${Me}px`;
|
|
1067
1067
|
}
|
|
1068
|
-
R - V - L < ce.width && (f.left = `${(i ? V :
|
|
1068
|
+
R - V - L < ce.width && (f.left = `${(i ? V : W) - ce.width}px`);
|
|
1069
1069
|
}
|
|
1070
1070
|
}
|
|
1071
1071
|
return f;
|
|
@@ -1077,7 +1077,7 @@ function dt(r, e) {
|
|
|
1077
1077
|
class: m(o),
|
|
1078
1078
|
style: E(o, R, t),
|
|
1079
1079
|
id: o.id + "_menu"
|
|
1080
|
-
}, [
|
|
1080
|
+
}, [k(o)]);
|
|
1081
1081
|
};
|
|
1082
1082
|
function l() {
|
|
1083
1083
|
g.forEach((o) => {
|
|
@@ -1090,7 +1090,7 @@ function dt(r, e) {
|
|
|
1090
1090
|
};
|
|
1091
1091
|
}
|
|
1092
1092
|
function ut(r, e, n) {
|
|
1093
|
-
const
|
|
1093
|
+
const c = j(r.alignment), {
|
|
1094
1094
|
renderDropdownMenu: u,
|
|
1095
1095
|
clearAllDropDownMenu: m
|
|
1096
1096
|
} = dt(e, n), v = $("design-item-context"), M = $("toolbar-item-handler", () => {
|
|
@@ -1102,8 +1102,8 @@ function ut(r, e, n) {
|
|
|
1102
1102
|
const o = {
|
|
1103
1103
|
"btn-group": !0,
|
|
1104
1104
|
"f-rt-dropdown": !0,
|
|
1105
|
-
"f-btn-ml":
|
|
1106
|
-
"f-btn-mr":
|
|
1105
|
+
"f-btn-ml": c.value === "right",
|
|
1106
|
+
"f-btn-mr": c.value === "left"
|
|
1107
1107
|
}, t = l.dropdownClass.split(" ");
|
|
1108
1108
|
return t && t.length && t.reduce((i, f) => (i[f] = !0, i), o), o;
|
|
1109
1109
|
}
|
|
@@ -1125,7 +1125,7 @@ function ut(r, e, n) {
|
|
|
1125
1125
|
function p(l) {
|
|
1126
1126
|
l && (l.stopPropagation(), l.preventDefault());
|
|
1127
1127
|
}
|
|
1128
|
-
function
|
|
1128
|
+
function a(l, o) {
|
|
1129
1129
|
p(l);
|
|
1130
1130
|
const t = o.expanded;
|
|
1131
1131
|
document.body.click(), o.expanded = !t;
|
|
@@ -1179,7 +1179,7 @@ function ut(r, e, n) {
|
|
|
1179
1179
|
const t = v.schema.buttons || v.schema.contents, i = t == null ? void 0 : t.findIndex((f) => f.id === o);
|
|
1180
1180
|
i !== -1 && (t.splice(i, 1), S());
|
|
1181
1181
|
}
|
|
1182
|
-
function
|
|
1182
|
+
function P(l) {
|
|
1183
1183
|
return w("div", {
|
|
1184
1184
|
class: "component-btn-group"
|
|
1185
1185
|
}, [w("div", null, [w("div", {
|
|
@@ -1230,9 +1230,9 @@ function ut(r, e, n) {
|
|
|
1230
1230
|
(f = v == null ? void 0 : v.setupContext) == null || f.emit("selectionChange", "response-toolbar-item", i);
|
|
1231
1231
|
}
|
|
1232
1232
|
function b(l, o) {
|
|
1233
|
-
p(l), A(), N(l), p(l),
|
|
1233
|
+
p(l), A(), N(l), p(l), a(l, o), D(o.id);
|
|
1234
1234
|
}
|
|
1235
|
-
function
|
|
1235
|
+
function k(l) {
|
|
1236
1236
|
return w("div", {
|
|
1237
1237
|
id: l.id,
|
|
1238
1238
|
class: g(l)
|
|
@@ -1240,7 +1240,7 @@ function ut(r, e, n) {
|
|
|
1240
1240
|
class: C(l),
|
|
1241
1241
|
style: "display: flex;padding-right: 0.1rem;",
|
|
1242
1242
|
onClick: (o) => l.enable && b(o, l)
|
|
1243
|
-
}, [
|
|
1243
|
+
}, [P(l.id), e.shouldShowIcon(l) && w("i", {
|
|
1244
1244
|
class: e.iconClass(l)
|
|
1245
1245
|
}, null), w("span", null, [l.text]), w("i", {
|
|
1246
1246
|
class: "f-icon f-icon-arrow-chevron-down",
|
|
@@ -1251,7 +1251,7 @@ function ut(r, e, n) {
|
|
|
1251
1251
|
m();
|
|
1252
1252
|
}
|
|
1253
1253
|
return {
|
|
1254
|
-
renderToolbarDropdown:
|
|
1254
|
+
renderToolbarDropdown: k,
|
|
1255
1255
|
clearAllDropDown: E
|
|
1256
1256
|
};
|
|
1257
1257
|
}
|
|
@@ -1263,9 +1263,9 @@ function ft() {
|
|
|
1263
1263
|
const n = ((u = e.targetContainer) == null ? void 0 : u.componentInstance) && e.targetContainer.componentInstance.value;
|
|
1264
1264
|
if (!n)
|
|
1265
1265
|
return !1;
|
|
1266
|
-
const
|
|
1266
|
+
const c = (m = n.schema.appearance) == null ? void 0 : m.class;
|
|
1267
1267
|
if (e.controlCategory === "input" || e.controlType === "form-group") {
|
|
1268
|
-
const v = n.schema.type, M = (v === "response-form" || v === "content-container") &&
|
|
1268
|
+
const v = n.schema.type, M = (v === "response-form" || v === "content-container") && c && c.includes("farris-form");
|
|
1269
1269
|
if (n.schema.type !== "response-layout-item" && !M)
|
|
1270
1270
|
return !1;
|
|
1271
1271
|
}
|
|
@@ -1854,12 +1854,12 @@ function xe() {
|
|
|
1854
1854
|
if (typeof h == "number")
|
|
1855
1855
|
return ((O = x[s]) == null ? void 0 : O.length) === h;
|
|
1856
1856
|
if (typeof h == "object") {
|
|
1857
|
-
const
|
|
1858
|
-
if (
|
|
1857
|
+
const P = Object.keys(h)[0], A = h[P];
|
|
1858
|
+
if (P === "not")
|
|
1859
1859
|
return Number(x[s].length) !== Number(A);
|
|
1860
|
-
if (
|
|
1860
|
+
if (P === "moreThan")
|
|
1861
1861
|
return Number(x[s].length) >= Number(A);
|
|
1862
|
-
if (
|
|
1862
|
+
if (P === "lessThan")
|
|
1863
1863
|
return Number(x[s].length) <= Number(A);
|
|
1864
1864
|
}
|
|
1865
1865
|
return !1;
|
|
@@ -1870,13 +1870,13 @@ function xe() {
|
|
|
1870
1870
|
function n(s, y, h, x) {
|
|
1871
1871
|
return typeof h == "boolean" ? x.parentClassList.includes(y) === !!h : !1;
|
|
1872
1872
|
}
|
|
1873
|
-
function
|
|
1873
|
+
function c(s, y, h, x) {
|
|
1874
1874
|
return typeof h == "boolean" ? x.parentClassList.includes(y) === !!h : !1;
|
|
1875
1875
|
}
|
|
1876
1876
|
const u = /* @__PURE__ */ new Map([
|
|
1877
1877
|
["length", r],
|
|
1878
1878
|
["hasChildren", e],
|
|
1879
|
-
["hasSibling",
|
|
1879
|
+
["hasSibling", c],
|
|
1880
1880
|
["hasParent", n]
|
|
1881
1881
|
]);
|
|
1882
1882
|
function m(s, y) {
|
|
@@ -1884,8 +1884,8 @@ function xe() {
|
|
|
1884
1884
|
return typeof y == "number" ? [{ target: h, operator: "length", param: null, value: Number(y) }] : typeof y == "object" ? Object.keys(y).map((x) => {
|
|
1885
1885
|
if (x === "length")
|
|
1886
1886
|
return { target: h, operator: "length", param: null, value: y[x] };
|
|
1887
|
-
const O = x,
|
|
1888
|
-
return { target: h, operator: s === "children" ? "hasChildren" : s === "parent" ? "hasParent" : "hasSibling", param: O, value:
|
|
1887
|
+
const O = x, P = y[x];
|
|
1888
|
+
return { target: h, operator: s === "children" ? "hasChildren" : s === "parent" ? "hasParent" : "hasSibling", param: O, value: P };
|
|
1889
1889
|
}) : [];
|
|
1890
1890
|
}
|
|
1891
1891
|
function v(s, y) {
|
|
@@ -1896,13 +1896,13 @@ function xe() {
|
|
|
1896
1896
|
return !1;
|
|
1897
1897
|
}
|
|
1898
1898
|
function M(s, y) {
|
|
1899
|
-
return Object.keys(s).reduce((
|
|
1899
|
+
return Object.keys(s).reduce((P, A) => {
|
|
1900
1900
|
const N = m(A, s[A]);
|
|
1901
|
-
return
|
|
1902
|
-
}, []).reduce((
|
|
1901
|
+
return P.push(...N), P;
|
|
1902
|
+
}, []).reduce((P, A) => P && v(A, y), !0);
|
|
1903
1903
|
}
|
|
1904
1904
|
function S(s, y) {
|
|
1905
|
-
const h = Object.keys(s), x = h.includes("allOf"), O = h.includes("anyOf"),
|
|
1905
|
+
const h = Object.keys(s), x = h.includes("allOf"), O = h.includes("anyOf"), P = x || O, D = (P ? s[P ? x ? "allOf" : "anyOf" : "allOf"] : [s]).map((k) => M(k, y));
|
|
1906
1906
|
return x ? !D.includes(!1) : D.includes(!0);
|
|
1907
1907
|
}
|
|
1908
1908
|
function g(s, y) {
|
|
@@ -1913,8 +1913,8 @@ function xe() {
|
|
|
1913
1913
|
return (y) => {
|
|
1914
1914
|
const h = { canAccept: !0, fixed: !1, hidePadding: !1 };
|
|
1915
1915
|
return s && s.properties && Object.keys(s.properties).reduce((x, O) => {
|
|
1916
|
-
const
|
|
1917
|
-
return x[O] = g(
|
|
1916
|
+
const P = s.properties[O];
|
|
1917
|
+
return x[O] = g(P, y), x;
|
|
1918
1918
|
}, h), h;
|
|
1919
1919
|
};
|
|
1920
1920
|
}
|
|
@@ -1922,11 +1922,11 @@ function xe() {
|
|
|
1922
1922
|
if (y.type === "object" && y.properties) {
|
|
1923
1923
|
const { rules: x, contents: O } = y.properties;
|
|
1924
1924
|
h.set(s, C(x)), O && Object.keys(O.properties).forEach(
|
|
1925
|
-
(
|
|
1925
|
+
(P) => p(P, O.properties[P], h)
|
|
1926
1926
|
);
|
|
1927
1927
|
}
|
|
1928
1928
|
}
|
|
1929
|
-
function
|
|
1929
|
+
function a() {
|
|
1930
1930
|
const { properties: s } = wt;
|
|
1931
1931
|
Object.keys(s).forEach((y) => {
|
|
1932
1932
|
p(y, s[y], J);
|
|
@@ -1936,7 +1936,7 @@ function xe() {
|
|
|
1936
1936
|
const h = { canAccept: !0, fixed: !1, hidePadding: !0 };
|
|
1937
1937
|
return J.has(s) ? J.get(s)(y) : h;
|
|
1938
1938
|
}
|
|
1939
|
-
return
|
|
1939
|
+
return a(), { getRuleValue: d };
|
|
1940
1940
|
}
|
|
1941
1941
|
class Se {
|
|
1942
1942
|
static getEditorTypesByMDataType(e) {
|
|
@@ -2019,8 +2019,8 @@ class ae {
|
|
|
2019
2019
|
type: "object",
|
|
2020
2020
|
categories: {}
|
|
2021
2021
|
});
|
|
2022
|
-
var
|
|
2023
|
-
this.componentId = e, this.designerHostService = n, this.eventsEditorUtils = n.eventsEditorUtils, this.formSchemaUtils = n.formSchemaUtils, this.formMetadataConverter = n.formMetadataConverter, this.viewModelId = ((
|
|
2022
|
+
var c;
|
|
2023
|
+
this.componentId = e, this.designerHostService = n, this.eventsEditorUtils = n.eventsEditorUtils, this.formSchemaUtils = n.formSchemaUtils, this.formMetadataConverter = n.formMetadataConverter, this.viewModelId = ((c = this.formSchemaUtils) == null ? void 0 : c.getViewModelIdByComponentId(e)) || "", this.designViewModelUtils = n.designViewModelUtils, this.controlCreatorUtils = n.controlCreatorUtils, this.metadataService = n.metadataService, this.schemaService = n.schemaService;
|
|
2024
2024
|
}
|
|
2025
2025
|
getTableInfo() {
|
|
2026
2026
|
var e;
|
|
@@ -2030,8 +2030,8 @@ class ae {
|
|
|
2030
2030
|
const n = e.binding && e.binding.type === "Form" && e.binding.field;
|
|
2031
2031
|
if (n) {
|
|
2032
2032
|
if (!this.designViewModelField) {
|
|
2033
|
-
const
|
|
2034
|
-
this.designViewModelField =
|
|
2033
|
+
const c = this.designViewModelUtils.getDgViewModel(this.viewModelId);
|
|
2034
|
+
this.designViewModelField = c.fields.find((u) => u.id === n);
|
|
2035
2035
|
}
|
|
2036
2036
|
e.updateOn = this.designViewModelField.updateOn;
|
|
2037
2037
|
}
|
|
@@ -2039,7 +2039,7 @@ class ae {
|
|
|
2039
2039
|
changeFieldEditorType(e, n) {
|
|
2040
2040
|
}
|
|
2041
2041
|
getBasicPropConfig(e) {
|
|
2042
|
-
var
|
|
2042
|
+
var c, u;
|
|
2043
2043
|
var n = this;
|
|
2044
2044
|
return this.setDesignViewModelField(e), {
|
|
2045
2045
|
description: "Basic Information",
|
|
@@ -2061,7 +2061,7 @@ class ae {
|
|
|
2061
2061
|
type: "combo-list",
|
|
2062
2062
|
textField: "value",
|
|
2063
2063
|
valueField: "key",
|
|
2064
|
-
data: Se.getEditorTypesByMDataType(((u = (
|
|
2064
|
+
data: Se.getEditorTypesByMDataType(((u = (c = n.designViewModelField) == null ? void 0 : c.type) == null ? void 0 : u.name) || ""),
|
|
2065
2065
|
editable: !1
|
|
2066
2066
|
}
|
|
2067
2067
|
},
|
|
@@ -2088,8 +2088,8 @@ class ae {
|
|
|
2088
2088
|
* @param newControlType 新控件类型
|
|
2089
2089
|
*/
|
|
2090
2090
|
changeControlType(e, n) {
|
|
2091
|
-
var g, C, p,
|
|
2092
|
-
const
|
|
2091
|
+
var g, C, p, a, d;
|
|
2092
|
+
const c = n.propertyValue, u = this.formSchemaUtils.getComponentById(this.componentId);
|
|
2093
2093
|
let m = this.getControlParentContainer(e.id, u);
|
|
2094
2094
|
if (!m)
|
|
2095
2095
|
return;
|
|
@@ -2097,23 +2097,23 @@ class ae {
|
|
|
2097
2097
|
let S;
|
|
2098
2098
|
this.designViewModelField && (this.designViewModelUtils.getDgViewModel(this.viewModelId).changeField(this.designViewModelField.id, {
|
|
2099
2099
|
editor: {
|
|
2100
|
-
$type:
|
|
2100
|
+
$type: c
|
|
2101
2101
|
},
|
|
2102
2102
|
name: this.designViewModelField.name,
|
|
2103
2103
|
require: this.designViewModelField.require,
|
|
2104
2104
|
readonly: this.designViewModelField.readonly
|
|
2105
|
-
}, !1), S = this.controlCreatorUtils.setFormFieldProperty("Form", this.designViewModelField, null,
|
|
2105
|
+
}, !1), S = this.controlCreatorUtils.setFormFieldProperty("Form", this.designViewModelField, null, c)), Object.assign(S, {
|
|
2106
2106
|
id: M.id,
|
|
2107
2107
|
appearance: M.appearance,
|
|
2108
2108
|
size: M.size,
|
|
2109
2109
|
label: M.label
|
|
2110
2110
|
}), Object.assign(S.editor, {
|
|
2111
2111
|
isTextArea: S.isTextArea && M.isTextArea,
|
|
2112
|
-
type:
|
|
2112
|
+
type: c || "",
|
|
2113
2113
|
placeHolder: (g = M.editor) == null ? void 0 : g.placeHolder,
|
|
2114
2114
|
holdPlace: (C = M.editor) == null ? void 0 : C.holdPlace,
|
|
2115
2115
|
readonly: (p = M.editor) == null ? void 0 : p.readonly,
|
|
2116
|
-
require: (
|
|
2116
|
+
require: (a = M.editor) == null ? void 0 : a.require,
|
|
2117
2117
|
visible: (d = M.editor) == null ? void 0 : d.visible
|
|
2118
2118
|
}), m.contents.splice(v, 1, S);
|
|
2119
2119
|
}
|
|
@@ -2153,37 +2153,16 @@ class ae {
|
|
|
2153
2153
|
* @param domJson 容器
|
|
2154
2154
|
*/
|
|
2155
2155
|
getControlParentContainer(e, n) {
|
|
2156
|
-
let
|
|
2156
|
+
let c;
|
|
2157
2157
|
if (!n || !n.contents || n.contents.length === 0)
|
|
2158
2158
|
return null;
|
|
2159
2159
|
for (const u of n.contents) {
|
|
2160
2160
|
if (u.id === e)
|
|
2161
|
-
return
|
|
2162
|
-
if (
|
|
2163
|
-
return
|
|
2161
|
+
return c = n, n;
|
|
2162
|
+
if (c = this.getControlParentContainer(e, u), c)
|
|
2163
|
+
return c;
|
|
2164
2164
|
}
|
|
2165
2165
|
}
|
|
2166
|
-
getBindingFieldEditorOptions(e) {
|
|
2167
|
-
const n = this.formSchemaUtils.getFormMetadataBasicInfo();
|
|
2168
|
-
return {
|
|
2169
|
-
type: "field-selector",
|
|
2170
|
-
bindingType: { enable: !1 },
|
|
2171
|
-
editorParams: {
|
|
2172
|
-
propertyData: e,
|
|
2173
|
-
formBasicInfo: n
|
|
2174
|
-
},
|
|
2175
|
-
columns: [
|
|
2176
|
-
{ field: "name", title: "字段名称" },
|
|
2177
|
-
{ field: "bindingField", title: "绑定字段" },
|
|
2178
|
-
{ field: "fieldType", title: "字段类型" }
|
|
2179
|
-
],
|
|
2180
|
-
beforeOpenDialog: (a) => {
|
|
2181
|
-
const u = this.designViewModelUtils.getAllFields2TreeByVMId(this.viewModelId);
|
|
2182
|
-
a.instance.loadData(u);
|
|
2183
|
-
},
|
|
2184
|
-
textField: "bindingField"
|
|
2185
|
-
};
|
|
2186
|
-
}
|
|
2187
2166
|
}
|
|
2188
2167
|
class Tt extends ae {
|
|
2189
2168
|
constructor(e, n) {
|
|
@@ -2254,7 +2233,7 @@ class Tt extends ae {
|
|
|
2254
2233
|
};
|
|
2255
2234
|
}
|
|
2256
2235
|
}
|
|
2257
|
-
function xt(r, e, n,
|
|
2236
|
+
function xt(r, e, n, c) {
|
|
2258
2237
|
const u = xe(), m = j(!1), v = j(!1);
|
|
2259
2238
|
let M = !0, S = !1, g;
|
|
2260
2239
|
function C(D) {
|
|
@@ -2263,15 +2242,15 @@ function xt(r, e, n, a) {
|
|
|
2263
2242
|
function p(D) {
|
|
2264
2243
|
return !ft().basalDragulaRuleForContainer(D) || !M || !C(D), !1;
|
|
2265
2244
|
}
|
|
2266
|
-
function
|
|
2245
|
+
function a() {
|
|
2267
2246
|
m.value = !1, v.value = !1;
|
|
2268
|
-
const D = r, b = D.appearance && D.appearance.class || "",
|
|
2269
|
-
const
|
|
2247
|
+
const D = r, b = D.appearance && D.appearance.class || "", k = b.split(" "), E = D.buttons || [], l = E.length ? E[0] : null, o = l && l.appearance ? l.appearance.class : "", t = o ? o.split(" ") : [], i = E.length ? E.reduce((V, W) => {
|
|
2248
|
+
const U = W && W.appearance ? W.appearance.class : "", Z = U ? U.split(" ") : [];
|
|
2270
2249
|
return V.push(...Z), V;
|
|
2271
2250
|
}, []) : [], f = n == null ? void 0 : n.schema, R = f && f.appearance && f.appearance.class || "", T = R ? R.split(" ") : [];
|
|
2272
2251
|
g = {
|
|
2273
2252
|
componentClass: b,
|
|
2274
|
-
componentClassList:
|
|
2253
|
+
componentClassList: k,
|
|
2275
2254
|
childContents: E,
|
|
2276
2255
|
firstChildContent: l,
|
|
2277
2256
|
firstChildClass: o,
|
|
@@ -2282,7 +2261,7 @@ function xt(r, e, n, a) {
|
|
|
2282
2261
|
children: E,
|
|
2283
2262
|
childrenClassList: i
|
|
2284
2263
|
};
|
|
2285
|
-
const { canAccept: B, fixed: _, hidePadding: L } = u.getRuleValue(
|
|
2264
|
+
const { canAccept: B, fixed: _, hidePadding: L } = u.getRuleValue(k[0], g);
|
|
2286
2265
|
return M = B, S = L, !0;
|
|
2287
2266
|
}
|
|
2288
2267
|
function d(D) {
|
|
@@ -2293,13 +2272,13 @@ function xt(r, e, n, a) {
|
|
|
2293
2272
|
function y(D, b) {
|
|
2294
2273
|
return b.text = D.label, b;
|
|
2295
2274
|
}
|
|
2296
|
-
function h(D, b,
|
|
2275
|
+
function h(D, b, k) {
|
|
2297
2276
|
const E = r;
|
|
2298
2277
|
if ((E.appearance && E.appearance.class || "").split(" ").includes("f-form-layout")) {
|
|
2299
2278
|
const t = String(D.innerText), i = q("form-group");
|
|
2300
|
-
return i.editor =
|
|
2279
|
+
return i.editor = k, i.label = t, i;
|
|
2301
2280
|
}
|
|
2302
|
-
return
|
|
2281
|
+
return k;
|
|
2303
2282
|
}
|
|
2304
2283
|
function x() {
|
|
2305
2284
|
return !1;
|
|
@@ -2307,7 +2286,7 @@ function xt(r, e, n, a) {
|
|
|
2307
2286
|
function O() {
|
|
2308
2287
|
return !1;
|
|
2309
2288
|
}
|
|
2310
|
-
function
|
|
2289
|
+
function P() {
|
|
2311
2290
|
return !0;
|
|
2312
2291
|
}
|
|
2313
2292
|
function A() {
|
|
@@ -2318,7 +2297,7 @@ function xt(r, e, n, a) {
|
|
|
2318
2297
|
}
|
|
2319
2298
|
return {
|
|
2320
2299
|
canAccepts: p,
|
|
2321
|
-
checkCanAddComponent:
|
|
2300
|
+
checkCanAddComponent: P,
|
|
2322
2301
|
checkCanDeleteComponent: O,
|
|
2323
2302
|
checkCanMoveComponent: x,
|
|
2324
2303
|
getStyles: s,
|
|
@@ -2326,7 +2305,7 @@ function xt(r, e, n, a) {
|
|
|
2326
2305
|
onAcceptNewChildElement: h,
|
|
2327
2306
|
onAcceptMovedChildElement: d,
|
|
2328
2307
|
onResolveNewComponentSchema: y,
|
|
2329
|
-
resolveComponentContext:
|
|
2308
|
+
resolveComponentContext: a,
|
|
2330
2309
|
getPropsConfig: N,
|
|
2331
2310
|
triggerBelongedComponentToMoveWhenMoved: m,
|
|
2332
2311
|
triggerBelongedComponentToDeleteWhenDeleted: v
|
|
@@ -2347,7 +2326,7 @@ const St = {
|
|
|
2347
2326
|
modelValue: { type: Object }
|
|
2348
2327
|
}, ee = j(0);
|
|
2349
2328
|
function Dt(r, e) {
|
|
2350
|
-
const n = e.getBoundingClientRect(),
|
|
2329
|
+
const n = e.getBoundingClientRect(), c = r.getBoundingClientRect(), u = c.top >= n.top, m = c.top <= n.bottom;
|
|
2351
2330
|
return u && m;
|
|
2352
2331
|
}
|
|
2353
2332
|
function It(r) {
|
|
@@ -2359,14 +2338,14 @@ function It(r) {
|
|
|
2359
2338
|
const n = e.getBoundingClientRect();
|
|
2360
2339
|
if (n.width === 0 && n.height === 0)
|
|
2361
2340
|
return;
|
|
2362
|
-
const
|
|
2363
|
-
if (
|
|
2341
|
+
const c = e.querySelector(".component-btn-group");
|
|
2342
|
+
if (c) {
|
|
2364
2343
|
if (!Dt(e, r)) {
|
|
2365
|
-
|
|
2344
|
+
c.style.display = "none";
|
|
2366
2345
|
return;
|
|
2367
2346
|
}
|
|
2368
|
-
|
|
2369
|
-
const m =
|
|
2347
|
+
c.style.display = "";
|
|
2348
|
+
const m = c.getBoundingClientRect(), v = c.querySelector("div");
|
|
2370
2349
|
if (v) {
|
|
2371
2350
|
const M = v.getBoundingClientRect();
|
|
2372
2351
|
v.style.top = m.top + "px", v.style.left = m.left - M.width + "px";
|
|
@@ -2375,7 +2354,7 @@ function It(r) {
|
|
|
2375
2354
|
}
|
|
2376
2355
|
function Mt(r, e, n) {
|
|
2377
2356
|
var N;
|
|
2378
|
-
function
|
|
2357
|
+
function c() {
|
|
2379
2358
|
}
|
|
2380
2359
|
const u = "", m = j();
|
|
2381
2360
|
function v() {
|
|
@@ -2396,12 +2375,12 @@ function Mt(r, e, n) {
|
|
|
2396
2375
|
function p(D) {
|
|
2397
2376
|
if (!D || !D.value)
|
|
2398
2377
|
return null;
|
|
2399
|
-
const b = j(D == null ? void 0 : D.value.parent),
|
|
2400
|
-
return
|
|
2378
|
+
const b = j(D == null ? void 0 : D.value.parent), k = p(b);
|
|
2379
|
+
return k || null;
|
|
2401
2380
|
}
|
|
2402
|
-
function
|
|
2403
|
-
const { componentInstance: b, designerItemElementRef:
|
|
2404
|
-
return !b || !b.value ? null : b.value.canMove || b.value.canAdd || b.value.canDelete ?
|
|
2381
|
+
function a(D = e) {
|
|
2382
|
+
const { componentInstance: b, designerItemElementRef: k } = D;
|
|
2383
|
+
return !b || !b.value ? null : b.value.canMove || b.value.canAdd || b.value.canDelete ? k : a(D.parent);
|
|
2405
2384
|
}
|
|
2406
2385
|
function d(D) {
|
|
2407
2386
|
return !!n;
|
|
@@ -2415,18 +2394,18 @@ function Mt(r, e, n) {
|
|
|
2415
2394
|
}
|
|
2416
2395
|
function x(D) {
|
|
2417
2396
|
const { componentType: b } = D;
|
|
2418
|
-
let
|
|
2397
|
+
let k = q(b, D);
|
|
2419
2398
|
const E = b.toLowerCase().replace("-", "_");
|
|
2420
|
-
return
|
|
2399
|
+
return k && !k.id && k.type === b && (k.id = `${E}_${Math.random().toString().slice(2, 6)}`), k;
|
|
2421
2400
|
}
|
|
2422
2401
|
function O(D, b) {
|
|
2423
|
-
const
|
|
2402
|
+
const k = String(D.getAttribute("data-controltype")), E = D.getAttribute("data-feature"), l = E ? JSON.parse(E) : {};
|
|
2424
2403
|
l.parentComponentInstance = m.value;
|
|
2425
|
-
let o = q(
|
|
2426
|
-
const t =
|
|
2427
|
-
return o && !o.id && o.type ===
|
|
2404
|
+
let o = q(k, l);
|
|
2405
|
+
const t = k.toLowerCase().replace("-", "_");
|
|
2406
|
+
return o && !o.id && o.type === k && (o.id = `${t}_${Math.random().toString().slice(2, 6)}`), o;
|
|
2428
2407
|
}
|
|
2429
|
-
function
|
|
2408
|
+
function P(D) {
|
|
2430
2409
|
}
|
|
2431
2410
|
function A(...D) {
|
|
2432
2411
|
return [];
|
|
@@ -2444,25 +2423,25 @@ function Mt(r, e, n) {
|
|
|
2444
2423
|
styles: u,
|
|
2445
2424
|
canAccepts: d,
|
|
2446
2425
|
getBelongedComponentInstance: p,
|
|
2447
|
-
getDraggableDesignItemElement:
|
|
2426
|
+
getDraggableDesignItemElement: a,
|
|
2448
2427
|
getDraggingDisplayText: s,
|
|
2449
2428
|
getPropConfig: A,
|
|
2450
2429
|
getDragScopeElement: y,
|
|
2451
2430
|
onAcceptMovedChildElement: h,
|
|
2452
2431
|
onAcceptNewChildElement: O,
|
|
2453
|
-
onChildElementMovedOut:
|
|
2432
|
+
onChildElementMovedOut: P,
|
|
2454
2433
|
addNewChildComponentSchema: x,
|
|
2455
|
-
updateDragAndDropRules:
|
|
2434
|
+
updateDragAndDropRules: c,
|
|
2456
2435
|
triggerBelongedComponentToMoveWhenMoved: j(!1),
|
|
2457
2436
|
triggerBelongedComponentToDeleteWhenDeleted: j(!1)
|
|
2458
2437
|
}, m;
|
|
2459
2438
|
}
|
|
2460
|
-
const
|
|
2439
|
+
const kt = /* @__PURE__ */ Y({
|
|
2461
2440
|
name: "FDesignerInnerItem",
|
|
2462
2441
|
props: St,
|
|
2463
2442
|
emits: ["selectionChange", "addComponent", "removeComponent"],
|
|
2464
2443
|
setup(r, e) {
|
|
2465
|
-
const n = j(r.canMove),
|
|
2444
|
+
const n = j(r.canMove), c = j(r.canAdd), u = j(r.canDelete), m = j(!1), v = j(r.contentKey), M = j(r.childType), S = j(r.childLabel), g = j(r.modelValue), C = j(""), p = j(), a = $("canvas-dragula"), d = j(), s = $("design-item-context"), y = {
|
|
2466
2445
|
designerItemElementRef: p,
|
|
2467
2446
|
componentInstance: d,
|
|
2468
2447
|
schema: g.value,
|
|
@@ -2470,7 +2449,7 @@ const Pt = /* @__PURE__ */ Y({
|
|
|
2470
2449
|
setupContext: e
|
|
2471
2450
|
};
|
|
2472
2451
|
Re("design-item-context", y);
|
|
2473
|
-
const h =
|
|
2452
|
+
const h = z(() => ({
|
|
2474
2453
|
"farris-component": !0,
|
|
2475
2454
|
// 受position-relative影响,整个容器的高度不能被撑起
|
|
2476
2455
|
"flex-fill": r.id == "root-component",
|
|
@@ -2478,7 +2457,7 @@ const Pt = /* @__PURE__ */ Y({
|
|
|
2478
2457
|
"farris-nested": m.value,
|
|
2479
2458
|
"can-move": n.value,
|
|
2480
2459
|
"d-none": p.value && p.value.classList.contains("d-none")
|
|
2481
|
-
})), x =
|
|
2460
|
+
})), x = z(() => {
|
|
2482
2461
|
const t = {};
|
|
2483
2462
|
return C.value && C.value.split(";").reduce((i, f) => {
|
|
2484
2463
|
const [R, T] = f.split(":");
|
|
@@ -2494,7 +2473,7 @@ const Pt = /* @__PURE__ */ Y({
|
|
|
2494
2473
|
}
|
|
2495
2474
|
}
|
|
2496
2475
|
}
|
|
2497
|
-
function
|
|
2476
|
+
function P(t) {
|
|
2498
2477
|
if (d.value.addNewChildComponentSchema) {
|
|
2499
2478
|
const i = {
|
|
2500
2479
|
componentType: M.value,
|
|
@@ -2506,13 +2485,13 @@ const Pt = /* @__PURE__ */ Y({
|
|
|
2506
2485
|
}
|
|
2507
2486
|
}
|
|
2508
2487
|
function A() {
|
|
2509
|
-
return
|
|
2488
|
+
return c.value && w("div", {
|
|
2510
2489
|
role: "button",
|
|
2511
2490
|
class: "btn component-settings-button",
|
|
2512
2491
|
title: "新增",
|
|
2513
2492
|
ref: "removeComponent",
|
|
2514
2493
|
onClick: (t) => {
|
|
2515
|
-
|
|
2494
|
+
P();
|
|
2516
2495
|
}
|
|
2517
2496
|
}, [w("i", {
|
|
2518
2497
|
class: "f-icon f-icon-plus-circle"
|
|
@@ -2549,13 +2528,13 @@ const Pt = /* @__PURE__ */ Y({
|
|
|
2549
2528
|
Q(() => r.modelValue, (t) => {
|
|
2550
2529
|
g.value = t, y.schema = t;
|
|
2551
2530
|
});
|
|
2552
|
-
function
|
|
2531
|
+
function k(t) {
|
|
2553
2532
|
const i = t.target;
|
|
2554
2533
|
It(i);
|
|
2555
2534
|
}
|
|
2556
2535
|
function E() {
|
|
2557
2536
|
var t, i;
|
|
2558
|
-
(i = (t = g.value) == null ? void 0 : t.contents) != null && i.length && p.value && p.value.addEventListener("scroll",
|
|
2537
|
+
(i = (t = g.value) == null ? void 0 : t.contents) != null && i.length && p.value && p.value.addEventListener("scroll", k);
|
|
2559
2538
|
}
|
|
2560
2539
|
function l() {
|
|
2561
2540
|
const t = p.value, i = j(t.children[1]);
|
|
@@ -2564,11 +2543,11 @@ const Pt = /* @__PURE__ */ Y({
|
|
|
2564
2543
|
H(() => {
|
|
2565
2544
|
if (p.value) {
|
|
2566
2545
|
const t = p.value.querySelector(`[data-dragref='${g.value.id}-container']`);
|
|
2567
|
-
d.value = t && t.componentInstance ? t.componentInstance.value : l(),
|
|
2546
|
+
d.value = t && t.componentInstance ? t.componentInstance.value : l(), a && t && a.attachComponents(t, g.value), m.value = d.value.canNested !== void 0 ? d.value.canNested : m.value, c.value = d.value.canAdd !== void 0 ? d.value.canAdd : c.value, u.value = d.value.canDelete !== void 0 ? d.value.canDelete : u.value, n.value = d.value.canMove !== void 0 ? d.value.canMove : n.value, C.value = d.value.styles || "", p.value && (p.value.componentInstance = d, p.value.designItemContext = y);
|
|
2568
2547
|
}
|
|
2569
2548
|
E(), ee.value++;
|
|
2570
2549
|
}), Ee(() => {
|
|
2571
|
-
p.value && p.value.removeEventListener("scroll",
|
|
2550
|
+
p.value && p.value.removeEventListener("scroll", k);
|
|
2572
2551
|
});
|
|
2573
2552
|
function o(t) {
|
|
2574
2553
|
Array.from(document.getElementsByClassName("dgComponentFocused")).forEach((f) => f.classList.remove("dgComponentFocused")), t && (t.preventDefault(), t.stopPropagation());
|
|
@@ -2592,7 +2571,7 @@ const Pt = /* @__PURE__ */ Y({
|
|
|
2592
2571
|
}, [b(g.value), e.slots.default && e.slots.default()]);
|
|
2593
2572
|
}
|
|
2594
2573
|
});
|
|
2595
|
-
class
|
|
2574
|
+
class Pt extends ae {
|
|
2596
2575
|
constructor(e, n) {
|
|
2597
2576
|
super(e, n);
|
|
2598
2577
|
}
|
|
@@ -2643,7 +2622,7 @@ class kt extends ae {
|
|
|
2643
2622
|
title: "style样式"
|
|
2644
2623
|
}
|
|
2645
2624
|
},
|
|
2646
|
-
setPropertyRelates(n,
|
|
2625
|
+
setPropertyRelates(n, c) {
|
|
2647
2626
|
}
|
|
2648
2627
|
};
|
|
2649
2628
|
}
|
|
@@ -2654,9 +2633,9 @@ class kt extends ae {
|
|
|
2654
2633
|
name: "点击事件"
|
|
2655
2634
|
}
|
|
2656
2635
|
];
|
|
2657
|
-
var
|
|
2658
|
-
const u =
|
|
2659
|
-
m[
|
|
2636
|
+
var c = this;
|
|
2637
|
+
const u = c.eventsEditorUtils.formProperties(e, c.viewModelId, n), m = {};
|
|
2638
|
+
m[c.viewModelId] = {
|
|
2660
2639
|
type: "events-editor",
|
|
2661
2640
|
editor: {
|
|
2662
2641
|
initialData: u
|
|
@@ -2671,7 +2650,7 @@ class kt extends ae {
|
|
|
2671
2650
|
tabName: "交互",
|
|
2672
2651
|
setPropertyRelates(v, M) {
|
|
2673
2652
|
const S = v.propertyValue;
|
|
2674
|
-
delete e[
|
|
2653
|
+
delete e[c.viewModelId], S && (S.setPropertyRelates = this.setPropertyRelates, c.eventsEditorUtils.saveRelatedParameters(e, c.viewModelId, S.events, S));
|
|
2675
2654
|
}
|
|
2676
2655
|
};
|
|
2677
2656
|
}
|
|
@@ -2727,8 +2706,8 @@ class Rt extends ae {
|
|
|
2727
2706
|
label: "click",
|
|
2728
2707
|
name: "点击事件"
|
|
2729
2708
|
}
|
|
2730
|
-
],
|
|
2731
|
-
m[
|
|
2709
|
+
], c = this, u = c.eventsEditorUtils.formProperties(e, c.viewModelId, n), m = {};
|
|
2710
|
+
m[c.viewModelId] = {
|
|
2732
2711
|
type: "events-editor",
|
|
2733
2712
|
editor: {
|
|
2734
2713
|
initialData: u
|
|
@@ -2743,14 +2722,14 @@ class Rt extends ae {
|
|
|
2743
2722
|
tabName: "交互",
|
|
2744
2723
|
setPropertyRelates(v, M) {
|
|
2745
2724
|
const S = v.propertyValue;
|
|
2746
|
-
delete e[
|
|
2725
|
+
delete e[c.viewModelId], S && (S.setPropertyRelates = this.setPropertyRelates, c.eventsEditorUtils.saveRelatedParameters(e, c.viewModelId, S.events, S));
|
|
2747
2726
|
}
|
|
2748
2727
|
};
|
|
2749
2728
|
}
|
|
2750
2729
|
}
|
|
2751
2730
|
function Et(r, e) {
|
|
2752
2731
|
xe();
|
|
2753
|
-
const n = j(!1),
|
|
2732
|
+
const n = j(!1), c = j(!1);
|
|
2754
2733
|
let u = !1, m = !1;
|
|
2755
2734
|
function v(h) {
|
|
2756
2735
|
return !1;
|
|
@@ -2764,8 +2743,8 @@ function Et(r, e) {
|
|
|
2764
2743
|
return x.text = h.label, x;
|
|
2765
2744
|
}
|
|
2766
2745
|
function C(h, x, O) {
|
|
2767
|
-
const
|
|
2768
|
-
if ((
|
|
2746
|
+
const P = r.schema;
|
|
2747
|
+
if ((P.appearance && P.appearance.class || "").split(" ").includes("f-form-layout")) {
|
|
2769
2748
|
const D = String(h.innerText), b = q("form-group");
|
|
2770
2749
|
return b.editor = O, b.label = D, b;
|
|
2771
2750
|
}
|
|
@@ -2774,7 +2753,7 @@ function Et(r, e) {
|
|
|
2774
2753
|
function p() {
|
|
2775
2754
|
return !1;
|
|
2776
2755
|
}
|
|
2777
|
-
function
|
|
2756
|
+
function a() {
|
|
2778
2757
|
return !m;
|
|
2779
2758
|
}
|
|
2780
2759
|
function d() {
|
|
@@ -2787,7 +2766,7 @@ function Et(r, e) {
|
|
|
2787
2766
|
let x;
|
|
2788
2767
|
switch (r.schema.type) {
|
|
2789
2768
|
case "tab-toolbar-item":
|
|
2790
|
-
x = new
|
|
2769
|
+
x = new Pt(h, e);
|
|
2791
2770
|
break;
|
|
2792
2771
|
default:
|
|
2793
2772
|
x = new Rt(h, e);
|
|
@@ -2797,7 +2776,7 @@ function Et(r, e) {
|
|
|
2797
2776
|
return {
|
|
2798
2777
|
canAccepts: v,
|
|
2799
2778
|
checkCanAddComponent: d,
|
|
2800
|
-
checkCanDeleteComponent:
|
|
2779
|
+
checkCanDeleteComponent: a,
|
|
2801
2780
|
checkCanMoveComponent: p,
|
|
2802
2781
|
getStyles: S,
|
|
2803
2782
|
hideNestedPaddingInDesginerView: s,
|
|
@@ -2806,7 +2785,7 @@ function Et(r, e) {
|
|
|
2806
2785
|
onResolveNewComponentSchema: g,
|
|
2807
2786
|
getPropsConfig: y,
|
|
2808
2787
|
triggerBelongedComponentToMoveWhenMoved: n,
|
|
2809
|
-
triggerBelongedComponentToDeleteWhenDeleted:
|
|
2788
|
+
triggerBelongedComponentToDeleteWhenDeleted: c
|
|
2810
2789
|
};
|
|
2811
2790
|
}
|
|
2812
2791
|
const De = /* @__PURE__ */ Y({
|
|
@@ -2815,11 +2794,11 @@ const De = /* @__PURE__ */ Y({
|
|
|
2815
2794
|
emits: ["Click"],
|
|
2816
2795
|
setup(r, e) {
|
|
2817
2796
|
j(), j();
|
|
2818
|
-
const n = j(r.alignment),
|
|
2797
|
+
const n = j(r.alignment), c = {
|
|
2819
2798
|
id: "__more_buttons__",
|
|
2820
2799
|
text: "More"
|
|
2821
|
-
}, u = j(new G(
|
|
2822
|
-
|
|
2800
|
+
}, u = j(new G(c));
|
|
2801
|
+
z(() => u.value.children.length > 0);
|
|
2823
2802
|
const m = j(), v = $("designer-host-service"), M = $("design-item-context"), S = Et(M, v), g = fe(m, M, S);
|
|
2824
2803
|
$("toolbar-item-handler", () => {
|
|
2825
2804
|
}), H(() => {
|
|
@@ -2838,7 +2817,7 @@ const De = /* @__PURE__ */ Y({
|
|
|
2838
2817
|
function p() {
|
|
2839
2818
|
return !!(r.icon && r.icon.trim());
|
|
2840
2819
|
}
|
|
2841
|
-
function
|
|
2820
|
+
function a() {
|
|
2842
2821
|
const d = {
|
|
2843
2822
|
btn: !0,
|
|
2844
2823
|
"f-rt-btn": !0,
|
|
@@ -2861,7 +2840,7 @@ const De = /* @__PURE__ */ Y({
|
|
|
2861
2840
|
style: "display:inline-block!important;"
|
|
2862
2841
|
}, [w("button", {
|
|
2863
2842
|
type: "button",
|
|
2864
|
-
class:
|
|
2843
|
+
class: a(),
|
|
2865
2844
|
id: r.id
|
|
2866
2845
|
}, [p() && w("i", {
|
|
2867
2846
|
class: C()
|
|
@@ -2873,22 +2852,22 @@ const De = /* @__PURE__ */ Y({
|
|
|
2873
2852
|
emits: ["Click"],
|
|
2874
2853
|
setup(r, e) {
|
|
2875
2854
|
const n = j(r.items);
|
|
2876
|
-
let
|
|
2855
|
+
let c = new Array(n.value.length).fill(j());
|
|
2877
2856
|
const u = j(), m = j(), v = j(r.alignment), M = {
|
|
2878
2857
|
id: "__more_buttons__",
|
|
2879
2858
|
text: "More"
|
|
2880
2859
|
}, S = j(new G(M)), g = Te();
|
|
2881
|
-
|
|
2882
|
-
const C = j(), p = $("designer-host-service"),
|
|
2860
|
+
z(() => S.value.children.length > 0);
|
|
2861
|
+
const C = j(), p = $("designer-host-service"), a = $("design-item-context"), d = xt(a.schema, p, a), s = fe(C, a, d);
|
|
2883
2862
|
$("toolbar-item-handler", () => {
|
|
2884
2863
|
}), H(() => {
|
|
2885
2864
|
C.value.componentInstance = s;
|
|
2886
2865
|
}), e.expose(s.value);
|
|
2887
|
-
const y =
|
|
2866
|
+
const y = z(() => ({
|
|
2888
2867
|
"f-toolbar": !0,
|
|
2889
2868
|
"f-response-toolbar": !0,
|
|
2890
2869
|
"position-relative": !0
|
|
2891
|
-
})), h =
|
|
2870
|
+
})), h = z(() => ({
|
|
2892
2871
|
"d-flex": !0,
|
|
2893
2872
|
"flex-nowrap": !0,
|
|
2894
2873
|
"justify-content-end": v.value === "right",
|
|
@@ -2897,7 +2876,7 @@ const De = /* @__PURE__ */ Y({
|
|
|
2897
2876
|
renderToolbarDropdown: x,
|
|
2898
2877
|
clearAllDropDown: O
|
|
2899
2878
|
} = ut(r, g, s);
|
|
2900
|
-
function
|
|
2879
|
+
function P() {
|
|
2901
2880
|
n.value.filter((l) => l.children && l.children.length > 0).forEach((l) => {
|
|
2902
2881
|
l.expanded = !1;
|
|
2903
2882
|
}), S.value.expanded = !1, O();
|
|
@@ -2908,16 +2887,16 @@ const De = /* @__PURE__ */ Y({
|
|
|
2908
2887
|
let t = l;
|
|
2909
2888
|
const i = Array.from(o.children), f = i[i.length - 1].id === "__more_buttons__" ? i[i.length - 1] : null;
|
|
2910
2889
|
if (f) {
|
|
2911
|
-
const L = f.computedStyleMap().get("margin-left"), V = f.computedStyleMap().get("margin-right"),
|
|
2912
|
-
t -=
|
|
2890
|
+
const L = f.computedStyleMap().get("margin-left"), V = f.computedStyleMap().get("margin-right"), W = (L ? L.value : 0) + f.getBoundingClientRect().width + (V ? V.value : 0);
|
|
2891
|
+
t -= W;
|
|
2913
2892
|
}
|
|
2914
2893
|
const R = i.filter((L) => L.id !== "__more_buttons__");
|
|
2915
2894
|
for (const L of R) {
|
|
2916
|
-
const V = L.computedStyleMap().get("margin-left"),
|
|
2917
|
-
t <
|
|
2895
|
+
const V = L.computedStyleMap().get("margin-left"), W = L.computedStyleMap().get("margin-right"), U = (V ? V.value : 0) + L.getBoundingClientRect().width + (W ? W.value : 0);
|
|
2896
|
+
t < U ? (A.set(L.id, !0), N.push({
|
|
2918
2897
|
id: L.id,
|
|
2919
|
-
width:
|
|
2920
|
-
})) : t -=
|
|
2898
|
+
width: U
|
|
2899
|
+
})) : t -= U;
|
|
2921
2900
|
}
|
|
2922
2901
|
if (N.length)
|
|
2923
2902
|
for (let L = N.length - 1; L >= 0; L--) {
|
|
@@ -2940,18 +2919,18 @@ const De = /* @__PURE__ */ Y({
|
|
|
2940
2919
|
});
|
|
2941
2920
|
H(() => {
|
|
2942
2921
|
const l = u.value;
|
|
2943
|
-
b.observe(l), document.body.addEventListener("click",
|
|
2922
|
+
b.observe(l), document.body.addEventListener("click", P);
|
|
2944
2923
|
}), ne(() => {
|
|
2945
|
-
b.disconnect(), document.body.removeEventListener("click",
|
|
2924
|
+
b.disconnect(), document.body.removeEventListener("click", P);
|
|
2946
2925
|
}), Q(() => r.items, () => {
|
|
2947
2926
|
n.value = r.items;
|
|
2948
2927
|
}, {
|
|
2949
2928
|
deep: !0
|
|
2950
2929
|
}), Q(n, (l) => {
|
|
2951
|
-
|
|
2930
|
+
c = new Array(n.value.length).fill(j());
|
|
2952
2931
|
});
|
|
2953
|
-
function
|
|
2954
|
-
|
|
2932
|
+
function k(l, o, t, i) {
|
|
2933
|
+
a && a.setupContext && a.setupContext.emit("selectionChange", l, o, t, i);
|
|
2955
2934
|
}
|
|
2956
2935
|
function E() {
|
|
2957
2936
|
const l = m.value.querySelector(".dgComponentFocused.dgComponentSelected");
|
|
@@ -2959,7 +2938,7 @@ const De = /* @__PURE__ */ Y({
|
|
|
2959
2938
|
}
|
|
2960
2939
|
return () => w("div", {
|
|
2961
2940
|
ref: C,
|
|
2962
|
-
"data-dragref": `${
|
|
2941
|
+
"data-dragref": `${a.schema.id}-container`,
|
|
2963
2942
|
class: y.value
|
|
2964
2943
|
}, [w("div", {
|
|
2965
2944
|
ref: u,
|
|
@@ -2968,8 +2947,8 @@ const De = /* @__PURE__ */ Y({
|
|
|
2968
2947
|
ref: m,
|
|
2969
2948
|
class: "d-inline-block f-response-content",
|
|
2970
2949
|
style: "white-space: nowrap;"
|
|
2971
|
-
}, [n.value.map((l, o) => w(
|
|
2972
|
-
ref:
|
|
2950
|
+
}, [n.value.map((l, o) => w(kt, {
|
|
2951
|
+
ref: c[o],
|
|
2973
2952
|
class: "p-0 display-inline-block",
|
|
2974
2953
|
modelValue: l,
|
|
2975
2954
|
"onUpdate:modelValue": (t) => l = t,
|
|
@@ -2980,7 +2959,7 @@ const De = /* @__PURE__ */ Y({
|
|
|
2980
2959
|
componentId: r.componentId,
|
|
2981
2960
|
id: l.id,
|
|
2982
2961
|
style: "padding:0 !important;display:inline-block",
|
|
2983
|
-
onSelectionChange:
|
|
2962
|
+
onSelectionChange: k,
|
|
2984
2963
|
onRemoveComponent: E
|
|
2985
2964
|
}, {
|
|
2986
2965
|
default: () => [w(De, {
|