@farris/ui-vue 1.3.4 → 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 +9 -7
- 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 +746 -730
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/data-view/index.esm.js +9 -7
- 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 +3096 -3069
- 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 +78 -82
- package/components/event-parameter/index.umd.cjs +1 -1
- package/components/events-editor/index.esm.js +501 -487
- 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 +487 -472
- package/components/external-container/index.umd.cjs +1 -1
- package/components/field-selector/index.esm.js +440 -433
- package/components/field-selector/index.umd.cjs +1 -1
- package/components/filter-bar/index.esm.js +594 -587
- package/components/filter-bar/index.umd.cjs +1 -1
- package/components/flow-canvas/index.esm.js +2766 -2739
- 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 +314 -298
- package/components/list-view/index.umd.cjs +1 -1
- package/components/lookup/index.esm.js +862 -843
- package/components/lookup/index.umd.cjs +1 -1
- package/components/mapping-editor/index.esm.js +1031 -1015
- 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 +776 -770
- package/components/query-solution/index.umd.cjs +6 -6
- 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 +296 -283
- 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 +634 -619
- 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 +383 -376
- package/components/tree-grid/index.umd.cjs +1 -1
- package/components/tree-view/index.esm.js +595 -575
- 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 +5492 -5470
- package/farris.all.umd.cjs +13 -13
- package/index.css +1 -1
- package/package.json +1 -1
- package/types/condition/src/composition/condition-value/input-group-value.d.ts +1 -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
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { defineComponent as Q, ref as g, watch as
|
|
2
|
-
import { isPlainObject as U, cloneDeep as
|
|
3
|
-
var
|
|
4
|
-
return
|
|
1
|
+
import { defineComponent as Q, ref as g, watch as ie, computed as _, createVNode as b, createTextVNode as X, inject as ae, onMounted as oe } from "vue";
|
|
2
|
+
import { isPlainObject as U, cloneDeep as Z } from "lodash-es";
|
|
3
|
+
var j = function(t, e) {
|
|
4
|
+
return j = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(r, n) {
|
|
5
5
|
r.__proto__ = n;
|
|
6
6
|
} || function(r, n) {
|
|
7
7
|
for (var i in n) Object.prototype.hasOwnProperty.call(n, i) && (r[i] = n[i]);
|
|
8
|
-
},
|
|
8
|
+
}, j(t, e);
|
|
9
9
|
};
|
|
10
|
-
function
|
|
10
|
+
function x(t, e) {
|
|
11
11
|
if (typeof e != "function" && e !== null)
|
|
12
12
|
throw new TypeError("Class extends value " + String(e) + " is not a constructor or null");
|
|
13
|
-
|
|
13
|
+
j(t, e);
|
|
14
14
|
function r() {
|
|
15
15
|
this.constructor = t;
|
|
16
16
|
}
|
|
@@ -26,24 +26,24 @@ function z(t) {
|
|
|
26
26
|
};
|
|
27
27
|
throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
28
28
|
}
|
|
29
|
-
function
|
|
29
|
+
function M(t, e) {
|
|
30
30
|
var r = typeof Symbol == "function" && t[Symbol.iterator];
|
|
31
31
|
if (!r) return t;
|
|
32
|
-
var n = r.call(t), i, a = [],
|
|
32
|
+
var n = r.call(t), i, a = [], s;
|
|
33
33
|
try {
|
|
34
34
|
for (; (e === void 0 || e-- > 0) && !(i = n.next()).done; ) a.push(i.value);
|
|
35
35
|
} catch (l) {
|
|
36
|
-
|
|
36
|
+
s = { error: l };
|
|
37
37
|
} finally {
|
|
38
38
|
try {
|
|
39
39
|
i && !i.done && (r = n.return) && r.call(n);
|
|
40
40
|
} finally {
|
|
41
|
-
if (
|
|
41
|
+
if (s) throw s.error;
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
44
|
return a;
|
|
45
45
|
}
|
|
46
|
-
function
|
|
46
|
+
function k(t, e, r) {
|
|
47
47
|
if (r || arguments.length === 2) for (var n = 0, i = e.length, a; n < i; n++)
|
|
48
48
|
(a || !(n in e)) && (a || (a = Array.prototype.slice.call(e, 0, n)), a[n] = e[n]);
|
|
49
49
|
return t.concat(a || Array.prototype.slice.call(e));
|
|
@@ -80,11 +80,11 @@ var F = function() {
|
|
|
80
80
|
var e, r, n, i, a;
|
|
81
81
|
if (!this.closed) {
|
|
82
82
|
this.closed = !0;
|
|
83
|
-
var
|
|
84
|
-
if (
|
|
85
|
-
if (this._parentage = null, Array.isArray(
|
|
83
|
+
var s = this._parentage;
|
|
84
|
+
if (s)
|
|
85
|
+
if (this._parentage = null, Array.isArray(s))
|
|
86
86
|
try {
|
|
87
|
-
for (var l = z(
|
|
87
|
+
for (var l = z(s), v = l.next(); !v.done; v = l.next()) {
|
|
88
88
|
var u = v.value;
|
|
89
89
|
u.remove(this);
|
|
90
90
|
}
|
|
@@ -98,7 +98,7 @@ var F = function() {
|
|
|
98
98
|
}
|
|
99
99
|
}
|
|
100
100
|
else
|
|
101
|
-
|
|
101
|
+
s.remove(this);
|
|
102
102
|
var o = this.initialTeardown;
|
|
103
103
|
if (E(o))
|
|
104
104
|
try {
|
|
@@ -106,16 +106,16 @@ var F = function() {
|
|
|
106
106
|
} catch (y) {
|
|
107
107
|
a = y instanceof N ? y.errors : [y];
|
|
108
108
|
}
|
|
109
|
-
var
|
|
110
|
-
if (
|
|
109
|
+
var c = this._finalizers;
|
|
110
|
+
if (c) {
|
|
111
111
|
this._finalizers = null;
|
|
112
112
|
try {
|
|
113
|
-
for (var p = z(
|
|
113
|
+
for (var p = z(c), f = p.next(); !f.done; f = p.next()) {
|
|
114
114
|
var d = f.value;
|
|
115
115
|
try {
|
|
116
116
|
W(d);
|
|
117
117
|
} catch (y) {
|
|
118
|
-
a = a ?? [], y instanceof N ? a =
|
|
118
|
+
a = a ?? [], y instanceof N ? a = k(k([], M(a)), M(y.errors)) : a.push(y);
|
|
119
119
|
}
|
|
120
120
|
}
|
|
121
121
|
} catch (y) {
|
|
@@ -162,7 +162,7 @@ var F = function() {
|
|
|
162
162
|
}(), t;
|
|
163
163
|
}();
|
|
164
164
|
F.EMPTY;
|
|
165
|
-
function
|
|
165
|
+
function C(t) {
|
|
166
166
|
return t instanceof F || t && "closed" in t && E(t.remove) && E(t.add) && E(t.unsubscribe);
|
|
167
167
|
}
|
|
168
168
|
function W(t) {
|
|
@@ -178,7 +178,7 @@ var K = {
|
|
|
178
178
|
setTimeout: function(t, e) {
|
|
179
179
|
for (var r = [], n = 2; n < arguments.length; n++)
|
|
180
180
|
r[n - 2] = arguments[n];
|
|
181
|
-
return setTimeout.apply(void 0,
|
|
181
|
+
return setTimeout.apply(void 0, k([t, e], M(r)));
|
|
182
182
|
},
|
|
183
183
|
clearTimeout: function(t) {
|
|
184
184
|
return clearTimeout(t);
|
|
@@ -195,11 +195,11 @@ function Y() {
|
|
|
195
195
|
function le(t) {
|
|
196
196
|
t();
|
|
197
197
|
}
|
|
198
|
-
var
|
|
199
|
-
|
|
198
|
+
var I = function(t) {
|
|
199
|
+
x(e, t);
|
|
200
200
|
function e(r) {
|
|
201
201
|
var n = t.call(this) || this;
|
|
202
|
-
return n.isStopped = !1, r ? (n.destination = r,
|
|
202
|
+
return n.isStopped = !1, r ? (n.destination = r, C(r) && r.add(n)) : n.destination = de, n;
|
|
203
203
|
}
|
|
204
204
|
return e.create = function(r, n, i) {
|
|
205
205
|
return new R(r, n, i);
|
|
@@ -240,7 +240,7 @@ var pe = function() {
|
|
|
240
240
|
try {
|
|
241
241
|
r.next(e);
|
|
242
242
|
} catch (n) {
|
|
243
|
-
|
|
243
|
+
w(n);
|
|
244
244
|
}
|
|
245
245
|
}, t.prototype.error = function(e) {
|
|
246
246
|
var r = this.partialObserver;
|
|
@@ -248,25 +248,25 @@ var pe = function() {
|
|
|
248
248
|
try {
|
|
249
249
|
r.error(e);
|
|
250
250
|
} catch (n) {
|
|
251
|
-
|
|
251
|
+
w(n);
|
|
252
252
|
}
|
|
253
253
|
else
|
|
254
|
-
|
|
254
|
+
w(e);
|
|
255
255
|
}, t.prototype.complete = function() {
|
|
256
256
|
var e = this.partialObserver;
|
|
257
257
|
if (e.complete)
|
|
258
258
|
try {
|
|
259
259
|
e.complete();
|
|
260
260
|
} catch (r) {
|
|
261
|
-
|
|
261
|
+
w(r);
|
|
262
262
|
}
|
|
263
263
|
}, t;
|
|
264
264
|
}(), R = function(t) {
|
|
265
|
-
|
|
265
|
+
x(e, t);
|
|
266
266
|
function e(r, n, i) {
|
|
267
|
-
var a = t.call(this) || this,
|
|
267
|
+
var a = t.call(this) || this, s;
|
|
268
268
|
if (E(r) || !r)
|
|
269
|
-
|
|
269
|
+
s = {
|
|
270
270
|
next: r ?? void 0,
|
|
271
271
|
error: n ?? void 0,
|
|
272
272
|
complete: i ?? void 0
|
|
@@ -275,17 +275,17 @@ var pe = function() {
|
|
|
275
275
|
var l;
|
|
276
276
|
a && K.useDeprecatedNextContext ? (l = Object.create(r), l.unsubscribe = function() {
|
|
277
277
|
return a.unsubscribe();
|
|
278
|
-
},
|
|
278
|
+
}, s = {
|
|
279
279
|
next: r.next && O(r.next, l),
|
|
280
280
|
error: r.error && O(r.error, l),
|
|
281
281
|
complete: r.complete && O(r.complete, l)
|
|
282
|
-
}) :
|
|
282
|
+
}) : s = r;
|
|
283
283
|
}
|
|
284
|
-
return a.destination = new pe(
|
|
284
|
+
return a.destination = new pe(s), a;
|
|
285
285
|
}
|
|
286
286
|
return e;
|
|
287
|
-
}(
|
|
288
|
-
function
|
|
287
|
+
}(I);
|
|
288
|
+
function w(t) {
|
|
289
289
|
ue(t);
|
|
290
290
|
}
|
|
291
291
|
function ve(t) {
|
|
@@ -319,7 +319,7 @@ var me = function() {
|
|
|
319
319
|
}, t.prototype.subscribe = function(e, r, n) {
|
|
320
320
|
var i = this, a = Se(e) ? e : new R(e, r, n);
|
|
321
321
|
return le(function() {
|
|
322
|
-
var
|
|
322
|
+
var s = i, l = s.operator, v = s.source;
|
|
323
323
|
a.add(l ? l.call(a, v) : v ? i._subscribe(a) : i._trySubscribe(a));
|
|
324
324
|
}), a;
|
|
325
325
|
}, t.prototype._trySubscribe = function(e) {
|
|
@@ -331,18 +331,18 @@ var me = function() {
|
|
|
331
331
|
}, t.prototype.forEach = function(e, r) {
|
|
332
332
|
var n = this;
|
|
333
333
|
return r = G(r), new r(function(i, a) {
|
|
334
|
-
var
|
|
334
|
+
var s = new R({
|
|
335
335
|
next: function(l) {
|
|
336
336
|
try {
|
|
337
337
|
e(l);
|
|
338
338
|
} catch (v) {
|
|
339
|
-
a(v),
|
|
339
|
+
a(v), s.unsubscribe();
|
|
340
340
|
}
|
|
341
341
|
},
|
|
342
342
|
error: a,
|
|
343
343
|
complete: i
|
|
344
344
|
});
|
|
345
|
-
n.subscribe(
|
|
345
|
+
n.subscribe(s);
|
|
346
346
|
});
|
|
347
347
|
}, t.prototype._subscribe = function(e) {
|
|
348
348
|
var r;
|
|
@@ -357,10 +357,10 @@ var me = function() {
|
|
|
357
357
|
var r = this;
|
|
358
358
|
return e = G(e), new e(function(n, i) {
|
|
359
359
|
var a;
|
|
360
|
-
r.subscribe(function(
|
|
361
|
-
return a =
|
|
362
|
-
}, function(
|
|
363
|
-
return i(
|
|
360
|
+
r.subscribe(function(s) {
|
|
361
|
+
return a = s;
|
|
362
|
+
}, function(s) {
|
|
363
|
+
return i(s);
|
|
364
364
|
}, function() {
|
|
365
365
|
return n(a);
|
|
366
366
|
});
|
|
@@ -377,39 +377,53 @@ function ge(t) {
|
|
|
377
377
|
return t && E(t.next) && E(t.error) && E(t.complete);
|
|
378
378
|
}
|
|
379
379
|
function Se(t) {
|
|
380
|
-
return t && t instanceof
|
|
380
|
+
return t && t instanceof I || ge(t) && C(t);
|
|
381
381
|
}
|
|
382
|
-
const
|
|
382
|
+
const ee = {}, te = {};
|
|
383
383
|
function $(t) {
|
|
384
|
-
const { properties: e, title: r, ignore: n } = t, i = n && Array.isArray(n), a = Object.keys(e).reduce((
|
|
385
|
-
if (r && (!i || !n.find((
|
|
386
|
-
const
|
|
387
|
-
a.id = `${
|
|
384
|
+
const { properties: e, title: r, ignore: n } = t, i = n && Array.isArray(n), a = Object.keys(e).reduce((s, l) => ((!i || !n.find((v) => v === l)) && (s[l] = e[l].type === "object" && e[l].properties ? $(e[l]) : Z(e[l].default)), s), {});
|
|
385
|
+
if (r && (!i || !n.find((s) => s === "id"))) {
|
|
386
|
+
const s = r.toLowerCase().replace(/-/g, "_");
|
|
387
|
+
a.id = `${s}_${Math.random().toString().slice(2, 6)}`;
|
|
388
388
|
}
|
|
389
389
|
return a;
|
|
390
390
|
}
|
|
391
|
-
function
|
|
392
|
-
const n =
|
|
391
|
+
function Ee(t) {
|
|
392
|
+
const { properties: e, title: r, required: n } = t;
|
|
393
|
+
if (n && Array.isArray(n)) {
|
|
394
|
+
const i = n.reduce((a, s) => (a[s] = e[s].type === "object" && e[s].properties ? $(e[s]) : Z(e[s].default), a), {});
|
|
395
|
+
if (r && n.find((a) => a === "id")) {
|
|
396
|
+
const a = r.toLowerCase().replace(/-/g, "_");
|
|
397
|
+
i.id = `${a}_${Math.random().toString().slice(2, 6)}`;
|
|
398
|
+
}
|
|
399
|
+
return i;
|
|
400
|
+
}
|
|
401
|
+
return {
|
|
402
|
+
type: r
|
|
403
|
+
};
|
|
404
|
+
}
|
|
405
|
+
function re(t, e = {}, r) {
|
|
406
|
+
const n = ee[t];
|
|
393
407
|
if (n) {
|
|
394
|
-
let i =
|
|
395
|
-
const a =
|
|
396
|
-
return i = a ? a({ getSchemaByType:
|
|
408
|
+
let i = Ee(n);
|
|
409
|
+
const a = te[t];
|
|
410
|
+
return i = a ? a({ getSchemaByType: re }, i, e, r) : i, i;
|
|
397
411
|
}
|
|
398
412
|
return null;
|
|
399
413
|
}
|
|
400
|
-
function
|
|
414
|
+
function Pe(t, e) {
|
|
401
415
|
const r = $(e);
|
|
402
|
-
return Object.keys(r).reduce((n, i) => (n[i] && U(n[i]) && U(t[i] || !t[i]) ? Object.assign(n[i], t[i] || {}) : n[i] = t[i], n), r), r;
|
|
416
|
+
return Object.keys(r).reduce((n, i) => (Object.prototype.hasOwnProperty.call(t, i) && (n[i] && U(n[i]) && U(t[i] || !t[i]) ? Object.assign(n[i], t[i] || {}) : n[i] = t[i]), n), r), r;
|
|
403
417
|
}
|
|
404
|
-
function
|
|
418
|
+
function _e(t, e) {
|
|
405
419
|
return Object.keys(t).filter((n) => t[n] != null).reduce((n, i) => {
|
|
406
420
|
if (e.has(i)) {
|
|
407
421
|
const a = e.get(i);
|
|
408
422
|
if (typeof a == "string")
|
|
409
423
|
n[a] = t[i];
|
|
410
424
|
else {
|
|
411
|
-
const
|
|
412
|
-
Object.assign(n,
|
|
425
|
+
const s = a(i, t[i], t);
|
|
426
|
+
Object.assign(n, s);
|
|
413
427
|
}
|
|
414
428
|
} else
|
|
415
429
|
n[i] = t[i];
|
|
@@ -417,15 +431,15 @@ function Pe(t, e) {
|
|
|
417
431
|
}, {});
|
|
418
432
|
}
|
|
419
433
|
function Te(t, e, r = /* @__PURE__ */ new Map()) {
|
|
420
|
-
const n =
|
|
421
|
-
return
|
|
434
|
+
const n = Pe(t, e);
|
|
435
|
+
return _e(n, r);
|
|
422
436
|
}
|
|
423
|
-
function
|
|
424
|
-
function e(u, o,
|
|
425
|
-
if (typeof
|
|
426
|
-
return p[u].length ===
|
|
427
|
-
if (typeof
|
|
428
|
-
const f = Object.keys(
|
|
437
|
+
function we(t = {}) {
|
|
438
|
+
function e(u, o, c, p) {
|
|
439
|
+
if (typeof c == "number")
|
|
440
|
+
return p[u].length === c;
|
|
441
|
+
if (typeof c == "object") {
|
|
442
|
+
const f = Object.keys(c)[0], d = c[f];
|
|
429
443
|
if (f === "not")
|
|
430
444
|
return Number(p[u].length) !== Number(d);
|
|
431
445
|
if (f === "moreThan")
|
|
@@ -435,8 +449,8 @@ function _e(t = {}) {
|
|
|
435
449
|
}
|
|
436
450
|
return !1;
|
|
437
451
|
}
|
|
438
|
-
function r(u, o,
|
|
439
|
-
return p[u] && p[u].propertyValue && String(p[u].propertyValue.value) === String(
|
|
452
|
+
function r(u, o, c, p) {
|
|
453
|
+
return p[u] && p[u].propertyValue && String(p[u].propertyValue.value) === String(c);
|
|
440
454
|
}
|
|
441
455
|
const n = /* @__PURE__ */ new Map([
|
|
442
456
|
["length", e],
|
|
@@ -444,50 +458,50 @@ function _e(t = {}) {
|
|
|
444
458
|
]);
|
|
445
459
|
Object.keys(t).reduce((u, o) => (u.set(o, t[o]), u), n);
|
|
446
460
|
function i(u, o) {
|
|
447
|
-
const
|
|
448
|
-
return typeof o == "number" ? [{ target:
|
|
461
|
+
const c = u;
|
|
462
|
+
return typeof o == "number" ? [{ target: c, operator: "length", param: null, value: Number(o) }] : typeof o == "boolean" ? [{ target: c, operator: "getProperty", param: u, value: !!o }] : typeof o == "object" ? Object.keys(o).map((p) => {
|
|
449
463
|
if (p === "length")
|
|
450
|
-
return { target:
|
|
464
|
+
return { target: c, operator: "length", param: null, value: o[p] };
|
|
451
465
|
const f = p, d = o[p];
|
|
452
|
-
return { target:
|
|
466
|
+
return { target: c, operator: "getProperty", param: f, value: d };
|
|
453
467
|
}) : [];
|
|
454
468
|
}
|
|
455
469
|
function a(u) {
|
|
456
|
-
return Object.keys(u).reduce((
|
|
470
|
+
return Object.keys(u).reduce((c, p) => {
|
|
457
471
|
const f = i(p, u[p]);
|
|
458
|
-
return
|
|
472
|
+
return c.push(...f), c;
|
|
459
473
|
}, []);
|
|
460
474
|
}
|
|
461
|
-
function
|
|
475
|
+
function s(u, o) {
|
|
462
476
|
if (n.has(u.operator)) {
|
|
463
|
-
const
|
|
464
|
-
return
|
|
477
|
+
const c = n.get(u.operator);
|
|
478
|
+
return c && c(u.target, u.param, u.value, o) || !1;
|
|
465
479
|
}
|
|
466
480
|
return !1;
|
|
467
481
|
}
|
|
468
482
|
function l(u, o) {
|
|
469
|
-
return a(u).reduce((f, d) => f &&
|
|
483
|
+
return a(u).reduce((f, d) => f && s(d, o), !0);
|
|
470
484
|
}
|
|
471
485
|
function v(u, o) {
|
|
472
|
-
const
|
|
473
|
-
return p ? !
|
|
486
|
+
const c = Object.keys(u), p = c.includes("allOf"), f = c.includes("anyOf"), d = p || f, T = (d ? u[d ? p ? "allOf" : "anyOf" : "allOf"] : [u]).map((D) => l(D, o));
|
|
487
|
+
return p ? !T.includes(!1) : T.includes(!0);
|
|
474
488
|
}
|
|
475
489
|
return { parseValueSchema: v };
|
|
476
490
|
}
|
|
477
|
-
const De = {},
|
|
478
|
-
|
|
479
|
-
function
|
|
480
|
-
return
|
|
481
|
-
const l = Te(
|
|
491
|
+
const De = {}, Ne = {};
|
|
492
|
+
we();
|
|
493
|
+
function Oe(t, e, r = /* @__PURE__ */ new Map(), n = (s, l, v, u) => l, i = {}, a = (s) => s) {
|
|
494
|
+
return ee[e.title] = e, te[e.title] = n, De[e.title] = i, Ne[e.title] = a, (s = {}) => {
|
|
495
|
+
const l = Te(s, e, r), v = Object.keys(t).reduce((u, o) => (u[o] = t[o].default, u), {});
|
|
482
496
|
return Object.assign(v, l);
|
|
483
497
|
};
|
|
484
498
|
}
|
|
485
|
-
function
|
|
499
|
+
function Ae(t, e) {
|
|
486
500
|
return { customClass: e.class, customStyle: e.style };
|
|
487
501
|
}
|
|
488
502
|
const je = /* @__PURE__ */ new Map([
|
|
489
|
-
["appearance",
|
|
490
|
-
]),
|
|
503
|
+
["appearance", Ae]
|
|
504
|
+
]), Me = "https://json-schema.org/draft/2020-12/schema", ke = "https://farris-design.gitee.io/nav.schema.json", Re = "nav", Fe = "A Farris Component", $e = "object", Be = {
|
|
491
505
|
id: {
|
|
492
506
|
description: "The unique identifier for a nav",
|
|
493
507
|
type: "string"
|
|
@@ -579,22 +593,22 @@ const je = /* @__PURE__ */ new Map([
|
|
|
579
593
|
type: "sting",
|
|
580
594
|
default: ""
|
|
581
595
|
}
|
|
582
|
-
},
|
|
596
|
+
}, qe = [
|
|
583
597
|
"id",
|
|
584
598
|
"type"
|
|
585
599
|
], Le = {
|
|
586
|
-
$schema:
|
|
587
|
-
$id:
|
|
588
|
-
title:
|
|
589
|
-
description:
|
|
590
|
-
type:
|
|
591
|
-
properties:
|
|
592
|
-
required:
|
|
600
|
+
$schema: Me,
|
|
601
|
+
$id: ke,
|
|
602
|
+
title: Re,
|
|
603
|
+
description: Fe,
|
|
604
|
+
type: $e,
|
|
605
|
+
properties: Be,
|
|
606
|
+
required: qe
|
|
593
607
|
};
|
|
594
608
|
function Ve(t, e, r) {
|
|
595
609
|
return e;
|
|
596
610
|
}
|
|
597
|
-
const
|
|
611
|
+
const Ue = "nav", ze = "A Farris Component", He = "object", We = {
|
|
598
612
|
basic: {
|
|
599
613
|
description: "Basic Infomation",
|
|
600
614
|
title: "基本信息",
|
|
@@ -676,11 +690,11 @@ const qe = "nav", Ue = "A Farris Component", ze = "object", He = {
|
|
|
676
690
|
}
|
|
677
691
|
}
|
|
678
692
|
}
|
|
679
|
-
},
|
|
680
|
-
title:
|
|
681
|
-
description:
|
|
682
|
-
type:
|
|
683
|
-
categories:
|
|
693
|
+
}, Ye = {
|
|
694
|
+
title: Ue,
|
|
695
|
+
description: ze,
|
|
696
|
+
type: He,
|
|
697
|
+
categories: We
|
|
684
698
|
}, B = {
|
|
685
699
|
/** 未读最大值 */
|
|
686
700
|
maxNum: { Type: Number, default: 99 },
|
|
@@ -715,33 +729,33 @@ const qe = "nav", Ue = "A Farris Component", ze = "object", He = {
|
|
|
715
729
|
activeNavId: { Type: String, default: "1" },
|
|
716
730
|
/** nav切换前事件 */
|
|
717
731
|
navPicking: { Type: Function, default: (t) => me }
|
|
718
|
-
}, J =
|
|
732
|
+
}, J = Oe(B, Le, je, Ve, Ye), A = /* @__PURE__ */ Q({
|
|
719
733
|
name: "FNav",
|
|
720
734
|
props: B,
|
|
721
735
|
emits: ["nav", "update:activeNavId"],
|
|
722
736
|
setup(t, e) {
|
|
723
737
|
const r = g(t.activeNavId), n = g(t.navData), i = g(t.horizontal);
|
|
724
|
-
g(t.navPicking),
|
|
725
|
-
o !==
|
|
738
|
+
g(t.navPicking), ie(() => t.activeNavId, (o, c) => {
|
|
739
|
+
o !== c && (r.value = o);
|
|
726
740
|
});
|
|
727
|
-
const a =
|
|
741
|
+
const a = _({
|
|
728
742
|
get() {
|
|
729
743
|
return n.value;
|
|
730
744
|
},
|
|
731
745
|
set(o) {
|
|
732
746
|
n.value = o, v();
|
|
733
747
|
}
|
|
734
|
-
}),
|
|
748
|
+
}), s = _({
|
|
735
749
|
get() {
|
|
736
750
|
return r.value;
|
|
737
751
|
},
|
|
738
752
|
set(o) {
|
|
739
753
|
if (r.value = o, r.value && a && a.value.length) {
|
|
740
|
-
const
|
|
741
|
-
|
|
754
|
+
const c = a.value.find((p) => p.id === r.value);
|
|
755
|
+
c && e.emit("nav", c);
|
|
742
756
|
}
|
|
743
757
|
}
|
|
744
|
-
}), l =
|
|
758
|
+
}), l = _({
|
|
745
759
|
set(o) {
|
|
746
760
|
i.value = o;
|
|
747
761
|
},
|
|
@@ -751,7 +765,7 @@ const qe = "nav", Ue = "A Farris Component", ze = "object", He = {
|
|
|
751
765
|
});
|
|
752
766
|
function v() {
|
|
753
767
|
if (a.value && a.value.length && !r.value) {
|
|
754
|
-
const o = a.value.find((
|
|
768
|
+
const o = a.value.find((c) => !c.disable);
|
|
755
769
|
o && (r.value = o.id);
|
|
756
770
|
}
|
|
757
771
|
}
|
|
@@ -764,31 +778,31 @@ const qe = "nav", Ue = "A Farris Component", ze = "object", He = {
|
|
|
764
778
|
class: ["farris-nav", {
|
|
765
779
|
"farris-nav-vertical": !l.value
|
|
766
780
|
}]
|
|
767
|
-
}, [(o = a.value) == null ? void 0 : o.map((
|
|
781
|
+
}, [(o = a.value) == null ? void 0 : o.map((c) => b("div", {
|
|
768
782
|
class: ["farris-nav-item", {
|
|
769
|
-
active:
|
|
783
|
+
active: c.id === s.value
|
|
770
784
|
}, {
|
|
771
|
-
disabled:
|
|
785
|
+
disabled: c.disable
|
|
772
786
|
}],
|
|
773
|
-
onClick: () => u(
|
|
787
|
+
onClick: () => u(c)
|
|
774
788
|
}, [b("div", {
|
|
775
789
|
class: "farris-nav-item-link"
|
|
776
790
|
}, [b("span", {
|
|
777
791
|
class: "farris-nav-item-link-text"
|
|
778
|
-
}, [typeof
|
|
792
|
+
}, [typeof c.text == "function" ? c.text() : c.text, c.num && b("div", {
|
|
779
793
|
class: "farris-nav-item-tag"
|
|
780
|
-
}, [
|
|
794
|
+
}, [c.num <= t.maxNum && b("span", {
|
|
781
795
|
class: "tag-text"
|
|
782
|
-
}, [
|
|
796
|
+
}, [c.num]), c.num > t.maxNum && b("span", {
|
|
783
797
|
class: "tag-text"
|
|
784
798
|
}, [t.maxNum, X("+")])])])])]))]);
|
|
785
799
|
};
|
|
786
800
|
}
|
|
787
801
|
});
|
|
788
|
-
function
|
|
789
|
-
var
|
|
802
|
+
function Ge(t, e, r) {
|
|
803
|
+
var V;
|
|
790
804
|
const n = "", i = "", a = g();
|
|
791
|
-
function
|
|
805
|
+
function s() {
|
|
792
806
|
return (e == null ? void 0 : e.schema.componentType) !== "frame";
|
|
793
807
|
}
|
|
794
808
|
function l() {
|
|
@@ -808,9 +822,9 @@ function Ye(t, e, r) {
|
|
|
808
822
|
const S = g(h == null ? void 0 : h.value.parent), m = o(S);
|
|
809
823
|
return m || null;
|
|
810
824
|
}
|
|
811
|
-
function
|
|
825
|
+
function c(h = e) {
|
|
812
826
|
const { componentInstance: S, designerItemElementRef: m } = h;
|
|
813
|
-
return !S || !S.value ? null : S.value.canMove ? m :
|
|
827
|
+
return !S || !S.value ? null : S.value.canMove ? m : c(h.parent);
|
|
814
828
|
}
|
|
815
829
|
function p(h) {
|
|
816
830
|
return !!r;
|
|
@@ -822,17 +836,17 @@ function Ye(t, e, r) {
|
|
|
822
836
|
}
|
|
823
837
|
function y(h, S) {
|
|
824
838
|
}
|
|
825
|
-
function
|
|
839
|
+
function q(h, S) {
|
|
826
840
|
const { componentType: m } = h;
|
|
827
|
-
let P =
|
|
828
|
-
const
|
|
829
|
-
return P && !P.id && P.type === m && (P.id = `${
|
|
841
|
+
let P = re(m, h, S);
|
|
842
|
+
const ne = m.toLowerCase().replace(/-/g, "_");
|
|
843
|
+
return P && !P.id && P.type === m && (P.id = `${ne}_${Math.random().toString().slice(2, 6)}`), P;
|
|
830
844
|
}
|
|
831
|
-
function
|
|
845
|
+
function T(h) {
|
|
832
846
|
}
|
|
833
|
-
function
|
|
847
|
+
function L(...h) {
|
|
834
848
|
}
|
|
835
|
-
function
|
|
849
|
+
function D() {
|
|
836
850
|
e != null && e.schema.contents && e.schema.contents.map((h) => {
|
|
837
851
|
var P;
|
|
838
852
|
let S = h.id;
|
|
@@ -842,49 +856,49 @@ function Ye(t, e, r) {
|
|
|
842
856
|
});
|
|
843
857
|
}
|
|
844
858
|
return a.value = {
|
|
845
|
-
canMove:
|
|
859
|
+
canMove: s(),
|
|
846
860
|
canSelectParent: l(),
|
|
847
861
|
canDelete: v(),
|
|
848
862
|
canNested: !u(),
|
|
849
863
|
contents: e == null ? void 0 : e.schema.contents,
|
|
850
864
|
elementRef: t,
|
|
851
|
-
parent: (
|
|
865
|
+
parent: (V = e == null ? void 0 : e.parent) == null ? void 0 : V.componentInstance,
|
|
852
866
|
schema: e == null ? void 0 : e.schema,
|
|
853
867
|
styles: n,
|
|
854
868
|
designerClass: i,
|
|
855
869
|
canAccepts: p,
|
|
856
870
|
getBelongedComponentInstance: o,
|
|
857
|
-
getDraggableDesignItemElement:
|
|
871
|
+
getDraggableDesignItemElement: c,
|
|
858
872
|
getDraggingDisplayText: f,
|
|
859
|
-
getPropConfig:
|
|
873
|
+
getPropConfig: L,
|
|
860
874
|
getDragScopeElement: d,
|
|
861
875
|
onAcceptMovedChildElement: y,
|
|
862
|
-
onChildElementMovedOut:
|
|
863
|
-
addNewChildComponentSchema:
|
|
876
|
+
onChildElementMovedOut: T,
|
|
877
|
+
addNewChildComponentSchema: q,
|
|
864
878
|
triggerBelongedComponentToMoveWhenMoved: g(!1),
|
|
865
879
|
triggerBelongedComponentToDeleteWhenDeleted: g(!1),
|
|
866
|
-
onRemoveComponent:
|
|
880
|
+
onRemoveComponent: D
|
|
867
881
|
}, a;
|
|
868
882
|
}
|
|
869
|
-
const
|
|
883
|
+
const Je = /* @__PURE__ */ Q({
|
|
870
884
|
name: "FNavDesign",
|
|
871
885
|
props: B,
|
|
872
886
|
emits: ["nav"],
|
|
873
887
|
setup(t, e) {
|
|
874
888
|
const r = g(t.activeNavId), n = g(t.navData), i = g(t.horizontal);
|
|
875
889
|
g(t.navPicking);
|
|
876
|
-
const a = g(),
|
|
877
|
-
|
|
890
|
+
const a = g(), s = ae("design-item-context"), l = Ge(a, s);
|
|
891
|
+
oe(() => {
|
|
878
892
|
a.value.componentInstance = l;
|
|
879
893
|
}), e.expose(l.value);
|
|
880
|
-
const v =
|
|
894
|
+
const v = _({
|
|
881
895
|
get() {
|
|
882
896
|
return n.value;
|
|
883
897
|
},
|
|
884
898
|
set(f) {
|
|
885
|
-
n.value = f,
|
|
899
|
+
n.value = f, c();
|
|
886
900
|
}
|
|
887
|
-
}), u =
|
|
901
|
+
}), u = _({
|
|
888
902
|
get() {
|
|
889
903
|
return r.value;
|
|
890
904
|
},
|
|
@@ -894,7 +908,7 @@ const Ge = /* @__PURE__ */ Q({
|
|
|
894
908
|
d && e.emit("nav", d);
|
|
895
909
|
}
|
|
896
910
|
}
|
|
897
|
-
}), o =
|
|
911
|
+
}), o = _({
|
|
898
912
|
set(f) {
|
|
899
913
|
i.value = f;
|
|
900
914
|
},
|
|
@@ -902,7 +916,7 @@ const Ge = /* @__PURE__ */ Q({
|
|
|
902
916
|
return i.value;
|
|
903
917
|
}
|
|
904
918
|
});
|
|
905
|
-
function
|
|
919
|
+
function c() {
|
|
906
920
|
if (v.value && v.value.length && !r.value) {
|
|
907
921
|
const f = v.value.find((d) => !d.disable);
|
|
908
922
|
f && (r.value = f.id);
|
|
@@ -938,20 +952,20 @@ const Ge = /* @__PURE__ */ Q({
|
|
|
938
952
|
}, [t.maxNum, X("+")])])])])]))]);
|
|
939
953
|
};
|
|
940
954
|
}
|
|
941
|
-
}),
|
|
955
|
+
}), Ze = {
|
|
942
956
|
install(t) {
|
|
943
|
-
t.component(
|
|
957
|
+
t.component(A.name, A);
|
|
944
958
|
},
|
|
945
959
|
register(t, e, r, n) {
|
|
946
|
-
t.nav =
|
|
960
|
+
t.nav = A, e.nav = J;
|
|
947
961
|
},
|
|
948
962
|
registerDesigner(t, e, r) {
|
|
949
|
-
t.nav =
|
|
963
|
+
t.nav = Je, e.nav = J;
|
|
950
964
|
}
|
|
951
965
|
};
|
|
952
966
|
export {
|
|
953
|
-
|
|
954
|
-
|
|
967
|
+
A as FNav,
|
|
968
|
+
Ze as default,
|
|
955
969
|
B as navProps,
|
|
956
970
|
J as propsResolver
|
|
957
971
|
};
|