@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,8 +1,8 @@
|
|
|
1
|
-
import { ref as P, computed as N, defineComponent as Q, watch as _, onMounted as G, createVNode as V, nextTick as U, inject as
|
|
2
|
-
import {
|
|
1
|
+
import { ref as P, computed as N, defineComponent as Q, watch as _, onMounted as G, createVNode as V, nextTick as U, inject as ve } from "vue";
|
|
2
|
+
import { cloneDeep as Z, isPlainObject as H } from "lodash-es";
|
|
3
3
|
import { getSchemaByTypeForDesigner as de } from "../dynamic-resolver/index.esm.js";
|
|
4
4
|
import { withInstall as be } from "../common/index.esm.js";
|
|
5
|
-
const ye = "https://json-schema.org/draft/2020-12/schema", ge = "https://farris-design.gitee.io/capsule.schema.json", he = "capsule", Se = "A Farris Component",
|
|
5
|
+
const ye = "https://json-schema.org/draft/2020-12/schema", ge = "https://farris-design.gitee.io/capsule.schema.json", he = "capsule", Se = "A Farris Component", Te = "object", Oe = {
|
|
6
6
|
id: {
|
|
7
7
|
description: "The unique identifier for a capsule",
|
|
8
8
|
type: "string"
|
|
@@ -72,48 +72,48 @@ const ye = "https://json-schema.org/draft/2020-12/schema", ge = "https://farris-
|
|
|
72
72
|
$id: ge,
|
|
73
73
|
title: he,
|
|
74
74
|
description: Se,
|
|
75
|
-
type:
|
|
76
|
-
properties:
|
|
75
|
+
type: Te,
|
|
76
|
+
properties: Oe,
|
|
77
77
|
required: Fe
|
|
78
78
|
};
|
|
79
79
|
function x(e, t) {
|
|
80
80
|
let r;
|
|
81
81
|
function c(i) {
|
|
82
|
-
const { properties: s, title:
|
|
83
|
-
if (
|
|
84
|
-
const d =
|
|
82
|
+
const { properties: s, title: v, ignore: a } = i, o = a && Array.isArray(a), l = Object.keys(s).reduce((d, g) => ((!o || !a.find((M) => M === g)) && (d[g] = s[g].type === "object" && s[g].properties ? c(s[g]) : Z(s[g].default)), d), {});
|
|
83
|
+
if (v && (!o || !a.find((d) => d === "id"))) {
|
|
84
|
+
const d = v.toLowerCase().replace(/-/g, "_");
|
|
85
85
|
l.id = `${d}_${Math.random().toString().slice(2, 6)}`;
|
|
86
86
|
}
|
|
87
87
|
return l;
|
|
88
88
|
}
|
|
89
|
-
function
|
|
90
|
-
const { properties: s, title:
|
|
89
|
+
function T(i) {
|
|
90
|
+
const { properties: s, title: v, required: a } = i;
|
|
91
91
|
if (a && Array.isArray(a)) {
|
|
92
|
-
const o = a.reduce((l, d) => (l[d] = s[d].type === "object" && s[d].properties ? c(s[d]) :
|
|
93
|
-
if (
|
|
94
|
-
const l =
|
|
92
|
+
const o = a.reduce((l, d) => (l[d] = s[d].type === "object" && s[d].properties ? c(s[d]) : Z(s[d].default), l), {});
|
|
93
|
+
if (v && a.find((l) => l === "id")) {
|
|
94
|
+
const l = v.toLowerCase().replace(/-/g, "_");
|
|
95
95
|
o.id = `${l}_${Math.random().toString().slice(2, 6)}`;
|
|
96
96
|
}
|
|
97
97
|
return o;
|
|
98
98
|
}
|
|
99
99
|
return {
|
|
100
|
-
type:
|
|
100
|
+
type: v
|
|
101
101
|
};
|
|
102
102
|
}
|
|
103
|
-
function
|
|
103
|
+
function O(i, s = {}, v) {
|
|
104
104
|
const a = e[i];
|
|
105
105
|
if (a) {
|
|
106
|
-
let o =
|
|
106
|
+
let o = T(a);
|
|
107
107
|
const l = t[i];
|
|
108
|
-
return o = l ? l({ getSchemaByType:
|
|
108
|
+
return o = l ? l({ getSchemaByType: O }, o, s, v) : o, r != null && r.appendIdentifyForNewControl && r.appendIdentifyForNewControl(o), o;
|
|
109
109
|
}
|
|
110
110
|
return null;
|
|
111
111
|
}
|
|
112
112
|
function S(i, s) {
|
|
113
|
-
const
|
|
114
|
-
return Object.keys(
|
|
113
|
+
const v = c(s);
|
|
114
|
+
return Object.keys(v).reduce((a, o) => (Object.prototype.hasOwnProperty.call(i, o) && (a[o] && H(a[o]) && H(i[o] || !i[o]) ? Object.assign(a[o], i[o] || {}) : a[o] = i[o]), a), v), v;
|
|
115
115
|
}
|
|
116
|
-
function
|
|
116
|
+
function B(i, s) {
|
|
117
117
|
return Object.keys(i).filter((a) => i[a] != null).reduce((a, o) => {
|
|
118
118
|
if (s.has(o)) {
|
|
119
119
|
const l = s.get(o);
|
|
@@ -128,18 +128,18 @@ function x(e, t) {
|
|
|
128
128
|
return a;
|
|
129
129
|
}, {});
|
|
130
130
|
}
|
|
131
|
-
function
|
|
131
|
+
function A(i, s, v = /* @__PURE__ */ new Map()) {
|
|
132
132
|
const a = S(i, s);
|
|
133
|
-
return
|
|
133
|
+
return B(a, v);
|
|
134
134
|
}
|
|
135
|
-
function
|
|
136
|
-
var
|
|
135
|
+
function m(i) {
|
|
136
|
+
var v;
|
|
137
137
|
const s = i.type;
|
|
138
138
|
if (s) {
|
|
139
139
|
const a = e[s];
|
|
140
140
|
if (!a)
|
|
141
141
|
return i;
|
|
142
|
-
const o = S(i, a), l = ((
|
|
142
|
+
const o = S(i, a), l = ((v = i.editor) == null ? void 0 : v.type) || "";
|
|
143
143
|
if (l) {
|
|
144
144
|
const d = e[l], g = S(i.editor, d);
|
|
145
145
|
o.editor = g;
|
|
@@ -151,71 +151,71 @@ function x(e, t) {
|
|
|
151
151
|
function b(i) {
|
|
152
152
|
r = i;
|
|
153
153
|
}
|
|
154
|
-
return { getSchemaByType:
|
|
154
|
+
return { getSchemaByType: O, resolveSchemaWithDefaultValue: m, resolveSchemaToProps: A, mappingSchemaToProps: B, setDesignerContext: b };
|
|
155
155
|
}
|
|
156
|
-
const I = {}, K = {}, { resolveSchemaWithDefaultValue: je, resolveSchemaToProps: Pe, mappingSchemaToProps: Me } = x(I, K);
|
|
157
|
-
function
|
|
158
|
-
function t(
|
|
156
|
+
const I = {}, K = {}, { getSchemaByType: mt, resolveSchemaWithDefaultValue: je, resolveSchemaToProps: Pe, mappingSchemaToProps: Me, setDesignerContext: vt } = x(I, K);
|
|
157
|
+
function De(e = {}) {
|
|
158
|
+
function t(m, b, i, s) {
|
|
159
159
|
if (typeof i == "number")
|
|
160
|
-
return s[
|
|
160
|
+
return s[m].length === i;
|
|
161
161
|
if (typeof i == "object") {
|
|
162
|
-
const
|
|
163
|
-
if (
|
|
164
|
-
return Number(s[
|
|
165
|
-
if (
|
|
166
|
-
return Number(s[
|
|
167
|
-
if (
|
|
168
|
-
return Number(s[
|
|
162
|
+
const v = Object.keys(i)[0], a = i[v];
|
|
163
|
+
if (v === "not")
|
|
164
|
+
return Number(s[m].length) !== Number(a);
|
|
165
|
+
if (v === "moreThan")
|
|
166
|
+
return Number(s[m].length) >= Number(a);
|
|
167
|
+
if (v === "lessThan")
|
|
168
|
+
return Number(s[m].length) <= Number(a);
|
|
169
169
|
}
|
|
170
170
|
return !1;
|
|
171
171
|
}
|
|
172
|
-
function r(
|
|
173
|
-
return s[
|
|
172
|
+
function r(m, b, i, s) {
|
|
173
|
+
return s[m] && s[m].propertyValue && String(s[m].propertyValue.value) === String(i);
|
|
174
174
|
}
|
|
175
175
|
const c = /* @__PURE__ */ new Map([
|
|
176
176
|
["length", t],
|
|
177
177
|
["getProperty", r]
|
|
178
178
|
]);
|
|
179
|
-
Object.keys(e).reduce((
|
|
180
|
-
function
|
|
181
|
-
const i =
|
|
182
|
-
return typeof b == "number" ? [{ target: i, operator: "length", param: null, value: Number(b) }] : typeof b == "boolean" ? [{ target: i, operator: "getProperty", param:
|
|
179
|
+
Object.keys(e).reduce((m, b) => (m.set(b, e[b]), m), c);
|
|
180
|
+
function T(m, b) {
|
|
181
|
+
const i = m;
|
|
182
|
+
return typeof b == "number" ? [{ target: i, operator: "length", param: null, value: Number(b) }] : typeof b == "boolean" ? [{ target: i, operator: "getProperty", param: m, value: !!b }] : typeof b == "object" ? Object.keys(b).map((s) => {
|
|
183
183
|
if (s === "length")
|
|
184
184
|
return { target: i, operator: "length", param: null, value: b[s] };
|
|
185
|
-
const
|
|
186
|
-
return { target: i, operator: "getProperty", param:
|
|
185
|
+
const v = s, a = b[s];
|
|
186
|
+
return { target: i, operator: "getProperty", param: v, value: a };
|
|
187
187
|
}) : [];
|
|
188
188
|
}
|
|
189
|
-
function
|
|
190
|
-
return Object.keys(
|
|
191
|
-
const
|
|
192
|
-
return i.push(...
|
|
189
|
+
function O(m) {
|
|
190
|
+
return Object.keys(m).reduce((i, s) => {
|
|
191
|
+
const v = T(s, m[s]);
|
|
192
|
+
return i.push(...v), i;
|
|
193
193
|
}, []);
|
|
194
194
|
}
|
|
195
|
-
function S(
|
|
196
|
-
if (c.has(
|
|
197
|
-
const i = c.get(
|
|
198
|
-
return i && i(
|
|
195
|
+
function S(m, b) {
|
|
196
|
+
if (c.has(m.operator)) {
|
|
197
|
+
const i = c.get(m.operator);
|
|
198
|
+
return i && i(m.target, m.param, m.value, b) || !1;
|
|
199
199
|
}
|
|
200
200
|
return !1;
|
|
201
201
|
}
|
|
202
|
-
function
|
|
203
|
-
return
|
|
202
|
+
function B(m, b) {
|
|
203
|
+
return O(m).reduce((v, a) => v && S(a, b), !0);
|
|
204
204
|
}
|
|
205
|
-
function
|
|
206
|
-
const i = Object.keys(
|
|
205
|
+
function A(m, b) {
|
|
206
|
+
const i = Object.keys(m), s = i.includes("allOf"), v = i.includes("anyOf"), a = s || v, d = (a ? m[a ? s ? "allOf" : "anyOf" : "allOf"] : [m]).map((M) => B(M, b));
|
|
207
207
|
return s ? !d.includes(!1) : d.includes(!0);
|
|
208
208
|
}
|
|
209
|
-
return { parseValueSchema:
|
|
209
|
+
return { parseValueSchema: A };
|
|
210
210
|
}
|
|
211
|
-
const
|
|
211
|
+
const Ee = {
|
|
212
212
|
convertTo: (e, t, r, c) => {
|
|
213
213
|
e.appearance || (e.appearance = {}), e.appearance[t] = r;
|
|
214
214
|
},
|
|
215
215
|
convertFrom: (e, t, r) => e.appearance ? e.appearance[t] : e[t]
|
|
216
|
-
}, Re = {
|
|
217
|
-
convertFrom: (e, t, r) => e.buttons && e.buttons.length ? `共 ${e.buttons.length} 项` : "无"
|
|
218
216
|
}, Be = {
|
|
217
|
+
convertFrom: (e, t, r) => e.buttons && e.buttons.length ? `共 ${e.buttons.length} 项` : "无"
|
|
218
|
+
}, $e = {
|
|
219
219
|
convertTo: (e, t, r, c) => {
|
|
220
220
|
e.editor && (e.editor[t] = r);
|
|
221
221
|
},
|
|
@@ -267,18 +267,18 @@ const De = {
|
|
|
267
267
|
"list-view": { type: "list-view", name: "列表" },
|
|
268
268
|
"filter-bar": { type: "filter-bar", name: "筛选条" },
|
|
269
269
|
"language-textbox": { type: "language-textbox", name: "多语输入框" }
|
|
270
|
-
},
|
|
270
|
+
}, Re = {
|
|
271
271
|
convertFrom: (e, t, r) => {
|
|
272
|
-
var
|
|
272
|
+
var T;
|
|
273
273
|
const c = e.editor && e.editor[t] ? e.editor[t] : e[t];
|
|
274
|
-
return ((
|
|
274
|
+
return ((T = ee[c]) == null ? void 0 : T.name) || c;
|
|
275
275
|
}
|
|
276
|
-
},
|
|
276
|
+
}, ke = {
|
|
277
277
|
convertTo: (e, t, r, c) => {
|
|
278
278
|
e[t] = e[t];
|
|
279
279
|
},
|
|
280
280
|
convertFrom: (e, t, r) => e.editor ? r.getRealEditorType(e.editor.type) : ""
|
|
281
|
-
},
|
|
281
|
+
}, Ae = {
|
|
282
282
|
convertTo: (e, t, r, c) => {
|
|
283
283
|
(e.type === "data-grid-column" || e.type === "tree-grid-column") && (e.formatter ? e.formatter[t] = r : e.formatter = {
|
|
284
284
|
[t]: r
|
|
@@ -393,8 +393,8 @@ const De = {
|
|
|
393
393
|
e.selection || (e.selection = {}), e.selection[t] = r;
|
|
394
394
|
},
|
|
395
395
|
convertFrom: (e, t, r) => {
|
|
396
|
-
var c,
|
|
397
|
-
return t === "showCheckbox" ? (c = e.selection) != null && c.multiSelect ? !0 : (
|
|
396
|
+
var c, T;
|
|
397
|
+
return t === "showCheckbox" ? (c = e.selection) != null && c.multiSelect ? !0 : (T = e.selection) == null ? void 0 : T.showCheckbox : e.selection ? e.selection[t] : e[t];
|
|
398
398
|
}
|
|
399
399
|
}, Ge = {
|
|
400
400
|
convertFrom: (e, t, r) => e[t] && e[t].length ? `共 ${e[t].length} 项` : ""
|
|
@@ -410,19 +410,19 @@ const De = {
|
|
|
410
410
|
convertFrom: (e, t, r) => e.size ? e.size[t] : e[t]
|
|
411
411
|
}, Qe = {
|
|
412
412
|
convertFrom: (e, t, r) => {
|
|
413
|
-
var c,
|
|
414
|
-
return (c = e.formatter) != null && c.data && t === "formatterEnumData" && !e.formatterEnumData ? (
|
|
413
|
+
var c, T;
|
|
414
|
+
return (c = e.formatter) != null && c.data && t === "formatterEnumData" && !e.formatterEnumData ? (T = e.formatter) == null ? void 0 : T.data : e.formatterEnumData;
|
|
415
415
|
}
|
|
416
416
|
}, Xe = {
|
|
417
417
|
convertTo: (e, t, r, c) => {
|
|
418
418
|
e.sort || (e.sort = {}), e.sort[t] = r;
|
|
419
419
|
},
|
|
420
420
|
convertFrom: (e, t, r) => {
|
|
421
|
-
var c,
|
|
421
|
+
var c, T;
|
|
422
422
|
if (t === "mode")
|
|
423
423
|
return ((c = e.sort) == null ? void 0 : c.mode) || "client";
|
|
424
424
|
if (t === "multiSort")
|
|
425
|
-
return !!((
|
|
425
|
+
return !!((T = e.sort) != null && T.multiSort);
|
|
426
426
|
}
|
|
427
427
|
}, Ye = {
|
|
428
428
|
convertTo: (e, t, r, c) => {
|
|
@@ -451,13 +451,13 @@ const De = {
|
|
|
451
451
|
};
|
|
452
452
|
function te(e, t, r) {
|
|
453
453
|
const c = /* @__PURE__ */ new Map([
|
|
454
|
-
["/converter/appearance.converter",
|
|
455
|
-
["/converter/buttons.converter",
|
|
456
|
-
["/converter/property-editor.converter",
|
|
454
|
+
["/converter/appearance.converter", Ee],
|
|
455
|
+
["/converter/buttons.converter", Be],
|
|
456
|
+
["/converter/property-editor.converter", $e],
|
|
457
457
|
["/converter/items-count.converter", Ge],
|
|
458
|
-
["/converter/type.converter",
|
|
459
|
-
["/converter/change-editor.converter",
|
|
460
|
-
["/converter/change-formatter.converter",
|
|
458
|
+
["/converter/type.converter", Re],
|
|
459
|
+
["/converter/change-editor.converter", ke],
|
|
460
|
+
["/converter/change-formatter.converter", Ae],
|
|
461
461
|
["/converter/column-command.converter", Ce],
|
|
462
462
|
["/converter/column-option.converter", Ne],
|
|
463
463
|
["/converter/summary.converter", Ve],
|
|
@@ -472,7 +472,7 @@ function te(e, t, r) {
|
|
|
472
472
|
["/converter/grid-sort.converter", Xe],
|
|
473
473
|
["/converter/grid-filter.converter", Ye],
|
|
474
474
|
["/converter/row-option.converter", Ze]
|
|
475
|
-
]),
|
|
475
|
+
]), T = /* @__PURE__ */ new Map([
|
|
476
476
|
["string", { type: "input-group", enableClear: !1 }],
|
|
477
477
|
["boolean", {
|
|
478
478
|
type: "combo-list",
|
|
@@ -496,95 +496,95 @@ function te(e, t, r) {
|
|
|
496
496
|
["array", { type: "button-edit" }],
|
|
497
497
|
["number", { type: "number-spinner", placeholder: "" }],
|
|
498
498
|
["events-editor", { type: "events-editor", hide: !0 }]
|
|
499
|
-
]),
|
|
499
|
+
]), O = De();
|
|
500
500
|
function S(a, o) {
|
|
501
|
-
return () =>
|
|
501
|
+
return () => O.parseValueSchema(a, o);
|
|
502
502
|
}
|
|
503
|
-
function
|
|
503
|
+
function B(a, o, l) {
|
|
504
504
|
return a.includes("visible") && o.visible !== void 0 ? typeof o.visible == "boolean" ? () => !!o.visible : o.visible === void 0 ? !0 : S(o.visible, l) : () => !0;
|
|
505
505
|
}
|
|
506
|
-
function
|
|
506
|
+
function A(a, o, l) {
|
|
507
507
|
return a.includes("readonly") && o.readonly !== void 0 ? typeof o.readonly == "boolean" ? () => !!o.readonly : S(o.readonly, l) : () => !1;
|
|
508
508
|
}
|
|
509
|
-
function
|
|
509
|
+
function m(a, o) {
|
|
510
510
|
const l = a.$converter || o;
|
|
511
511
|
return typeof l == "string" && l && c.has(l) ? c.get(l) || null : l || null;
|
|
512
512
|
}
|
|
513
|
-
function b(a, o, l, d, g, M = "",
|
|
513
|
+
function b(a, o, l, d, g, M = "", $ = "") {
|
|
514
514
|
return Object.keys(a).map((F) => {
|
|
515
|
-
const
|
|
516
|
-
h.readonly = h.readonly === void 0 ?
|
|
517
|
-
const C = n.type === "cascade" ? b(n.properties, o, l, d, g, M,
|
|
518
|
-
let
|
|
515
|
+
const R = P(1), p = F, n = a[F], f = Object.keys(n), w = n.title, u = n.type, y = T.get(u) || { type: "input-group", enableClear: !1 }, h = n.editor ? Object.assign({}, y, n.editor) : Object.assign({}, y), j = B(f, n, o), D = A(f, n, o);
|
|
516
|
+
h.readonly = h.readonly === void 0 ? D() : h.readonly;
|
|
517
|
+
const C = n.type === "cascade" ? b(n.properties, o, l, d, g, M, $) : [], L = !0;
|
|
518
|
+
let k = m(n, $);
|
|
519
519
|
const q = N({
|
|
520
520
|
get() {
|
|
521
|
-
if (
|
|
522
|
-
if (["class", "style"].find((
|
|
523
|
-
return
|
|
521
|
+
if (R.value) {
|
|
522
|
+
if (["class", "style"].find((me) => me === p) && !k && (k = c.get("/converter/appearance.converter") || null), k && k.convertFrom)
|
|
523
|
+
return k.convertFrom(l, F, g, M);
|
|
524
524
|
const W = l[F];
|
|
525
525
|
return Object.prototype.hasOwnProperty.call(n, "defaultValue") && (W === void 0 || typeof W == "string" && W === "") ? n.type === "boolean" ? n.defaultValue : n.defaultValue || "" : W;
|
|
526
526
|
}
|
|
527
527
|
return null;
|
|
528
528
|
},
|
|
529
529
|
set(W) {
|
|
530
|
-
|
|
530
|
+
R.value += 1, k && k.convertTo ? (k.convertTo(d, F, W, g, M), k.convertTo(l, F, W, g, M)) : (d[F] = W, l[F] = W);
|
|
531
531
|
}
|
|
532
|
-
}), { refreshPanelAfterChanged: z, description: ue, isExpand: fe, parentPropertyID: pe } = n, Y = { propertyID: p, propertyName: w, propertyType: u, propertyValue: q, editor: h, visible: j, readonly:
|
|
532
|
+
}), { refreshPanelAfterChanged: z, description: ue, isExpand: fe, parentPropertyID: pe } = n, Y = { propertyID: p, propertyName: w, propertyType: u, propertyValue: q, editor: h, visible: j, readonly: D, cascadeConfig: C, hideCascadeTitle: L, refreshPanelAfterChanged: z, description: ue, isExpand: fe, parentPropertyID: pe };
|
|
533
533
|
return o[p] = Y, Y;
|
|
534
534
|
});
|
|
535
535
|
}
|
|
536
536
|
function i(a, o, l = {}) {
|
|
537
537
|
const d = {}, g = e[a];
|
|
538
|
-
return g && g.categories ? Object.keys(g.categories).map((
|
|
539
|
-
const
|
|
540
|
-
return { categoryId:
|
|
538
|
+
return g && g.categories ? Object.keys(g.categories).map(($) => {
|
|
539
|
+
const E = g.categories[$], F = E == null ? void 0 : E.title, R = b(E.properties || {}, d, {}, l, o);
|
|
540
|
+
return { categoryId: $, categoryName: F, properties: R };
|
|
541
541
|
}) : [];
|
|
542
542
|
}
|
|
543
543
|
function s(a, o, l, d, g = "") {
|
|
544
|
-
const M = o.$ref.schema,
|
|
544
|
+
const M = o.$ref.schema, $ = o.$ref.converter, E = l[M], F = E.type, R = r(E), p = {}, n = e[F];
|
|
545
545
|
if (n && n.categories) {
|
|
546
546
|
const f = n.categories[a], w = f == null ? void 0 : f.title;
|
|
547
|
-
|
|
548
|
-
f.properties[h].$converter =
|
|
547
|
+
$ && Object.keys(f.properties).forEach((h) => {
|
|
548
|
+
f.properties[h].$converter = $;
|
|
549
549
|
});
|
|
550
|
-
const u = (f == null ? void 0 : f.properties) || {}, y = b(u, p,
|
|
550
|
+
const u = (f == null ? void 0 : f.properties) || {}, y = b(u, p, R, E, d, g);
|
|
551
551
|
return { categoryId: a, categoryName: w, properties: y };
|
|
552
552
|
}
|
|
553
553
|
return { categoryId: a, categoryName: "", properties: [] };
|
|
554
554
|
}
|
|
555
|
-
function
|
|
556
|
-
const M = a.type,
|
|
555
|
+
function v(a, o, l, d, g) {
|
|
556
|
+
const M = a.type, $ = r(a), E = {};
|
|
557
557
|
let F = g || e[M];
|
|
558
558
|
if (F && Object.keys(F).length === 0 && l && l.getPropConfig && (F = l.getPropConfig(d)), F && F.categories) {
|
|
559
|
-
const
|
|
559
|
+
const R = [];
|
|
560
560
|
return Object.keys(F.categories).map((p) => {
|
|
561
561
|
const n = F.categories[p];
|
|
562
562
|
if (n.$ref) {
|
|
563
|
-
|
|
563
|
+
R.push(s(p, n, a, o, d));
|
|
564
564
|
return;
|
|
565
565
|
}
|
|
566
|
-
const f = n == null ? void 0 : n.title, w = n == null ? void 0 : n.tabId, u = n == null ? void 0 : n.tabName, y = n == null ? void 0 : n.hide, h = n == null ? void 0 : n.hideTitle, j = b(n.properties || {},
|
|
567
|
-
|
|
568
|
-
}),
|
|
566
|
+
const f = n == null ? void 0 : n.title, w = n == null ? void 0 : n.tabId, u = n == null ? void 0 : n.tabName, y = n == null ? void 0 : n.hide, h = n == null ? void 0 : n.hideTitle, j = b(n.properties || {}, E, $, a, o, d, n.$converter), { setPropertyRelates: D } = n, C = n == null ? void 0 : n.parentPropertyID;
|
|
567
|
+
R.push({ categoryId: p, categoryName: f, tabId: w, tabName: u, hide: y, properties: j, hideTitle: h, setPropertyRelates: D, parentPropertyID: C });
|
|
568
|
+
}), R;
|
|
569
569
|
}
|
|
570
570
|
return [];
|
|
571
571
|
}
|
|
572
572
|
return {
|
|
573
|
-
getPropertyConfigBySchema:
|
|
573
|
+
getPropertyConfigBySchema: v,
|
|
574
574
|
getPropertyConfigByType: i,
|
|
575
575
|
propertyConverterMap: c
|
|
576
576
|
};
|
|
577
577
|
}
|
|
578
578
|
const ne = {}, re = {};
|
|
579
579
|
te(ne, re, je);
|
|
580
|
-
const oe = {}, ae = {}, { resolveSchemaWithDefaultValue: He } = x(oe, ae), ie = {}, ce = {};
|
|
580
|
+
const oe = {}, ae = {}, { getSchemaByType: dt, resolveSchemaWithDefaultValue: He, resolveSchemaToProps: bt, mappingSchemaToProps: yt, setDesignerContext: gt } = x(oe, ae), ie = {}, ce = {};
|
|
581
581
|
te(ie, ce, He);
|
|
582
|
-
function xe(e, t, r = /* @__PURE__ */ new Map(), c = (S,
|
|
583
|
-
return I[t.title] = t, K[t.title] = c, ne[t.title] =
|
|
584
|
-
if (!
|
|
582
|
+
function xe(e, t, r = /* @__PURE__ */ new Map(), c = (S, B, A, m) => B, T = {}, O = (S) => S) {
|
|
583
|
+
return I[t.title] = t, K[t.title] = c, ne[t.title] = T, re[t.title] = O, oe[t.title] = t, ae[t.title] = c, ie[t.title] = T, ce[t.title] = O, (S = {}, B = !0) => {
|
|
584
|
+
if (!B)
|
|
585
585
|
return Me(S, r);
|
|
586
|
-
const
|
|
587
|
-
return Object.assign(
|
|
586
|
+
const A = Pe(S, t, r), m = Object.keys(e).reduce((b, i) => (b[i] = e[i].default, b), {});
|
|
587
|
+
return Object.assign(m, A);
|
|
588
588
|
};
|
|
589
589
|
}
|
|
590
590
|
function Ie(e, t) {
|
|
@@ -653,7 +653,7 @@ const tt = "capsule", nt = "A Farris Component", rt = "object", ot = {
|
|
|
653
653
|
_(() => e.isActive, (S) => {
|
|
654
654
|
c.value = S;
|
|
655
655
|
});
|
|
656
|
-
const
|
|
656
|
+
const T = N(() => ({
|
|
657
657
|
"f-capsule-item": !0,
|
|
658
658
|
"f-capsule-active-item": c.value,
|
|
659
659
|
"f-capsule-disabled": e.disabled
|
|
@@ -661,7 +661,7 @@ const tt = "capsule", nt = "A Farris Component", rt = "object", ot = {
|
|
|
661
661
|
G(() => {
|
|
662
662
|
t.emit("mounted", r, e.value);
|
|
663
663
|
});
|
|
664
|
-
function
|
|
664
|
+
function O(S) {
|
|
665
665
|
e.disabled || t.emit("active", S, {
|
|
666
666
|
name: e.name,
|
|
667
667
|
value: e.value
|
|
@@ -669,8 +669,8 @@ const tt = "capsule", nt = "A Farris Component", rt = "object", ot = {
|
|
|
669
669
|
}
|
|
670
670
|
return () => V("div", {
|
|
671
671
|
ref: r,
|
|
672
|
-
class:
|
|
673
|
-
onClick: (S) =>
|
|
672
|
+
class: T.value,
|
|
673
|
+
onClick: (S) => O(S)
|
|
674
674
|
}, [e.icon && V("i", {
|
|
675
675
|
class: e.icon
|
|
676
676
|
}, null), e.name]);
|
|
@@ -680,19 +680,19 @@ const tt = "capsule", nt = "A Farris Component", rt = "object", ot = {
|
|
|
680
680
|
props: X,
|
|
681
681
|
emits: ["change", "update:modelValue"],
|
|
682
682
|
setup(e, t) {
|
|
683
|
-
const r = P(e.items), c = P(),
|
|
683
|
+
const r = P(e.items), c = P(), T = 2, O = P(e.modelValue), S = P("none"), B = P(e.type), A = N(() => {
|
|
684
684
|
const p = {
|
|
685
685
|
"f-capsule-container": !0
|
|
686
686
|
};
|
|
687
|
-
return
|
|
688
|
-
}),
|
|
687
|
+
return B.value && (p[B.value] = !0), p;
|
|
688
|
+
}), m = N(() => ({})), b = N(() => ({
|
|
689
689
|
"f-capsule": !0
|
|
690
|
-
})), i = P(
|
|
690
|
+
})), i = P(T), s = P(0), v = P(0), a = N(() => ({
|
|
691
691
|
left: `${i.value}px`,
|
|
692
692
|
width: `${s.value}px`,
|
|
693
693
|
transition: S.value
|
|
694
694
|
})), o = N(() => ({
|
|
695
|
-
width: `${
|
|
695
|
+
width: `${v.value}px`
|
|
696
696
|
})), l = /* @__PURE__ */ new Map();
|
|
697
697
|
function d(p) {
|
|
698
698
|
var n;
|
|
@@ -700,27 +700,27 @@ const tt = "capsule", nt = "A Farris Component", rt = "object", ot = {
|
|
|
700
700
|
const f = (n = l.get(p.value)) == null ? void 0 : n.value;
|
|
701
701
|
if (f) {
|
|
702
702
|
const w = f.getBoundingClientRect(), u = c.value.getBoundingClientRect();
|
|
703
|
-
i.value = w.left - u.left +
|
|
703
|
+
i.value = w.left - u.left + T + c.value.scrollLeft, s.value = w.width - 2 * T;
|
|
704
704
|
}
|
|
705
705
|
}
|
|
706
706
|
}
|
|
707
707
|
function g(p, n) {
|
|
708
708
|
const f = p.value;
|
|
709
|
-
|
|
709
|
+
O.value = f, t.emit("update:modelValue", f), d(p), n && t.emit("change", f);
|
|
710
710
|
}
|
|
711
711
|
function M(p) {
|
|
712
712
|
const n = r.value.findIndex((f) => f.value === p);
|
|
713
713
|
n > -1 && g(r.value[n], !1);
|
|
714
714
|
}
|
|
715
715
|
_(() => e.modelValue, (p) => {
|
|
716
|
-
|
|
716
|
+
O.value = p, M(O.value);
|
|
717
717
|
}), G(async () => {
|
|
718
|
-
M(
|
|
718
|
+
M(O.value), await U(), S.value = "0.1s ease-out all", v.value = Array.from(l.values()).reduce((p, n) => (p += n.value.clientWidth, p), 0);
|
|
719
719
|
});
|
|
720
|
-
function
|
|
720
|
+
function $(p, n) {
|
|
721
721
|
g(n, !0);
|
|
722
722
|
}
|
|
723
|
-
function
|
|
723
|
+
function E(p, n) {
|
|
724
724
|
l.set(n, p);
|
|
725
725
|
}
|
|
726
726
|
function F(p) {
|
|
@@ -728,28 +728,28 @@ const tt = "capsule", nt = "A Farris Component", rt = "object", ot = {
|
|
|
728
728
|
p.find((w) => w.value === n) || l.delete(n);
|
|
729
729
|
});
|
|
730
730
|
}
|
|
731
|
-
function
|
|
731
|
+
function R(p, n) {
|
|
732
732
|
return V(se, {
|
|
733
733
|
name: p.name,
|
|
734
734
|
value: p.value,
|
|
735
|
-
isActive: p.value ===
|
|
735
|
+
isActive: p.value === O.value,
|
|
736
736
|
index: n,
|
|
737
737
|
disabled: p.disabled,
|
|
738
738
|
key: p.value,
|
|
739
|
-
onMounted:
|
|
740
|
-
onActive:
|
|
739
|
+
onMounted: E,
|
|
740
|
+
onActive: $
|
|
741
741
|
}, null);
|
|
742
742
|
}
|
|
743
743
|
return _(() => e.items, async (p) => {
|
|
744
744
|
const n = p.filter((f) => f.show);
|
|
745
|
-
F(n), r.value = n, await U(), M(
|
|
745
|
+
F(n), r.value = n, await U(), M(O.value), v.value = Array.from(l.values()).reduce((f, w) => (f += w.value.clientWidth, f), 0);
|
|
746
746
|
}), () => V("span", {
|
|
747
747
|
ref: c,
|
|
748
|
-
class:
|
|
749
|
-
style:
|
|
748
|
+
class: A.value,
|
|
749
|
+
style: m.value
|
|
750
750
|
}, [V("span", {
|
|
751
751
|
class: "f-capsule-pane"
|
|
752
|
-
}, [r.value.map((p, n) =>
|
|
752
|
+
}, [r.value.map((p, n) => R(p, n))]), V("small", {
|
|
753
753
|
class: b.value,
|
|
754
754
|
style: a.value
|
|
755
755
|
}, null), V("div", {
|
|
@@ -760,15 +760,15 @@ const tt = "capsule", nt = "A Farris Component", rt = "object", ot = {
|
|
|
760
760
|
});
|
|
761
761
|
function ct(e, t, r) {
|
|
762
762
|
var w;
|
|
763
|
-
const c = "",
|
|
763
|
+
const c = "", T = "", O = P();
|
|
764
764
|
let S;
|
|
765
|
-
function
|
|
765
|
+
function B() {
|
|
766
766
|
return (t == null ? void 0 : t.schema.componentType) !== "frame";
|
|
767
767
|
}
|
|
768
|
-
function
|
|
768
|
+
function A() {
|
|
769
769
|
return !1;
|
|
770
770
|
}
|
|
771
|
-
function
|
|
771
|
+
function m() {
|
|
772
772
|
return (t == null ? void 0 : t.schema.componentType) !== "frame";
|
|
773
773
|
}
|
|
774
774
|
function b() {
|
|
@@ -783,15 +783,15 @@ function ct(e, t, r) {
|
|
|
783
783
|
return h || null;
|
|
784
784
|
}
|
|
785
785
|
function s(u = t) {
|
|
786
|
-
var
|
|
786
|
+
var D;
|
|
787
787
|
const { componentInstance: y, designerItemElementRef: h } = u;
|
|
788
788
|
if (!y || !y.value)
|
|
789
789
|
return null;
|
|
790
790
|
const { getCustomButtons: j } = y.value;
|
|
791
|
-
return y.value.canMove || j && ((
|
|
791
|
+
return y.value.canMove || j && ((D = j()) != null && D.length) ? h : s(u.parent);
|
|
792
792
|
}
|
|
793
|
-
function
|
|
794
|
-
return
|
|
793
|
+
function v(u) {
|
|
794
|
+
return !!r;
|
|
795
795
|
}
|
|
796
796
|
function a() {
|
|
797
797
|
return (t == null ? void 0 : t.schema.label) || (t == null ? void 0 : t.schema.title) || (t == null ? void 0 : t.schema.name);
|
|
@@ -805,40 +805,40 @@ function ct(e, t, r) {
|
|
|
805
805
|
function d(u, y) {
|
|
806
806
|
const { componentType: h } = u;
|
|
807
807
|
let j = de(h, u, y);
|
|
808
|
-
const
|
|
809
|
-
return j && !j.id && j.type === h && (j.id = `${
|
|
808
|
+
const D = h.toLowerCase().replace(/-/g, "_");
|
|
809
|
+
return j && !j.id && j.type === h && (j.id = `${D}_${Math.random().toString().slice(2, 6)}`), j;
|
|
810
810
|
}
|
|
811
811
|
function g(u) {
|
|
812
812
|
}
|
|
813
813
|
function M(...u) {
|
|
814
814
|
}
|
|
815
|
-
function
|
|
815
|
+
function $(u) {
|
|
816
816
|
if (!u)
|
|
817
817
|
return;
|
|
818
818
|
const y = t == null ? void 0 : t.schema, { formSchemaUtils: h } = u;
|
|
819
819
|
if (y && h.getExpressions().length) {
|
|
820
|
-
const j = h.getExpressions().findIndex((
|
|
820
|
+
const j = h.getExpressions().findIndex((D) => D.target === y.id);
|
|
821
821
|
j > -1 && h.getExpressions().splice(j, 1);
|
|
822
822
|
}
|
|
823
823
|
}
|
|
824
|
-
function
|
|
824
|
+
function E(u) {
|
|
825
825
|
if (!u || !(t != null && t.schema))
|
|
826
826
|
return;
|
|
827
827
|
const y = t.schema, { formSchemaUtils: h } = u;
|
|
828
828
|
h.removeCommunicationInComponent(y);
|
|
829
829
|
}
|
|
830
830
|
function F(u) {
|
|
831
|
-
|
|
831
|
+
$(u), E(u), t != null && t.schema.contents && t.schema.contents.map((y) => {
|
|
832
832
|
let h = y.id;
|
|
833
833
|
y.type === "component-ref" && (h = y.component);
|
|
834
834
|
const j = e.value.querySelectorAll(`#${h}-design-item`);
|
|
835
|
-
j != null && j.length && Array.from(j).map((
|
|
835
|
+
j != null && j.length && Array.from(j).map((D) => {
|
|
836
836
|
var C;
|
|
837
|
-
(C =
|
|
837
|
+
(C = D == null ? void 0 : D.componentInstance) != null && C.value.onRemoveComponent && D.componentInstance.value.onRemoveComponent(u);
|
|
838
838
|
});
|
|
839
839
|
});
|
|
840
840
|
}
|
|
841
|
-
function
|
|
841
|
+
function R() {
|
|
842
842
|
}
|
|
843
843
|
function p(u) {
|
|
844
844
|
var h, j;
|
|
@@ -847,8 +847,8 @@ function ct(e, t, r) {
|
|
|
847
847
|
!S && u && (S = u.formSchemaUtils);
|
|
848
848
|
let y = "";
|
|
849
849
|
{
|
|
850
|
-
const { text:
|
|
851
|
-
y =
|
|
850
|
+
const { text: D, title: C, label: L, mainTitle: k, name: q, type: z } = t.schema;
|
|
851
|
+
y = D || C || L || k || q || ((j = ee[z]) == null ? void 0 : j.name);
|
|
852
852
|
}
|
|
853
853
|
y && S.getControlBasicInfoMap().set(t.schema.id, {
|
|
854
854
|
componentTitle: y,
|
|
@@ -856,34 +856,34 @@ function ct(e, t, r) {
|
|
|
856
856
|
});
|
|
857
857
|
}
|
|
858
858
|
function n(u) {
|
|
859
|
-
var
|
|
859
|
+
var D;
|
|
860
860
|
const { changeObject: y } = u, { propertyID: h, propertyValue: j } = y;
|
|
861
|
-
if (["text", "title", "label", "name", "mainTitle"].includes((
|
|
862
|
-
const C = S.getControlBasicInfoMap(), L = C.keys().toArray().filter((
|
|
861
|
+
if (["text", "title", "label", "name", "mainTitle"].includes((D = u == null ? void 0 : u.changeObject) == null ? void 0 : D.propertyID) && h && j && (p(), S)) {
|
|
862
|
+
const C = S.getControlBasicInfoMap(), L = C.keys().toArray().filter((k) => {
|
|
863
863
|
var q, z;
|
|
864
|
-
return ((q = C.get(
|
|
864
|
+
return ((q = C.get(k)) == null ? void 0 : q.reliedComponentId) === ((z = t == null ? void 0 : t.schema) == null ? void 0 : z.id);
|
|
865
865
|
});
|
|
866
|
-
L != null && L.length && L.forEach((
|
|
867
|
-
const q = C.get(
|
|
868
|
-
q[0] = j, C.get(
|
|
866
|
+
L != null && L.length && L.forEach((k) => {
|
|
867
|
+
const q = C.get(k).parentPathName.split(" > ");
|
|
868
|
+
q[0] = j, C.get(k).parentPathName = q.join(" > ");
|
|
869
869
|
});
|
|
870
870
|
}
|
|
871
871
|
}
|
|
872
872
|
function f(u) {
|
|
873
873
|
n(u);
|
|
874
874
|
}
|
|
875
|
-
return
|
|
876
|
-
canMove:
|
|
877
|
-
canSelectParent:
|
|
878
|
-
canDelete:
|
|
875
|
+
return O.value = {
|
|
876
|
+
canMove: B(),
|
|
877
|
+
canSelectParent: A(),
|
|
878
|
+
canDelete: m(),
|
|
879
879
|
canNested: !b(),
|
|
880
880
|
contents: t == null ? void 0 : t.schema.contents,
|
|
881
881
|
elementRef: e,
|
|
882
882
|
parent: (w = t == null ? void 0 : t.parent) == null ? void 0 : w.componentInstance,
|
|
883
883
|
schema: t == null ? void 0 : t.schema,
|
|
884
884
|
styles: c,
|
|
885
|
-
designerClass:
|
|
886
|
-
canAccepts:
|
|
885
|
+
designerClass: T,
|
|
886
|
+
canAccepts: v,
|
|
887
887
|
getBelongedComponentInstance: i,
|
|
888
888
|
getDraggableDesignItemElement: s,
|
|
889
889
|
getDraggingDisplayText: a,
|
|
@@ -895,30 +895,30 @@ function ct(e, t, r) {
|
|
|
895
895
|
triggerBelongedComponentToMoveWhenMoved: P(!1),
|
|
896
896
|
triggerBelongedComponentToDeleteWhenDeleted: P(!1),
|
|
897
897
|
onRemoveComponent: F,
|
|
898
|
-
getCustomButtons:
|
|
898
|
+
getCustomButtons: R,
|
|
899
899
|
onPropertyChanged: f,
|
|
900
900
|
setComponentBasicInfoMap: p,
|
|
901
901
|
updateContextSchema: t == null ? void 0 : t.updateContextSchema
|
|
902
|
-
},
|
|
902
|
+
}, O;
|
|
903
903
|
}
|
|
904
904
|
const lt = /* @__PURE__ */ Q({
|
|
905
905
|
name: "FCapsuleDesign",
|
|
906
906
|
props: X,
|
|
907
907
|
emits: ["change", "update:modelValue"],
|
|
908
908
|
setup(e, t) {
|
|
909
|
-
const r = P(e.items), c = P(),
|
|
909
|
+
const r = P(e.items), c = P(), T = 2, O = P(e.modelValue), S = P("none"), B = P(e.type), A = ve("design-item-context"), m = ct(c, A);
|
|
910
910
|
G(() => {
|
|
911
|
-
c.value.componentInstance =
|
|
912
|
-
}), t.expose(
|
|
911
|
+
c.value.componentInstance = m;
|
|
912
|
+
}), t.expose(m.value);
|
|
913
913
|
const b = N(() => {
|
|
914
914
|
const n = {
|
|
915
915
|
"f-capsule-container": !0
|
|
916
916
|
};
|
|
917
|
-
return
|
|
917
|
+
return B.value && (n[B.value] = !0), n;
|
|
918
918
|
}), i = N(() => ({})), s = N(() => ({
|
|
919
919
|
"f-capsule": !0
|
|
920
|
-
})),
|
|
921
|
-
left: `${
|
|
920
|
+
})), v = P(T), a = P(0), o = P(0), l = N(() => ({
|
|
921
|
+
left: `${v.value}px`,
|
|
922
922
|
width: `${a.value}px`,
|
|
923
923
|
transition: S.value
|
|
924
924
|
})), d = N(() => ({
|
|
@@ -930,38 +930,38 @@ const lt = /* @__PURE__ */ Q({
|
|
|
930
930
|
const w = (f = g.get(n.value)) == null ? void 0 : f.value;
|
|
931
931
|
if (w) {
|
|
932
932
|
const u = w.getBoundingClientRect(), y = c.value.getBoundingClientRect();
|
|
933
|
-
|
|
933
|
+
v.value = u.left - y.left + T + c.value.scrollLeft, a.value = u.width - 2 * T;
|
|
934
934
|
}
|
|
935
935
|
}
|
|
936
936
|
}
|
|
937
|
-
function
|
|
937
|
+
function $(n, f) {
|
|
938
938
|
const w = n.value;
|
|
939
|
-
|
|
939
|
+
O.value = w, t.emit("update:modelValue", w), M(n), f && t.emit("change", w);
|
|
940
940
|
}
|
|
941
|
-
function
|
|
941
|
+
function E(n) {
|
|
942
942
|
const f = r.value.findIndex((w) => w.value === n);
|
|
943
|
-
f > -1 &&
|
|
943
|
+
f > -1 && $(r.value[f], !1);
|
|
944
944
|
}
|
|
945
945
|
_(() => e.modelValue, (n) => {
|
|
946
|
-
|
|
946
|
+
O.value = n, E(O.value);
|
|
947
947
|
}), _(() => e.items, async (n) => {
|
|
948
|
-
r.value = n, await U(),
|
|
948
|
+
r.value = n, await U(), E(O.value), o.value = Array.from(g.values()).reduce((f, w) => (f += w.value.clientWidth, f), 0);
|
|
949
949
|
}), G(async () => {
|
|
950
|
-
|
|
950
|
+
E(O.value), await U(), S.value = "0.1s ease-out all", o.value = Array.from(g.values()).reduce((n, f) => (n += f.value.clientWidth, n), 0);
|
|
951
951
|
});
|
|
952
952
|
function F(n, f) {
|
|
953
|
-
|
|
953
|
+
$(f, !0);
|
|
954
954
|
}
|
|
955
|
-
function
|
|
955
|
+
function R(n, f) {
|
|
956
956
|
g.set(f, n);
|
|
957
957
|
}
|
|
958
958
|
function p(n, f) {
|
|
959
959
|
return V(se, {
|
|
960
960
|
name: n.name,
|
|
961
961
|
value: n.value,
|
|
962
|
-
isActive: n.value ===
|
|
962
|
+
isActive: n.value === O.value,
|
|
963
963
|
index: f,
|
|
964
|
-
onMounted:
|
|
964
|
+
onMounted: R,
|
|
965
965
|
onActive: F
|
|
966
966
|
}, null);
|
|
967
967
|
}
|
|
@@ -986,11 +986,11 @@ J.register = (e, t, r) => {
|
|
|
986
986
|
J.registerDesigner = (e, t, r) => {
|
|
987
987
|
e.capsule = lt, t.capsule = le;
|
|
988
988
|
};
|
|
989
|
-
const
|
|
989
|
+
const ht = be(J);
|
|
990
990
|
export {
|
|
991
991
|
J as FCapsule,
|
|
992
992
|
it as capsuleItemProps,
|
|
993
993
|
X as capsuleProps,
|
|
994
|
-
|
|
994
|
+
ht as default,
|
|
995
995
|
le as propsResolver
|
|
996
996
|
};
|