@farris/ui-vue 1.6.5-beta.7 → 1.6.5-beta.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/accordion/index.esm.js +65 -65
- package/components/accordion/index.umd.cjs +1 -1
- package/components/avatar/index.esm.js +28 -29
- package/components/avatar/index.umd.cjs +1 -1
- package/components/button-edit/index.esm.js +521 -517
- package/components/button-edit/index.umd.cjs +1 -1
- package/components/calendar/index.esm.js +134 -134
- package/components/calendar/index.umd.cjs +1 -1
- package/components/capsule/index.esm.js +192 -192
- package/components/capsule/index.umd.cjs +1 -1
- package/components/code-editor/index.esm.js +8 -8
- package/components/code-editor/index.umd.cjs +3 -3
- package/components/collection-property-editor/index.esm.js +72 -72
- package/components/collection-property-editor/index.umd.cjs +1 -1
- package/components/color-picker/index.esm.js +291 -289
- package/components/color-picker/index.umd.cjs +1 -1
- package/components/combo-list/index.esm.js +163 -157
- package/components/combo-list/index.umd.cjs +1 -1
- package/components/combo-tree/index.esm.js +113 -112
- package/components/combo-tree/index.umd.cjs +1 -1
- package/components/common/index.esm.js +3 -1
- package/components/common/index.umd.cjs +1 -1
- package/components/component/index.esm.js +10 -10
- package/components/component/index.umd.cjs +1 -1
- package/components/condition/index.esm.js +1122 -1121
- package/components/condition/index.umd.cjs +1 -1
- package/components/content-container/index.esm.js +190 -190
- package/components/content-container/index.umd.cjs +1 -1
- package/components/data-view/index.esm.js +2693 -2693
- package/components/data-view/index.umd.cjs +1 -1
- package/components/date-picker/index.esm.js +1604 -1601
- package/components/date-picker/index.umd.cjs +1 -1
- package/components/designer-canvas/index.esm.js +1082 -1079
- package/components/designer-canvas/index.umd.cjs +1 -1
- package/components/discussion-editor/index.esm.js +973 -1040
- package/components/discussion-editor/index.umd.cjs +6 -6
- package/components/dropdown/index.esm.js +335 -330
- package/components/dropdown/index.umd.cjs +2 -2
- package/components/dynamic-form/index.esm.js +8 -8
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/dynamic-resolver/index.esm.js +6 -6
- package/components/dynamic-resolver/index.umd.cjs +1 -1
- package/components/dynamic-view/index.esm.js +344 -344
- package/components/dynamic-view/index.umd.cjs +1 -1
- package/components/events-editor/index.esm.js +8 -8
- package/components/events-editor/index.umd.cjs +3 -3
- package/components/expression-editor/index.esm.js +1470 -1460
- package/components/expression-editor/index.umd.cjs +3 -3
- package/components/fieldset/index.esm.js +55 -55
- package/components/fieldset/index.umd.cjs +1 -1
- package/components/filter-bar/index.esm.js +853 -843
- package/components/filter-bar/index.umd.cjs +1 -1
- package/components/filter-condition-editor/index.esm.js +922 -911
- package/components/filter-condition-editor/index.umd.cjs +3 -3
- package/components/flow-canvas/index.esm.js +12 -12
- package/components/flow-canvas/index.umd.cjs +1 -1
- package/components/html-template/index.esm.js +164 -164
- package/components/html-template/index.umd.cjs +1 -1
- package/components/image-cropper/index.esm.js +198 -198
- package/components/image-cropper/index.umd.cjs +1 -1
- package/components/json-editor/index.esm.js +64 -64
- package/components/json-editor/index.umd.cjs +1 -1
- package/components/language-textbox/index.esm.js +140 -140
- package/components/language-textbox/index.umd.cjs +1 -1
- package/components/layout/index.esm.js +111 -111
- package/components/layout/index.umd.cjs +1 -1
- package/components/list-nav/index.esm.js +90 -90
- package/components/list-nav/index.umd.cjs +1 -1
- package/components/list-view/index.esm.js +104 -108
- package/components/list-view/index.umd.cjs +3 -3
- package/components/locale/index.esm.js +833 -901
- package/components/locale/index.umd.cjs +6 -6
- package/components/lookup/index.esm.js +1352 -1351
- package/components/lookup/index.umd.cjs +1 -1
- package/components/mapping-editor/index.esm.js +1311 -1307
- package/components/mapping-editor/index.umd.cjs +1 -1
- package/components/menu-lookup/index.esm.js +1059 -1127
- package/components/menu-lookup/index.umd.cjs +6 -6
- package/components/message-box/index.esm.js +7 -7
- package/components/message-box/index.umd.cjs +1 -1
- package/components/modal/index.esm.js +9 -9
- package/components/modal/index.umd.cjs +1 -1
- package/components/nav/index.esm.js +106 -106
- package/components/nav/index.umd.cjs +1 -1
- package/components/number-range/index.esm.js +326 -326
- package/components/number-range/index.umd.cjs +1 -1
- package/components/number-spinner/index.esm.js +168 -167
- package/components/number-spinner/index.umd.cjs +1 -1
- package/components/order/index.esm.js +739 -737
- package/components/order/index.umd.cjs +4 -4
- package/components/page-footer/index.esm.js +94 -94
- package/components/page-footer/index.umd.cjs +1 -1
- package/components/page-header/index.esm.js +942 -939
- package/components/page-header/index.umd.cjs +1 -1
- package/components/pagination/index.esm.js +82 -82
- package/components/pagination/index.umd.cjs +1 -1
- package/components/popover/index.esm.js +1 -1
- package/components/popover/index.umd.cjs +1 -1
- package/components/progress/index.esm.js +113 -113
- package/components/progress/index.umd.cjs +2 -2
- package/components/property-editor/index.esm.js +151 -150
- package/components/property-editor/index.umd.cjs +1 -1
- package/components/property-panel/index.esm.js +565 -565
- package/components/property-panel/index.umd.cjs +2 -2
- package/components/query-solution/index.esm.js +4142 -4190
- package/components/query-solution/index.umd.cjs +6 -6
- package/components/radio-button/index.esm.js +182 -182
- package/components/radio-button/index.umd.cjs +1 -1
- package/components/rate/index.esm.js +106 -106
- package/components/rate/index.umd.cjs +1 -1
- package/components/response-layout/index.esm.js +409 -409
- package/components/response-layout/index.umd.cjs +1 -1
- package/components/response-layout-editor/index.esm.js +1488 -1478
- package/components/response-layout-editor/index.umd.cjs +1 -1
- package/components/response-toolbar/index.esm.js +779 -776
- package/components/response-toolbar/index.umd.cjs +1 -1
- package/components/schema-selector/index.esm.js +1765 -1762
- package/components/schema-selector/index.umd.cjs +5 -5
- package/components/search-box/index.esm.js +114 -114
- package/components/search-box/index.umd.cjs +1 -1
- package/components/section/index.esm.js +1184 -1181
- package/components/section/index.umd.cjs +1 -1
- package/components/smoke-detector/index.esm.js +163 -163
- package/components/smoke-detector/index.umd.cjs +1 -1
- package/components/sort-condition-editor/index.esm.js +927 -916
- package/components/sort-condition-editor/index.umd.cjs +3 -3
- package/components/splitter/index.esm.js +3 -3
- package/components/splitter/index.umd.cjs +1 -1
- package/components/step/index.esm.js +133 -133
- package/components/step/index.umd.cjs +1 -1
- package/components/switch/index.esm.js +76 -72
- package/components/switch/index.umd.cjs +1 -1
- package/components/tabs/index.esm.js +1527 -1524
- package/components/tabs/index.umd.cjs +2 -2
- package/components/tags/index.esm.js +93 -93
- package/components/tags/index.umd.cjs +1 -1
- package/components/text/index.esm.js +138 -138
- package/components/text/index.umd.cjs +1 -1
- package/components/textarea/index.esm.js +361 -361
- package/components/textarea/index.umd.cjs +2 -2
- package/components/tooltip/index.esm.js +173 -171
- package/components/tooltip/index.umd.cjs +1 -1
- package/components/transfer/index.esm.js +130 -134
- package/components/transfer/index.umd.cjs +4 -4
- package/components/tree-grid/index.esm.js +25 -25
- package/components/tree-grid/index.umd.cjs +1 -1
- package/components/tree-view/index.esm.js +1746 -1743
- package/components/tree-view/index.umd.cjs +1 -1
- package/components/uploader/index.esm.js +170 -170
- package/components/uploader/index.umd.cjs +2 -2
- package/components/verify-detail/index.esm.js +196 -196
- package/components/verify-detail/index.umd.cjs +1 -1
- package/components/video/index.esm.js +8 -8
- package/components/video/index.umd.cjs +1 -1
- package/components/weather/index.esm.js +9 -9
- package/components/weather/index.umd.cjs +2 -2
- package/farris.all.esm.js +16987 -17002
- package/farris.all.umd.cjs +27 -27
- package/package.json +1 -1
- package/types/lookup/src/composition/use-dialog.d.ts +2 -0
- package/types/lookup/src/composition/use-input-change.d.ts +1 -0
- package/components/time-picker/index.css +0 -1
- package/components/time-picker/index.esm.js +0 -9793
- package/components/time-picker/index.umd.cjs +0 -1
- package/components/time-picker/package.json +0 -8
- package/components/time-picker/style.js +0 -6
- package/designer/button-edit/index.css +0 -1
- package/designer/button-edit/index.esm.js +0 -4856
- package/designer/button-edit/index.umd.cjs +0 -1
- package/designer/checkbox/index.esm.js +0 -250
- package/designer/checkbox/index.umd.cjs +0 -1
- package/designer/checkbox-group/index.esm.js +0 -377
- package/designer/checkbox-group/index.umd.cjs +0 -1
- package/designer/data-grid/index.css +0 -1
- package/designer/data-grid/index.esm.js +0 -15413
- package/designer/data-grid/index.umd.cjs +0 -23
- package/designer/data-view/index.esm.js +0 -854
- package/designer/data-view/index.umd.cjs +0 -38
- package/designer/drawer/index.css +0 -1
- package/designer/drawer/index.esm.js +0 -525
- package/designer/drawer/index.umd.cjs +0 -1
- package/designer/farris-designer.all.esm.js +0 -22320
- package/designer/farris-designer.all.umd.cjs +0 -34
- package/designer/index.css +0 -1
- package/designer/input-group/index.esm.js +0 -1098
- package/designer/input-group/index.umd.cjs +0 -1
- package/designer/list-view/index.css +0 -1
- package/designer/list-view/index.esm.js +0 -4675
- package/designer/list-view/index.umd.cjs +0 -40
- package/designer/radio-group/index.css +0 -1
- package/designer/radio-group/index.esm.js +0 -6980
- package/designer/radio-group/index.umd.cjs +0 -1
- package/designer/tree-grid/index.esm.js +0 -1099
- package/designer/tree-grid/index.umd.cjs +0 -1
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { defineComponent as E, ref as g, computed as V, watch as B, onMounted as O, createVNode as I, inject as k } from "vue";
|
|
2
2
|
import { useI18n as M } from "vue-i18n";
|
|
3
|
-
import
|
|
4
|
-
import { resolveAppearance as
|
|
5
|
-
import { isUndefined as
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import { useDesignerComponent as
|
|
9
|
-
import { FormSchemaEntityFieldType$Type as
|
|
10
|
-
import { InputBaseProperty as
|
|
11
|
-
const
|
|
12
|
-
["appearance",
|
|
13
|
-
]),
|
|
3
|
+
import z from "../button-edit/index.esm.js";
|
|
4
|
+
import { resolveAppearance as K, createPropsResolver as Q } from "../dynamic-resolver/index.esm.js";
|
|
5
|
+
import { isUndefined as X } from "lodash-es";
|
|
6
|
+
import Y from "../list-view/index.esm.js";
|
|
7
|
+
import Z from "../../designer/button-edit/index.esm.js";
|
|
8
|
+
import { useDesignerComponent as _ } from "../designer-canvas/index.esm.js";
|
|
9
|
+
import { FormSchemaEntityFieldType$Type as D, withInstall as ee } from "../common/index.esm.js";
|
|
10
|
+
import { InputBaseProperty as te } from "../property-panel/index.esm.js";
|
|
11
|
+
const ie = /* @__PURE__ */ new Map([
|
|
12
|
+
["appearance", K]
|
|
13
|
+
]), le = "https://json-schema.org/draft/2020-12/schema", ne = "https://farris-design.gitee.io/combo-list.schema.json", ae = "combo-list", oe = "A Farris Input Component", de = "object", ue = {
|
|
14
14
|
id: {
|
|
15
15
|
description: "The unique identifier for a combo list",
|
|
16
16
|
type: "string"
|
|
@@ -189,28 +189,32 @@ const ee = /* @__PURE__ */ new Map([
|
|
|
189
189
|
description: "启用高亮搜索",
|
|
190
190
|
type: "boolean",
|
|
191
191
|
default: !1
|
|
192
|
+
},
|
|
193
|
+
"onUpdate:modelValue": {
|
|
194
|
+
description: "",
|
|
195
|
+
type: "object"
|
|
192
196
|
}
|
|
193
|
-
},
|
|
197
|
+
}, re = [
|
|
194
198
|
"type"
|
|
195
|
-
],
|
|
199
|
+
], ce = [
|
|
196
200
|
"id",
|
|
197
201
|
"appearance",
|
|
198
202
|
"binding",
|
|
199
203
|
"visible"
|
|
200
|
-
],
|
|
201
|
-
$schema:
|
|
202
|
-
$id:
|
|
203
|
-
title:
|
|
204
|
-
description:
|
|
205
|
-
type:
|
|
206
|
-
properties:
|
|
207
|
-
required:
|
|
208
|
-
ignore:
|
|
204
|
+
], se = {
|
|
205
|
+
$schema: le,
|
|
206
|
+
$id: ne,
|
|
207
|
+
title: ae,
|
|
208
|
+
description: oe,
|
|
209
|
+
type: de,
|
|
210
|
+
properties: ue,
|
|
211
|
+
required: re,
|
|
212
|
+
ignore: ce
|
|
209
213
|
};
|
|
210
|
-
function
|
|
214
|
+
function fe(e, t, i) {
|
|
211
215
|
return t;
|
|
212
216
|
}
|
|
213
|
-
var
|
|
217
|
+
var me = /* @__PURE__ */ ((e) => (e.top = "top", e.bottom = "bottom", e.auto = "auto", e))(me || {});
|
|
214
218
|
const H = {
|
|
215
219
|
/**
|
|
216
220
|
* 组件标识
|
|
@@ -379,9 +383,9 @@ const H = {
|
|
|
379
383
|
enableHighlightSearch: { type: Boolean, default: !0 },
|
|
380
384
|
minPanelWidth: { type: Number, default: 160 },
|
|
381
385
|
popupOnClick: { type: Boolean, default: !0 }
|
|
382
|
-
},
|
|
386
|
+
}, he = Object.assign({}, H, {
|
|
383
387
|
readonly: {}
|
|
384
|
-
}), $ =
|
|
388
|
+
}), $ = Q(H, se, ie, fe), ye = {
|
|
385
389
|
dataSource: { type: Array, default: [] },
|
|
386
390
|
enableSearch: { type: Boolean, default: !1 },
|
|
387
391
|
idField: { type: String, default: "id" },
|
|
@@ -402,12 +406,12 @@ const H = {
|
|
|
402
406
|
},
|
|
403
407
|
// 搜索启用高亮
|
|
404
408
|
enableHighlightSearch: { type: Boolean, default: !0 }
|
|
405
|
-
},
|
|
409
|
+
}, ge = /* @__PURE__ */ E({
|
|
406
410
|
name: "FComboListContainer",
|
|
407
|
-
props:
|
|
411
|
+
props: ye,
|
|
408
412
|
emits: ["selectionChange"],
|
|
409
413
|
setup(e, t) {
|
|
410
|
-
const i = g(), a = g(e.dataSource), n = g([]), s = g(e.separator), m = g(e.width),
|
|
414
|
+
const i = g(), a = g(e.dataSource), n = g([]), s = g(e.separator), m = g(e.width), d = g(e.maxHeight), u = g(String(e.selectedValues).split(s.value)), C = V(() => e.multiSelect), y = V(() => ({
|
|
411
415
|
enableSelectRow: !0,
|
|
412
416
|
multiSelect: e.multiSelect,
|
|
413
417
|
multiSelectMode: "OnCheckAndClick",
|
|
@@ -418,48 +422,48 @@ const H = {
|
|
|
418
422
|
B(e.dataSource, () => {
|
|
419
423
|
a.value = e.dataSource;
|
|
420
424
|
}), V(() => e.enableSearch ? "SearchBar" : "ContentHeader");
|
|
421
|
-
const
|
|
422
|
-
const
|
|
423
|
-
return m.value !== void 0 && (
|
|
425
|
+
const b = V(() => {
|
|
426
|
+
const r = {};
|
|
427
|
+
return m.value !== void 0 && (r.width = `${m.value}px`), d.value !== void 0 && d.value > 0 && (r.maxHeight = `${d.value}px`), r;
|
|
424
428
|
});
|
|
425
|
-
function l(
|
|
426
|
-
i.value.search(
|
|
429
|
+
function l(r) {
|
|
430
|
+
i.value.search(r);
|
|
427
431
|
}
|
|
428
|
-
function o(
|
|
429
|
-
n.value =
|
|
432
|
+
function o(r) {
|
|
433
|
+
n.value = r.map((f) => Object.assign({}, f)), u.value = r.map((f) => f[e.idField]), t.emit("selectionChange", n.value);
|
|
430
434
|
}
|
|
431
|
-
function
|
|
435
|
+
function p(r) {
|
|
432
436
|
if (e.enableHighlightSearch)
|
|
433
437
|
return;
|
|
434
438
|
let f = [];
|
|
435
439
|
const {
|
|
436
|
-
searchOption:
|
|
440
|
+
searchOption: c
|
|
437
441
|
} = e;
|
|
438
|
-
typeof
|
|
442
|
+
typeof c == "function" ? f = a.value.filter((F) => c(r, F)) : f = a.value.filter((F) => F[e.valueField].indexOf(r) > -1 || F[e.textField].indexOf(r) > -1), i.value.updateDataSource(f);
|
|
439
443
|
}
|
|
440
|
-
B([() => e.selectedValues], ([
|
|
441
|
-
e.multiSelect ?
|
|
444
|
+
B([() => e.selectedValues], ([r]) => {
|
|
445
|
+
e.multiSelect ? u.value = r.split(s.value) : u.value = [r];
|
|
442
446
|
});
|
|
443
|
-
function
|
|
444
|
-
i.value.activeRowById(
|
|
447
|
+
function S(r) {
|
|
448
|
+
i.value.activeRowById(r);
|
|
445
449
|
}
|
|
446
450
|
return O(() => {
|
|
447
|
-
var
|
|
451
|
+
var r, f;
|
|
448
452
|
if (!e.multiSelect) {
|
|
449
|
-
const
|
|
450
|
-
let
|
|
451
|
-
if (!
|
|
452
|
-
const x = typeof
|
|
453
|
-
w === "number" && x !== w && (
|
|
453
|
+
const c = (r = u.value) == null ? void 0 : r[0];
|
|
454
|
+
let F = c;
|
|
455
|
+
if (!X(c)) {
|
|
456
|
+
const x = typeof c, w = typeof ((f = a.value[0]) == null ? void 0 : f[e.valueField || e.idField]);
|
|
457
|
+
w === "number" && x !== w && (F = Number(c)), w === "boolean" && x !== w && (F = c === "true" ? !0 : c === "false" ? !1 : c), S(F);
|
|
454
458
|
}
|
|
455
459
|
}
|
|
456
460
|
}), t.expose({
|
|
457
461
|
search: l,
|
|
458
|
-
activeRowById:
|
|
462
|
+
activeRowById: S
|
|
459
463
|
}), () => I("div", {
|
|
460
464
|
class: "f-combo-list-container",
|
|
461
|
-
style:
|
|
462
|
-
}, [I(
|
|
465
|
+
style: b.value
|
|
466
|
+
}, [I(Y, {
|
|
463
467
|
ref: i,
|
|
464
468
|
size: "small",
|
|
465
469
|
itemClass: "f-combo-list-item",
|
|
@@ -473,29 +477,29 @@ const H = {
|
|
|
473
477
|
multiSelect: e.multiSelect,
|
|
474
478
|
selection: y.value,
|
|
475
479
|
enableHighlightSearch: e.enableHighlightSearch,
|
|
476
|
-
selectionValues:
|
|
480
|
+
selectionValues: u.value,
|
|
477
481
|
onSelectionUpdate: o,
|
|
478
|
-
onAfterSearch:
|
|
482
|
+
onAfterSearch: p
|
|
479
483
|
}, null)]);
|
|
480
484
|
}
|
|
481
485
|
});
|
|
482
|
-
function
|
|
486
|
+
function ve(e) {
|
|
483
487
|
const { t } = M(), i = g(""), a = g(e.modelValue), n = g(e.data || []), s = g(e.editable);
|
|
484
488
|
function m(l) {
|
|
485
|
-
const o = e.multiSelect ? String(l).split(e.separator) : [String(l)],
|
|
486
|
-
return n.value.filter((f) =>
|
|
487
|
-
const
|
|
488
|
-
return
|
|
489
|
+
const o = e.multiSelect ? String(l).split(e.separator) : [String(l)], p = o.map((f) => [f, !0]), S = new Map(p);
|
|
490
|
+
return n.value.filter((f) => S.has(String(f[e.valueField]))).sort((f, c) => {
|
|
491
|
+
const F = o.indexOf(f[e.valueField]), x = o.indexOf(c[e.valueField]);
|
|
492
|
+
return F - x;
|
|
489
493
|
});
|
|
490
494
|
}
|
|
491
|
-
function
|
|
492
|
-
const o = m(l).map((
|
|
495
|
+
function d(l) {
|
|
496
|
+
const o = m(l).map((p) => p[e.textField]).join(e.separator);
|
|
493
497
|
i.value = s.value ? o || l : o;
|
|
494
498
|
}
|
|
495
|
-
function
|
|
499
|
+
function u(l) {
|
|
496
500
|
if (e.multiSelect) {
|
|
497
|
-
const o = l.split(e.separator).map((
|
|
498
|
-
return n.value.filter((
|
|
501
|
+
const o = l.split(e.separator).map((S) => [S, !0]), p = new Map(o);
|
|
502
|
+
return n.value.filter((S) => p.has(S[e.textField]));
|
|
499
503
|
}
|
|
500
504
|
return n.value.filter((o) => "" + o[e.textField] === l);
|
|
501
505
|
}
|
|
@@ -504,34 +508,34 @@ function ye(e) {
|
|
|
504
508
|
return o[e.idField] = l, o[e.textField] = l, [o];
|
|
505
509
|
}
|
|
506
510
|
function y(l) {
|
|
507
|
-
let o =
|
|
508
|
-
const
|
|
509
|
-
return s.value && !
|
|
511
|
+
let o = u(l);
|
|
512
|
+
const p = o && o.length > 0;
|
|
513
|
+
return s.value && !p && (o = C(l)), o;
|
|
510
514
|
}
|
|
511
|
-
function
|
|
512
|
-
const { url: l, method: o = "GET", headers:
|
|
515
|
+
function b() {
|
|
516
|
+
const { url: l, method: o = "GET", headers: p = { "Content-Type": "application/json;charset=utf-8;" }, body: S = null } = e.remote, r = o.toLowerCase() === "get" ? { method: o, headers: p } : { method: o, headers: p, body: S };
|
|
513
517
|
let f = !1;
|
|
514
|
-
fetch(new Request(l,
|
|
518
|
+
fetch(new Request(l, r)).then((c) => {
|
|
515
519
|
var x, w;
|
|
516
|
-
if (
|
|
517
|
-
return f = !!((w = (x =
|
|
518
|
-
throw
|
|
519
|
-
}).then((
|
|
520
|
-
|
|
521
|
-
}).catch((
|
|
522
|
-
console.warn(
|
|
520
|
+
if (c.status === 200)
|
|
521
|
+
return f = !!((w = (x = c.headers) == null ? void 0 : x.get("content-type")) != null && w.includes("application/json")), f ? c.text() : c.json();
|
|
522
|
+
throw c.status === 405 ? new Error(t("comboList.remoteError")) : new Error(c.statusText);
|
|
523
|
+
}).then((c) => {
|
|
524
|
+
c.length && (n.value = f ? JSON.parse(c) : c);
|
|
525
|
+
}).catch((c) => {
|
|
526
|
+
console.warn(c);
|
|
523
527
|
});
|
|
524
528
|
}
|
|
525
|
-
return e.remote &&
|
|
529
|
+
return e.remote && b(), B(() => e.data, () => {
|
|
526
530
|
n.value = e.data;
|
|
527
531
|
}), B([n], ([l]) => {
|
|
528
532
|
if (e.modelValue != null) {
|
|
529
|
-
const o = l.find((
|
|
533
|
+
const o = l.find((p) => p[e.valueField] === e.modelValue);
|
|
530
534
|
o && (i.value = o[e.textField]);
|
|
531
535
|
}
|
|
532
536
|
}), B(() => e.modelValue, (l) => {
|
|
533
|
-
a.value = l,
|
|
534
|
-
}),
|
|
537
|
+
a.value = l, d(l);
|
|
538
|
+
}), d(e.modelValue), { dataSource: n, displayText: i, editable: s, modelValue: a, getItemsByDisplayText: u, getItemsByValue: m, getSelectedItemsByDisplayText: y };
|
|
535
539
|
}
|
|
536
540
|
const L = /* @__PURE__ */ E({
|
|
537
541
|
name: "FComboList",
|
|
@@ -540,69 +544,71 @@ const L = /* @__PURE__ */ E({
|
|
|
540
544
|
setup(e, t) {
|
|
541
545
|
const {
|
|
542
546
|
t: i
|
|
543
|
-
} = M(), a = g(), n = g(), s = g(e.disabled || e.readonly), m = g(e.enableClear),
|
|
547
|
+
} = M(), a = g(), n = g(), s = g(e.disabled || e.readonly), m = g(e.enableClear), d = g(e.enableSearch), u = g(e.readonly), {
|
|
544
548
|
dataSource: C,
|
|
545
549
|
displayText: y,
|
|
546
|
-
editable:
|
|
550
|
+
editable: b,
|
|
547
551
|
modelValue: l,
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
552
|
+
getSelectedItemsByDisplayText: o,
|
|
553
|
+
getItemsByDisplayText: p,
|
|
554
|
+
getItemsByValue: S
|
|
555
|
+
} = ve(e), r = g(e.dropDownIcon);
|
|
556
|
+
r.value === '<span class="f-icon f-icon-arrow-chevron-down"></span>' && (r.value = '<span id="' + e.id + '-icon-dropdown" class="f-icon f-icon-arrow-chevron-down"></span>');
|
|
557
|
+
const f = V(() => e.multiSelect), c = V(() => n.value ? n.value.elementRef.getBoundingClientRect().width : 0);
|
|
558
|
+
function F() {
|
|
559
|
+
!f.value && n.value && n.value.hidePopup();
|
|
554
560
|
}
|
|
555
|
-
function
|
|
561
|
+
function x(h) {
|
|
556
562
|
y.value = h.map((T) => T[e.textField]).join(e.separator);
|
|
557
|
-
let
|
|
558
|
-
h.length === 1 ?
|
|
563
|
+
let v = "";
|
|
564
|
+
h.length === 1 ? v = h[0][e.valueField] : v = h.map((T) => T[e.valueField]).join(e.separator), l.value !== v && (l.value = v, t.emit("update:modelValue", l.value), t.emit("change", h, l.value));
|
|
559
565
|
}
|
|
560
|
-
function
|
|
561
|
-
const h =
|
|
562
|
-
|
|
566
|
+
function w() {
|
|
567
|
+
const h = S(l.value);
|
|
568
|
+
x(h);
|
|
563
569
|
}
|
|
564
|
-
function
|
|
565
|
-
|
|
570
|
+
function N() {
|
|
571
|
+
u.value || y.value;
|
|
566
572
|
}
|
|
567
|
-
function
|
|
568
|
-
var
|
|
569
|
-
l.value = "", (
|
|
573
|
+
function j(h) {
|
|
574
|
+
var v;
|
|
575
|
+
l.value = "", (v = a.value) == null || v.activeRowById(""), t.emit("update:modelValue", ""), t.emit("change", [], ""), t.emit("clear");
|
|
570
576
|
}
|
|
571
|
-
function
|
|
572
|
-
var
|
|
573
|
-
e.enableSearch && e.enableHighlightSearch && ((
|
|
577
|
+
function q(h) {
|
|
578
|
+
var v, T;
|
|
579
|
+
e.enableSearch && e.enableHighlightSearch && ((v = a.value) == null || v.search(h)), (T = a.value) == null || T.activeRowById(h), t.emit("change", [l.value], l.value);
|
|
574
580
|
}
|
|
575
|
-
function
|
|
581
|
+
function G(h) {
|
|
576
582
|
if (e.multiSelect) {
|
|
577
|
-
const
|
|
578
|
-
l.value !== P && (l.value = P, t.emit("update:modelValue", l.value), t.emit("change",
|
|
583
|
+
const v = S(l.value), P = v.map((R) => R[e.idField || e.valueField]).join(e.separator);
|
|
584
|
+
l.value !== P && (l.value = P, t.emit("update:modelValue", l.value), t.emit("change", v, l.value));
|
|
579
585
|
}
|
|
580
586
|
}
|
|
581
|
-
function
|
|
587
|
+
function W() {
|
|
582
588
|
return y.value;
|
|
583
589
|
}
|
|
584
|
-
function
|
|
590
|
+
function U(h) {
|
|
585
591
|
const {
|
|
586
|
-
value:
|
|
592
|
+
value: v
|
|
587
593
|
} = h.target;
|
|
588
|
-
|
|
594
|
+
q(v), t.emit("input", v);
|
|
589
595
|
}
|
|
590
|
-
function
|
|
596
|
+
function J() {
|
|
591
597
|
n.value.hidePopup();
|
|
592
598
|
}
|
|
593
599
|
return t.expose({
|
|
594
|
-
getDisplayText:
|
|
595
|
-
hidePopup:
|
|
596
|
-
}), B([() => e.disabled, () => e.editable, () => e.enableClear, () => e.enableSearch, () => e.readonly], ([h,
|
|
597
|
-
s.value = h,
|
|
598
|
-
}), () => I(
|
|
600
|
+
getDisplayText: W,
|
|
601
|
+
hidePopup: J
|
|
602
|
+
}), B([() => e.disabled, () => e.editable, () => e.enableClear, () => e.enableSearch, () => e.readonly], ([h, v, T, P, R]) => {
|
|
603
|
+
s.value = h, b.value = v, m.value = T, d.value = P, u.value = R;
|
|
604
|
+
}), () => I(z, {
|
|
599
605
|
ref: n,
|
|
600
606
|
id: e.id,
|
|
601
607
|
disable: s.value,
|
|
602
|
-
readonly:
|
|
608
|
+
readonly: u.value,
|
|
603
609
|
forcePlaceholder: e.forcePlaceholder,
|
|
604
|
-
editable:
|
|
605
|
-
buttonContent:
|
|
610
|
+
editable: b.value,
|
|
611
|
+
buttonContent: r.value,
|
|
606
612
|
placeholder: e.placeholder === "请选择" ? i("comboList.placeholder") : e.placeholder,
|
|
607
613
|
enableClear: m.value,
|
|
608
614
|
maxLength: e.maxLength,
|
|
@@ -614,11 +620,11 @@ const L = /* @__PURE__ */ E({
|
|
|
614
620
|
"onUpdate:modelValue": (h) => y.value = h,
|
|
615
621
|
focusOnCreated: e.focusOnCreated,
|
|
616
622
|
selectOnCreated: e.selectOnCreated,
|
|
617
|
-
onClear:
|
|
618
|
-
onClick:
|
|
619
|
-
onChange:
|
|
620
|
-
onBlur:
|
|
621
|
-
onInput:
|
|
623
|
+
onClear: j,
|
|
624
|
+
onClick: N,
|
|
625
|
+
onChange: G,
|
|
626
|
+
onBlur: w,
|
|
627
|
+
onInput: U,
|
|
622
628
|
beforeOpen: e.beforeOpen,
|
|
623
629
|
placement: e.placement,
|
|
624
630
|
popupMinWidth: e.minPanelWidth,
|
|
@@ -626,7 +632,7 @@ const L = /* @__PURE__ */ E({
|
|
|
626
632
|
popupOnClick: e.popupOnClick,
|
|
627
633
|
limitContentBySpace: !0
|
|
628
634
|
}, {
|
|
629
|
-
default: () => [I(
|
|
635
|
+
default: () => [I(ge, {
|
|
630
636
|
ref: a,
|
|
631
637
|
idField: e.idField,
|
|
632
638
|
valueField: e.valueField,
|
|
@@ -636,12 +642,12 @@ const L = /* @__PURE__ */ E({
|
|
|
636
642
|
selectedValues: l.value,
|
|
637
643
|
separator: e.separator,
|
|
638
644
|
multiSelect: e.multiSelect,
|
|
639
|
-
enableSearch:
|
|
645
|
+
enableSearch: d.value,
|
|
640
646
|
maxHeight: e.maxHeight,
|
|
641
647
|
enableHighlightSearch: e.enableHighlightSearch,
|
|
642
648
|
width: e.fitEditor ? c.value : void 0,
|
|
643
649
|
onSelectionChange: (h) => {
|
|
644
|
-
|
|
650
|
+
x(h), F();
|
|
645
651
|
}
|
|
646
652
|
}, null)]
|
|
647
653
|
});
|
|
@@ -652,12 +658,12 @@ const L = /* @__PURE__ */ E({
|
|
|
652
658
|
e.editor.remote = e.editor.remote || {}, e.editor.remote[t] = i;
|
|
653
659
|
}
|
|
654
660
|
};
|
|
655
|
-
class
|
|
661
|
+
class be extends te {
|
|
656
662
|
constructor(t, i) {
|
|
657
663
|
super(t, i);
|
|
658
664
|
}
|
|
659
665
|
getCommonEditorProperties(t) {
|
|
660
|
-
var i, a, n, s, m,
|
|
666
|
+
var i, a, n, s, m, d;
|
|
661
667
|
return {
|
|
662
668
|
viewType: {
|
|
663
669
|
visible: !!((i = t.editor) != null && i.multiSelect),
|
|
@@ -694,7 +700,7 @@ class ge extends D {
|
|
|
694
700
|
readonly: !!((s = t.editor) != null && s.multiSelect) && (((m = t.editor) == null ? void 0 : m.viewType) === "tag" || !t.editor.viewType)
|
|
695
701
|
},
|
|
696
702
|
enableHighlightSearch: {
|
|
697
|
-
visible: !!((
|
|
703
|
+
visible: !!((d = t.editor) != null && d.editable),
|
|
698
704
|
description: "编辑状态下启用高亮搜索",
|
|
699
705
|
title: "启用高亮搜索",
|
|
700
706
|
type: "boolean"
|
|
@@ -706,8 +712,8 @@ class ge extends D {
|
|
|
706
712
|
const i = this;
|
|
707
713
|
let a = "";
|
|
708
714
|
if (((s = t == null ? void 0 : t.binding) == null ? void 0 : s.type) === "Form") {
|
|
709
|
-
const
|
|
710
|
-
(m =
|
|
715
|
+
const d = this.schemaService.getFieldByIDAndVMID(t.binding.field, this.viewModelId);
|
|
716
|
+
(m = d == null ? void 0 : d.schemaField) != null && m.type && (a = d.schemaField.type.$type);
|
|
711
717
|
}
|
|
712
718
|
return i.getComponentConfig(t, { type: "combo-list" }, {
|
|
713
719
|
// enableSearch: {
|
|
@@ -801,31 +807,31 @@ class ge extends D {
|
|
|
801
807
|
}
|
|
802
808
|
},
|
|
803
809
|
...this.getCommonEditorProperties(t)
|
|
804
|
-
}, (
|
|
805
|
-
if (!
|
|
810
|
+
}, (d, u) => {
|
|
811
|
+
if (!d || !u.editor)
|
|
806
812
|
return;
|
|
807
813
|
const C = this;
|
|
808
|
-
switch (
|
|
814
|
+
switch (d.propertyID) {
|
|
809
815
|
case "dataSourceType": {
|
|
810
|
-
|
|
816
|
+
d.propertyValue === "static" ? (u.editor.valueField = "value", u.editor.textField = "name", u.editor.remote = null) : d.propertyValue === "dynamic" && (u.editor.remote = { method: "GET" }, u.editor.valueField = "value", u.editor.textField = "name");
|
|
811
817
|
break;
|
|
812
818
|
}
|
|
813
819
|
case "data": {
|
|
814
|
-
!C.checkEnumDataReadonly(
|
|
820
|
+
!C.checkEnumDataReadonly(u) && u.formatter && (u.formatter.data = [...d.propertyValue]);
|
|
815
821
|
break;
|
|
816
822
|
}
|
|
817
823
|
case "viewType":
|
|
818
|
-
|
|
824
|
+
d.propertyValue === "tag" && (u.editor.editable = !1);
|
|
819
825
|
}
|
|
820
826
|
});
|
|
821
827
|
}
|
|
822
828
|
getGridFieldEdtiorProperties(t, i) {
|
|
823
|
-
var m,
|
|
829
|
+
var m, d, u, C;
|
|
824
830
|
const a = this;
|
|
825
831
|
let n = "";
|
|
826
832
|
if (((m = t == null ? void 0 : t.binding) == null ? void 0 : m.type) === "Form") {
|
|
827
833
|
const y = this.schemaService.getFieldByIDAndVMID(t.binding.field, this.viewModelId);
|
|
828
|
-
(
|
|
834
|
+
(d = y == null ? void 0 : y.schemaField) != null && d.type && (n = y.schemaField.type.$type);
|
|
829
835
|
}
|
|
830
836
|
return a.getComponentConfig(t, { type: "combo-list" }, {
|
|
831
837
|
// editable: {
|
|
@@ -844,7 +850,7 @@ class ge extends D {
|
|
|
844
850
|
title: "数据",
|
|
845
851
|
type: "array",
|
|
846
852
|
visible: !0,
|
|
847
|
-
...a.getItemCollectionEditor(t, (
|
|
853
|
+
...a.getItemCollectionEditor(t, (u = t.editor) == null ? void 0 : u.valueField, (C = t.editor) == null ? void 0 : C.textField),
|
|
848
854
|
// 这个属性,标记当属性变更得时候触发重新更新属性
|
|
849
855
|
refreshPanelAfterChanged: !0
|
|
850
856
|
},
|
|
@@ -878,17 +884,17 @@ class ge extends D {
|
|
|
878
884
|
}
|
|
879
885
|
},
|
|
880
886
|
...this.getCommonEditorProperties(t)
|
|
881
|
-
}, (y,
|
|
882
|
-
if (!y || !
|
|
887
|
+
}, (y, b) => {
|
|
888
|
+
if (!y || !b.editor)
|
|
883
889
|
return;
|
|
884
890
|
const l = this;
|
|
885
891
|
switch (y.propertyID) {
|
|
886
892
|
case "dataSourceType": {
|
|
887
|
-
y.propertyValue === "static" ? (
|
|
893
|
+
y.propertyValue === "static" ? (b.editor.valueField = "value", b.editor.textField = "name", b.editor.remote = null) : y.propertyValue === "dynamic" && (b.editor.remote = { method: "GET" });
|
|
888
894
|
break;
|
|
889
895
|
}
|
|
890
896
|
case "data": {
|
|
891
|
-
!l.checkEnumDataReadonly(
|
|
897
|
+
!l.checkEnumDataReadonly(b) && b.formatter && (b.formatter.data = [...y.propertyValue]);
|
|
892
898
|
break;
|
|
893
899
|
}
|
|
894
900
|
}
|
|
@@ -916,27 +922,27 @@ class ge extends D {
|
|
|
916
922
|
var s;
|
|
917
923
|
super.changeBindingField(t, i);
|
|
918
924
|
const n = a;
|
|
919
|
-
t.editor && ((s = n == null ? void 0 : n.type) == null ? void 0 : s.$type) ===
|
|
925
|
+
t.editor && ((s = n == null ? void 0 : n.type) == null ? void 0 : s.$type) === D.EnumType && (t.editor.data = n.type.enumValues || []);
|
|
920
926
|
}
|
|
921
927
|
}
|
|
922
|
-
function
|
|
928
|
+
function pe(e, t) {
|
|
923
929
|
const i = e.schema;
|
|
924
930
|
function a(n, s) {
|
|
925
|
-
return new
|
|
931
|
+
return new be(n, t).getPropertyConfig(i, s);
|
|
926
932
|
}
|
|
927
933
|
return {
|
|
928
934
|
getPropsConfig: a
|
|
929
935
|
};
|
|
930
936
|
}
|
|
931
|
-
const
|
|
937
|
+
const Se = /* @__PURE__ */ E({
|
|
932
938
|
name: "FComboListDesign",
|
|
933
|
-
props:
|
|
939
|
+
props: he,
|
|
934
940
|
emits: ["clear", "update:modelValue", "change"],
|
|
935
941
|
setup(e, t) {
|
|
936
|
-
const i = g(), a = k("designer-host-service"), n = k("design-item-context"), s =
|
|
942
|
+
const i = g(), a = k("designer-host-service"), n = k("design-item-context"), s = pe(n, a), m = _(i, n, s);
|
|
937
943
|
return O(() => {
|
|
938
944
|
i.value.componentInstance = m;
|
|
939
|
-
}), t.expose(m.value), () => I(
|
|
945
|
+
}), t.expose(m.value), () => I(Z, {
|
|
940
946
|
ref: i,
|
|
941
947
|
buttonContent: e.dropDownIcon,
|
|
942
948
|
readonly: !0,
|
|
@@ -951,14 +957,14 @@ L.register = (e, t, i, a) => {
|
|
|
951
957
|
e["combo-list"] = L, t["combo-list"] = $;
|
|
952
958
|
};
|
|
953
959
|
L.registerDesigner = (e, t, i) => {
|
|
954
|
-
e["combo-list"] =
|
|
960
|
+
e["combo-list"] = Se, t["combo-list"] = $;
|
|
955
961
|
};
|
|
956
|
-
const
|
|
962
|
+
const Re = ee(L);
|
|
957
963
|
export {
|
|
958
964
|
L as FComboList,
|
|
959
|
-
|
|
960
|
-
|
|
965
|
+
me as Placement,
|
|
966
|
+
he as comboListDesignProps,
|
|
961
967
|
H as comboListProps,
|
|
962
|
-
|
|
968
|
+
Re as default,
|
|
963
969
|
$ as propsResolver
|
|
964
970
|
};
|