@farris/ui-vue 1.2.7 → 1.2.8
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 +79 -79
- package/components/avatar/index.esm.js +393 -440
- package/components/border-editor/index.esm.js +4 -4
- package/components/button/index.esm.js +1 -1
- package/components/button-edit/index.esm.js +353 -444
- package/components/button-group/index.esm.js +5 -5
- package/components/calendar/index.esm.js +176 -176
- package/components/capsule/index.esm.js +93 -93
- package/components/checkbox/index.esm.js +496 -542
- package/components/color-picker/index.esm.js +1 -1
- package/components/combo-list/index.esm.js +437 -483
- package/components/combo-tree/index.esm.js +8 -8
- package/components/component/index.esm.js +89 -89
- package/components/condition/index.esm.js +839 -726
- package/components/content-container/index.esm.js +61 -61
- package/components/data-grid/index.esm.js +4702 -4972
- package/components/data-view/index.esm.js +2999 -2875
- package/components/date-picker/index.esm.js +2626 -2672
- package/components/dependent-base/style.js +1 -0
- package/components/dependent-fluid/style.js +1 -0
- package/components/dependent-icon/style.js +1 -0
- package/components/dependent-input/style.js +1 -0
- package/components/dependent-table/style.js +1 -0
- package/components/designer-canvas/index.esm.js +478 -475
- package/components/designer-outline/index.esm.js +173 -131
- package/components/discussion-editor/index.esm.js +1 -1
- package/components/dropdown/index.esm.js +73 -73
- package/components/dynamic-form/index.esm.js +934 -976
- package/components/dynamic-resolver/index.esm.js +67 -35
- package/components/dynamic-view/index.esm.js +258 -249
- package/components/enum-editor/index.esm.js +3 -3
- package/components/events-editor/index.esm.js +178 -178
- package/components/expression-editor/index.esm.js +105 -105
- package/components/external-container/index.esm.js +1892 -1775
- package/components/field-selector/index.css +1 -1
- package/components/field-selector/index.esm.js +5245 -5514
- package/components/filter-bar/index.css +1 -1
- package/components/filter-bar/index.esm.js +1483 -1556
- package/components/flow-canvas/index.esm.js +678 -675
- package/components/image-cropper/index.esm.js +266 -266
- package/components/input-group/index.esm.js +668 -714
- package/components/layout/index.esm.js +148 -148
- package/components/list-nav/index.esm.js +109 -109
- package/components/list-view/index.esm.js +1679 -1563
- package/components/lookup/index.css +1 -1
- package/components/lookup/index.esm.js +6596 -6865
- package/components/mapping-editor/index.esm.js +5592 -5862
- package/components/message-box/index.esm.js +1 -1
- package/components/modal/index.esm.js +1 -1
- package/components/nav/index.esm.js +86 -86
- package/components/number-range/index.esm.js +1120 -0
- package/components/number-range/package.json +8 -0
- package/components/number-range/style.js +6 -0
- package/components/number-spinner/index.esm.js +1146 -0
- package/components/number-spinner/package.json +8 -0
- package/components/number-spinner/style.js +4 -0
- package/components/order/index.esm.js +988 -1034
- package/components/page-footer/index.esm.js +106 -106
- package/components/page-header/index.esm.js +1088 -1296
- package/components/pagination/index.esm.js +252 -252
- package/components/progress/index.esm.js +37 -37
- package/components/property-editor/index.esm.js +1416 -1462
- package/components/property-panel/index.css +1 -1
- package/components/property-panel/index.esm.js +757 -830
- package/components/query-solution/index.css +1 -0
- package/components/query-solution/index.esm.js +6935 -0
- package/components/query-solution/package.json +8 -0
- package/components/query-solution/style.js +2 -0
- package/components/radio-button/index.esm.js +64 -64
- package/components/radio-group/index.esm.js +452 -498
- package/components/rate/index.esm.js +92 -92
- package/components/response-layout/index.esm.js +33 -33
- package/components/response-layout-editor/index.esm.js +117 -117
- package/components/response-toolbar/index.esm.js +1021 -1238
- package/components/schema-selector/index.esm.js +3215 -3308
- package/components/search-box/index.esm.js +143 -143
- package/components/section/index.esm.js +209 -209
- package/components/smoke-detector/index.esm.js +22 -22
- package/components/spacing-editor/index.esm.js +2 -2
- package/components/splitter/index.esm.js +1097 -394
- package/components/step/index.esm.js +153 -153
- package/components/switch/index.esm.js +442 -488
- package/components/tabs/index.esm.js +1835 -2004
- package/components/tags/index.esm.js +215 -215
- package/components/text/index.esm.js +53 -53
- package/components/textarea/index.esm.js +451 -482
- package/components/time-picker/index.esm.js +1345 -1392
- package/components/transfer/index.esm.js +135 -135
- package/components/tree-grid/index.css +1 -1
- package/components/tree-grid/index.esm.js +5761 -6020
- package/components/tree-view/index.esm.js +2380 -2253
- package/components/uploader/index.esm.js +1 -1
- package/components/verify-detail/index.esm.js +232 -232
- package/components/video/index.esm.js +136 -136
- package/components/weather/index.esm.js +2 -2
- package/farris.all.esm.js +31630 -31224
- package/farris.all.umd.cjs +9 -9
- package/index.css +1 -1
- package/package.json +1 -1
- package/types/checkbox/index.d.ts +1 -0
- package/types/data-grid/src/designer/column-header.design.component.d.ts +1 -1
- package/types/data-grid/src/designer/data-grid-column.props.d.ts +1 -0
- package/types/data-view/composition/types.d.ts +1 -1
- package/types/designer-canvas/src/composition/dg-control.d.ts +16 -350
- package/types/designer-canvas/src/types.d.ts +1 -1
- package/types/dynamic-form/index.d.ts +1 -0
- package/types/dynamic-form/src/types.d.ts +1 -1
- package/types/dynamic-resolver/index.d.ts +1 -0
- package/types/dynamic-resolver/src/binding-resolver.d.ts +1 -0
- package/types/dynamic-view/src/dynamic-view.component.d.ts +1 -1
- package/types/lookup/src/property-config/lookup.property-config.d.ts +2 -1
- package/types/modal/src/modal.props.d.ts +1 -4
- package/types/property-panel/src/composition/entity/base-property.d.ts +0 -12
- package/types/property-panel/src/composition/entity/input-base-property.d.ts +11 -26
- package/types/property-panel/src/composition/entity/schema-dom-mapping.d.ts +10 -8
- package/types/tabs/src/designer/tab-toolbar-item.props.d.ts +19 -0
- package/types/tabs/src/property-config/tabs.property-config.d.ts +6 -6
- package/types/tree-grid/src/designer/use-designer-rules.d.ts +3 -0
- package/types/tree-grid/src/property-config/tree-grid.property-config.d.ts +11 -0
- package/types/tree-grid/src/schema/column-resolver.d.ts +1 -1
- package/types/tree-grid/src/tree-grid.props.d.ts +8 -0
- package/components/accordion/index.umd.cjs +0 -1
- package/components/avatar/index.umd.cjs +0 -1
- package/components/border-editor/index.umd.cjs +0 -1
- package/components/button/index.umd.cjs +0 -1
- package/components/button-edit/index.umd.cjs +0 -1
- package/components/button-group/index.umd.cjs +0 -1
- package/components/calculator/index.umd.cjs +0 -1
- package/components/calendar/index.umd.cjs +0 -1
- package/components/capsule/index.umd.cjs +0 -1
- package/components/checkbox/index.umd.cjs +0 -1
- package/components/color-picker/index.umd.cjs +0 -3
- package/components/combo-list/index.umd.cjs +0 -1
- package/components/combo-tree/index.umd.cjs +0 -1
- package/components/common/index.umd.cjs +0 -1
- package/components/component/index.umd.cjs +0 -1
- package/components/condition/index.umd.cjs +0 -1
- package/components/content-container/index.umd.cjs +0 -1
- package/components/data-grid/index.umd.cjs +0 -1
- package/components/data-view/index.umd.cjs +0 -1
- package/components/date-picker/index.umd.cjs +0 -1
- package/components/designer-canvas/index.umd.cjs +0 -1
- package/components/designer-outline/index.umd.cjs +0 -1
- package/components/designer-toolbox/index.umd.cjs +0 -1
- package/components/discussion-editor/index.umd.cjs +0 -3
- package/components/discussion-list/index.umd.cjs +0 -1
- package/components/drawer/index.umd.cjs +0 -1
- package/components/dropdown/index.umd.cjs +0 -2
- package/components/dynamic-form/index.umd.cjs +0 -1
- package/components/dynamic-resolver/index.umd.cjs +0 -1
- package/components/dynamic-view/index.umd.cjs +0 -1
- package/components/enum-editor/index.umd.cjs +0 -1
- package/components/events-editor/index.umd.cjs +0 -1
- package/components/expression-editor/index.umd.cjs +0 -1
- package/components/external-container/index.umd.cjs +0 -1
- package/components/field-selector/index.umd.cjs +0 -1
- package/components/filter-bar/index.umd.cjs +0 -1
- package/components/flow-canvas/index.umd.cjs +0 -1
- package/components/image-cropper/index.umd.cjs +0 -1
- package/components/input-group/index.umd.cjs +0 -1
- package/components/layout/index.umd.cjs +0 -1
- package/components/list-nav/index.umd.cjs +0 -1
- package/components/list-view/index.umd.cjs +0 -1
- package/components/loading/index.umd.cjs +0 -8
- package/components/locale/index.umd.cjs +0 -1
- package/components/lookup/index.umd.cjs +0 -1
- package/components/mapping-editor/index.umd.cjs +0 -1
- package/components/message-box/index.umd.cjs +0 -1
- package/components/modal/index.umd.cjs +0 -1
- package/components/nav/index.umd.cjs +0 -3
- package/components/notify/index.umd.cjs +0 -1
- package/components/order/index.umd.cjs +0 -1
- package/components/page-footer/index.umd.cjs +0 -1
- package/components/page-header/index.umd.cjs +0 -1
- package/components/pagination/index.umd.cjs +0 -1
- package/components/popover/index.umd.cjs +0 -1
- package/components/progress/index.umd.cjs +0 -3
- package/components/property-editor/index.umd.cjs +0 -3
- package/components/property-panel/index.umd.cjs +0 -1
- package/components/radio-button/index.umd.cjs +0 -1
- package/components/radio-group/index.umd.cjs +0 -1
- package/components/rate/index.umd.cjs +0 -1
- package/components/response-layout/index.umd.cjs +0 -1
- package/components/response-layout-editor/index.umd.cjs +0 -1
- package/components/response-toolbar/index.umd.cjs +0 -1
- package/components/schema-selector/index.umd.cjs +0 -8
- package/components/search-box/index.umd.cjs +0 -1
- package/components/section/index.umd.cjs +0 -1
- package/components/smoke-detector/index.umd.cjs +0 -1
- package/components/spacing-editor/index.umd.cjs +0 -1
- package/components/splitter/index.umd.cjs +0 -1
- package/components/step/index.umd.cjs +0 -1
- package/components/switch/index.umd.cjs +0 -1
- package/components/tabs/index.umd.cjs +0 -1
- package/components/tags/index.umd.cjs +0 -1
- package/components/text/index.umd.cjs +0 -1
- package/components/textarea/index.umd.cjs +0 -1
- package/components/time-picker/index.umd.cjs +0 -1
- package/components/tooltip/index.umd.cjs +0 -1
- package/components/transfer/index.umd.cjs +0 -1
- package/components/tree-grid/index.umd.cjs +0 -1
- package/components/tree-view/index.umd.cjs +0 -1
- package/components/uploader/index.umd.cjs +0 -2
- package/components/verify-detail/index.umd.cjs +0 -1
- package/components/video/index.umd.cjs +0 -1
- package/components/weather/index.umd.cjs +0 -16
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as F, ref as y, watch as D, computed as
|
|
1
|
+
import { defineComponent as F, ref as y, watch as D, computed as M, onMounted as P, createVNode as A, nextTick as T, inject as H } from "vue";
|
|
2
2
|
import { cloneDeep as Q } from "lodash-es";
|
|
3
|
-
import { withInstall as U } from "
|
|
3
|
+
import { withInstall as U } from "../common/index.esm.js";
|
|
4
4
|
const X = "https://json-schema.org/draft/2020-12/schema", Y = "https://farris-design.gitee.io/capsule.schema.json", Z = "capsule", I = "A Farris Component", K = "object", x = {
|
|
5
5
|
id: {
|
|
6
6
|
description: "The unique identifier for a capsule",
|
|
@@ -76,40 +76,40 @@ const X = "https://json-schema.org/draft/2020-12/schema", Y = "https://farris-de
|
|
|
76
76
|
required: ee
|
|
77
77
|
}, q = {}, _ = {};
|
|
78
78
|
function W(n) {
|
|
79
|
-
const { properties: e, title:
|
|
80
|
-
return l.id = `${
|
|
79
|
+
const { properties: e, title: r } = n, l = Object.keys(e).reduce((u, o) => (u[o] = e[o].type === "object" && e[o].properties ? W(e[o]) : Q(e[o].default), u), {});
|
|
80
|
+
return l.id = `${r}-${Date.now()}`, l;
|
|
81
81
|
}
|
|
82
82
|
function N(n, e = {}) {
|
|
83
|
-
const
|
|
84
|
-
if (
|
|
85
|
-
let l = W(
|
|
86
|
-
const
|
|
87
|
-
return l =
|
|
83
|
+
const r = q[n];
|
|
84
|
+
if (r) {
|
|
85
|
+
let l = W(r);
|
|
86
|
+
const u = _[n];
|
|
87
|
+
return l = u ? u({ getSchemaByType: N }, l, e) : l, l;
|
|
88
88
|
}
|
|
89
89
|
return null;
|
|
90
90
|
}
|
|
91
91
|
function ne(n, e) {
|
|
92
|
-
const
|
|
93
|
-
return Object.keys(n).reduce((l,
|
|
92
|
+
const r = W(e);
|
|
93
|
+
return Object.keys(n).reduce((l, u) => (l[u] && typeof l[u] == "object" ? Object.assign(l[u], n[u]) : l[u] = n[u], l), r), r;
|
|
94
94
|
}
|
|
95
95
|
function ae(n, e) {
|
|
96
|
-
return Object.keys(n).filter((l) => n[l] != null).reduce((l,
|
|
97
|
-
if (e.has(
|
|
98
|
-
const o = e.get(
|
|
96
|
+
return Object.keys(n).filter((l) => n[l] != null).reduce((l, u) => {
|
|
97
|
+
if (e.has(u)) {
|
|
98
|
+
const o = e.get(u);
|
|
99
99
|
if (typeof o == "string")
|
|
100
|
-
l[o] = n[
|
|
100
|
+
l[o] = n[u];
|
|
101
101
|
else {
|
|
102
|
-
const d = o(
|
|
102
|
+
const d = o(u, n[u], n);
|
|
103
103
|
Object.assign(l, d);
|
|
104
104
|
}
|
|
105
105
|
} else
|
|
106
|
-
l[
|
|
106
|
+
l[u] = n[u];
|
|
107
107
|
return l;
|
|
108
108
|
}, {});
|
|
109
109
|
}
|
|
110
|
-
function le(n, e,
|
|
110
|
+
function le(n, e, r = /* @__PURE__ */ new Map()) {
|
|
111
111
|
const l = ne(n, e);
|
|
112
|
-
return ae(l,
|
|
112
|
+
return ae(l, r);
|
|
113
113
|
}
|
|
114
114
|
function se(n = {}) {
|
|
115
115
|
function e(s, p, i, f) {
|
|
@@ -126,15 +126,15 @@ function se(n = {}) {
|
|
|
126
126
|
}
|
|
127
127
|
return !1;
|
|
128
128
|
}
|
|
129
|
-
function
|
|
129
|
+
function r(s, p, i, f) {
|
|
130
130
|
return f[s] && f[s].propertyValue && String(f[s].propertyValue.value) === String(i);
|
|
131
131
|
}
|
|
132
132
|
const l = /* @__PURE__ */ new Map([
|
|
133
133
|
["length", e],
|
|
134
|
-
["getProperty",
|
|
134
|
+
["getProperty", r]
|
|
135
135
|
]);
|
|
136
136
|
Object.keys(n).reduce((s, p) => (s.set(p, n[p]), s), l);
|
|
137
|
-
function
|
|
137
|
+
function u(s, p) {
|
|
138
138
|
const i = s;
|
|
139
139
|
return typeof p == "number" ? [{ target: i, operator: "length", param: null, value: Number(p) }] : typeof p == "boolean" ? [{ target: i, operator: "getProperty", param: s, value: !!p }] : typeof p == "object" ? Object.keys(p).map((f) => {
|
|
140
140
|
if (f === "length")
|
|
@@ -145,7 +145,7 @@ function se(n = {}) {
|
|
|
145
145
|
}
|
|
146
146
|
function o(s) {
|
|
147
147
|
return Object.keys(s).reduce((i, f) => {
|
|
148
|
-
const h =
|
|
148
|
+
const h = u(f, s[f]);
|
|
149
149
|
return i.push(...h), i;
|
|
150
150
|
}, []);
|
|
151
151
|
}
|
|
@@ -156,21 +156,21 @@ function se(n = {}) {
|
|
|
156
156
|
}
|
|
157
157
|
return !1;
|
|
158
158
|
}
|
|
159
|
-
function
|
|
159
|
+
function j(s, p) {
|
|
160
160
|
return o(s).reduce((h, g) => h && d(g, p), !0);
|
|
161
161
|
}
|
|
162
|
-
function
|
|
163
|
-
const i = Object.keys(s), f = i.includes("allOf"), h = i.includes("anyOf"), g = f || h,
|
|
164
|
-
return f ? !
|
|
162
|
+
function S(s, p) {
|
|
163
|
+
const i = Object.keys(s), f = i.includes("allOf"), h = i.includes("anyOf"), g = f || h, V = (g ? s[g ? f ? "allOf" : "anyOf" : "allOf"] : [s]).map((C) => j(C, p));
|
|
164
|
+
return f ? !V.includes(!1) : V.includes(!0);
|
|
165
165
|
}
|
|
166
|
-
return { parseValueSchema:
|
|
166
|
+
return { parseValueSchema: S };
|
|
167
167
|
}
|
|
168
|
-
const ce = {},
|
|
168
|
+
const ce = {}, ue = {};
|
|
169
169
|
se();
|
|
170
|
-
function
|
|
171
|
-
return q[e.title] = e, _[e.title] = l, ce[e.title] =
|
|
172
|
-
const
|
|
173
|
-
return Object.assign(
|
|
170
|
+
function re(n, e, r = /* @__PURE__ */ new Map(), l = (d, j, S) => j, u = {}, o = (d) => d) {
|
|
171
|
+
return q[e.title] = e, _[e.title] = l, ce[e.title] = u, ue[e.title] = o, (d = {}) => {
|
|
172
|
+
const j = le(d, e, r), S = Object.keys(n).reduce((s, p) => (s[p] = n[p].default, s), {});
|
|
173
|
+
return Object.assign(S, j);
|
|
174
174
|
};
|
|
175
175
|
}
|
|
176
176
|
function oe(n, e) {
|
|
@@ -179,7 +179,7 @@ function oe(n, e) {
|
|
|
179
179
|
const ie = /* @__PURE__ */ new Map([
|
|
180
180
|
["appearance", oe]
|
|
181
181
|
]);
|
|
182
|
-
function pe(n, e,
|
|
182
|
+
function pe(n, e, r) {
|
|
183
183
|
return e;
|
|
184
184
|
}
|
|
185
185
|
const fe = "capsule", de = "A Farris Component", ve = "object", me = {
|
|
@@ -230,22 +230,22 @@ const fe = "capsule", de = "A Farris Component", ve = "object", me = {
|
|
|
230
230
|
index: { type: Number, default: 0 },
|
|
231
231
|
show: { type: Boolean, default: !0 },
|
|
232
232
|
disabled: { type: Boolean, default: !1 }
|
|
233
|
-
}, J =
|
|
233
|
+
}, J = re(L, te, ie, pe, ye), z = /* @__PURE__ */ F({
|
|
234
234
|
name: "FCapsuleItem",
|
|
235
235
|
props: he,
|
|
236
236
|
emits: ["mounted", "active"],
|
|
237
237
|
setup(n, e) {
|
|
238
|
-
const
|
|
238
|
+
const r = y(), l = y(n.isActive);
|
|
239
239
|
D(() => n.isActive, (d) => {
|
|
240
240
|
l.value = d;
|
|
241
241
|
});
|
|
242
|
-
const
|
|
242
|
+
const u = M(() => ({
|
|
243
243
|
"f-capsule-item": !0,
|
|
244
244
|
"f-capsule-active-item": l.value,
|
|
245
245
|
"f-capsule-disabled": n.disabled
|
|
246
246
|
}));
|
|
247
247
|
P(() => {
|
|
248
|
-
e.emit("mounted",
|
|
248
|
+
e.emit("mounted", r, n.value);
|
|
249
249
|
});
|
|
250
250
|
function o(d) {
|
|
251
251
|
n.disabled || e.emit("active", d, {
|
|
@@ -254,8 +254,8 @@ const fe = "capsule", de = "A Farris Component", ve = "object", me = {
|
|
|
254
254
|
});
|
|
255
255
|
}
|
|
256
256
|
return () => A("div", {
|
|
257
|
-
ref:
|
|
258
|
-
class:
|
|
257
|
+
ref: r,
|
|
258
|
+
class: u.value,
|
|
259
259
|
onClick: (d) => o(d)
|
|
260
260
|
}, [n.icon && A("i", {
|
|
261
261
|
class: n.icon
|
|
@@ -266,55 +266,55 @@ const fe = "capsule", de = "A Farris Component", ve = "object", me = {
|
|
|
266
266
|
props: L,
|
|
267
267
|
emits: ["change", "update:modelValue"],
|
|
268
268
|
setup(n, e) {
|
|
269
|
-
const
|
|
269
|
+
const r = y(n.items), l = y(), u = 2, o = y(n.modelValue), d = y("none"), j = y(n.type), S = M(() => {
|
|
270
270
|
const a = {
|
|
271
271
|
"f-capsule-container": !0
|
|
272
272
|
};
|
|
273
|
-
return
|
|
274
|
-
}), s =
|
|
273
|
+
return j.value && (a[j.value] = !0), a;
|
|
274
|
+
}), s = M(() => ({})), p = M(() => ({
|
|
275
275
|
"f-capsule": !0
|
|
276
|
-
})), i = y(
|
|
276
|
+
})), i = y(u), f = y(0), h = y(0), g = M(() => ({
|
|
277
277
|
left: `${i.value}px`,
|
|
278
278
|
width: `${f.value}px`,
|
|
279
279
|
transition: d.value
|
|
280
|
-
})), R =
|
|
280
|
+
})), R = M(() => ({
|
|
281
281
|
width: `${h.value}px`
|
|
282
|
-
})),
|
|
283
|
-
function
|
|
282
|
+
})), O = /* @__PURE__ */ new Map();
|
|
283
|
+
function V(a) {
|
|
284
284
|
var t;
|
|
285
|
-
if (
|
|
286
|
-
const c = (t =
|
|
285
|
+
if (O.has(a.value)) {
|
|
286
|
+
const c = (t = O.get(a.value)) == null ? void 0 : t.value;
|
|
287
287
|
if (c) {
|
|
288
288
|
const m = c.getBoundingClientRect(), B = l.value.getBoundingClientRect();
|
|
289
|
-
i.value = m.left - B.left +
|
|
289
|
+
i.value = m.left - B.left + u + l.value.scrollLeft, f.value = m.width - 2 * u;
|
|
290
290
|
}
|
|
291
291
|
}
|
|
292
292
|
}
|
|
293
293
|
function w(a, t) {
|
|
294
294
|
const c = a.value;
|
|
295
|
-
o.value = c, e.emit("update:modelValue", c),
|
|
295
|
+
o.value = c, e.emit("update:modelValue", c), V(a), t && e.emit("change", c);
|
|
296
296
|
}
|
|
297
|
-
function
|
|
298
|
-
const t =
|
|
299
|
-
t > -1 && w(
|
|
297
|
+
function C(a) {
|
|
298
|
+
const t = r.value.findIndex((c) => c.value === a);
|
|
299
|
+
t > -1 && w(r.value[t], !1);
|
|
300
300
|
}
|
|
301
301
|
D(() => n.modelValue, (a) => {
|
|
302
|
-
o.value = a,
|
|
302
|
+
o.value = a, C(o.value);
|
|
303
303
|
}), D(() => n.items, async (a) => {
|
|
304
304
|
const t = a.filter((c) => c.show);
|
|
305
|
-
v(t),
|
|
305
|
+
v(t), r.value = t, await T(), C(o.value), h.value = Array.from(O.values()).reduce((c, m) => (c += m.value.clientWidth, c), 0);
|
|
306
306
|
}), P(async () => {
|
|
307
|
-
|
|
307
|
+
C(o.value), await T(), d.value = "0.1s ease-out all", h.value = Array.from(O.values()).reduce((a, t) => (a += t.value.clientWidth, a), 0);
|
|
308
308
|
});
|
|
309
309
|
function $(a, t) {
|
|
310
310
|
w(t, !0);
|
|
311
311
|
}
|
|
312
312
|
function E(a, t) {
|
|
313
|
-
|
|
313
|
+
O.set(t, a);
|
|
314
314
|
}
|
|
315
315
|
function v(a) {
|
|
316
|
-
Array.from(
|
|
317
|
-
a.find((m) => m.value === t) ||
|
|
316
|
+
Array.from(O.keys()).forEach((t) => {
|
|
317
|
+
a.find((m) => m.value === t) || O.delete(t);
|
|
318
318
|
});
|
|
319
319
|
}
|
|
320
320
|
function b(a, t) {
|
|
@@ -331,11 +331,11 @@ const fe = "capsule", de = "A Farris Component", ve = "object", me = {
|
|
|
331
331
|
}
|
|
332
332
|
return () => A("span", {
|
|
333
333
|
ref: l,
|
|
334
|
-
class:
|
|
334
|
+
class: S.value,
|
|
335
335
|
style: s.value
|
|
336
336
|
}, [A("span", {
|
|
337
337
|
class: "f-capsule-pane"
|
|
338
|
-
}, [
|
|
338
|
+
}, [r.value.map((a, t) => b(a, t))]), A("small", {
|
|
339
339
|
class: p.value,
|
|
340
340
|
style: g.value
|
|
341
341
|
}, null), A("div", {
|
|
@@ -344,15 +344,15 @@ const fe = "capsule", de = "A Farris Component", ve = "object", me = {
|
|
|
344
344
|
}, null)]);
|
|
345
345
|
}
|
|
346
346
|
});
|
|
347
|
-
function ge(n, e,
|
|
347
|
+
function ge(n, e, r) {
|
|
348
348
|
var E;
|
|
349
349
|
function l() {
|
|
350
350
|
}
|
|
351
|
-
const
|
|
352
|
-
function
|
|
351
|
+
const u = "", o = "", d = y();
|
|
352
|
+
function j() {
|
|
353
353
|
return (e == null ? void 0 : e.schema.componentType) !== "frame";
|
|
354
354
|
}
|
|
355
|
-
function
|
|
355
|
+
function S() {
|
|
356
356
|
return !1;
|
|
357
357
|
}
|
|
358
358
|
function s() {
|
|
@@ -374,16 +374,16 @@ function ge(n, e, u) {
|
|
|
374
374
|
return !b || !b.value ? null : b.value.canMove ? a : f(v.parent);
|
|
375
375
|
}
|
|
376
376
|
function h(v) {
|
|
377
|
-
return !!
|
|
377
|
+
return !!r;
|
|
378
378
|
}
|
|
379
379
|
function g() {
|
|
380
380
|
return (e == null ? void 0 : e.schema.label) || (e == null ? void 0 : e.schema.title) || (e == null ? void 0 : e.schema.name);
|
|
381
381
|
}
|
|
382
382
|
function R() {
|
|
383
383
|
}
|
|
384
|
-
function
|
|
384
|
+
function O(v, b) {
|
|
385
385
|
}
|
|
386
|
-
function
|
|
386
|
+
function V(v) {
|
|
387
387
|
const { componentType: b } = v;
|
|
388
388
|
let a = N(b, v);
|
|
389
389
|
const t = b.toLowerCase().replace("-", "_");
|
|
@@ -396,20 +396,20 @@ function ge(n, e, u) {
|
|
|
396
396
|
const B = a.toLowerCase().replace("-", "_");
|
|
397
397
|
return m && !m.id && m.type === a && (m.id = `${B}_${Math.random().toString().slice(2, 6)}`), m;
|
|
398
398
|
}
|
|
399
|
-
function
|
|
399
|
+
function C(v) {
|
|
400
400
|
}
|
|
401
401
|
function $(...v) {
|
|
402
402
|
}
|
|
403
403
|
return d.value = {
|
|
404
|
-
canMove:
|
|
405
|
-
canSelectParent:
|
|
404
|
+
canMove: j(),
|
|
405
|
+
canSelectParent: S(),
|
|
406
406
|
canDelete: s(),
|
|
407
407
|
canNested: !p(),
|
|
408
408
|
contents: e == null ? void 0 : e.schema.contents,
|
|
409
409
|
elementRef: n,
|
|
410
410
|
parent: (E = e == null ? void 0 : e.parent) == null ? void 0 : E.componentInstance,
|
|
411
411
|
schema: e == null ? void 0 : e.schema,
|
|
412
|
-
styles:
|
|
412
|
+
styles: u,
|
|
413
413
|
designerClass: o,
|
|
414
414
|
canAccepts: h,
|
|
415
415
|
getBelongedComponentInstance: i,
|
|
@@ -417,10 +417,10 @@ function ge(n, e, u) {
|
|
|
417
417
|
getDraggingDisplayText: g,
|
|
418
418
|
getPropConfig: $,
|
|
419
419
|
getDragScopeElement: R,
|
|
420
|
-
onAcceptMovedChildElement:
|
|
420
|
+
onAcceptMovedChildElement: O,
|
|
421
421
|
onAcceptNewChildElement: w,
|
|
422
|
-
onChildElementMovedOut:
|
|
423
|
-
addNewChildComponentSchema:
|
|
422
|
+
onChildElementMovedOut: C,
|
|
423
|
+
addNewChildComponentSchema: V,
|
|
424
424
|
updateDragAndDropRules: l,
|
|
425
425
|
triggerBelongedComponentToMoveWhenMoved: y(!1),
|
|
426
426
|
triggerBelongedComponentToDeleteWhenDeleted: y(!1)
|
|
@@ -431,46 +431,46 @@ const be = /* @__PURE__ */ F({
|
|
|
431
431
|
props: L,
|
|
432
432
|
emits: ["change", "update:modelValue"],
|
|
433
433
|
setup(n, e) {
|
|
434
|
-
const
|
|
434
|
+
const r = y(n.items), l = y(), u = 2, o = y(n.modelValue), d = y("none"), j = y(n.type), S = H("design-item-context"), s = ge(l, S);
|
|
435
435
|
P(() => {
|
|
436
436
|
l.value.componentInstance = s;
|
|
437
437
|
}), e.expose(s.value);
|
|
438
|
-
const p =
|
|
438
|
+
const p = M(() => {
|
|
439
439
|
const t = {
|
|
440
440
|
"f-capsule-container": !0
|
|
441
441
|
};
|
|
442
|
-
return
|
|
443
|
-
}), i =
|
|
442
|
+
return j.value && (t[j.value] = !0), t;
|
|
443
|
+
}), i = M(() => ({})), f = M(() => ({
|
|
444
444
|
"f-capsule": !0
|
|
445
|
-
})), h = y(
|
|
445
|
+
})), h = y(u), g = y(0), R = y(0), O = M(() => ({
|
|
446
446
|
left: `${h.value}px`,
|
|
447
447
|
width: `${g.value}px`,
|
|
448
448
|
transition: d.value
|
|
449
|
-
})),
|
|
449
|
+
})), V = M(() => ({
|
|
450
450
|
width: `${R.value}px`
|
|
451
451
|
})), w = /* @__PURE__ */ new Map();
|
|
452
|
-
function
|
|
452
|
+
function C(t) {
|
|
453
453
|
var c;
|
|
454
454
|
if (w.has(t.value)) {
|
|
455
455
|
const m = (c = w.get(t.value)) == null ? void 0 : c.value;
|
|
456
456
|
if (m) {
|
|
457
457
|
const B = m.getBoundingClientRect(), G = l.value.getBoundingClientRect();
|
|
458
|
-
h.value = B.left - G.left +
|
|
458
|
+
h.value = B.left - G.left + u + l.value.scrollLeft, g.value = B.width - 2 * u;
|
|
459
459
|
}
|
|
460
460
|
}
|
|
461
461
|
}
|
|
462
462
|
function $(t, c) {
|
|
463
463
|
const m = t.value;
|
|
464
|
-
o.value = m, e.emit("update:modelValue", m),
|
|
464
|
+
o.value = m, e.emit("update:modelValue", m), C(t), c && e.emit("change", m);
|
|
465
465
|
}
|
|
466
466
|
function E(t) {
|
|
467
|
-
const c =
|
|
468
|
-
c > -1 && $(
|
|
467
|
+
const c = r.value.findIndex((m) => m.value === t);
|
|
468
|
+
c > -1 && $(r.value[c], !1);
|
|
469
469
|
}
|
|
470
470
|
D(() => n.modelValue, (t) => {
|
|
471
471
|
o.value = t, E(o.value);
|
|
472
472
|
}), D(() => n.items, async (t) => {
|
|
473
|
-
|
|
473
|
+
r.value = t, await T(), E(o.value), R.value = Array.from(w.values()).reduce((c, m) => (c += m.value.clientWidth, c), 0);
|
|
474
474
|
}), P(async () => {
|
|
475
475
|
E(o.value), await T(), d.value = "0.1s ease-out all", R.value = Array.from(w.values()).reduce((t, c) => (t += c.value.clientWidth, t), 0);
|
|
476
476
|
});
|
|
@@ -496,19 +496,19 @@ const be = /* @__PURE__ */ F({
|
|
|
496
496
|
style: i.value
|
|
497
497
|
}, [A("span", {
|
|
498
498
|
class: "f-capsule-pane"
|
|
499
|
-
}, [
|
|
499
|
+
}, [r.value.map((t, c) => a(t, c))]), A("small", {
|
|
500
500
|
class: f.value,
|
|
501
|
-
style:
|
|
501
|
+
style: O.value
|
|
502
502
|
}, null), A("div", {
|
|
503
503
|
class: "f-capsule-board",
|
|
504
|
-
style:
|
|
504
|
+
style: V.value
|
|
505
505
|
}, null)]);
|
|
506
506
|
}
|
|
507
507
|
});
|
|
508
|
-
k.register = (n, e,
|
|
508
|
+
k.register = (n, e, r) => {
|
|
509
509
|
n.capsule = k, e.capsule = J;
|
|
510
510
|
};
|
|
511
|
-
k.registerDesigner = (n, e,
|
|
511
|
+
k.registerDesigner = (n, e, r) => {
|
|
512
512
|
n.capsule = be, e.capsule = J;
|
|
513
513
|
};
|
|
514
514
|
const we = U(k);
|