@farris/ui-vue 1.6.5-beta.7 → 1.6.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/accordion/index.esm.js +65 -65
- package/components/accordion/index.umd.cjs +1 -1
- package/components/avatar/index.esm.js +360 -361
- package/components/avatar/index.umd.cjs +1 -1
- package/components/button-edit/index.esm.js +524 -520
- package/components/button-edit/index.umd.cjs +1 -1
- package/components/calendar/index.esm.js +134 -134
- package/components/calendar/index.umd.cjs +1 -1
- package/components/capsule/index.esm.js +192 -192
- package/components/capsule/index.umd.cjs +1 -1
- package/components/code-editor/index.esm.js +8 -8
- package/components/code-editor/index.umd.cjs +3 -3
- package/components/collection-property-editor/index.esm.js +72 -72
- package/components/collection-property-editor/index.umd.cjs +1 -1
- package/components/color-picker/index.esm.js +291 -289
- package/components/color-picker/index.umd.cjs +1 -1
- package/components/combo-list/index.esm.js +190 -181
- package/components/combo-list/index.umd.cjs +1 -1
- package/components/combo-tree/index.esm.js +113 -112
- package/components/combo-tree/index.umd.cjs +1 -1
- package/components/common/index.esm.js +3 -1
- package/components/common/index.umd.cjs +1 -1
- package/components/component/index.esm.js +309 -309
- package/components/component/index.umd.cjs +1 -1
- package/components/condition/index.esm.js +1125 -1124
- package/components/condition/index.umd.cjs +1 -1
- package/components/content-container/index.esm.js +472 -472
- package/components/content-container/index.umd.cjs +1 -1
- package/components/data-grid/index.esm.js +99 -99
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/data-view/index.esm.js +3387 -3321
- package/components/data-view/index.umd.cjs +1 -1
- package/components/date-picker/index.esm.js +1604 -1601
- package/components/date-picker/index.umd.cjs +1 -1
- package/components/designer-canvas/index.esm.js +1082 -1079
- package/components/designer-canvas/index.umd.cjs +1 -1
- package/components/discussion-editor/index.esm.js +973 -1040
- package/components/discussion-editor/index.umd.cjs +6 -6
- package/components/dropdown/index.esm.js +335 -330
- package/components/dropdown/index.umd.cjs +2 -2
- package/components/dynamic-form/index.esm.js +177 -177
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/dynamic-resolver/index.esm.js +6 -6
- package/components/dynamic-resolver/index.umd.cjs +1 -1
- package/components/dynamic-view/index.esm.js +344 -344
- package/components/dynamic-view/index.umd.cjs +1 -1
- package/components/events-editor/index.esm.js +644 -644
- package/components/events-editor/index.umd.cjs +3 -3
- package/components/expression-editor/index.esm.js +1773 -1760
- package/components/expression-editor/index.umd.cjs +4 -4
- package/components/fieldset/index.esm.js +55 -55
- package/components/fieldset/index.umd.cjs +1 -1
- package/components/filter-bar/index.esm.js +879 -869
- package/components/filter-bar/index.umd.cjs +1 -1
- package/components/filter-condition-editor/index.esm.js +1091 -1077
- package/components/filter-condition-editor/index.umd.cjs +3 -3
- package/components/flow-canvas/index.esm.js +215 -215
- package/components/flow-canvas/index.umd.cjs +1 -1
- package/components/html-template/index.esm.js +164 -164
- package/components/html-template/index.umd.cjs +1 -1
- package/components/image-cropper/index.esm.js +198 -198
- package/components/image-cropper/index.umd.cjs +1 -1
- package/components/json-editor/index.esm.js +64 -64
- package/components/json-editor/index.umd.cjs +1 -1
- package/components/language-textbox/index.esm.js +140 -140
- package/components/language-textbox/index.umd.cjs +1 -1
- package/components/layout/index.esm.js +111 -111
- package/components/layout/index.umd.cjs +1 -1
- package/components/list-nav/index.esm.js +90 -90
- package/components/list-nav/index.umd.cjs +1 -1
- package/components/list-view/index.esm.js +139 -141
- package/components/list-view/index.umd.cjs +3 -3
- package/components/locale/index.esm.js +833 -901
- package/components/locale/index.umd.cjs +6 -6
- package/components/lookup/index.esm.js +1352 -1351
- package/components/lookup/index.umd.cjs +1 -1
- package/components/mapping-editor/index.esm.js +1387 -1383
- package/components/mapping-editor/index.umd.cjs +1 -1
- package/components/menu-lookup/index.esm.js +1059 -1127
- package/components/menu-lookup/index.umd.cjs +6 -6
- package/components/message-box/index.esm.js +217 -217
- package/components/message-box/index.umd.cjs +1 -1
- package/components/modal/index.esm.js +283 -283
- package/components/modal/index.umd.cjs +1 -1
- package/components/nav/index.esm.js +106 -106
- package/components/nav/index.umd.cjs +1 -1
- package/components/number-range/index.esm.js +194 -194
- package/components/number-range/index.umd.cjs +1 -1
- package/components/number-spinner/index.esm.js +463 -462
- package/components/number-spinner/index.umd.cjs +1 -1
- package/components/order/index.esm.js +883 -876
- package/components/order/index.umd.cjs +4 -4
- package/components/page-footer/index.esm.js +94 -94
- package/components/page-footer/index.umd.cjs +1 -1
- package/components/page-header/index.esm.js +942 -939
- package/components/page-header/index.umd.cjs +1 -1
- package/components/pagination/index.esm.js +82 -82
- package/components/pagination/index.umd.cjs +1 -1
- package/components/popover/index.esm.js +59 -57
- package/components/popover/index.umd.cjs +1 -1
- package/components/progress/index.esm.js +113 -113
- package/components/progress/index.umd.cjs +2 -2
- package/components/property-editor/index.esm.js +151 -150
- package/components/property-editor/index.umd.cjs +1 -1
- package/components/property-panel/index.esm.js +739 -739
- package/components/property-panel/index.umd.cjs +2 -2
- package/components/query-solution/index.esm.js +4142 -4190
- package/components/query-solution/index.umd.cjs +6 -6
- package/components/radio-button/index.esm.js +182 -182
- package/components/radio-button/index.umd.cjs +1 -1
- package/components/rate/index.esm.js +106 -106
- package/components/rate/index.umd.cjs +1 -1
- package/components/response-layout/index.esm.js +535 -535
- package/components/response-layout/index.umd.cjs +1 -1
- package/components/response-layout-editor/index.esm.js +1456 -1443
- package/components/response-layout-editor/index.umd.cjs +1 -1
- package/components/response-toolbar/index.esm.js +779 -776
- package/components/response-toolbar/index.umd.cjs +1 -1
- package/components/schema-selector/index.esm.js +1875 -1866
- package/components/schema-selector/index.umd.cjs +7 -7
- package/components/search-box/index.esm.js +151 -147
- package/components/search-box/index.umd.cjs +1 -1
- package/components/section/index.esm.js +1236 -1233
- package/components/section/index.umd.cjs +1 -1
- package/components/smoke-detector/index.esm.js +163 -163
- package/components/smoke-detector/index.umd.cjs +1 -1
- package/components/sort-condition-editor/index.esm.js +1097 -1083
- package/components/sort-condition-editor/index.umd.cjs +3 -3
- package/components/splitter/index.esm.js +3 -3
- package/components/splitter/index.umd.cjs +1 -1
- package/components/step/index.esm.js +133 -133
- package/components/step/index.umd.cjs +1 -1
- package/components/switch/index.esm.js +103 -98
- package/components/switch/index.umd.cjs +1 -1
- package/components/tabs/index.esm.js +1596 -1593
- package/components/tabs/index.umd.cjs +2 -2
- package/components/tags/index.esm.js +93 -93
- package/components/tags/index.umd.cjs +1 -1
- package/components/text/index.esm.js +138 -138
- package/components/text/index.umd.cjs +1 -1
- package/components/textarea/index.esm.js +684 -684
- package/components/textarea/index.umd.cjs +2 -2
- package/components/time-picker/index.esm.js +935 -929
- package/components/time-picker/index.umd.cjs +1 -1
- package/components/tooltip/index.esm.js +173 -171
- package/components/tooltip/index.umd.cjs +1 -1
- package/components/transfer/index.esm.js +190 -192
- package/components/transfer/index.umd.cjs +4 -4
- package/components/tree-grid/index.esm.js +124 -124
- package/components/tree-grid/index.umd.cjs +1 -1
- package/components/tree-view/index.esm.js +2363 -2278
- package/components/tree-view/index.umd.cjs +1 -1
- package/components/uploader/index.esm.js +170 -170
- package/components/uploader/index.umd.cjs +2 -2
- package/components/verify-detail/index.esm.js +196 -196
- package/components/verify-detail/index.umd.cjs +1 -1
- package/components/video/index.esm.js +227 -227
- package/components/video/index.umd.cjs +1 -1
- package/components/weather/index.esm.js +9 -9
- package/components/weather/index.umd.cjs +2 -2
- package/designer/button-edit/index.esm.js +353 -353
- package/designer/button-edit/index.umd.cjs +1 -1
- package/designer/checkbox/index.esm.js +7 -3
- package/designer/checkbox/index.umd.cjs +1 -1
- package/designer/checkbox-group/index.esm.js +38 -33
- package/designer/checkbox-group/index.umd.cjs +1 -1
- package/designer/data-grid/index.esm.js +3562 -3536
- package/designer/data-grid/index.umd.cjs +6 -6
- package/designer/data-view/index.esm.js +3 -3
- package/designer/data-view/index.umd.cjs +3 -3
- package/designer/farris-designer.all.esm.js +4203 -4193
- package/designer/farris-designer.all.umd.cjs +9 -9
- package/designer/input-group/index.esm.js +97 -97
- package/designer/input-group/index.umd.cjs +1 -1
- package/designer/list-view/index.esm.js +1868 -1854
- package/designer/list-view/index.umd.cjs +8 -8
- package/designer/radio-group/index.esm.js +954 -949
- package/designer/radio-group/index.umd.cjs +1 -1
- package/farris.all.esm.js +16195 -16126
- package/farris.all.umd.cjs +30 -30
- package/locales/data-grid/ui/en.json +2 -2
- package/locales/designer/en.json +7 -6
- package/locales/designer/zh-CHS.json +2 -1
- package/locales/designer/zh-CHT.json +2 -1
- package/locales/ui/en.json +7 -6
- package/locales/ui/zh-CHS.json +2 -1
- package/locales/ui/zh-CHT.json +2 -1
- package/package.json +1 -1
- package/types/combo-list/src/property-config/combo-list.property-config.d.ts +0 -6
- package/types/data-view/composition/types.d.ts +10 -4
- package/types/lookup/src/composition/use-dialog.d.ts +2 -0
- package/types/lookup/src/composition/use-input-change.d.ts +1 -0
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { ref as T, computed as
|
|
2
|
-
import {
|
|
3
|
-
import { FComboList as
|
|
1
|
+
import { ref as T, computed as B, createVNode as V, withDirectives as ue, vModelText as ce, watch as _, mergeProps as pe, defineComponent as fe } from "vue";
|
|
2
|
+
import { cloneDeep as D, isPlainObject as z } from "lodash-es";
|
|
3
|
+
import { FComboList as A } from "../combo-list/index.esm.js";
|
|
4
4
|
import { FNumberSpinner as de } from "../number-spinner/index.esm.js";
|
|
5
5
|
import { useGuid as me, withInstall as ve } from "../common/index.esm.js";
|
|
6
6
|
import { FExpressionTextbox as ge } from "../expression-editor/index.esm.js";
|
|
7
7
|
function G(e, t) {
|
|
8
8
|
let r;
|
|
9
9
|
function s(a) {
|
|
10
|
-
const { properties: u, title: d, ignore: o } = a, n = o && Array.isArray(o), l = Object.keys(u).reduce((m, b) => ((!n || !o.find((
|
|
10
|
+
const { properties: u, title: d, ignore: o } = a, n = o && Array.isArray(o), l = Object.keys(u).reduce((m, b) => ((!n || !o.find((P) => P === b)) && (m[b] = u[b].type === "object" && u[b].properties ? s(u[b]) : D(u[b].default)), m), {});
|
|
11
11
|
if (d && (!n || !o.find((m) => m === "id"))) {
|
|
12
12
|
const m = d.toLowerCase().replace(/-/g, "_");
|
|
13
13
|
l.id = `${m}_${Math.random().toString().slice(2, 6)}`;
|
|
@@ -17,7 +17,7 @@ function G(e, t) {
|
|
|
17
17
|
function v(a) {
|
|
18
18
|
const { properties: u, title: d, required: o } = a;
|
|
19
19
|
if (o && Array.isArray(o)) {
|
|
20
|
-
const n = o.reduce((l, m) => (l[m] = u[m].type === "object" && u[m].properties ? s(u[m]) :
|
|
20
|
+
const n = o.reduce((l, m) => (l[m] = u[m].type === "object" && u[m].properties ? s(u[m]) : D(u[m].default), l), {});
|
|
21
21
|
if (d && o.find((l) => l === "id")) {
|
|
22
22
|
const l = d.toLowerCase().replace(/-/g, "_");
|
|
23
23
|
n.id = `${l}_${Math.random().toString().slice(2, 6)}`;
|
|
@@ -41,7 +41,7 @@ function G(e, t) {
|
|
|
41
41
|
const d = s(u);
|
|
42
42
|
return Object.keys(d).reduce((o, n) => (Object.prototype.hasOwnProperty.call(a, n) && (o[n] && z(o[n]) && z(a[n] || !a[n]) ? Object.assign(o[n], a[n] || {}) : o[n] = a[n]), o), d), d;
|
|
43
43
|
}
|
|
44
|
-
function
|
|
44
|
+
function f(a, u) {
|
|
45
45
|
return Object.keys(a).filter((o) => a[o] != null).reduce((o, n) => {
|
|
46
46
|
if (u.has(n)) {
|
|
47
47
|
const l = u.get(n);
|
|
@@ -56,9 +56,9 @@ function G(e, t) {
|
|
|
56
56
|
return o;
|
|
57
57
|
}, {});
|
|
58
58
|
}
|
|
59
|
-
function
|
|
59
|
+
function p(a, u, d = /* @__PURE__ */ new Map()) {
|
|
60
60
|
const o = c(a, u);
|
|
61
|
-
return
|
|
61
|
+
return f(o, d);
|
|
62
62
|
}
|
|
63
63
|
function i(a) {
|
|
64
64
|
var d;
|
|
@@ -79,9 +79,9 @@ function G(e, t) {
|
|
|
79
79
|
function g(a) {
|
|
80
80
|
r = a;
|
|
81
81
|
}
|
|
82
|
-
return { getSchemaByType: C, resolveSchemaWithDefaultValue: i, resolveSchemaToProps:
|
|
82
|
+
return { getSchemaByType: C, resolveSchemaWithDefaultValue: i, resolveSchemaToProps: p, mappingSchemaToProps: f, setDesignerContext: g };
|
|
83
83
|
}
|
|
84
|
-
const W = {}, Y = {}, { resolveSchemaWithDefaultValue: ye, resolveSchemaToProps: be, mappingSchemaToProps: Ce } = G(W, Y);
|
|
84
|
+
const W = {}, Y = {}, { getSchemaByType: Nt, resolveSchemaWithDefaultValue: ye, resolveSchemaToProps: be, mappingSchemaToProps: Ce, setDesignerContext: jt } = G(W, Y);
|
|
85
85
|
function he(e = {}) {
|
|
86
86
|
function t(i, g, a, u) {
|
|
87
87
|
if (typeof a == "number")
|
|
@@ -127,28 +127,28 @@ function he(e = {}) {
|
|
|
127
127
|
}
|
|
128
128
|
return !1;
|
|
129
129
|
}
|
|
130
|
-
function
|
|
130
|
+
function f(i, g) {
|
|
131
131
|
return C(i).reduce((d, o) => d && c(o, g), !0);
|
|
132
132
|
}
|
|
133
|
-
function
|
|
134
|
-
const a = Object.keys(i), u = a.includes("allOf"), d = a.includes("anyOf"), o = u || d, m = (o ? i[o ? u ? "allOf" : "anyOf" : "allOf"] : [i]).map((
|
|
133
|
+
function p(i, g) {
|
|
134
|
+
const a = Object.keys(i), u = a.includes("allOf"), d = a.includes("anyOf"), o = u || d, m = (o ? i[o ? u ? "allOf" : "anyOf" : "allOf"] : [i]).map((P) => f(P, g));
|
|
135
135
|
return u ? !m.includes(!1) : m.includes(!0);
|
|
136
136
|
}
|
|
137
|
-
return { parseValueSchema:
|
|
137
|
+
return { parseValueSchema: p };
|
|
138
138
|
}
|
|
139
139
|
const Te = {
|
|
140
140
|
convertTo: (e, t, r, s) => {
|
|
141
141
|
e.appearance || (e.appearance = {}), e.appearance[t] = r;
|
|
142
142
|
},
|
|
143
143
|
convertFrom: (e, t, r) => e.appearance ? e.appearance[t] : e[t]
|
|
144
|
-
}, Ve = {
|
|
145
|
-
convertFrom: (e, t, r) => e.buttons && e.buttons.length ? `共 ${e.buttons.length} 项` : "无"
|
|
146
144
|
}, xe = {
|
|
145
|
+
convertFrom: (e, t, r) => e.buttons && e.buttons.length ? `共 ${e.buttons.length} 项` : "无"
|
|
146
|
+
}, Pe = {
|
|
147
147
|
convertTo: (e, t, r, s) => {
|
|
148
148
|
e.editor && (e.editor[t] = r);
|
|
149
149
|
},
|
|
150
150
|
convertFrom: (e, t, r) => e.editor && Object.prototype.hasOwnProperty.call(e.editor, t) ? e.editor[t] : e[t]
|
|
151
|
-
},
|
|
151
|
+
}, Ve = {
|
|
152
152
|
button: { type: "button", name: "按钮" },
|
|
153
153
|
"response-toolbar": { type: "response-toolbar", name: "工具栏" },
|
|
154
154
|
"response-toolbar-item": { type: "response-toolbar-item", name: "按钮" },
|
|
@@ -199,7 +199,7 @@ const Te = {
|
|
|
199
199
|
convertFrom: (e, t, r) => {
|
|
200
200
|
var v;
|
|
201
201
|
const s = e.editor && e.editor[t] ? e.editor[t] : e[t];
|
|
202
|
-
return ((v =
|
|
202
|
+
return ((v = Ve[s]) == null ? void 0 : v.name) || s;
|
|
203
203
|
}
|
|
204
204
|
}, we = {
|
|
205
205
|
convertTo: (e, t, r, s) => {
|
|
@@ -324,14 +324,14 @@ const Te = {
|
|
|
324
324
|
var s, v;
|
|
325
325
|
return t === "showCheckbox" ? (s = e.selection) != null && s.multiSelect ? !0 : (v = e.selection) == null ? void 0 : v.showCheckbox : e.selection ? e.selection[t] : e[t];
|
|
326
326
|
}
|
|
327
|
-
}, Ae = {
|
|
328
|
-
convertFrom: (e, t, r) => e[t] && e[t].length ? `共 ${e[t].length} 项` : ""
|
|
329
327
|
}, De = {
|
|
328
|
+
convertFrom: (e, t, r) => e[t] && e[t].length ? `共 ${e[t].length} 项` : ""
|
|
329
|
+
}, Be = {
|
|
330
330
|
convertFrom: (e, t) => e[t] || "",
|
|
331
331
|
convertTo: (e, t, r) => {
|
|
332
332
|
e[t] = r;
|
|
333
333
|
}
|
|
334
|
-
},
|
|
334
|
+
}, Ae = {
|
|
335
335
|
convertTo: (e, t, r, s) => {
|
|
336
336
|
e.size || (e.size = {}), e.size[t] = r;
|
|
337
337
|
},
|
|
@@ -380,9 +380,9 @@ const Te = {
|
|
|
380
380
|
function H(e, t, r) {
|
|
381
381
|
const s = /* @__PURE__ */ new Map([
|
|
382
382
|
["/converter/appearance.converter", Te],
|
|
383
|
-
["/converter/buttons.converter",
|
|
384
|
-
["/converter/property-editor.converter",
|
|
385
|
-
["/converter/items-count.converter",
|
|
383
|
+
["/converter/buttons.converter", xe],
|
|
384
|
+
["/converter/property-editor.converter", Pe],
|
|
385
|
+
["/converter/items-count.converter", De],
|
|
386
386
|
["/converter/type.converter", Se],
|
|
387
387
|
["/converter/change-editor.converter", we],
|
|
388
388
|
["/converter/change-formatter.converter", Fe],
|
|
@@ -390,12 +390,12 @@ function H(e, t, r) {
|
|
|
390
390
|
["/converter/column-option.converter", Oe],
|
|
391
391
|
["/converter/summary.converter", Ee],
|
|
392
392
|
["/converter/group.converter", Ne],
|
|
393
|
-
["/converter/form-group-label.converter",
|
|
393
|
+
["/converter/form-group-label.converter", Be],
|
|
394
394
|
["/converter/field-selector.converter", je],
|
|
395
395
|
["/converter/pagination.converter", Re],
|
|
396
396
|
["/converter/row-number.converter", ke],
|
|
397
397
|
["/converter/grid-selection.converter", $e],
|
|
398
|
-
["/converter/size.converter",
|
|
398
|
+
["/converter/size.converter", Ae],
|
|
399
399
|
["/converter/change-formatter-enum.converter", Le],
|
|
400
400
|
["/converter/grid-sort.converter", Ie],
|
|
401
401
|
["/converter/grid-filter.converter", Ue],
|
|
@@ -428,34 +428,34 @@ function H(e, t, r) {
|
|
|
428
428
|
function c(o, n) {
|
|
429
429
|
return () => C.parseValueSchema(o, n);
|
|
430
430
|
}
|
|
431
|
-
function
|
|
431
|
+
function f(o, n, l) {
|
|
432
432
|
return o.includes("visible") && n.visible !== void 0 ? typeof n.visible == "boolean" ? () => !!n.visible : n.visible === void 0 ? !0 : c(n.visible, l) : () => !0;
|
|
433
433
|
}
|
|
434
|
-
function
|
|
434
|
+
function p(o, n, l) {
|
|
435
435
|
return o.includes("readonly") && n.readonly !== void 0 ? typeof n.readonly == "boolean" ? () => !!n.readonly : c(n.readonly, l) : () => !1;
|
|
436
436
|
}
|
|
437
437
|
function i(o, n) {
|
|
438
438
|
const l = o.$converter || n;
|
|
439
439
|
return typeof l == "string" && l && s.has(l) ? s.get(l) || null : l || null;
|
|
440
440
|
}
|
|
441
|
-
function g(o, n, l, m, b,
|
|
442
|
-
return Object.keys(o).map((
|
|
443
|
-
const F = T(1), M =
|
|
441
|
+
function g(o, n, l, m, b, P = "", h = "") {
|
|
442
|
+
return Object.keys(o).map((x) => {
|
|
443
|
+
const F = T(1), M = x, y = o[x], w = Object.keys(y), k = y.title, j = y.type, R = v.get(j) || { type: "input-group", enableClear: !1 }, N = y.editor ? Object.assign({}, R, y.editor) : Object.assign({}, R), L = f(w, y, n), $ = p(w, y, n);
|
|
444
444
|
N.readonly = N.readonly === void 0 ? $() : N.readonly;
|
|
445
|
-
const I = y.type === "cascade" ? g(y.properties, n, l, m, b,
|
|
445
|
+
const I = y.type === "cascade" ? g(y.properties, n, l, m, b, P, h) : [], ne = !0;
|
|
446
446
|
let O = i(y, h);
|
|
447
|
-
const re =
|
|
447
|
+
const re = B({
|
|
448
448
|
get() {
|
|
449
449
|
if (F.value) {
|
|
450
450
|
if (["class", "style"].find((le) => le === M) && !O && (O = s.get("/converter/appearance.converter") || null), O && O.convertFrom)
|
|
451
|
-
return O.convertFrom(l,
|
|
452
|
-
const E = l[
|
|
451
|
+
return O.convertFrom(l, x, b, P);
|
|
452
|
+
const E = l[x];
|
|
453
453
|
return Object.prototype.hasOwnProperty.call(y, "defaultValue") && (E === void 0 || typeof E == "string" && E === "") ? y.type === "boolean" ? y.defaultValue : y.defaultValue || "" : E;
|
|
454
454
|
}
|
|
455
455
|
return null;
|
|
456
456
|
},
|
|
457
457
|
set(E) {
|
|
458
|
-
F.value += 1, O && O.convertTo ? (O.convertTo(m,
|
|
458
|
+
F.value += 1, O && O.convertTo ? (O.convertTo(m, x, E, b, P), O.convertTo(l, x, E, b, P)) : (m[x] = E, l[x] = E);
|
|
459
459
|
}
|
|
460
460
|
}), { refreshPanelAfterChanged: oe, description: ie, isExpand: ae, parentPropertyID: se } = y, q = { propertyID: M, propertyName: k, propertyType: j, propertyValue: re, editor: N, visible: L, readonly: $, cascadeConfig: I, hideCascadeTitle: ne, refreshPanelAfterChanged: oe, description: ie, isExpand: ae, parentPropertyID: se };
|
|
461
461
|
return n[M] = q, q;
|
|
@@ -464,12 +464,12 @@ function H(e, t, r) {
|
|
|
464
464
|
function a(o, n, l = {}) {
|
|
465
465
|
const m = {}, b = e[o];
|
|
466
466
|
return b && b.categories ? Object.keys(b.categories).map((h) => {
|
|
467
|
-
const S = b.categories[h],
|
|
468
|
-
return { categoryId: h, categoryName:
|
|
467
|
+
const S = b.categories[h], x = S == null ? void 0 : S.title, F = g(S.properties || {}, m, {}, l, n);
|
|
468
|
+
return { categoryId: h, categoryName: x, properties: F };
|
|
469
469
|
}) : [];
|
|
470
470
|
}
|
|
471
471
|
function u(o, n, l, m, b = "") {
|
|
472
|
-
const
|
|
472
|
+
const P = n.$ref.schema, h = n.$ref.converter, S = l[P], x = S.type, F = r(S), M = {}, y = e[x];
|
|
473
473
|
if (y && y.categories) {
|
|
474
474
|
const w = y.categories[o], k = w == null ? void 0 : w.title;
|
|
475
475
|
h && Object.keys(w.properties).forEach((N) => {
|
|
@@ -481,12 +481,12 @@ function H(e, t, r) {
|
|
|
481
481
|
return { categoryId: o, categoryName: "", properties: [] };
|
|
482
482
|
}
|
|
483
483
|
function d(o, n, l, m, b) {
|
|
484
|
-
const
|
|
485
|
-
let
|
|
486
|
-
if (
|
|
484
|
+
const P = o.type, h = r(o), S = {};
|
|
485
|
+
let x = b || e[P];
|
|
486
|
+
if (x && Object.keys(x).length === 0 && l && l.getPropConfig && (x = l.getPropConfig(m)), x && x.categories) {
|
|
487
487
|
const F = [];
|
|
488
|
-
return Object.keys(
|
|
489
|
-
const y =
|
|
488
|
+
return Object.keys(x.categories).map((M) => {
|
|
489
|
+
const y = x.categories[M];
|
|
490
490
|
if (y.$ref) {
|
|
491
491
|
F.push(u(M, y, o, n, m));
|
|
492
492
|
return;
|
|
@@ -505,14 +505,14 @@ function H(e, t, r) {
|
|
|
505
505
|
}
|
|
506
506
|
const J = {}, Q = {};
|
|
507
507
|
H(J, Q, ye);
|
|
508
|
-
const X = {}, Z = {}, { resolveSchemaWithDefaultValue: ze } = G(X, Z), K = {}, ee = {};
|
|
508
|
+
const X = {}, Z = {}, { getSchemaByType: Rt, resolveSchemaWithDefaultValue: ze, resolveSchemaToProps: kt, mappingSchemaToProps: $t, setDesignerContext: Dt } = G(X, Z), K = {}, ee = {};
|
|
509
509
|
H(K, ee, ze);
|
|
510
|
-
function _e(e, t, r = /* @__PURE__ */ new Map(), s = (c,
|
|
511
|
-
return W[t.title] = t, Y[t.title] = s, J[t.title] = v, Q[t.title] = C, X[t.title] = t, Z[t.title] = s, K[t.title] = v, ee[t.title] = C, (c = {},
|
|
512
|
-
if (!
|
|
510
|
+
function _e(e, t, r = /* @__PURE__ */ new Map(), s = (c, f, p, i) => f, v = {}, C = (c) => c) {
|
|
511
|
+
return W[t.title] = t, Y[t.title] = s, J[t.title] = v, Q[t.title] = C, X[t.title] = t, Z[t.title] = s, K[t.title] = v, ee[t.title] = C, (c = {}, f = !0) => {
|
|
512
|
+
if (!f)
|
|
513
513
|
return Ce(c, r);
|
|
514
|
-
const
|
|
515
|
-
return Object.assign(i,
|
|
514
|
+
const p = be(c, t, r), i = Object.keys(e).reduce((g, a) => (g[a] = e[a].default, g), {});
|
|
515
|
+
return Object.assign(i, p);
|
|
516
516
|
};
|
|
517
517
|
}
|
|
518
518
|
function Ge(e, t) {
|
|
@@ -686,14 +686,14 @@ const He = "https://json-schema.org/draft/2020-12/schema", Je = "https://farris-
|
|
|
686
686
|
}, ct = {
|
|
687
687
|
/** 状态机列表 */
|
|
688
688
|
stateMachines: { type: Array, default: [] }
|
|
689
|
-
},
|
|
689
|
+
}, pt = {}, ft = {
|
|
690
690
|
expressionConfig: { type: Object, default: {} }
|
|
691
691
|
}, te = {
|
|
692
692
|
...lt,
|
|
693
693
|
...ut,
|
|
694
|
-
...ft,
|
|
695
|
-
...ct,
|
|
696
694
|
...pt,
|
|
695
|
+
...ct,
|
|
696
|
+
...ft,
|
|
697
697
|
id: { Type: String, default: "" },
|
|
698
698
|
modelValue: { type: [Number, String, Boolean, Object] },
|
|
699
699
|
/** 属性类型列表 */
|
|
@@ -702,10 +702,10 @@ const He = "https://json-schema.org/draft/2020-12/schema", Je = "https://farris-
|
|
|
702
702
|
function mt(e, t, r) {
|
|
703
703
|
const s = T(!1), v = T(e.constType), C = T(e.constEnums), {
|
|
704
704
|
getPropertyValue: c,
|
|
705
|
-
triggerValueChange:
|
|
706
|
-
} = r,
|
|
705
|
+
triggerValueChange: f
|
|
706
|
+
} = r, p = c("Const"), i = B(() => (n) => n === v.value);
|
|
707
707
|
function g(n) {
|
|
708
|
-
|
|
708
|
+
f(n);
|
|
709
709
|
}
|
|
710
710
|
function a(n) {
|
|
711
711
|
g(n);
|
|
@@ -717,19 +717,19 @@ function mt(e, t, r) {
|
|
|
717
717
|
g(l);
|
|
718
718
|
}
|
|
719
719
|
function d() {
|
|
720
|
-
return
|
|
720
|
+
return V(de, {
|
|
721
721
|
nullable: !0,
|
|
722
722
|
readonly: s.value,
|
|
723
|
-
modelValue:
|
|
724
|
-
"onUpdate:modelValue": (n) =>
|
|
723
|
+
modelValue: p.value,
|
|
724
|
+
"onUpdate:modelValue": (n) => p.value = n,
|
|
725
725
|
onChange: a
|
|
726
726
|
}, null);
|
|
727
727
|
}
|
|
728
728
|
function o() {
|
|
729
|
-
return
|
|
729
|
+
return V(A, {
|
|
730
730
|
key: "const-combo-list",
|
|
731
|
-
modelValue:
|
|
732
|
-
"onUpdate:modelValue": (n) =>
|
|
731
|
+
modelValue: p.value,
|
|
732
|
+
"onUpdate:modelValue": (n) => p.value = n,
|
|
733
733
|
placeholder: "",
|
|
734
734
|
viewType: "text",
|
|
735
735
|
enableClear: !1,
|
|
@@ -741,12 +741,12 @@ function mt(e, t, r) {
|
|
|
741
741
|
onChange: u
|
|
742
742
|
}, null);
|
|
743
743
|
}
|
|
744
|
-
return () =>
|
|
744
|
+
return () => V("div", {
|
|
745
745
|
class: "f-property-editor-const-container"
|
|
746
746
|
}, [i.value("number") && d(), i.value("enum") && o()]);
|
|
747
747
|
}
|
|
748
748
|
function vt(e, t, r) {
|
|
749
|
-
const s = T(e.newVariablePrefix), v = T(e.newVariableType), C = T(e.id), c = T(e.controlName),
|
|
749
|
+
const s = T(e.newVariablePrefix), v = T(e.newVariableType), C = T(e.id), c = T(e.controlName), f = T(e.variables), { getPropertyValue: p } = r;
|
|
750
750
|
function i(n) {
|
|
751
751
|
return n[0].toUpperCase() + n.slice(1);
|
|
752
752
|
}
|
|
@@ -771,10 +771,10 @@ function vt(e, t, r) {
|
|
|
771
771
|
};
|
|
772
772
|
}
|
|
773
773
|
function d(n) {
|
|
774
|
-
return
|
|
774
|
+
return f.value.find((m) => m.path === n);
|
|
775
775
|
}
|
|
776
776
|
function o() {
|
|
777
|
-
const n =
|
|
777
|
+
const n = p("Variable");
|
|
778
778
|
return n.value || (n.value = {
|
|
779
779
|
type: "Variable",
|
|
780
780
|
field: "",
|
|
@@ -786,12 +786,12 @@ function vt(e, t, r) {
|
|
|
786
786
|
}
|
|
787
787
|
function gt(e, t, r) {
|
|
788
788
|
const s = T(!1), v = T(e.variables), C = T(e.controlName), c = T(!!C.value), {
|
|
789
|
-
generateVariable:
|
|
790
|
-
getVariableByPath:
|
|
789
|
+
generateVariable: f,
|
|
790
|
+
getVariableByPath: p,
|
|
791
791
|
getVariableValue: i
|
|
792
792
|
} = vt(e, t, r), {
|
|
793
793
|
triggerValueChange: g
|
|
794
|
-
} = r, a = i(), u = T(a.value.field), d =
|
|
794
|
+
} = r, a = i(), u = T(a.value.field), d = B(() => [{
|
|
795
795
|
"form-control-select-show": c.value
|
|
796
796
|
}, {
|
|
797
797
|
"form-control-select-hide": !c.value
|
|
@@ -806,22 +806,23 @@ function gt(e, t, r) {
|
|
|
806
806
|
}), u.value = a.value.field, g(a.value);
|
|
807
807
|
}
|
|
808
808
|
function n() {
|
|
809
|
-
const h =
|
|
809
|
+
const h = f(), S = p(h.path);
|
|
810
810
|
S ? o(S) : (v.value.push(h), o(h));
|
|
811
811
|
}
|
|
812
812
|
const l = () => (t.emit("beforeOpenVariables", v), Promise.resolve(!0));
|
|
813
813
|
function m(h) {
|
|
814
814
|
if (!h || h.length < 1)
|
|
815
815
|
return;
|
|
816
|
-
const S = h[0],
|
|
816
|
+
const S = h[0], x = {
|
|
817
817
|
path: S.path,
|
|
818
818
|
fullPath: S.fullPath,
|
|
819
|
-
field: S.field
|
|
819
|
+
field: S.field,
|
|
820
|
+
type: "Variable"
|
|
820
821
|
};
|
|
821
|
-
o(
|
|
822
|
+
o(x);
|
|
822
823
|
}
|
|
823
824
|
function b() {
|
|
824
|
-
return
|
|
825
|
+
return V(A, {
|
|
825
826
|
key: "variable-combo-list",
|
|
826
827
|
class: d.value,
|
|
827
828
|
modelValue: u.value,
|
|
@@ -839,28 +840,28 @@ function gt(e, t, r) {
|
|
|
839
840
|
onChange: m
|
|
840
841
|
}, null);
|
|
841
842
|
}
|
|
842
|
-
function
|
|
843
|
-
return
|
|
843
|
+
function P() {
|
|
844
|
+
return V("div", {
|
|
844
845
|
class: "f-property-editor-variable-add-button"
|
|
845
|
-
}, [
|
|
846
|
+
}, [V("button", {
|
|
846
847
|
title: "新增变量",
|
|
847
848
|
class: "f-variable-button",
|
|
848
849
|
onClick: n
|
|
849
|
-
}, [
|
|
850
|
+
}, [V("span", {
|
|
850
851
|
class: "f-icon f-icon-add",
|
|
851
852
|
style: "margin:unset;"
|
|
852
853
|
}, null)])]);
|
|
853
854
|
}
|
|
854
|
-
return () =>
|
|
855
|
+
return () => V("div", {
|
|
855
856
|
class: "f-property-editor-variable-container"
|
|
856
|
-
}, [b(), c.value &&
|
|
857
|
+
}, [b(), c.value && P()]);
|
|
857
858
|
}
|
|
858
859
|
function yt(e, t, r) {
|
|
859
860
|
const s = /^(?:(!)?)viewModel\.stateMachine\['([^']+)'\]$/, { getPropertyValue: v } = r;
|
|
860
|
-
function C(
|
|
861
|
-
if (!(typeof
|
|
861
|
+
function C(f) {
|
|
862
|
+
if (!(typeof f.value == "string"))
|
|
862
863
|
return;
|
|
863
|
-
const i =
|
|
864
|
+
const i = f.value.match(s);
|
|
864
865
|
if (!i || i.length < 3)
|
|
865
866
|
return;
|
|
866
867
|
const a = {
|
|
@@ -868,15 +869,15 @@ function yt(e, t, r) {
|
|
|
868
869
|
status: i[1] !== "!",
|
|
869
870
|
field: i[2]
|
|
870
871
|
};
|
|
871
|
-
|
|
872
|
+
f.value = a, r.triggerValueChange(a);
|
|
872
873
|
}
|
|
873
874
|
function c() {
|
|
874
|
-
const
|
|
875
|
-
return
|
|
875
|
+
const f = v("StateMachine");
|
|
876
|
+
return f.value ? (C(f), f) : (f.value = {
|
|
876
877
|
type: "StateMachine",
|
|
877
878
|
field: "",
|
|
878
879
|
status: !1
|
|
879
|
-
},
|
|
880
|
+
}, f);
|
|
880
881
|
}
|
|
881
882
|
return { getStateMachineValue: c };
|
|
882
883
|
}
|
|
@@ -885,29 +886,29 @@ function bt(e, t, r) {
|
|
|
885
886
|
getStateMachineValue: C
|
|
886
887
|
} = yt(e, t, r), {
|
|
887
888
|
triggerValueChange: c
|
|
888
|
-
} = r,
|
|
889
|
+
} = r, f = C(), p = T(f.value.field), i = T(f.value.status);
|
|
889
890
|
function g() {
|
|
890
|
-
i.value = !i.value,
|
|
891
|
+
i.value = !i.value, f.value.status = i.value, c(f.value);
|
|
891
892
|
}
|
|
892
893
|
function a(o) {
|
|
893
894
|
if (!o || o.length < 1)
|
|
894
895
|
return;
|
|
895
896
|
const n = o[0];
|
|
896
|
-
|
|
897
|
+
f.value.field = n.id, c(f.value);
|
|
897
898
|
}
|
|
898
899
|
function u() {
|
|
899
|
-
return
|
|
900
|
+
return V("div", {
|
|
900
901
|
class: "f-stateMachine-status",
|
|
901
902
|
onClick: g
|
|
902
903
|
}, [i.value ? "是" : "非"]);
|
|
903
904
|
}
|
|
904
905
|
function d() {
|
|
905
|
-
return
|
|
906
|
+
return V("div", {
|
|
906
907
|
class: "f-stateMachine-combo-list"
|
|
907
|
-
}, [
|
|
908
|
+
}, [V(A, {
|
|
908
909
|
key: "state-machine-combo-list",
|
|
909
|
-
modelValue:
|
|
910
|
-
"onUpdate:modelValue": (o) =>
|
|
910
|
+
modelValue: p.value,
|
|
911
|
+
"onUpdate:modelValue": (o) => p.value = o,
|
|
911
912
|
placeholder: "",
|
|
912
913
|
viewType: "text",
|
|
913
914
|
enableClear: !1,
|
|
@@ -919,7 +920,7 @@ function bt(e, t, r) {
|
|
|
919
920
|
onChange: a
|
|
920
921
|
}, null)]);
|
|
921
922
|
}
|
|
922
|
-
return () =>
|
|
923
|
+
return () => V("div", {
|
|
923
924
|
class: "f-property-editor-stateMachine-container"
|
|
924
925
|
}, [u(), d()]);
|
|
925
926
|
}
|
|
@@ -928,37 +929,37 @@ function Ct(e, t, r) {
|
|
|
928
929
|
getPropertyValue: v,
|
|
929
930
|
triggerValueChange: C
|
|
930
931
|
} = r, c = v("Custom");
|
|
931
|
-
function p
|
|
932
|
-
const i =
|
|
932
|
+
function f(p) {
|
|
933
|
+
const i = p.target.value;
|
|
933
934
|
C(i);
|
|
934
935
|
}
|
|
935
|
-
return () =>
|
|
936
|
+
return () => V("div", {
|
|
936
937
|
class: "f-property-editor-customize-container"
|
|
937
|
-
}, [ue(
|
|
938
|
+
}, [ue(V("input", {
|
|
938
939
|
class: "form-control",
|
|
939
940
|
placeholder: "输入自定义内容",
|
|
940
|
-
"onUpdate:modelValue": (
|
|
941
|
-
onChange:
|
|
941
|
+
"onUpdate:modelValue": (p) => c.value = p,
|
|
942
|
+
onChange: f,
|
|
942
943
|
disabled: s.value
|
|
943
944
|
}, null), [[ce, c.value]])]);
|
|
944
945
|
}
|
|
945
946
|
function ht(e, t, r) {
|
|
946
947
|
const { getPropertyValue: s } = r, v = e.id;
|
|
947
|
-
function C(
|
|
948
|
-
return
|
|
948
|
+
function C(p) {
|
|
949
|
+
return p + "_" + v;
|
|
949
950
|
}
|
|
950
|
-
function c(
|
|
951
|
+
function c(p) {
|
|
951
952
|
return {
|
|
952
953
|
type: "Expression",
|
|
953
|
-
expressionId: C((
|
|
954
|
-
expressionInfo:
|
|
954
|
+
expressionId: C((p == null ? void 0 : p.targetId) || ""),
|
|
955
|
+
expressionInfo: p
|
|
955
956
|
};
|
|
956
957
|
}
|
|
957
|
-
function
|
|
958
|
-
const { expressionInfo:
|
|
959
|
-
return i.value ? (i.value.expressionInfo =
|
|
958
|
+
function f() {
|
|
959
|
+
const { expressionInfo: p = { value: "", targetId: "", targetType: "", expressionType: "" } } = e.expressionConfig, i = s("Expression");
|
|
960
|
+
return i.value ? (i.value.expressionInfo = p, i.value.expressionId = C(p == null ? void 0 : p.targetId), i) : (i.value = c(p), i);
|
|
960
961
|
}
|
|
961
|
-
return { getExpressionValue:
|
|
962
|
+
return { getExpressionValue: f };
|
|
962
963
|
}
|
|
963
964
|
function Tt(e, t, r) {
|
|
964
965
|
const s = T(!1), {
|
|
@@ -968,10 +969,10 @@ function Tt(e, t, r) {
|
|
|
968
969
|
} = ht(e, t, r);
|
|
969
970
|
let c = C();
|
|
970
971
|
const {
|
|
971
|
-
expressionInfo:
|
|
972
|
-
} = c.value,
|
|
972
|
+
expressionInfo: f
|
|
973
|
+
} = c.value, p = T(f.value), i = T(f.message), g = T(e.expressionConfig);
|
|
973
974
|
_(() => [e.expressionConfig], () => {
|
|
974
|
-
g.value = e.expressionConfig, c = C(),
|
|
975
|
+
g.value = e.expressionConfig, c = C(), p.value = c.value.expressionInfo.value;
|
|
975
976
|
});
|
|
976
977
|
function a({
|
|
977
978
|
expression: d,
|
|
@@ -988,11 +989,11 @@ function Tt(e, t, r) {
|
|
|
988
989
|
position: "top-center"
|
|
989
990
|
}), !1);
|
|
990
991
|
}
|
|
991
|
-
return () =>
|
|
992
|
+
return () => V("div", {
|
|
992
993
|
class: "f-property-editor-expression-container"
|
|
993
|
-
}, [
|
|
994
|
-
modelValue:
|
|
995
|
-
"onUpdate:modelValue": (d) =>
|
|
994
|
+
}, [V(ge, pe(g.value, {
|
|
995
|
+
modelValue: p.value,
|
|
996
|
+
"onUpdate:modelValue": (d) => p.value = d,
|
|
996
997
|
validateMessage: i.value,
|
|
997
998
|
enableClear: !1,
|
|
998
999
|
readonly: s.value,
|
|
@@ -1000,21 +1001,21 @@ function Tt(e, t, r) {
|
|
|
1000
1001
|
onSubmitModal: a
|
|
1001
1002
|
}), null)]);
|
|
1002
1003
|
}
|
|
1003
|
-
function
|
|
1004
|
+
function xt(e, t, r) {
|
|
1004
1005
|
const s = T(e.modelValue), v = /* @__PURE__ */ new Map();
|
|
1005
|
-
v.set(r, T(
|
|
1006
|
-
function C(
|
|
1007
|
-
t.emit("valueChange",
|
|
1006
|
+
v.set(r, T(D(s.value)));
|
|
1007
|
+
function C(p) {
|
|
1008
|
+
t.emit("valueChange", D(p));
|
|
1008
1009
|
}
|
|
1009
|
-
function c(
|
|
1010
|
-
const i = v.get(
|
|
1010
|
+
function c(p) {
|
|
1011
|
+
const i = v.get(p);
|
|
1011
1012
|
if (i)
|
|
1012
1013
|
return i;
|
|
1013
1014
|
const g = T();
|
|
1014
|
-
return v.set(
|
|
1015
|
+
return v.set(p, g), g;
|
|
1015
1016
|
}
|
|
1016
|
-
function p
|
|
1017
|
-
switch (
|
|
1017
|
+
function f(p, i) {
|
|
1018
|
+
switch (p) {
|
|
1018
1019
|
case "Const":
|
|
1019
1020
|
return i !== void 0;
|
|
1020
1021
|
case "Variable":
|
|
@@ -1027,9 +1028,9 @@ function Vt(e, t, r) {
|
|
|
1027
1028
|
return i && i.field;
|
|
1028
1029
|
}
|
|
1029
1030
|
}
|
|
1030
|
-
return { triggerValueChange: C, getPropertyValue: c, isPropertyValueValid:
|
|
1031
|
+
return { triggerValueChange: C, getPropertyValue: c, isPropertyValueValid: f };
|
|
1031
1032
|
}
|
|
1032
|
-
const
|
|
1033
|
+
const Pt = [
|
|
1033
1034
|
{
|
|
1034
1035
|
id: "Const",
|
|
1035
1036
|
name: "常量"
|
|
@@ -1051,20 +1052,20 @@ const xt = [
|
|
|
1051
1052
|
name: "表达式"
|
|
1052
1053
|
}
|
|
1053
1054
|
];
|
|
1054
|
-
function
|
|
1055
|
+
function Vt(e, t) {
|
|
1055
1056
|
const r = T(e.constType), s = T(e.constEnums), v = T(e.propertyTypes), C = T([]), c = T();
|
|
1056
|
-
function
|
|
1057
|
+
function f() {
|
|
1057
1058
|
const n = v.value;
|
|
1058
|
-
return C.value =
|
|
1059
|
+
return C.value = Pt.filter((l) => n.includes(l.id)), C;
|
|
1059
1060
|
}
|
|
1060
1061
|
_(() => [e.propertyTypes], () => {
|
|
1061
|
-
v.value = e.propertyTypes,
|
|
1062
|
+
v.value = e.propertyTypes, f();
|
|
1062
1063
|
});
|
|
1063
|
-
function
|
|
1064
|
+
function p(n) {
|
|
1064
1065
|
return typeof n != "string" ? !1 : /^(?:(!)?)viewModel\.stateMachine\['([^']+)'\]$/.test(n);
|
|
1065
1066
|
}
|
|
1066
1067
|
function i(n) {
|
|
1067
|
-
const l = v.value, m = l.includes("Const") && r.value === "enum" && s.value.findIndex((
|
|
1068
|
+
const l = v.value, m = l.includes("Const") && r.value === "enum" && s.value.findIndex((P) => P.id === n) > -1, b = l.includes("Const") && r.value === "number" && typeof n == "number";
|
|
1068
1069
|
return m || b;
|
|
1069
1070
|
}
|
|
1070
1071
|
function g(n) {
|
|
@@ -1077,7 +1078,7 @@ function Pt(e, t) {
|
|
|
1077
1078
|
function u(n) {
|
|
1078
1079
|
const l = /* @__PURE__ */ new Map([
|
|
1079
1080
|
["Const", i],
|
|
1080
|
-
["StateMachine",
|
|
1081
|
+
["StateMachine", p],
|
|
1081
1082
|
["Custom", g]
|
|
1082
1083
|
]);
|
|
1083
1084
|
for (const [m, b] of l.entries())
|
|
@@ -1091,9 +1092,9 @@ function Pt(e, t) {
|
|
|
1091
1092
|
function o() {
|
|
1092
1093
|
return c.value || (c.value = d()), c;
|
|
1093
1094
|
}
|
|
1094
|
-
return { getAllowedPropertyTypeItems:
|
|
1095
|
+
return { getAllowedPropertyTypeItems: f, getCurrentPropertyType: o };
|
|
1095
1096
|
}
|
|
1096
|
-
const U = /* @__PURE__ */
|
|
1097
|
+
const U = /* @__PURE__ */ fe({
|
|
1097
1098
|
name: "FPropertyEditor",
|
|
1098
1099
|
props: te,
|
|
1099
1100
|
emits: ["valueChange", "beforeOpenVariables"],
|
|
@@ -1101,22 +1102,22 @@ const U = /* @__PURE__ */ pe({
|
|
|
1101
1102
|
const r = T(!1), {
|
|
1102
1103
|
getAllowedPropertyTypeItems: s,
|
|
1103
1104
|
getCurrentPropertyType: v
|
|
1104
|
-
} =
|
|
1105
|
-
getPropertyValue:
|
|
1105
|
+
} = Vt(e), C = s(), c = v(), f = xt(e, t, c.value), {
|
|
1106
|
+
getPropertyValue: p,
|
|
1106
1107
|
triggerValueChange: i,
|
|
1107
1108
|
isPropertyValueValid: g
|
|
1108
|
-
} =
|
|
1109
|
+
} = f, a = mt(e, t, f), u = gt(e, t, f), d = Ct(e, t, f), o = bt(e, t, f), n = Tt(e, t, f), l = B(() => (h) => h === c.value);
|
|
1109
1110
|
t.expose({
|
|
1110
1111
|
currentPropertyType: c
|
|
1111
1112
|
});
|
|
1112
1113
|
function m() {
|
|
1113
|
-
const h =
|
|
1114
|
+
const h = p(c.value);
|
|
1114
1115
|
g(c.value, h.value) && i(h.value);
|
|
1115
1116
|
}
|
|
1116
1117
|
function b() {
|
|
1117
|
-
return
|
|
1118
|
+
return V("div", {
|
|
1118
1119
|
class: "f-property-editor-left"
|
|
1119
|
-
}, [
|
|
1120
|
+
}, [V(A, {
|
|
1120
1121
|
modelValue: c.value,
|
|
1121
1122
|
"onUpdate:modelValue": (h) => c.value = h,
|
|
1122
1123
|
placeholder: "",
|
|
@@ -1129,23 +1130,23 @@ const U = /* @__PURE__ */ pe({
|
|
|
1129
1130
|
onChange: m
|
|
1130
1131
|
}, null)]);
|
|
1131
1132
|
}
|
|
1132
|
-
function
|
|
1133
|
-
return
|
|
1133
|
+
function P() {
|
|
1134
|
+
return V("div", {
|
|
1134
1135
|
class: "f-property-editor-right"
|
|
1135
1136
|
}, [l.value("Const") && a(), l.value("Variable") && u(), l.value("Custom") && d(), l.value("StateMachine") && o(), l.value("Expression") && n()]);
|
|
1136
1137
|
}
|
|
1137
|
-
return () =>
|
|
1138
|
+
return () => V("div", {
|
|
1138
1139
|
class: "f-property-editor-container clearfix"
|
|
1139
|
-
}, [b(),
|
|
1140
|
+
}, [b(), P()]);
|
|
1140
1141
|
}
|
|
1141
1142
|
});
|
|
1142
1143
|
U.register = (e, t, r, s) => {
|
|
1143
1144
|
e["property-editor"] = U, t["property-editor"] = dt;
|
|
1144
1145
|
};
|
|
1145
|
-
const
|
|
1146
|
+
const Bt = ve(U);
|
|
1146
1147
|
export {
|
|
1147
1148
|
U as FPropertyEditor,
|
|
1148
|
-
|
|
1149
|
+
Bt as default,
|
|
1149
1150
|
te as propertyEditorProps,
|
|
1150
1151
|
dt as propsResolver
|
|
1151
1152
|
};
|