@farris/ui-vue 1.6.5 → 1.6.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/avatar/index.esm.js +1 -1
- package/components/avatar/index.umd.cjs +1 -1
- package/components/button-edit/index.esm.js +2 -2
- package/components/button-edit/index.umd.cjs +1 -1
- package/components/combo-list/index.esm.js +7 -5
- package/components/combo-list/index.umd.cjs +1 -1
- package/components/common/index.esm.js +1 -1
- package/components/common/index.umd.cjs +1 -1
- package/components/component/index.esm.js +1 -1
- package/components/component/index.umd.cjs +1 -1
- package/components/condition/index.esm.js +3 -2
- package/components/condition/index.umd.cjs +1 -1
- package/components/content-container/index.esm.js +1 -1
- package/components/content-container/index.umd.cjs +1 -1
- package/components/data-view/index.esm.js +498 -495
- package/components/data-view/index.umd.cjs +1 -1
- package/components/date-picker/index.esm.js +833 -832
- package/components/date-picker/index.umd.cjs +1 -1
- package/components/designer-canvas/index.esm.js +1 -1
- package/components/designer-canvas/index.umd.cjs +1 -1
- package/components/dynamic-form/index.esm.js +3 -2
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/events-editor/index.esm.js +1 -1
- package/components/events-editor/index.umd.cjs +1 -1
- package/components/expression-editor/index.esm.js +256 -254
- package/components/expression-editor/index.umd.cjs +2 -2
- package/components/filter-bar/index.esm.js +416 -394
- package/components/filter-bar/index.umd.cjs +1 -1
- package/components/filter-condition-editor/index.esm.js +388 -386
- package/components/filter-condition-editor/index.umd.cjs +1 -1
- package/components/flow-canvas/index.esm.js +1 -1
- package/components/flow-canvas/index.umd.cjs +1 -1
- package/components/language-textbox/index.esm.js +77 -76
- package/components/language-textbox/index.umd.cjs +1 -1
- package/components/list-nav/index.esm.js +4 -2
- package/components/list-nav/index.umd.cjs +1 -1
- package/components/lookup/index.esm.js +118 -118
- package/components/lookup/index.umd.cjs +1 -1
- package/components/mapping-editor/index.esm.js +80 -81
- package/components/mapping-editor/index.umd.cjs +1 -1
- package/components/message-box/index.esm.js +237 -237
- package/components/message-box/index.umd.cjs +1 -1
- package/components/modal/index.esm.js +1 -1
- package/components/modal/index.umd.cjs +1 -1
- package/components/number-range/index.esm.js +1 -1
- package/components/number-range/index.umd.cjs +1 -1
- package/components/number-spinner/index.esm.js +9 -3
- package/components/number-spinner/index.umd.cjs +1 -1
- package/components/order/index.esm.js +114 -112
- package/components/order/index.umd.cjs +1 -1
- package/components/page-header/index.esm.js +1 -1
- package/components/page-header/index.umd.cjs +1 -1
- package/components/property-panel/index.esm.js +1 -1
- package/components/property-panel/index.umd.cjs +1 -1
- package/components/query-solution/index.esm.js +485 -463
- package/components/query-solution/index.umd.cjs +3 -3
- package/components/radio-group/index.esm.js +30 -30
- package/components/radio-group/index.umd.cjs +1 -1
- package/components/response-layout/index.esm.js +1 -1
- package/components/response-layout/index.umd.cjs +1 -1
- package/components/response-layout-editor/index.esm.js +544 -545
- package/components/response-layout-editor/index.umd.cjs +1 -1
- package/components/response-toolbar/index.esm.js +1 -1
- package/components/response-toolbar/index.umd.cjs +1 -1
- package/components/schema-selector/index.esm.js +6 -4
- package/components/schema-selector/index.umd.cjs +2 -2
- package/components/section/index.esm.js +1 -1
- package/components/section/index.umd.cjs +1 -1
- package/components/sort-condition-editor/index.esm.js +9 -7
- package/components/sort-condition-editor/index.umd.cjs +1 -1
- package/components/switch/index.esm.js +77 -78
- package/components/switch/index.umd.cjs +1 -1
- package/components/tabs/index.esm.js +5 -3
- package/components/tabs/index.umd.cjs +1 -1
- package/components/textarea/index.esm.js +1 -1
- package/components/textarea/index.umd.cjs +1 -1
- package/components/time-picker/index.esm.js +2 -2
- package/components/time-picker/index.umd.cjs +1 -1
- package/components/video/index.esm.js +1 -1
- package/components/video/index.umd.cjs +1 -1
- package/designer/button-edit/index.esm.js +211 -211
- package/designer/button-edit/index.umd.cjs +1 -1
- package/designer/checkbox/index.esm.js +1 -1
- package/designer/checkbox/index.umd.cjs +1 -1
- package/designer/checkbox-group/index.esm.js +25 -26
- package/designer/checkbox-group/index.umd.cjs +1 -1
- package/designer/data-grid/index.esm.js +15 -9
- package/designer/data-grid/index.umd.cjs +2 -2
- package/designer/farris-designer.all.esm.js +917 -916
- package/designer/farris-designer.all.umd.cjs +5 -5
- package/designer/input-group/index.esm.js +2 -1
- package/designer/input-group/index.umd.cjs +1 -1
- package/designer/list-view/index.esm.js +685 -689
- package/designer/list-view/index.umd.cjs +3 -3
- package/designer/radio-group/index.esm.js +7 -3
- package/designer/radio-group/index.umd.cjs +1 -1
- package/farris.all.esm.js +5641 -5603
- package/farris.all.umd.cjs +21 -21
- package/locales/data-grid/ui/en.json +2 -1
- package/locales/data-grid/ui/zh-CHS.json +2 -1
- package/locales/data-grid/ui/zh-CHT.json +2 -1
- package/locales/designer/en.json +2 -1
- package/locales/designer/zh-CHS.json +2 -1
- package/locales/designer/zh-CHT.json +2 -1
- package/locales/ui/en.json +2 -1
- package/locales/ui/zh-CHS.json +2 -1
- package/locales/ui/zh-CHT.json +2 -1
- package/package.json +1 -1
|
@@ -149,7 +149,7 @@ const Tt = {
|
|
|
149
149
|
convertFrom: (e, t, n) => e.appearance ? e.appearance[t] : e[t]
|
|
150
150
|
}, kt = {
|
|
151
151
|
convertFrom: (e, t, n) => e.buttons && e.buttons.length ? `共 ${e.buttons.length} 项` : "无"
|
|
152
|
-
},
|
|
152
|
+
}, Vt = {
|
|
153
153
|
convertTo: (e, t, n, o) => {
|
|
154
154
|
e.editor && (e.editor[t] = n);
|
|
155
155
|
},
|
|
@@ -201,7 +201,7 @@ const Tt = {
|
|
|
201
201
|
"list-view": { type: "list-view", name: "列表" },
|
|
202
202
|
"filter-bar": { type: "filter-bar", name: "筛选条" },
|
|
203
203
|
"language-textbox": { type: "language-textbox", name: "多语输入框" }
|
|
204
|
-
},
|
|
204
|
+
}, Ot = {
|
|
205
205
|
convertFrom: (e, t, n) => {
|
|
206
206
|
var f;
|
|
207
207
|
const o = e.editor && e.editor[t] ? e.editor[t] : e[t];
|
|
@@ -387,9 +387,9 @@ function we(e, t, n) {
|
|
|
387
387
|
const o = /* @__PURE__ */ new Map([
|
|
388
388
|
["/converter/appearance.converter", Tt],
|
|
389
389
|
["/converter/buttons.converter", kt],
|
|
390
|
-
["/converter/property-editor.converter",
|
|
390
|
+
["/converter/property-editor.converter", Vt],
|
|
391
391
|
["/converter/items-count.converter", At],
|
|
392
|
-
["/converter/type.converter",
|
|
392
|
+
["/converter/type.converter", Ot],
|
|
393
393
|
["/converter/change-editor.converter", Pt],
|
|
394
394
|
["/converter/change-formatter.converter", Bt],
|
|
395
395
|
["/converter/column-command.converter", It],
|
|
@@ -445,37 +445,37 @@ function we(e, t, n) {
|
|
|
445
445
|
return typeof s == "string" && s && o.has(s) ? o.get(s) || null : s || null;
|
|
446
446
|
}
|
|
447
447
|
function y(a, l, s, h, u, g = "", I = "") {
|
|
448
|
-
return Object.keys(a).map((
|
|
449
|
-
const P = F(1), R =
|
|
450
|
-
b.readonly = b.readonly === void 0 ?
|
|
448
|
+
return Object.keys(a).map((V) => {
|
|
449
|
+
const P = F(1), R = V, d = a[V], M = Object.keys(d), A = d.title, T = d.type, B = f.get(T) || { type: "input-group", enableClear: !1 }, b = d.editor ? Object.assign({}, B, d.editor) : Object.assign({}, B), w = S(M, d, l), O = k(M, d, l);
|
|
450
|
+
b.readonly = b.readonly === void 0 ? O() : b.readonly;
|
|
451
451
|
const j = d.type === "cascade" ? y(d.properties, l, s, h, u, g, I) : [], D = !0;
|
|
452
452
|
let x = p(d, I);
|
|
453
453
|
const H = L({
|
|
454
454
|
get() {
|
|
455
455
|
if (P.value) {
|
|
456
456
|
if (["class", "style"].find((te) => te === R) && !x && (x = o.get("/converter/appearance.converter") || null), x && x.convertFrom)
|
|
457
|
-
return x.convertFrom(s,
|
|
458
|
-
const N = s[
|
|
457
|
+
return x.convertFrom(s, V, u, g);
|
|
458
|
+
const N = s[V];
|
|
459
459
|
return Object.prototype.hasOwnProperty.call(d, "defaultValue") && (N === void 0 || typeof N == "string" && N === "") ? d.type === "boolean" ? d.defaultValue : d.defaultValue || "" : N;
|
|
460
460
|
}
|
|
461
461
|
return null;
|
|
462
462
|
},
|
|
463
463
|
set(N) {
|
|
464
|
-
P.value += 1, x && x.convertTo ? (x.convertTo(h,
|
|
464
|
+
P.value += 1, x && x.convertTo ? (x.convertTo(h, V, N, u, g), x.convertTo(s, V, N, u, g)) : (h[V] = N, s[V] = N);
|
|
465
465
|
}
|
|
466
|
-
}), { refreshPanelAfterChanged: _, description: K, isExpand: ee, parentPropertyID: X } = d, Y = { propertyID: R, propertyName: A, propertyType: T, propertyValue: H, editor: b, visible: w, readonly:
|
|
466
|
+
}), { refreshPanelAfterChanged: _, description: K, isExpand: ee, parentPropertyID: X } = d, Y = { propertyID: R, propertyName: A, propertyType: T, propertyValue: H, editor: b, visible: w, readonly: O, cascadeConfig: j, hideCascadeTitle: D, refreshPanelAfterChanged: _, description: K, isExpand: ee, parentPropertyID: X };
|
|
467
467
|
return l[R] = Y, Y;
|
|
468
468
|
});
|
|
469
469
|
}
|
|
470
470
|
function r(a, l, s = {}) {
|
|
471
471
|
const h = {}, u = e[a];
|
|
472
472
|
return u && u.categories ? Object.keys(u.categories).map((I) => {
|
|
473
|
-
const E = u.categories[I],
|
|
474
|
-
return { categoryId: I, categoryName:
|
|
473
|
+
const E = u.categories[I], V = E == null ? void 0 : E.title, P = y(E.properties || {}, h, {}, s, l);
|
|
474
|
+
return { categoryId: I, categoryName: V, properties: P };
|
|
475
475
|
}) : [];
|
|
476
476
|
}
|
|
477
477
|
function i(a, l, s, h, u = "") {
|
|
478
|
-
const g = l.$ref.schema, I = l.$ref.converter, E = s[g],
|
|
478
|
+
const g = l.$ref.schema, I = l.$ref.converter, E = s[g], V = E.type, P = n(E), R = {}, d = e[V];
|
|
479
479
|
if (d && d.categories) {
|
|
480
480
|
const M = d.categories[a], A = M == null ? void 0 : M.title;
|
|
481
481
|
I && Object.keys(M.properties).forEach((b) => {
|
|
@@ -488,17 +488,17 @@ function we(e, t, n) {
|
|
|
488
488
|
}
|
|
489
489
|
function c(a, l, s, h, u) {
|
|
490
490
|
const g = a.type, I = n(a), E = {};
|
|
491
|
-
let
|
|
492
|
-
if (
|
|
491
|
+
let V = u || e[g];
|
|
492
|
+
if (V && Object.keys(V).length === 0 && s && s.getPropConfig && (V = s.getPropConfig(h)), V && V.categories) {
|
|
493
493
|
const P = [];
|
|
494
|
-
return Object.keys(
|
|
495
|
-
const d =
|
|
494
|
+
return Object.keys(V.categories).map((R) => {
|
|
495
|
+
const d = V.categories[R];
|
|
496
496
|
if (d.$ref) {
|
|
497
497
|
P.push(i(R, d, a, l, h));
|
|
498
498
|
return;
|
|
499
499
|
}
|
|
500
|
-
const M = d == null ? void 0 : d.title, A = d == null ? void 0 : d.tabId, T = d == null ? void 0 : d.tabName, B = d == null ? void 0 : d.hide, b = d == null ? void 0 : d.hideTitle, w = y(d.properties || {}, E, I, a, l, h, d.$converter), { setPropertyRelates:
|
|
501
|
-
P.push({ categoryId: R, categoryName: M, tabId: A, tabName: T, hide: B, properties: w, hideTitle: b, setPropertyRelates:
|
|
500
|
+
const M = d == null ? void 0 : d.title, A = d == null ? void 0 : d.tabId, T = d == null ? void 0 : d.tabName, B = d == null ? void 0 : d.hide, b = d == null ? void 0 : d.hideTitle, w = y(d.properties || {}, E, I, a, l, h, d.$converter), { setPropertyRelates: O } = d, j = d == null ? void 0 : d.parentPropertyID;
|
|
501
|
+
P.push({ categoryId: R, categoryName: M, tabId: A, tabName: T, hide: B, properties: w, hideTitle: b, setPropertyRelates: O, parentPropertyID: j });
|
|
502
502
|
}), P;
|
|
503
503
|
}
|
|
504
504
|
return [];
|
|
@@ -511,10 +511,10 @@ function we(e, t, n) {
|
|
|
511
511
|
}
|
|
512
512
|
const Fe = {}, Te = {};
|
|
513
513
|
we(Fe, Te, St);
|
|
514
|
-
const ke = {},
|
|
515
|
-
we(
|
|
514
|
+
const ke = {}, Ve = {}, { getSchemaByType: ao, resolveSchemaWithDefaultValue: qt, resolveSchemaToProps: so, mappingSchemaToProps: co, setDesignerContext: uo } = ye(ke, Ve), Oe = {}, Pe = {};
|
|
515
|
+
we(Oe, Pe, qt);
|
|
516
516
|
function Wt(e, t, n = /* @__PURE__ */ new Map(), o = (m, S, k, p) => S, f = {}, v = (m) => m) {
|
|
517
|
-
return be[t.title] = t, Se[t.title] = o, Fe[t.title] = f, Te[t.title] = v, ke[t.title] = t,
|
|
517
|
+
return be[t.title] = t, Se[t.title] = o, Fe[t.title] = f, Te[t.title] = v, ke[t.title] = t, Ve[t.title] = o, Oe[t.title] = f, Pe[t.title] = v, (m = {}, S = !0) => {
|
|
518
518
|
if (!S)
|
|
519
519
|
return wt(m, n);
|
|
520
520
|
const k = Ct(m, t, n), p = Object.keys(e).reduce((y, r) => (y[r] = e[r].default, y), {});
|
|
@@ -839,7 +839,7 @@ function pe(e, t, n, o, f, v, m, S, k, p) {
|
|
|
839
839
|
listViewItemClass: g,
|
|
840
840
|
listViewItemStyle: I,
|
|
841
841
|
onCheckItem: E,
|
|
842
|
-
onClickItem:
|
|
842
|
+
onClickItem: V
|
|
843
843
|
} = m, P = L(() => {
|
|
844
844
|
const d = {
|
|
845
845
|
"text-overflow": "ellipsis",
|
|
@@ -857,7 +857,7 @@ function pe(e, t, n, o, f, v, m, S, k, p) {
|
|
|
857
857
|
id: u(d, M),
|
|
858
858
|
key: u(d, M),
|
|
859
859
|
style: I(d, M),
|
|
860
|
-
onClick: (T) =>
|
|
860
|
+
onClick: (T) => V(d, M, T),
|
|
861
861
|
onMouseenter: (T) => l(T, d, M),
|
|
862
862
|
onMouseover: (T) => s(T, d, M),
|
|
863
863
|
onMouseout: (T) => h(T, d, M)
|
|
@@ -910,7 +910,7 @@ function fn(e, t, n, o, f, v, m, S, k, p) {
|
|
|
910
910
|
style: "margin: 10px 0;"
|
|
911
911
|
}, [P.raw[i.value || "name"]]);
|
|
912
912
|
}
|
|
913
|
-
function
|
|
913
|
+
function V(P, R, d) {
|
|
914
914
|
return C("li", {
|
|
915
915
|
class: h(P, R),
|
|
916
916
|
id: s(P, R),
|
|
@@ -935,7 +935,7 @@ function fn(e, t, n, o, f, v, m, S, k, p) {
|
|
|
935
935
|
}, [E(P, R, d)])]);
|
|
936
936
|
}
|
|
937
937
|
return {
|
|
938
|
-
renderItem:
|
|
938
|
+
renderItem: V
|
|
939
939
|
};
|
|
940
940
|
}
|
|
941
941
|
function mn(e, t, n, o, f, v, m, S, k, p) {
|
|
@@ -951,57 +951,57 @@ function mn(e, t, n, o, f, v, m, S, k, p) {
|
|
|
951
951
|
} = m, {
|
|
952
952
|
dragstart: I,
|
|
953
953
|
dragenter: E,
|
|
954
|
-
dragover:
|
|
954
|
+
dragover: V,
|
|
955
955
|
dragend: P
|
|
956
956
|
} = o, {
|
|
957
957
|
removeItem: R
|
|
958
958
|
} = k, d = L(() => ({
|
|
959
959
|
margin: y.value ? "10px 0" : "10px 0px 10px 14px"
|
|
960
960
|
}));
|
|
961
|
-
function M(w,
|
|
961
|
+
function M(w, O = "") {
|
|
962
962
|
const j = w.target;
|
|
963
|
-
j.title = j.scrollWidth > j.clientWidth ?
|
|
963
|
+
j.title = j.scrollWidth > j.clientWidth ? O : "";
|
|
964
964
|
}
|
|
965
965
|
function A(w) {
|
|
966
966
|
return C("div", {
|
|
967
967
|
style: d.value,
|
|
968
|
-
onMouseenter: (
|
|
968
|
+
onMouseenter: (O) => M(O, w.raw[i.value || "name"])
|
|
969
969
|
}, [w.raw[i.value || "name"]]);
|
|
970
970
|
}
|
|
971
971
|
function T() {
|
|
972
972
|
return t.slots.itemContent ? t.slots.itemContent : A;
|
|
973
973
|
}
|
|
974
974
|
const B = T();
|
|
975
|
-
function b(w,
|
|
975
|
+
function b(w, O, j) {
|
|
976
976
|
return C("li", {
|
|
977
|
-
class: h(w,
|
|
978
|
-
id: s(w,
|
|
979
|
-
key: s(w,
|
|
980
|
-
onClick: (D) => g(w,
|
|
981
|
-
onMouseenter: (D) => c(D, w,
|
|
982
|
-
onMouseover: (D) => a(D, w,
|
|
983
|
-
onMouseout: (D) => l(D, w,
|
|
977
|
+
class: h(w, O),
|
|
978
|
+
id: s(w, O),
|
|
979
|
+
key: s(w, O),
|
|
980
|
+
onClick: (D) => g(w, O, D),
|
|
981
|
+
onMouseenter: (D) => c(D, w, O),
|
|
982
|
+
onMouseover: (D) => a(D, w, O),
|
|
983
|
+
onMouseout: (D) => l(D, w, O),
|
|
984
984
|
draggable: "true",
|
|
985
|
-
onDragstart: (D) => I(D, w,
|
|
986
|
-
onDragenter: (D) => E(D,
|
|
985
|
+
onDragstart: (D) => I(D, w, O),
|
|
986
|
+
onDragenter: (D) => E(D, O),
|
|
987
987
|
onDragend: (D) => P(D, w),
|
|
988
|
-
onDragover: (D) =>
|
|
988
|
+
onDragover: (D) => V(D)
|
|
989
989
|
}, [y.value && C("div", {
|
|
990
990
|
class: "f-list-select",
|
|
991
991
|
onClick: (D) => D.stopPropagation()
|
|
992
992
|
}, [C(se, {
|
|
993
|
-
id: "list-" + s(w,
|
|
993
|
+
id: "list-" + s(w, O),
|
|
994
994
|
customClass: "listview-checkbox",
|
|
995
995
|
disabled: w[r.value] || !w.checked,
|
|
996
996
|
checked: w.checked,
|
|
997
997
|
"onUpdate:checked": (D) => w.checked = D,
|
|
998
|
-
onChange: (D) => u(w,
|
|
998
|
+
onChange: (D) => u(w, O, !D.checked)
|
|
999
999
|
}, null)]), C("div", {
|
|
1000
1000
|
class: "f-list-content"
|
|
1001
1001
|
}, [B(w)]), C("div", {
|
|
1002
1002
|
class: "f-list-remove",
|
|
1003
1003
|
onClick: (D) => {
|
|
1004
|
-
D.stopPropagation(), R(
|
|
1004
|
+
D.stopPropagation(), R(O);
|
|
1005
1005
|
}
|
|
1006
1006
|
}, [C("div", {
|
|
1007
1007
|
class: "f-list-remove-icon"
|
|
@@ -1078,8 +1078,8 @@ function gn(e, t, n, o, f, v, m, S, k, p) {
|
|
|
1078
1078
|
const I = g(), {
|
|
1079
1079
|
renderItem: E
|
|
1080
1080
|
} = I(e, t, n, p, f, v, k, m, l, S), {
|
|
1081
|
-
renderItem:
|
|
1082
|
-
} = vn(e, t, n, p, f, v, k, m, l, S), P = [E,
|
|
1081
|
+
renderItem: V
|
|
1082
|
+
} = vn(e, t, n, p, f, v, k, m, l, S), P = [E, V];
|
|
1083
1083
|
function R() {
|
|
1084
1084
|
return n.value.filter((A) => A.visible !== !1).map((A, T) => P[A.type](A, T, c));
|
|
1085
1085
|
}
|
|
@@ -1199,12 +1199,12 @@ function yn() {
|
|
|
1199
1199
|
function bn(e, t, n, o) {
|
|
1200
1200
|
const f = F(e.idField), { dataView: v } = n, m = F(-1), S = F(!1), { activeIndex: k, focusedItemId: p, hoverIndex: y, resumeHover: r, suspendHover: i } = o;
|
|
1201
1201
|
let c, a = 0, l = 0;
|
|
1202
|
-
function s(
|
|
1203
|
-
const R =
|
|
1204
|
-
c.style.left = parseInt(c.style.left) + R + "px", c.style.top = parseInt(c.style.top) + d + "px", a =
|
|
1202
|
+
function s(V, P) {
|
|
1203
|
+
const R = V - a, d = P - l;
|
|
1204
|
+
c.style.left = parseInt(c.style.left) + R + "px", c.style.top = parseInt(c.style.top) + d + "px", a = V, l = P;
|
|
1205
1205
|
}
|
|
1206
|
-
function h(
|
|
1207
|
-
const { left: P, top: R } =
|
|
1206
|
+
function h(V) {
|
|
1207
|
+
const { left: P, top: R } = V.getBoundingClientRect(), d = V.cloneNode(!0);
|
|
1208
1208
|
return d.style.cssText = `
|
|
1209
1209
|
position:absolute;
|
|
1210
1210
|
left:${P}px;
|
|
@@ -1219,34 +1219,34 @@ function bn(e, t, n, o) {
|
|
|
1219
1219
|
align-items: center;
|
|
1220
1220
|
float: none;
|
|
1221
1221
|
text-align: initial;
|
|
1222
|
-
width:${getComputedStyle(
|
|
1223
|
-
height:${getComputedStyle(
|
|
1222
|
+
width:${getComputedStyle(V).width};
|
|
1223
|
+
height:${getComputedStyle(V).height};
|
|
1224
1224
|
`, d.children[0].style.cssText = "overflow: hidden;flex: 1 1 auto;width: 100%;", d.children[0].children[0].style.cssText = `
|
|
1225
1225
|
margin: 10px 0px 10px 14px;
|
|
1226
1226
|
overflow: hidden;text-overflow: ellipsis;white-space: nowrap;
|
|
1227
1227
|
`, d.children[1].style.cssText = "width: 30px;color: #f4625f;padding: 0 14px 0 0", d.children[2].style.cssText = "padding: 0 14px 0 0;", document.body.appendChild(d), d;
|
|
1228
1228
|
}
|
|
1229
|
-
function u(
|
|
1230
|
-
if (
|
|
1231
|
-
if (c = h(
|
|
1229
|
+
function u(V, P, R) {
|
|
1230
|
+
if (V.stopPropagation(), i(), P) {
|
|
1231
|
+
if (c = h(V.target), V.dataTransfer) {
|
|
1232
1232
|
const d = new Image();
|
|
1233
|
-
d.src = "",
|
|
1233
|
+
d.src = "", V.dataTransfer.setDragImage(d, 0, 0);
|
|
1234
1234
|
}
|
|
1235
|
-
a =
|
|
1235
|
+
a = V.pageX, l = V.pageY, setTimeout(() => {
|
|
1236
1236
|
m.value = R, S.value = !0, P.moving = !0;
|
|
1237
1237
|
});
|
|
1238
1238
|
}
|
|
1239
1239
|
}
|
|
1240
|
-
function g(
|
|
1241
|
-
if (
|
|
1240
|
+
function g(V, P) {
|
|
1241
|
+
if (V.preventDefault(), m.value !== P) {
|
|
1242
1242
|
const R = v.value[m.value], d = v.value;
|
|
1243
|
-
d.splice(m.value, 1), d.splice(P, 0, R), m.value = P, s(
|
|
1243
|
+
d.splice(m.value, 1), d.splice(P, 0, R), m.value = P, s(V.pageX, V.pageY);
|
|
1244
1244
|
}
|
|
1245
1245
|
}
|
|
1246
|
-
function I(
|
|
1247
|
-
|
|
1246
|
+
function I(V) {
|
|
1247
|
+
V.preventDefault(), V.dataTransfer && (V.dataTransfer.dropEffect = "move"), s(V.pageX, V.pageY);
|
|
1248
1248
|
}
|
|
1249
|
-
function E(
|
|
1249
|
+
function E(V, P) {
|
|
1250
1250
|
P && (P.moving = !1, c && (document.body.removeChild(c), c = null)), v.value.forEach((R, d) => {
|
|
1251
1251
|
R.__fv_index__ = d;
|
|
1252
1252
|
}), S.value = !1, r(), y.value = P.raw.__fv_index__, k.value = P.raw.__fv_index__, p.value = P.raw[f.value], t.emit("change", v.value), t.emit("activeChange", [P.raw]);
|
|
@@ -1263,44 +1263,44 @@ function Sn(e, t, n, o, f, v) {
|
|
|
1263
1263
|
const m = F(e.idField), S = F(e.disableField), k = F(e.draggable);
|
|
1264
1264
|
F(e.itemClass);
|
|
1265
1265
|
const p = F(e.selection.multiSelect ?? !1), y = F(e.selection.multiSelectMode), { isDragging: r } = o, { activeIndex: i, focusedItemId: c, hoverIndex: a } = f, { clearSelection: l, getSelectedItems: s, toggleSelectItem: h, currentSelectedDataId: u } = v, g = F(s()), I = (b) => g.value.length === 0 ? !1 : g.value.some((w) => {
|
|
1266
|
-
let
|
|
1267
|
-
return w.data ?
|
|
1266
|
+
let O = "";
|
|
1267
|
+
return w.data ? O = w.data[m.value] : O = w[m.value], O === b;
|
|
1268
1268
|
});
|
|
1269
1269
|
function E() {
|
|
1270
1270
|
g.value = s();
|
|
1271
1271
|
}
|
|
1272
|
-
function
|
|
1272
|
+
function V(b, w) {
|
|
1273
1273
|
return b.raw[m.value] != null ? b.raw[m.value] : "";
|
|
1274
1274
|
}
|
|
1275
1275
|
function P(b, w) {
|
|
1276
|
-
const
|
|
1276
|
+
const O = {
|
|
1277
1277
|
"f-list-view-group-item": !0,
|
|
1278
1278
|
"f-list-view-draggable-item": k.value,
|
|
1279
1279
|
"f-un-click": !b.checked,
|
|
1280
1280
|
"f-un-select": !!b.raw[S.value],
|
|
1281
1281
|
"f-listview-active": (
|
|
1282
1282
|
// 多选
|
|
1283
|
-
p.value && I(
|
|
1283
|
+
p.value && I(V(b)) || // 单选
|
|
1284
1284
|
!p.value && b.raw[m.value] === u.value
|
|
1285
1285
|
),
|
|
1286
1286
|
"f-listview-hover": !r.value && w === a.value,
|
|
1287
1287
|
moving: !!b.moving
|
|
1288
1288
|
};
|
|
1289
1289
|
if (typeof e.itemClass == "string")
|
|
1290
|
-
return re(
|
|
1290
|
+
return re(O, e.itemClass);
|
|
1291
1291
|
if (typeof e.itemClass == "function") {
|
|
1292
1292
|
const j = e.itemClass(b);
|
|
1293
|
-
return re(
|
|
1293
|
+
return re(O, j);
|
|
1294
1294
|
}
|
|
1295
|
-
return
|
|
1295
|
+
return O;
|
|
1296
1296
|
}
|
|
1297
1297
|
function R(b, w) {
|
|
1298
|
-
const
|
|
1298
|
+
const O = (
|
|
1299
1299
|
// 多选
|
|
1300
|
-
p.value && I(
|
|
1300
|
+
p.value && I(V(b)) || // 单选
|
|
1301
1301
|
!p.value && b.raw[m.value] === u.value
|
|
1302
1302
|
), j = {};
|
|
1303
|
-
if (
|
|
1303
|
+
if (O && (j.backgroundColor = "#dae9ff"), typeof e.itemStyle == "string")
|
|
1304
1304
|
return me(j, e.itemStyle);
|
|
1305
1305
|
if (typeof e.itemStyle == "function") {
|
|
1306
1306
|
const D = e.itemStyle(b);
|
|
@@ -1309,19 +1309,19 @@ function Sn(e, t, n, o, f, v) {
|
|
|
1309
1309
|
return j;
|
|
1310
1310
|
}
|
|
1311
1311
|
const d = L(() => !p.value);
|
|
1312
|
-
function M(b, w,
|
|
1313
|
-
b.checked =
|
|
1312
|
+
function M(b, w, O) {
|
|
1313
|
+
b.checked = O, !b.raw[S.value] && (d.value && (c.value = b.raw[m.value]), h(b));
|
|
1314
1314
|
}
|
|
1315
1315
|
const A = L(() => p.value && y.value === "OnCheckClearByClick"), T = L(() => !p.value || p.value && (y.value === "OnCheckAndClick" || y.value === "OnClick"));
|
|
1316
|
-
function B(b, w,
|
|
1316
|
+
function B(b, w, O) {
|
|
1317
1317
|
if (b.raw[S.value]) {
|
|
1318
|
-
|
|
1318
|
+
O == null || O.preventDefault(), O == null || O.stopPropagation();
|
|
1319
1319
|
return;
|
|
1320
1320
|
}
|
|
1321
1321
|
c.value = b.raw[m.value], i.value = w, A.value && l(), T.value && (h(b), E()), t.emit("clickItem", { data: g.value, index: w, dataItem: b.raw }), t.emit("activeChange", g.value);
|
|
1322
1322
|
}
|
|
1323
1323
|
return {
|
|
1324
|
-
getKey:
|
|
1324
|
+
getKey: V,
|
|
1325
1325
|
selectedItems: g,
|
|
1326
1326
|
listViewItemClass: P,
|
|
1327
1327
|
listViewItemStyle: R,
|
|
@@ -1335,7 +1335,7 @@ const Be = /* @__PURE__ */ q({
|
|
|
1335
1335
|
props: un,
|
|
1336
1336
|
emits: ["afterSearch", "checkValuesChange", "clickItem", "selectItem", "unSelectItem", "selectionChange", "removeItem", "change", "activeChange", "pageIndexChanged", "pageSizeChanged", "changed", "selectionUpdate"],
|
|
1337
1337
|
setup(e, t) {
|
|
1338
|
-
const n = F(), o = F(!0), f = F(!1), v = F([]), m = 0, S = F(e.columns), k = Ue(e, t), p = Xe(e), y = Ye(e), r = Je(e, p), i = Qe(e, /* @__PURE__ */ new Map(), k, y, p), c = Ze(e, i, p, v, t), a = dn(e, n), l = Ke(e, i), s = L(() => i.dataView.value.length), h = et(e, t, c, p), u = tt(e, t, p, h, v), g = nt(e), I = ot(e, {}, g), E = it(e, i, u, y, p, g, I),
|
|
1338
|
+
const n = F(), o = F(!0), f = F(!1), v = F([]), m = 0, S = F(e.columns), k = Ue(e, t), p = Xe(e), y = Ye(e), r = Je(e, p), i = Qe(e, /* @__PURE__ */ new Map(), k, y, p), c = Ze(e, i, p, v, t), a = dn(e, n), l = Ke(e, i), s = L(() => i.dataView.value.length), h = et(e, t, c, p), u = tt(e, t, p, h, v), g = nt(e), I = ot(e, {}, g), E = it(e, i, u, y, p, g, I), V = rt(e, p, I, E), P = lt(e, p, I, E), R = at(e, S, i, s, m, E, V, P), {
|
|
1339
1339
|
getVisualData: d
|
|
1340
1340
|
} = R;
|
|
1341
1341
|
v.value = d(0, s.value + m - 1);
|
|
@@ -1351,9 +1351,9 @@ const Be = /* @__PURE__ */ q({
|
|
|
1351
1351
|
}
|
|
1352
1352
|
const B = T(), {
|
|
1353
1353
|
renderHeader: b
|
|
1354
|
-
} = B(e, t, a), w = yn(),
|
|
1354
|
+
} = B(e, t, a), w = yn(), O = bn(e, t, i, w), j = Sn(e, t, v, O, w, c), {
|
|
1355
1355
|
renderListArea: D
|
|
1356
|
-
} = gn(e, t, v, i, r, w, c, R, j,
|
|
1356
|
+
} = gn(e, t, v, i, r, w, c, R, j, O);
|
|
1357
1357
|
function x($) {
|
|
1358
1358
|
a.search($);
|
|
1359
1359
|
}
|
|
@@ -1513,7 +1513,7 @@ const Ie = /* @__PURE__ */ q({
|
|
|
1513
1513
|
}
|
|
1514
1514
|
}), Tn = /* @__PURE__ */ new Map([
|
|
1515
1515
|
["appearance", mt]
|
|
1516
|
-
]), kn = "https://json-schema.org/draft/2020-12/schema",
|
|
1516
|
+
]), kn = "https://json-schema.org/draft/2020-12/schema", Vn = "https://farris-design.gitee.io/combo-list.schema.json", On = "combo-list", Pn = "A Farris Input Component", Bn = "object", In = {
|
|
1517
1517
|
id: {
|
|
1518
1518
|
description: "The unique identifier for a combo list",
|
|
1519
1519
|
type: "string"
|
|
@@ -1693,9 +1693,9 @@ const Ie = /* @__PURE__ */ q({
|
|
|
1693
1693
|
type: "boolean",
|
|
1694
1694
|
default: !1
|
|
1695
1695
|
},
|
|
1696
|
-
|
|
1696
|
+
"onUpdate:modelValue": {
|
|
1697
1697
|
description: "",
|
|
1698
|
-
type: "
|
|
1698
|
+
type: "object"
|
|
1699
1699
|
}
|
|
1700
1700
|
}, Mn = [
|
|
1701
1701
|
"type"
|
|
@@ -1706,8 +1706,8 @@ const Ie = /* @__PURE__ */ q({
|
|
|
1706
1706
|
"visible"
|
|
1707
1707
|
], En = {
|
|
1708
1708
|
$schema: kn,
|
|
1709
|
-
$id:
|
|
1710
|
-
title:
|
|
1709
|
+
$id: Vn,
|
|
1710
|
+
title: On,
|
|
1711
1711
|
description: Pn,
|
|
1712
1712
|
type: Bn,
|
|
1713
1713
|
properties: In,
|
|
@@ -2069,7 +2069,7 @@ const Q = /* @__PURE__ */ q({
|
|
|
2069
2069
|
const B = l(i.value);
|
|
2070
2070
|
I(B);
|
|
2071
2071
|
}
|
|
2072
|
-
function
|
|
2072
|
+
function V() {
|
|
2073
2073
|
k.value || y.value;
|
|
2074
2074
|
}
|
|
2075
2075
|
function P(B) {
|
|
@@ -2084,8 +2084,8 @@ const Q = /* @__PURE__ */ q({
|
|
|
2084
2084
|
if (e.multiSelect) {
|
|
2085
2085
|
const b = a(B);
|
|
2086
2086
|
e.viewType;
|
|
2087
|
-
const
|
|
2088
|
-
i.value !==
|
|
2087
|
+
const O = b.map((j) => j[e.idField || e.valueField]).join(e.separator);
|
|
2088
|
+
i.value !== O && (i.value = O, t.emit("update:modelValue", i.value), t.emit("change", b, i.value));
|
|
2089
2089
|
}
|
|
2090
2090
|
}
|
|
2091
2091
|
function M() {
|
|
@@ -2103,8 +2103,8 @@ const Q = /* @__PURE__ */ q({
|
|
|
2103
2103
|
return t.expose({
|
|
2104
2104
|
getDisplayText: M,
|
|
2105
2105
|
hidePopup: T
|
|
2106
|
-
}), G([() => e.disabled, () => e.editable, () => e.enableClear, () => e.enableSearch, () => e.readonly], ([B, b, w,
|
|
2107
|
-
v.value = B, r.value = b, m.value = w, S.value =
|
|
2106
|
+
}), G([() => e.disabled, () => e.editable, () => e.enableClear, () => e.enableSearch, () => e.readonly], ([B, b, w, O, j]) => {
|
|
2107
|
+
v.value = B, r.value = b, m.value = w, S.value = O, k.value = j;
|
|
2108
2108
|
}), () => C(ft, {
|
|
2109
2109
|
ref: f,
|
|
2110
2110
|
id: e.id,
|
|
@@ -2125,7 +2125,7 @@ const Q = /* @__PURE__ */ q({
|
|
|
2125
2125
|
focusOnCreated: e.focusOnCreated,
|
|
2126
2126
|
selectOnCreated: e.selectOnCreated,
|
|
2127
2127
|
onClear: P,
|
|
2128
|
-
onClick:
|
|
2128
|
+
onClick: V,
|
|
2129
2129
|
onChange: d,
|
|
2130
2130
|
onBlur: E,
|
|
2131
2131
|
onInput: A,
|
|
@@ -2276,7 +2276,7 @@ class xn extends bt {
|
|
|
2276
2276
|
// },
|
|
2277
2277
|
// },
|
|
2278
2278
|
body: {
|
|
2279
|
-
visible:
|
|
2279
|
+
visible: !1,
|
|
2280
2280
|
$converter: he,
|
|
2281
2281
|
description: "",
|
|
2282
2282
|
title: "服务端API参数",
|
|
@@ -2308,7 +2308,8 @@ class xn extends bt {
|
|
|
2308
2308
|
editor: {
|
|
2309
2309
|
nullable: !0,
|
|
2310
2310
|
min: 0,
|
|
2311
|
-
useThousands: !1
|
|
2311
|
+
useThousands: !1,
|
|
2312
|
+
needValid: !0
|
|
2312
2313
|
}
|
|
2313
2314
|
},
|
|
2314
2315
|
...this.getCommonEditorProperties(t)
|
|
@@ -2385,7 +2386,8 @@ class xn extends bt {
|
|
|
2385
2386
|
editor: {
|
|
2386
2387
|
nullable: !0,
|
|
2387
2388
|
min: 0,
|
|
2388
|
-
useThousands: !1
|
|
2389
|
+
useThousands: !1,
|
|
2390
|
+
needValid: !0
|
|
2389
2391
|
}
|
|
2390
2392
|
},
|
|
2391
2393
|
...this.getCommonEditorProperties(t)
|
|
@@ -2600,12 +2602,12 @@ function Gn(e, t, n) {
|
|
|
2600
2602
|
return b || null;
|
|
2601
2603
|
}
|
|
2602
2604
|
function i(T = t) {
|
|
2603
|
-
var
|
|
2605
|
+
var O;
|
|
2604
2606
|
const { componentInstance: B, designerItemElementRef: b } = T;
|
|
2605
2607
|
if (!B || !B.value)
|
|
2606
2608
|
return null;
|
|
2607
2609
|
const { getCustomButtons: w } = B.value;
|
|
2608
|
-
return B.value.canMove || w && ((
|
|
2610
|
+
return B.value.canMove || w && ((O = w()) != null && O.length) ? b : i(T.parent);
|
|
2609
2611
|
}
|
|
2610
2612
|
function c(T) {
|
|
2611
2613
|
return !!n;
|
|
@@ -2622,8 +2624,8 @@ function Gn(e, t, n) {
|
|
|
2622
2624
|
function h(T, B) {
|
|
2623
2625
|
const { componentType: b } = T;
|
|
2624
2626
|
let w = pt(b, T, B);
|
|
2625
|
-
const
|
|
2626
|
-
return w && !w.id && w.type === b && (w.id = `${
|
|
2627
|
+
const O = b.toLowerCase().replace(/-/g, "_");
|
|
2628
|
+
return w && !w.id && w.type === b && (w.id = `${O}_${Math.random().toString().slice(2, 6)}`), w;
|
|
2627
2629
|
}
|
|
2628
2630
|
function u(T) {
|
|
2629
2631
|
}
|
|
@@ -2634,7 +2636,7 @@ function Gn(e, t, n) {
|
|
|
2634
2636
|
return;
|
|
2635
2637
|
const B = t == null ? void 0 : t.schema, { formSchemaUtils: b } = T;
|
|
2636
2638
|
if (B && b.getExpressions().length) {
|
|
2637
|
-
const w = b.getExpressions().findIndex((
|
|
2639
|
+
const w = b.getExpressions().findIndex((O) => O.target === B.id);
|
|
2638
2640
|
w > -1 && b.getExpressions().splice(w, 1);
|
|
2639
2641
|
}
|
|
2640
2642
|
}
|
|
@@ -2644,14 +2646,14 @@ function Gn(e, t, n) {
|
|
|
2644
2646
|
const B = t.schema, { formSchemaUtils: b } = T;
|
|
2645
2647
|
b.removeCommunicationInComponent(B);
|
|
2646
2648
|
}
|
|
2647
|
-
function
|
|
2649
|
+
function V(T) {
|
|
2648
2650
|
I(T), E(T), t != null && t.schema.contents && t.schema.contents.map((B) => {
|
|
2649
2651
|
let b = B.id;
|
|
2650
2652
|
B.type === "component-ref" && (b = B.component);
|
|
2651
2653
|
const w = e.value.querySelectorAll(`#${b}-design-item`);
|
|
2652
|
-
w != null && w.length && Array.from(w).map((
|
|
2654
|
+
w != null && w.length && Array.from(w).map((O) => {
|
|
2653
2655
|
var j;
|
|
2654
|
-
(j =
|
|
2656
|
+
(j = O == null ? void 0 : O.componentInstance) != null && j.value.onRemoveComponent && O.componentInstance.value.onRemoveComponent(T);
|
|
2655
2657
|
});
|
|
2656
2658
|
});
|
|
2657
2659
|
}
|
|
@@ -2664,8 +2666,8 @@ function Gn(e, t, n) {
|
|
|
2664
2666
|
!m && T && (m = T.formSchemaUtils);
|
|
2665
2667
|
let B = "";
|
|
2666
2668
|
{
|
|
2667
|
-
const { text:
|
|
2668
|
-
B =
|
|
2669
|
+
const { text: O, title: j, label: D, mainTitle: x, name: H, type: _ } = t.schema;
|
|
2670
|
+
B = O || j || D || x || H || ((w = Ce[_]) == null ? void 0 : w.name);
|
|
2669
2671
|
}
|
|
2670
2672
|
B && m.getControlBasicInfoMap().set(t.schema.id, {
|
|
2671
2673
|
componentTitle: B,
|
|
@@ -2673,9 +2675,9 @@ function Gn(e, t, n) {
|
|
|
2673
2675
|
});
|
|
2674
2676
|
}
|
|
2675
2677
|
function d(T) {
|
|
2676
|
-
var
|
|
2678
|
+
var O;
|
|
2677
2679
|
const { changeObject: B } = T, { propertyID: b, propertyValue: w } = B;
|
|
2678
|
-
if (["text", "title", "label", "name", "mainTitle"].includes((
|
|
2680
|
+
if (["text", "title", "label", "name", "mainTitle"].includes((O = T == null ? void 0 : T.changeObject) == null ? void 0 : O.propertyID) && b && w && (R(), m)) {
|
|
2679
2681
|
const j = m.getControlBasicInfoMap(), D = j.keys().toArray().filter((x) => {
|
|
2680
2682
|
var H, _;
|
|
2681
2683
|
return ((H = j.get(x)) == null ? void 0 : H.reliedComponentId) === ((_ = t == null ? void 0 : t.schema) == null ? void 0 : _.id);
|
|
@@ -2711,7 +2713,7 @@ function Gn(e, t, n) {
|
|
|
2711
2713
|
addNewChildComponentSchema: h,
|
|
2712
2714
|
triggerBelongedComponentToMoveWhenMoved: F(!1),
|
|
2713
2715
|
triggerBelongedComponentToDeleteWhenDeleted: F(!1),
|
|
2714
|
-
onRemoveComponent:
|
|
2716
|
+
onRemoveComponent: V,
|
|
2715
2717
|
getCustomButtons: P,
|
|
2716
2718
|
onPropertyChanged: M,
|
|
2717
2719
|
setComponentBasicInfoMap: R,
|
|
@@ -2757,7 +2759,7 @@ const _n = /* @__PURE__ */ q({
|
|
|
2757
2759
|
function h(g) {
|
|
2758
2760
|
if (g && g.length) {
|
|
2759
2761
|
const I = /* @__PURE__ */ new Map();
|
|
2760
|
-
g.reduce((E,
|
|
2762
|
+
g.reduce((E, V) => (E.set(V.id, V), E), I), n.value = g.map((E) => I.get(E.id)), t.emit("change", n.value);
|
|
2761
2763
|
}
|
|
2762
2764
|
}
|
|
2763
2765
|
function u() {
|