@farris/ui-vue 1.7.2-beta.1 → 1.7.2-beta.2
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/avatar/index.esm.js +155 -148
- package/components/avatar/index.umd.cjs +1 -1
- package/components/button-edit/index.esm.js +1 -1
- package/components/button-edit/index.umd.cjs +1 -1
- package/components/calendar/index.esm.js +226 -224
- package/components/calendar/index.umd.cjs +3 -3
- package/components/collection-property-editor/index.esm.js +225 -223
- package/components/collection-property-editor/index.umd.cjs +2 -2
- package/components/combo-list/index.esm.js +76 -71
- package/components/combo-list/index.umd.cjs +1 -1
- package/components/comment/index.esm.js +169 -167
- package/components/comment/index.umd.cjs +6 -6
- package/components/component/index.esm.js +3691 -3043
- package/components/component/index.umd.cjs +2 -2
- package/components/condition/index.esm.js +2015 -1352
- package/components/condition/index.umd.cjs +2 -2
- package/components/data-grid/index.esm.js +407 -430
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/data-view/index.esm.js +3082 -3196
- package/components/data-view/index.umd.cjs +1 -1
- package/components/designer-canvas/index.esm.js +3364 -2713
- package/components/designer-canvas/index.umd.cjs +1 -1
- package/components/drawer/index.esm.js +66 -64
- package/components/drawer/index.umd.cjs +2 -2
- package/components/dynamic-form/index.esm.js +1176 -524
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/dynamic-resolver/index.esm.js +182 -180
- package/components/dynamic-resolver/index.umd.cjs +2 -2
- package/components/dynamic-view/index.esm.js +531 -455
- package/components/dynamic-view/index.umd.cjs +1 -1
- package/components/events-editor/index.esm.js +2352 -1700
- package/components/events-editor/index.umd.cjs +3 -3
- package/components/expression-editor/index.esm.js +8 -3
- package/components/expression-editor/index.umd.cjs +2 -2
- package/components/filter-bar/index.esm.js +422 -413
- package/components/filter-bar/index.umd.cjs +2 -2
- package/components/filter-condition-editor/index.esm.js +8 -3
- package/components/filter-condition-editor/index.umd.cjs +1 -1
- package/components/image/index.esm.js +363 -354
- package/components/image/index.umd.cjs +2 -2
- package/components/language-textbox/index.esm.js +189 -187
- package/components/language-textbox/index.umd.cjs +2 -2
- package/components/list-view/index.esm.js +388 -389
- package/components/list-view/index.umd.cjs +5 -5
- package/components/mapping-editor/index.esm.js +1465 -1488
- package/components/mapping-editor/index.umd.cjs +1 -1
- package/components/number-range/index.esm.js +180 -173
- package/components/number-range/index.umd.cjs +1 -1
- package/components/order/index.esm.js +815 -811
- package/components/order/index.umd.cjs +5 -5
- package/components/property-panel/index.esm.js +429 -420
- package/components/property-panel/index.umd.cjs +3 -3
- package/components/query-solution/index.esm.js +4746 -4085
- package/components/query-solution/index.umd.cjs +7 -7
- package/components/schema-selector/index.esm.js +1401 -1402
- package/components/schema-selector/index.umd.cjs +5 -5
- package/components/section/index.esm.js +102 -100
- package/components/section/index.umd.cjs +2 -2
- package/components/sort-condition-editor/index.esm.js +8 -3
- package/components/sort-condition-editor/index.umd.cjs +1 -1
- package/components/transfer/index.esm.js +537 -538
- package/components/transfer/index.umd.cjs +5 -5
- package/components/tree-grid/index.esm.js +280 -283
- package/components/tree-grid/index.umd.cjs +1 -1
- package/components/tree-view/index.esm.js +200 -202
- package/components/tree-view/index.umd.cjs +1 -1
- package/components/uploader/index.esm.js +533 -519
- package/components/uploader/index.umd.cjs +2 -2
- package/designer/data-grid/index.esm.js +3806 -3905
- package/designer/data-grid/index.umd.cjs +9 -9
- package/designer/drawer/index.esm.js +188 -186
- package/designer/drawer/index.umd.cjs +2 -2
- package/designer/dynamic-form/index.esm.js +1562 -1073
- package/designer/dynamic-form/index.umd.cjs +2 -2
- package/designer/farris-designer.all.esm.js +9793 -8613
- package/designer/farris-designer.all.umd.cjs +8 -8
- package/designer/list-view/index.esm.js +564 -564
- package/designer/list-view/index.umd.cjs +6 -6
- package/designer/radio-group/index.esm.js +236 -229
- package/designer/radio-group/index.umd.cjs +1 -1
- package/designer/response-layout-editor/index.esm.js +178 -171
- package/designer/response-layout-editor/index.umd.cjs +1 -1
- package/designer/tabs/index.esm.js +3154 -2508
- package/designer/tabs/index.umd.cjs +2 -2
- package/designer/time-picker/index.esm.js +193 -186
- package/designer/time-picker/index.umd.cjs +1 -1
- package/designer/tree-grid/index.esm.js +444 -447
- package/designer/tree-grid/index.umd.cjs +1 -1
- package/farris.all.esm.js +60126 -59649
- package/farris.all.umd.cjs +30 -30
- package/index.css +1 -1
- package/package.json +1 -1
- package/types/components.d.ts +1 -1
- package/types/condition/src/composition/condition-value/dropdown-value.d.ts +4 -0
- package/types/data-grid/index.d.ts +2 -5
- package/types/data-grid/src/data-grid.component.d.ts +1 -2
- package/types/data-view/components/row/hierarchy-row.component.d.ts +2 -2
- package/types/data-view/composition/appearance/use-cell-position.d.ts +1 -1
- package/types/data-view/composition/types.d.ts +0 -4
- package/types/data-view/composition/visualization/use-virtual-scroll.d.ts +2 -2
- package/types/data-view/composition/visualization/use-visual-data-bound.d.ts +2 -3
- package/types/data-view/composition/visualization/use-visual-data-row.d.ts +1 -2
- package/types/designer-canvas/src/composition/dg-control.d.ts +24 -0
- package/types/dynamic-form/designer.d.ts +0 -1
- package/types/dynamic-form/index.d.ts +4 -3
- package/types/dynamic-form/src/designer/dynamic-form.design.component.d.ts +8 -0
- package/types/dynamic-form/src/designer/response-form.design.props.d.ts +14 -0
- package/types/dynamic-form/src/designer/use-dynamic-form-rules.d.ts +2 -0
- package/types/dynamic-form/src/dynamic-form.component.d.ts +8 -0
- package/types/dynamic-form/src/response-form.props.d.ts +13 -1
- package/types/dynamic-form/src/schema/response-form-schema-resolver.d.ts +1 -0
- package/types/dynamic-form/src/types.d.ts +1 -0
- package/types/dynamic-resolver/src/types.d.ts +1 -0
- package/types/dynamic-view/index.d.ts +43 -3
- package/types/dynamic-view/src/components/maps.d.ts +6 -6
- package/types/dynamic-view/src/composition/index.d.ts +5 -0
- package/types/dynamic-view/src/composition/use-utils.d.ts +12 -0
- package/types/dynamic-view/src/dynamic-view.component.d.ts +6 -6
- package/types/language-textbox/index.d.ts +3 -3
- package/types/language-textbox/src/components/language-contents.component.d.ts +1 -1
- package/types/language-textbox/src/language-textbox.component.d.ts +1 -1
- package/types/lookup/src/components/favorite/lookup-favorite.component.d.ts +1 -1
- package/types/lookup/src/components/popup-container.component.d.ts +3 -3
- package/types/property-panel/src/property-panel.component.d.ts +3 -3
- package/types/tree-grid/src/components/data/data-area.component.d.ts +2 -2
- package/types/tree-grid/src/tree-grid.props.d.ts +0 -1
- package/types/tree-view/src/components/data/tree-area.component.d.ts +1 -1
- package/types/tree-view/src/tree-view.props.d.ts +0 -1
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var y = (p, n, e) =>
|
|
4
|
-
import { ref as F, computed as I, defineComponent as
|
|
5
|
-
import { resolveAppearance as D, createPropsResolver as
|
|
1
|
+
var K = Object.defineProperty;
|
|
2
|
+
var Z = (p, n, e) => n in p ? K(p, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : p[n] = e;
|
|
3
|
+
var y = (p, n, e) => Z(p, typeof n != "symbol" ? n + "" : n, e);
|
|
4
|
+
import { ref as F, computed as I, defineComponent as R, createVNode as C, nextTick as z, inject as B, onMounted as $ } from "vue";
|
|
5
|
+
import { resolveAppearance as D, createPropsResolver as J } from "../dynamic-resolver/index.esm.js";
|
|
6
6
|
import "../locale/index.esm.js";
|
|
7
|
-
import { DgControl as a, canvasChanged as x, refreshCanvas as
|
|
8
|
-
import { cloneDeep as
|
|
9
|
-
import { FormSchemaEntityField$Type as N, FormSchemaEntityFieldType$Type as
|
|
10
|
-
function
|
|
7
|
+
import { DgControl as a, canvasChanged as x, refreshCanvas as X, useDesignerComponent as Y } from "../designer-canvas/index.esm.js";
|
|
8
|
+
import { cloneDeep as _ } from "lodash-es";
|
|
9
|
+
import { FormSchemaEntityField$Type as N, FormSchemaEntityFieldType$Type as ee, withInstall as te } from "../common/index.esm.js";
|
|
10
|
+
function ie(p, n, e) {
|
|
11
11
|
return n;
|
|
12
12
|
}
|
|
13
|
-
const
|
|
13
|
+
const ne = /* @__PURE__ */ new Map([
|
|
14
14
|
["appearance", D]
|
|
15
|
-
]),
|
|
15
|
+
]), se = "https://json-schema.org/draft/2020-12/schema", re = "https://farris-design.gitee.io/avatar.schema.json", oe = "avatar", ae = "A Farris Component", le = "object", de = {
|
|
16
16
|
id: {
|
|
17
17
|
description: "The unique identifier for avatar",
|
|
18
18
|
type: "string"
|
|
@@ -74,23 +74,23 @@ const ie = /* @__PURE__ */ new Map([
|
|
|
74
74
|
type: "boolean",
|
|
75
75
|
default: !0
|
|
76
76
|
}
|
|
77
|
-
},
|
|
77
|
+
}, ce = [
|
|
78
78
|
"id",
|
|
79
79
|
"type"
|
|
80
|
-
],
|
|
80
|
+
], ue = [
|
|
81
81
|
"id",
|
|
82
82
|
"appearance",
|
|
83
83
|
"binding",
|
|
84
84
|
"visible"
|
|
85
|
-
],
|
|
86
|
-
$schema:
|
|
87
|
-
$id:
|
|
88
|
-
title:
|
|
89
|
-
description:
|
|
90
|
-
type:
|
|
91
|
-
properties:
|
|
92
|
-
required:
|
|
93
|
-
ignore:
|
|
85
|
+
], pe = {
|
|
86
|
+
$schema: se,
|
|
87
|
+
$id: re,
|
|
88
|
+
title: oe,
|
|
89
|
+
description: ae,
|
|
90
|
+
type: le,
|
|
91
|
+
properties: de,
|
|
92
|
+
required: ce,
|
|
93
|
+
ignore: ue
|
|
94
94
|
}, k = {
|
|
95
95
|
/**
|
|
96
96
|
* 头像宽度
|
|
@@ -128,13 +128,13 @@ const ie = /* @__PURE__ */ new Map([
|
|
|
128
128
|
* 支持的头像类型
|
|
129
129
|
*/
|
|
130
130
|
imageType: { type: Array, default: ["jpeg"] }
|
|
131
|
-
},
|
|
132
|
-
function
|
|
131
|
+
}, L = J(k, pe, ne, ie);
|
|
132
|
+
function q(p, n, e, t) {
|
|
133
133
|
const i = "data:image/jpeg;base64,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", s = F(p.readonly);
|
|
134
134
|
function r(m) {
|
|
135
135
|
return m.match(/\.(jpeg|jpg|gif|png|svg|bmp|webp)$/) != null;
|
|
136
136
|
}
|
|
137
|
-
function
|
|
137
|
+
function c(m) {
|
|
138
138
|
return m.indexOf("data:image/") > -1;
|
|
139
139
|
}
|
|
140
140
|
function o(m) {
|
|
@@ -146,16 +146,16 @@ function L(p, n, e, t) {
|
|
|
146
146
|
return "";
|
|
147
147
|
const m = (g = p.imageType) == null ? void 0 : g.map((h) => (h === "jpg" && (h = "jpeg"), `image/${h}`));
|
|
148
148
|
return !m || !m.length ? "image/*" : m.join(",");
|
|
149
|
-
}),
|
|
149
|
+
}), d = I(() => {
|
|
150
150
|
const m = t.value || p.cover || i;
|
|
151
|
-
return r(m) ||
|
|
151
|
+
return r(m) || c(m) ? m : o(m);
|
|
152
152
|
}), l = I(() => s.value ? "" : p.title);
|
|
153
153
|
function f() {
|
|
154
154
|
s.value || e && e.value && e.value.click();
|
|
155
155
|
}
|
|
156
|
-
return { acceptTypes: u, imageSource:
|
|
156
|
+
return { acceptTypes: u, imageSource: d, imageTitle: l, onClickImage: f };
|
|
157
157
|
}
|
|
158
|
-
const S = /* @__PURE__ */
|
|
158
|
+
const S = /* @__PURE__ */ R({
|
|
159
159
|
name: "FAvatar",
|
|
160
160
|
props: k,
|
|
161
161
|
emits: ["change", "update:modelValue"],
|
|
@@ -172,13 +172,13 @@ const S = /* @__PURE__ */ U({
|
|
|
172
172
|
function r() {
|
|
173
173
|
return "";
|
|
174
174
|
}
|
|
175
|
-
function
|
|
175
|
+
function c() {
|
|
176
176
|
}
|
|
177
177
|
const o = F(null), {
|
|
178
178
|
acceptTypes: u,
|
|
179
|
-
imageSource:
|
|
179
|
+
imageSource: d,
|
|
180
180
|
onClickImage: l
|
|
181
|
-
} =
|
|
181
|
+
} = q(p, n, o, t);
|
|
182
182
|
return () => C("div", {
|
|
183
183
|
class: e.value,
|
|
184
184
|
style: i.value,
|
|
@@ -186,7 +186,7 @@ const S = /* @__PURE__ */ U({
|
|
|
186
186
|
}, [s, C("img", {
|
|
187
187
|
title: p.title,
|
|
188
188
|
class: "f-avatar-image",
|
|
189
|
-
src:
|
|
189
|
+
src: d.value,
|
|
190
190
|
onError: r
|
|
191
191
|
}, null), !p.readonly && C("div", {
|
|
192
192
|
class: "f-avatar-icon"
|
|
@@ -198,12 +198,12 @@ const S = /* @__PURE__ */ U({
|
|
|
198
198
|
type: "file",
|
|
199
199
|
class: "f-avatar-upload",
|
|
200
200
|
accept: u.value,
|
|
201
|
-
onChange:
|
|
201
|
+
onChange: c,
|
|
202
202
|
style: "display: none;"
|
|
203
203
|
}, null)]);
|
|
204
204
|
}
|
|
205
205
|
});
|
|
206
|
-
function
|
|
206
|
+
function ge(p) {
|
|
207
207
|
const { formSchemaUtils: n, formStateMachineUtils: e } = p;
|
|
208
208
|
function t(o, u = "") {
|
|
209
209
|
return {
|
|
@@ -213,25 +213,25 @@ function pe(p) {
|
|
|
213
213
|
};
|
|
214
214
|
}
|
|
215
215
|
function i(o, u = "") {
|
|
216
|
-
const
|
|
217
|
-
return
|
|
216
|
+
const d = n.getViewModelById(o);
|
|
217
|
+
return d ? d.states.map((l) => t(l, u)) : [];
|
|
218
218
|
}
|
|
219
219
|
function s(o) {
|
|
220
|
-
const u = n.getRootViewModelId(),
|
|
220
|
+
const u = n.getRootViewModelId(), d = i(o);
|
|
221
221
|
if (o === u)
|
|
222
|
-
return
|
|
222
|
+
return d;
|
|
223
223
|
const l = i(u, "root-component.");
|
|
224
|
-
return [...
|
|
224
|
+
return [...d, ...l];
|
|
225
225
|
}
|
|
226
226
|
function r(o) {
|
|
227
227
|
return o.binding && o.binding.path || o.id || "";
|
|
228
228
|
}
|
|
229
|
-
function
|
|
229
|
+
function c() {
|
|
230
230
|
return e && e.getRenderStates() || [];
|
|
231
231
|
}
|
|
232
|
-
return { getVariables: s, getControlName: r, getStateMachines:
|
|
232
|
+
return { getVariables: s, getControlName: r, getStateMachines: c };
|
|
233
233
|
}
|
|
234
|
-
class
|
|
234
|
+
class H {
|
|
235
235
|
constructor(n) {
|
|
236
236
|
y(this, "sessionVariables", [
|
|
237
237
|
{
|
|
@@ -281,10 +281,10 @@ class q {
|
|
|
281
281
|
});
|
|
282
282
|
y(this, "getExpressionConverter", (n, e) => ({
|
|
283
283
|
convertFrom: (t, i, s, r) => {
|
|
284
|
-
const
|
|
285
|
-
return
|
|
284
|
+
const c = s.getExpressionRuleValue(n, e || i);
|
|
285
|
+
return c && c.value || "";
|
|
286
286
|
},
|
|
287
|
-
convertTo: (t, i, s, r,
|
|
287
|
+
convertTo: (t, i, s, r, c) => {
|
|
288
288
|
var o;
|
|
289
289
|
if (i === "dataPicking" && (s != null && s.target)) {
|
|
290
290
|
const u = `${s.target}_dataPicking`;
|
|
@@ -337,10 +337,10 @@ class q {
|
|
|
337
337
|
buildEntityFieldsTreeData(n = null, e) {
|
|
338
338
|
const t = [];
|
|
339
339
|
return n == null || n.forEach((i) => {
|
|
340
|
-
var
|
|
340
|
+
var c;
|
|
341
341
|
const s = this.createTreeNode(i, e);
|
|
342
342
|
let r = [];
|
|
343
|
-
(
|
|
343
|
+
(c = i.type) != null && c.fields && (r = this.buildEntityFieldsTreeData(i.type.fields, [...e, i.label])), t.push({
|
|
344
344
|
data: s,
|
|
345
345
|
children: r,
|
|
346
346
|
expanded: !0
|
|
@@ -353,8 +353,8 @@ class q {
|
|
|
353
353
|
var o, u;
|
|
354
354
|
const s = this.createTreeNode(i, e);
|
|
355
355
|
s.type = "entity";
|
|
356
|
-
const r = this.buildEntityFieldsTreeData((o = i.type) == null ? void 0 : o.fields, [...e, i.label]),
|
|
357
|
-
|
|
356
|
+
const r = this.buildEntityFieldsTreeData((o = i.type) == null ? void 0 : o.fields, [...e, i.label]), c = this.buildChildEntityTreeData((u = i.type) == null ? void 0 : u.entities, [...e, i.label]);
|
|
357
|
+
c != null && c.length && (r == null || r.push(...c)), t.push({
|
|
358
358
|
data: s,
|
|
359
359
|
children: r || [],
|
|
360
360
|
// 空值回退
|
|
@@ -396,19 +396,19 @@ class q {
|
|
|
396
396
|
};
|
|
397
397
|
}
|
|
398
398
|
onBeforeOpenExpression(n, e, t) {
|
|
399
|
-
const i = t === "Field" ? n.binding.field : n.id, s = this.getExpressionRule(i, e), r = this.getEntitiesAndVariables(),
|
|
399
|
+
const i = t === "Field" ? n.binding.field : n.id, s = this.getExpressionRule(i, e), r = this.getEntitiesAndVariables(), c = {
|
|
400
400
|
message: ["validate", "required", "dataPicking"].includes(e) && s ? s.message : "",
|
|
401
401
|
...r
|
|
402
402
|
};
|
|
403
|
-
return s.messageType != null && (
|
|
403
|
+
return s.messageType != null && (c.messageType = s.messageType), c;
|
|
404
404
|
}
|
|
405
405
|
buildRule(n, e, t, i) {
|
|
406
|
-
const { expression: s, message: r, messageType:
|
|
406
|
+
const { expression: s, message: r, messageType: c } = e, o = {
|
|
407
407
|
id: `${n}_${t}`,
|
|
408
408
|
type: t,
|
|
409
409
|
value: s
|
|
410
410
|
};
|
|
411
|
-
return (t === "validate" || t === "dataPicking" || t === "required") && (o.message = r), t === "dataPicking" && (o.messageType =
|
|
411
|
+
return (t === "validate" || t === "dataPicking" || t === "required") && (o.message = r), t === "dataPicking" && (o.messageType = c), t === "validate" && i && (o.elementId = i), o;
|
|
412
412
|
}
|
|
413
413
|
getExpressionData() {
|
|
414
414
|
const { expressions: n } = this.formSchemaService.getFormSchema().module;
|
|
@@ -416,12 +416,12 @@ class q {
|
|
|
416
416
|
}
|
|
417
417
|
updateExpression(n, e, t, i) {
|
|
418
418
|
const s = e === "Field" ? n.binding.field : n.id, r = this.buildRule(s, t, i, n.type === "form-group" ? n.id : "");
|
|
419
|
-
let o = this.getExpressionData().find((
|
|
420
|
-
const u = (
|
|
419
|
+
let o = this.getExpressionData().find((d) => d.targetType === e && d.target === s);
|
|
420
|
+
const u = (d) => d.value.trim() === "";
|
|
421
421
|
if (o) {
|
|
422
|
-
const
|
|
423
|
-
if (
|
|
424
|
-
u(r) ? o.rules = o.rules.filter((l) => l.id !== r.id) : (Object.assign(
|
|
422
|
+
const d = o.rules.find((l) => l.id === r.id);
|
|
423
|
+
if (d)
|
|
424
|
+
u(r) ? o.rules = o.rules.filter((l) => l.id !== r.id) : (Object.assign(d, r), i === "validate" && n.type === "form-group" && (d.elementId = n.id));
|
|
425
425
|
else {
|
|
426
426
|
if (u(r))
|
|
427
427
|
return null;
|
|
@@ -441,13 +441,13 @@ class q {
|
|
|
441
441
|
getExpressionEditorOptions(n, e, t, i) {
|
|
442
442
|
return t.reduce((s, r) => {
|
|
443
443
|
var o, u;
|
|
444
|
-
const
|
|
444
|
+
const c = e === "Field" ? (o = n == null ? void 0 : n.binding) == null ? void 0 : o.field : n.id;
|
|
445
445
|
return s[r] = {
|
|
446
446
|
hide: e === "Field" ? !!((u = n == null ? void 0 : n.binding) != null && u.field) : !1,
|
|
447
447
|
description: "",
|
|
448
448
|
title: this.expressionNames[r],
|
|
449
449
|
type: "string",
|
|
450
|
-
$converter: this.getExpressionConverter(
|
|
450
|
+
$converter: this.getExpressionConverter(c),
|
|
451
451
|
refreshPanelAfterChanged: !0,
|
|
452
452
|
editor: {
|
|
453
453
|
type: "expression-editor",
|
|
@@ -456,10 +456,10 @@ class q {
|
|
|
456
456
|
showMessage: r === "validate" || r === "dataPicking" || r === "required",
|
|
457
457
|
showMessageType: r === "dataPicking",
|
|
458
458
|
beforeOpen: () => this.onBeforeOpenExpression(n, r, e),
|
|
459
|
-
onSubmitModal: (
|
|
460
|
-
const l = this.updateExpression(n, e,
|
|
459
|
+
onSubmitModal: (d) => {
|
|
460
|
+
const l = this.updateExpression(n, e, d, r);
|
|
461
461
|
if (i) {
|
|
462
|
-
const f = this.buildRule(
|
|
462
|
+
const f = this.buildRule(c, d, r);
|
|
463
463
|
i(f);
|
|
464
464
|
}
|
|
465
465
|
return l;
|
|
@@ -498,7 +498,7 @@ class q {
|
|
|
498
498
|
};
|
|
499
499
|
}
|
|
500
500
|
}
|
|
501
|
-
class
|
|
501
|
+
class me {
|
|
502
502
|
constructor(n, e) {
|
|
503
503
|
y(this, "componentId");
|
|
504
504
|
y(this, "viewModelId");
|
|
@@ -590,7 +590,7 @@ class ge {
|
|
|
590
590
|
return {
|
|
591
591
|
...i,
|
|
592
592
|
properties: { ...s },
|
|
593
|
-
setPropertyRelates(r,
|
|
593
|
+
setPropertyRelates(r, c) {
|
|
594
594
|
if (r) {
|
|
595
595
|
switch (r && r.propertyID) {
|
|
596
596
|
case "class":
|
|
@@ -599,7 +599,7 @@ class ge {
|
|
|
599
599
|
break;
|
|
600
600
|
}
|
|
601
601
|
}
|
|
602
|
-
t && t(r, n,
|
|
602
|
+
t && t(r, n, c);
|
|
603
603
|
}
|
|
604
604
|
}
|
|
605
605
|
};
|
|
@@ -615,7 +615,7 @@ class ge {
|
|
|
615
615
|
* @returns
|
|
616
616
|
*/
|
|
617
617
|
getPropertyEditorParams(n, e = [], t = "visible", i = {}, s = {}, r = "") {
|
|
618
|
-
const { getVariables:
|
|
618
|
+
const { getVariables: c, getControlName: o, getStateMachines: u } = ge(this.designerHostService), d = this.getRealTargetType(n), l = e && e.length > 0 ? e : ["Const", "Variable", "StateMachine", "Expression"], f = {
|
|
619
619
|
type: "property-editor",
|
|
620
620
|
propertyTypes: l
|
|
621
621
|
};
|
|
@@ -628,7 +628,7 @@ class ge {
|
|
|
628
628
|
}, i);
|
|
629
629
|
break;
|
|
630
630
|
case "Expression":
|
|
631
|
-
f.expressionConfig = this.getExpressionOptions(n,
|
|
631
|
+
f.expressionConfig = this.getExpressionOptions(n, d, r || t);
|
|
632
632
|
break;
|
|
633
633
|
case "StateMachine":
|
|
634
634
|
f.stateMachines = u();
|
|
@@ -638,10 +638,10 @@ class ge {
|
|
|
638
638
|
controlName: o(n),
|
|
639
639
|
newVariablePrefix: "is",
|
|
640
640
|
newVariableType: "Boolean",
|
|
641
|
-
variables:
|
|
641
|
+
variables: c(this.viewModelId),
|
|
642
642
|
parentComponentId: this.componentId === "root-component" ? "" : "root-component",
|
|
643
643
|
onBeforeOpenVariables: (g) => {
|
|
644
|
-
g.value =
|
|
644
|
+
g.value = c(this.viewModelId);
|
|
645
645
|
}
|
|
646
646
|
}, s), this.designerContext.designerMode === "PC_RTC" && (f.newVariablePrefix = "ext_" + f.newVariablePrefix);
|
|
647
647
|
break;
|
|
@@ -673,7 +673,7 @@ class ge {
|
|
|
673
673
|
}, r = this.getVisibleProperty(n, e);
|
|
674
674
|
for (const o in t)
|
|
675
675
|
r[o] = Object.assign(r[o] || {}, t[o]);
|
|
676
|
-
const
|
|
676
|
+
const c = this;
|
|
677
677
|
return {
|
|
678
678
|
...s,
|
|
679
679
|
properties: { ...r },
|
|
@@ -683,7 +683,7 @@ class ge {
|
|
|
683
683
|
case "disabled":
|
|
684
684
|
case "readonly":
|
|
685
685
|
case "visible":
|
|
686
|
-
|
|
686
|
+
c.afterMutilEditorChanged(n, o);
|
|
687
687
|
break;
|
|
688
688
|
}
|
|
689
689
|
i && i(o, u);
|
|
@@ -709,8 +709,8 @@ class ge {
|
|
|
709
709
|
const t = e && e.parent && e.parent.schema;
|
|
710
710
|
if (!t)
|
|
711
711
|
return;
|
|
712
|
-
const i = t.contents.findIndex((r) => r.id === n), s =
|
|
713
|
-
t.contents.splice(i, 1), t.contents.splice(i, 0, s),
|
|
712
|
+
const i = t.contents.findIndex((r) => r.id === n), s = _(t.contents[i]);
|
|
713
|
+
t.contents.splice(i, 1), t.contents.splice(i, 0, s), X();
|
|
714
714
|
}
|
|
715
715
|
/**
|
|
716
716
|
* 属性编辑器,在编辑过程中会新增变量,此处需要将新增的变量追加到ViewModel中
|
|
@@ -740,16 +740,16 @@ class ge {
|
|
|
740
740
|
const e = n.propertyValue;
|
|
741
741
|
if (!((e && e.type) === "Expression" && e.expressionInfo))
|
|
742
742
|
return;
|
|
743
|
-
const { expressionId: s, expressionInfo: r } = e, { targetId:
|
|
743
|
+
const { expressionId: s, expressionInfo: r } = e, { targetId: c, targetType: o, expressionType: u, value: d, message: l } = r, f = this.formSchemaUtils.getModule();
|
|
744
744
|
f.expressions = f.expressions || [];
|
|
745
745
|
const { expressions: m } = f;
|
|
746
|
-
let g = m.find((A) => A.target ===
|
|
747
|
-
g || (g = { target:
|
|
746
|
+
let g = m.find((A) => A.target === c);
|
|
747
|
+
g || (g = { target: c, rules: [], targetType: o }, m.push(g));
|
|
748
748
|
const h = g.rules.find((A) => A.type === u);
|
|
749
749
|
if (h)
|
|
750
|
-
h.value =
|
|
750
|
+
h.value = d, h.message = l;
|
|
751
751
|
else {
|
|
752
|
-
const A = { id: s, type: u, value:
|
|
752
|
+
const A = { id: s, type: u, value: d, message: l };
|
|
753
753
|
g.rules.push(A);
|
|
754
754
|
}
|
|
755
755
|
delete e.expressionInfo;
|
|
@@ -764,11 +764,11 @@ class ge {
|
|
|
764
764
|
const t = n.propertyValue;
|
|
765
765
|
if (t && t.type === "Expression")
|
|
766
766
|
return;
|
|
767
|
-
const s = n.propertyID, r = this.formSchemaUtils.getExpressions(),
|
|
767
|
+
const s = n.propertyID, r = this.formSchemaUtils.getExpressions(), c = e.binding ? e.binding.field : e.id, o = r.find((u) => u.target === c);
|
|
768
768
|
!o || !o.rules || (o.rules = o.rules.filter((u) => u.type !== s));
|
|
769
769
|
}
|
|
770
770
|
getExpressionOptions(n, e, t) {
|
|
771
|
-
return new
|
|
771
|
+
return new H(this.formSchemaUtils).getExpressionOptions(n, e, t);
|
|
772
772
|
}
|
|
773
773
|
getRealTargetType(n) {
|
|
774
774
|
return ["response-toolbar-item", "tab-toolbar-item", "section-toolbar-item", "drawer-toolbar-item"].indexOf(n.type) > -1 ? "Button" : n.binding && n.binding.field ? "Field" : "Container";
|
|
@@ -881,7 +881,7 @@ y(E, "fieldControlTypeMapping", {
|
|
|
881
881
|
});
|
|
882
882
|
let P = E;
|
|
883
883
|
var M = /* @__PURE__ */ ((p) => (p.Form = "Form", p.Variable = "Variable", p))(M || {});
|
|
884
|
-
class
|
|
884
|
+
class U {
|
|
885
885
|
constructor() {
|
|
886
886
|
/** 控件标题 */
|
|
887
887
|
y(this, "label", "");
|
|
@@ -915,8 +915,8 @@ function fe(p) {
|
|
|
915
915
|
let n, e;
|
|
916
916
|
const t = /* @__PURE__ */ new Map();
|
|
917
917
|
let i = [];
|
|
918
|
-
function s(
|
|
919
|
-
const m =
|
|
918
|
+
function s(d, l) {
|
|
919
|
+
const m = ((d == null ? void 0 : d.split(" ")) || []).filter((b) => b.startsWith("col-"));
|
|
920
920
|
if (m.length === 0) {
|
|
921
921
|
l.isSupportedClass = !1;
|
|
922
922
|
return;
|
|
@@ -924,31 +924,38 @@ function fe(p) {
|
|
|
924
924
|
let g = m.find((b) => /^col-([1-9]|10|11|12)$/.test(b)), h = m.find((b) => /^col-md-([1-9]|10|11|12)$/.test(b)), A = m.find((b) => /^col-xl-([1-9]|10|11|12)$/.test(b)), v = m.find((b) => /^col-el-([1-9]|10|11|12)$/.test(b));
|
|
925
925
|
g = g || "col-12", l.columnInSM = parseInt(g.replace("col-", ""), 10), l.displayWidthInSM = l.columnInSM / 12, l.displayWidthInSM !== 1 && (l.isSupportedClass = !1), h = h || "col-md-" + l.columnInSM, l.columnInMD = parseInt(h.replace("col-md-", ""), 10), l.displayWidthInMD = l.columnInMD / 6, [1, 2].includes(l.displayWidthInMD) || (l.isSupportedClass = !1), A = A || "col-xl-" + l.columnInMD, l.columnInLG = parseInt(A.replace("col-xl-", ""), 10), l.displayWidthInLG = l.columnInLG / 3, [1, 2, 3, 4].includes(l.displayWidthInLG) || (l.isSupportedClass = !1), v = v || "col-el-" + l.columnInLG, l.columnInEL = parseInt(v.replace("col-el-", ""), 10), l.displayWidthInEL = l.columnInEL / 2, [1, 2, 3, 4, 5, 6].includes(l.displayWidthInEL) || (l.isSupportedClass = !1);
|
|
926
926
|
}
|
|
927
|
-
function r(
|
|
927
|
+
function r(d, l, f, m = !1) {
|
|
928
928
|
let g = !1;
|
|
929
|
-
|
|
929
|
+
if (!d.contents || d.contents.length === 0) {
|
|
930
|
+
const h = new U();
|
|
931
|
+
s(d.layout, h), l.push(h);
|
|
932
|
+
return;
|
|
933
|
+
}
|
|
934
|
+
d.contents.forEach((h) => {
|
|
930
935
|
if (h.type === "fieldset") {
|
|
931
936
|
f += 1, r(h, l, f, !0), g = !0;
|
|
932
937
|
return;
|
|
933
938
|
}
|
|
939
|
+
if (h.type === "dynamic-form")
|
|
940
|
+
return;
|
|
934
941
|
g && (f += 1, g = !1);
|
|
935
|
-
const A = h.appearance && h.appearance.class, v = new
|
|
936
|
-
A ? s(A, v) : v.isSupportedClass = !1, v.label = h.label || h.id, v.id = h.id, v.group = f, m && (v.fieldSetId =
|
|
942
|
+
const A = h.appearance && h.appearance.class, v = new U();
|
|
943
|
+
A ? s(A, v) : v.isSupportedClass = !1, v.label = h.label || h.id, v.id = h.id, v.group = f, m && (v.fieldSetId = d.id), e === h.id && (n = f), t.set(h.id, h), l.push(v);
|
|
937
944
|
});
|
|
938
945
|
}
|
|
939
|
-
function d
|
|
940
|
-
const l = p.getComponentById(
|
|
946
|
+
function c(d) {
|
|
947
|
+
const l = p.getComponentById(d);
|
|
941
948
|
if (!l || !l.componentType || !l.componentType.startsWith("form"))
|
|
942
949
|
return { result: !1, message: "只可以在响应式表单组件中调整响应式布局配置" };
|
|
943
950
|
const f = p.selectNode(l, (m) => m.type === a["response-form"].type);
|
|
944
951
|
return !f || !f.contents || f.contents.length === 0 ? { result: !1, message: "Form区域内没有控件,请先添加控件" } : { result: !0, message: "", formNode: f };
|
|
945
952
|
}
|
|
946
|
-
function o(
|
|
947
|
-
l = l ||
|
|
948
|
-
const { result: f, message: m, formNode: g } =
|
|
953
|
+
function o(d, l) {
|
|
954
|
+
l = l || d.id;
|
|
955
|
+
const { result: f, message: m, formNode: g } = c(l);
|
|
949
956
|
if (!f)
|
|
950
957
|
return { result: f, message: m };
|
|
951
|
-
e =
|
|
958
|
+
e = d.id, i = [], t.clear();
|
|
952
959
|
const h = g.contents[0].type === a.fieldset.type ? 0 : 1;
|
|
953
960
|
r(g, i, h);
|
|
954
961
|
const A = i.find((b) => !b.isSupportedClass);
|
|
@@ -960,18 +967,18 @@ function fe(p) {
|
|
|
960
967
|
importData: i
|
|
961
968
|
};
|
|
962
969
|
}
|
|
963
|
-
function u(
|
|
970
|
+
function u(d, l) {
|
|
964
971
|
l = l;
|
|
965
|
-
const { result: f, formNode: m } =
|
|
972
|
+
const { result: f, formNode: m } = c(l);
|
|
966
973
|
if (!f)
|
|
967
974
|
return "";
|
|
968
975
|
const g = [];
|
|
969
|
-
return
|
|
976
|
+
return d.forEach((h) => {
|
|
970
977
|
var b;
|
|
971
978
|
const A = t.get(h.id), v = A.appearance && A.appearance.class;
|
|
972
979
|
if (v) {
|
|
973
|
-
const V = v.split(" ").filter((
|
|
974
|
-
A.appearance.class =
|
|
980
|
+
const V = v.split(" ").filter((j) => !j.startsWith("col-")), w = "col-" + h.columnInSM, W = "col-md-" + h.columnInMD, Q = "col-xl-" + h.columnInLG, G = "col-el-" + h.columnInEL, O = [w, W, Q, G].concat(V);
|
|
981
|
+
A.appearance.class = O.join(" ");
|
|
975
982
|
}
|
|
976
983
|
if (h.fieldSetId) {
|
|
977
984
|
const T = m.contents.find((w) => w.id === h.fieldSetId), V = g.find((w) => w.id === h.fieldSetId);
|
|
@@ -981,13 +988,13 @@ function fe(p) {
|
|
|
981
988
|
}), m.contents = g, m.id;
|
|
982
989
|
}
|
|
983
990
|
return {
|
|
984
|
-
checkCanFindFormNode:
|
|
991
|
+
checkCanFindFormNode: c,
|
|
985
992
|
checkCanOpenLayoutEditor: o,
|
|
986
993
|
changeFormControlsByResponseLayoutConfig: u,
|
|
987
994
|
getResonseFormLayoutConfig: r
|
|
988
995
|
};
|
|
989
996
|
}
|
|
990
|
-
class he extends
|
|
997
|
+
class he extends me {
|
|
991
998
|
constructor(e, t) {
|
|
992
999
|
super(e, t);
|
|
993
1000
|
y(this, "responseLayoutEditorFunction");
|
|
@@ -1014,7 +1021,7 @@ class he extends ge {
|
|
|
1014
1021
|
var u;
|
|
1015
1022
|
const s = this;
|
|
1016
1023
|
this.setDesignViewModelField(e);
|
|
1017
|
-
const { canChangeControlType: r, editorTypeList:
|
|
1024
|
+
const { canChangeControlType: r, editorTypeList: c } = this.getAvailableEditorType(e), o = {
|
|
1018
1025
|
description: "Basic Information",
|
|
1019
1026
|
title: "基本信息",
|
|
1020
1027
|
properties: {
|
|
@@ -1036,7 +1043,7 @@ class he extends ge {
|
|
|
1036
1043
|
valueField: "key",
|
|
1037
1044
|
idField: "key",
|
|
1038
1045
|
editable: !1,
|
|
1039
|
-
data:
|
|
1046
|
+
data: c,
|
|
1040
1047
|
readonly: !r
|
|
1041
1048
|
}
|
|
1042
1049
|
},
|
|
@@ -1073,19 +1080,19 @@ class he extends ge {
|
|
|
1073
1080
|
readonly: this.formSchemaUtils.designerMode === "PC_RTC" && !e.isRtcControl
|
|
1074
1081
|
}
|
|
1075
1082
|
},
|
|
1076
|
-
setPropertyRelates(
|
|
1077
|
-
if (
|
|
1078
|
-
switch (
|
|
1083
|
+
setPropertyRelates(d, l, f) {
|
|
1084
|
+
if (d)
|
|
1085
|
+
switch (d && d.propertyID) {
|
|
1079
1086
|
case "type": {
|
|
1080
|
-
s.changeControlType(e,
|
|
1087
|
+
s.changeControlType(e, d, t);
|
|
1081
1088
|
break;
|
|
1082
1089
|
}
|
|
1083
1090
|
case "label": {
|
|
1084
|
-
|
|
1091
|
+
d.needRefreshControlTree = !0;
|
|
1085
1092
|
break;
|
|
1086
1093
|
}
|
|
1087
1094
|
case "binding": {
|
|
1088
|
-
s.changeBindingField(e,
|
|
1095
|
+
s.changeBindingField(e, d, f);
|
|
1089
1096
|
break;
|
|
1090
1097
|
}
|
|
1091
1098
|
}
|
|
@@ -1195,10 +1202,10 @@ class he extends ge {
|
|
|
1195
1202
|
const s = t.propertyValue, r = i && i.parent && i.parent.schema;
|
|
1196
1203
|
if (!r)
|
|
1197
1204
|
return;
|
|
1198
|
-
const
|
|
1199
|
-
if (
|
|
1205
|
+
const c = r.contents.findIndex((d) => d.id === e.id);
|
|
1206
|
+
if (c === -1)
|
|
1200
1207
|
return;
|
|
1201
|
-
const o = r.contents[
|
|
1208
|
+
const o = r.contents[c];
|
|
1202
1209
|
let u;
|
|
1203
1210
|
if (this.designViewModelField) {
|
|
1204
1211
|
const f = this.formSchemaUtils.getViewModelById(this.viewModelId).fields.find((g) => g.id === this.designViewModelField.id).fieldSchema || {};
|
|
@@ -1210,13 +1217,13 @@ class he extends ge {
|
|
|
1210
1217
|
size: o.size,
|
|
1211
1218
|
label: o.label,
|
|
1212
1219
|
binding: o.binding
|
|
1213
|
-
}), Object.prototype.hasOwnProperty.call(o, "visible") && Object.assign(u, { visible: o.visible }), o.editor && ["readonly", "required", "placeholder"].map((
|
|
1214
|
-
Object.prototype.hasOwnProperty.call(o.editor,
|
|
1220
|
+
}), Object.prototype.hasOwnProperty.call(o, "visible") && Object.assign(u, { visible: o.visible }), o.editor && ["readonly", "required", "placeholder"].map((d) => {
|
|
1221
|
+
Object.prototype.hasOwnProperty.call(o.editor, d) && (u.editor[d] = o.editor[d]);
|
|
1215
1222
|
}), i != null && i.updateContextSchema ? i.updateContextSchema(u) : (i.schema = Object.assign(o, u), Object.assign(e, u)), Array.from(document.getElementsByClassName("dgComponentSelected")).forEach(
|
|
1216
|
-
(
|
|
1223
|
+
(d) => d.classList.remove("dgComponentSelected")
|
|
1217
1224
|
), Array.from(document.getElementsByClassName("dgComponentFocused")).forEach(
|
|
1218
|
-
(
|
|
1219
|
-
), x.value++,
|
|
1225
|
+
(d) => d.classList.remove("dgComponentFocused")
|
|
1226
|
+
), x.value++, z(() => {
|
|
1220
1227
|
this.getFormDesignerInstance().reloadPropertyPanel();
|
|
1221
1228
|
});
|
|
1222
1229
|
}
|
|
@@ -1228,7 +1235,7 @@ class he extends ge {
|
|
|
1228
1235
|
type: "input-group",
|
|
1229
1236
|
$converter: "/converter/property-editor.converter",
|
|
1230
1237
|
parentPropertyID: "editor"
|
|
1231
|
-
}, t),
|
|
1238
|
+
}, t), c = (f = e.binding) != null && f.field ? [] : ["Const", "Variable", "StateMachine"], o = this.getPropertyEditorParams(e, c, "readonly"), u = this.getPropertyEditorParams(e, c, "required"), d = {
|
|
1232
1239
|
readonly: {
|
|
1233
1240
|
description: "",
|
|
1234
1241
|
title: "只读",
|
|
@@ -1248,11 +1255,11 @@ class he extends ge {
|
|
|
1248
1255
|
}
|
|
1249
1256
|
};
|
|
1250
1257
|
for (const g in i)
|
|
1251
|
-
|
|
1258
|
+
d[g] = Object.assign(d[g] || {}, i[g]);
|
|
1252
1259
|
const l = this;
|
|
1253
1260
|
return {
|
|
1254
1261
|
...r,
|
|
1255
|
-
properties: { ...
|
|
1262
|
+
properties: { ...d },
|
|
1256
1263
|
setPropertyRelates(g, h) {
|
|
1257
1264
|
if (g) {
|
|
1258
1265
|
switch (g.propertyID) {
|
|
@@ -1274,16 +1281,16 @@ class he extends ge {
|
|
|
1274
1281
|
*/
|
|
1275
1282
|
updateUnifiedLayoutAfterControlChanged(e, t, i) {
|
|
1276
1283
|
const s = e.split(" ");
|
|
1277
|
-
let r = s.find((l) => /^col-([1-9]|10|11|12)$/.test(l)),
|
|
1278
|
-
r = r || "col-12",
|
|
1279
|
-
const
|
|
1284
|
+
let r = s.find((l) => /^col-([1-9]|10|11|12)$/.test(l)), c = s.find((l) => /^col-md-([1-9]|10|11|12)$/.test(l)), o = s.find((l) => /^col-xl-([1-9]|10|11|12)$/.test(l)), u = s.find((l) => /^col-el-([1-9]|10|11|12)$/.test(l));
|
|
1285
|
+
r = r || "col-12", c = c || "col-md-" + r.replace("col-", ""), o = o || "col-xl-" + c.replace("col-md-", ""), u = u || "col-el-" + o.replace("col-xl-", "");
|
|
1286
|
+
const d = {
|
|
1280
1287
|
id: t,
|
|
1281
1288
|
columnInSM: parseInt(r.replace("col-", ""), 10),
|
|
1282
|
-
columnInMD: parseInt(
|
|
1289
|
+
columnInMD: parseInt(c.replace("col-md-", ""), 10),
|
|
1283
1290
|
columnInLG: parseInt(o.replace("col-xl-", ""), 10),
|
|
1284
1291
|
columnInEL: parseInt(u.replace("col-el-", ""), 10)
|
|
1285
1292
|
};
|
|
1286
|
-
this.updateUnifiedLayoutAfterResponseLayoutChanged(i,
|
|
1293
|
+
this.updateUnifiedLayoutAfterResponseLayoutChanged(i, d);
|
|
1287
1294
|
}
|
|
1288
1295
|
/**
|
|
1289
1296
|
* 修改控件布局配置后更新Form统一布局配置
|
|
@@ -1299,9 +1306,9 @@ class he extends ge {
|
|
|
1299
1306
|
const g = s.find((h) => h.id === t.id);
|
|
1300
1307
|
Object.assign(g || {}, t);
|
|
1301
1308
|
}
|
|
1302
|
-
const r = s.map((g) => g.columnInSM),
|
|
1309
|
+
const r = s.map((g) => g.columnInSM), c = s.map((g) => g.columnInMD), o = s.map((g) => g.columnInLG), u = s.map((g) => g.columnInEL), d = this.checkIsUniqueColumn(r) ? r[0] : null, l = this.checkIsUniqueColumn(c) ? c[0] : null, f = this.checkIsUniqueColumn(o) ? o[0] : null, m = this.checkIsUniqueColumn(u) ? u[0] : null;
|
|
1303
1310
|
Object.assign(i.unifiedLayout, {
|
|
1304
|
-
uniqueColClassInSM:
|
|
1311
|
+
uniqueColClassInSM: d,
|
|
1305
1312
|
uniqueColClassInMD: l,
|
|
1306
1313
|
uniqueColClassInLG: f,
|
|
1307
1314
|
uniqueColClassInEL: m
|
|
@@ -1345,7 +1352,7 @@ class he extends ge {
|
|
|
1345
1352
|
* @param propertyData 下拉框控件属性值
|
|
1346
1353
|
*/
|
|
1347
1354
|
checkEnumDataReadonly(e) {
|
|
1348
|
-
return !e.binding || e.binding.type !== "Form" ? !1 : !!(this.designViewModelField && this.designViewModelField.type && this.designViewModelField.type.$type ===
|
|
1355
|
+
return !e.binding || e.binding.type !== "Form" ? !1 : !!(this.designViewModelField && this.designViewModelField.type && this.designViewModelField.type.$type === ee.EnumType);
|
|
1349
1356
|
}
|
|
1350
1357
|
/**
|
|
1351
1358
|
* 将字段值变化前事件、变化后事件追加到交互面板
|
|
@@ -1374,8 +1381,8 @@ class he extends ge {
|
|
|
1374
1381
|
*/
|
|
1375
1382
|
getEventPropertyConfig(e, t = "card", i, s) {
|
|
1376
1383
|
const r = this;
|
|
1377
|
-
let
|
|
1378
|
-
if (i && (
|
|
1384
|
+
let c = [];
|
|
1385
|
+
if (i && (c = c.concat(i)), c.length === 0)
|
|
1379
1386
|
return {
|
|
1380
1387
|
title: "事件",
|
|
1381
1388
|
hideTitle: !0,
|
|
@@ -1384,8 +1391,8 @@ class he extends ge {
|
|
|
1384
1391
|
tabName: "交互",
|
|
1385
1392
|
hide: !0
|
|
1386
1393
|
};
|
|
1387
|
-
this.appendFieldValueChangeEvents(e,
|
|
1388
|
-
const o = r.eventsEditorUtils.formProperties(e, r.viewModelId,
|
|
1394
|
+
this.appendFieldValueChangeEvents(e, c);
|
|
1395
|
+
const o = r.eventsEditorUtils.formProperties(e, r.viewModelId, c);
|
|
1389
1396
|
return {
|
|
1390
1397
|
title: "事件",
|
|
1391
1398
|
hideTitle: !0,
|
|
@@ -1401,7 +1408,7 @@ class he extends ge {
|
|
|
1401
1408
|
};
|
|
1402
1409
|
}
|
|
1403
1410
|
getExpressionConfig(e, t, i = ["compute", "dependency", "validate"], s) {
|
|
1404
|
-
return new
|
|
1411
|
+
return new H(this.formSchemaUtils).getExpressionConfig(
|
|
1405
1412
|
e,
|
|
1406
1413
|
t,
|
|
1407
1414
|
i,
|
|
@@ -1421,8 +1428,8 @@ class he extends ge {
|
|
|
1421
1428
|
setBooleanValue(e, t, i) {
|
|
1422
1429
|
let s = i;
|
|
1423
1430
|
this.getBindingDataType() === "string" && (s = (s || "").trim() || (t === "trueValue" ? "true" : "false"));
|
|
1424
|
-
const
|
|
1425
|
-
e.editor[
|
|
1431
|
+
const c = t === "trueValue" ? "falseValue" : "trueValue";
|
|
1432
|
+
e.editor[c] === s && (s = s + 1), this.updatePropertyValue(e, t, s);
|
|
1426
1433
|
}
|
|
1427
1434
|
getBooleanValueConverter() {
|
|
1428
1435
|
return {
|
|
@@ -1478,16 +1485,16 @@ function Ae(p, n) {
|
|
|
1478
1485
|
getPropsConfig: t
|
|
1479
1486
|
};
|
|
1480
1487
|
}
|
|
1481
|
-
const ve = /* @__PURE__ */
|
|
1488
|
+
const ve = /* @__PURE__ */ R({
|
|
1482
1489
|
name: "FAvatarDesign",
|
|
1483
1490
|
props: k,
|
|
1484
1491
|
emits: ["change", "update:modelValue"],
|
|
1485
1492
|
setup(p, n) {
|
|
1486
|
-
const e = F(), t = B("designer-host-service"), i = B("design-item-context"), s = Ae(i, t), r =
|
|
1487
|
-
|
|
1493
|
+
const e = F(), t = B("designer-host-service"), i = B("design-item-context"), s = Ae(i, t), r = Y(e, i, s);
|
|
1494
|
+
$(() => {
|
|
1488
1495
|
e.value.componentInstance = r;
|
|
1489
1496
|
}), n.expose(r.value);
|
|
1490
|
-
const
|
|
1497
|
+
const c = I(() => ({
|
|
1491
1498
|
"f-avatar": !0,
|
|
1492
1499
|
"f-avatar-readonly": p.readonly,
|
|
1493
1500
|
"f-avatar-circle": p.shape === "circle",
|
|
@@ -1495,7 +1502,7 @@ const ve = /* @__PURE__ */ U({
|
|
|
1495
1502
|
})), o = F(p.modelValue), u = I(() => ({
|
|
1496
1503
|
width: p.avatarWidth + "px",
|
|
1497
1504
|
height: p.avatarHeight + "px"
|
|
1498
|
-
})),
|
|
1505
|
+
})), d = !1;
|
|
1499
1506
|
function l() {
|
|
1500
1507
|
return "";
|
|
1501
1508
|
}
|
|
@@ -1505,13 +1512,13 @@ const ve = /* @__PURE__ */ U({
|
|
|
1505
1512
|
acceptTypes: g,
|
|
1506
1513
|
imageSource: h,
|
|
1507
1514
|
onClickImage: A
|
|
1508
|
-
} =
|
|
1515
|
+
} = q(p, n, m, o);
|
|
1509
1516
|
return () => C("div", {
|
|
1510
1517
|
ref: e,
|
|
1511
|
-
class:
|
|
1518
|
+
class: c.value,
|
|
1512
1519
|
style: u.value,
|
|
1513
1520
|
onClick: A
|
|
1514
|
-
}, [
|
|
1521
|
+
}, [d, C("img", {
|
|
1515
1522
|
title: p.title,
|
|
1516
1523
|
class: "f-avatar-image",
|
|
1517
1524
|
src: h.value,
|
|
@@ -1532,15 +1539,15 @@ const ve = /* @__PURE__ */ U({
|
|
|
1532
1539
|
}
|
|
1533
1540
|
});
|
|
1534
1541
|
S.register = (p, n, e, t) => {
|
|
1535
|
-
p.avatar = S, n.avatar =
|
|
1542
|
+
p.avatar = S, n.avatar = L;
|
|
1536
1543
|
};
|
|
1537
1544
|
S.registerDesigner = (p, n, e) => {
|
|
1538
|
-
p.avatar = ve, n.avatar =
|
|
1545
|
+
p.avatar = ve, n.avatar = L;
|
|
1539
1546
|
};
|
|
1540
|
-
const xe =
|
|
1547
|
+
const xe = te(S);
|
|
1541
1548
|
export {
|
|
1542
1549
|
S as FAvatar,
|
|
1543
1550
|
k as avatarProps,
|
|
1544
1551
|
xe as default,
|
|
1545
|
-
|
|
1552
|
+
L as propsResolver
|
|
1546
1553
|
};
|