@farris/ui-vue 1.3.5 → 1.3.6
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 +16 -16
- package/components/accordion/index.umd.cjs +1 -1
- package/components/avatar/index.esm.js +65 -65
- package/components/avatar/index.umd.cjs +1 -1
- package/components/button-edit/index.esm.js +13 -13
- package/components/button-edit/index.umd.cjs +1 -1
- package/components/calendar/index.esm.js +504 -490
- package/components/calendar/index.umd.cjs +1 -1
- package/components/capsule/index.esm.js +247 -233
- package/components/capsule/index.umd.cjs +1 -1
- package/components/checkbox/index.esm.js +356 -344
- package/components/checkbox/index.umd.cjs +1 -1
- package/components/color-picker/index.esm.js +159 -145
- package/components/color-picker/index.umd.cjs +2 -2
- package/components/combo-list/index.esm.js +127 -128
- package/components/combo-list/index.umd.cjs +1 -1
- package/components/combo-tree/index.esm.js +15 -15
- package/components/combo-tree/index.umd.cjs +1 -1
- package/components/component/index.esm.js +101 -87
- package/components/component/index.umd.cjs +1 -1
- package/components/condition/index.esm.js +7 -5
- package/components/condition/index.umd.cjs +1 -1
- package/components/content-container/index.esm.js +181 -167
- package/components/content-container/index.umd.cjs +1 -1
- package/components/data-grid/index.esm.js +4057 -4304
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/data-view/index.esm.js +2450 -2467
- package/components/data-view/index.umd.cjs +1 -1
- package/components/date-picker/index.esm.js +789 -777
- package/components/date-picker/index.umd.cjs +1 -1
- package/components/designer-canvas/index.esm.js +3593 -3585
- package/components/designer-canvas/index.umd.cjs +1 -1
- package/components/dropdown/index.esm.js +257 -243
- package/components/dropdown/index.umd.cjs +2 -2
- package/components/dynamic-form/index.esm.js +322 -306
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/dynamic-resolver/index.esm.js +177 -163
- package/components/dynamic-resolver/index.umd.cjs +1 -1
- package/components/event-parameter/index.esm.js +163 -2643
- package/components/event-parameter/index.umd.cjs +1 -1
- package/components/events-editor/index.esm.js +500 -486
- package/components/events-editor/index.umd.cjs +1 -1
- package/components/expression-editor/index.esm.js +37 -37
- package/components/expression-editor/index.umd.cjs +1 -1
- package/components/external-container/index.esm.js +485 -470
- package/components/external-container/index.umd.cjs +1 -1
- package/components/field-selector/index.esm.js +2611 -2623
- package/components/field-selector/index.umd.cjs +1 -1
- package/components/filter-bar/index.esm.js +3825 -3837
- package/components/filter-bar/index.umd.cjs +1 -1
- package/components/flow-canvas/index.esm.js +3720 -3712
- package/components/flow-canvas/index.umd.cjs +1 -1
- package/components/image-cropper/index.esm.js +402 -388
- package/components/image-cropper/index.umd.cjs +1 -1
- package/components/input-group/index.esm.js +201 -202
- package/components/input-group/index.umd.cjs +1 -1
- package/components/layout/index.esm.js +264 -245
- package/components/layout/index.umd.cjs +1 -1
- package/components/list-nav/index.esm.js +157 -143
- package/components/list-nav/index.umd.cjs +1 -1
- package/components/list-view/index.esm.js +312 -296
- package/components/list-view/index.umd.cjs +1 -1
- package/components/lookup/index.esm.js +4748 -4992
- package/components/lookup/index.umd.cjs +1 -1
- package/components/mapping-editor/index.esm.js +4215 -4462
- package/components/mapping-editor/index.umd.cjs +1 -1
- package/components/nav/index.esm.js +169 -155
- package/components/nav/index.umd.cjs +2 -2
- package/components/number-range/index.esm.js +150 -137
- package/components/number-range/index.umd.cjs +1 -1
- package/components/number-spinner/index.esm.js +207 -194
- package/components/number-spinner/index.umd.cjs +1 -1
- package/components/order/index.esm.js +427 -414
- package/components/order/index.umd.cjs +1 -1
- package/components/page-footer/index.esm.js +22 -22
- package/components/page-footer/index.umd.cjs +1 -1
- package/components/page-header/index.esm.js +510 -492
- package/components/page-header/index.umd.cjs +1 -1
- package/components/pagination/index.esm.js +192 -178
- package/components/pagination/index.umd.cjs +1 -1
- package/components/progress/index.esm.js +234 -220
- package/components/progress/index.umd.cjs +3 -3
- package/components/property-editor/index.esm.js +288 -277
- package/components/property-editor/index.umd.cjs +2 -2
- package/components/property-panel/index.esm.js +62 -61
- package/components/property-panel/index.umd.cjs +1 -1
- package/components/query-solution/index.esm.js +3015 -3027
- package/components/query-solution/index.umd.cjs +5 -5
- package/components/radio-button/index.esm.js +64 -64
- package/components/radio-button/index.umd.cjs +1 -1
- package/components/radio-group/index.esm.js +293 -280
- package/components/radio-group/index.umd.cjs +1 -1
- package/components/rate/index.esm.js +222 -208
- package/components/rate/index.umd.cjs +1 -1
- package/components/response-layout/index.esm.js +187 -173
- package/components/response-layout/index.umd.cjs +1 -1
- package/components/response-layout-editor/index.esm.js +554 -542
- package/components/response-layout-editor/index.umd.cjs +1 -1
- package/components/response-toolbar/index.esm.js +483 -469
- package/components/response-toolbar/index.umd.cjs +1 -1
- package/components/schema-selector/index.esm.js +632 -617
- package/components/schema-selector/index.umd.cjs +2 -2
- package/components/search-box/index.esm.js +228 -214
- package/components/search-box/index.umd.cjs +1 -1
- package/components/section/index.esm.js +419 -406
- package/components/section/index.umd.cjs +1 -1
- package/components/smoke-detector/index.esm.js +162 -148
- package/components/smoke-detector/index.umd.cjs +1 -1
- package/components/splitter/index.esm.js +308 -284
- package/components/splitter/index.umd.cjs +1 -1
- package/components/step/index.esm.js +279 -265
- package/components/step/index.umd.cjs +1 -1
- package/components/switch/index.esm.js +183 -170
- package/components/switch/index.umd.cjs +1 -1
- package/components/tabs/index.esm.js +307 -294
- package/components/tabs/index.umd.cjs +1 -1
- package/components/tags/index.esm.js +320 -306
- package/components/tags/index.umd.cjs +1 -1
- package/components/text/index.esm.js +245 -231
- package/components/text/index.umd.cjs +1 -1
- package/components/textarea/index.esm.js +260 -247
- package/components/textarea/index.umd.cjs +1 -1
- package/components/time-picker/index.esm.js +409 -396
- package/components/time-picker/index.umd.cjs +1 -1
- package/components/transfer/index.esm.js +424 -410
- package/components/transfer/index.umd.cjs +1 -1
- package/components/tree-grid/index.esm.js +2994 -3006
- package/components/tree-grid/index.umd.cjs +1 -1
- package/components/tree-view/index.esm.js +749 -733
- package/components/tree-view/index.umd.cjs +1 -1
- package/components/uploader/index.esm.js +325 -311
- package/components/uploader/index.umd.cjs +2 -2
- package/components/verify-detail/index.esm.js +304 -290
- package/components/verify-detail/index.umd.cjs +1 -1
- package/components/video/index.esm.js +99 -85
- package/components/video/index.umd.cjs +1 -1
- package/components/weather/index.esm.js +947 -933
- package/components/weather/index.umd.cjs +4 -4
- package/farris.all.esm.js +7750 -7990
- package/farris.all.umd.cjs +12 -12
- package/package.json +1 -1
- package/types/data-view/composition/types.d.ts +0 -1
- package/types/entity-binding-selector/composition/use-entity-tree.d.ts +3 -0
- package/types/entity-binding-selector/composition/use-field-tree.d.ts +1 -0
- package/components/event-parameter/index.css +0 -1
- package/types/data-grid/src/components/data/data-grid-area.component.d.ts +0 -8
- package/types/data-grid/src/components/data/data-grid-area.props.d.ts +0 -3
|
@@ -1,117 +1,131 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import { isPlainObject as
|
|
1
|
+
import { defineComponent as j, ref as m, computed as w, watch as B, createVNode as v, Fragment as X, inject as C, onMounted as U, resolveComponent as W } from "vue";
|
|
2
|
+
import z from "../button-edit/index.esm.js";
|
|
3
|
+
import { isPlainObject as k, cloneDeep as N } from "lodash-es";
|
|
4
4
|
import G from "../list-view/index.esm.js";
|
|
5
5
|
import J from "../loading/index.esm.js";
|
|
6
|
-
const
|
|
7
|
-
function
|
|
8
|
-
const { properties: e, title:
|
|
9
|
-
if (
|
|
10
|
-
const
|
|
11
|
-
|
|
6
|
+
const A = {}, H = {};
|
|
7
|
+
function P(t) {
|
|
8
|
+
const { properties: e, title: c, ignore: o } = t, a = o && Array.isArray(o), u = Object.keys(e).reduce((s, p) => ((!a || !o.find((y) => y === p)) && (s[p] = e[p].type === "object" && e[p].properties ? P(e[p]) : N(e[p].default)), s), {});
|
|
9
|
+
if (c && (!a || !o.find((s) => s === "id"))) {
|
|
10
|
+
const s = c.toLowerCase().replace(/-/g, "_");
|
|
11
|
+
u.id = `${s}_${Math.random().toString().slice(2, 6)}`;
|
|
12
12
|
}
|
|
13
|
-
return
|
|
13
|
+
return u;
|
|
14
14
|
}
|
|
15
|
-
function
|
|
16
|
-
const o =
|
|
15
|
+
function Q(t) {
|
|
16
|
+
const { properties: e, title: c, required: o } = t;
|
|
17
|
+
if (o && Array.isArray(o)) {
|
|
18
|
+
const a = o.reduce((u, s) => (u[s] = e[s].type === "object" && e[s].properties ? P(e[s]) : N(e[s].default), u), {});
|
|
19
|
+
if (c && o.find((u) => u === "id")) {
|
|
20
|
+
const u = c.toLowerCase().replace(/-/g, "_");
|
|
21
|
+
a.id = `${u}_${Math.random().toString().slice(2, 6)}`;
|
|
22
|
+
}
|
|
23
|
+
return a;
|
|
24
|
+
}
|
|
25
|
+
return {
|
|
26
|
+
type: c
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
function T(t, e = {}, c) {
|
|
30
|
+
const o = A[t];
|
|
17
31
|
if (o) {
|
|
18
|
-
let
|
|
19
|
-
const
|
|
20
|
-
return
|
|
32
|
+
let a = Q(o);
|
|
33
|
+
const u = H[t];
|
|
34
|
+
return a = u ? u({ getSchemaByType: T }, a, e, c) : a, a;
|
|
21
35
|
}
|
|
22
36
|
return null;
|
|
23
37
|
}
|
|
24
|
-
function Q(t, e) {
|
|
25
|
-
const i = M(e);
|
|
26
|
-
return Object.keys(i).reduce((o, l) => (o[l] && N(o[l]) && N(t[l] || !t[l]) ? Object.assign(o[l], t[l] || {}) : o[l] = t[l], o), i), i;
|
|
27
|
-
}
|
|
28
38
|
function Y(t, e) {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
39
|
+
const c = P(e);
|
|
40
|
+
return Object.keys(c).reduce((o, a) => (Object.prototype.hasOwnProperty.call(t, a) && (o[a] && k(o[a]) && k(t[a] || !t[a]) ? Object.assign(o[a], t[a] || {}) : o[a] = t[a]), o), c), c;
|
|
41
|
+
}
|
|
42
|
+
function Z(t, e) {
|
|
43
|
+
return Object.keys(t).filter((o) => t[o] != null).reduce((o, a) => {
|
|
44
|
+
if (e.has(a)) {
|
|
45
|
+
const u = e.get(a);
|
|
46
|
+
if (typeof u == "string")
|
|
47
|
+
o[u] = t[a];
|
|
34
48
|
else {
|
|
35
|
-
const
|
|
36
|
-
Object.assign(o,
|
|
49
|
+
const s = u(a, t[a], t);
|
|
50
|
+
Object.assign(o, s);
|
|
37
51
|
}
|
|
38
52
|
} else
|
|
39
|
-
o[
|
|
53
|
+
o[a] = t[a];
|
|
40
54
|
return o;
|
|
41
55
|
}, {});
|
|
42
56
|
}
|
|
43
|
-
function
|
|
44
|
-
const o =
|
|
45
|
-
return
|
|
57
|
+
function x(t, e, c = /* @__PURE__ */ new Map()) {
|
|
58
|
+
const o = Y(t, e);
|
|
59
|
+
return Z(o, c);
|
|
46
60
|
}
|
|
47
|
-
function
|
|
48
|
-
function e(
|
|
49
|
-
if (typeof
|
|
50
|
-
return
|
|
51
|
-
if (typeof
|
|
52
|
-
const
|
|
53
|
-
if (
|
|
54
|
-
return Number(
|
|
55
|
-
if (
|
|
56
|
-
return Number(
|
|
57
|
-
if (
|
|
58
|
-
return Number(
|
|
61
|
+
function K(t = {}) {
|
|
62
|
+
function e(r, n, i, f) {
|
|
63
|
+
if (typeof i == "number")
|
|
64
|
+
return f[r].length === i;
|
|
65
|
+
if (typeof i == "object") {
|
|
66
|
+
const l = Object.keys(i)[0], d = i[l];
|
|
67
|
+
if (l === "not")
|
|
68
|
+
return Number(f[r].length) !== Number(d);
|
|
69
|
+
if (l === "moreThan")
|
|
70
|
+
return Number(f[r].length) >= Number(d);
|
|
71
|
+
if (l === "lessThan")
|
|
72
|
+
return Number(f[r].length) <= Number(d);
|
|
59
73
|
}
|
|
60
74
|
return !1;
|
|
61
75
|
}
|
|
62
|
-
function
|
|
63
|
-
return
|
|
76
|
+
function c(r, n, i, f) {
|
|
77
|
+
return f[r] && f[r].propertyValue && String(f[r].propertyValue.value) === String(i);
|
|
64
78
|
}
|
|
65
79
|
const o = /* @__PURE__ */ new Map([
|
|
66
80
|
["length", e],
|
|
67
|
-
["getProperty",
|
|
81
|
+
["getProperty", c]
|
|
68
82
|
]);
|
|
69
|
-
Object.keys(t).reduce((
|
|
70
|
-
function
|
|
71
|
-
const
|
|
72
|
-
return typeof n == "number" ? [{ target:
|
|
73
|
-
if (
|
|
74
|
-
return { target:
|
|
75
|
-
const
|
|
76
|
-
return { target:
|
|
83
|
+
Object.keys(t).reduce((r, n) => (r.set(n, t[n]), r), o);
|
|
84
|
+
function a(r, n) {
|
|
85
|
+
const i = r;
|
|
86
|
+
return typeof n == "number" ? [{ target: i, operator: "length", param: null, value: Number(n) }] : typeof n == "boolean" ? [{ target: i, operator: "getProperty", param: r, value: !!n }] : typeof n == "object" ? Object.keys(n).map((f) => {
|
|
87
|
+
if (f === "length")
|
|
88
|
+
return { target: i, operator: "length", param: null, value: n[f] };
|
|
89
|
+
const l = f, d = n[f];
|
|
90
|
+
return { target: i, operator: "getProperty", param: l, value: d };
|
|
77
91
|
}) : [];
|
|
78
92
|
}
|
|
79
|
-
function
|
|
80
|
-
return Object.keys(
|
|
81
|
-
const
|
|
82
|
-
return
|
|
93
|
+
function u(r) {
|
|
94
|
+
return Object.keys(r).reduce((i, f) => {
|
|
95
|
+
const l = a(f, r[f]);
|
|
96
|
+
return i.push(...l), i;
|
|
83
97
|
}, []);
|
|
84
98
|
}
|
|
85
|
-
function
|
|
86
|
-
if (o.has(
|
|
87
|
-
const
|
|
88
|
-
return
|
|
99
|
+
function s(r, n) {
|
|
100
|
+
if (o.has(r.operator)) {
|
|
101
|
+
const i = o.get(r.operator);
|
|
102
|
+
return i && i(r.target, r.param, r.value, n) || !1;
|
|
89
103
|
}
|
|
90
104
|
return !1;
|
|
91
105
|
}
|
|
92
|
-
function
|
|
93
|
-
return
|
|
106
|
+
function p(r, n) {
|
|
107
|
+
return u(r).reduce((l, d) => l && s(d, n), !0);
|
|
94
108
|
}
|
|
95
|
-
function
|
|
96
|
-
const
|
|
97
|
-
return
|
|
109
|
+
function y(r, n) {
|
|
110
|
+
const i = Object.keys(r), f = i.includes("allOf"), l = i.includes("anyOf"), d = f || l, F = (d ? r[d ? f ? "allOf" : "anyOf" : "allOf"] : [r]).map((R) => p(R, n));
|
|
111
|
+
return f ? !F.includes(!1) : F.includes(!0);
|
|
98
112
|
}
|
|
99
|
-
return { parseValueSchema:
|
|
113
|
+
return { parseValueSchema: y };
|
|
100
114
|
}
|
|
101
|
-
const
|
|
102
|
-
|
|
103
|
-
function
|
|
104
|
-
return
|
|
105
|
-
const
|
|
106
|
-
return Object.assign(
|
|
115
|
+
const I = {}, ee = {};
|
|
116
|
+
K();
|
|
117
|
+
function te(t, e, c = /* @__PURE__ */ new Map(), o = (s, p, y, r) => p, a = {}, u = (s) => s) {
|
|
118
|
+
return A[e.title] = e, H[e.title] = o, I[e.title] = a, ee[e.title] = u, (s = {}) => {
|
|
119
|
+
const p = x(s, e, c), y = Object.keys(t).reduce((r, n) => (r[n] = t[n].default, r), {});
|
|
120
|
+
return Object.assign(y, p);
|
|
107
121
|
};
|
|
108
122
|
}
|
|
109
|
-
function
|
|
123
|
+
function ne(t, e) {
|
|
110
124
|
return { customClass: e.class, customStyle: e.style };
|
|
111
125
|
}
|
|
112
|
-
const
|
|
113
|
-
["appearance",
|
|
114
|
-
]),
|
|
126
|
+
const oe = /* @__PURE__ */ new Map([
|
|
127
|
+
["appearance", ne]
|
|
128
|
+
]), ae = "https://json-schema.org/draft/2020-12/schema", re = "https://farris-design.gitee.io/search-box.schema.json", le = "search-box", ce = "A Farris Component", ie = "object", ue = {
|
|
115
129
|
id: {
|
|
116
130
|
description: "The unique identifier for a search-box",
|
|
117
131
|
type: "string"
|
|
@@ -173,22 +187,22 @@ const ne = /* @__PURE__ */ new Map([
|
|
|
173
187
|
type: "boolean",
|
|
174
188
|
default: !0
|
|
175
189
|
}
|
|
176
|
-
},
|
|
190
|
+
}, se = [
|
|
177
191
|
"id",
|
|
178
192
|
"type"
|
|
179
|
-
],
|
|
180
|
-
$schema:
|
|
181
|
-
$id:
|
|
182
|
-
title:
|
|
183
|
-
description:
|
|
184
|
-
type:
|
|
185
|
-
properties:
|
|
186
|
-
required:
|
|
193
|
+
], fe = {
|
|
194
|
+
$schema: ae,
|
|
195
|
+
$id: re,
|
|
196
|
+
title: le,
|
|
197
|
+
description: ce,
|
|
198
|
+
type: ie,
|
|
199
|
+
properties: ue,
|
|
200
|
+
required: se
|
|
187
201
|
};
|
|
188
|
-
function
|
|
202
|
+
function pe(t, e, c) {
|
|
189
203
|
return e;
|
|
190
204
|
}
|
|
191
|
-
const
|
|
205
|
+
const de = "search-box", he = "A Farris Component", me = "object", ye = {
|
|
192
206
|
basic: {
|
|
193
207
|
description: "Basic Infomation",
|
|
194
208
|
title: "基本信息",
|
|
@@ -211,11 +225,11 @@ const pe = "search-box", de = "A Farris Component", he = "object", me = {
|
|
|
211
225
|
}
|
|
212
226
|
}
|
|
213
227
|
}, ge = {
|
|
214
|
-
title:
|
|
215
|
-
description:
|
|
216
|
-
type:
|
|
217
|
-
categories:
|
|
218
|
-
},
|
|
228
|
+
title: de,
|
|
229
|
+
description: he,
|
|
230
|
+
type: me,
|
|
231
|
+
categories: ye
|
|
232
|
+
}, M = {
|
|
219
233
|
/**
|
|
220
234
|
* 自定义图标
|
|
221
235
|
*/
|
|
@@ -265,7 +279,7 @@ const pe = "search-box", de = "A Farris Component", he = "object", me = {
|
|
|
265
279
|
* 值变化事件触发时机
|
|
266
280
|
*/
|
|
267
281
|
updateOn: { default: "blur", type: String }
|
|
268
|
-
},
|
|
282
|
+
}, q = te(M, fe, oe, pe, ge), be = {
|
|
269
283
|
data: { type: Array, default: [] },
|
|
270
284
|
/** 确认结果事件 */
|
|
271
285
|
onConfirmResult: { type: Function, default: () => {
|
|
@@ -289,54 +303,54 @@ const pe = "search-box", de = "A Farris Component", he = "object", me = {
|
|
|
289
303
|
*/
|
|
290
304
|
maxHeight: { default: 350, type: Number },
|
|
291
305
|
loading: { default: !1, type: Boolean }
|
|
292
|
-
}, L = /* @__PURE__ */
|
|
306
|
+
}, L = /* @__PURE__ */ j({
|
|
293
307
|
name: "FSearchBoxContainer",
|
|
294
|
-
props:
|
|
308
|
+
props: be,
|
|
295
309
|
emits: ["confirmResult", "searchedValue"],
|
|
296
310
|
setup(t, e) {
|
|
297
|
-
const
|
|
298
|
-
slots:
|
|
299
|
-
} = e,
|
|
311
|
+
const c = m(t.data), o = m(), {
|
|
312
|
+
slots: a
|
|
313
|
+
} = e, u = w(() => ({
|
|
300
314
|
"search-box-container": !0,
|
|
301
315
|
"f-utils-overflow-xhya": !0,
|
|
302
316
|
"position-relative": !0
|
|
303
317
|
}));
|
|
304
|
-
function p(n) {
|
|
305
|
-
var c;
|
|
306
|
-
(c = o.value) == null || c.search(n);
|
|
307
|
-
}
|
|
308
318
|
function s(n) {
|
|
319
|
+
var i;
|
|
320
|
+
(i = o.value) == null || i.search(n);
|
|
321
|
+
}
|
|
322
|
+
function p(n) {
|
|
309
323
|
n.length && (e.emit("confirmResult", n[0].name), e.emit("searchedValue", n));
|
|
310
324
|
}
|
|
311
|
-
function
|
|
312
|
-
return
|
|
325
|
+
function y(n) {
|
|
326
|
+
return a.default ? v(X, null, [a.default(n)]) : v("span", null, [n.item[t.textField]]);
|
|
313
327
|
}
|
|
314
|
-
const
|
|
328
|
+
const r = w(() => {
|
|
315
329
|
const n = {};
|
|
316
330
|
return n.padding = "8px", t.maxHeight !== void 0 && t.maxHeight > 0 && (n.maxHeight = `${t.maxHeight}px`), n;
|
|
317
331
|
});
|
|
318
|
-
return
|
|
332
|
+
return B(() => t.loading, (n) => {
|
|
319
333
|
console.log("loading状态改变" + n);
|
|
320
|
-
}),
|
|
321
|
-
n !==
|
|
334
|
+
}), B(() => t.data, (n) => {
|
|
335
|
+
n !== c.value && (c.value = n), o.value.updateDataSource(n);
|
|
322
336
|
}), e.expose({
|
|
323
|
-
search:
|
|
337
|
+
search: s
|
|
324
338
|
}), () => {
|
|
325
339
|
const n = {
|
|
326
|
-
content:
|
|
340
|
+
content: y
|
|
327
341
|
};
|
|
328
342
|
return v("div", {
|
|
329
|
-
class:
|
|
330
|
-
style:
|
|
343
|
+
class: u.value,
|
|
344
|
+
style: r.value
|
|
331
345
|
}, [v(J, {
|
|
332
346
|
ref: "loadingInstance",
|
|
333
347
|
isActive: t.loading
|
|
334
348
|
}, null), v(G, {
|
|
335
349
|
ref: o,
|
|
336
350
|
itemClass: "dropdown-item",
|
|
337
|
-
data:
|
|
351
|
+
data: c.value,
|
|
338
352
|
view: "ContentView",
|
|
339
|
-
onClickItem: (
|
|
353
|
+
onClickItem: (i) => p(i.data),
|
|
340
354
|
idField: t.idField,
|
|
341
355
|
textField: t.textField,
|
|
342
356
|
titleField: t.textField,
|
|
@@ -344,55 +358,55 @@ const pe = "search-box", de = "A Farris Component", he = "object", me = {
|
|
|
344
358
|
}, n)]);
|
|
345
359
|
};
|
|
346
360
|
}
|
|
347
|
-
}),
|
|
361
|
+
}), V = /* @__PURE__ */ j({
|
|
348
362
|
name: "FSearchBox",
|
|
349
|
-
props:
|
|
363
|
+
props: M,
|
|
350
364
|
emits: ["update:modelValue", "change", "selectedValue", "clickButton"],
|
|
351
365
|
setup(t, e) {
|
|
352
366
|
m(t.data);
|
|
353
|
-
const
|
|
367
|
+
const c = m(), o = m(), a = m(t.placeholder), u = '<i class="f-icon f-icon-clockwise f-icon-spin"></i>', s = w(() => t.loading ? u : t.buttonContent);
|
|
354
368
|
m(t.editable);
|
|
355
|
-
const
|
|
356
|
-
|
|
357
|
-
var
|
|
358
|
-
(
|
|
359
|
-
}),
|
|
360
|
-
|
|
369
|
+
const p = m(t.modelValue);
|
|
370
|
+
B(p, (l) => {
|
|
371
|
+
var d;
|
|
372
|
+
(d = o.value) == null || d.search(l), e.emit("update:modelValue", l);
|
|
373
|
+
}), B(() => t.modelValue, (l) => {
|
|
374
|
+
p.value = l;
|
|
361
375
|
});
|
|
362
|
-
function
|
|
363
|
-
|
|
376
|
+
function y(l) {
|
|
377
|
+
c.value.commitValue(l);
|
|
364
378
|
}
|
|
365
|
-
function
|
|
366
|
-
e.emit("change",
|
|
379
|
+
function r(l) {
|
|
380
|
+
e.emit("change", l);
|
|
367
381
|
}
|
|
368
|
-
function n(
|
|
369
|
-
e.emit("selectedValue",
|
|
382
|
+
function n(l) {
|
|
383
|
+
e.emit("selectedValue", l);
|
|
370
384
|
}
|
|
371
|
-
function
|
|
372
|
-
e.emit("clickButton",
|
|
385
|
+
function i(l) {
|
|
386
|
+
e.emit("clickButton", l);
|
|
373
387
|
}
|
|
374
|
-
function
|
|
375
|
-
|
|
388
|
+
function f() {
|
|
389
|
+
c.value.togglePopup();
|
|
376
390
|
}
|
|
377
391
|
return e.expose({
|
|
378
|
-
togglePopup:
|
|
392
|
+
togglePopup: f
|
|
379
393
|
}), () => {
|
|
380
|
-
const
|
|
394
|
+
const l = {
|
|
381
395
|
default: e.slots.default
|
|
382
396
|
};
|
|
383
|
-
return v(
|
|
384
|
-
ref:
|
|
385
|
-
"button-content":
|
|
397
|
+
return v(z, {
|
|
398
|
+
ref: c,
|
|
399
|
+
"button-content": s.value,
|
|
386
400
|
"custom-class": t.customClass,
|
|
387
401
|
updateOn: t.updateOn,
|
|
388
|
-
placeholder:
|
|
389
|
-
onChange: (
|
|
390
|
-
onClickButton: (
|
|
402
|
+
placeholder: a.value,
|
|
403
|
+
onChange: (d) => r(d),
|
|
404
|
+
onClickButton: (d) => i(d),
|
|
391
405
|
disable: t.disable,
|
|
392
406
|
"enable-clear": !0,
|
|
393
407
|
"button-behavior": "Execute",
|
|
394
|
-
modelValue:
|
|
395
|
-
"onUpdate:modelValue": (
|
|
408
|
+
modelValue: p.value,
|
|
409
|
+
"onUpdate:modelValue": (d) => p.value = d,
|
|
396
410
|
"popup-host": t.popupHost,
|
|
397
411
|
"popup-right-boundary": t.popupRightBoundary,
|
|
398
412
|
"popup-offset-x": t.popupOffsetX,
|
|
@@ -402,29 +416,29 @@ const pe = "search-box", de = "A Farris Component", he = "object", me = {
|
|
|
402
416
|
default: () => [t.showDropdown && v(L, {
|
|
403
417
|
ref: o,
|
|
404
418
|
data: t.data,
|
|
405
|
-
onConfirmResult:
|
|
406
|
-
onSearchedValue: (
|
|
419
|
+
onConfirmResult: y,
|
|
420
|
+
onSearchedValue: (d) => n(d),
|
|
407
421
|
loading: t.loading,
|
|
408
422
|
maxHeight: t.maxHeight
|
|
409
|
-
},
|
|
423
|
+
}, l)],
|
|
410
424
|
...e.slots
|
|
411
425
|
});
|
|
412
426
|
};
|
|
413
427
|
}
|
|
414
428
|
});
|
|
415
|
-
function
|
|
416
|
-
var
|
|
417
|
-
const o = "",
|
|
418
|
-
function
|
|
429
|
+
function ve(t, e, c) {
|
|
430
|
+
var $;
|
|
431
|
+
const o = "", a = "", u = m();
|
|
432
|
+
function s() {
|
|
419
433
|
return (e == null ? void 0 : e.schema.componentType) !== "frame";
|
|
420
434
|
}
|
|
421
|
-
function
|
|
435
|
+
function p() {
|
|
422
436
|
return !1;
|
|
423
437
|
}
|
|
424
|
-
function
|
|
438
|
+
function y() {
|
|
425
439
|
return (e == null ? void 0 : e.schema.componentType) !== "frame";
|
|
426
440
|
}
|
|
427
|
-
function
|
|
441
|
+
function r() {
|
|
428
442
|
return (e == null ? void 0 : e.schema.componentType) === "frame";
|
|
429
443
|
}
|
|
430
444
|
function n(h) {
|
|
@@ -432,28 +446,28 @@ function be(t, e, i) {
|
|
|
432
446
|
return null;
|
|
433
447
|
if (h.value.schema && h.value.schema.type === "component")
|
|
434
448
|
return h.value;
|
|
435
|
-
const b = m(h == null ? void 0 : h.value.parent),
|
|
436
|
-
return
|
|
449
|
+
const b = m(h == null ? void 0 : h.value.parent), g = n(b);
|
|
450
|
+
return g || null;
|
|
437
451
|
}
|
|
438
|
-
function
|
|
439
|
-
const { componentInstance: b, designerItemElementRef:
|
|
440
|
-
return !b || !b.value ? null : b.value.canMove ?
|
|
452
|
+
function i(h = e) {
|
|
453
|
+
const { componentInstance: b, designerItemElementRef: g } = h;
|
|
454
|
+
return !b || !b.value ? null : b.value.canMove ? g : i(h.parent);
|
|
441
455
|
}
|
|
442
|
-
function
|
|
443
|
-
return !!
|
|
456
|
+
function f(h) {
|
|
457
|
+
return !!c;
|
|
444
458
|
}
|
|
445
|
-
function
|
|
459
|
+
function l() {
|
|
446
460
|
return (e == null ? void 0 : e.schema.label) || (e == null ? void 0 : e.schema.title) || (e == null ? void 0 : e.schema.name);
|
|
447
461
|
}
|
|
448
|
-
function
|
|
462
|
+
function d() {
|
|
449
463
|
}
|
|
450
464
|
function O(h, b) {
|
|
451
465
|
}
|
|
452
466
|
function D(h, b) {
|
|
453
|
-
const { componentType:
|
|
454
|
-
let
|
|
455
|
-
const
|
|
456
|
-
return
|
|
467
|
+
const { componentType: g } = h;
|
|
468
|
+
let S = T(g, h, b);
|
|
469
|
+
const _ = g.toLowerCase().replace(/-/g, "_");
|
|
470
|
+
return S && !S.id && S.type === g && (S.id = `${_}_${Math.random().toString().slice(2, 6)}`), S;
|
|
457
471
|
}
|
|
458
472
|
function F(h) {
|
|
459
473
|
}
|
|
@@ -461,69 +475,69 @@ function be(t, e, i) {
|
|
|
461
475
|
}
|
|
462
476
|
function R() {
|
|
463
477
|
e != null && e.schema.contents && e.schema.contents.map((h) => {
|
|
464
|
-
var
|
|
478
|
+
var S;
|
|
465
479
|
let b = h.id;
|
|
466
480
|
h.type === "component-ref" && (b = h.component);
|
|
467
|
-
const
|
|
468
|
-
(
|
|
481
|
+
const g = t.value.querySelector(`#${b}-design-item`);
|
|
482
|
+
(S = g == null ? void 0 : g.componentInstance) != null && S.value.onRemoveComponent && g.componentInstance.value.onRemoveComponent();
|
|
469
483
|
});
|
|
470
484
|
}
|
|
471
|
-
return
|
|
472
|
-
canMove:
|
|
473
|
-
canSelectParent:
|
|
474
|
-
canDelete:
|
|
475
|
-
canNested: !
|
|
485
|
+
return u.value = {
|
|
486
|
+
canMove: s(),
|
|
487
|
+
canSelectParent: p(),
|
|
488
|
+
canDelete: y(),
|
|
489
|
+
canNested: !r(),
|
|
476
490
|
contents: e == null ? void 0 : e.schema.contents,
|
|
477
491
|
elementRef: t,
|
|
478
|
-
parent: (
|
|
492
|
+
parent: ($ = e == null ? void 0 : e.parent) == null ? void 0 : $.componentInstance,
|
|
479
493
|
schema: e == null ? void 0 : e.schema,
|
|
480
494
|
styles: o,
|
|
481
|
-
designerClass:
|
|
482
|
-
canAccepts:
|
|
495
|
+
designerClass: a,
|
|
496
|
+
canAccepts: f,
|
|
483
497
|
getBelongedComponentInstance: n,
|
|
484
|
-
getDraggableDesignItemElement:
|
|
485
|
-
getDraggingDisplayText:
|
|
498
|
+
getDraggableDesignItemElement: i,
|
|
499
|
+
getDraggingDisplayText: l,
|
|
486
500
|
getPropConfig: E,
|
|
487
|
-
getDragScopeElement:
|
|
501
|
+
getDragScopeElement: d,
|
|
488
502
|
onAcceptMovedChildElement: O,
|
|
489
503
|
onChildElementMovedOut: F,
|
|
490
504
|
addNewChildComponentSchema: D,
|
|
491
505
|
triggerBelongedComponentToMoveWhenMoved: m(!1),
|
|
492
506
|
triggerBelongedComponentToDeleteWhenDeleted: m(!1),
|
|
493
507
|
onRemoveComponent: R
|
|
494
|
-
},
|
|
508
|
+
}, u;
|
|
495
509
|
}
|
|
496
|
-
const
|
|
510
|
+
const Se = /* @__PURE__ */ j({
|
|
497
511
|
name: "FSearchBoxDesign",
|
|
498
|
-
props:
|
|
512
|
+
props: M,
|
|
499
513
|
emits: ["update:modelValue", "change"],
|
|
500
514
|
setup(t, e) {
|
|
501
|
-
const
|
|
515
|
+
const c = m(t.data), o = m(), a = m(), u = m("请输入关键词"), s = m('<i class="f-icon f-icon-search"></i>'), p = m(t.modelValue), y = m(), r = C("design-item-context"), n = ve(y, r);
|
|
502
516
|
U(() => {
|
|
503
|
-
|
|
504
|
-
}), e.expose(n.value),
|
|
505
|
-
var
|
|
506
|
-
(
|
|
507
|
-
}),
|
|
508
|
-
|
|
517
|
+
y.value.componentInstance = n;
|
|
518
|
+
}), e.expose(n.value), B(p, (l) => {
|
|
519
|
+
var d;
|
|
520
|
+
(d = a.value) == null || d.search(l), e.emit("update:modelValue", l);
|
|
521
|
+
}), B(() => t.modelValue, (l) => {
|
|
522
|
+
p.value = l;
|
|
509
523
|
});
|
|
510
|
-
function
|
|
511
|
-
o.value.commitValue(
|
|
524
|
+
function i(l) {
|
|
525
|
+
o.value.commitValue(l);
|
|
512
526
|
}
|
|
513
|
-
function
|
|
514
|
-
e.emit("change",
|
|
527
|
+
function f(l) {
|
|
528
|
+
e.emit("change", l);
|
|
515
529
|
}
|
|
516
530
|
return () => v("div", {
|
|
517
|
-
ref:
|
|
531
|
+
ref: y
|
|
518
532
|
}, [v(W("f-button-edit"), {
|
|
519
533
|
ref: o,
|
|
520
|
-
"button-content":
|
|
521
|
-
placeholder:
|
|
522
|
-
onChange:
|
|
534
|
+
"button-content": s.value,
|
|
535
|
+
placeholder: u.value,
|
|
536
|
+
onChange: f,
|
|
523
537
|
"enable-clear": !0,
|
|
524
538
|
"button-behavior": "Execute",
|
|
525
|
-
modelValue:
|
|
526
|
-
"onUpdate:modelValue": (
|
|
539
|
+
modelValue: p.value,
|
|
540
|
+
"onUpdate:modelValue": (l) => p.value = l,
|
|
527
541
|
"popup-host": t.popupHost,
|
|
528
542
|
"popup-right-boundary": t.popupRightBoundary,
|
|
529
543
|
"popup-offset-x": t.popupOffsetX,
|
|
@@ -531,25 +545,25 @@ const ve = /* @__PURE__ */ w({
|
|
|
531
545
|
"popup-on-focus": !0
|
|
532
546
|
}, {
|
|
533
547
|
default: () => [v(L, {
|
|
534
|
-
ref:
|
|
535
|
-
data:
|
|
536
|
-
onConfirmResult:
|
|
548
|
+
ref: a,
|
|
549
|
+
data: c.value,
|
|
550
|
+
onConfirmResult: i
|
|
537
551
|
}, null)]
|
|
538
552
|
})]);
|
|
539
553
|
}
|
|
540
554
|
});
|
|
541
|
-
|
|
542
|
-
t.component(
|
|
555
|
+
V.install = (t) => {
|
|
556
|
+
t.component(V.name, V);
|
|
543
557
|
};
|
|
544
|
-
|
|
545
|
-
t["search-box"] =
|
|
558
|
+
V.register = (t, e, c, o) => {
|
|
559
|
+
t["search-box"] = V, e["search-box"] = q;
|
|
546
560
|
};
|
|
547
|
-
|
|
548
|
-
t["search-box"] =
|
|
561
|
+
V.registerDesigner = (t, e, c) => {
|
|
562
|
+
t["search-box"] = Se, e["search-box"] = q;
|
|
549
563
|
};
|
|
550
564
|
export {
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
565
|
+
V as FSearchBox,
|
|
566
|
+
V as default,
|
|
567
|
+
q as propsResolver,
|
|
568
|
+
M as searchBoxProps
|
|
555
569
|
};
|